Files
shared/packages/python-backend/src/shared_backend/__init__.py
T
Gabriel20xx 8701874efb feat(logshipper): support dynamic OmniLogger credentials
- Add per-service OmniLogger credentials to core config and update subscriptions.
- Follow config pushes and enforce entry and request size limits.
- Requeue batches after transient send failures.
2026-11-20 21:45:45 +01:00

88 lines
2.1 KiB
Python

"""Shared PostgreSQL and authentication primitives for Python services."""
from .auth import (
RESET_CODE_TTL,
ROLE_ADMIN,
ROLE_SUPERADMIN,
ROLE_USER,
AuthStore,
AuthUser,
ResetManager,
can_assign_role,
can_manage_users,
hash_password,
hash_password_async,
normalize_role,
password_hash_needs_upgrade,
verify_and_upgrade_password,
verify_and_upgrade_password_async,
verify_password,
verify_password_async,
)
from .authclient import (
AuthClient,
AuthClientError,
AuthGuardUser,
InvalidSessionError,
resolve_user,
token_from_request,
)
from .config import DatabaseConfig, database_url_from_env
from .coreconfig import (
MIN_INTERNAL_SECRET_LENGTH,
follow_omnilogger,
handle_core_services_push,
internal_secret_matches,
internal_secret_usable,
)
from .coreconfig import Info as CoreConfigInfo
from .coreconfig import Store as CoreConfigStore
from .logshipper import OmniLoggerHandler, Shipper
from .postgres import Database
from .tokens import hash_token, new_session_token
from .totp import generate_totp_secret, totp_provisioning_uri, verify_totp, verify_totp_step
__all__ = [
"AuthStore",
"AuthUser",
"AuthClient",
"AuthClientError",
"AuthGuardUser",
"InvalidSessionError",
"resolve_user",
"token_from_request",
"CoreConfigInfo",
"CoreConfigStore",
"follow_omnilogger",
"handle_core_services_push",
"internal_secret_matches",
"internal_secret_usable",
"MIN_INTERNAL_SECRET_LENGTH",
"ROLE_ADMIN",
"ROLE_SUPERADMIN",
"ROLE_USER",
"RESET_CODE_TTL",
"ResetManager",
"can_assign_role",
"can_manage_users",
"Database",
"DatabaseConfig",
"database_url_from_env",
"generate_totp_secret",
"hash_password",
"hash_password_async",
"hash_token",
"new_session_token",
"normalize_role",
"OmniLoggerHandler",
"Shipper",
"password_hash_needs_upgrade",
"totp_provisioning_uri",
"verify_and_upgrade_password",
"verify_and_upgrade_password_async",
"verify_password",
"verify_password_async",
"verify_totp",
"verify_totp_step",
]