5.4. Procedure – Managing PSM users from an LDAP database

Purpose: 

The PSM web interface can authenticate users to an external LDAP database to simplify the integration of PSM to your existing infrastructure. You can also specify multiple LDAP servers: if the first server is unavailable, PSM will try to connect to the second server. To enable LDAP authentication, complete the following steps.

Note
  • The admin user is available by default and has all privileges. It is not possible to delete this user.

  • Enabling LDAP authentication automatically disables the access of every local user except for admin. The admin user can login to PSM even if LDAP authentication is used.

  • PSM accepts both pre-win2000-style and Win2003-style account names (User Principal Names). User Principal Names (UPNs) consist of a username, the at (@) character, and a domain name, for example administrator@example.com.

  • For the username of SSH users, only valid UTF-8 strings are allowed.

  • The following characters cannot be used in usernames and group names: /\[]:;|=,+*)?<>@"

  • When using RADIUS authentication together with LDAP users, the users are authenticated to the RADIUS server, only their group memberships must be managed in LDAP. For details, see Procedure 5.5, Authenticating users to a RADIUS server.

Warning

A user can belong to a maximum of 10,000 groups, further groups are ignored.

Warning

By default, PSM uses nested groups when querying the LDAP server. Nested groups are mostly useful when authenticating the users to Microsoft Active Directory, but can slow down the query and cause the connection to timeout if the LDAP tree is very large. In this case, disable the Enable nested groups option.

Steps: 

  1. Navigate to AAA > Settings > Authentication settings.

  2. Select the LDAP option and enter the parameters of your LDAP server.

    Figure 5.4. AAA > Settings > Authentication settings — Configuring LDAP authentication

    AAA > Settings > Authentication settings — Configuring LDAP authentication
    AAA > Settings > Authentication settings — Configuring LDAP authentication
    1. Enter the IP address or hostname and port of the LDAP server into the Server Address field. If you want to encrypt the communication between PSM and the LDAP server, in case of TLS, enter 636 as the port number, or in case of STARTTLS, enter 389 as the port number.

      Use an IPv4 address.

      To add multiple servers, click and enter the address of the next server. If a server is unreachable, PSM will try to connect to the next server in the list in failover fashion.

      Warning

      If you will use a TLS-encrypted with certificate verification to connect to the LDAP server, use the full domain name (for example ldap.example.com) in the Server Address field, otherwise the certificate verification might fail. The name of the LDAP server must appear in the Common Name of the certificate.

    2. Select the type of your LDAP server in the Type field. Select Active Directory to connect to Microsoft Active Directory servers, or Posix to connect to servers that use the POSIX LDAP scheme.

    3. Enter the name of the DN to be used as the base of the queries into the Base DN field (for example DC=demodomain,DC=exampleinc).

    4. Enter the name of the DN where PSM should bind to before accessing the database into the Bind DN field.

      For example: CN=Administrator,CN=Users,DC=demodomain,DC=exampleinc.

      Note
      • PSM accepts both pre-win2000-style and Win2003-style account names (User Principal Names), for example administrator@example.com is also accepted.

      • Do not use sAMAccountName, as the bind DN expects a CN.

    5. To configure or change the password to use when binding to the LDAP server, click Change and enter the password. Click Update. Click .

      Note

      PSM accepts passwords that are not longer than 150 characters. The following special characters can be used: !"#$%&'()*+,-./:;<=>?@[\]^-`{|}

    6. Optional step: Only use this option if you have an LDAP schema where the user groups can only be determined from a user attribute that contains the group DNs.

      In the User attr. of group DNs field, enter the name of the user attribute (for example in case of Active Directory: memberOf).

      Warning

      Using this option significantly slows down logon to the PSM web interface if you have too many groups.

  3. If you want to encrypt the communication between PSM and the LDAP server, in Encryption, select the TLS or the STARTTLS option and complete the following steps:

    Note

    TLS-encrypted connection to Microsoft Active Directory is supported only on Windows 2003 Server and newer platforms. Windows 2000 Server is not supported.

    • If you want PSM to verify the certificate of the server, select Only accept certificates authenticated by the specified CA certificate and click the icon in the CA X.509 certificate field. A pop-up window is displayed.

      Click Browse, select the certificate of the Certificate Authority (CA) that issued the certificate of the LDAP server, then click Upload. Alternatively, you can paste the certificate into the Copy-paste field and click Set.

      PSM will use this CA certificate to verify the certificate of the server, and reject the connections if the verification fails.

      Warning

      If you will use a TLS-encrypted with certificate verification to connect to the LDAP server, use the full domain name (for example ldap.example.com) in the Server Address field, otherwise the certificate verification might fail. The name of the LDAP server must appear in the Common Name of the certificate.

    • If the LDAP server requires mutual authentication, that is, it expects a certificate from PSM, enable Authenticate as client. Generate and sign a certificate for PSM, then click in the Client X.509 certificate field to upload the certificate. After that, click in the Client key field and upload the private key corresponding to the certificate.

    Balabit recommends using 2048-bit RSA keys (or stronger).

  4. Optional Step: If your LDAP server uses a custom POSIX LDAP scheme, you might need to set which LDAP attributes store the username, or the attributes that set group memberships. For example, if your LDAP scheme does not use the uid attribute to store the usernames, set the Username (userid) attribute name option. You can customize group-membership attributes using the POSIX group membership attribute name and GroupOfUniqueNames membership attribute name options.

    Note that PSM treats the retrieved usernames and group names as case sensitive.

  5. Click .

    Note

    You also have to configure the usergroups in PSM and possibly in your LDAP database. For details on using usergroups, see Section 5.7.4, How to use usergroups.

  6. Click Test to test the connection.