Alternative to #5538: my/routes allowed-route manifest#5556
Merged
Conversation
dvdstelt
approved these changes
Jun 26, 2026
Alternative to #5538. Instead of leaking internal permission strings to ServicePulse, expose the concrete set of API routes the caller is allowed to reach, so the UI gates on a stable route contract rather than coupling to the permission catalogue. - Project the ASP.NET EndpointDataSource into a route⇒permission table and resolve per-request effective permissions, filtering the manifest to the routes the caller can reach. - Add the my/routes controller (served by every instance), route template normalization, and the manifest DTOs. - Remove the my/permissions endpoint, MeController, PermissionsResponse and the root-doc permission fields. - Add an admin role (read-all + manage config/admin-area resources, no message-triage write actions), sitting between reader and writer. - Acceptance, infrastructure and approval tests for the new surface, plus an anti-drift policy guard.
39c934b to
f644e7c
Compare
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.
Alternative to:
Instead of exposing ServiceControl's internal
instance:resource:actionpermission vocabulary (my/permissions/all+ a boolean summary), each instance exposes a singleGET /api/my/routesreturning the API routes the current token may call, as[{ method, urlTemplate }]. ServicePulse gates its UI on the HTTP routes it already calls, so it never has to learn or hand-maintain the permission grammar — the route is a public contract SP already depends on, so gating on it adds no new coupling.EndpointDataSourcemetadata the authorization middleware enforces (no hand-listed routes; can't drift from what's enforced).[Authorize(Policy=…)]is a known permission.Compare #5538 branch vs this branch: add-mypermissions-endpoint...spike/my-routes-manifest