Skip to content

fix(cli): fail closed when OIDC refresh fails - #2817

Open
jhjaggars wants to merge 1 commit into
NVIDIA:mainfrom
jhjaggars:fail-closed-oidc-refresh/jhjaggars
Open

fix(cli): fail closed when OIDC refresh fails#2817
jhjaggars wants to merge 1 commit into
NVIDIA:mainfrom
jhjaggars:fail-closed-oidc-refresh/jhjaggars

Conversation

@jhjaggars

Copy link
Copy Markdown
Contributor

Summary

Stop protected CLI commands before they send RPCs when automatic OIDC token refresh fails. This prevents sandbox create from allocating a persistent sandbox with a stale token and then failing during a later protected RPC.

Related Issue

No issue required: this is an obvious localized authentication bug fix with a focused regression test. Related context: #2675 documents how failed provisioning can leave a same-name sandbox that blocks retry.

Changes

  • Propagate authentication preparation failures from protected CLI commands instead of continuing with an expired token
  • Preserve openshell status behavior so it can report gateway reachability and authentication independently
  • Include the refresh failure and openshell gateway login <name> guidance in the error
  • Add an integration regression test proving rejected refresh prevents CreateSandbox from reaching the gateway
  • Document the fail-closed OIDC refresh behavior in the CLI skill and gateway authentication reference

Testing

  • mise run pre-commit passes
  • cargo test -p openshell-cli
  • Integration test added for rejected OIDC refresh before sandbox mutation
  • E2E tests added/updated (not applicable; no sandbox infrastructure or policy change)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (not applicable; no architecture change)

Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>
@copy-pr-bot

copy-pr-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@elezar

elezar commented Aug 20, 2026

Copy link
Copy Markdown
Member

/ok-to-test f57c5f6

@elezar elezar added the test:e2e Requires end-to-end coverage label Aug 20, 2026
@github-actions

Copy link
Copy Markdown

Label test:e2e applied for f57c5f6. Open the existing run and click Re-run all jobs to execute with the label set. The run will execute the standard E2E suite after building the required gateway and supervisor images once. The matching required CI gate status on this PR will flip green automatically once the run finishes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:e2e Requires end-to-end coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants