LDAP / Active Directory

Authenticate your team against an existing LDAP or Active Directory server so every developer can sign in to the code review platform with their corporate credentials — accounts are created automatically on first login, ready to be assigned as code review participants.

Prerequisites

LDAP login works alongside regular email/password login and OAuth (GitLab, GitHub). Users can use any method that is configured — once authenticated, they immediately have access to all code reviews they are assigned to.
1

Configure environment variables

Add the following variables to your .env file. LDAP is enabled automatically when LDAP_HOST is set.

# LDAP server hostname or IP
LDAP_HOST=ldap.example.com

# Port — 389 for plain/STARTTLS, 636 for LDAPS
LDAP_PORT=389

# Base DN to search for users
LDAP_BASE=ou=people,dc=example,dc=com

# Bind DN — service account for searching
LDAP_BIND_DN=cn=service,dc=example,dc=com

# Bind password
LDAP_PASSWORD=service_account_password

# Domain suffix used to build email if the LDAP entry has no 'mail' attribute
LDAP_DOMAIN=example.com

Then restart the application:

docker compose restart app
Use a dedicated read-only service account for LDAP_BIND_DN. It only needs search/read permission on the user subtree.

Active Directory

For Active Directory, the bind DN is typically the user's UPN or sAMAccountName:

LDAP_HOST=dc.example.com
LDAP_PORT=389
LDAP_BASE=CN=Users,DC=example,DC=com
LDAP_BIND_DN=CN=svc-codeveira,CN=Users,DC=example,DC=com
LDAP_PASSWORD=service_account_password
LDAP_DOMAIN=example.com
Codeveira searches users by uid attribute. For Active Directory, uid maps to the sAMAccountName (login name without domain).
2

Test the login

Open the Codeveira login page. You should see a standard email/password form — LDAP does not add a separate button. Enter the LDAP username (the uid / sAMAccountName) and the LDAP password.

On first successful login, Codeveira creates a local user account populated from the LDAP entry and grants immediate access to the code review queue:

  • Username — from uid
  • Display name — from cn
  • Email — from mail attribute, or uid@LDAP_DOMAIN if absent
Subsequent logins re-authenticate against LDAP each time. If the LDAP password changes, the new password works immediately — no manual sync needed.

Environment variable reference

VariableRequiredDescription
LDAP_HOSTrequiredLDAP server hostname or IP. Setting this variable enables LDAP authentication.
LDAP_PORToptionalLDAP port. Default: 389. Use 636 for LDAPS.
LDAP_BASErequiredSearch base DN, e.g. ou=people,dc=example,dc=com.
LDAP_BIND_DNrequiredDN of the service account used to search the directory.
LDAP_PASSWORDrequiredPassword for the bind account.
LDAP_DOMAINoptionalDomain suffix appended to the username to build an email address when the LDAP entry has no mail attribute.

Troubleshooting

← Installation All docs →