Repository navigation
Conversation
Add browser-bound GitHub authorization, single-installation admission, current repository checks, and transactional rotation and revocation without coupling domain errors to HTTP. Co-authored-by: Ben Thomas <ben.thomas@microsoft.com> Co-authored-by: Nishiki <hello@nshki.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Copilot was unable to review this pull request because there is no eligible user to bill.
An enterprise owner can allow the organization to be billed for reviews like this by enabling Copilot code review for users without a license.
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.
Why
Hub needs GitHub sign-in, revocable sessions, and current repository access checks. This identity-policy layer builds on #118. Refs #116.
What changes
Add the GitHub client and domain operations for setup, sign-in, session verification, repository access, rotation, and revocation. Sign-in uses permanent GitHub user IDs and checks repositories through only the configured installation. Hub discards user tokens after identification.
Sensitive administrator actions require fresh GitHub proof in the same live session. Rotation and revocation stop callbacks already in progress from restoring old authorization. Each completed security change saves its audit record in the same transaction. Rejected requests create no audit records.
Domain contracts, errors, and access rules stay in domains. GitHub types and failures stay in their integration; neither layer assigns HTTP statuses. This keeps the identity rules separate from the API added by the next layer.
Real GitHub sign-in remains unverified against an authorized App; integration tests use synthetic GitHub responses.
Created from a Slack conversation.