Repository navigation
docs(plans): §10 per-person Connections (piece 6) — credential intake proposal, HOLD for Sam's read - #1676
Merged
Conversation
… proposal, HOLD for Sam's read Sam's 67645 asked for a short proposal covering the intake paths, where each credential lives, and how a grant scopes it to a room or a seat; Vera's 67647 gave four security constraints. §10 folds them in: an Integration row at scope 'user' as the Connection (no new model), OAuth via the GitHub App's user authorization first and a checked fine-grained token as the fallback, connectorSecrets by reference with the broker as the only decrypt path, the unchanged RoomGrant record with a scope check and an expiry cap at mint, and Connection removal as grants → row → material → provider → delete. Cross-links added from the §1 table, the §8 kernel table and the §9 owner bullet. Nothing is scheduled or sized until Sam reads it. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Removal order: the provider revoke reads the access token, so it runs before the material is revoked and the row stays until both succeed. Refresh: GitHub refresh tokens are single-use, so credentialFor refreshes behind a refreshGeneration fence; losers re-read and never set error. Scopes: GET /repos permissions is the person's role, not the token's grant, so it is a ceiling at mint and the first refused write is the real check; an OAuth Connection's expiry is the refresh token's six months. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…al refreshes before the provider revoke (Vera 67900/67904) Co-Authored-By: Claude Fable 5.1 <[email protected]>
1 of 3 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.
HOLD for Sam's read. Docs-only. Nothing in it is scheduled or sized until Sam rules; do not merge on Vera's clearance alone.
Adds §10 to
docs/plans/tools-catalogue-room-grants.md: the piece-6 proposal Sam asked for in 67645 (how members feed in credentials), with Vera's four constraints from 67647 folded in where they bite. Cross-links from the §1 table, the §8 kernel table and the §9 owner bullet; no existing section changes meaning.What §10 says
Integrationrow atscope: 'user',type: 'github-user', owned bycreatedBy, pinned to one repo like the App row. No new model; the mint owner check, the broker'sresolveConnectionand the catalogue'sconnections[]extend by type.permissionsobject is recorded asscopes. The login OAuth app is not reused.connectorSecretsby reference (credentialRef,refreshTokenRef), both added toINTEGRATION_SECRET_CONFIG_KEYS;credentialHintis the only trace. Decrypted only in the broker'scredentialFor(connection), which returns the same{ token, expiresAt }shape as the App token.RoomGrantrecord is unchanged.grantedByis the Connection's owner (existing rule). The person's repo role is a ceiling at mint (400 insufficient_credential_scope), not a promise: for a pasted token the first refused write is the real check (provider_deniedon the trail). The grant's expiry is capped at the credential's — the refresh token's for OAuth.DELETE /api/integrations/:idbecomes grants → row → provider (needs the token, so before the material) → material → delete, the row kept until the last two succeed, via a newRoomGrant.revokeByConnectionthat cascades every root grant on the row; applies to the App row too, which today leaves grants live on the page.Second commit takes Vera's three GitHub corrections (67894–67896): revoke order, a
refreshGenerationfence for single-use refresh tokens, and repopermissionsread as the person's role rather than the token's grant.Named tests proposed:
removing a Connection revokes every grant on it,the provider revoke runs before the material is gone,a failed provider revoke leaves the row and its references for a retry,a removed Connection's secret is gone by reference;never returns the credentialandno integration response carries a credentialextend to the new row type.🤖 Generated with Claude Code