RussellSpitzer commented on code in PR #165:
URL: https://github.com/apache/polaris/pull/165#discussion_r1730515013


##########
polaris-service/src/main/java/io/polaris/service/catalog/BasePolarisCatalog.java:
##########
@@ -897,10 +898,19 @@ private void validateLocationForTableLike(
           // }
         },
         () -> {
-          if (location.startsWith("file:") || location.startsWith("http")) {
-            throw new ForbiddenException(
-                "Invalid location '%s' for identifier '%s': File locations are 
not allowed",
-                location, identifier);
+          List<String> allowedStorageTypes =
+              callContext
+                  .getPolarisCallContext()
+                  .getConfigurationStore()
+                  .getConfiguration(
+                      callContext.getPolarisCallContext(),
+                      PolarisConfiguration.SUPPORTED_CATALOG_STORAGE_TYPES);
+          if 
(!allowedStorageTypes.contains(StorageConfigInfo.StorageTypeEnum.FILE.name())) {

Review Comment:
   I wonder if we should just have a list of "allowed prefixes" as well. May be 
easier than special casing this.



-- 
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]

Reply via email to