feat(selfhost): recognize brokered mode in the setup wizard + docker - #1346
Merged
Conversation
A brokered self-host (ORB_ENROLLMENT_SECRET set, using the central Orb App instead of its own GitHub App) has no GITHUB_APP_ID, so the first-run setup wizard would wrongly walk the operator through creating their own App. Short-circuit /setup to a brokered-mode page when an enrollment secret is present (the central Orb provides credentials on demand). Document the brokered env in docker-compose.yml. - renderBrokeredSetupPage() (tested) + the server.ts gate (codecov-ignored entry, exercised by the docker boot smoke test) before the own-App wizard. - docker-compose.yml: a brokered-mode block pointing at ORB_ENROLLMENT_SECRET (.env) + ORB_BROKER_URL. Advances #1255.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1346 +/- ##
=======================================
Coverage 95.25% 95.25%
=======================================
Files 188 188
Lines 20319 20320 +1
Branches 7320 7320
=======================================
+ Hits 19355 19356 +1
Misses 378 378
Partials 586 586
🚀 New features to boost your workflow:
|
5 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.
Summary
A brokered self-host (using the central Orb App instead of creating its own GitHub App) has no
GITHUB_APP_ID, so the first-run setup wizard would wrongly walk the operator through creating their own App. This short-circuits/setupto a brokered-mode page whenORB_ENROLLMENT_SECRETis present (the central Orb provides credentials on demand), and documents the brokered env in Docker.renderBrokeredSetupPage()(tested) + theserver.tsgate (the entry is codecov-ignored — exercised by the Docker build+boot smoke test) placed before the own-App wizard.docker-compose.yml: a brokered-mode block pointing atORB_ENROLLMENT_SECRET(from.env) + the optionalORB_BROKER_URL.First of the brokered-self-host end-to-end series (broker client #1341 → this → secure self-enrollment → signed event relay).
Validation
npm run test:cigreen; the newrenderBrokeredSetupPageis covered (theserver.tsgate is in the codecov-ignored entry).Advances #1255.