java - pam sharing hash -
i looking @ way pam modules designed guidelines own jaas loginmodule. 1 thing surprised me that, although method used access hashed password orthogonal hash method itself, not able find pam modules make use of property. because of security issue overlooked, or not explored yet?
to explain little bit more mean, let's have have 3 different methods access hashed password (ldap, sql, plain files) , 2 hash methods (md5, sha1). there is 1 or more pam modules each access method, each 1 implementing 1 or more of these hash methods. adding new hash method (say bcrypt) means these access method needs modified support new hash type. better design have 1 pam module each access method retrieves hashed password using user name, have separate set of pam modules hash verification, hashed value shared between modules (like password is). if use database store password, , use md5 verify password, configuration this:
password required pam_sql.so password required pam_md5.so
in configuration pam_sql retrieves hashed password database (or fails if username not exist). pam_md5 compares hashed password password test , fails if not match. in different configuration using bcrypt, have replace pam_md5 pam_bcrypt, without having wait developers of pam_sql update new hash method.
pam doesn't have knowledge of password hashing or methods of comparing passwords (whether hashed or not). pam provides facilities modules have "conversation" user, i.e. ask them questions , answers them. usual questions are, of course, "what's username?" , "what's password?", need not be. for pam cares, module ask user 5 questions or none before deciding outcome of authentication process.
what asking abstraction @ lower layer pam provides common services subset of pam modules deal hashed passwords.
what's question? want implement such abstraction , promote standard?
Comments
Post a Comment