feat(rbac): gate AI Edge (project HTTP proxies) — list, detail, edits, WAF, delete#1270
Open
yahyafakhroji wants to merge 4 commits into
Open
feat(rbac): gate AI Edge (project HTTP proxies) — list, detail, edits, WAF, delete#1270yahyafakhroji wants to merge 4 commits into
yahyafakhroji wants to merge 4 commits into
Conversation
🧪 Test Summary
📎 ArtifactsNo artifacts (all tests passed). |
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
Extends the RBAC module (merged in #1269) to the first project-scoped surface: AI Edge (HTTP proxies) and all its detail routes. This is the first consumer of
scope: 'project'and thenetworking.datumapis.comAPI group — the per-check engine handled both with zero module changes; only the call-sitegroup/scopediffer.All checks: group
networking.datumapis.com, namespacedefault,scope: 'project'(resolves to the project control-plane via theRbacProvideralready mounted on the project layout). WAF is gated on the separatetrafficprotectionpoliciesresource.Coverage
edge/index.tsx)httpproxies·listusePermissionCheck;useHttpProxies+ watch gatedenabled: canList;RestrictedStatewhen denied; permission-aware empty copyhttpproxies·createPermissionButton(disable + tooltip); empty action hidden when deniedhttpproxies·deleteedge/detail/layout.tsx)httpproxies·getgateRouteAccess→ discriminated-union +RestrictedState; proxy fetch skipped when denied; records denial metricProxyHeaderActions)httpproxies·deletePermissionButtondisable + tooltiphttpproxies·patchtrafficprotectionpolicies·patchhttpproxies·deleteDangerCard actionHidden+RestrictedOverlay/LoaderOverlayRead-only metric widgets (sparkline / edge-requests / WAF-events / active-POPs) are not separately gated — they're tied to proxy read access.
Notes / decisions
trafficprotectionpolicies), so "edit the proxy" isn't one permission — most edits usehttpproxies/patch, but the WAF dialog is gated independently. A role with proxy-edit but not WAF-edit (or vice versa) is handled accurately.httpproxies/createonly (the create flow also makes a traffic-protection policy; a divergent WAF-create permission would surface at submit time rather than blocking the whole flow).gateRouteAccess+ discriminated-union + wrapper/inner-component pattern (hooks stay unconditional), consistent with the org team-detail loaders.RbacService.resolveBaseURLusesprojectId(notorganizationId) to build the base, so the loader passesprojectIdas the org-id arg — verified harmless for project scope.httpproxies/patchchecks across the overview cards into a single request (no N+1).