feat(tui): add OIDC authentication support#1405
Merged
Merged
Conversation
|
Label |
Collaborator
|
/ok to test c1802d8 |
Move EdgeAuthInterceptor from openshell-cli to openshell-core so the TUI can use it without a circular dependency. The TUI now checks gateway metadata for OIDC auth mode, loads the stored bearer token, and injects it into gRPC requests via the shared interceptor. When switching gateways, the TUI dispatches on auth_mode to build either an mTLS or OIDC-authenticated channel. Expired tokens surface a clear error directing users to re-authenticate with `openshell gateway login`.
c1802d8 to
35a01f4
Compare
Collaborator
|
/ok to test 35a01f4 |
TaylorMutch
approved these changes
May 15, 2026
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.
Summary
Currently, when logged into a gateway configured with OIDC authn,
openshell termfails withmissing authorization header.Add OIDC authentication support to the
openshell termTUI. Previously the TUI only worked with mTLS-authenticated gateways — OIDC gateways would silently fail because no bearer token was injected into gRPC requests.EdgeAuthInterceptorfromopenshell-clitoopenshell-coreto avoid a circular dependency (CLI depends on TUI)openshell gateway loginRelated Issue
N/A
Changes
crates/openshell-core/src/auth.rs(new):EdgeAuthInterceptorwithnew()andnoop()constructorscrates/openshell-cli/src/tls.rs: Remove interceptor definition, import fromopenshell_core::authcrates/openshell-cli/src/main.rs: Build interceptor and pass toopenshell_tui::run()crates/openshell-tui/src/app.rs: Change client type toOpenShellClient<InterceptedService<Channel, EdgeAuthInterceptor>>crates/openshell-tui/src/lib.rs:run()accepts interceptor;connect_to_gateway()dispatches on auth mode; newbuild_oidc_channel()andbuild_mtls_channel()helpersTesting
mise run pre-commitpassesopenshell termwith mTLS gateway (no regression)openshell termwith OIDC gatewayChecklist