Repository navigation
feat(hub): add organization Copilot authentication - #227
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
An incorrect GitHub permission key blocks valid installations, transient failures can trigger terminal refusals, and disconnect can throw when no credential provider is present.
11 open issues
Guard credential provider before comparing its digest · New Use the correct organization Copilot requests permission key · New Classify rate-limited 403 responses as retryable · New Treat response body read failures as unavailable · New Preserve the specific message for credential permission errors · New Report invalid identity settings in plain language · New Add a connected organization installation story · New Clarify that the runtime requires the GitHub App private key · New Test installation identity in disconnect and audit records · New Assert second-based iat and exp claims in the signer test · New Remove unused signer dependency forwarding · New
2 files not reviewed
hub/package-lock.json: Generated filepackages/learning/package-lock.json: Generated file
What changed in this PR
This PR adds a GitHub App installation credential provider for organization-billed Copilot access in Hub’s learning commands, alongside the existing explicit local providers.
Changes:
- Adds App JWT signing, installation verification, fresh token acquisition, and credential-failure classification.
- Exposes organization and App identity through connection status, security audits, administrator copy, and stories.
- Documents configuration and upgrades the Copilot SDK to
1.0.28in Hub and the learning package.
| File | Description |
|---|---|
packages/learning/package.json |
Updates the optional Copilot SDK pin. |
packages/learning/package-lock.json |
Locks the updated SDK and platform packages. |
hub/server/routes/api/security-audits/present-security-audit/index.ts |
Presents App and billed-organization audit fields. |
hub/server/routes/api/security-audits/present-security-audit/index.test.ts |
Adds identity projection coverage. |
hub/server/routes/api/copilot-connection/types.ts |
Adds credential identity to route dependencies. |
hub/server/routes/api/copilot-connection/create-copilot-connection-route-dependencies/index.ts |
Passes provider identity into disconnection. |
hub/server/routes/api/copilot-connection/contract.ts |
Defines the credential-identity response shape. |
hub/server/routes/api/copilot-connection/connect/post/index.ts |
Maps new credential refusals to HTTP responses. |
hub/server/repositories/security-audits/parse-security-audit-event/index.ts |
Accepts organization credential audit fields. |
hub/server/repositories/security-audits/get-security-audit-data/index.ts |
Includes credential identity in stored audit context. |
hub/server/repositories/security-audits/create-security-audit/types.ts |
Extends typed Copilot audit events. |
hub/server/integrations/github/create-installation-access-token/types.ts |
Defines token-acquisition dependencies. |
hub/server/integrations/github/create-installation-access-token/index.ts |
Verifies installations and requests fresh tokens. |
hub/server/integrations/github/create-installation-access-token/index.test.ts |
Covers token acquisition and failure handling. |
hub/server/integrations/github/create-installation-access-token/errors.ts |
Defines classified credential errors. |
hub/server/integrations/github/create-github-app-jwt-signer/types.ts |
Defines the replaceable JWT signing boundary. |
hub/server/integrations/github/create-github-app-jwt-signer/index.ts |
Implements private-key App JWT signing. |
hub/server/domains/learning/read-learning-configuration/index.ts |
Forwards the optional signer dependency. |
hub/server/domains/copilot-credentials/types.ts |
Adds installation identity and credential expiry. |
hub/server/domains/copilot-credentials/create-github-app-installation-copilot-credential-provider/index.ts |
Configures the installation credential provider. |
hub/server/domains/copilot-credentials/create-github-app-installation-copilot-credential-provider/index.test.ts |
Covers stable identity digests and signing. |
hub/server/domains/copilot-credentials/create-environment-copilot-credential-provider/index.ts |
Marks environment credentials as lacking App identity. |
hub/server/domains/copilot-credentials/create-copilot-credential-provider/index.ts |
Adds explicit installation-provider selection. |
hub/server/domains/copilot-credentials/create-copilot-credential-provider/index.test.ts |
Covers selection and conflicting configuration. |
hub/server/domains/copilot-connection/types.ts |
Extends connection audit inputs with identity. |
hub/server/domains/copilot-connection/record-copilot-connection-refusal/index.ts |
Records App identity and specific refusal reasons. |
hub/server/domains/copilot-connection/record-copilot-connection-failure/index.ts |
Attributes failed checks to the configured identity. |
hub/server/domains/copilot-connection/get-copilot-connection-status/index.ts |
Returns configured installation identity. |
hub/server/domains/copilot-connection/get-copilot-connection-status/index.test.ts |
Covers identity reporting in connection status. |
hub/server/domains/copilot-connection/errors.ts |
Adds revocation and permission-denial codes. |
hub/server/domains/copilot-connection/disconnect-copilot/index.ts |
Adds matching provider identity to disconnect audits. |
hub/server/domains/copilot-connection/connect-copilot/index.ts |
Handles installation failures and identity-aware audits. |
hub/server/domains/copilot-connection/connect-copilot/index.test.ts |
Covers terminal refusals and transient failures. |
hub/script/check-image/index.ts |
Checks the packaged SDK version. |
hub/package.json |
Updates Hub’s Copilot SDK pin. |
hub/package-lock.json |
Locks Hub’s updated SDK dependencies. |
hub/docs/learning-foundation.md |
Documents installation credentials and signer behavior. |
hub/docs/deployment.md |
Lists organization credential configuration. |
hub/client/pages/copilot-connection-page/stories.tsx |
Adds organization installation presentation data. |
hub/client/application/hub/view-models/security-audit-page-data/index.ts |
Labels credential identity in audit displays. |
hub/client/application/hub/view-models/security-audit-page-data/index.test.ts |
Covers identity labels in audit data. |
hub/client/application/hub/view-models/copilot-connection-page-data/index.ts |
Adds organization billing and confirmation copy. |
hub/client/application/hub/view-models/copilot-connection-page-data/index.test.ts |
Covers organization-specific connection copy. |
hub/client/application/hub/security-audit-contracts/index.ts |
Allows the non-secret credential-provider field. |
hub/client/application/hub/copilot-connection-contracts/index.ts |
Parses installation identity in status responses. |
hub/.env.example |
Shows organization installation configuration variables. |
Review effort: Max (auto)
alliscode
force-pushed
the
alliscode-github-app-copilot-auth
branch
2 times, most recently
from
November 12, 2026 21:38
e5e2eb2 to
da5c4fa
Compare
alliscode
force-pushed
the
alliscode-github-app-copilot-auth
branch
from
November 12, 2026 23:48
353c366 to
62e9241
Compare
alliscode
force-pushed
the
alliscode-github-app-copilot-auth
branch
from
November 13, 2026 17:20
62e9241 to
9cbbc70
Compare
Base automatically changed from
alliscode-hub-learning-foundation
to
build/hub/new
November 13, 2026 17:54
alliscode
force-pushed
the
alliscode-github-app-copilot-auth
branch
from
November 13, 2026 17:54
9cbbc70 to
d16fa08
Compare
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
alliscode
force-pushed
the
alliscode-github-app-copilot-auth
branch
from
November 13, 2026 22:01
d16fa08 to
66bec9e
Compare
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
GitHub App startup errors provide incomplete or misleading configuration guidance, while the organization connection story shows conflicting billing information and the canonical guides omit the new provider behavior.
3 open issues
11 resolved since last review
Treat response body read failures as unavailable Classify rate-limited 403 responses as retryable Use the correct organization Copilot requests permission key Guard credential provider before comparing its digest Report invalid identity settings in plain language Preserve the specific message for credential permission errors Remove unused signer dependency forwarding Assert second-based iat and exp claims in the signer test Test installation identity in disconnect and audit records Clarify that the runtime requires the GitHub App private key Add a connected organization installation story
2 files not reviewed
hub/package-lock.json: Generated filepackages/learning/package-lock.json: Generated file
Review effort: Max (dynamic)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
weastler
approved these changes
Nov 16, 2026
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 a production Copilot credential that is billed to the organization instead of a personal administrator. The connection must keep GitHub App identity, organization policy, budget, and revocation authoritative without storing installation tokens.
What changes
Hub can now select an explicit
github-app-installationprovider. It verifies the configured App, organization, installation, and read-only Copilot Requests permission, signs through a replaceable boundary, and mints a fresh installation token for each learning command. Removed installations and denied permissions fail closed without falling back to a personal credential, while transient GitHub failures remain retryable.The organization provider plugs into Hub's existing fresh-authorization and connection lifecycle. Connection status, security audits, and administrator wording identify the billed organization and GitHub App. The Copilot SDK is upgraded to the newest stable release outside the seven-day cooldown,
1.0.28, in Hub and the packaged learning command.Storybook screenshots
Hub/Pages/Security/Copilot / Organization Installation — dark theme, 1280×720
Hub/Pages/Security/Copilot / Connected Organization Installation — dark theme, 1280×720
Hub/Pages/Security/Copilot / No Token — dark theme, 1280×720