Skip to content

feat(hub): add GitHub identity and session policies - #120

Open
Copilot wants to merge 1 commit into
copilot/hub-identity-systemfrom
copilot/hub-identity-behavior
Open

Copilot wants to merge 1 commit into
copilot/hub-identity-systemfrom
copilot/hub-identity-behavior

Conversation

Copilot AI commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

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.

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>
Copilot AI requested review from a team and nshki as code owners October 26, 2026 23:31
Copilot AI max review requested due to automatic review settings October 26, 2026 23:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants