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
78300dd to
d70a49b
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>
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
9f3c9560d. 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
9f3c9560d; standalone URL runtime passed 2,772 server tests (45 PostgreSQL-dependent tests skipped), 652 core tests, 336 Kubernetes-driver tests, and 300 supervisor tests.base_url.Live tests exercised supervisor Pod-IP routing with Host/SNI, rather than public DNS or an external ingress controller. New-head 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.