How groverankur/astra works
Astra is a Python authentication and authorization platform. Its principal runtime path accepts application requests through framework adapters, processes OAuth/OIDC grants, and issues tokens and sessions; authorization and MFA provide policy and authentication controls along that path. Operators also configure and inspect deployments through the CLI and browser admin UI. The graph includes documented federation, WebAuthn, plugins, persistence, tenancy, and policy capabilities; some are represented at directory level because their implementation was not sampled.
Main entry points: oauth/services.py OAuth/OIDC grants · sessions/services.py Session lifecycle · oauth_http.py OAuth HTTP endpoints · app.py Browser admin UI
Components 25
Entry points
- Framework adapters
src/astraauth/adapters
Auth protocols
- OAuth HTTP endpoints
src/astraauth/core/adapters/oauth_http.py - OAuth/OIDC grants
src/astraauth/core/oauth/services.py - Client authentication
src/astraauth/core/oauth/client_auth.py - Token management
src/astraauth/core/token/token_manager.py - Session lifecycle
src/astraauth/core/sessions/services.py - Session state
src/astraauth/core/sessions/models.py - OIDC federation
src/astraauth/idp/services.py
Security controls
- RBAC and ABAC
src/astraauth/core/authorization/engine.py - MFA services
src/astraauth/core/mfa/services.py - MFA contracts
src/astraauth/core/mfa/models.py - Policy DSL parser
packages/astraauth-policy/src/astraauth_policy/parser.py - Relationship checks
packages/astraauth-policy/src/astraauth_policy/engine.py - WebAuthn ceremonies
src/astraauth/webauthn/services.py
Runtime services
- Session stores
src/astraauth/core/sessions/store.py - Relational persistence
src/astraauth/core/persistence/relational.py - Event bus
src/astraauth/core/events/base.py - Plugin runtime
src/astraauth/plugins/runtime.py - Tenant middleware
packages/astraauth-tenancy/src/astraauth_tenancy/middleware.py - Runtime configuration
src/astraauth/core/config/settings.py
Operator tools
- Operator CLI
packages/astraauth-cli/src/astraauth_cli/app.py - Browser admin UI
packages/astraauth-admin-ui/src/astraauth_admin_ui/app.py - Dashboard views
packages/astraauth-admin-ui/src/astraauth_admin_ui/components.py
Other components
- Python application
- OAuth client
Connections 27
- Python application → Framework adapters: uses
README.md - Framework adapters → OAuth HTTP endpoints: wires endpoints
- OAuth client → OAuth HTTP endpoints: requests tokens
README.md - OAuth HTTP endpoints → OAuth/OIDC grants: dispatches grants
src/astraauth/core/adapters/oauth_http.py - OAuth HTTP endpoints → RBAC and ABAC: checks access
src/astraauth/core/adapters/oauth_http.py - OAuth HTTP endpoints → Session lifecycle: handles sessions
src/astraauth/core/adapters/oauth_http.py - OAuth/OIDC grants → Client authentication: authenticates client
src/astraauth/core/oauth/services.py - OAuth/OIDC grants → RBAC and ABAC: checks policy
src/astraauth/core/oauth/services.py - OAuth/OIDC grants → Session lifecycle: creates sessions
src/astraauth/core/oauth/services.py - OAuth/OIDC grants → Token management: issues tokens
src/astraauth/core/oauth/services.py - Session lifecycle → Session state: creates and rotates
src/astraauth/core/sessions/services.py - Session lifecycle → Session stores: reads and writes
src/astraauth/core/sessions/services.py - Session lifecycle → Token management: encrypts refresh tokens
src/astraauth/core/sessions/services.py - Session lifecycle → Event bus: publishes events
src/astraauth/core/sessions/services.py - MFA services → MFA contracts: uses contracts
src/astraauth/core/mfa/services.py - MFA services → Session lifecycle: validates session
src/astraauth/core/mfa/services.py - WebAuthn ceremonies → MFA services: upgrades MFA
src/astraauth/webauthn/services.py - Relationship checks → Policy DSL parser: uses schema
packages/astraauth-policy/src/astraauth_policy/engine.py - Browser admin UI → Dashboard views: renders views
packages/astraauth-admin-ui/src/astraauth_admin_ui/app.py - Operator CLI → Browser admin UI: launches UI
packages/astraauth-cli/src/astraauth_cli/app.py - Operator CLI → Runtime configuration: loads settings
packages/astraauth-cli/src/astraauth_cli/app.py - Browser admin UI → Runtime configuration: uses settings
packages/astraauth-admin-ui/src/astraauth_admin_ui/app.py - OAuth/OIDC grants → Relational persistence: persists state
- OIDC federation → Relational persistence: stores federation state
- Plugin runtime → Relational persistence: uses relational storage
- Tenant middleware → OAuth/OIDC grants: scopes requests
- OAuth client → OIDC federation: federates identity