Skip to main content

Toolframe Auth

Authentication and grant decisions for access passwords, federated users and revocable agent delegation. This provider owns auth's managed SQL store; it never opens database files itself. It requires SDK 0.4.0 and toolframe.sql.

Install

With a running Toolframe application and an active SQL storage provider:

toolframe --home APP plugin add pypi:toolframe-auth==0.3.0 --enable

The Entry Register template includes Auth and Dashboard Auth. The host resolves the SDK and the plugin's isolated environment automatically.

Core supplies the private password-lookup key separately from configuration. Credential records store a keyed HMAC-SHA256 lookup plus a per-record salted scrypt verifier (N=131072, r=8, p=1, 32-byte output). At most two hashes run concurrently. Core also limits login attempts. Sessions use random opaque tokens; only SHA-256 digests of those high-entropy tokens are persisted. Metadata/list responses exclude lookup values, salts and verifiers.

The internal toolframe.auth service implements login, resolve/touch, logout, create/list/update/revoke. Core admits administrators and passes their trusted principal/catalog. These methods are not directly published business APIs. toolframe-dashboard-auth supplies presentation through core's protected API.

New passwords accept 8–32 characters; omitted passwords generate a random 32-character secret. Existing longer passwords issued by 0.1.0 can still log in. The password-length policy preserves existing password records and sessions.

Federated users and agent grants

Enable toolframe-oidc-auth for OIDC login. Auth remains the local identity and permission authority; it does not implement provider discovery or OAuth endpoints. Configure the trusted plugin ID with identity_provider (default oidc-auth) and initial admission with exact federated_identities entries:

[plugins.auth.config]
identity_provider = "oidc-auth"
federated_identities = [
  { issuer = "https://accounts.google.com", subject = "VERIFIED_SUB", label = "Alice", scopes = ["notes.read"] },
]

The trusted plugin must supply verified issuer/subject claims. No email matching or automatic account merging occurs. The admission entry creates a local user once; later permission/disablement changes use the protected user-management API. Changing admission configuration does not overwrite existing users. Every user gets system.auth.self; system.auth.users permits bounded administration.

The internal service additionally implements federated_login, users, user_update, grant_create, grant_check, grants and revoke_grant. Core verifies administrative/self-service callers; only the configured identity provider may admit external identities or issue/check delegated grants. Agent grants include user, issuer, client, resource, explicit business scopes and expiry. Grant checks intersect current user permissions. Revocation does not end the browser session; disabling a user invalidates sessions and revokes all their agent grants. Password and MCP-key credentials retain their independent behavior.

This feature introduces additive store revision v2. Existing v1 stores require Core's explicit migrate plan auth / migrate apply auth --plan-id ... workflow after staging a compatible Auth build. Back up the store and retained secrets first. The migration leaves existing password/session tables intact.

Active secret uniqueness is transactional. Expired/revoked secrets can be reused in a new record with a new grant; old sessions remain tied to the old record. Revoked records cannot be restored. Editing a grant invalidates its sessions. Delegation is limited by the administrator's own scopes, dynamic-business selector and expiry. Issued grants do not inherit a revocation dependency on their creator.

Configuration: session_max_seconds defaults to 604800; session_idle_seconds defaults to 86400. Password expiry caps both. Successful logins and authorized functional activity update usage; polling and denied attempts do not.

Back up the consistent auth SQLite store and retained private key together. A missing key with an existing store is a recovery error, not a reason to regenerate the key. Removing/reloading the plugin retains both. Runtime validation uses temporary storage and secrets.

uv sync
uv run pytest -q
uv run ruff check src tests
uv build --wheel

For the same isolated lint, tests, distribution and wheel-install checks used by GitHub Actions, run python3.14 scripts/ci.py. See CI and publishing for pinned sibling sources, local requirements and TestPyPI/PyPI setup.

Core owns access policy. Its compatible OIDC integration supports access.failure_mode = "closed" for protected deployments; the default preserves legacy public business fallback. MCP, llms and explicitly public business APIs have independent policies.

For release validation and Trusted Publisher setup, see releasing.

License

Licensed under the Apache License, Version 2.0. See LICENSE and NOTICE.

PostgreSQL storage

Version 0.2 requires SDK 0.3 and declares PostgreSQL migration SQL alongside the unchanged SQLite history. Provision this plugin’s stable store owner with the PostgreSQL provider before enabling it. The application still runs one Core; retain its private keys and configuration with the application home. Existing SQLite records are not imported automatically.

For development hooks and contribution rules, see Contributing.

Metadata

Release files for toolframe-auth 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for toolframe-auth 0.3.0
File Size Uploaded Provenance Actions
toolframe_auth-0.3.0.tar.gz 42.7 kB With provenance Details for toolframe_auth-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for toolframe-auth 0.3.0
File Interpreter ABI Platform Actions
toolframe_auth-0.3.0-py3-none-any.whl Python 3 none any Details for toolframe_auth-0.3.0-py3-none-any.whl

Total release size: 61.2 kB

Release files / toolframe_auth-0.3.0.tar.gz

Download URL toolframe_auth-0.3.0.tar.gz
Size 42.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c74d8da36a6a47425822aaf28814f2c7078c2186bc200f1a63aa6362fc769540
BLAKE2b-256 checksum
How to use checksums
012536462d88ad23b53bd5df7af9e3e7ba792aa1731d999c3fae1b1b389988a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Release files / toolframe_auth-0.3.0-py3-none-any.whl

Download URL toolframe_auth-0.3.0-py3-none-any.whl
Size 18.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a7e8b2b2826fe8fe9d579d5b2983e7a518b848c6ee8aff24c6c293ffbd2ffba5
BLAKE2b-256 checksum
How to use checksums
db72f562f1c4984652d368cb2e4057bf763a30e572b9ba2fd66e3643950f7d3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

Security for toolframe-auth 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for toolframe_auth-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page