xunliu commented on code in PR #6575:
URL: https://github.com/apache/gravitino/pull/6575#discussion_r1981014472
##########
authorizations/authorization-ranger/src/test/java/org/apache/gravitino/authorization/ranger/integration/test/RangerHiveE2EIT.java:
##########
@@ -196,6 +198,39 @@ public void createCatalog() {
metalake.createCatalog(catalogName, Catalog.Type.RELATIONAL, provider,
"comment", properties);
catalog = metalake.loadCatalog(catalogName);
LOG.info("Catalog created: {}", catalog);
+
+ // Test to create catalog with uuid ranger plugin
+ Map<String, String> uuidProperties =
+ ImmutableMap.of(
+ HiveConstants.METASTORE_URIS,
+ HIVE_METASTORE_URIS,
+ IMPERSONATION_ENABLE,
+ "true",
+ AUTHORIZATION_PROVIDER,
+ "ranger",
+ RangerAuthorizationProperties.RANGER_SERVICE_TYPE,
+ "HadoopSQL",
+ RangerAuthorizationProperties.RANGER_ADMIN_URL,
+ RangerITEnv.RANGER_ADMIN_URL,
+ RangerAuthorizationProperties.RANGER_AUTH_TYPE,
+ RangerContainer.authType,
+ RangerAuthorizationProperties.RANGER_USERNAME,
+ RangerContainer.rangerUserName,
+ RangerAuthorizationProperties.RANGER_PASSWORD,
+ RangerContainer.rangerPassword,
+ RangerAuthorizationProperties.RANGER_SERVICE_CREATE_IF_ABSENT,
+ "true");
Review Comment:
Do we need to set a `BaseAuthorization.UUID` in the `uuidProperties`?
##########
authorizations/authorization-ranger/src/main/java/org/apache/gravitino/authorization/ranger/RangerAuthorizationPlugin.java:
##########
@@ -935,6 +980,17 @@ protected void
removePolicyByMetadataObject(AuthorizationMetadataObject authzMet
}
}
+ protected String getConfValue(Map<String, String> conf, String key, String
defaultValue) {
+ if (conf.containsKey(BaseCatalog.CATALOG_BYPASS_PREFIX + key)) {
+ return conf.get(BaseCatalog.CATALOG_BYPASS_PREFIX + key);
+ }
Review Comment:
Maybe `getByPassConfValue()` is a better function name?
--
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]