atoti.config.authentication.ldap_config module¶
- class atoti.LdapConfig¶
The configuration to connect to an LDAP authentication provider.
The user’s roles are defined using
LdapSecurity
.Example
>>> auth_config = tt.LdapConfig( ... url="ldap://example.com:389", ... base_dn="dc=example,dc=com", ... user_search_base="ou=people", ... group_search_base="ou=roles", ... )
- group_search_filter: str = '(uniqueMember={0})'¶
The LDAP filter to search for groups.
The substituted parameter is the DN of the user.
- role_mapping: Optional[Mapping[str, Iterable[str]]] = None¶
The mapping between the roles returned by the LDAP authentication provider and the corresponding roles to use in atoti.
LDAP roles are case insensitive.
Users without the role ROLE_USER will not have access to the application.
Warning
This configuration option is deprecated. Use
atoti_plus.security.LdapSecurity.role_mapping
instead.