Files
bdinvite/backend/app/auth/__init__.py
kiskaadee 381a6275c6 feat(security): harden authentication edge cases and verify deployment independence
- Add comprehensive adversarial edge case test coverage in backend/tests/test_security_hardening.py
- Enforce InvalidPKCEError (HTTP 401) on missing, invalid, or mismatched PKCE code_verifier
- Document and verify Direct Standalone and Homelab Production deployment modes in backend/app/config.py and .env.example
- Update docker-compose.yml to pass OIDC and session environment variables and route directly through Traefik
- Verify zero runtime occurrences of Remote-User in backend/app/ and frontend/src/
2026-10-07 06:48:57 -05:00

74 lines
1.5 KiB
Python

from .adapter import OIDCAuthAdapter
from .dependencies import (
AdminDep,
AuthenticatedDep,
CurrentIdentityDep,
get_auth_adapter,
get_current_identity,
require_admin,
require_authenticated,
require_group,
)
from .identity import Identity
from .oidc import (
AuthorizationRequest,
DiscoveryError,
InvalidPKCEError,
InvalidStateError,
InvalidTokenError,
MismatchedNonceError,
OIDCClient,
OIDCConfig,
OIDCError,
OIDCTransaction,
TokenExchangeError,
TokenResponse,
compute_code_challenge,
generate_code_verifier,
generate_nonce,
generate_state,
)
from .port import AuthPort
from .session import (
InMemorySessionStore,
SessionData,
SessionStore,
sign_session_cookie,
unsign_session_cookie,
)
__all__ = [
"AdminDep",
"AuthPort",
"AuthenticatedDep",
"AuthorizationRequest",
"CurrentIdentityDep",
"DiscoveryError",
"Identity",
"InMemorySessionStore",
"InvalidPKCEError",
"InvalidStateError",
"InvalidTokenError",
"MismatchedNonceError",
"OIDCAuthAdapter",
"OIDCClient",
"OIDCConfig",
"OIDCError",
"OIDCTransaction",
"SessionData",
"SessionStore",
"TokenExchangeError",
"TokenResponse",
"compute_code_challenge",
"generate_code_verifier",
"generate_nonce",
"generate_state",
"get_auth_adapter",
"get_current_identity",
"require_admin",
"require_authenticated",
"require_group",
"sign_session_cookie",
"unsign_session_cookie",
]