top | item 30515656

(no title)

itsronenh | 4 years ago

Do package names have to match API routes? Can I create a policy that is shared by multiple endpoints?

discuss

order

gertd|4 years ago

Technically 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.

ogazitt|4 years ago

By 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|4 years ago

So this is basically a tool for generating and testing Rego policies from an OpenAPI spec. Very cool!

gertd|4 years ago

Endpoint wise you can have N.