# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .event_stream_cloud_event_connection_created_object_5_options_set_user_root_attributes_enum import (
    EventStreamCloudEventConnectionCreatedObject5OptionsSetUserRootAttributesEnum,
)
from .event_stream_cloud_event_connection_created_object_5_options_upstream_params import (
    EventStreamCloudEventConnectionCreatedObject5OptionsUpstreamParams,
)


class EventStreamCloudEventConnectionCreatedObject5Options(UniversalBaseModel):
    """
    Options for the 'ad' connection
    """

    agent_ip: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="agentIP"),
        pydantic.Field(
            alias="agentIP",
            description="IP address of the AD connector agent used to validate that authentication requests originate from the corporate network for Kerberos authentication  (managed by the AD Connector agent).",
        ),
    ] = None
    """
    IP address of the AD connector agent used to validate that authentication requests originate from the corporate network for Kerberos authentication  (managed by the AD Connector agent).
    """

    agent_mode: typing_extensions.Annotated[
        typing.Optional[bool],
        FieldMetadata(alias="agentMode"),
        pydantic.Field(
            alias="agentMode",
            description="When enabled, allows direct username/password authentication through the AD connector agent instead of WS-Federation protocol (managed by the AD Connector agent).",
        ),
    ] = None
    """
    When enabled, allows direct username/password authentication through the AD connector agent instead of WS-Federation protocol (managed by the AD Connector agent).
    """

    agent_version: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="agentVersion"),
        pydantic.Field(
            alias="agentVersion",
            description="Version identifier of the installed AD connector agent software (managed by the AD Connector agent).",
        ),
    ] = None
    """
    Version identifier of the installed AD connector agent software (managed by the AD Connector agent).
    """

    brute_force_protection: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Enables Auth0's brute force protection to prevent credential stuffing attacks. When enabled, blocks suspicious login attempts from specific IP addresses after repeated failures.
    """

    cert_auth: typing_extensions.Annotated[
        typing.Optional[bool],
        FieldMetadata(alias="certAuth"),
        pydantic.Field(
            alias="certAuth",
            description="Enables client SSL certificate authentication for the AD connector, requiring HTTPS on the sign-in endpoint",
        ),
    ] = None
    """
    Enables client SSL certificate authentication for the AD connector, requiring HTTPS on the sign-in endpoint
    """

    certs: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Array of X.509 certificates in PEM format used for validating SAML signatures from the AD identity provider (managed by the AD Connector agent).
    """

    disable_cache: typing.Optional[bool] = pydantic.Field(default=None)
    """
    When enabled, disables caching of AD connector authentication results to ensure real-time validation against the directory
    """

    disable_self_service_change_password: typing.Optional[bool] = pydantic.Field(default=None)
    """
    When enabled, hides the 'Forgot Password' link on login pages to prevent users from initiating self-service password resets
    """

    domain_aliases: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    List of domain names that can be used with identifier-first authentication flow to route users to this AD connection; each domain must be a valid DNS name up to 256 characters
    """

    icon_url: typing.Optional[str] = pydantic.Field(default=None)
    """
    https url of the icon to be shown
    """

    ips: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Array of IP address ranges in CIDR notation used to determine if authentication requests originate from the corporate network for Kerberos or certificate authentication.
    """

    kerberos: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Enables Windows Integrated Authentication (Kerberos) for seamless SSO when users authenticate from within the corporate network IP ranges
    """

    non_persistent_attrs: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    An array of user fields that should not be stored in the Auth0 database (https://auth0.com/docs/security/data-security/denylist)
    """

    set_user_root_attributes: typing.Optional[
        EventStreamCloudEventConnectionCreatedObject5OptionsSetUserRootAttributesEnum
    ] = None
    sign_in_endpoint: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="signInEndpoint"),
        pydantic.Field(
            alias="signInEndpoint",
            description="The sign-in endpoint type for the AD-LDAP connector agent (managed by the AD Connector agent).",
        ),
    ] = None
    """
    The sign-in endpoint type for the AD-LDAP connector agent (managed by the AD Connector agent).
    """

    tenant_domain: typing.Optional[str] = pydantic.Field(default=None)
    """
    Primary AD domain hint used for HRD and discovery.
    """

    thumbprints: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Array of certificate SHA-1 thumbprints for validating signatures. Managed by Auth0 when using the AD Connector agent.
    """

    upstream_params: typing.Optional[EventStreamCloudEventConnectionCreatedObject5OptionsUpstreamParams] = None

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
