Skip to main content

sm-renewal

Extend-only, threshold-attested authority renewal for partitioned agent meshes

Every workload identity system in deployment today assumes the credential issuer is reachable — short-lived tokens, fast rotation, timely revocation are all guarantees about the connected case. sm-renewal is what a severed-but-healthy agent does instead of halting or self-renewing: it collects signed attestations from a two-thirds threshold of peers the issuer named, who have watched it operate, and extends its existing, unwidened authority for a bounded, auditable time. This package owns exactly one thing — the MeshManifest → RenewalRequest → PeerAttestation → RenewalProof → RenewalChain wire format and its verification procedure.

The issuer takes part exactly once, before any partition: it signs a Mesh Manifest naming the members, the ceiling, the clock tolerance and the widest scope the mesh may ever extend. From then on the quorum of peers is a limited-authority local issuer the issuer itself appointed — a relying party outside the mesh verifies a chain from the manifest alone.

What this package secures (v0.3)

  • Issuer-bounded. Peer set, ceiling and scope ceiling come from an issuer-signed manifest every object is bound to by hash; a peer cannot widen any of them locally, and nothing made under one manifest verifies under another (G6).
  • No unilateral self-grant. A requester's own signature never counts toward quorum (THREATMODEL.md G1).
  • Threshold ⌈2N/3⌉ of N ≥ 4. A manifest names at least five members, so every member has at least four peers. A minority — malicious or merely offline — can force fail-closed, never an unauthorized grant; two conflicting proofs for one position need N/3 equivocators (G2/G3). A threshold, not consensus.
  • Bound to the whole decision. Every attestation signs the digest of the entire request — scope, requester, timestamps, predecessor — and each round commits to the previous proof's digest, so a chain is hash-linked and a requester cannot swap the request after collecting signatures.
  • Extend-only, structurally. No field in the wire format can widen scope; scope is fixed, byte-identical, for the life of a chain (G5).
  • Bounded exposure. A ceiling measured from original issuance, never reset by a later round, terminates peer-attested authority even if the partition never heals (G4).
  • Adversarially tested. Threshold-not-met, self-attestation, attester-outside-peer-set, request swapped after attestation, broken predecessor link, credential-claims mismatch, manifest splicing, tampered manifest signature, scope widening, scope outside the manifest ceiling, ceiling breach, nonce replay, chain-linkage defects, a full quorum padded with a non-member, a manifest too small for any requester, malformed or mistyped fields, integers outside the I-JSON range, strings with no canonical form, expiries past year 9999, signatures spelled in non-canonical base64, request times running backwards, attestation clocks outside tolerance and incomplete credential claims are all exercised as hostile-path tests and conformance vectors (35 of them), not just asserted. Hostile input is rejected with the failing stage, never raised as an exception. The wire objects are also stated in CDDL (conformance/renewal.cddl), checked against every vector.

What this package does NOT do

  • Verify the original credential. The credential being extended (a WIMSE token, a SPIFFE SVID, or anything else) is treated as an opaque hash. Authenticating it in its own format is the consumer's job — and a mandatory one: verify_chain, evaluate_request and evaluate_and_attest require its claims as credential= (every key in CREDENTIAL_CLAIMS), refuse without them, and check the root request against all of them. See SPEC.md §1.2, §9.2.
  • Claim there is no new trust. No independent root authority is introduced, but the manifest's provisioning, clock agreement and attesters' health reports are assumptions the connected case did not need. THREATMODEL.md lists them.
  • Enforce revocation during a partition. A revocation issued while the requester is severed cannot take effect until the partition heals — a structural residual, not a defect. See THREATMODEL.md.
  • Scope narrowing across rounds. Not planned; scope is fixed for the life of a chain. See SPEC.md §1.2.
  • Provide transport, or decide who the issuer should list. The manifest is verified, not authored, here.

Features

  • sm_renewal.identity — did:key Ed25519 identities, shared construction with sm-arp.
  • sm_renewal.manifest — build/sign/verify for the issuer's MeshManifest, its hash, and the peer set it yields for a requester.
  • sm_renewal.renewal — build/sign/verify for RenewalRequest, PeerAttestation, RenewalProof, and RenewalChain.
  • Canonical serialization via RFC 8785 (JCS) — two independent implementations agree byte-for-byte.
  • A deterministic conformance corpus (conformance/vectors/) any second implementation can replay to prove interoperability.

Installation

pip install sm-renewal

Releases are published to PyPI and tagged automatically when the version in pyproject.toml changes on main (see PUBLISHING.md).

Quick start

from sm_renewal import (
    Identity,
    build_mesh_manifest,
    build_renewal_request,
    evaluate_and_attest,
    assemble_proof,
    verify_chain,
)

issuer = Identity.generate()
requester = Identity.generate()
peers = [Identity.generate() for _ in range(4)]  # N=4, quorum = ceil(2*4/3) = 3

# Before any partition: the issuer pre-authorizes this mesh.
manifest = build_mesh_manifest(
    issuer,
    members=[p.did for p in peers] + [requester.did],
    ceiling_seconds=12 * 3600,
    scope_ceiling=["read:telemetry"],
    issued_at="2026-07-01T00:00:00Z",
    expires_at="2036-07-01T00:00:00Z",
)

# During the partition: the requester asks its peers for more time.
req = build_renewal_request(
    requester,
    manifest=manifest,
    original_credential_hash="sha256:" + "00" * 32,
    original_scope=["read:telemetry"],
    original_issued_at="2026-07-26T00:00:00Z",
    original_expiry="2026-07-26T04:00:00Z",
    requested_extension_seconds=3600,
)
# Every attester and relying party authenticates the original credential in
# its own format (a WIMSE token, an SVID) and passes its claims. Required.
credential = {
    "original_credential_hash": "sha256:" + "00" * 32,
    "requester_did": requester.did,
    "original_issuer_did": issuer.did,
    "original_scope": ["read:telemetry"],
    "original_issued_at": "2026-07-26T00:00:00Z",
    "original_expiry": "2026-07-26T04:00:00Z",
}
attestations = [
    evaluate_and_attest(
        peer, req, health_evidence="heartbeat_current", manifest=manifest, credential=credential
    )
    for peer in peers
]
proof = assemble_proof(req, attestations, manifest=manifest)

# Anywhere: a relying party verifies the chain under the manifest, against
# the claims of the credential it authenticated itself.
assert verify_chain([proof], manifest=manifest, credential=credential).ok

examples/quick_start.py is the executed version of this snippet (CI runs it).

Reference fixtures

conformance/vectors/*.json — three valid chains, plus one vector per hostile path (threshold not met, self-attestation, request swapped after attestation, ceiling breach, nonce reuse, broken predecessor link, credential-claims mismatch, manifest-hash mismatch, attester outside the peer set, requester not a member, scope outside the manifest ceiling, tampered manifest signature, round out of order, request times running backwards, an integer outside the I-JSON range, an unpaired surrogate, an expiry past year 9999, a signature re-spelled in non-canonical base64). Every vector carries the manifest it is evaluated under and, where relevant, the authenticated credential claims. Signing keys in the vectors are fixed, non-secret, documented seeds — never real keys. Regenerate with python conformance/_vector_gen.py; CI fails if the checkout and the generator disagree.

conformance/renewal.cddl states the structure of every wire object in CDDL (RFC 8610). tests/test_cddl.py checks it against every vector: each well-formed object matches it, and each object malformed in a way CDDL can state does not.

Specification

Package Role
sm-arp Agency Receipt Protocol — the identity/did:key construction this package reuses, and the receipt family a settled RenewalChain fits alongside.
sm-divergence / sm-resolver Corroborated discovery — a settled RenewalChain is a claim a corroboration record can carry alongside a registry's view, so "the registry says expired, the mesh extended" is visible divergence rather than silence.
sm-conformance Generic signed-badge conformance substrate, if a badge is ever wanted for this primitive.

License

MIT


First published: 2026-07-26 | Last modified: 2026-10-30

Personal research contributions aligned with Project NANDA standards. Stellarminds.ai

Metadata

Release files for sm-renewal 0.4.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 sm-renewal 0.4.0
File Size Uploaded Provenance Actions
sm_renewal-0.4.0.tar.gz 173.6 kB With provenance Details for sm_renewal-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sm-renewal 0.4.0
File Interpreter ABI Platform Actions
sm_renewal-0.4.0-py3-none-any.whl Python 3 none any Details for sm_renewal-0.4.0-py3-none-any.whl

Total release size: 195.3 kB

Release files / sm_renewal-0.4.0.tar.gz

Download URL sm_renewal-0.4.0.tar.gz
Size 173.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9cfa4f714493ba6c627dbd187815ae5a73d45e4fd26a879cba780cf605a75707
BLAKE2b-256 checksum
How to use checksums
09e6942729ab22a9964bc95b973c5918e81e0ddef7a007cf9dc5d0d9df09bbb4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 17, 2026.

Transparency log

Release files / sm_renewal-0.4.0-py3-none-any.whl

Download URL sm_renewal-0.4.0-py3-none-any.whl
Size 21.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ab7187fb13cc614386e8b7548f030eebda911f4df3aed321262b9d0cdc4a6f8
BLAKE2b-256 checksum
How to use checksums
a03735bd681f29009b6f0933eae7ea222b983ea3bd73328ffc9a2438284d42e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 17, 2026.

Transparency log

Security for sm-renewal 0.4.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 sm_renewal-0.4.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 Nov 17, 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