Repository navigation
feat(broker): define credential continuity contract - #2217
Merged
Merged
Conversation
A broker that does OAuth for a session holds the provider tokens itself.
The session keeps only an opaque binding, and that binding dies with the
broker process, so after a broker restart the user would have to
authorize again. This adds the broker-internal types that let a broker
find the credentials it already stored and hand back a fresh binding.
This commit is the contract only. Nothing here implements or calls it;
the encrypted storage and the recovery logic come in the following
commits of the series.
Added in internal/mcpbroker:
- OwnerPartition, WorkloadPartition and ProfileDigest: distinct 32-byte
types, so one cannot be passed for another. The partitions are
one-way, role-separated hashes of a verified principal
(ContinuityOwnerPartition, ContinuityWorkloadPartition). The digest
covers the non-secret OAuth configuration (ProtectedProfileDigest).
- ContinuityGuard and CustodyAssertion: what a recovery must match.
- CredentialCustodyStager, CredentialContinuityAdvertiser,
CredentialContinuityService and ExpectedBindingAttacher: optional
broker capabilities.
- ErrContinuityUnavailable.
Comments in broker.go and connector.go now say "session handle" instead
of "attachment".
The partition and digest encodings are stored by later commits, so their
domain tags carry a version ("/v1"); changing them later needs a
migration. The partitions are unkeyed hashes: they keep the identity out
of stored records but can be recomputed by anyone who can guess it.
Co-Authored-By: mecatl <[email protected]>
Merged
2 tasks
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.
A broker that does OAuth for a session holds the provider tokens itself.
The session keeps only an opaque binding, and that binding dies with the
broker process, so after a broker restart the user would have to
authorize again. This adds the broker-internal types that let a broker
find the credentials it already stored and hand back a fresh binding.
This commit is the contract only. Nothing here implements or calls it;
the encrypted storage and the recovery logic come in the following
commits of the series.
Added in internal/mcpbroker:
types, so one cannot be passed for another. The partitions are
one-way, role-separated hashes of a verified principal
(ContinuityOwnerPartition, ContinuityWorkloadPartition). The digest
covers the non-secret OAuth configuration (ProtectedProfileDigest).
CredentialContinuityService and ExpectedBindingAttacher: optional
broker capabilities.
Comments in broker.go and connector.go now say "session handle" instead
of "attachment".
The partition and digest encodings are stored by later commits, so their
domain tags carry a version ("/v1"); changing them later needs a
migration. The partitions are unkeyed hashes: they keep the identity out
of stored records but can be recomputed by anyone who can guess it.
Co-Authored-By: mecatl [email protected]