Open arielshaqed opened 2 months ago
i would like to pick up this one.
All yours @Crossbears - feel free to ask here if you need any guidance
@Crossbears are you still on it?
I can take it with some help. @arielshaqed what map did you have in mind?
If I understand correctly we need to extract the mapping between operation handler and the permissions they require, in a way that can be used by both code and documentation.
I thought of creating a map that maps operation handler (or operationId) to a structure like permission node, with Resource being an enum (for arn type) or function pointer that can be used to generate the arn according to input. Then this structure can be used to generate the permission node that authorize() requires.
Anyway, input will be appreciated.
docs/security/rbac.md contains a description of required permissions but some calls are missing. AFAIK it is manually generated, so naturally it is out of date.
Update it to current state. If possible, refactor controller.go and somehow auto-generate it.
One way to refactor would be to use a map of permissions to pass to c.authorize. Then write code to generate a nice Markdown table from a new lakeFS command.