5.2 LDAP Authentication Against a Single LDAP Server Or Domain

You can configure a Sentinel server for LDAP authentication to enable users to log in to Sentinel with their LDAP directory credentials.

NOTE:Sentinel LDAP authentication has been tested with Novell eDirectory and Microsoft Active Directory. Other LDAP compliant directories might be used, but have not been tested. If an issue is encountered with a directory that has not been tested, support will be provided to the extent that the issue can be reproduced on one of the tested directories.

5.2.1 Overview

LDAP authentication can be performed either using an SSL connection or an unencrypted connection to the LDAP server.

You can configure the Sentinel server for LDAP authentication either with or without using anonymous searches on the LDAP directory.

NOTE:If anonymous search is disabled on the LDAP directory, you must not configure the Sentinel server to use anonymous search.

  • Anonymous: When you create Sentinel LDAP user accounts, the directory user name must be specified and the user distinguished name (DN) does not need to be specified.

    When the LDAP user logs in to Sentinel, the Sentinel server performs an anonymous search on the LDAP directory based on the specified user name, finds the corresponding DN, then authenticates the user login against the LDAP directory by using the DN.

  • Non Anonymous: When you create Sentinel LDAP user accounts, the user DN must be specified along with the user name.

    When the LDAP user logs in to Sentinel, the Sentinel server authenticates the user login against the LDAP directory by using the specified user DN and does not perform any anonymous search on the LDAP directory.

    There is an additional approach applicable only for Active Directory. For more information, see Domain Name:.

5.2.2 Prerequisites

Exporting the LDAP Server CA Certificate

If you want to connect to the LDAP server by using an SSL connection and the LDAP server certificate is not signed by a well-known certificate authority (CA), you must export the LDAP server CA certificate to a Base64-encoded file.

Enabling Anonymous Search in the LDAP Directory

To perform LDAP authentication using anonymous search, you must enable anonymous search in the LDAP directory. By default, anonymous search is enabled in eDirectory and is disabled in Active Directory.

  • eDirectory: See ldapBindRestrictions in section Attributes on the LDAP Server Object.

  • Active Directory: Enabling anonymous binds for Active Directory requires two steps. These steps are the same for both Windows 2003 and Windows 2008 Active Directory.

    • Enable Anonymous LDAP Operations: By default, anonymous LDAP operations are disabled in Active Directory. You must enable anonymous LDAP operations in Active Directory by setting the dsHeuristics attribute to an appropriate value.

      For more information, see Anonymous LDAP operations in Windows 2003 AD.

    • Assign Permissions to the ANONYMOUS LOGON User: The Read and List Contents permissions must be assigned to the ANONYMOUS LOGON user.

      For more information, see Granting anonymous read access.

5.2.3 Setting Up LDAP Authentication

  1. From Sentinel Main, click Users.

  2. On the Users page, click the LDAP Settings tab.

  3. Specify the following to configure LDAP authentication:

    Host: Specify the hostname or the IP address of the LDAP server.

    This is a required field if you select the SSL option.

    SSL: Select this option if you want to connect to the LDAP server by using a Secure Socket Layer (SSL) connection.

    Port: Specify the port number for the LDAP connection. The default SSL port number is 636 and the default non-SSL port number is 389.

    Certificate File Path: Specify the path of the CA certificate file for the LDAP server.

    This field should be used only if you selected the SSL option and if the LDAP server certificate is not signed by well-known CA and is not trusted by default.

    Anonymous Search: Select Yes to perform anonymous searches or select No if you do not want to perform anonymous searches on the LDAP directory.

    Base DN: Specify the root container to search for users, such as o=netiq for eDirectory or cn=users,dc=example,dc=co for Active Directory.

    • If Anonymous Search is Yes: Specify the root container in the LDAP directory to search for users.

      This is optional for eDirectory, and mandatory for Active Directory. For eDirectory, if the Base DN is not specified, the entire directory is searched to locate the users.

    • If Anonymous Search is No: Specify the root container in the LDAP directory that contains the users.

      This is mandatory if you are using Active Directory and if you set a domain name. For all other cases, this is optional.

    Search Attribute: Specify the LDAP attribute holding the user login name. This is used to search for users.

    For example:

    • eDirectory:

      uid
    • Active Directory:

      sAMAccountName

    This field is available only if you selected Yes for Anonymous Search.

    Domain Name: Specify the name of the Active Directory domain.

    This is an additional approach applicable only for Active Directory for performing LDAP authentication without using anonymous search.

    When you specify the Domain Name, username@domainname (userPrincipalName) is used to authenticate the user before searching for the LDAP user object.

    For example, test.example.com

    This field is applicable only for Active Directory and is available only if you selected No for Anonymous Search.

    NOTE:If Base DN is set and Domain Name is not set, the Base DN is appended to the relative user DN to construct the absolute user DN.

    For example, if the Base DN is set to o=netiq and the absolute user DN is cn=sentinel_ldap_user,o=netiq when the LDAP user account is created, only the relative user DN of cn=sentinel_ldap_user can be specified.

  4. Click Test Connection to test whether the LDAP connection is successful.

    1. Specify the test credentials to connect to the LDAP server:

      If Anonymous Search is Yes: Specify the user name and password.

      If you selected No for Anonymous Search and did not specify the Domain Name: Specify the user DN and password. The user DN can be relative to the Base DN.

      The User DN is based on the RFC 2253 standard. According to RFC 2253, when some reserved special characters are used as literals in a User DN, they must be escaped with a backslash (\). The following characters must be escaped:

      • A space or # character occurring at the beginning of the string

      • A space character occurring at the end of the string

      • One of the characters , +, ", \, <, > or ;

      For more information, see RFC 2253.

      For example, if the User DN contains a comma (,) as a literal, specify the User DN as follows:

      CN=Test\,User,CN=Users,DC=netiq,DC=com

      eDirectory or Active Directory might require additional characters to be escaped. Refer the eDirectory or Active Directory documentation for any additional characters to be escaped.

      If you selected No for Anonymous Search and specified the Domain Name: Specify the user name and password.

    2. Click Test to test the LDAP connection.

      A message is displayed that indicates whether the connection is successful.

      If there is an error, review the configuration details you provided and test the connection again.You can determine the cause of the failure by examining the /var/opt/novell/sentinel/log/server0.0.log file. You must ensure that the test connection is successful before saving the LDAP settings.

  5. Click Save to save the LDAP settings.

    On successful configuration:

    • The LdapLogin section of the /etc/opt/novell/sentinel/config/auth.login file is updated. For example:

      LdapLogin {
              com.sun.security.auth.module.LdapLoginModule required
      java.naming.ldap.factory.socket="com.esecurity.common.communication.ProxyLdapSSLSocketFactory"
              userProvider="ldap://10.0.0.1:636/o=netiq"
              userFilter="(&(uid={USERNAME})(objectclass=user))"
              useSSL=true;
      };
    • The LDAP server CA certificate, if provided, is added to a keystore named /etc/opt/novell/sentinel/config/.ldapkeystore.jks.

After saving the LDAP settings successfully, you can create LDAP user accounts to enable users to log in to Sentinel by using their LDAP directory credentials.

NOTE:You can also configure the Sentinel server for LDAP authentication by running the ldap_auth_config.sh script in the /opt/novell/sentinel/setup directory.

The script also supports command line options. To view the command line options, run the script as follows:

/opt/novell/sentinel/setup/ldap_auth_config.sh --help 

5.2.4 Logging in by Using LDAP User Credentials

After you successfully configure the Sentinel server for LDAP authentication, you can create Sentinel LDAP user accounts. For more information on creating LDAP user accounts, see Creating Users.

After you create the LDAP user account, you can log in to the Sentinel by using your LDAP user name and password.

5.2.5 Configuring Multiple LDAP Servers for Failover

To configure one or more LDAP servers as failover servers for LDAP authentication:

  1. Log in to the Sentinel server as root user.

  2. Switch to the novell user:

    su - novell
  3. Change to the /etc/opt/novell/sentinel/config directory:

    cd /etc/opt/novell/sentinel/config/
  4. Open the auth.login file for editing:

                    vi auth.login
                  
  5. Update the userProvider in the LdapLogin section to specify multiple LDAP URLs. Separate each URL by a blank space.

    For example:

    userProvider="ldap://primary_server_IP:port/BaseDN ldap://failover_server_IP:port/BaseDN" 

    For Active Directory, ensure that the BaseDN in the LDAP URL is not blank.

    For more information on specifying multiple LDAP URLs, see the description of the userProvider option in “Class LdapLogin Module”.

  6. Save the changes.

If you are using an SSL connection to the LDAP server and if the LDAP server certificate is not signed by a well-known CA, you must perform the following additional steps:

  1. Export the certificate of each failover LDAP server and copy the certificate file to the /etc/opt/novell/sentinel/config directory on the Sentinel server.

    For more information, see Exporting the LDAP Server CA Certificate.

  2. Ensure that you set the necessary ownership and permissions of the certificate file for each LDAP server.

    chown novell:novell /etc/opt/novell/sentinel/config/<cert-file>
    chmod 600 /etc/opt/novell/sentinel/config/<cert-file>
  3. Add each LDAP server certificate to the keystore named .ldapkeystore.jks.

    /opt/novell/sentinel/jdk/jre/bin/keytool -importcert -noprompt -trustcacerts -file <certificate-file> -alias <alias_name> -keystore /etc/opt/novell/sentinel/config/.ldapkeystore.jks -storepass password

    Replace <certificate-file> is the LDAP certificate filename and <alias_name> with the alias name for the certificate to be added.

    IMPORTANT:Ensure that you specify the alias. If no alias is specified, the keytool takes mykey as the alias by default. When you import multiple certificates into the keystore without specifying an alias, the keytool reports an error that the alias already exists.

In some environments, the Sentinel server might not connect to the failover LDAP server if the Sentinel server times out before it finds that the primary LDAP server is down. In such cases, perform the following additional steps to ensure that the Sentinel server connects to the failover LDAP server without timing out:

  1. Open the sysct1.conf file for editing:

    vi /etc/sysctl.conf
  2. Ensure that the net.ipv4.tcp_syn_retries value is set to 3. If the entry does not exist, add the entry. Save the file:

    net.ipv4.tcp_syn_retries = 3
  3. Execute the following commands for the changes to take effect:

    /sbin/sysctl -p
    /sbin/sysctl -w net.ipv4.route.flush=1
  4. Open the server.conf file for editing:

    vi /etc/opt/novell/sentinel/config/server.conf
  5. Set the Sentinel server time out value to 60 seconds by appending a new parameter in the Java Additional Parameters section as follows:

    wrapper.java.additional.53=-Desecurity.remote.timeout=60
  6. Restart the Sentinel server:

    /etc/init.d/sentinel restart