jjiang037 commented on code in PR #6085:
URL: https://github.com/apache/hive/pull/6085#discussion_r2373531244


##########
service/src/java/org/apache/hive/service/cli/thrift/ThriftHttpServlet.java:
##########
@@ -540,6 +553,54 @@ public String run() throws HttpAuthenticationException {
       }
     }
 
+    private void enforceLdapFilters(String shortName) throws 
HttpAuthenticationException {
+      boolean enableGroupCheck = hiveConf.getBoolVar(
+          
HiveConf.ConfVars.HIVE_SERVER2_LDAP_ENABLE_GROUP_CHECK_AFTER_KERBEROS);
+      if (!enableGroupCheck) {
+        LOG.debug("No LDAP group check is enabled; skipping.");
+        return;
+      }
+      // Check if this is a proxy user - we don't apply LDAP filters to proxy 
users
+      String proxyUser = SessionManager.getProxyUserName();
+      if (proxyUser != null && !proxyUser.isEmpty()) {
+        LOG.debug("Skipping LDAP filters for proxy user authentication");
+        return;
+      }
+
+      Filter filter = LdapAuthenticationProviderImpl.resolveFilter(hiveConf);

Review Comment:
   Extract them to 
https://github.com/apache/hive/pull/6085/commits/720b5b8f9f1515767f83f0c1dd7ae1b76733ff02#diff-b7ce549e080ea84afc3fb5a5b96e89c54c5a38a0ffeadb7aa715fe2c4adb1788



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to