Setting up Ldap Authentication
OpenMetadata allows using LDAP for validating email and password authentication. Once setup successfully, the user should be able to sign in to OpenMetadata using the Ldap credentials. Below are the configuration types to set up the LDAP Authentication:Docker
Configure LDAP Authentication for Docker deployment.
Kubernetes
Configure LDAP Authentication for Kubernetes deployment.
Bare Metal
Configure LDAP Authentication for Bare Metal deployment.
Configure Ingestion
Once your server security is set, it’s time to review the ingestion configuration. Our bots support JWT tokens to authenticate to the server when sending requests. Find more information on Enabling JWT Tokens and JWT Troubleshooting to ensure seamless authentication.Map LDAP Groups to Roles
You can give users OpenMetadata roles based on the LDAP groups they belong to. Each time a user signs in, OpenMetadata looks up their groups and applies the roles you mapped to those groups.Group Lookup Settings
Set these underldapConfiguration so OpenMetadata can find the groups a user belongs to.
Role Mapping (authRolesMapping)
authRolesMapping is a JSON string. Each key is the full DN of an LDAP group. Each value is the list of OpenMetadata role names to give to members of that group.
- Role names must match roles that already exist in OpenMetadata. A name that doesn’t exist is skipped, and the server logs
Role <name> does not exist in OM Database. - A group DN that is not in the mapping is ignored.
- A user who belongs to several mapped groups gets the roles of all of them.
- The role whose name matches
roleAdminNamedoesn’t assign a role. It makes the user an admin.
Roles to Reassign (authReassignRoles)
authReassignRoles is a list of role names. It controls which roles LDAP is allowed to set each time a user signs in.
Where to Set Them
SetauthRolesMapping and authReassignRoles in the same place as the rest of your LDAP settings:
- Docker: environment variables
AUTH_ROLES_MAPPINGandAUTH_REASSIGN_ROLES. For more information, see LDAP for Docker. - Kubernetes: Helm values
openmetadata.config.authentication.ldapConfiguration.authRolesMappingandauthReassignRoles. For more information, see LDAP for Kubernetes. - Bare metal:
authRolesMappingandauthReassignRolesunderldapConfigurationinopenmetadata.yaml. For more information, see LDAP for Bare Metal.
openmetadata.yaml:
When Roles Are Applied
OpenMetadata reads the user’s groups every time the user signs in with LDAP, so a change to a group takes effect at the user’s next sign-in. A user who doesn’t exist in OpenMetadata yet is created at first sign-in, with their mapped roles, whenenableSelfSignup is enabled. Users in adminPrincipals stay admins whatever the mapping says.
Troubleshooting
This section covers common LDAP authentication problems and how to fix them.Some Users Can’t Log In With Error data 52e
Some users log in normally, but others with correct passwords get “You have entered an invalid username or password.” The server log shows:
data 52e means the directory (for example, Active Directory) rejected the credentials in the bind. If the stack trace includes validatePassword or performLdapBind, the failing bind is the user’s own login, not the lookup (admin) account.
Known issue in 2.0.x: Passwords that contain non-ASCII characters (for example ü, ç, or €) are corrupted before they reach the LDAP server, so the directory rejects them (#28694). The fix is included in 2.1.0.
To work around it on 2.0.x:
- Don’t change the LDAP admin (lookup) password. It isn’t the cause.
- Check whether the affected users have non-ASCII characters in their passwords. Until you upgrade to 2.1.0, they can use a password with only ASCII characters.
- Compare the LDAP attributes (for example
mailanduserPrincipalName) of affected users who use only ASCII characters with those of a user who can log in. - Confirm those users are under the configured
userBaseDN.