Documentation Index
Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
Use this file to discover all available pages before exploring further.
final class atoti.security.ldap_security.LdapSecurity
Manage LDAP security on the session.
Example
>>> session_config = tt.SessionConfig(
... security=tt.SecurityConfig(
... sso=tt.LdapConfig(
... url="ldap://example.com:389",
... base_dn="dc=example,dc=com",
... user_search_base="ou=people",
... group_search_base="ou=roles",
... username_case_conversion="lower",
... )
... )
... )
>>> session = tt.Session.start(session_config)
>>> table = session.create_table(
... "Restrictions example",
... data_types={"City": "String"},
... )
>>> session.tables.restrictions["ROLE_MATHS"] = table["City"] == "Paris"
Roles from the authentication provider can be mapped to roles in the session:
>>> session.security.ldap.role_mapping["MATHEMATICIANS"] = {
... "ROLE_MATHS",
... "ROLE_USER",
... }
>>> sorted(session.security.ldap.role_mapping["MATHEMATICIANS"])
['ROLE_MATHS', 'ROLE_USER']
Default roles can be given to users who have no individual or mapped roles granted:
>>> session.security.ldap.default_roles.add("ROLE_USER")
>>> session.security.ldap.default_roles
{'ROLE_USER'}
default_roles | |
|---|
role_mapping | The role mapping is done with the roles included in the ID Token sent by the authentication provider. |