Skip to content

feat(cli): Add headless authentication bootstrap command - #1872

Merged
evanpurkhiser merged 1 commit into
mainfrom
git/feat-cli-add-headless-authentication-bootstrap-command
Nov 4, 2026
Merged

evanpurkhiser merged 1 commit into
mainfrom
git/feat-cli-add-headless-authentication-bootstrap-command

Conversation

@evanpurkhiser

@evanpurkhiser evanpurkhiser commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Allow an installed CLI to authenticate non-interactively with SENTRY_SETUP_CODE=... sentry auth bootstrap. Depends on #1871. Expose the bootstrap helper through the existing authentication command group with JSON output, instance selection, and explicit replacement consent.

https://linear.app/getsentry/issue/VDY-337

Validation on the complete stack: typing, lint, and focused authentication/setup tests pass. The full test run has 21 unrelated failures reproduced on unchanged upstream main in the installer musl-detection, time-range, and zip-writer suites.

Native GitHub Stack: #1874, ordered #1870 → #1871 → #1872 → #1873.

Native bootstrap and shell installation passed against local OAuth redemption using internally generated codes. The shell test used a local artifact mirror for the unreleased binary.

@vercel

vercel Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Nov 4, 2026 8:42pm UTC

Request Review

@linear-code

linear-code Bot commented Nov 3, 2026

Copy link
Copy Markdown

VDY-337

@evanpurkhiser
evanpurkhiser changed the base branch from main to git/feat-cli-bootstrap-account-credentials-from-setup-codes November 3, 2026 18:44
@evanpurkhiser
evanpurkhiser added this pull request to stack #1874 November 3, 2026 18:53
@evanpurkhiser
evanpurkhiser force-pushed the git/feat-cli-add-headless-authentication-bootstrap-command branch from 0de629f to c4675e3 Compare November 3, 2026 19:09
@evanpurkhiser
evanpurkhiser requested a review from BYK November 4, 2026 18:36
@evanpurkhiser
evanpurkhiser marked this pull request as ready for review November 4, 2026 18:36
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 4, 2026
@evanpurkhiser
evanpurkhiser force-pushed the git/feat-cli-add-headless-authentication-bootstrap-command branch from c4675e3 to d572cd0 Compare November 4, 2026 18:42
@evanpurkhiser
evanpurkhiser force-pushed the git/feat-cli-add-headless-authentication-bootstrap-command branch from d572cd0 to 6bfbf8a Compare November 4, 2026 19:08
@evanpurkhiser
evanpurkhiser force-pushed the git/feat-cli-add-headless-authentication-bootstrap-command branch from 6bfbf8a to bf1d3e7 Compare November 4, 2026 19:29
Base automatically changed from git/feat-cli-bootstrap-account-credentials-from-setup-codes to main November 4, 2026 20:11
evanpurkhiser added a commit that referenced this pull request Nov 4, 2026
The CLI needs to redeem Sentry's short-lived setup codes without opening
a browser. Add the setup-code OAuth exchange, validate the issuing
instance, and redact setup codes from diagnostics. Redemption sends the
code once and refuses redirects.

Backend dependency: getsentry/sentry#129325.
Codes are generated internally by Sentry for specific clients; the
generated onboarding instructions flow follows separately.

https://linear.app/getsentry/issue/VDY-337

Validation on the complete stack: typing, lint, and focused
authentication/setup tests pass. The full test run has 21 unrelated
failures reproduced on unchanged upstream main in the installer
musl-detection, time-range, and zip-writer suites.

Native GitHub Stack:
[#1874](https://github.com/getsentry/toolkit/stack/1874), ordered #1870
→ #1871 → #1872 → #1873.

Native bootstrap and shell installation passed against local OAuth
redemption using internally generated codes. The shell test used a local
artifact mirror for the unreleased binary.
evanpurkhiser added a commit that referenced this pull request Nov 4, 2026
Setup codes need to authenticate the CLI without disturbing other stored
accounts. Add bootstrap credential handling using the existing
host-scoped account storage, validate responses before replacing a
login, and preserve credentials when redemption fails.

Depends on #1870. Command and installer entry points follow separately.

https://linear.app/getsentry/issue/VDY-337

Validation on the complete stack: typing, lint, and focused
authentication/setup tests pass. The full test run has 21 unrelated
failures reproduced on unchanged upstream main in the installer
musl-detection, time-range, and zip-writer suites.

Native GitHub Stack:
[#1874](https://github.com/getsentry/toolkit/stack/1874), ordered #1870
→ #1871 → #1872 → #1873.

Native bootstrap and shell installation passed against local OAuth
redemption using internally generated codes. The shell test used a local
artifact mirror for the unreleased binary.
@evanpurkhiser
evanpurkhiser force-pushed the git/feat-cli-add-headless-authentication-bootstrap-command branch from bf1d3e7 to fd686fc Compare November 4, 2026 20:42
@evanpurkhiser
evanpurkhiser enabled stacked auto-merge (squash) November 4, 2026 20:53
stacked auto-merge was automatically disabled November 4, 2026 20:55

Replaced by a newer auto-merge request

@evanpurkhiser
evanpurkhiser enabled stacked auto-merge (squash) November 4, 2026 20:55
@evanpurkhiser
evanpurkhiser merged commit 7ff35b3 into main Nov 4, 2026
27 checks passed
@evanpurkhiser
evanpurkhiser deleted the git/feat-cli-add-headless-authentication-bootstrap-command branch November 4, 2026 21:07
evanpurkhiser added a commit that referenced this pull request Nov 4, 2026
Depends on #1872. Let headless installs authenticate immediately when
`SENTRY_SETUP_CODE` is supplied. The installer hands authentication to
the same bootstrap implementation used by an existing CLI and propagates
failures.

https://linear.app/getsentry/issue/VDY-338

Validation on the complete stack: typing, lint, and focused
authentication/setup tests pass. The full test run has 21 unrelated
failures reproduced on unchanged upstream main in the installer
musl-detection, time-range, and zip-writer suites.

Native GitHub Stack:
[#1874](https://github.com/getsentry/toolkit/stack/1874), ordered #1870
→ #1871 → #1872 → #1873.

Native bootstrap and shell installation passed against local OAuth
redemption using internally generated codes. The shell test used a local
artifact mirror for the unreleased binary.

This branch was previously deployed

1 inactive deployment
Preview — fd686fc2 Deployed Nov 4, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant