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

# SecurityConfig

> atoti.SecurityConfig(\
>
>     \*,\
>
>     *basic\_authentication*: [BasicAuthenticationConfig](https://docs.activeviam.com/engine/python-sdk/6.2/api/atoti.config.security.BasicAuthenticationConfig.md#atoti.BasicAuthenticationConfig) = `BasicAuthenticationConfig()`,\
>
>     *client\_certificate*: [ClientCertificateConfig](https://docs.activeviam.com/engine/python-sdk/6.2/api/atoti.config.security.ClientCertificateConfig.md#atoti.ClientCertificateConfig) | [None](https://docs.python.org/3/builtins/constants.html#None) = `None`,\
>
>     *cors*: [CorsConfig](https://docs.activeviam.com/engine/python-sdk/6.2/api/atoti.config.security.CorsConfig.md#atoti.CorsConfig) | [None](https://docs.python.org/3/builtins/constants.html#None) = `None`,\
>
>     *https*: [HttpsConfig](https://docs.activeviam.com/engine/python-sdk/6.2/api/atoti.config.security.HttpsConfig.md#atoti.HttpsConfig) | [None](https://docs.python.org/3/builtins/constants.html#None) = `None`,\
>
>     *jwt*: [JwtConfig](https://docs.activeviam.com/engine/python-sdk/6.2/api/atoti.config.security.JwtConfig.md#atoti.JwtConfig) = `JwtConfig()`,\
>
>     *login*: [LoginConfig](https://docs.activeviam.com/engine/python-sdk/6.2/api/atoti.config.security.LoginConfig.md#atoti.LoginConfig) | [None](https://docs.python.org/3/builtins/constants.html#None) = `None`,\
>
>     *same\_site*: [Literal](https://docs.python.org/3/library/typing.html#typing.Literal)\['lax', 'none', 'strict'] = `'lax'`,\
>
>     *main\_sso*: [KerberosConfig](https://docs.activeviam.com/engine/python-sdk/6.2/api/atoti.config.security.KerberosConfig.md#atoti.KerberosConfig) | [LdapConfig](https://docs.activeviam.com/engine/python-sdk/6.2/api/atoti.config.security.LdapConfig.md#atoti.LdapConfig) | [OidcConfig](https://docs.activeviam.com/engine/python-sdk/6.2/api/atoti.config.security.OidcConfig.md#atoti.OidcConfig) | [None](https://docs.python.org/3/builtins/constants.html#None) = `None`,\
>
>     *sso*: [KerberosConfig](https://docs.activeviam.com/engine/python-sdk/6.2/api/atoti.config.security.KerberosConfig.md#atoti.KerberosConfig) | [LdapConfig](https://docs.activeviam.com/engine/python-sdk/6.2/api/atoti.config.security.LdapConfig.md#atoti.LdapConfig) | [OidcConfig](https://docs.activeviam.com/engine/python-sdk/6.2/api/atoti.config.security.OidcConfig.md#atoti.OidcConfig) | [None](https://docs.python.org/3/builtins/constants.html#None) = `None`,\
>
>     *xmla\_sso*: [KerberosConfig](https://docs.activeviam.com/engine/python-sdk/6.2/api/atoti.config.security.KerberosConfig.md#atoti.KerberosConfig) | [None](https://docs.python.org/3/builtins/constants.html#None) = `None`,\
>
> )

The security config.

> [!NOTE]
>
> Not available in the community edition: [upgrade](https://docs.activeviam.com/engine/python-sdk/6.2/getting_started/upgrade_from_community_edition.md) to use it.

This configures the parts of the security system that cannot be changed once the session is started.

**See also**:
[`atoti.Session.security`](./atoti.Session.security#atoti.Session.security) and [`atoti.tables.Tables.restrictions`](./atoti.Tables.restrictions#atoti.tables.Tables.restrictions) to continue configuring the security once the session is started.

### Attributes

#### *basic\_authentication*

Always enabled even if [`main_sso`](#atoti.SecurityConfig.main_sso) is not `None` to facilitate the authentication of service/technical users.

**See also**:
[`BasicAuthenticationSecurity`](./atoti.security.BasicAuthenticationSecurity#atoti.security.basic_authentication_security.BasicAuthenticationSecurity).

#### *client\_certificate*

> [ClientCertificateConfig](https://docs.activeviam.com/engine/python-sdk/6.2/api/atoti.config.security.ClientCertificateConfig.md#atoti.ClientCertificateConfig) | [None](https://docs.python.org/3/builtins/constants.html#None)

#### *cors*

> [CorsConfig](https://docs.activeviam.com/engine/python-sdk/6.2/api/atoti.config.security.CorsConfig.md#atoti.CorsConfig) | [None](https://docs.python.org/3/builtins/constants.html#None)

#### *https*

> [HttpsConfig](https://docs.activeviam.com/engine/python-sdk/6.2/api/atoti.config.security.HttpsConfig.md#atoti.HttpsConfig) | [None](https://docs.python.org/3/builtins/constants.html#None)

#### *jwt*

> [JwtConfig](https://docs.activeviam.com/engine/python-sdk/6.2/api/atoti.config.security.JwtConfig.md#atoti.JwtConfig)

#### *login*

> [LoginConfig](https://docs.activeviam.com/engine/python-sdk/6.2/api/atoti.config.security.LoginConfig.md#atoti.LoginConfig) | [None](https://docs.python.org/3/builtins/constants.html#None)

#### *same\_site*

The value to use for the *SameSite* attribute of the HTTP cookie sent by the session.

See [https://web.dev/samesite-cookies-explained](https://web.dev/samesite-cookies-explained) for more information.

> [!NOTE]
>
> `"none"` requires the session to be served over HTTPS.

#### *main\_sso*

The config to delegate authentication to a Single Sign-On provider.

**See also**:
[`xmla_sso`](#atoti.SecurityConfig.xmla_sso)

> [!NOTE]
>
> Added in version 6.2.3.

#### *sso*

The config to delegate authentication to a Single Sign-On provider.

> [!WARNING]
>
> Deprecated since version 6.2.3: Use [`main_sso`](#atoti.SecurityConfig.main_sso) instead:
>
> ```python theme={"languages":{"custom":["/engine/python-sdk/6.2/languages/pycon.tmLanguage.json"]}}
> tt.SecurityConfig(sso=tt.OidcConfig(...))  # [!code --]
> tt.SecurityConfig(main_sso=tt.OidcConfig(...))  # [!code ++]
> ```

#### *xmla\_sso*

The config to secure the `/xmla` endpoint with a different provider than [`main_sso`](#atoti.SecurityConfig.main_sso).

Excel’s Analysis Services connector only supports Windows (Kerberos) and Basic authentication.
A session whose [`main_sso`](#atoti.SecurityConfig.main_sso) is an [`OidcConfig`](./atoti.config.security.OidcConfig#atoti.OidcConfig) can therefore not be queried from Excel with the credentials of its identity provider.
Setting this attribute secures `/xmla` with Kerberos while every other endpoint keeps using [`main_sso`](#atoti.SecurityConfig.main_sso).
Its type must differ from the one of [`main_sso`](#atoti.SecurityConfig.main_sso).

> [!NOTE]
>
> Added in version 6.2.3.
