You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(access-control): add public path helpers #606
Apps need to ask "may this caller do this on that path?" and "what is the path of this resource?". There is no public API for either, so they use internals that won't survive the move to Connexion 3 (#188). cloud-registry's may_read_service calls the private _enforces_access_control; its permissions.py and service_limits.py derive the API base path from blueprint prefixes and scan endpoint names at startup. trs-filer needs the same for its tools.
Proposal
Public is_permitted_for(path, method): the policy decision for a path other than the current request's, for the current caller.
Helpers for the API base path and for a resource's path, usable during a request and at startup, when there is no request.
A {base_path} placeholder in configured policies, so a deployment or spec version change doesn't mean rewriting every rule.
Docs: access-control page, with examples.
Acceptance criteria
Tests: permitted and denied, unauthenticated, several API base paths, use at startup; 100% coverage.
The helpers don't expose Flask or Connexion types, so their signatures stay at 1.0.
Activity