Configure Administrator Authentication#
ClusterWareAI administrator authentication is designed to easily
integrate with already deployed authentication systems via PAM. By
default cluster administrators are authenticated through the
pam_authenticator tool that in turn uses the PAM configuration
found in /etc/pam.d/cw_check_user. In this configuration,
administrators can authenticate using their operating system password
as long as they have been added to the ClusterWareAI system using the
cw-adminctl command.
For example, to add username "admin1":
cw-adminctl create name=admin1
If a ClusterWareAI administrator is running commands from a system
account on the head node by the same name (i.e. ClusterWareAI
administrator fred is also head node user fred), the system
will confirm their identity via a Unix socket based protocol. Enabled
by default, this mechanism allows the cw tools to connect to a
local socket to securely set a dynamically generated one-time password
that is then accepted during their next authentication attempt. This
takes place transparently, allowing the administrator to run commands
without providing their password. The client code also caches an
authentication cookie in the user's .scyldcw/auth_tkt.cookie for
subsequent authentication requests.
Managing cluster user accounts is generally outside the scope of
the ClusterWareAI platform and should be handled by configuring the compute node
images appropriately for your environment. In large organizations this
usually means connecting to Active Directory, LDAP, or any other
mechanism supported by your chosen compute node operating system. In
simpler environments where no external source of user identification
is available or it is not accessible, the ClusterWareAI platform provides a
sync-uids tool. This program can be found in the
/opt/scyld/clusterware-tools/bin directory and can be used to push
local user accounts and groups either to compute nodes or into a
specified image. For example:
# push uids and their primary uid-specific groups:
sync-uids --users admin1,tester --image SlurmImage
# push uid with an additional group:
sync-uids --users admin1 --groups admins --image SlurmImage
The above pushes the users and groups into the compute node image for persistence across reboots. Then either reboot the node(s) to see these changes, or push the IDs into running nodes with:
sync-uids --users admin1,tester --nodes n[1-10]
The tool generates a shell script that is then executed on the compute
nodes or within the image chroot to replicate the user and group
identifiers on the target system. This tool can also be used to push
ssh keys into the authorized_keys files for a user onto booted compute
nodes or into a specified image. Please see the tool's --help
output for more details and additional functionality, such as removing
users or groups, and controlling whether home directories are created
for injected user accounts.