-
Notifications
You must be signed in to change notification settings - Fork 0
Adding Grantor Information in sys.babelfish_schema_permissions catalog #132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: bbf-database-permission-view
Are you sure you want to change the base?
Adding Grantor Information in sys.babelfish_schema_permissions catalog #132
Conversation
Signed-off-by: Shreya Rai <[email protected]>
…atabase_permissions
…atabase_permissions
…postgresql_modified_for_babelfish into database_permissions
Signed-off-by: Shreya Rai <[email protected]>
Signed-off-by: Shreya Rai <[email protected]>
* If the hook returns false, indicates that object-level and schema-level grants both are present and schema-level grant is revoked. | ||
* In such case we remove schema-level entry from the bbf_schema_permissions catalog but skip the execution of revoke as object-level grants exist. | ||
*/ | ||
if (update_bbf_schema_permissions_catalog_hook && !(*update_bbf_schema_permissions_catalog_hook) (this_privileges, istmt->is_grant, istmt->grantees, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need dialect check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes there is a dialect check inside the hook.
ReleaseSysCache(tuple); | ||
table_close(attRelation, RowExclusiveLock); | ||
table_close(relation, RowExclusiveLock); | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are inside FOR loop here? do we really want to exit early?
Description
The following PR adds grantor information in
sys.babelfish_schema_permissions
catalog, addressing a current limitation in Babelfish.The functionality is achieved by hook implementation and reversing the flow of GRANT / REVOKE statement in Babelfish. This enhancement enables users to view grantor of various permissions.
Another functionality added is the storage of database-level CONNECT permission granted to users. This PR also provides a distinction between the storage of normal permissions and permissions with grant option in
sys.babelfish_schema_permissions
catalog.Part of Jira - BABEL-5690
Extension PR : amazon-aurora/babelfish_extensions#73
Signed-off-by: Shreya Rai [email protected]