Skip to main content

jep-authority-runtime

Reference runtime for JEP authority scope, delegation boundaries, attenuation, revocation, and replay verification.

This project is intentionally not real IAM and does not replace OAuth, X.509, DID, or any production authorization protocol. It is a small JEP-compatible reference runtime for making delegation semantics replayable and verifiable.

AuthorityScope

AuthorityScope models the authority passed along a delegation chain:

  • actor: principal that issued the scope.
  • subject: principal receiving the scope.
  • allowed_actions: actions the subject may perform.
  • denied_actions: actions explicitly forbidden and inherited by descendants.
  • resource_scope: resource prefix the scope applies to (* means every resource).
  • expires_at: optional UTC expiration timestamp.
  • parent_scope: optional parent scope id for delegated or attenuated authority.
  • attenuation_rules: reference metadata describing how authority was narrowed.

The runtime also stores scope_id and revoked_at so archives can refer to scopes deterministically and model revocation.

DelegationRuntime

DelegationRuntime provides:

  • create_scope() for root authority grants.
  • delegate_scope() for child scopes that must be narrower than their parent.
  • attenuate_scope() as a convenience wrapper for narrower delegation.
  • revoke_scope() to invalidate a scope and its descendants for later checks.
  • verify_scope() to check action, resource, expiration, revocation, and chain validity.
  • verify_delegation_path() to check parent continuity and attenuation constraints.

A child scope is valid only when it does not add actions, omit inherited denials, widen resources, outlive its parent, or rely on a missing/revoked/expired parent.

Replay archive format

Archives are JSON Lines (archive.jsonl). Each line is an event with an event field:

{"event":"create_scope","scope_id":"human-search","actor":"human:alice","subject":"agent:searcher","allowed_actions":["search"],"denied_actions":["payment"],"resource_scope":"web/search","expires_at":"2030-01-01T00:00:00Z"}
{"event":"delegate_scope","scope_id":"agent-news","parent_scope":"human-search","actor":"agent:searcher","subject":"agent:sub-searcher","allowed_actions":["search"],"resource_scope":"web/search/news"}
{"event":"action","scope_id":"agent-news","action":"search","resource":"web/search/news/politics","at":"2028-01-01T00:00:00Z"}
{"event":"revoke_scope","scope_id":"human-search","revoked_at":"2028-06-01T00:00:00Z"}

Replay checks whether propagation or actions are invalid because authority is exceeded, a scope is expired, a scope or ancestor is revoked, a child exceeds the parent scope, or the delegation chain is broken.

CLI

Install in editable mode:

python -m pip install -e .

Replay an archive:

jep-authority replay examples/archive.jsonl

Verify an archive and emit JSON:

jep-authority verify examples/archive.jsonl --json

Both commands exit with status 0 when the report has no violations and 1 when violations are found.

Example scenario

examples/archive.jsonl demonstrates:

  1. A human delegates limited search permission to an agent.
  2. The agent delegates narrower web/search/news permission to a sub-agent.
  3. The sub-agent performs an allowed search.
  4. The sub-agent attempts a forbidden payment action.
  5. Revocation of the parent invalidates a later delegated action.

Metadata

Release files for jep-authority-runtime 0.1.1

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

Source distribution (sdist)

Source distribution for jep-authority-runtime 0.1.1
File Size Uploaded Provenance
jep_authority_runtime-0.1.1.tar.gz 8.7 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for jep-authority-runtime 0.1.1
File Interpreter ABI Platform
jep_authority_runtime-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 16.7 kB

Release files / jep_authority_runtime-0.1.1.tar.gz

Download URL jep_authority_runtime-0.1.1.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
82b70700a32f16fa7032c0219a08f8040273f669844c2d2e12a9951d8d7e8662
BLAKE2b-256 checksum
How to use checksums
d7f386704f4b056440cc0f3a650f140aa8f4b8936ba0c1e5b589b29954c9e0f0
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 13, 2026.

Transparency log

Release files / jep_authority_runtime-0.1.1-py3-none-any.whl

Download URL jep_authority_runtime-0.1.1-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
db922d1892b56da0990557f847a23de8b4b1bd014dee930f0441bc4ebc9465b4
BLAKE2b-256 checksum
How to use checksums
0d0a751926028148d57db86276f351cf328c57cae33b594dde9164280a4e5700
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 13, 2026.

Transparency log

Security for jep-authority-runtime 0.1.1

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for jep_authority_runtime-0.1.1.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 13, 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.1.1 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