Repository navigation
feat(auth): add discovery-only readers and workspace scopes - #4964
TaylorMutch wants to merge 7 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-4964.docs.buildwithfern.com/openshell |
18b394a to
ce2a99e
Compare
6d1fb23 to
9b730e6
Compare
ce2a99e to
de94456
Compare
8fef4ac to
8d568c1
Compare
de94456 to
3b08d4c
Compare
8d568c1 to
de13e31
Compare
c35e581 to
caacd27
Compare
de13e31 to
05974d6
Compare
caacd27 to
6e5245e
Compare
05974d6 to
2441c08
Compare
6e5245e to
c37b455
Compare
2441c08 to
1c8e5a4
Compare
c37b455 to
dd566cd
Compare
5ec14a7 to
d4a1630
Compare
00061b6 to
acc3754
Compare
d4a1630 to
a3be433
Compare
7224961 to
5f66489
Compare
8df72ee to
a18cc74
Compare
Compatibility review (advisory)New or updated breaking changes; see the full report for all findings. 1. rust-sdk — No explicit risk acceptance foundGetServiceRouteSnapshotRequest and WatchServiceRoutesRequest previously allowed exhaustive literals containing only workspace_scope; both now require a workspaces field.
2. typescript-sdk — No explicit risk acceptance foundComplete objects typed as the exported GetServiceRouteSnapshotRequest or WatchServiceRoutesRequest previously needed no workspaces property but now require workspaces: string[].
3. api-behavior — No explicit risk acceptance foundA trusted OU=discovery certificate previously authenticated as an ordinary mTLS user but now becomes a discovery-only principal even when discovery_grants_file is unset.
Review details
Advisory review; publication gates are unchanged. |
a18cc74 to
df8f36d
Compare
2bc4518 to
f79878c
Compare
5a248b8 to
0baec0a
Compare
0b04cc3 to
c0123e1
Compare
78300dd to
d70a49b
Compare
|
/ok to test 36a4c97 |
|
/ok to test fdccee0 |
|
/ok to test fe3b0bb |
Implement discovery-only certificate grants, bounded single/set/all workspace views, and live grant and certificate expiry checks. Preserve existing user authorization and reject discovery credentials on other APIs and application requests. Closes #4668 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>
|
/ok to test 0309cf2 |
Summary
Allow noninteractive discovery consumers to read routes for one workspace, a selected set, or all active workspaces using narrowly authorized certificate-bound identities.
Based on main at
df6a799eb. Stacked onfeat/4722-gateway-service-auth/TaylorMutch.Related Issue
Closes #4668. Part of RFC 0017.
Changes
Scope discovery-only credentials to the separate
openshell.v1.ServiceDiscoveryservice and apply discovery admission budgets to single, finite, and all-workspace selections.Add administrator-managed discovery grants bound to trusted OU=discovery certificates without operator credentials or workspace membership.
Authorize only snapshot/watch RPCs; deny general resource APIs, mutations, credentials, and supervisor APIs. Discovery-only credentials do not satisfy gateway application authentication when
enable_gateway_service_auth = true; that independent flag defaults to false, preserving legacy application routing.Bound and validate workspace selection and aggregate snapshots, preserving existing user authorization and workspace lifecycle handling.
Reauthorize watches against grant changes and certificate expiry; document file reload, renewal, and revocation propagation.
Release Notes
Compatibility
discovery_grants_fileexplicitly enables discovery-only certificate classification. Without it, an existingOU=discoverycertificate retains ordinary mTLS behavior. Once configured, missing, invalid, or revoked grants fail closed. The added workspace selector fields are additive protobuf fields; ordinary SDK request initialization and single-workspace calls remain compatible.Testing
Canonical Helm service-auth configuration passed the full chart/runtime-parser suite and final combined-chart tests, generated Helm docs, and Markdown lint. Tests cover the runtime default plus explicit
true/falseingatewayConfig."openshell.gateway".enable_gateway_service_auth.Renamed the auth setting consistently across TOML, CLI, environment, Helm, tests, man page, and docs. Standalone auth-stage server tests (2,822 passed; 51 PostgreSQL-dependent tests skipped), combined-stack server/proxy tests, strict Clippy, full Helm runtime validation, generated docs, Markdown lint, and formatting passed. Default remains
false; no live E2E was rerun for this configuration-only rename.Rebased all five branches onto main
df6a799eb, preserving the SPIFFE provider-token limiter and application-auth peer metadata. Branch ancestry, patch scope, and frozen Python/Go SDK checks passed.Standalone URL PR: 2,801 server tests (50 PostgreSQL-dependent tests skipped), 650 core tests, 336 Kubernetes-driver tests, 300 supervisor tests, and 409 CLI library tests passed.
Combined auth/discovery-reader/proxy stack: 2,831 server tests (51 PostgreSQL-dependent tests skipped) and all nine proxy tests passed. Strict all-target Clippy passed for server, core, Kubernetes driver, supervisor, CLI, and proxy.
Full Helm suites passed for the URL/Helm follow-up, including rendered TOML, resource coherence, ownership, and scaling. The combined stack passed all 500 gateway-chart unit tests. Generated Helm docs, Markdown/MDX lint, Rust formatting, and whitespace checks passed.
Fresh live k3d shared/push/graceful E2E passed on the rebased URL/Helm stage with matching locally built images: Pod-IP ingress without app Services, HTTP/WebSockets, Host/SNI, NetworkPolicy, withdrawal/re-exposure, takeover preserving workload identity/process/memory, and listener-disabled gateway fallback using
enable_gateway_service_routing: true. The isolated release and namespace were removed.Dedicated, poll, abrupt-loss, and external-ingress scenarios were not rerun for these review fixes. 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: #4956 → #4963 → #4964 → #4957.