sm-renewal 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. sm_renewal-0.2.0/.github/CODEOWNERS +1 -0
  2. sm_renewal-0.2.0/.github/workflows/ci.yml +25 -0
  3. sm_renewal-0.2.0/.github/workflows/release.yml +162 -0
  4. sm_renewal-0.2.0/.gitignore +30 -0
  5. sm_renewal-0.2.0/.release-tags +4 -0
  6. sm_renewal-0.2.0/CHANGELOG.md +128 -0
  7. sm_renewal-0.2.0/GOVERNANCE.md +63 -0
  8. sm_renewal-0.2.0/LICENSE +21 -0
  9. sm_renewal-0.2.0/PAPER.md +160 -0
  10. sm_renewal-0.2.0/PKG-INFO +166 -0
  11. sm_renewal-0.2.0/PUBLISHING.md +46 -0
  12. sm_renewal-0.2.0/README.md +137 -0
  13. sm_renewal-0.2.0/SPEC.md +303 -0
  14. sm_renewal-0.2.0/THREATMODEL.md +176 -0
  15. sm_renewal-0.2.0/WHITEPAPER.md +74 -0
  16. sm_renewal-0.2.0/conformance/_vector_gen.py +709 -0
  17. sm_renewal-0.2.0/conformance/vectors/01-valid-single-round-full-quorum.json +137 -0
  18. sm_renewal-0.2.0/conformance/vectors/02-valid-exact-quorum-not-full.json +113 -0
  19. sm_renewal-0.2.0/conformance/vectors/03-valid-two-round-chain.json +223 -0
  20. sm_renewal-0.2.0/conformance/vectors/04-reject-threshold-not-met.json +90 -0
  21. sm_renewal-0.2.0/conformance/vectors/05-reject-self-attestation-spliced.json +114 -0
  22. sm_renewal-0.2.0/conformance/vectors/06-reject-scope-widened.json +139 -0
  23. sm_renewal-0.2.0/conformance/vectors/07-reject-ceiling-breach.json +138 -0
  24. sm_renewal-0.2.0/conformance/vectors/08-reject-nonce-replay-across-rounds.json +224 -0
  25. sm_renewal-0.2.0/conformance/vectors/09-reject-credential-hash-divergence.json +138 -0
  26. sm_renewal-0.2.0/conformance/vectors/10-reject-tampered-attestation-field.json +138 -0
  27. sm_renewal-0.2.0/conformance/vectors/11-reject-self-attestation-counted-toward-quorum.json +114 -0
  28. sm_renewal-0.2.0/conformance/vectors/12-reject-attestation-spliced-from-unrelated-request.json +114 -0
  29. sm_renewal-0.2.0/conformance/vectors/13-reject-proof-requester-did-divergence.json +138 -0
  30. sm_renewal-0.2.0/conformance/vectors/14-reject-manifest-hash-mismatch.json +138 -0
  31. sm_renewal-0.2.0/conformance/vectors/15-reject-attester-outside-peer-set.json +114 -0
  32. sm_renewal-0.2.0/conformance/vectors/16-reject-scope-outside-manifest-ceiling.json +138 -0
  33. sm_renewal-0.2.0/conformance/vectors/17-reject-manifest-signature-invalid.json +138 -0
  34. sm_renewal-0.2.0/draft/README.md +23 -0
  35. sm_renewal-0.2.0/draft/build.py +283 -0
  36. sm_renewal-0.2.0/draft/draft-chandra-wimse-partition-tolerant-renewal-00.mkd +327 -0
  37. sm_renewal-0.2.0/draft/draft-chandra-wimse-partition-tolerant-renewal-00.txt +1008 -0
  38. sm_renewal-0.2.0/draft/draft-chandra-wimse-partition-tolerant-renewal-00.xml +141 -0
  39. sm_renewal-0.2.0/examples/quick_start.py +94 -0
  40. sm_renewal-0.2.0/pyproject.toml +74 -0
  41. sm_renewal-0.2.0/sm_renewal/__init__.py +79 -0
  42. sm_renewal-0.2.0/sm_renewal/identity.py +64 -0
  43. sm_renewal-0.2.0/sm_renewal/manifest.py +173 -0
  44. sm_renewal-0.2.0/sm_renewal/py.typed +0 -0
  45. sm_renewal-0.2.0/sm_renewal/renewal.py +647 -0
  46. sm_renewal-0.2.0/tests/test_conformance_vectors.py +43 -0
  47. sm_renewal-0.2.0/tests/test_renewal.py +1145 -0
  48. sm_renewal-0.2.0/tests/test_smoke.py +14 -0
@@ -0,0 +1 @@
1
+ * @Sharathvc23
@@ -0,0 +1,25 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ jobs:
9
+ test:
10
+ runs-on: ubuntu-latest
11
+ strategy:
12
+ matrix:
13
+ python-version: ["3.11", "3.12"]
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - uses: actions/setup-python@v5
17
+ with:
18
+ python-version: ${{ matrix.python-version }}
19
+ - run: pip install -e ".[dev]"
20
+ - run: ruff check .
21
+ - run: ruff format --check .
22
+ - run: mypy sm_renewal conformance examples tests
23
+ - run: coverage run -m pytest && coverage report
24
+ - run: python conformance/_vector_gen.py && git diff --exit-code conformance/vectors
25
+ - run: python examples/quick_start.py
@@ -0,0 +1,162 @@
1
+ # Publish sm-renewal to PyPI via PyPI Trusted Publishing (OIDC), and tag the release.
2
+ #
3
+ # No API token anywhere: PyPI is told (once, in its web UI) to trust THIS repo +
4
+ # THIS workflow file, and the `id-token: write` permission below lets the job
5
+ # mint a short-lived OIDC token PyPI accepts. See PUBLISHING.md for the one-time
6
+ # setup and the exact values to type into PyPI's "Add a publisher" form.
7
+ #
8
+ # Two ways in, same job:
9
+ # - a push to `main` whose pyproject `version` is not yet on PyPI → publish it,
10
+ # then create and push the `vX.Y.Z` tag and a GitHub release. The version
11
+ # bump in pyproject.toml IS the release decision; nobody pushes tags by hand.
12
+ # - a pushed `vX.Y.Z` tag (the old path) → publish if not already on PyPI.
13
+ # Either way a version already on PyPI is a no-op, never a red run.
14
+ name: release
15
+
16
+ on:
17
+ push:
18
+ branches: [main, master]
19
+ tags:
20
+ - "v*"
21
+ workflow_dispatch:
22
+
23
+ permissions:
24
+ contents: read
25
+
26
+ concurrency:
27
+ group: release
28
+ cancel-in-progress: false
29
+
30
+ jobs:
31
+ publish:
32
+ name: Build + publish to PyPI + tag
33
+ runs-on: ubuntu-latest
34
+ permissions:
35
+ # A job-level permissions block REPLACES the workflow-level one (it does not
36
+ # merge), so contents must be restated here. `write` is needed to push the
37
+ # tag and create the GitHub release.
38
+ contents: write
39
+ id-token: write # REQUIRED for Trusted Publishing — this is what replaces the token.
40
+ steps:
41
+ - uses: actions/checkout@v4
42
+ with:
43
+ fetch-depth: 0
44
+
45
+ - uses: actions/setup-python@v5
46
+ with:
47
+ python-version: "3.12"
48
+
49
+ - name: Read version and decide
50
+ id: decide
51
+ run: |
52
+ set -euo pipefail
53
+ VERSION=$(python - <<'EOF'
54
+ import tomllib; print(tomllib.load(open("pyproject.toml","rb"))["project"]["version"])
55
+ EOF
56
+ )
57
+ echo "version=$VERSION" >> "$GITHUB_OUTPUT"
58
+ if python - "$VERSION" <<'EOF'
59
+ import json, sys, urllib.request
60
+ v = sys.argv[1]
61
+ try:
62
+ with urllib.request.urlopen("https://pypi.org/pypi/sm-renewal/json", timeout=30) as r:
63
+ on_pypi = v in json.load(r)["releases"]
64
+ except Exception as e: # first release, or PyPI hiccup: try to publish
65
+ print("pypi lookup failed:", e); on_pypi = False
66
+ sys.exit(0 if on_pypi else 1)
67
+ EOF
68
+ then
69
+ echo "sm-renewal $VERSION is already on PyPI; nothing to publish."
70
+ echo "publish=false" >> "$GITHUB_OUTPUT"
71
+ else
72
+ echo "sm-renewal $VERSION is not on PyPI; publishing."
73
+ echo "publish=true" >> "$GITHUB_OUTPUT"
74
+ fi
75
+
76
+ - name: Build sdist + wheel
77
+ if: steps.decide.outputs.publish == 'true'
78
+ run: |
79
+ python -m pip install --upgrade build
80
+ python -m build
81
+
82
+ - name: Check the built distributions
83
+ if: steps.decide.outputs.publish == 'true'
84
+ run: |
85
+ python -m pip install --upgrade twine
86
+ python -m twine check dist/*
87
+
88
+ - name: Publish to PyPI
89
+ id: pypi
90
+ if: steps.decide.outputs.publish == 'true'
91
+ # No `with: password:` — the action uses the OIDC token automatically.
92
+ # continue-on-error: until the pending publisher is registered on PyPI
93
+ # (PUBLISHING.md, one-time), this step fails with "invalid-publisher".
94
+ # The tag and GitHub release below still happen, the run stays green
95
+ # with a warning, and the next push to main retries the upload because
96
+ # the version is still missing from PyPI. Nothing to redo by hand.
97
+ uses: pypa/gh-action-pypi-publish@release/v1
98
+ continue-on-error: true
99
+ with:
100
+ skip-existing: true
101
+
102
+ - name: Report PyPI outcome
103
+ if: steps.decide.outputs.publish == 'true'
104
+ run: |
105
+ if [ "${{ steps.pypi.outcome }}" = "success" ]; then
106
+ echo "::notice::sm-renewal ${{ steps.decide.outputs.version }} published to PyPI."
107
+ else
108
+ echo "::warning::PyPI upload failed — most likely the Trusted Publisher is not registered yet. Follow PUBLISHING.md once; the next push to main will publish automatically."
109
+ fi
110
+
111
+ - name: Tag and release on GitHub
112
+ # Tags created here use GITHUB_TOKEN, which by design does not re-trigger
113
+ # workflows, so this cannot loop. Idempotent: an existing tag is left alone.
114
+ env:
115
+ GH_TOKEN: ${{ github.token }}
116
+ VERSION: ${{ steps.decide.outputs.version }}
117
+ run: |
118
+ set -euo pipefail
119
+ TAG="v$VERSION"
120
+ if git ls-remote --exit-code --tags origin "refs/tags/$TAG" >/dev/null 2>&1; then
121
+ echo "$TAG already exists."
122
+ else
123
+ git config user.name "github-actions[bot]"
124
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
125
+ git tag -a "$TAG" -m "sm-renewal $VERSION"
126
+ git push origin "$TAG"
127
+ echo "pushed $TAG"
128
+ fi
129
+ if ! gh release view "$TAG" >/dev/null 2>&1; then
130
+ gh release create "$TAG" --title "sm-renewal $VERSION" --notes "See CHANGELOG.md for $VERSION." ${{ steps.decide.outputs.publish == 'true' && 'dist/*' || '' }}
131
+ fi
132
+ if [ "${{ steps.decide.outputs.publish }}" = "true" ] && [ "${{ steps.pypi.outcome }}" != "success" ]; then
133
+ echo "PyPI upload pending Trusted Publisher setup (see PUBLISHING.md)." >> "$GITHUB_STEP_SUMMARY"
134
+ true
135
+ fi
136
+
137
+ - name: Create any tags listed in .release-tags
138
+ # One `name commit message...` per line; `HEAD` means the commit being
139
+ # built. A tag that already exists is left alone. Used for draft-NN
140
+ # markers that pair a draft revision with the code that implements it.
141
+ # Note: GITHUB_TOKEN may not push a ref whose target changes workflow
142
+ # files relative to the branch, so tag HEAD (or a commit with identical
143
+ # .github/workflows) rather than an arbitrary older commit.
144
+ env:
145
+ GH_TOKEN: ${{ github.token }}
146
+ VERSION: ${{ steps.decide.outputs.version }}
147
+ run: |
148
+ set -euo pipefail
149
+ [ -f .release-tags ] || exit 0
150
+ git config user.name "github-actions[bot]"
151
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
152
+ grep -vE '^[[:space:]]*(#|$)' .release-tags > /tmp/release-tags || true
153
+ while read -r NAME COMMIT MSG; do
154
+ if git ls-remote --exit-code --tags origin "refs/tags/$NAME" >/dev/null 2>&1 </dev/null; then
155
+ echo "$NAME exists"; continue
156
+ fi
157
+ [ "$COMMIT" = "HEAD" ] && COMMIT="$GITHUB_SHA"
158
+ git cat-file -e "$COMMIT^{commit}" </dev/null
159
+ git tag -a "$NAME" "$COMMIT" -m "${MSG:-$NAME}" </dev/null
160
+ git push origin "refs/tags/$NAME" </dev/null
161
+ echo "pushed $NAME -> $COMMIT"
162
+ done < /tmp/release-tags
@@ -0,0 +1,30 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ build/
6
+ dist/
7
+ .venv/
8
+ venv/
9
+
10
+ # Tooling caches
11
+ .pytest_cache/
12
+ .mypy_cache/
13
+ .ruff_cache/
14
+ .coverage
15
+ htmlcov/
16
+ coverage/
17
+
18
+ # Dev/research/audit artifacts — never commit, never push.
19
+ # Convention: any local-only note/scratch/audit doc gets "tmp" in its
20
+ # filename (e.g. research-tmp.md, patent-audit-tmp.md) so it's caught here
21
+ # regardless of where it lives in the tree.
22
+ *tmp*.md
23
+ *TMP*.md
24
+ .claude/
25
+ .aider*
26
+ docs/superpowers/
27
+ .superpowers/
28
+ scratch/
29
+ scratchpad/
30
+ .DS_Store
@@ -0,0 +1,4 @@
1
+ # tag commit-or-HEAD message
2
+ # Tags the release workflow creates on the next push to main if missing.
3
+ # draft-NN pairs an Internet-Draft revision with the code that implements it.
4
+ draft-00 HEAD draft-chandra-wimse-partition-tolerant-renewal-00 (text of 2026-10-30) = sm-renewal 0.2.0
@@ -0,0 +1,128 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here. The format follows
4
+ [Keep a Changelog](https://keepachangelog.com/) and this project adheres to
5
+ [Semantic Versioning](https://semver.org/).
6
+
7
+ ## [0.2.0] — 2026-10-30
8
+
9
+ Wire version `renewal/0.2`. Not backward compatible with `renewal/0.1`
10
+ objects: every object now carries `manifest_hash`, and a v0.2 verifier
11
+ rejects `renewal/0.1` at the `structure` stage.
12
+
13
+ ### Added
14
+ - **Mesh Manifest** (`sm_renewal.manifest`; `SPEC.md` §5). The issuer
15
+ pre-authorizes a mesh exactly once, before any partition, by signing a
16
+ manifest naming the members, the ceiling, the clock tolerance, the widest
17
+ scope any renewal may carry, and a validity window. `peer_set_size`,
18
+ `ceiling_seconds` and clock tolerance are no longer local configuration:
19
+ they are read from the manifest, and every `RenewalRequest`,
20
+ `PeerAttestation` and `RenewalProof` is bound to it by `manifest_hash`.
21
+ The quorum of peers is thereby a limited-authority local issuer the
22
+ issuer itself appointed, and a relying party outside the mesh can verify
23
+ a chain from the manifest alone. New API: `build_mesh_manifest`,
24
+ `verify_manifest`, `manifest_hash`, `peer_set_for`, `MANIFEST_VERSION`,
25
+ `MANIFEST_REQUIRED`, `MIN_PEER_SET_SIZE`.
26
+ - New verification stages: `manifest` (manifest invalid, hash mismatch,
27
+ request outside the manifest window, issuer mismatch), `membership`
28
+ (attester not in the manifest peer set), `clock` (request `created_at`
29
+ outside `max_clock_skew_seconds` of the attester's clock; attestation
30
+ `as_of` values within a round spread wider than the tolerance), and
31
+ `scope` now also covers a request scope outside the manifest's
32
+ `scope_ceiling`.
33
+ - Conformance vectors 14–17: manifest-hash mismatch, attester outside the
34
+ peer set, scope outside the manifest ceiling, tampered manifest
35
+ signature. Every vector now carries its `manifest`.
36
+ - Release automation: a version bump in `pyproject.toml` on `main`
37
+ publishes to PyPI via Trusted Publishing and creates the `vX.Y.Z` tag and
38
+ GitHub release (`.github/workflows/release.yml`, `PUBLISHING.md`). The
39
+ first release through it is this one.
40
+
41
+ ### Changed
42
+ - `build_renewal_request`, `evaluate_request`, `evaluate_and_attest`,
43
+ `assemble_proof` and `verify_chain` take `manifest=` instead of
44
+ `peer_set_size=` / `ceiling_seconds=`. `original_issuer_did` defaults to
45
+ the manifest issuer and must equal it.
46
+ - `SPEC.md` renumbered (§5 is the manifest; former §5–§12 are now §6–§13),
47
+ `THREATMODEL.md`, `WHITEPAPER.md`, `GOVERNANCE.md` and `README.md`
48
+ updated accordingly. Scope narrowing is no longer promised for a future
49
+ version.
50
+ - `SPEC.md` §2 relates the manifest to the WIMSE charter's local-issuance
51
+ item and cites `draft-raskar-agentic-web-federated-resolution` for the
52
+ registry-lease application.
53
+
54
+ ### Security
55
+ Found during a deliberate adversarial re-audit of `THREATMODEL.md`'s claims
56
+ against the actual behavior of `verify_chain` — the function a relying
57
+ party calls to verify a chain it did not itself assemble (SPEC.md §8.2).
58
+ `assemble_proof` (the honest requester's own builder) already enforced all
59
+ of the following; `verify_chain` did not independently re-check them, so a
60
+ hand-crafted proof presented directly to a relying party could bypass them
61
+ entirely. All three were reproduced empirically before being fixed, and
62
+ each now has a dedicated regression test and conformance vector:
63
+
64
+ - **G1 violation: self-attestation counted toward quorum.** A `RenewalProof`
65
+ built by hand (not via `assemble_proof`) could include the requester's own
66
+ validly self-signed "PeerAttestation," and `verify_chain` would count it
67
+ toward quorum — letting a requester with 1/3 fewer honest peers than the
68
+ protocol requires still assemble an accepted proof. Fixed: `verify_chain`
69
+ now independently rejects any attestation whose `attester_did` equals the
70
+ proof's `requester_did`.
71
+ - **G2 weakening: attestation splicing across unrelated requests.**
72
+ `verify_chain` never checked that a counted attestation's `request_id`,
73
+ `original_credential_hash`, and `granted_extension_seconds` actually
74
+ matched the proof it was submitted in. A genuinely peer-signed attestation
75
+ for a *completely different* requester's renewal could be spliced into an
76
+ unrelated proof to pad it to quorum, without forging or coercing anything.
77
+ Fixed: every attestation is now bound to its own proof on all three fields.
78
+ - **Structural forgery: closed field set was never enforced.** `THREATMODEL.md`
79
+ explicitly claimed "a document with extra fields... fails verification,"
80
+ but no verifier actually checked for unrecognized fields — only for
81
+ *missing* required ones. A requester could smuggle arbitrary extra fields
82
+ into a request it signs itself (a fully self-consistent, validly-signed
83
+ document) and it would pass the complete `evaluate_request` pipeline.
84
+ Fixed: `RenewalRequest`, `PeerAttestation`, and `RenewalProof` now all
85
+ reject unrecognized members.
86
+
87
+ Also fixed as part of the same hardening pass (not independently
88
+ exploitable, but inconsistent with what was documented): `verify_chain`
89
+ didn't enforce the `N >= 4` peer-set floor that `evaluate_request` and
90
+ `assemble_proof` both already enforce; didn't check that a proof's
91
+ `requester_did` matches the root request being verified against; and
92
+ didn't recompute `effective_expiry` from `granted_extension_seconds` to
93
+ catch an internally-inconsistent proof before falling through to a coarser
94
+ check. `SPEC.md` §7.3/§8.2/§9.1 and the Internet-Draft are
95
+ updated to state all of the above as explicit MUST-level requirements —
96
+ the checklists never enumerated them, which is very likely why the
97
+ `verify_chain` implementation didn't either.
98
+
99
+ ### Fixed
100
+ - README.md's quick-start snippet was missing the required `peer_set_size`
101
+ argument to `evaluate_and_attest` — would have raised `TypeError` for
102
+ anyone who actually ran it. Caught during a cross-artifact consistency
103
+ audit, fixed, and re-verified by executing the snippet directly.
104
+ - `THREATMODEL.md` named guarantees G1-G5 explicitly but never called out
105
+ G6 ("no new trust root") by name, despite it being one of the paper's
106
+ six stated guarantees. Added.
107
+ - `WHITEPAPER.md`'s Problem section and portfolio-composition diagram were
108
+ WIMSE/SPIFFE-only; broadened to name physical-AI mission authorities
109
+ as an equally first-class credential substrate (matches the same fix
110
+ already applied to the agentclock.ai site).
111
+ - `PAPER.md`'s title was missing the "Borrowed Time:" prefix present in
112
+ the canonical paper.
113
+
114
+ ## [0.1.0] — 2026-07-26
115
+
116
+ ### Added
117
+ - Initial working-draft release of sm-renewal.
118
+ - `RenewalRequest` / `PeerAttestation` / `RenewalProof` / `RenewalChain` wire
119
+ format, build/sign/evaluate/verify — extend-only, threshold-attested
120
+ (`⌈2N/3⌉` of N ≥ 4), ceiling-bounded, no new trust root.
121
+ - `SPEC.md` (normative working draft), `WHITEPAPER.md`, `THREATMODEL.md`,
122
+ `GOVERNANCE.md`.
123
+ - 42 tests (31 behavioral + 10 conformance-vector replays + smoke), mypy
124
+ --strict clean, ruff clean, 87% coverage.
125
+ - `conformance/vectors/` — 10 deterministic vectors (3 positive, 7 hostile:
126
+ threshold-not-met, self-attestation, scope-widening, ceiling-breach,
127
+ nonce-replay-across-rounds, credential-hash-divergence, tampered-field).
128
+ - `examples/quick_start.py` — runnable end-to-end demonstration.
@@ -0,0 +1,63 @@
1
+ # Governance
2
+
3
+ ## Scope
4
+
5
+ | In scope | Out of scope |
6
+ | --- | --- |
7
+ | `MeshManifest` / `RenewalRequest` / `PeerAttestation` / `RenewalProof` / `RenewalChain` wire shapes, signing, and verification (`SPEC.md`) | Issuing, parsing, or verifying the original credential being extended (WIMSE token, SPIFFE SVID, or otherwise) |
8
+ | Quorum, extend-only, and ceiling arithmetic; manifest binding and membership derivation | Deciding whom the issuer lists in a manifest; membership change during a partition |
9
+ | The `health_evidence` closed vocabulary (below) | Transport of requests/attestations between peers |
10
+ | Renewal-chain verification for relying parties | Byzantine consensus / state replication |
11
+
12
+ The primitive owns one thing: deciding, given a signed set of peer claims,
13
+ whether a specific agent's specific authority may be treated as extended.
14
+ Anything outside the table belongs to a companion package (the credential
15
+ issuer, the mesh transport, the issuer's manifest-provisioning tooling) or the
16
+ consumer's own stack.
17
+
18
+ ## Versioning
19
+
20
+ Semantic Versioning 2.0.0. The protocol surface (wire shape, quorum
21
+ formula, ceiling semantics) is frozen within a major. A change to it
22
+ requires an RFC-style PR to `SPEC.md` before any code change, and a
23
+ corresponding update to the companion Internet-Draft
24
+ `draft-chandra-wimse-partition-tolerant-renewal` if the change affects
25
+ interoperability with other implementations.
26
+
27
+ ## Conformance
28
+
29
+ The vectors under `conformance/vectors/` and the suite under `tests/` are
30
+ the authoritative behavioral specification. A change in behavior without a
31
+ corresponding vector or test change is a bug.
32
+
33
+ ## Closed vocabulary: `health_evidence`
34
+
35
+ `SPEC.md` §6.2 defines a closed, versioned set of health-evidence values.
36
+ Adding a new value follows:
37
+
38
+ 1. **Proposal** — an issue or PR stating the real deployment case that
39
+ needed it, why it is generic rather than one mesh's internal jargon,
40
+ and why `other` is insufficient for that case.
41
+ 2. **Approval** — maintainer-approved for this pre-standardization,
42
+ single-implementer stage. The graduation path for if/when this
43
+ pursues formal standardization is IANA-style Expert Review, mirroring
44
+ how other closed-vocabulary IETF registries are run — not built now,
45
+ noted so the future step is not a surprise.
46
+ 3. **Trigger** — qualitative (real usage clustering around an unmet
47
+ case), never an invented numeric threshold with no data behind it.
48
+ 4. **Versioning** — a vocabulary addition is a minor version bump of
49
+ `sm-renewal`, never added silently under an unchanged version string.
50
+ 5. **Scope** — additive-only until there is real usage data to design
51
+ deprecation well.
52
+
53
+ ## Contributions
54
+
55
+ - PRs must include tests and pass `ruff` + `mypy --strict` + `pytest`.
56
+ - No expansion of the protocol surface without an accepted `SPEC.md` PR.
57
+ - No domain-specific or deployment-specific content — this is a generic
58
+ primitive (see the neutrality checklist in `sm-template/PLAYBOOK.md` §7).
59
+ - Sign off with the Developer Certificate of Origin (DCO), not a CLA.
60
+
61
+ ## Attribution
62
+
63
+ *Personal research contributions aligned with [Project NANDA](https://projectnanda.org) standards. [Stellarminds.ai](https://stellarminds.ai)*
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 stellarminds.ai
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,160 @@
1
+ # Borrowed Time: Extend-Only, Threshold-Attested Authority Renewal for Partitioned Agent Meshes
2
+
3
+ A research contribution by StellarMinds.ai, aligned with Project NANDA. Normative companion: `draft-chandra-wimse-partition-tolerant-renewal`.
4
+
5
+ ---
6
+
7
+ ## Abstract
8
+
9
+ Every workload identity system in deployment today shares one architectural assumption: the credential issuer is reachable. Short-lived tokens, fast rotation, timely revocation — the entire modern security posture for machine identity is a set of guarantees about the connected case. The moment an autonomous agent is severed from its issuer, those guarantees do not degrade gracefully; they simply stop applying, and the agent enters an undefined state in which its credential will expire before its issuer can be reached again.
10
+
11
+ A severed agent has exactly three options. It can halt at expiry, converting every network partition into an autonomy outage and handing adversaries a denial-of-service primitive: disrupt communications for longer than one credential lifetime and any agent in the mesh goes dark. It can self-renew, an unbounded self-grant that collapses the security model — a single compromised node keeps its own authority alive forever. Or it can borrow: extend its existing authority, for a bounded time, at no greater scope than it already holds, by collecting cryptographic attestations from a Byzantine supermajority of mutually-known peers who have watched it operate.
12
+
13
+ This paper argues for the third option and specifies its shape. We make three contributions. First, we name and characterize the connected assumption as a structural gap in workload identity architectures, including the emerging IETF WIMSE architecture, SPIFFE/SPIRE, and agent registry systems such as the NANDA Index. Second, we define extend-only, threshold-attested authority renewal: a primitive in which a quorum of ceil(2N/3) peer attesters collectively exercises a strictly bounded, monotonically non-escalating local issuance authority — no agent can authorize itself, no minority can authorize an agent, total extension is capped, scope can only be preserved and never widened, and no new trust root is introduced. Third, we give an honest accounting of what partition tolerance cannot buy: revocations issued during a partition cannot be enforced until it heals, and we quantify that residual rather than hiding it.
14
+
15
+ ---
16
+
17
+ ## 1. Introduction
18
+
19
+ The Internet of AI Agents is being built on an inherited premise. Workload identity — the discipline of giving software processes cryptographically verifiable identities — grew up in the data center, where the credential authority is a service a few network hops away and "unreachable" means an incident, not an operating condition. The IETF's WIMSE architecture [1] and its credential formats [2], and the SPIFFE/SPIRE framework [5] that preceded them, correctly treat short credential lifetimes as a security feature: a token that expires in hours limits the blast radius of theft, provided the workload can return to its issuer for a fresh one.
20
+
21
+ Autonomous agent meshes break the proviso. An AI agent cluster at a remote industrial site loses its WAN link for an hour. A vehicle convoy in a contested environment sees its uplink jammed. An edge deployment continues coordinating locally while its trust-domain credential service is unreachable. In each case, the agents are healthy, mutually authenticated, and mid-mission — and their credentials are counting down toward an expiry that the architecture never decided how to handle. The strongest identity guarantees in the stack evaporate precisely at the moment autonomy is the point.
22
+
23
+ This is not an implementation oversight in any one system. It is the same assumption, made independently everywhere: all strong guarantees of modern workload identity are guarantees about the connected case. Fast revocation assumes revocation messages can be delivered. Timely rotation assumes the rotation endpoint answers. Audit delivery assumes a route to the auditor. No normative guidance exists, in WIMSE or elsewhere, for what a healthy-but-severed workload should do when its credential expires [1][2].
24
+
25
+ The naive answers occupy the two ends of a spectrum, and both are wrong. Fail-closed makes partition a weapon: any adversary who can keep a link down for one TTL can disable an agent without touching it. Fail-open makes compromise permanent: a node that can renew itself needs no issuer, and therefore answers to none.
26
+
27
+ The contribution of this work is the disciplined middle. An agent that cannot reach its issuer may continue operating on borrowed time — time vouched for by a supermajority of peers who hold issuer-anchored credentials of their own, who have observed the agent's recent health, and who each independently verify that the request extends existing authority without widening it. The loan is bounded (a hard ceiling, measured from original issuance), collateralized (every attestation is a signed, auditable artifact delivered to the issuer on reconnection), and non-negotiable in scope (extend-only, claim-by-claim). The normative protocol — message formats, verification procedures, renewal chains for multi-round extension — is specified in the companion Internet-Draft [11]; this paper argues the design and its limits.
28
+
29
+ ## 2. The Connected Assumption
30
+
31
+ Consider what each layer of the current stack promises, and to whom the promise is addressed.
32
+
33
+ Issuance and rotation. WIMSE Workload Identity Tokens are short-lived by design, refreshed on the order of hours [2]. SPIRE agents rotate SVIDs by contacting the SPIRE server [5]. The promise: a stolen credential is useful only briefly. The addressee: a workload that can reach its issuer before expiry.
34
+
35
+ Revocation. Whether by revocation list, status endpoint, or the implicit revocation of simply declining to re-issue, invalidating a credential requires delivering that decision — to the workload, to its relying parties, or both. The promise: compromise can be contained quickly. The addressee: nodes on the connected side of the graph.
36
+
37
+ Discovery and verification. Agent registry architectures — the NANDA Index and its verified AgentFacts among them [8] — let a counterparty resolve and verify an agent's identity, capabilities, and evidence quickly. The promise: fresh, verifiable facts about the agent. The addressee: a resolver that can reach the index.
38
+
39
+ None of these promises is false. Each is scoped, silently, to reachability. The gap opens when a mesh of agents remains internally connected — still exchanging signed heartbeats, still coordinating tasks, still mutually authenticating with unexpired credentials — while the path to the trust-domain infrastructure is down. The mesh retains everything needed to keep functioning except a ruling on whether it is allowed to. That ruling currently defaults, by omission, to fail-closed.
40
+
41
+ We note that the WIMSE working group's charter already gestures at the answer: it includes a work item for local issuance of tokens by an issuer of limited authority, possibly "the workload itself or another workload deployed nearby" [4]. What follows can be read as a hardening of that idea for the adversarial, disconnected case: no single nearby workload is trusted as an issuer; a quorum is.
42
+
43
+ ## 3. Three Options for a Severed Agent
44
+
45
+ The design space at credential expiry under partition is small enough to enumerate exhaustively, which is itself a useful property.
46
+
47
+ Halt (fail-closed). Authority ends at the TTL. Safe against credential abuse; catastrophic for availability. The failure is not merely operational — it is a standing invitation. An adversary who can induce or prolong a partition converts a communications-layer capability into an authorization-layer kill switch, with a known activation delay of exactly one TTL.
48
+
49
+ Self-grant (fail-open). The agent signs its own extension. There is no threshold, no external check, no bound. A compromised agent becomes self-sovereign. Any system that permits this has no revocation story at all, connected or not, because the party being revoked controls the renewal.
50
+
51
+ Borrow (extend-only, threshold-attested). The agent asks the only authority-adjacent parties reachable during the partition — its peers — and the protocol constrains what they can grant. Three constraints do the work:
52
+
53
+ Threshold. A renewal is valid only with ceil(2N/3) distinct attestations from the agent's provisioned peer set (the agent itself excluded, N >= 4). No agent authorizes itself; no minority coalition authorizes anyone.
54
+ Extend-only. Each attester independently verifies, claim-by-claim, that the request carries the same workload identifier and identical scope to the original issuer-signed credential. The quorum can prolong authority; it cannot mint, widen, or restore it.
55
+ Ceiling. Total peer-attested extension is capped at a small multiple of the original TTL, measured from original issuance. When the ceiling is reached, the agent fails closed regardless of mesh health. The borrow is a bridge, never a substitute.
56
+
57
+ A fourth constraint is what the peers attest to: not merely that the credential was valid, but that the requester is operationally healthy per fresh, mesh-local observation — heartbeat, task participation, consensus-round activity. This answers the classical objection that a token must not outlive the context it represents: here, the extension is granted only against live evidence that the context persists, and the ceiling bounds how long that substitute evidence may stand in for the issuer's word.
58
+
59
+ ## 4. Design
60
+
61
+ ### 4.1 Roles and preconditions
62
+
63
+ The protocol operates inside an existing peer mesh: agents that hold a common issuer's credentials, know one another's workload identifiers and keys (provisioned out-of-band before any partition), and already exchange signed status messages as part of normal operation. That existing authenticated channel is the transport; the protocol introduces none of its own. Deployment parameters — the TTL ceiling and a maximum clock skew bound — are provisioned mesh-wide in advance. An agent may invoke renewal only after attempting and failing to reach its issuer.
64
+
65
+ ### 4.2 The renewal round
66
+
67
+ When agent A's effective credential nears expiry and the issuer is unreachable:
68
+
69
+ Request. A broadcasts a signed RenewalRequest carrying its original credential, any prior renewal proofs (§4.3), the requested extension, and a fresh nonce.
70
+ Independent evaluation. Each peer B verifies, on its own: the issuer signature on A's original credential and the validity of any renewal chain; that the credential is not in B's cached revocation state; that the request is extend-only, claim-by-claim; that the extension would not breach the ceiling; that A is healthy per B's own recent observations; and that B has not already attested to this nonce. Only if all checks pass does B return a signed PeerAttestation, bound to the nonce, attesting exactly the requested duration.
71
+ Quorum assembly. When A holds ceil(2N/3) valid attestations from distinct peers, it assembles them into a RenewalProof and treats its expiry as extended. If the quorum does not arrive within a bounded collection window (one retry permitted), A fails closed.
72
+ Settlement. On reconnection, A immediately requests a fresh issuer credential, transmits its full renewal chain for audit, and synchronizes revocation state before processing any further attestations. Issuer-issued credentials supersede peer-attested extensions on sight.
73
+
74
+ The proof carries no signature of its own; its integrity is exactly the sum of the individually signed attestations inside it — an aggregation, not a new authority.
75
+
76
+ ### 4.3 Renewal chains and relying-party verification
77
+
78
+ A partition may outlast one extension. After the first renewal, the agent's issuer-signed credential is past its original expiry, so subsequent rounds must be verifiable without issuer contact. The mechanism is the renewal chain: each new request carries every prior proof, and evaluating peers validate the chain link by link — issuer signature at the root, then each proof's attestation signatures, quorum count, nonce binding, and gap-free continuation of the expiry it extends — with the cumulative extension checked against the ceiling.
79
+
80
+ Symmetrically, a relying party inside the partition that receives a request from A after A's nominal expiry does not reject on the exp claim alone. It verifies the presented chain: root signature, every constituent attestation against the provisioned peer key set, quorum and distinctness, chained expiries within the ceiling, scope claims present in the original credential, and its own cached revocation state. Any failure means the credential is treated as expired. The extension is thus not a private belief of the borrowing agent; it is a portable, independently checkable artifact.
81
+
82
+ ### 4.4 What is deliberately absent
83
+
84
+ No new trust root: attestations are signed with peer keys already anchored to the common issuer. No new transport: renewal messages ride the mesh's existing authenticated channel. No reputation, scoring, or weighting: an attestation is a binary, auditable statement by an identified peer, and the threshold does the aggregation. Each absence is a refusal to smuggle in a second security model under cover of the first.
85
+
86
+ ## 5. Guarantees
87
+
88
+ Let N be the size of the eligible attester set (the requester excluded) and Q = ceil(2N/3) the quorum.
89
+
90
+ G1 — No unilateral self-grant. The requester's signature is necessary and never sufficient. Its own key does not count toward Q.
91
+
92
+ G2 — Forgery bound. Assembling a proof requires Q distinct valid signatures. A colluding coalition of f attesters forges a proof without honest participation only if f >= Q — a two-thirds supermajority. Below that bound, spurious proofs are impossible, not merely unlikely.
93
+
94
+ G3 — Liveness bound. A legitimate renewal succeeds whenever at least Q attesters are honest, reachable, and willing; up to N - Q ~ N/3 unavailable or withholding peers are tolerated. A malicious minority can at worst force fail-closed — a denial of renewal, never an unauthorized grant. The threshold mirrors classical BFT supermajorities [7], applied here to attestation collection rather than state consensus.
95
+
96
+ G4 — Bounded exposure. The ceiling terminates peer-attested authority after a fixed total duration from issuance, even if the partition never heals. The worst case is known at provisioning time, in seconds.
97
+
98
+ G5 — Monotonic scope. Verified claim-by-claim by every attester at grant time and by every relying party at use time. Even a colluding supermajority cannot widen scope past the original issuer grant without detection by any honest verifier, because the original scope value is checked for byte-identical consistency by every attester and every relying party against the credential hash the chain roots to.
99
+
100
+ G6 — No new trust root. Compromising this protocol requires compromising the peer key set — the same material whose compromise already defeats the mesh. The protocol adds attack surface only in the sense that a fire escape adds doors.
101
+
102
+ One dependency is named rather than assumed away: time. Every temporal check presumes mesh clocks agree within a provisioned skew bound, maintained through the partition by means outside the protocol (disciplined oscillators, mesh-internal time agreement, hardware clocks). Manipulating fewer than Q attesters' clocks degrades, at worst, to G3's liveness effects; time infrastructure nonetheless belongs in the mesh's trusted computing base.
103
+
104
+ ## 6. What This Does Not Buy: The Revocation Residual
105
+
106
+ Honesty about limits is a design feature, so we state the residual plainly rather than in a footnote.
107
+
108
+ If the issuer revokes an agent's credential while that agent is partitioned, the revocation cannot take effect until the partition heals. Peers attesting in good faith, against their last-cached revocation state, may extend a credential the issuer has already condemned, and the extension can run to the ceiling. No protocol eliminates this: a decision cannot be delivered to a node that is unreachable. The same residual afflicts every credential system under partition — including those whose entire revocation story is "short TTLs," which under partition is precisely the story this protocol extends.
109
+
110
+ What design can do is bound and price the residual. The base TTL sets the floor of revocation lag; the ceiling sets its worst case; both are chosen numbers, not emergent surprises. Cached revocation state is consulted before every attestation, so pre-partition revocations bite immediately. On reconnection, revocation synchronization is ordered before any further attestation processing. And deployments for which post-compromise containment dominates simply provision short TTLs and low ceilings, buying a smaller lag with a narrower tolerance window — a legible trade, made once, in policy.
111
+
112
+ The corresponding claim discipline: any documentation implying this mechanism provides partition-proof revocation is wrong and forbidden by the companion draft's own text [11].
113
+
114
+ ## 7. Related Work and Positioning
115
+
116
+ WIMSE. The architecture [1] and credential formats [2][3] define the connected substrate this work extends without modification; the renewal proof wraps WIMSE credentials, it does not replace them. The charter's limited-authority local issuance item [4] is the natural adoption surface: this protocol is that item's adversarial-case instantiation, with the quorum as the bounded local issuer.
117
+
118
+ SPIFFE/SPIRE. The dominant deployed lineage [5] assumes agent-to-server reachability for SVID rotation; this mechanism gives SPIFFE-compatible deployments a severed-mode bridge without touching the SPIFFE specification.
119
+
120
+ Delay-Tolerant Networking. DTN [6] delivers data across partitions via store-carry-forward; it is silent on authority continuity for nodes operating inside the partition. The two components: DTN can carry renewal messages and settlement traffic.
121
+
122
+ BFT consensus. PBFT and successors [7] use the same supermajority to agree on a replicated state. Here the threshold gates a narrower question — "may this specific authority persist, unchanged, a little longer?" — with correspondingly simpler message semantics and no leader.
123
+
124
+ NANDA. The NANDA Index and verified AgentFacts [8] give agents fast discovery and verification while connected to the index. This work is the partition-tolerant complement: a NANDA-registered agent severed from index and issuer alike retains bounded, auditable operation, and the renewal proof is a natural AgentFacts-referenced evidence artifact of partition-time continuity — a receipts-shaped object, consistent with treating verifiable evidence as a first-class layer of agent infrastructure.
125
+
126
+ ## 8. Worked Sketch
127
+
128
+ Seven AI agents coordinate inspection and control at a remote industrial edge site, each holding a 4-hour WIT from the operator's credential service; the WAN drops for 45 minutes. Agent 3, twenty minutes from expiry, fails its issuer contact, broadcasts a renewal request (one-hour extension, empty chain, fresh nonce) to its six peers. Five of them independently verify issuer signature, cached revocation state, extend-only scope, ceiling headroom (12 hours from issuance), and Agent 3's task participation within the last minute; each signs an attestation. Quorum is ceil(2*6/3) = 4; five suffices even with one peer busy. Agent 3 assembles the proof and continues; peers accepting its requests verify the chain themselves. Thirty minutes later the WAN returns, Agent 3 settles — fresh WIT in, renewal chain out for audit, revocation state synchronized. Total protocol overhead: one broadcast, five signatures, read-only verification. Total new trust introduced: none.
129
+
130
+ ## 9. Limitations and Future Work
131
+
132
+ Beyond the revocation residual (§6), we name four open edges. Membership dynamics: the peer key set is provisioned pre-partition and static; principled handling of mesh join/leave during a partition — and of ceilings across re-provisioning — is unspecified. Health semantics: the attestable health signals are a small enumerated set with an escape hatch; a registry and richer, machine-checkable health predicates would strengthen the meaning of an attestation. Hardware roots: hardware-bound attester keys (TPM, HSM, enclave) are recommended against mass key compromise but not yet profiled; a TEE-hardened attester profile is natural follow-on work. Formal verification: the guarantees of §5 are argued, not machine-checked; the protocol's small state space makes it a good candidate for model checking, and we intend the specification to be tight enough to make that tractable. A reference implementation and empirical evaluation — quorum latency and proof-size overhead under realistic mesh loss — are the priority before any standards-track promotion of the companion draft.
133
+
134
+ ## References
135
+
136
+ [1] Salowey, J. A., Rosomakho, Y., Tschofenig, H. Workload Identity in a Multi System Environment (WIMSE) Architecture. draft-ietf-wimse-arch-08, IETF, July 2026.
137
+
138
+ [2] Campbell, B., Salowey, J. A., Schwenkschuster, A., Sheffer, Y., Rosomakho, Y. WIMSE Workload Credentials. draft-ietf-wimse-workload-creds-02, IETF, July 2026.
139
+
140
+ [3] Rosomakho, Y., Salowey, J. A. Workload Identifier. draft-ietf-wimse-identifier-03, IETF, July 2026.
141
+
142
+ [4] IETF. Workload Identity in Multi System Environments (WIMSE) — Working Group Charter. https://datatracker.ietf.org/wg/wimse/about/
143
+
144
+ [5] CNCF. Secure Production Identity Framework for Everyone (SPIFFE). https://github.com/spiffe/spiffe/blob/main/standards/SPIFFE.md
145
+
146
+ [6] Cerf, V., et al. Delay-Tolerant Networking Architecture. RFC 4838, April 2007.
147
+
148
+ [7] Castro, M., Liskov, B. Practical Byzantine Fault Tolerance. OSDI, February 1999.
149
+
150
+ [8] Raskar, R., et al. Beyond DNS: Unlocking the Internet of AI Agents via the NANDA Index and Verified AgentFacts. arXiv:2507.14263, July 2025.
151
+
152
+ [9] Jones, M., Bradley, J., Sakimura, N. JSON Web Signature (JWS). RFC 7515, May 2015.
153
+
154
+ [10] Jones, M., Bradley, J., Sakimura, N. JSON Web Token (JWT). RFC 7519, May 2015.
155
+
156
+ [11] Chandra, S. Partition-Tolerant Authority Renewal for Autonomous Agent Meshes. draft-chandra-wimse-partition-tolerant-renewal-00, IETF, July 2026.
157
+
158
+ ---
159
+
160
+ Correspondence: Sharath Chandra, StellarMinds.ai.