Skip to content

fix(installer): validate authentication input partners - #286

Merged
weastler merged 1 commit into
build/hub/newfrom
weastler-validate-installer-setup-requirements
Nov 18, 2026
Merged

weastler merged 1 commit into
build/hub/newfrom
weastler-validate-installer-setup-requirements

Conversation

@weastler

Copy link
Copy Markdown
Contributor

Why

Saved installer inputs can pass validation even when Hub cannot start with them. Copilot App authentication can lack its organization, installation ID, or private key, and shared authentication settings can lack their required partners.

What changes

The installer now rejects incomplete Copilot App configuration and names the missing or invalid settings without printing values. Copilot-only setups still need no GitHub sign-in provider or public origin. Both supported private-key secret references remain valid, and secret-backed identity values are checked by Hub after resolution.

An authentication origin now requires both shared keys, and either shared key requires its partner and an origin. Sign-in setup keeps its existing exception for repairing a missing origin. The change only validates inputs; it does not read or change live installations.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@weastler
weastler requested review from a team and nshki as code owners November 18, 2026 06:27
Copilot AI adaptive review requested due to automatic review settings November 18, 2026 06:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The authentication and saved-input gates introduce interacting deployment, recovery, exemption, and origin-repair requirements that need cross-flow review beyond the automated approval scope.

No open issues 🎉

What changed in this PR

This PR strengthens saved-input validation in the Azure installer so incomplete authentication settings are rejected before deployment, rather than preventing Hub from starting later.

Changes:

  • Validates required Copilot App settings while preserving Copilot-only setups and supported secret references.
  • Requires the authentication origin and both shared keys together, preserving the sign-in setup exception for a missing origin.
  • Adds validation coverage, updates installer test fixtures, and documents the requirements.
File Description
infrastructure/​README.md Documents authentication dependencies and Copilot-only configuration.
infrastructure/​azure/​post/​index.test.ts Updates recovery and origin-change fixtures for stricter validation.
infrastructure/​azure/​install/​inputs/​index.ts Adds Copilot configuration and shared authentication checks.
infrastructure/​azure/​install/​inputs/​index.test.ts Covers missing settings, invalid values, secret references, and the origin-repair exception.
infrastructure/​azure/​install/​index.test.ts Adds required shared-key references to the customization fixture.

Review effort: Balanced (adaptive)

@weastler
weastler merged commit 0f60840 into build/hub/new Nov 18, 2026
50 checks passed
@weastler
weastler deleted the weastler-validate-installer-setup-requirements branch November 18, 2026 19:47
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.

2 participants