> ## 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.

# KerberosConfig

> atoti.KerberosConfig(\
>
>     \*,\
>
>     *username\_case\_conversion*: 'upper' | 'lower' | [None](https://docs.python.org/3/builtins/constants.html#None) = `None`,\
>
>     *service\_principal*: [str](https://docs.python.org/3/builtins/stdtypes.html#str),\
>
>     *keytab*: [Path](https://docs.python.org/3/library/pathlib.html#pathlib.Path) | [None](https://docs.python.org/3/builtins/constants.html#None) = `None`,\
>
>     *krb5\_config*: [Path](https://docs.python.org/3/library/pathlib.html#pathlib.Path) | [None](https://docs.python.org/3/builtins/constants.html#None) = `None`,\
>
> )

The config to delegate authentication to [Kerberos](https://web.mit.edu/kerberos/).

The user’s roles can be defined using [`atoti.security.Security.kerberos`](./atoti.security.Security.kerberos#atoti.security.Security.kerberos) and [`individual_roles`](./atoti.security.Security.individual_roles#atoti.security.Security.individual_roles).

> [!WARNING]
>
> Changed in version 6.2.1: The Kerberos domain name is dropped from the username: the principals `alex@EXAMPLE.COM` and `alex` are the same user, named `alex`.

### 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`](./atoti.security.Security.individual_roles#atoti.security.Security.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`](#atoti.KerberosConfig.username_case_conversion) to `"lower"`.

> [!NOTE]
>
> Added in version 6.2.1: `None` keeps the username’s case unchanged.

#### *krb5\_config*

The path to the Kerberos config file.

Defaults to the OS-specific default location.
