Repository navigation
feat(auth): add discovery-only readers and workspace scopes - #4964
TaylorMutch wants to merge 6 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
052c76c to
e8603a5
Compare
2273f0d to
75d3340
Compare
89ea75b to
8df72ee
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
0baec0a to
78300dd
Compare
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>
78300dd to
d70a49b
Compare
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
bf9f55cdf. 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
service_auth_enabled = 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
Gateway routing opt-out validation: 2,767 combined-stack server tests passed (43 PostgreSQL-dependent tests skipped), all nine proxy tests passed, and strict all-target server/proxy Clippy passed. Full Helm tests, Markdown lint, Rust formatting, and whitespace checks passed.
Previous validation on main
e8ba30fde: standalone discovery passed 2,725 server tests (42 PostgreSQL-dependent tests skipped locally).Combined stack passed 2,761 server tests (43 PostgreSQL-dependent tests skipped), nine proxy tests, and 19 supervisor listener regressions. Strict all-target server/supervisor/proxy Clippy passed.
TypeScript SDK validation passed: protobuf generation/lint, lint, type checking, 207 tests, coverage, and build.
Helm lint and all three chart unit suites passed, including gateway TOML parsing, resource coherence, ownership, and supervisor scaling checks. Markdown lint and Rust formatting passed.
Compatibility regressions cover recorded replay URLs across origin/port changes and disabled ingress, existing TypeScript object shapes, auth-disabled loopback schemes, application-cookie preservation, and real-TLS discovery-certificate opt-in behavior.
Earlier local k3d validation covered dedicated/shared owner changes, HTTP/WebSockets, network-policy isolation, discovery withdrawal, and two proxy replicas. This revision has no new live-cluster or production-load qualification. New-head CI is pending.
Qualification limits
Live HA validation exercised supervisor process/Pod loss on a local k3d cluster. Whole-node failure, real network partitions, metric-driven HPA, sustained production load, and published release artifacts remain unqualified. Grant-file projection contributes to revocation propagation time. Both ingress paths now share the gateway hostname format and label generator. The same installation identity and public HTTPS domain/port preserve service URLs when switching ingress. Installation-status presentation (#4670) remains separate work. Live Kubernetes runs above preceded hostname integration; the naming and shutdown-fence integration is validated by focused Rust regressions.
The example Kubernetes HTTPRoute controller is a deferred compatibility POC outside this stack.
Checklist
PR dependency order: #4956 → #4963 → #4964 → #4957.