atoti.LdapConfig(The config to delegate authentication to an LDAP provider. The user’s roles can be defined using
*,
username_case_conversion: ‘upper’ | ‘lower’,
url: str,
base_dn: str,
manager_dn: str | None =None,
manager_password: str | None =None,
user_search_filter: str ='(uid={0})',
user_search_base: str ='',
group_search_filter: str ='(uniqueMember={0})',
group_search_base: str | None =None,
group_role_attribute_name: str ='cn',
)
atoti.security.Security.ldap and individual_roles.
Attributes
url
The LDAP URL including the protocol and port.base_dn
The base Distinguished Name of the directory service.manager_dn
The Distinguished Name (DN) used to log into the Directory Service and to search for user accounts. IfNone, the connection to the service will be done anonymously.
manager_password
The password for the manager account specified in the manager_dn attribute.user_search_filter
The filter to search for users. The substituted parameter is the user’s login name.username_case_conversion
The case conversion to apply to the username. This authentication provider is generally case insensitive: the same user Jane could log in with the usernames"jane", "Jane", "JANE", etc.
This attribute allows reducing all the possible cases to a single one to be compatible with individual_roles and other case sensitive mappings.
For instance, if session.security.individual_roles == {"jane": {"ROLE_USER"}}, username_case_conversion should be set to "lower".