atoti.KerberosConfig(The config to delegate authentication to Kerberos. The user’s roles can be defined using
*,
username_case_conversion: ‘upper’ | ‘lower’ | None =None,
service_principal: str,
keytab: Path | None =None,
krb5_config: Path | None =None,
)
atoti.security.Security.kerberos and individual_roles.
Attributes
service_principal
The principal that the session will use.keytab
The path to the keytab file to use.username_case_conversion
The case conversion applied to the username of a user when they authenticate through this provider. This provider is generally case insensitive: A user named Alex can log in as"alex", "Alex", or "ALEX".
individual_roles and other username-keyed mappings are case sensitive though, so each spelling is a different user and Alex is denied their roles unless they log in with the exact spelling these roles are registered under.
A conversion collapses all the spellings into one: with session.security.individual_roles == {"alex": {"ROLE_USER"}}, set username_case_conversion to "lower".
Added in version 6.2.1:
None keeps the username’s case unchanged.