common_auth.schemas.stores.configs
Auth-state storage settings; no driver, connection or cryptography is loaded.
Classes
MemoryStoreConfig
Bases: _StoreConfig
Bounded process-local auth records; full capacity rejects new entries.
Active grants and pending login transactions must never be silently evicted. Sharing this config does not share store instances or coordinate containers.
Fields and properties declared here; inherited members belong to the bases above.
backend
backend: Literal['memory'] = 'memory'max_entries
max_entries: int = Field(default=10000, gt=0)PostgresConnectionConfig
Bases: _StoreConfig
Settings for an explicitly owned asynchronous PostgreSQL pool.
The caller supplies native PostgreSQL connection text (URI or keyword form), including its chosen host/cluster, database, identity and TLS settings. The runtime driver validates its full syntax; this schema checks nonempty text, numeric bounds and pool coherence only. No environment or secret lookup runs.
connect_timeout_sec bounds connection attempts; acquire_timeout_sec bounds waiting for a pool connection. Idle/lifetime values govern pool recycling. The runtime applies these explicit settings rather than DSN timeout defaults.
Fields and properties declared here; inherited members belong to the bases above.
acquire_timeout_sec
acquire_timeout_sec: float = Field(default=10.0, gt=0, allow_inf_nan=False)connect_timeout_sec
connect_timeout_sec: int = Field(default=10, gt=0)dsn
dsn: SecretStr = Field(min_length=1, repr=False, exclude=True)max_idle_sec
max_idle_sec: float = Field(default=300.0, gt=0, allow_inf_nan=False)max_lifetime_sec
max_lifetime_sec: float = Field(default=1800.0, gt=0, allow_inf_nan=False)max_size
max_size: int = Field(default=4, gt=0)min_size
min_size: int = Field(default=1, ge=0)PostgresStoreConfig
Bases: _StoreConfig
Store namespace and operation bounds, with owned or injected connectivity.
connection=None requires a borrowed async pool at runtime construction; supplying both is an error. Only owned pools are closed by the store. SQL layout and explicit migrations belong to the runtime store implementation.
Runtime construction also requires independent secret-protection capability. Encryption, conditional writes and grant-level coordination are mandatory runtime behavior, not guarantees conferred by constructing this schema.
Fields and properties declared here; inherited members belong to the bases above.
backend
backend: Literal['postgres'] = 'postgres'connection
connection: PostgresConnectionConfig | None = Field(default=None, repr=False)operation_timeout_sec
operation_timeout_sec: float = Field(default=10.0, gt=0, allow_inf_nan=False)schema_name
schema_name: str = 'common_auth'merge
def merge(**overrides: object) -> SelfPatch an existing connection without losing its protected DSN.