1. New Authentication Scheme
1.1. Name Switch Server
Groups and users (passwd) should come from files and then a networked source on all machines. We can either use LDAP or user libnss-afs to grab this information from the AFS ptserver. There are advantages/disadvantages to either.
ClintonEbadi is leaning toward libnss-afs after thinking about this--there isn't really any point being able to query networked user and group information if openafs is not working since anything needing that info is going to rely on openafs anyway.
1.1.1. LDAP
Pros:
- Not dependent upon AFS running permitting networked user and group information to be found before the openafs client starts.
- Designed for such tasks and highly configurable
Other people maintain libnss-ldap
Cons:
- We have to keep LDAP and the pts database synchronized
uid and gids
- home directory
- shell
- Yet another service to keep running (and a fairly complicated one at that)
- No clear advantage over using the afs pts db for our purposes
1.1.2. AFS PTS Server
Pros:
- No need to ensure the pts server information is in sync with another database
- Provides semi-readable names to AFS PAGs when queried from the group name
- DTRT with home directories and shell configuration (at least within our setup)
- We have a known good configuration
Cons:
- No networked user information is available until the openafs client starts
- If communication with the afs server is lost user and group info becomes unavailable
- We may need to keep LDAP around anyway for storing information such as the user real name
We effectively have to maintain libnss-afs (which may not be such a burden--the afs and nss interfaces are stable)
1.2. PAM
1.2.1. Admin Only Nodes
Each admin should have a local user on every admin node and be listed in /etc/login.restrict.
Using pam_unix authentication is fine, but it only does not permit authentication for networked users by an accident of implementation (neither LDAP nor pts store passwords and so attempting to authenticate against them will always fail). pam_localuser authentication should be used for the login and sshd services to ensure any future NSS configuration changes do not inadvertently grant networked users access. At least ssh needs to be explicitly instructed to consult /etc/login.restrict using pam_listfile.
Other services may need to use pam_krb5 (e.g. imapd, ejabberd) to actually authenticate as networked users.
1.2.1.1. Outstanding Issues
$USER_admin users on each machine have different password on each machine which will quickly become a pain unless we set something up to keep them in sync
1.2.2. User Nodes
This is very tentative and won't apply to anything until we either acquire a replacement for mire or recommission deleuze as a user machine.
login and ssh should authenticate with pam_krb5 as sufficient and pam_localuser done afterward to permit admin users to login with a local account in case of Kerberos failure. Or should it be the other way around? The advantage to trying localuser first is that any admins would be less likely to forget their password.
pam_krb5 should also be provided as a password service with pam_unix later in the stack: if kerberos was not used to authenticate the module helpfully takes itself out of the password stack, and if a user does not have an entry in passwd failing to pam_unix after failing to change their kerberos password is harmless.
2. Old Authentication Scheme
This is how things are done on deleuze, mire, and hopper (hopper at least should be changed).
Regarding the exact authentication mechanism on HCoop. Each machine is unconditionally configured in one of the modes:
- No user logins are allowed
- User logins allowed, go through Kerberos and AFS
- User logins allowed, go through local Unix authentication, on local disk
All login configuration is done through PAM (/etc/pam.d/* files).
If /etc/login.restrict file is present, it automatically limits logins only to accounts listed in the file.
Speaking of Kerberos login, it's useful to mention/remind ourselves of the ~/.k5login feature (see manpage). We don't rely on this anywhere, but as said, useful to know about.