mneethiraj commented on code in PR #3928:
URL: https://github.com/apache/polaris/pull/3928#discussion_r2909476486


##########
extensions/auth/ranger/src/main/java/org/apache/polaris/extension/auth/ranger/RangerPolarisAuthorizerFactory.java:
##########
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.polaris.extension.auth.ranger;
+
+import io.smallrye.common.annotation.Identifier;
+import jakarta.annotation.PostConstruct;
+import jakarta.annotation.PreDestroy;
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.inject.Inject;
+import java.util.Properties;
+import org.apache.polaris.core.auth.PolarisAuthorizerFactory;
+import org.apache.polaris.core.config.RealmConfig;
+import org.apache.polaris.extension.auth.ranger.utils.RangerUtils;
+import org.apache.ranger.authz.api.RangerAuthzException;
+import org.apache.ranger.authz.embedded.RangerEmbeddedAuthorizer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@ApplicationScoped
+@Identifier("ranger")
+public class RangerPolarisAuthorizerFactory implements 
PolarisAuthorizerFactory {
+  private static final Logger LOG = 
LoggerFactory.getLogger(RangerPolarisAuthorizerFactory.class);
+
+  public static final String SERVICE_NAME_PROPERTY = 
"ranger.plugin.polaris.service.name";
+

Review Comment:
   @flyingImer  - updated configuration validation to fail authroizer factory 
initialzation when manadatory configuration is not found. If you are looking 
for a difference approach, can you please provide more guidance?
   
   Currently, empty `accessInfos` will result in the access to be denied (by 
Ranger policy engine). Are you suggesting to move this denial to 
RangerPolarisAuthorizer? Or should the authorizer allow the access, given no 
resource (target or secondary) has been given?



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