CLI - Configuring the LDAP server
You can allow external directory users to connect to Spectrum Connect and manage it without having a locally-defined user account.
The connection to the directory server is established through Lightweight Directory Access Protocol (LDAP) authentication. When directory server access is enabled, any login attempt (attempt to log in to Spectrum Connect) is authenticated against the defined directory server.
- When directory user access is enabled and configured through sc_ldap, the directory users can access and manage only Spectrum Connect. A separate and unrelated authentication system may be used on the storage system side for directory-based management of the storage system. For more information, refer to CLI – Adding or removing storage system credentials and to your storage system documentation.
| Argument | Use after sc_ldap to: |
|---|---|
| configure -e -a -s <server URI> -t <directory server type> -r <user search DN> -k <user search key> -g <user group DN> -o <user group object class or configure --enable --anonymous --server_uri <server URI> --server_type <directory server type> --user_search_dn <user search DN> --user_search_key <user search key> --group_search_dn <user group DN> --group_object_class <user group object class> |
Enable directory access and establish a connection to a directory server as
an anonymous user with the following parameters specified after the -a
argument on the command line:
For example:
When prompted to enter a password, press Enter without entering any password:
After enabling the directory access, test the directory connection by using the test option (see below). After testing, restart the Spectrum Connect service as explained in Checking and controlling the Spectrum Connect Linux service. Then, use the sc_users command to add LDAP administrators to enable them to access the Spectrum Connect GUI, see CLI – Managing Spectrum Connect users and groups. |
| configure -e -u <Bind DN username> -p <Bind DN password> |
Enable directory access and establish a connection to a directory server by
using the Bind DN user account that was predefined on the directory server (predefined by the
directory server administrator). For this command, specify these two parameters in addition to the
entries listed for the anonymous user:
For example:
When prompted to enter a password, enter the directory server's Bind DN user password:
|
| configure -d or configure --disable |
Disable directory user access. After disabling the directory access, restart the Spectrum Connect service as explained in Checking and controlling the Spectrum Connect Linux service. |
| list | Display the current directory server configuration status (on Spectrum Connect) and Bind DN username. |
| test -u <directory username> -p <password> | Test a directory user account by specifying the username and password of that
account. You can test any user account that came up as configured user search DN on the directory
server (the test is not for the Bind DN user account, but for an actual directory account). For example:
|
| -h or --help |
Display help information that is relevant to sc_ldap. You can also display help for the configure, list, or test argument if it is typed on the command line as well. |
Adding a directory server certificate
- Log in to the directory server and issue the following command: certutil -ca.cert client.crt. This command generates the server certificate.
- Go to the /etc/openldap/ directory and edit the
ldap.conf file by setting the value for the TLS_CACERT
parameter. The following example shows the contents of the ldap.conf
file:
Make sure that the TLS_CACERT parameter has the directory and file name of the new certificate that you generated. After editing the ldap.conf file, the ldap.ini file is automatically updated.#LDAP Defaults # #BASE dc=example,dc=com #URI ldap://ldap.example.com ldap://ldap-master.example.com:port# #SIZELIMIT 12 #TIMELIMIT 15 #DEREF never TLS_CACERT /etc/openldap/certs/trusted_ldap.pem
Editing the ldap.ini configuration file
- Do not edit the ldap.ini file if you are not familiar with directory setting conventions.
- Restart Spectrum Connect after editing the ldap.ini file to apply the changes.
='
sign:enable_ldap = True
server_uri = ldap://servername.domainname:389
server_type = OPEN_LDAP
user_search_dn = ou=users,dc=dcname,dc=com
user_search_key =
group_search_dn = dc=dcname,dc=com
group_object_class =
bind_dn =
bind_password = <enctypted password>=
bind_pwd_verification = <encrypted key>=
The following table summarizes the parameters and their indication.
| Parameter | Indication |
|---|---|
| enable_ldap | True or False. When |
| server_uri | Uniform resource identifier (URI) of the directory server. |
| server_type | Type of the directory server:
|
| user_search_dn | Distinguished name (DN) to be used for user search. |
| user_search_key | Search tag for obtaining a unique relative distinguished
name (RDN). Commonly used values: |
| group_search_dn | Distinguished name (DN) to be used for user group search. |
| group_object_class | Type of the user group. Commonly used values: |
| bind_dn | Username of the Bind DN user through which access to the directory server is established. |
| bind_password | Password of the Bind DN username. The password is displayed in its encrypted form. |
| bind_pwd_verification | Verification string for the Bind DN password. The string is displayed in its encrypted form. |
- user_search_key and user_search_dn return unique
results. For
example:
In this case, if the user name is "John", the resulting DN for matching the user over LDAP would be: uid=John,ou=users,dc=dcname,dc=comuser_search_key=uid user_search_dn=ou=users,dc=dcname,dc=com - When server_type type is Active Directory, the following parameters are
used by
default:
user search key = sAMAccountName user group object class = NestedActiveDirectoryGroup - When server_type type is Open LDAP, the following parameters are used by
default:
user search key = uid user group object class = GroupOfUniqueNames - You can use a valid username and password (defined on the LDAP server) with the sc_ldap test command to test your LDAP configuration.