This is an automated email from the ASF dual-hosted git repository.

pifta pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 7f89996cbc5 HDDS-13344. Fix ProxyUserAuthenticationFilter addition in 
HttpServer2 (#8710)
7f89996cbc5 is described below

commit 7f89996cbc54c537c9e31ab817408483ba6053ce
Author: Zita Dombi <[email protected]>
AuthorDate: Wed Sep 3 00:51:15 2025 +0200

    HDDS-13344. Fix ProxyUserAuthenticationFilter addition in HttpServer2 
(#8710)
---
 .../java/org/apache/hadoop/hdds/server/http/HttpServer2.java  | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git 
a/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/http/HttpServer2.java
 
b/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/http/HttpServer2.java
index 2b891150d53..151af357da1 100644
--- 
a/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/http/HttpServer2.java
+++ 
b/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/http/HttpServer2.java
@@ -645,13 +645,12 @@ private void initializeWebServer(Builder builder) throws 
IOException {
           LegacyHadoopConfigurationSource.asHadoopConfiguration(builder.conf);
       Map<String, String> filterConfig = getFilterConfigMap(hadoopConf,
           builder.authFilterConfigurationPrefix);
+      // create copy of the config with each <prefix>.<key> also added as 
hadoop.http.authentication.<key>
+      // (getFilterConfigMap removes prefix)
+      OzoneConfiguration copy = new OzoneConfiguration(hadoopConf);
+      filterConfig.forEach((k, v) -> copy.set("hadoop.http.authentication." + 
k, v));
       for (FilterInitializer c : initializers) {
-        if ((c instanceof AuthenticationFilterInitializer) && 
builder.securityEnabled) {
-          addFilter("authentication",
-              AuthenticationFilter.class.getName(), filterConfig);
-        } else {
-          c.initFilter(this, hadoopConf);
-        }
+        c.initFilter(this, copy);
       }
     }
 


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

Reply via email to