News for hackers. Stuff that matters.
Re:Show HN: RBAC for your REST API in 2 minutes by itsronenh on Tuesday March 01, 2022 @10:55AM (#30515656)
Do package names have to match API routes? Can I create a policy that is shared by multiple endpoints?
Re:Show HN: RBAC for your REST API in 2 minutes by gertd on Tuesday March 01, 2022 @10:57AM (#30515673)
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.
Re:Show HN: RBAC for your REST API in 2 minutes by ogazitt on Tuesday March 01, 2022 @11:00AM (#30515731)
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.
Re:Show HN: RBAC for your REST API in 2 minutes by itsronenh on Tuesday March 01, 2022 @11:04AM (#30515802)
So this is basically a tool for generating and testing Rego policies from an OpenAPI spec. Very cool!
Re:Show HN: RBAC for your REST API in 2 minutes by gertd on Tuesday March 01, 2022 @10:59AM (#30515703)
Endpoint wise you can have N.