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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jep_authority_runtime-0.1.1.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jep_authority_runtime-0.1.1-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file jep_authority_runtime-0.1.1.tar.gz.

File metadata

  • Download URL: jep_authority_runtime-0.1.1.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for jep_authority_runtime-0.1.1.tar.gz
Algorithm Hash digest
SHA256 82b70700a32f16fa7032c0219a08f8040273f669844c2d2e12a9951d8d7e8662
MD5 6684682bc6f98cb0c04a82b4b4d24214
BLAKE2b-256 d7f386704f4b056440cc0f3a650f140aa8f4b8936ba0c1e5b589b29954c9e0f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for jep_authority_runtime-0.1.1.tar.gz:

Publisher: release.yml on hjs-spec/jep-authority-runtime

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jep_authority_runtime-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for jep_authority_runtime-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 db922d1892b56da0990557f847a23de8b4b1bd014dee930f0441bc4ebc9465b4
MD5 c75f368733e4cc22f4c1f2c96c5dafa4
BLAKE2b-256 0d0a751926028148d57db86276f351cf328c57cae33b594dde9164280a4e5700

See more details on using hashes here.

Provenance

The following attestation bundles were made for jep_authority_runtime-0.1.1-py3-none-any.whl:

Publisher: release.yml on hjs-spec/jep-authority-runtime

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

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