Repository navigation
Console API: tokens, bearer authentication and whoami - #1778
Merged
Merged
Conversation
A read token could load Security finding titles, severities and advisory URLs from history, status and peek, and could read a Security session trace. Those records stay available to a caller that has the security scope.
Reconcile OpenAPI discovery with bearer scopes and whoami, preserving route parity, compact help and documentation for both branches. Validation: formatting, all-target Clippy, 62 site tests, 126 Console browser tests and 42 focused route/API/token/help tests passed. The full affected-test run stopped after 760 passes on an already-loaded systemd transient scope; its exact merge_run retry passed.
This was referenced Nov 5, 2026
Merged
Closed
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.
Closes #1755
Summary
Adds all five token scope names (default
read), expiry, immediate revocation, last use and machine/caller identity. Documents the CLI and API in the guide and site. Security content filtering/actions, address scopes and rate limits remain the published sibling tickets #1756, #1757 and #1758.Evidence
Execution evidence
Testing seams: token management through the binary; Console HTTP; route-table CLI parity.
cargo test --test console tokens::token_cli_shows_the_secret_once_and_lists_only_metadatausage: thirdshift console ...1 passed; 0 failedcargo test --test console tokens::bearer_read_updates_last_use_and_revoke_takes_effect_on_the_next_requestleft: 401,right: 2001 passed; 0 failedcargo test --test console tokens::route_scopes_refuse_a_token_missing_read_and_name_the_scopeleft: 200,right: 4031 passed; 0 failedcargo test --test console tokens::whoami_reports_the_machine_caller_scopes_and_local_cli_parityusage: thirdshift console ...1 passed; 0 failedcargo test --test command_surface help_is_a_compact_reference_with_a_link_to_the_detailshelp should fit in a short reference, got 72 linescargo test --test command_surface:20 passed; 0 failed; 1 ignoredcargo test --test console tokens::: 6 passed, covering transport refusals, expiry, scopes, revocation, metadata and whoami parity.cargo test --test console accounts::api_requires_a_current_sign_in_and_returns_json_instead_of_redirecting: 1 passed, including session address/scopes in whoami.cargo test --bin thirdshift console::tests: 5 passed, including the assertion that token management has no HTTP routes.0600, the exact SHA-256 digest and no plaintext token or hash in list output.cargo clippy --bin thirdshift -- -D warnings: passed after the review fix.NEXTEST_TEST_THREADS=8 /usr/bin/time -p scripts/affected-tests origin/issue-1753: final local selection passed 62 site checks, the locked build and 126 Console checks. Its Rust phase was stopped with SIGINT after successful CI covered the identical final head, followingdocs/testing.md's CI-reuse rule. Local Rust elapsed 874.25s, including compilation, before cancellation.7efc26fd:cargo fmt --check,cargo clippy --all-targets -- -D warnings, andcargo nextest runpassed. Full Rust result: 3,755 passed, 82 skipped, 1008.797s execution plus 1m08s compilation. Site and Console CI checks also passed, as did both Linux platform builds.Visual evidence
Console API documentation, desktop 1440×900:
Same documentation and state, mobile 390×844:
Merge Danger
Door: two-way
Rollback removes bearer authentication; token metadata lives in a separate private file beside the Credentials.
Blast Radius: Console
Adds an authentication path to the existing API. CLI-only issuance, transport checks and route scopes constrain access.
Review coverage
Reviewed against
issue-1753, pinned to its remote commitd4b52b93187cc4c15e6eb0e74527832df26ef999. The local base ref was stale and checked out in another worktree.Standards: 1 naming finding, addressed in
7315e9c1by renamingViewer.emailtocaller_label. Spec: 0 findings. Both axes read all 18 changed files, including generatedsite/docs/index.html. Changed files left unread: none. Generated-output exclusions: none.Unaddressed findings
Standards
None.
Spec
None.
Security
None.
Built with codex codex-cli 0.164.0 · gpt-6.1-sol · xhigh
Security review outcome
No unaddressed introduced findings.