gPlazma2 is configured by the PAM-style configuration file
/etc/dcache/gplazma.conf.
Each line of the file is either a comment (i.e., starts with #,
is empty, or defines a plugin. Plugin defining lines start with the
plugin stack type (one of auth, map, account, session identity),
followed by a PAM-style modifier (one of optional, sufficient,
required, requisite), the plugin name and an optional list of
key-value pairs of parameters. During the login process they will be executed
in the order auth, map, account and session. The identity plugins
are not used during login, but later on to map from UID+GID back to user
names (e.g., for NFS). Within these groups they are used in the order they
are specified.
auth|map|account|session|identity optional|required|requisite|sufficient <plug-in> ["<key>=<value>" ...]
A complete configuration file will look something like this:
Example:
# Some comment auth optional x509 auth optional voms map requisite vorolemap map requisite authzdb authzdb=/etc/grid-security/authzdb session requisite authzdb
Login Phases
authauth-plug-ins are used to read the users public and private credentials and ask some authority, if those are valid for accessing the system.mapmap-plug-ins map the user information obtained in theauthstep to UID and GIDs. This may also be done in several steps (e.g., thevorolemapplug-in maps the users DN+FQAN to a username which is then mapped to UID/GIDs by theauthzdbplug-in.accountaccount-plug-ins verify the validity of a possibly mapped identity of the user and may reject the login depending on information gathered within the map step.sessionsessionplug-ins usually enrich the session with additional attributes like the user’s home directory.identityidentityplug-ins are responsible for mapping UID and GID to user names and vice versa during the work with dCache.
The meaning of the modifiers follow the PAM specification:
Modifiers
optionalThe success or failure of this plug-in is only important if it is the only plug-in in the stack associated with this type.
sufficientSuccess of such a plug-in is enough to satisfy the authentication requirements of the stack of plug-ins (if a prior required plug-in has failed the success of this one is ignored). A failure of this plug-in is not deemed as fatal for the login attempt. If the plug-in succeeds
gPlazma2immediately proceeds with the next plug-in type or returns control to the door if this was the last stack.requiredFailure of such a plug-in will ultimately lead to
gPlazma2returning failure but only after the remaining plug-ins for this type have been invoked.requisiteLike
required, however, in the case that such a plug-in returns a failure, control is directly returned to the door.
gPlazma2 functionality is configured by combining different types
of plug-ins to work together in a way that matches your requirements.
For this purpose there are five different types of plug-ins. These types
correspond to the keywords auth, map, account, session and
identity as described in the previous section. The plug-ins can be
configured via properties that may be set in
dcache.conf, the layout-file or in
gplazma.conf.
The kpwd plug-in authorizes users by username and password, by pairs
of DN and FQAN and by Kerberos principals.
Properties
gplazma.kpwd.filePath to
dcache.kpwdDefault:
/etc/dcache/dcache.kpwd
The voms plug-in is an auth plug-in. It can be used to verify X.509
credentials. It takes the certificates and checks their validity
by testing them against the trusted CAs. The verified certificates
are then stored and passed on to the other plug-ins in the stack.
Properties
gplazma.vomsdir.caPath to ca certificates
Default:
/etc/grid-security/certificatesgplazma.vomsdir.dirPath to
vomsdirDefault:
/etc/grid-security/vomsdir
The X.509 plug-in is a auth plug-in that extracts X.509
certificate chains from the credentials of a user to be used by
other plug-ins.
As a map plug-in it maps usernames to UID and GID. And as a
session plug-in it adds root and home path information to the
session based on the user’s username.
Properties
gplazma.kpwd.filePath to
dcache.kpwdDefault:
/etc/dcache/dcache.kpwd
The authzdb plug-in takes a username and maps it to UID+GID using
the storage-authzdb file.
Properties
gplazma.authzdb.filePath to
storage-authzdbDefault:
/etc/grid-security/storage-authzdb
The gridmap plug-in maps GLOBUS identities and Kerberos identities
to usernames.
Properties
gplazma.gridmap.filePath to
grid-mapfileDefault:
/etc/grid-security/grid-mapfile
The voms plug-in maps pairs of DN and FQAN to usernames via a
vorolemap
file.
Properties
gplazma.vorolemap.filePath to
grid-vorolemap/etc/grid-security/grid-vorolemap
The krb5 plug-in maps a kerberos principal to a username by removing
the domain part from the principal.
Example:
user@KRB-DOMAIN.EXAMPLE.ORG to user
The nsswitch plug-in uses the system’s nsswitch
configuration to provide mapping.
Typically nsswitch plug-in will be combined with vorolemap plug-in,
gridmap plug-in or krb5 plug-in:
Example:
# Map grid users to local accounts auth optional x509 #1 auth optional voms #2 map requisite vorolemap #3 map requisite nsswitch #4 session requisite nsswitch #5
In this example following is happening: extract user’s DN (1), extract and verify VOMS attributes (2), map DN+Role to a local account (3), extract uid and gids for a local account (4) and, finally, extract users home directory (5).
The nis plug-in uses an existing NIS service to map username+password
to a username.
Properties
gplazma.nis.serverNISserver hostDefault:
nisserv.domain.comgplazma.nis.domainNISdomainDefault:
domain.com
The result of nis plug-in can be used by other plug-ins:
Example:
# Map grid or kerberos users to local accounts auth optional x509 #1 auth optional voms #2 map requisite vorolemap #3 map optional krb5 #4 map optional nis #5 session requisite nis #6
In this example two access methods are considered: grid based and
kerberos based. If user comes with grid certificate and VOMS role:
extract user’s DN (1), extract and verify VOMS attributes (2),
map DN+Role to a local account (3). If user comes with Kerberos
ticket: extract local account (4). After this point in both cases
we talk to NIS to get uid and gids for a local account (5) and,
finally, adding users home directory (6).
The argus plug-in bans users by their DN. It talks to your site’s
ARGUS system (see
https://twiki.cern.ch/twiki/bin/view/EGEE/AuthorizationFramework
) to check for banned users.
Properties
gplazma.argus.hostcertPath to host certificate
Default:
/etc/grid-security/hostcert.pemgplazma.argus.hostkeyPath to host key
Default:
/etc/grid-security/hostkey.pemgplazma.argus.hostkey.passwordPassword for host key
Default:
gplazma.argus.caPath to CA certificates
Default:
/etc/grid-security/certificatesgplazma.argus.endpointURL of PEP service
Default:
https://localhost:8154/authz
The kpwd plug-in adds root and home path information to the session,
based on the username.
Properties
gplazma.kpwd.filePath to
dcache.kpwdDefault:
/etc/dcache/dcache.kpwd
The authzdb plug-in adds root and home path information to the session,
based and username using the storage-authzdb
file.
Properties
gplazma.authzdb.filePath to
storage-authzdbDefault:
/etc/grid-security/storage-authzdb
The nsswitch plug-in adds root and home path information to the
session, based on the username using your system’s
nsswitch service.
Typically nsswitch plug-in will be combined with vorolemap plug-in,
gridmap plug-in or krb5 plug-in:
Example:
# Map grid users to local accounts auth optional x509 #1 auth optional voms #2 map requisite vorolemap #3 map requisite nsswitch #4 session requisite nsswitch #5
In this example following is happening: extract user’s DN (1), extract and verify VOMS attributes (2), map DN+Role to a local account (3), extract uid and gids for a local account (4) and, finally, extract users home directory (5).
The nis plug-in adds root and home path information to the session,
based on the username using your site’s NIS service.
Properties
gplazma.nis.serverNISserver hostDefault:
nisserv.domain.comgplazma.nis.domainNISdomainDefault:
domain.com
The result of nis plug-in can be used by other plug-ins:
Example:
# Map grid or kerberos users to local accounts auth optional x509 #1 auth optional voms #2 map requisite vorolemap #3 map optional krb5 #4 map optional nis #5 session requisite nis #6
In this example two access methods are considered: grid based and
kerberos based. If user comes with grid certificate and VOMS role:
extract user’s DN (1), extract and verify VOMS attributes (2),
map DN+Role to a local account (3). If user comes with Kerberos
ticket: extract local account (4). After this point in both cases
we talk to NIS to get uid and gids for a local account (5) and,
finally, adding users home directory (6).
The nsswitch plug-in provides forward and reverse mapping for NFSv4.1
using your system’s nsswitch service.
The nis plug-in forward and reverse mapping for NFSv4.1 using your
site’s NIS service.
Properties
gplazma.nis.serverNISserver hostDefault:
nisserv.domain.comgplazma.nis.domainNISdomainDefault:
domain.com