vignesh-manel commented on code in PR #3852:
URL: https://github.com/apache/polaris/pull/3852#discussion_r2983728196
##########
polaris-core/src/main/java/org/apache/polaris/core/auth/AuthBootstrapUtil.java:
##########
@@ -104,6 +104,23 @@ public static PrincipalSecretsResult
createPolarisPrincipalForRealm(
rootContainer,
PolarisPrivilege.SERVICE_MANAGE_ACCESS);
+ // create the catalog_role_manager principal role for catalog admins to
list principal roles
+ PrincipalRoleEntity catalogRoleManagerPrincipalRole =
+ new PrincipalRoleEntity.Builder()
+ .setId(generateId(metaStoreManager, ctx))
+
.setName(PolarisEntityConstants.getNameOfCatalogRoleManagerPrincipalRole())
+ .setCreateTimestamp(System.currentTimeMillis())
+ .build();
+ metaStoreManager.createEntityIfNotExists(ctx, null,
catalogRoleManagerPrincipalRole);
+
+ // grant PRINCIPAL_ROLE_LIST on the rootContainer to the
catalogRoleManagerPrincipalRole
+ metaStoreManager.grantPrivilegeOnSecurableToRole(
+ ctx,
+ catalogRoleManagerPrincipalRole,
+ null,
+ rootContainer,
+ PolarisPrivilege.PRINCIPAL_ROLE_LIST);
Review Comment:
We are creating a principal role which as `PRINCIPAL_ROLE_LIST` and
assigning it to all principals which have `catalog_admin` catalog role, in a
way we are managing a catalog role(catalog_admin) by adding a new principal
role to provide access to principals - based on this I had named it
catalog_role_manager. Based on this functionality WDYT would be the right name
for this? I can update it accordingly
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]