Configuring Altus Director Server for LDAP and Active Directory
User and Group Model
When configured for LDAP, Altus Director expects that each user has an entry in an LDAP server under some base DN. When a user attempts to log in to the Altus Director server, the server will locate the user in LDAP and try to authenticate the user against the LDAP server using the provided password.
Altus Director expects that LDAP groups, collected under some base DN, are used to determine the roles that a user is authorized for. If a user is a member of a group in LDAP, then the user is granted the role that maps to that group. Multiple groups can map to the same role in Altus Director, and users can have multiple roles. Altus Director does not support the use of nested groups in LDAP to determine roles.
Basic LDAP Configuration
- The LDAP server host and port.
- The bind DN and password that Altus Director should use when searching for users and groups. This account does not need administrative access to the LDAP server, but only read access for the necessary searches.
- The base DN for user searches.
- The filter to use for user searches or the DN pattern that all user DNs adhere to. More information on these is provided below.
- The base DN for group searches.
- The filter to use for group searches. More information on this is provided below.
- The attribute of each group that forms the basis for an Altus Director role. More information on this is provided below.
- To look for a username in the uid attribute of a user entry, use the filter (uid={0}).
- To look for a username in the cn attribute of a user entry, use the filter (cn={0}).
- For Active Directory, use the filter (sAMAccountName={0}).
- The user DN pattern cannot be used for Active Directory. Instead, a user search filter must be supplied.
- When using the objectclass groupOfUniqueNames for user groups, use the filter (uniqueMember={0}).
- For Active Directory, use the filter (member={0}).
- The group role attribute is not used for Active Directory. The group name is always used as the basis for determining a role.
Configuration Property | Default | Meaning |
---|---|---|
lp.security.userSource | internal | Where to look for user data; for LDAP or Active Directory connectivity, set this to LDAP. |
lp.security.ldapConfig.url | N/A | The LDAP URL, with host and optional port, e.g.: ldap://ldaphost:389/. |
lp.security.ldapConfig.bindDn | N/A | The bind DN for Altus Director to use for searches. |
lp.security.ldapConfig.bindPw | N/A | The bind password for Altus Director to use for searches. |
lp.security.ldapConfig.userSearchBase | N/A | The base DN for user searches. |
lp.security.ldapConfig.userSearchFilter | N/A | The user search filter, e.g., (uid={0}). |
lp.security.ldapConfig.ldapDnPattern | N/A | The DN pattern for users. |
lp.security.ldapConfig.groupSearchBase | N/A | The base DN for group searches. |
lp.security.ldapConfig.groupSearchFilter | N/A | The group search filter, e.g., (uniqueMember={0}). |
lp.security.ldapConfig.groupRoleAttribute | N/A | The group attribute to use as a basis for selecting a role, e.g., cn. |
After setting or changing these configuration properties, restart the Altus Director server for them to take effect.
lp.security.userSource: LDAP lp.security.ldapConfig.url: ldap://openldaphost/ lp.security.ldapConfig.bindDn: cn=ldapadm,dc=domain,dc=example lp.security.ldapConfig.bindPw: password lp.security.ldapConfig.userSearchBase: ou=People,dc=domain,dc=example lp.security.ldapConfig.userSearchFilter: (uid={0}) lp.security.ldapConfig.ldapDnPattern: uid={0},ou=People,dc=domain,dc=example lp.security.ldapConfig.groupSearchBase: ou=Groups,dc=domain,dc=example lp.security.ldapConfig.groupSearchFilter: (uniqueMember={0}) lp.security.ldapConfig.groupRoleAttribute: cn
Local User Management under LDAP
Altus Director does not provide user management services when configured for LDAP. To make changes to user accounts and roles, make the necessary changes in the source LDAP server. Users might need to log out of Altus Director and log back in for changes to take effect.
Most user API endpoints for the Altus Director server are disabled when the server is configured for LDAP, and will return the HTTP response code 400 (Bad Request) for any request. Also, the Altus Director server UI does not present user management capabilities, such as password changes, when the server is configured for LDAP.
Role Mapping
- The value of the group role attribute, such as cn, is found.
- The value is converted to uppercase.
- The prefix ROLE_ is prepended.
Therefore, a group with a role attribute of admin is converted to the role ROLE_ADMIN. When using a role attribute of cn, then the DN for the group is similar to cn=admin,ou=Groups,dc=domain,dc=example.
- ROLE_READONLY - read-only / guest access
- ROLE_ADMIN - full access
An administrative account should have all roles, and therefore be a member of all mapped groups.
Role mapping is more complex for Active Directory and is described below.
Active Directory Configuration
- The domain for users and groups.
- The desired role mapping from group names to Altus Director roles.
Configuration Property | Default | Meaning |
---|---|---|
lp.security.ldapConfig.activeDirectory.domain | N/A | The domain. |
lp.security.ldapConfig.activeDirectory.roleMapping.* | N/A | The role mapping (multiple properties). |
After setting or changing these configuration properties, restart the Altus Director server for them to take effect.
lp.security.userSource: LDAP lp.security.ldapConfig.url: ldap://adhost/ lp.security.ldapConfig.bindDn: cn=Administrator,ou=Users,dc=domain,dc=example lp.security.ldapConfig.bindPw: password lp.security.ldapConfig.userSearchBase: ou=Users,dc=domain,dc=example lp.security.ldapConfig.userSearchFilter: (sAMAccountName={0}) lp.security.ldapConfig.groupSearchBase: ou=Groups,dc=domain,dc=example lp.security.ldapConfig.groupSearchFilter: (member={0}) lp.security.ldapConfig.activeDirectory.domain: DOMAIN.EXAMPLE lp.security.ldapConfig.activeDirectory.roleMapping.adminGroup: admin lp.security.ldapConfig.activeDirectory.roleMapping.readonlyGroup: readonly
Role Mapping
- The group name is searched for among the roleMapping configuration properties.
- If one is found, the property value is used as the base name for the role.
- If one is not found, the group is ignored.
- The base name is converted to uppercase.
- The prefix ROLE_ is prepended.
lp.security.ldapConfig.activeDirectory.roleMapping.group1Name: readonly lp.security.ldapConfig.activeDirectory.roleMapping.group2Name: readonly lp.security.ldapConfig.activeDirectory.roleMapping.group3Name: admin