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

asf-gitbox-commits pushed a commit to branch atlas-2.6
in repository https://gitbox.apache.org/repos/asf/atlas.git

commit 23899b586a4497d62de160b3beb327afa9a633e4
Author: Ramachandran Krishnan <[email protected]>
AuthorDate: Thu Aug 20 16:17:53 2026 +0530

    ATLAS-5385: Rename header auth property keys for atlas-2.6
    
    Rename atlas.authn.header.* to atlas.authentication.method.header.* and
    colocate header auth examples with other authentication properties.
---
 distro/src/conf/atlas-application.properties         | 14 +++++++-------
 .../atlas/web/filters/AtlasHeaderPreAuthFilter.java  |  8 ++++----
 .../web/filters/AtlasHeaderPreAuthFilterTest.java    | 20 +++++++++-----------
 3 files changed, 20 insertions(+), 22 deletions(-)

diff --git a/distro/src/conf/atlas-application.properties 
b/distro/src/conf/atlas-application.properties
index 126143a204..2facfddb4d 100755
--- a/distro/src/conf/atlas-application.properties
+++ b/distro/src/conf/atlas-application.properties
@@ -167,6 +167,12 @@ 
atlas.authentication.method.file.filename=${sys:atlas.home}/conf/users-credentia
 #atlas.authentication.method.ldap.ad.user.searchfilter=(sAMAccountName={0})
 #atlas.authentication.method.ldap.ad.default.role=<default role>
 
+######### Header Based Authentication #########
+#atlas.authentication.method.header.enabled=false
+#atlas.authentication.method.header.username=username
+#atlas.authentication.method.header.roles=roles
+#atlas.authentication.method.header.request-id=requestid
+
 #########  JAAS Configuration ########
 
 #atlas.jaas.KafkaClient.loginModuleName = 
com.sun.security.auth.module.Krb5LoginModule
@@ -281,10 +287,4 @@ atlas.search.gremlin.enable=false
 
 ######### Skip check for the same attribute name in Parent type and Child type 
#########
 
-#atlas.skip.check.for.parent.child.attribute.name=true
-
-######### Header Based Authentication #########
-#atlas.authn.header.enabled=false
-#atlas.authn.header.username=x-awc-username
-#atlas.authn.header.roles=x-awc-roles
-#atlas.authn.header.requestid=x-awc-requestid
\ No newline at end of file
+#atlas.skip.check.for.parent.child.attribute.name=true
\ No newline at end of file
diff --git 
a/webapp/src/main/java/org/apache/atlas/web/filters/AtlasHeaderPreAuthFilter.java
 
b/webapp/src/main/java/org/apache/atlas/web/filters/AtlasHeaderPreAuthFilter.java
index 423995bc64..ca136d336c 100644
--- 
a/webapp/src/main/java/org/apache/atlas/web/filters/AtlasHeaderPreAuthFilter.java
+++ 
b/webapp/src/main/java/org/apache/atlas/web/filters/AtlasHeaderPreAuthFilter.java
@@ -50,10 +50,10 @@ import java.util.UUID;
 public class AtlasHeaderPreAuthFilter implements Filter {
     private static final Logger LOG = 
LoggerFactory.getLogger(AtlasHeaderPreAuthFilter.class);
 
-    public static final String PROP_HEADER_AUTH_ENABLED = 
"atlas.authn.header.enabled";
-    public static final String PROP_USERNAME_HEADER     = 
"atlas.authn.header.username";
-    public static final String PROP_ROLES_HEADER        = 
"atlas.authn.header.roles";
-    public static final String PROP_REQUEST_ID_HEADER   = 
"atlas.authn.header.requestid";
+    public static final String PROP_HEADER_AUTH_ENABLED = 
"atlas.authentication.method.header.enabled";
+    public static final String PROP_USERNAME_HEADER     = 
"atlas.authentication.method.header.username";
+    public static final String PROP_ROLES_HEADER        = 
"atlas.authentication.method.header.roles";
+    public static final String PROP_REQUEST_ID_HEADER   = 
"atlas.authentication.method.header.request-id";
     public static final String REQUEST_ID_ATTRIBUTE     = "atlas.request.id";
 
     private Configuration configuration;
diff --git 
a/webapp/src/test/java/org/apache/atlas/web/filters/AtlasHeaderPreAuthFilterTest.java
 
b/webapp/src/test/java/org/apache/atlas/web/filters/AtlasHeaderPreAuthFilterTest.java
index cd959aaa68..b74452e3a2 100644
--- 
a/webapp/src/test/java/org/apache/atlas/web/filters/AtlasHeaderPreAuthFilterTest.java
+++ 
b/webapp/src/test/java/org/apache/atlas/web/filters/AtlasHeaderPreAuthFilterTest.java
@@ -74,11 +74,11 @@ public class AtlasHeaderPreAuthFilterTest {
     public void testDoFilterEnabledWithUsernameAndRoles() throws Exception {
         
when(configuration.getBoolean(AtlasHeaderPreAuthFilter.PROP_HEADER_AUTH_ENABLED,
 false)).thenReturn(true);
         
when(configuration.getString(AtlasHeaderPreAuthFilter.PROP_USERNAME_HEADER, ""))
-                .thenReturn("x-user");
+                .thenReturn("X-Forwarded-User");
         
when(configuration.getString(AtlasHeaderPreAuthFilter.PROP_ROLES_HEADER, ""))
-                .thenReturn("x-roles");
-        when(request.getHeader("x-user")).thenReturn("alice");
-        when(request.getHeader("x-roles")).thenReturn("ROLE_ADMIN, ROLE_USER");
+                .thenReturn("X-Forwarded-Groups");
+        when(request.getHeader("X-Forwarded-User")).thenReturn("alice");
+        when(request.getHeader("X-Forwarded-Groups")).thenReturn("ROLE_ADMIN, 
ROLE_USER");
 
         try (MockedStatic<ApplicationProperties> appProps = 
org.mockito.Mockito.mockStatic(ApplicationProperties.class)) {
             
appProps.when(ApplicationProperties::get).thenReturn(configuration);
@@ -104,10 +104,10 @@ public class AtlasHeaderPreAuthFilterTest {
     public void testDoFilterEnabledWithoutUsernameDoesNotAuthenticate() throws 
IOException, ServletException {
         
when(configuration.getBoolean(AtlasHeaderPreAuthFilter.PROP_HEADER_AUTH_ENABLED,
 false)).thenReturn(true);
         
when(configuration.getString(AtlasHeaderPreAuthFilter.PROP_USERNAME_HEADER, ""))
-                .thenReturn("x-user");
+                .thenReturn("X-Forwarded-User");
         
when(configuration.getString(AtlasHeaderPreAuthFilter.PROP_ROLES_HEADER, ""))
-                .thenReturn("x-roles");
-        when(request.getHeader("x-user")).thenReturn("   ");
+                .thenReturn("X-Forwarded-Groups");
+        when(request.getHeader("X-Forwarded-User")).thenReturn("   ");
 
         try (MockedStatic<ApplicationProperties> appProps = 
org.mockito.Mockito.mockStatic(ApplicationProperties.class)) {
             
appProps.when(ApplicationProperties::get).thenReturn(configuration);
@@ -128,10 +128,8 @@ public class AtlasHeaderPreAuthFilterTest {
 
         
when(configuration.getBoolean(AtlasHeaderPreAuthFilter.PROP_HEADER_AUTH_ENABLED,
 false)).thenReturn(true);
         
when(configuration.getString(AtlasHeaderPreAuthFilter.PROP_USERNAME_HEADER, ""))
-                .thenReturn("x-user");
-        
when(configuration.getString(AtlasHeaderPreAuthFilter.PROP_ROLES_HEADER, ""))
-                .thenReturn("x-roles");
-        when(request.getHeader("x-user")).thenReturn("alice");
+                .thenReturn("X-Forwarded-User");
+        when(request.getHeader("X-Forwarded-User")).thenReturn("alice");
 
         try (MockedStatic<ApplicationProperties> appProps = 
org.mockito.Mockito.mockStatic(ApplicationProperties.class)) {
             
appProps.when(ApplicationProperties::get).thenReturn(configuration);

Reply via email to