Skip to content

fix(auth): report gateway authentication status#2435

Merged
drew merged 2 commits into
mainfrom
drew/fix-oidic-warnings
Jul 23, 2026
Merged

fix(auth): report gateway authentication status#2435
drew merged 2 commits into
mainfrom
drew/fix-oidic-warnings

Conversation

@drew

@drew drew commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

Make openshell status report gateway reachability and authentication independently, and fix Microsoft Entra OIDC refresh requests by resending the configured resource scopes. Centralize the non-interactive refresh-token exchange in openshell-sdk while keeping browser login and token persistence in the CLI.

Related Issue

N/A — no matching issue found.

Changes

  • Keep the public health check independent from authentication, then use the existing protected OpenShell.GetGatewayInfo capability query as the authentication probe.
  • Treat a successful capability query as authenticated and authorized, PermissionDenied as authenticated but unauthorized, and Unauthenticated as rejected credentials.
  • Report authenticated, failed, not-required, and unverified states separately from gateway reachability, including compatibility handling for gateways that predate GetGatewayInfo.
  • Extend SDK OIDC refresh input with scopes and reuse the SDK exchange from the CLI.
  • Preserve rotated refresh tokens in CLI gateway storage and add regression coverage for Entra-style scoped refresh.
  • Update architecture, published authentication and gateway-management docs, and CLI agent guidance.

Testing

  • mise run pre-commit passes
  • cargo test -p openshell-cli gateway_status passes (5 tests)
  • Unit tests added/updated
  • E2E tests added/updated (not applicable; this version adds no server API or authentication-middleware changes)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

@drew
drew requested review from a team, derekwaynecarr, maxamillion and mrunalp as code owners July 23, 2026 00:55

@elezar elezar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a general question. Should the openshell status command support JSON output? (This may already be covered by #1989.

Signed-off-by: Drew Newberry <anewberry@nvidia.com>
@drew

drew commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator Author

As a general question. Should the openshell status command support JSON output? (This may already be covered by #1989.

This looks covered by the other open PR.

@drew
drew force-pushed the drew/fix-oidic-warnings branch from fb982b6 to 4344a30 Compare July 23, 2026 16:04
@github-actions

Copy link
Copy Markdown

Signed-off-by: Drew Newberry <anewberry@nvidia.com>
@drew
drew added this pull request to the merge queue Jul 23, 2026
Merged via the queue into main with commit 59f7839 Jul 23, 2026
30 checks passed
@drew
drew deleted the drew/fix-oidic-warnings branch July 23, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants