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 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.2 --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 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.3 requires SDK 0.4 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.

Plugin dependencies allow compatible SDK 0.x updates from the declared minimum. See the SDK compatibility policy for API guarantees and minimum/latest verification.

Metadata

Release files for toolframe-auth 0.3.2

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.2
File Size Uploaded Provenance Actions
toolframe_auth-0.3.2.tar.gz 43.1 kB With provenance Details for toolframe_auth-0.3.2.tar.gz

Built distribution (wheel)

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

Total release size: 61.7 kB

Release files / toolframe_auth-0.3.2.tar.gz

Download URL toolframe_auth-0.3.2.tar.gz
Size 43.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f37e01b33ca652a7e15810fd0983665316ef412831322448dd83c74ff52581f9
BLAKE2b-256 checksum
How to use checksums
cac0091e15171e2abe6e41ef32ff89763770c6d52a5b29748dd3f7375f2272d7
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 26, 2026.

Transparency log

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

Download URL toolframe_auth-0.3.2-py3-none-any.whl
Size 18.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f526da6f52247cf26561125cf7ecffc1922a1a6b1b5661ad2350e87bc4655ef1
BLAKE2b-256 checksum
How to use checksums
8db2145432c69afb47572cc69ae97e527cdf3b18999d88657019244104d74cd6
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 26, 2026.

Transparency log

Security for toolframe-auth 0.3.2

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.2.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 26, 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.2 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