Centralized authentication on the cluster
The security feature allows cluster admin users to set up OpenLDAP in order to allow or deny user access to the cluster.
Note
FreeIPA configuration is not supported on Ubuntu (only supported on RHEL/Rocky Linux). OpenLDAP is provided as an alternative for Ubuntu.
Configuring OpenLDAP security
Prerequisites
Ensure that the following entry is present in the
input/software_config.json:{"name": "openldap"}
Run
local_repo.ymlto create offline repositories of OpenLDAP. For more information, click here.Enter the following parameters in
input/security_config.yml:
Parameter |
Details |
|---|---|
domain_name
|
|
Parameter |
Details |
|---|---|
|
For a TLS connection, provide a valid certification path. For an SSL connection, ensure port 636 is open.
|
|
File path pointing to the Certificate Authority (CA) issued certificate path. Certificate files should be saved with a .pem or .crt extension. If not provided, a self-signed certificate is generated by Omnia. |
|
File path pointing to the certificate used to authorize the LDAP server. Certificate files should be saved with a .pem or .crt extension. |
|
The private key that matches the LDAP certificate. |
|
|
|
|
|
|
|
|
|
|
|
LDAP server is configured using organizations. They are necessary for user creation and group mapping.
|
|
LDAP server is configured using organizations. They are necessary for user creation and group mapping.
|
Running the security role
The wrapper playbook omnia.yml handles execution of the security or authentication role. Alternatively, execute the security.yml playbook:
cd security
ansible-playbook security.yml -i inventory
Note
To run the security.yml playbook independently from the omnia.yml playbook on Intel Gaudi nodes, start by executing the performance_profile.yml playbook. Once that’s done, you can run the security.yml playbook separately.
The provided inventory should contain auth_server and login [optional] groups. The inventory file is case-sensitive. Follow the format provided in the sample files.
Do not include the IP of the OIM or local host in the
auth_servergroup of the inventory file.For secure login node functionality, ensure to add the
logingroup in the provided inventory file. To customize the security features on the login node, update the desired parameters ininput/login_node_security_config.yml.If a subsequent run of
security.ymlfails, thesecurity_config.ymlfile will be unencrypted.
Note
Installation of OpenLDAP server on the OIM is not supported.
Omnia sets up the internal OpenLDAP server for user authentication after the execution of
security.ymloromnia.ymlplaybook. If login fails for an OpenLDAP user, then check if theslapd-ltd.serviceis running on the authentication server. For more information, click here.
Caution
No users will be created by Omnia.
Create a new user on OpenLDAP
Create an LDIF file (eg:
create_user.ldif) on the auth server containing the following information:DN: The distinguished name that indicates where the user will be created.
objectClass: The object class specifies the mandatory and optional attributes that can be associated with an entry of that class. Here, the values are
inetOrgPerson,posixAccount, andshadowAccount.UID: The username of the replication user.
sn: The surname of the intended user.
cn: The given name of the intended user.
Below is a sample file:
# User Creation
dn: uid=ldapuser,ou=People,dc=omnia,dc=test
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
cn: ldapuser
sn: ldapuser
loginShell:/bin/bash
uidNumber: 2000
gidNumber: 2000
homeDirectory: /home/ldapuser
shadowLastChange: 0
shadowMax: 0
shadowWarning: 0
# Group Creation
dn: cn=ldapuser,ou=Group,dc=omnia,dc=test
objectClass: posixGroup
cn: ldapuser
gidNumber: 2000
memberUid: ldapuser
Note
Avoid whitespaces when using an LDIF file for user creation. Extra spaces in the input data may be encrypted by OpenLDAP and cause access failures.
Run the command
ldapadd -D <enter admin binddn > -w < bind_password > -f create_user.ldifto execute the LDIF file and create the account.To set up a password for this account, use the command
ldappasswd -D <enter admin binddn > -w < bind_password > -S <user_dn>. The value ofuser_dnis the distinguished name that indicates where the user was created. (In this example,uid=ldapuser,ou=People,dc=omnia,dc=test)
Setting up Passwordless SSH for the OpenLDAP users
Once user accounts are created, admins can enable password-less SSH for users to run HPC jobs on the cluster nodes.
Note
Once user accounts are created on the auth server, use the accounts to login to the cluster nodes to reset the password and create a corresponding home directory.
To customize your setup of password-less SSH, input custom parameters in input/passwordless_ssh_config.yml:
Parameter |
Details |
|---|---|
|
|
|
Indicates whether LDAP is in use on the cluster.
|
Use the below command to enable password-less SSH:
ansible-playbook user_passwordless_ssh.yml -i inventory
Where inventory follows the format defined under inventory file in the provided Sample Files. The inventory file is case-sensitive. Follow the format provided in the sample file link.
Caution
Do not run SSH-keygen commands after password-less SSH is set up on the nodes.
Configuring login node security
Prerequisites
Ensure that the following entry is present in the
input/software_config.json:{"name": "secure_login_node"}
Run
local_repo.ymlto create an offline repository of all utilities used to secure the login node. For more information, click here.For secure login node functionality, ensure to add the
logingroup in the provided inventory file.
Enter the following parameters in input/login_node_security_config.yml.
Variable |
Details |
|---|---|
|
The number of login failures that can take place before the account is locked out.
|
|
Period (in seconds) after which the number of failed login attempts is reset. Min value: 30; Max value: 60.
|
|
Period (in seconds) for which users are locked out. Min value: 5; Max value: 10.
|
|
User sessions that have been idle for a specific period can be ended automatically. Min value: 90; Max value: 180.
|
|
Email address used for sending alerts in case of authentication failure. When blank, authentication failure alerts are disabled. User can mention multiple comma-separated alert email addresses. Example: alert_email_address: "user1@domain.com,user2@domain.com"
|
|
This parameter will be applicable only when smtp_server:
- { host: "smtp-server.domain.com", port: "25", sender_address: "alert@domain.com" }"
|
|
Access control list of users. Accepted formats are username@ip (root@1.2.3.4) or username (root). Multiple users can be separated using whitespaces. |
|
This variable decides whether users are to be allowed or denied access. Ensure that AllowUsers or DenyUsers entries on sshd configuration file are not commented.
|
|
This variable is used to disable services. Root access is mandatory.
|
|
List of services to be disabled (Comma-separated). Example: ‘telnet,lpd,bluetooth’
|
Advanced Settings
To replicate the OpenLDAP server click here.
To set up the internal OpenLDAP server as a proxy, click here.
If you have any feedback about Omnia documentation, please reach out at omnia.readme@dell.com.