Repository navigation
feat: require a setup token to create the first user on a tunnel (#32324) - #32515
Merged
Merged
Conversation
Contributor
|
👋 Hey @coder-backporter-app[bot]! This PR is targeting the Only bug fixes should be cherry-picked to release branches. If this is a bug fix, please update the PR title to match the conventional commit format: If this is not a bug fix, it likely should not target a release branch. |
) fix(security): require setup token for first user on tunnels Prevent unauthorized users from claiming Owner access on public `try.coder.app` tunnels before initial setup. - Generate a setup token at startup when using a tunnel with no existing users. - Require the token for first-user creation via the API, web UI, and CLI. - Block GitHub/OIDC first-user signup until setup is complete. - Support custom tokens via `--setup-token` / `CODER_SETUP_TOKEN` and non-interactive CLI setup. - Update development scripts, documentation, and tests. - Preserve existing behavior for deployments with an access URL or existing users. Validated with automated tests and 23/23 manual scenarios using a real tunnel. Refs CORE-784 (cherry picked from commit 88d3494)
BobbyHo
force-pushed
the
backport/32324-to-2.38
branch
from
November 20, 2026 15:42
acab5e0 to
4fc77d6
Compare
denisra
approved these changes
Nov 20, 2026
BobbyHo
had a problem deploying
to
docs-preview
November 20, 2026 21:25 — with
GitHub Actions
Failure
This branch had an error being deployed
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.
Backport of #32324
Original PR: #32324 — feat: require a setup token to create the first user on a tunnel
Merge commit: 88d3494
Requested by: @BobbyHo
The automatic cherry-pick had conflicts. They are resolved by hand; the server and CLI changes are the same as in #32324.
Differences from #32324
scripts/develop: keeps this branch's password handling and adds only the setup token.password_test.gois left out because it comes from fix: generate per-instance dev passwords and remove the shared default #32283, which is not on this branch.docs/install/index.mdanddocs/install/server/rpm.mdare left out. Those pages do not mention the tunnel on this branch.