[ Platform Documentation ] [ Title ] [ Contents ] [ Previous ] [ Next ] [ Index ]
Controlling access to remote execution has two requirements:
- Authenticate the user.
When a user executes a remote command, the command must be run with that user's permission. The LSF daemons need to know which user is requesting the remote execution.
- Check access controls on the remote host.
The user must be authorized to execute commands remotely on the host.
This chapter describes user, host, and daemon authentication in LSF.
- About User Authentication
- About Host Authentication
- About Daemon Authentication
- LSF in Multiple Authentication Environments
- User Account Mapping
[ Top ]
About User Authentication
LSF recognizes UNIX and Windows authentication environments, including different Windows domains and individual Windows workgroup hosts.
- In a UNIX environment, user accounts are validated at the system level, so your user account is valid on all hosts.
- In a Windows domain environment, user accounts are validated at the domain level, and your user account is valid on all hosts in your domain (and might be valid in other domains, if there is a trust relationship).
- In a Windows workgroup environment, each host authenticates the user account, so your local account is only valid on one host.
User authentication options
To enable LSF users to execute commands remotely, you must specify the authentication method LSF uses to authorize remote execution across the network.
You have the following choices:
If you change the authentication type while the LSF daemons are running, you must shut down and restart the LSF daemons on each LSF server host, so that the daemons will use the new authentication method.
External authentication (eauth)
External authentication uses the LSF
eauthexecutable installed in LSF_SERVERDIR. Optionally, you may choose to write your owneauthexecutable that uses some site-specific authentication method such as Kerberos or DCE client authentication using the GSSAPI.Examples of these can be found in the
LSF_MISC/examples/krbandLSF_MISC/examples/dcedirectories. Installation instructions are found in the README file in these directories.By default,
eauthuses an internal key to encrypt authentication data. To use an external key to improve security, configure the parameter LSF_EAUTH_KEY in thelsf.sudoersfile. The defaulteauthprogram is installed withoutsetuidpermission. If you use LSF_EAUTH_KEY,eauthmust besetuid.The
eauthmechanism can pass data (such as authentication credentials) from users to execution hosts. The environment variable LSF_EAUTH_AUX_DATA specifies the full path to a file where data, such as a credential, is stored. The mechanisms ofeauth -candeauth -sallow the LSF daemons to pass this data using a secure exchange.
Installation with lsfinstall sets LSF_AUTH=eauth in lsf.conf automatically. To use another authentication mechanism, you must change the value of LSF_AUTH and restart all LSF daemons.
When a command is invoked, the client program automatically executes
eauth -chost_name to get the external authentication data, where host_name is the name of the host running the LSF daemon (for example, RES) on which the operation will take place. The external user authentication data is passed to LSF through the standard output of theeauthprogram.When the LSF daemon receives the request, it executes
eauth -sunder the primary LSF administrator user ID to process the user authentication data.If your site cannot run authentication under the primary LSF administrator user ID, configure the parameter LSF_EAUTH_USER in the
/etc/lsf.sudoersfile.The LSF daemon expects
eauth -sto write to standard output:The same
eauth -sprocess can service multiple authentication requests; if the process terminates, the LSF daemon will re-invokeeauth -son the next authentication request.See the Platform LSF Reference for information about configuring the
lsf.sudoersfile.Standard input stream for the eauth program
User authentication data is passed to
eauth -svia its standard input. The standard input stream toeauthhas the following format:uid gid user_name client_addr client_port user_auth_data_len user_auth_data
where:
- uid is the user ID in ASCII of the client user
- gid is the group ID in ASCII of the client user
- user_name is the user name of the client user
- client_addr is the host address of the client host in ASCII dot notation
- client_port is the port number from where the client request is made
- user_auth_data_len is the length of the external authentication data in ASCII passed from the client
- user_auth_data is the external user authentication data passed from the client
Privileged ports authentication (setuid)
This is the mechanism most UNIX remote utilities use. The LSF commands must be installed as
setuidprograms and owned by root.If a load-sharing program is owned by root and has the
setuidbit set, the LSF API functions use a privileged port to communicate with LSF servers, and the servers accept the user ID supplied by the caller. This is the same user authentication mechanism as used by the UNIXrloginandrshcommands.When a
setuidapplication calls the LSLIB initialization routine, a number of privileged ports are allocated for remote connections to LSF servers. The effective user ID then reverts to the real user ID. Therefore, the number of remote connections is limited.An LSF utility reuses the connection to RES for all remote task executions on that host, so the number of privileged ports is only a limitation on the number of remote hosts that can be used by a single application, not on the number of remote tasks. Programs using LSLIB can specify the number of privileged ports to be created at initialization time.
If you do not define LSF_AUTH in lsf.conf, privileged ports (setuid) authentication is the default user authentication used by LSF. Installation with lsfinstall sets LSF_AUTH=eauth automatically. To use setuid authentication, you must remove LSF_AUTH from lsf.conf.
Identification daemon (identd)
LSF also supports authentication using the RFC 931 or RFC 1413 identification protocols. Under these protocols, user commands do not need to be installed as
setuidprograms owned by root. You must install theidentddaemon available in the public domain.The RFC 1413 and RFC 931 protocols use an identification daemon running on each client host. RFC 1413 is a more recent standard than RFC 931. LSF is compatible with both. Using an identification daemon incurs more overhead, but removes the need for LSF applications to allocate privileged ports.
You should use identification daemons if your site cannot install programs owned by root with the
setuidbit set, or if you have software developers creating new load-sharing applications in C using LSLIB.An implementation of RFC 931 or RFC 1413 such as
pidentdorauthdcan be obtained from the public domain. If you have Internet FTP access, a good source for identification daemons is hostftp.lysator.liu.se, directorypub/ident/servers.
Installation with lsfinstall sets LSF_AUTH=eauth in lsf.conf automatically. To use identd authentication, you must set LSF_AUTH=ident in lsf.conf.
How LSF determines the user authentication method
LSF uses the LSF_AUTH parameter in the
lsf.conffile to determine which type of authentication to use:
If LSF_AUTH is ... LSF uses ... eauth
External authentication (eauth)
Not defined
Privileged ports (setuid)
ident
Identification daemon (identd)
LSF_AUTH=eauthis set automatically during installation withlsfinstall. LSF runs the external executableeauthin the LSF_SERVERDIR directory to perform the authentication.If a load-sharing application is not
setuidto root, library functions use a non- privileged port. If the LSF_AUTH parameter is not set inlsf.conf, the connection is rejected.If LSF_AUTH is defined to be
ident, RES on the remote host, ormbatchdin the case of absubcommand, contacts the identification daemon on the local host to verify the user ID. The identification daemon looks directly into the kernel to make sure the network port number being used is attached to a program being run by the specified user.LSF allows both the
setuidand identification daemon methods to be in effect simultaneously. If the effective user ID of a load-sharing application is root, then a privileged port number is used in contacting RES. RES always accepts requests from a privileged port on a known host even if LSF_AUTH is defined to beident. If the effective user ID of the application is not root, and the LSF_AUTH parameter is defined to beident, then a normal port number is used and RES tries to contact the identification daemon to verify the user's identity.setuid permission on LSF administration commands
The LSF administration commands (
lsadminandbadmin, etc.) are installedsetuidby default. All other LSF commands except the administration commands can be run withoutsetuidpermission if an identification daemon is used.If your file server does not permit
setuidpermission, you should install LSF_BINDIR on a file system that does allowsetuid.Security of LSF authentication
All authentication methods supported by LSF depend on the security of the root account on all hosts in the cluster. If a user can get access to the root account, they can subvert any of the authentication methods. There are no known security holes that allow a non-root user to execute programs with another user's permission.
Some system adminstrators have particular concerns about security schemes involving RFC 1413 identification daemons. When a request is coming from an unknown host, there is no way to know whether the identification daemon on that host is correctly identifying the originating user.
LSF only accepts job execution requests that originate from hosts within the LSF cluster, so the identification daemon can be trusted.
The system environment variable LSF_ENVDIR is used by LSF to obtain the location of
lsf.conf, which points to the LSF configuration files. Any user who can modify system environment variables can modify LSF_ENVDIR to point to their own configuration and start up programs under thelsfadminaccount.All external binaries invoked by the LSF daemons (such as
esub,eexec,elim,eauth, and queue level pre- and post-execution commands) are run under thelsfadminaccount.By default, external authentication is installed on UNIX. If you use the identification protocol (
identd) for authentication, LSF uses a port in the UNIX privileged port range, so it is not possible for an ordinary user to start a hacked identification daemon on an LSF host.On UNIX, this means that authentication is done using privileged ports and binaries that need to be authenticated (for example,
bsub) are installedsetuidto root.By default, external authentication is installed on Windows. You may disable external authentication by disabling the LSF_AUTH parameter in the
lsf.conffile.On Windows, privileged ports authentication does not provide any security because Windows does not have the concept of
setuidbinaries and does not restrict which binaries can use privileged ports. A security risk exists in that a user can discover the format of LSF protocol messages and write a program that tries to communicate with an LSF server. The LSF default external authentication should be used where this security risk is a concern.Only the parameters LSF_STARTUP_USERS and LSF_STARTUP_PATH are used on Windows. You should ensure that only authorized users modify the files under the %SYSTEMROOT% directory.
Once the LSF services on Windows are started, they will only accept requests from LSF cluster administrators. To allow other users to interact with the LSF services, you must set up the
lsf.sudoersfile under the directory specified by the %SYSTEMROOT% environment variable.See the Platform LSF Reference for the format of the
lsf.sudoersfile.Correcting user authentication errors
If LSF cannot verify the user's identity, the error message
User permission deniedis displayed by LSF commands.This error has several possible causes:
- The LSF applications are not installed
setuid.- The NFS directory is mounted with the
nosuidoption.- The identification daemon is not available on the local or submitting host.
- External authentication failed.
- You configured LSF to use
ruserok()and the client host is not found in either the/etc/hosts.equivor the$HOME/.rhostsfile on the master or remote host.Password problem notification on Windows
A Windows job may not be able to run because of a problem with the user's LSF password (entered and updated using
lspasswd). If LSF does not recognize the password, the problem could be:
- The user never gave their Windows user account password to LSF (
lspasswd).- The user changed their password in Windows but did not update LSF (
lspasswd).If a job is in PEND state and LSF cannot run it because of a password problem, by default, LSF puts the job into USUSP and then notifies the user via email. The user can fix the problem, and then use
bresumeto release the job from USUSP.[ Top ]
About Host Authentication
When a batch job or a remote execution request is received, LSF first determines the user's identity. Once the user's identity is known, LSF decides whether it can trust the host from which the request comes from.
Trust LSF host
LSF normally allows remote execution by all users except root, from all hosts in the LSF cluster; LSF trusts all hosts that are configured into your cluster. The reason behind this is that by configuring an LSF cluster you are turning a network of machines into a single computer. Users must have valid accounts on all hosts. This allows any user to run a job with their own permission on any host in the cluster. Remote execution requests and batch job submissions are rejected if they come from a host not in the LSF cluster.
A site can configure an external executable to perform additional user or host authorization. By defining LSF_AUTH to be
eauthinlsf.conf, the LSF daemon will invokeeauth -swhen it receives a request that needs authentication and authorization. For example,eauthcan check if the client user is on a list of authorized users or if a host has the necessary privilege to be trusted./etc/hosts.equiv (UNIX)
If the LSF_USE_HOSTEQUIV parameter is set in the
lsf.conffile, LSF uses the same remote execution access control mechanism as thershcommand. When a job is run on a remote host, the user name and originating host are checked using theruserok(3) function on the remote host.The
ruserok(3) function checks in the/etc/hosts.equivfile and the user's$HOME/.rhostsfile to decide if the user has permission to execute jobs.The name of the local host should be included in this list. RES calls
ruserok()for connections from the local host.mbatchdcallsruserok()on the master host, so every LSF user must have a valid account and remote execution permission on the master host.The disadvantage of using the
/etc/hosts.equivand$HOME/.rhostsfiles is that these files also grant permission to use therloginandrshcommands without giving a password. Such access is restricted by security policies at some sites.For more information
See the
hosts.equiv(5) andruserok(3) man pages for details on the format of the files and the access checks performed.[ Top ]
About Daemon Authentication
Daemon authentication
By default, LSF calls the
eauthprogram only for user authentication (authenticate LSF user requests to either RES ormbatchd).LSF can also authenticate the following communications between daemons, using the same
eauthprogram:
mbatchdrequests tosbatchdsbatchdupdates tombatchd- PAM to
sbatchdinteractionsmbatchdtombatchd(in a Platform MultiCluster environment)The
eauthcan use these environment variables to provide context:
- LSF_EAUTH_CLIENT - sender of the authentication request
- LSF_EAUTH_SERVER - receiver of the authentication request
Configuring daemon authentication
Set LSF_AUTH_DAEMONS in
lsf.conf. For example,LSF_AUTH_DAEMONS=1[ Top ]
LSF in Multiple Authentication Environments
In some environments, such as a UNIX system or a Windows domain, you can have one user account that works on all hosts. However, when you build an LSF cluster in a heterogeneous environment, you can have a different user account on each system, and each system does its own password authentication.
This means that LSF cannot always use the submission account to run a job, because the job will fail if the execution host cannot validate the password of the account you used on the submission host.
In an environment of multiple authentication systems, user mapping determines which account LSF uses when it runs your job. User mapping can be defined all of the following ways:
- For clusters containing Windows hosts, LSF default user mapping (LSF_USER_DOMAIN in
lsf.conf) might be enabled. This should be configured only once, when you install and set up LSF.- User mapping at the user level (
lsb.hosts) is configurable by the user.- User mapping at the system level (
lsb.users) is configurable by the administrator.[ Top ]
User Account Mapping
LSF allows user account mapping across a non-uniform user name space.
By default, LSF assumes uniform user accounts throughout the cluster. This means that jobs will be executed on any host with exactly the same user ID and user login name.
The LSF administrator can disable user account mapping.
For information about account mapping between clusters in a MultiCluster environment, see the Using Platform LSF MultiCluster.
Configuring user-level account mapping (.lsfhosts)
- Set up a hidden
.lsfhostsfile in your home directory that tells what accounts to use when you send jobs to remote hosts and which remote users are allowed to run jobs under your local account. This is similar to the.rhostsfile used byrcp,rloginandrsh.- Specify each line in the form:
host_name user_name [send|recv]where
sendindicates that if you send a job to host host_name, then the account user_name should be used, andrecvindicates that your local account is enabled to run jobs from user user_name on host host_name. If neithersendnorrecvare specified, your local account can both send jobs to and receive jobs from the account user_name on host_name. Lines beginning with `#' are ignored. A plus sign (+) in the host_name or user_name field indicates any LSF host or user respectively.- Set the permission on your
.lsfhostsfile to read/write only by the owner. Otherwise, your.lsfhostsfile is silently ignoredThe cluster name can be substituted for host_name in a MultiCluster environment. For more information, see the Using Platform LSF MultiCluster.
For example, assume that
hostBandhostAin your cluster do not share the same user name/user ID space. You have an accountuser1on hosthostBand an account ruser_1 on hosthostA. You want to be able to submit jobs fromhostBto run onhostA. Set up your.lsfhostsfiles as follows:On
hostB:%cat ~user1/.lsfhostshostA ruser_1 sendOn
hostA:%cat ~ruser_1/.lsfhostshostB user1 recvAs another example, assume you have account
user1on hosthostBand want to use thelsfguestaccount when sending jobs to be run on hosthostA. Thelsfguestaccount is intended to be used by any user submitting jobs from any LSF host. Set up your.lsfhostsfiles as follows:On
hostB:%cat ~user1/.lsfhostshostA lsfguest sendOn
hostA:%cat ~lsfguest/.lsfhosts+ + recv
[ Top ]
[ Platform Documentation ] [ Title ] [ Contents ] [ Previous ] [ Next ] [ Index ]
Date Modified: January 12, 2004
Platform Computing: www.platform.com
Platform Support: support@platform.com
Platform Information Development: doc@platform.com
Copyright © 1994-2004 Platform Computing Corporation. All rights reserved.