Casbin poc 2 -Alternate UI and db schema option#1416
Closed
deepaksftc wants to merge 17 commits intodevelopfrom
Closed
Casbin poc 2 -Alternate UI and db schema option#1416deepaksftc wants to merge 17 commits intodevelopfrom
deepaksftc wants to merge 17 commits intodevelopfrom
Conversation
Contributor
|
@Scott-James-Hurley @simonfernandes @deepaksftc Thanks for the insightful work. As of now, the stakeholders are reviewing at the current implementation of Dynamic Roles using tags. Until we have a decision from them, the POC's of Casbin and Casl can stay here as is. If there is a decision to go with Advanced dynamic roles, these POCs are going to be a GEM. Thank you again. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
#1410 is the main proof of concept for implementing Casbin in UOP. This POC covers an alternate approach for permissions management page UI and db schema from that of one covered in Casbin POC.
Motivation
Casbin would require a 'casbin_rule' table/view to do its internal logics, in which we have only limited columns with not-so user friendly naming. In the main Casbin POC PR, we have explored the option of storing the policies in JSON format within another table 'casbin_conditions' and then reference it in 'casbin_rule' default table. In this PR, we have tried to explore the possibility of having 'casbin_rule' as a view and have a more user friendly table 'policies' which can be mapped one to one from the fields in permissions management page table. The script for creating the 'casbin_rule' view will handle the conversion logic to transform the columns in 'policies' table to casbin required format which is needed for 'casbin_rule'. This could help us to avoid the conversion part of transforming to/from the JSON format while we need to get/save the individual attributes for a particular policy and could also increase the performance for each backend calls.
It covers the following use cases:
Use cases
Database
Added 'policies' table where,
Created a view which will transform the attributes and operators in 'policies' table to casbin required model. This view will just be used by casbin for its internal access checks.
Permissions management Page