Skip to main content

LDAP / Active Directory

Connect Anaphora to your enterprise directory to manage users in one place. Anaphora supports Microsoft Active Directory, OpenLDAP, and other LDAP-compliant directories.

LDAP and Active Directory settings in Anaphora

Overview​

With LDAP, you manage users in the corporate directory and map AD groups to Anaphora roles. Anaphora does not store passwords: the directory validates them. Anaphora creates each user at the first login.

Configuration​

Go to Settings > System > Auth > LDAP to configure. To activate LDAP, add ldap to Strategies in Settings > System > General.

FieldDescriptionExampleRequired
URLLDAP server addressldap://ldap.forumsys.com:389Yes
Bind DNService account for bindingcn=read-only-admin,dc=example,dc=comYes
Bind credentialsService account password(stored securely)Yes
Search baseBase DN for user searchdc=example,dc=comYes
Search filterLDAP filter for user lookup(uid={{username}})Yes
Group search baseBase DN for group searchou=groups,dc=example,dc=comNo
Group search filterLDAP filter for groups(member={{cn}})No
Group name propertyAttribute for group namecn (default)No
System groupsGroups whose users get the system roleCN=Anaphora Admins,OU=Groups,DC=example,DC=comNo
Reject unauthorizedEnforce TLS certificate checksfalse (unchecked, default)No
CaCertificate authorityPEM file contents, one or moreNo
KeyClient private keyPEM file contentsNo
CertificateClient certificatePEM file contentsNo
PassphrasePassphrase for the client keyNo

Group to role mapping​

Use the group search to get LDAP groups and map them to Anaphora roles. In the Group search filter, use {{<attribute>}} placeholders to reference attributes of the login user, for example {{username}}, {{dn}}, {{uid}} or {{cn}}. Use the Group name property to specify the attribute that becomes the role name. Give these roles access to spaces in Settings > System > Permissions.

A group whose name attribute has more than one value (cn: [ops, operations]) gives one role per value. A group without that attribute gives no role.

System role​

A user in one of the System groups gets the system role: the Settings menu and Admin access to every space. Use the group DN, with dn as Group name property: a directory can hold a second group with the same cn in another OU. Without Group search base and Group search filter, no user has a group, and the start log warns when System groups is set. See System groups.

SSL/TLS configuration​

For secure connections use LDAPS (port 636):

ProtocolPortSecurity
LDAP389Unencrypted (not recommended)
LDAPS636SSL/TLS encrypted
StartTLS389Upgraded to TLS

For ldaps://, Anaphora does not check the certificate of the server unless Reject unauthorized is on. The start log warns while the check is off. To turn the check on, paste the CA of the server in Ca and turn on Reject unauthorized.

If your LDAP server requires TLS client authentication, fill in Ca, Key and Certificate under TLS Options. Paste the contents of the certificate or key file.

Active Directory specifics​

Service account​

Create a dedicated service account for Anaphora:

  1. Create user in AD: anaphora-svc
  2. Set password to never expire (or manage rotation)
  3. Grant "Read all user information" permission
  4. The account does not need admin privileges

Debug mode​

Enable LDAP debug logging:

  1. Go to Settings > System > General
  2. Set Log level to debug
  3. Reproduce the issue
  4. Review logs for detailed LDAP communication

Best practices​

  • Use a dedicated service account with minimal permissions
  • Always use LDAPS for encrypted connections
  • Test configuration changes in staging first
  • Map groups to roles instead of assigning individual users
  • Monitor the service account for lockouts or password expiration

Next steps​

  • SAML: add SAML SSO next to LDAP
  • Spaces: configure space-based access control