Repository navigation
Add Core's Link authority - #496
Merged
Merged
Conversation
Core implements sandboxlink.Authority over its database: allocations and self_hosted enrollments hold Serve authority, a marked agent host attaches, and opening a service needs the current bound assignment, its grant, the current resource generation and credential revision. assignment_bind carries the resource and attach grant to agent hosts. Cleanup and release withdraw durable authority, then revoke the resource at the relay, then destroy or send.
…authority # Conflicts: # docs/zh/runtime-protocol.md
Rotation now advances the generation of every sandbox enrollment of the key in the rotating statement, so the Link authority refuses Opens and renewals that the old secret's serve peer would receive. Document that and the trust an unrestricted key has over its enrollments, and make the Serve-to-Attach test present the Serve credential for a real agent host.
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.
Cutover PR2: Core implements
sandboxlink.Authorityover its database and constructs one relay (relay.New) incmd/server, with no route yet. This is additive: nothing produces a Serve credential or an agent-host bind until PR3 (Provider Serve) and PR5 (placement on agent hosts). Integration tests drivesandboxlinktestpeers through the real relay and Authority.Serve authority
runtime_allocations.serve_credential_hashandserve_generation, andsandbox_enrollments{environment_id UNIQUE, executor_key_id, generation}.sandbox_resourcesview decides liveness:Attach authority
devicesgainsagent_host(a check constraint forbids it on guests) andcredential_revision. Existing device credentials gain no Attach authority.AuthorizeOpenandRenewrequire all of: the Runtime holds the Session's current bound assignment (ID and epoch), the grant digest matches, the generation is current, the revision is current, and the resource is live.sandbox-link-attach-grantpurpose) over the assignment ID, epoch and generation. Nothing is stored. Any epoch or generation advance, or the resource ceasing to be live, invalidates it, and the same assignment and epoch always yield the same grant.Wire
assignment_bindgains optionalresourceandattach_grant. Core sets them only for a marked agent host whose Environment has Serve authority.invalid_request), and a repeated bind must carry the same pair (assignment_conflict).proto.Versionstays 0.12.0.Revocation order
Relay.RevokeResource, then Kill. Every destroy path reaches it.Build:
scripts/build-core.shcopiessandboxlink,sandboxwire,sandboxbootstrapandsandboxfs.Docs:
docs/runtime-protocol.md(+ zh); Core's Authority rules inservices/core/IMPLEMENTATION.md.Checks
cmd/server(TestLayering), proto, sandboxbootstrap and dispatch.TestLinkAuthority*tests and the affected existing ones.-race -count=50on the new tests.make check-sqlc, gofmt, vet,make check-names check-docs check-ci.Known gaps, by owner
agenthost.Binding;Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.