Repository navigation
feat(auth): authenticate gateway-mediated application requests - #4963
TaylorMutch wants to merge 11 commits into
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
🌿 Preview your docs: https://nvidia-preview-pr-4963.docs.buildwithfern.com/openshell |
18b394a to
ce2a99e
Compare
2574b9a to
70e365e
Compare
ce2a99e to
de94456
Compare
30cf9ce to
6b2fe9c
Compare
de94456 to
3b08d4c
Compare
6b2fe9c to
dae4a9d
Compare
c35e581 to
caacd27
Compare
66220a7 to
3dc01d7
Compare
c37b455 to
dd566cd
Compare
b71991c to
ad8be4d
Compare
00061b6 to
acc3754
Compare
Compatibility review (advisory)New or updated breaking changes; see the full report for all findings. 1. api-behavior — No explicit risk acceptance foundTLS loopback gateways now advertise
2. api-behavior — No explicit risk acceptance foundThe supervisor application listener now drops every
Review details
Advisory review; publication gates are unchanged. |
433b9b9 to
35e2d05
Compare
5f66489 to
2bc4518
Compare
Compatibility review (advisory)New or updated breaking changes; see the full report for all findings. 1. helm — No explicit risk acceptance foundhelm upgrade --reuse-values previously accepted saved chart values but now renders service_auth_enabled = "" when the new server.serviceAuthEnabled key is absent.
Review details
Advisory review; publication gates are unchanged. |
2bc4518 to
f79878c
Compare
35e2d05 to
c503a94
Compare
e5927f4 to
dfa898d
Compare
b7042a9 to
1e069a1
Compare
dfa898d to
c02b593
Compare
|
/ok to test c02b593 |
|
/ok to test 900920c |
|
/ok to test 240aa0f |
|
/ok to test 1f856fa |
Compatibility review (advisory)New or updated breaking changes; see the full report for all findings. 1. api-behavior — No explicit risk acceptance foundThe supervisor application listener previously forwarded
Review details
Advisory review; publication gates are unchanged. |
|
/ok to test adda68a |
Require configured gateway authentication for application HTTP requests and WebSocket upgrades, with or without the independent app listener. Add browser sessions, application credential separation, shared revocation, request authorization, documentation, and browser coverage. Closes #4722 Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
Summary
Opt in to authentication and authorization for gateway-mediated application HTTP requests and WebSocket upgrades using
enable_gateway_service_auth = truein[openshell.gateway]. The default is false, preserving existing application routing. This setting is independent of the supervisor app listener and compute driver.Based on main at
90e34ad10.Related Issue
Closes #4722. Part of RFC 0017.
Changes
Require exact HTTPS control-plane origins in
[openshell.gateway].service_auth_login_originsfor browser login. The empty default disables browser login while retaining bearer and mTLS application access.Atomically promote pending browser sessions without an extra capacity slot, and fence cleanup with resource-version claims.
Log service authentication as enabled/disabled only when gateway-mediated service routing is enabled.
Apply service authentication and mount
/auth/servicesonly while gateway service routing is enabled.enable_gateway_service_routing = falsedisables the gateway application path regardless ofenable_gateway_service_auth.Add
enable_gateway_service_auth(default false),--enable-gateway-service-auth true,OPENSHELL_ENABLE_GATEWAY_SERVICE_AUTH=true, and HelmgatewayConfig."openshell.gateway".enable_gateway_service_auth. Explicit false overrides are supported.Preserve existing forwarding, application-owned paths, headers, and cookies when service authentication is disabled.
Store browser application-session tokens through the credential issuer using an explicit session owner, preserving existing backend scopes, opaque handles, and expiration checks.
Resolve browser login origins through the gateway route index for both readable and hashed service hosts, preserving workspace authorization and the control-plane login boundary.
Apply gateway identity, workspace access, and forwarding role/scope authorization before upstream connection.
Add browser login with single-use bootstrap codes and bounded Secure/HttpOnly/SameSite=Strict host-only sessions.
Use configured credential storage for sessions and shared revocation across gateway replicas.
Separate gateway credentials from application bearer tokens/cookies, strip reserved credentials, and enforce origin/Fetch Metadata protections.
Configuration
[openshell.gateway]→enable_gateway_service_auth = true--enable-gateway-service-auth=trueOPENSHELL_ENABLE_GATEWAY_SERVICE_AUTH=truegatewayConfig."openshell.gateway".enable_gateway_service_auth: trueenable_gateway_service_authdefaults tofalse. Precedence is CLI > environment > TOML > default.404; do not mount/auth/servicesBrowser login additionally requires an explicit trusted origin list:
The default empty list disables browser login. Include exact public origins and nonstandard ports on every replica. Wildcards, credentials, paths, queries, and fragments are rejected. Bearer and mTLS application access do not require this setting. Helm uses
gatewayConfig."openshell.gateway".service_auth_login_origins.These flags are independent of
supervisor.app_listener.enabled. Direct app-listener access delegates authentication to the ingress provider/application.Release Notes
Gateway-mediated application authentication is opt-in through
[openshell.gateway].enable_gateway_service_auth(defaultfalse), independently of the app listener.Compatibility
With service authentication disabled, configuring mTLS, operator auth, or OIDC preserves existing loopback HTTP URLs. Enabling service authentication selects HTTPS when gateway TLS is configured. Direct supervisor ingress strips only the two gateway service session/login cookies; other application cookies retain their behavior.
Testing
No live-cluster E2E was rerun for these application-auth changes. Current-head GitHub CI is pending.
Qualification limits
Live Kubernetes qualification covers dedicated/shared supervisors, graceful shared-owner replacement, gateway outage, and policy isolation. Hashed URL/public-port behavior is covered by unit tests. Whole-node failure, real network partitions, metric-driven HPA, sustained production load, external ingress/DNS automation, and published release artifacts remain unqualified. Installation-status presentation (#4670) remains separate work. The example Kubernetes HTTPRoute controller remains a separate compatibility POC.
Checklist
PR dependency order: #4963 → #4964 → #4957.