Repository navigation
feat: the authority core's issuance over its state layer, fenced against a racing revoke - #20
Merged
Merged
Conversation
…nst a racing revoke (r137 B1, m1, m4) Issuance, check, transfer and delegation over #19's store, sources, roles and lifecycle. - B1: every path that decides from current grants (a person's issue, an installation's, a child, a delegation) reads the organization's revision and the owner's seal and epoch in its decision snapshot, and refuses the minted capability unless it carries those values: a revoke, a team leave or an uninstall committed in between yields no capability. A racing store test drives a revoked role and a team leave through each path; with the fence removed the person and delegation paths mint a capability that checks (a child is also caught by the parent's recheck). - m1: an installation issue naming another organization's installation answers as an absent one, with the id as asked. - m4: Check verifies first; only a capability verified up to its revocation has an owner-aware withdrawal named from the store. - Token-level B2 and M1: a hop the installation made for itself stays dead after uninstall and reinstall with a narrower role; a person's hop through the solution sealed elsewhere ends with the uninstall. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mes back whole, transactions retry and roll back - M-a: Uninstall and every role call answer a caller of another organization with the foreign answer before reading any installation, so an installed and an absent installation look alike to an outsider. - M-b: a withdrawn module delivered again reactivates its revoked module installations, each at a higher revision. - m-a: WithdrawModule leaves a tombstone (principal, last generation); a redelivery may neither rename the module nor rewind its generation, so the seal never goes back and the generation never rewinds. - m-b: an operation binding's incarnation adds the acting installation's revision, so a binding revoked by an uninstall is never revived. - m-c: memstore.Write rolls back a panicking transaction. - m-d: ApplyModule starts over when its transaction is retried. - m-e: the same install asked while pending resumes it; another install of a pending target is refused naming the pending state. - m-f: Install refuses a principal naming a module, a person or another installation. - m-g: a store failure under a seal is reported as itself, not as a missing installation. Each new test (r143_test.go) was run against the core before these changes and failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 26, 2026
fix: r148 on the core: a module is withdrawn, never uninstalled; tombstones hold their principal
#21
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What we are trying to do
This is step 2c of the solution-principal work (spec #11, #14). The core's state layer merged in #19. This PR adds the core's issuance over it, so that the local authority, and later saas accounts, issue through one host-independent core. It also carries the r137 issuance findings and every r143 fix. Those must land before any host wires Uninstall, the role calls or WithdrawModule. saas is untouched. The local authority moves onto this core in the next PR.
The change
libraries/authority-core/go/authority:issue.go:IssueForPerson,IssueForWorkload,IssueForInstallationandIssueChild(rule A).owner_aware.delegation.go:Delegate,RevokeDelegation,DelegationandIssueForDelegation.check.go:CheckandListResources(grants carry their owner).transfer.go:AuthorizeTransfer.r137, carried here
sealInandepochIn, the tx-scoped derivations the seal sources use, as r143 recommended. A minted capability is refused unless it carries those values, so a revoke, a team leave or an uninstall committed in between yields no capability.race_test.gocovers this: a racing store applies the change right after the decision read, for a revoked role and a team leave, through each path.Checkverifies first. Only a capability that verified up to its revocation has an owner-aware withdrawal named from the store.r143
principal_test.go's "another organization's administrator" case now expects that answer.memstore.Writerolls back a transaction that panics.ApplyModulestarts over when its transaction is retried.Installrefuses a principal that names a module, a person or another installation.The
Storecontract gainsTombstoneandPutTombstone. No host implements the contract yet besides memstore.Size
1,375 hand-written non-test lines and 910 test lines, under the ~2,000 budget.
Reuse and classification
decide's (feat: the authority core's decisions, and readers that honour resource owners #18).workcontext.AuthorityandVerifier.Tests
go vetandgo test -race -count=1 ./...withGOWORK=offpass inlibraries/authority-core/go,libraries/hop/goandmodules/authority/services/local/code.principal_test.go: confinement, owner-aware audiences, owner-aware withdrawal, roles by scope, children that never widen, and other installations and organizations;revocation_test.go: revoking on A leaves the capability through B valid, team grants, uninstall, transfers;child_intersection_test.go(r122);r124_test.go;race_test.go;r143_test.go.Fleet consumers
None change here. The owner-blind readers named in #18 still have to move before any host mints owner-selected scopes:
authority.go:307identity.go:337/528operations.go:188executionrecorder🤖 Generated with Claude Code