<#6190 Flyte Admin RBAC + Project/Domain Isolation...
# flyte-github
c
#6190 Flyte Admin RBAC + Project/Domain Isolation Pull request opened by Sovietaced ## Tracking issue Closes: • #5189 • #4622 Related: #5871 ## Why are the changes needed? See: #5871 ## What changes were proposed in this pull request? This pull request adds an optional rbac/authorization interceptor. This interceptor does the following: 1. Attempts to derive roles from the tokens based on the configuration 2. Evaluates whether the target RPC is allowed to be called based on the authorization policy rules associated with any matching roles. 3. Generates an isolation context (ie. what is the user's resource scope based on their roles) and adds that to the go context for use in the DB layer. This pull request also modified the DB layer such that mutative operations on resources are validated against the isolation context scope (if present) and filters resources based on the isolation context scope (if present). There are key implementation details where SQL where clauses are carefully injected into queries being made against the DB. ## How was this patch tested? Unit tests. I could add unit tests to the DB layer but this would require a lot of coverage. This has been tested end to end by the community. ### Setup process ### Screenshots ## Check all the applicable boxes • I updated the documentation accordingly. • All new and existing tests passed. • All commits are signed-off. ## Related PRs ## Docs link ### Summary by Bito This PR implements Role-Based Access Control (RBAC) and resource isolation in Flyte Admin, introducing an authorization interceptor for validating user roles and permissions. It enhances fine-grained access control at project and domain levels, refactors interceptor logic, adds new compiled types for policies and rules, and improves code clarity while removing redundant custom JSON marshalling functions from the authorization configuration. Unit tests added: True Estimated effort to review (1-5, lower is better): 5 flyteorg/flyte