dimas-b commented on code in PR #3852:
URL: https://github.com/apache/polaris/pull/3852#discussion_r2983752415
##########
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:
My rationale: We should name the role according to the "job" its members
perform. `PRINCIPAL_ROLE_LIST` allows listing "principal" roles, in a way
managing "principal" roles, therefore I think `principal_role_manager` fits
this use case. `principal_role_reader` might be more precise.
--
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]