Skip to main content

auth51-governance

The governance-time engine for auth51. It does three things, all pure and stdlib-only:

  1. Classify an action's consequence into an ordered tier (READ < WRITE < SENSITIVE < FINANCIAL < DESTRUCTIVE).
  2. Synthesize a guarded workflow from sampled run observations plus the roster's capability catalog. Guard strength follows the tier, not a single boolean.
  3. Validate a proposed workflow against the tier floor, so the authority can reject a workflow that frees a dangerous capability regardless of who proposed it.

Why it's a separate library

Deriving and registering workflows is a governance-time act, not a runtime one — even though the learning signal (observations) comes from runs. Any client can produce observations: the reference workforce, a custom app on the auth51 client, or the auth51d gateway. They all feed the same engine here, and the authority stays the single source of truth for guard strength by calling validate_workflow at registration.

Kept dependency-light and portable, exactly like auth51-checksum, so both the authority and clients can depend on it without pulling a framework.

The guard ladder

observed (≥ min_support runs) unobserved / under-supported
READ free (no step)
WRITE free (no step)
SENSITIVE ordered (must follow legit predecessors) approval gate
FINANCIAL ordered (value-bound in a later phase) approval gate
DESTRUCTIVE approval gate (never downgraded) approval gate

Two properties over the old binary model: a real ladder (an identity edit ≠ a money movement), and high tiers never auto-free (a DESTRUCTIVE op seen once still needs a human; a FINANCIAL op is never free).

Usage

from auth51_governance import (
    Capability, obs_from_spans, synthesize, validate_workflow, ConsequenceTier,
)

# what the roster CAN do (classified from spec risk/tags, else the name)
caps = [
    Capability.classify("refunder", "RetrieveCustomer"),
    Capability.classify("refunder", "CreatePayout", risk="financial"),
    Capability.classify("admin", "DropDatabase"),
]

# what runs DID (from each run's spans)
runs = [obs_from_spans(spans) for spans in sampled_runs]

wf = synthesize("refund-flow", runs, caps)          # a guarded WorkflowDefinition dict

# at the authority, before registering:
violations = validate_workflow(wf, tier_of=lambda a, act: my_registry_tier(a, act))
assert not violations

Compiles down to the authority's step primitives

synthesize emits the same WorkflowStep shape the authority already enforces: dependencies (ordering), scopes (subset), and an approval-gate step. Each step also carries a tier annotation the authority stores and the value-binding phase will use.

Metadata

Release files for auth51-governance 0.1.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 auth51-governance 0.1.2
File Size Uploaded Provenance Actions
auth51_governance-0.1.2.tar.gz 48.7 kB With provenance Details for auth51_governance-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for auth51-governance 0.1.2
File Interpreter ABI Platform Actions
auth51_governance-0.1.2-py3-none-any.whl Python 3 none any Details for auth51_governance-0.1.2-py3-none-any.whl

Total release size: 80.7 kB

Release files / auth51_governance-0.1.2.tar.gz

Download URL auth51_governance-0.1.2.tar.gz
Size 48.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0119ddbefd168210e84ec079117355cb3b250372d629a23fb7287f0e04a9d2c1
BLAKE2b-256 checksum
How to use checksums
cdd48fae64780b51a32acc3ec6f2bef887bd207dbc5fed9dc7cc44fdf093222d
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 Sep 27, 2026.

Transparency log

Release files / auth51_governance-0.1.2-py3-none-any.whl

Download URL auth51_governance-0.1.2-py3-none-any.whl
Size 32.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
138f6847790e284555c3216beb50ab9d6f4a86e1f6b8bf5df4cfeeb9be806145
BLAKE2b-256 checksum
How to use checksums
085d8bf0bc8bf5223c985724d74703d3186bfa7bae2152c86e99981f45eeafa0
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 Sep 27, 2026.

Transparency log

Security for auth51-governance 0.1.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 auth51_governance-0.1.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 Sep 27, 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.

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