AuthMate
AuthMate is a provider-neutral authorization boundary for Python services. Version 0.1.0 is a stateless contract preview: it validates shared values, coordinates principal and authorization providers, and supplies a small FastAPI adapter. It does not authenticate requests, persist data, implement RBAC, manage credentials, or provide a production-readiness guarantee.
Independent by default, composable by contract.
Status
The phase 0.1 runtime is implemented under src/authmate. Read the
quickstart and planning index for the
public contract and release boundary.
Supported runtime
Python 3.11 through 3.14. Install this checkout with uv sync --group dev.
AuthMate is distributed under the MIT License.
Quick start
Providers are host-owned and implement the protocols in authmate.protocols.
The service calls the principal provider first, then the authorization provider
only for an enabled, non-expired principal.
from uuid import uuid4
from authmate import (
AccessContext,
AuthMate,
AuthorizationDecision,
PrincipalKind,
PrincipalRecord,
PrincipalRef,
)
actor = PrincipalRef(id=uuid4(), kind=PrincipalKind.USER)
class Principals:
async def get_principal(self, ref):
return PrincipalRecord(ref=ref, display_name="Ada", enabled=True)
async def aclose(self):
pass
class Policy:
async def authorize(self, *, principal, action, resource):
return AuthorizationDecision(
allowed=True, reason="allowed", action=action, resource=resource
)
async def aclose(self):
pass
async def check_request():
service = AuthMate(principal_provider=Principals(), authorization_provider=Policy())
try:
return await service.require(context=AccessContext(actor=actor), action="report.read")
finally:
await service.aclose()
See the phase 0.1 quickstart for FastAPI integration, provider contracts, lifecycle behavior, and deliberate non-goals.
Development
uv sync --frozen --group dev
uv run ruff format --check .
uv run ruff check .
uv run mypy --strict src/authmate tests
uv run pytest --cov=authmate --cov-branch --cov-fail-under=95
uv build
uv run twine check dist/*
Planned MVP
- Users, operator provisioning, opaque SQL-backed browser sessions, and revocation.
- Service accounts, revocable API tokens, and generic delegated identity.
- Exact RBAC scopes, FastAPI dependencies, and Python service APIs.
- Credential metadata, exact secret-use grants, and approved environment references.
- Durable SQL audit, rate limiting, CSRF protection, and explicit recovery procedures.
- Typed public contracts, controlled model/provider extensions, and reviewed migrations.
PostgreSQL is the production reference; SQLite supports local development. No Redis, broker, external identity service, or external secret manager is required. Encrypted SQL secret storage, federation, tenancy, and richer extensions have later release gates.
Architecture principles
- AuthMate owns its security semantics and public contracts; consumers adapt to them.
- Mandatory service checks remain authoritative with custom providers.
- Pydantic public contracts are separate from SQLModel/SQLAlchemy persistence.
- FastAPI composition uses explicit DI, lifespan, security, and OpenAPI integration.
- Core requires SQL-backed state, not process-local caches or additional services.
Hedron, ShuETL, and other applications may build optional adapters against AuthMate. Core contains no consumer workflow records, callbacks, domain imports, or release dependencies. Consumer-owned compatibility tests establish supported combinations. See Consumer Contracts and MVP gates.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file authmate-0.1.0.tar.gz.
File metadata
- Download URL: authmate-0.1.0.tar.gz
- Upload date:
- Size: 142.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aef81892483343fa2d47943433c28f59cac03bbf37b051a7d21944f0b09b4149
|
|
| MD5 |
8bc3838691d344dd7ec78b3182e33390
|
|
| BLAKE2b-256 |
cc932d02cc85b58da47d0f6f00d1b48ecb08a570d7678ff9e7ea5d3f9cf33fd6
|
Provenance
The following attestation bundles were made for authmate-0.1.0.tar.gz:
Publisher:
release.yml on eddiethedean/authmate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
authmate-0.1.0.tar.gz -
Subject digest:
aef81892483343fa2d47943433c28f59cac03bbf37b051a7d21944f0b09b4149 - Sigstore transparency entry: 2810703869
- Sigstore integration time:
-
Permalink:
eddiethedean/authmate@f642b1934ed15e8ed6e7707b486277ccd5df5199 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/eddiethedean
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f642b1934ed15e8ed6e7707b486277ccd5df5199 -
Trigger Event:
push
-
Statement type:
File details
Details for the file authmate-0.1.0-py3-none-any.whl.
File metadata
- Download URL: authmate-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5f92b49f9cbeb563ce0119d854dda01a71ceba229c30a9c172a482fecdfefbc
|
|
| MD5 |
9cbc8bff43fb6f63f38c7200043c12ee
|
|
| BLAKE2b-256 |
81b46bc44e6466ba8c404a7d0d933fc646ee355e1e86aaa0cd57842c290e192d
|
Provenance
The following attestation bundles were made for authmate-0.1.0-py3-none-any.whl:
Publisher:
release.yml on eddiethedean/authmate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
authmate-0.1.0-py3-none-any.whl -
Subject digest:
b5f92b49f9cbeb563ce0119d854dda01a71ceba229c30a9c172a482fecdfefbc - Sigstore transparency entry: 2810703887
- Sigstore integration time:
-
Permalink:
eddiethedean/authmate@f642b1934ed15e8ed6e7707b486277ccd5df5199 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/eddiethedean
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f642b1934ed15e8ed6e7707b486277ccd5df5199 -
Trigger Event:
push
-
Statement type: