6 ms·
Do package names have to match API routes? Can I create a policy that is shared by multiple endpoints?
by itsronenh 5y ago
Do package names have to match API routes? Can I create a policy that is shared by multiple endpoints?
- ogazitt 5y agoBy convention, we generate a package for every API definition in the OpenAPI spec. But the calling application can decide which package to use when authorizing an operation, so you can use a single policy for multiple endpoints.
- itsronenh 5y agoSo this is basically a tool for generating and testing Rego policies from an OpenAPI spec. Very cool!
- gertd 5y agoTechnically names do not have to match, but it certainly makes it easier if you have a pattern to rely on when injecting authorization into a middleware layer.
- gertd 5y agoEndpoint wise you can have N.