You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by ma...@apache.org on 2026/04/21 00:40:38 UTC
(ranger) branch ranger-2.9 updated (becabf9a2 -> 050771e00)
This is an automated email from the ASF dual-hosted git repository.
mneethiraj pushed a change to branch ranger-2.9
in repository https://gitbox.apache.org/repos/asf/ranger.git
from becabf9a2 RANGER-5549: replace use of com.kstruct.gethostname4j library (#911)
new 1c7487503 RANGER-5552: Remove ozone-2.1.0-rc repository from pom.xml (#914)
new 7fbd60313 RANGER-5551: TestRangerOzoneAuthorizer should use builder for RequestContext (#913)
new 53d5ce331 RANGER-5538: username set incorrectly (#908)
new 050771e00 RANGER-5546: update Polaris service-def resource label from Root to Realm Identifier (#919)
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../service-defs/ranger-servicedef-polaris.json | 4 ++--
.../authorizer/TestRangerOzoneAuthorizer.java | 28 ++++++++++++++--------
pom.xml | 5 ----
.../web/filter/RangerKRBAuthenticationFilter.java | 7 ------
4 files changed, 20 insertions(+), 24 deletions(-)
(ranger) 02/04: RANGER-5551: TestRangerOzoneAuthorizer should use builder for RequestContext (#913)
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
mneethiraj pushed a commit to branch ranger-2.9
in repository https://gitbox.apache.org/repos/asf/ranger.git
commit 7fbd60313b9819523919f201a3d97c74ece23d4e
Author: Abhishek Pal <pa...@gmail.com>
AuthorDate: Fri Apr 17 11:26:29 2026 +0530
RANGER-5551: TestRangerOzoneAuthorizer should use builder for RequestContext (#913)
* RANGER-5551: Update TestRangerOzoneAuthorizer to use builder for RequestContext
* Address review comments
* Address checkstyle issues
Co-authored-by: Doroszlai, Attila <64...@users.noreply.github.com>
---------
Co-authored-by: Doroszlai, Attila <64...@users.noreply.github.com>
(cherry picked from commit 09aac5df1be54a36012c9d065a714c0a533e94b3)
---
.../authorizer/TestRangerOzoneAuthorizer.java | 28 ++++++++++++++--------
1 file changed, 18 insertions(+), 10 deletions(-)
diff --git a/plugin-ozone/src/test/java/org/apache/ranger/authorization/ozone/authorizer/TestRangerOzoneAuthorizer.java b/plugin-ozone/src/test/java/org/apache/ranger/authorization/ozone/authorizer/TestRangerOzoneAuthorizer.java
index df3aa65ac..1f365dd61 100644
--- a/plugin-ozone/src/test/java/org/apache/ranger/authorization/ozone/authorizer/TestRangerOzoneAuthorizer.java
+++ b/plugin-ozone/src/test/java/org/apache/ranger/authorization/ozone/authorizer/TestRangerOzoneAuthorizer.java
@@ -69,6 +69,14 @@ public class TestRangerOzoneAuthorizer {
private final OzoneGrant grantList = new OzoneGrant(new HashSet<>(Arrays.asList(vol1, buck1)), Collections.singleton(IAccessAuthorizer.ACLType.LIST));
private final OzoneGrant grantRead = new OzoneGrant(Collections.singleton(key1), Collections.singleton(IAccessAuthorizer.ACLType.READ));
+ private final RequestContext.Builder reqCtxBuilder = RequestContext.newBuilder()
+ .setHost(hostname)
+ .setIp(ipAddress)
+ .setClientUgi(user1)
+ .setServiceId(OZONE_SERVICE_ID)
+ .setAclType(IAccessAuthorizer.ACLIdentityType.ANONYMOUS)
+ .setOwnerName(OWNER_NAME);
+
@BeforeAll
public static void setUpBeforeClass() {
RangerPluginConfig pluginConfig = new RangerPluginConfig(RANGER_SERVICE_TYPE, null, RANGER_APP_ID, null, null, null); // loads ranger-ozone-security.xml
@@ -108,10 +116,10 @@ public void testAssumeRoleWithEmptyGrants() throws Exception {
assertEquals(RangerInlinePolicy.Mode.INLINE, inlinePolicy.getMode());
assertNotNull(inlinePolicy.getGrants());
- RequestContext ctxListWithoutSessionPolicy = new RequestContext(hostname, ipAddress, user1, OZONE_SERVICE_ID, IAccessAuthorizer.ACLIdentityType.ANONYMOUS, IAccessAuthorizer.ACLType.LIST, OWNER_NAME);
- RequestContext ctxReadWithoutSessionPolicy = new RequestContext(hostname, ipAddress, user1, OZONE_SERVICE_ID, IAccessAuthorizer.ACLIdentityType.ANONYMOUS, IAccessAuthorizer.ACLType.READ, OWNER_NAME);
- RequestContext ctxListWithSessionPolicy = new RequestContext(hostname, ipAddress, user1, OZONE_SERVICE_ID, IAccessAuthorizer.ACLIdentityType.ANONYMOUS, IAccessAuthorizer.ACLType.LIST, OWNER_NAME, false, sessionPolicy);
- RequestContext ctxReadWithSessionPolicy = new RequestContext(hostname, ipAddress, user1, OZONE_SERVICE_ID, IAccessAuthorizer.ACLIdentityType.ANONYMOUS, IAccessAuthorizer.ACLType.READ, OWNER_NAME, false, sessionPolicy);
+ RequestContext ctxListWithoutSessionPolicy = reqCtxBuilder.setAclRights(IAccessAuthorizer.ACLType.LIST).build();
+ RequestContext ctxReadWithoutSessionPolicy = reqCtxBuilder.setAclRights(IAccessAuthorizer.ACLType.READ).build();
+ RequestContext ctxListWithSessionPolicy = reqCtxBuilder.setAclRights(IAccessAuthorizer.ACLType.LIST).setRecursiveAccessCheck(false).setSessionPolicy(sessionPolicy).build();
+ RequestContext ctxReadWithSessionPolicy = reqCtxBuilder.setAclRights(IAccessAuthorizer.ACLType.READ).setRecursiveAccessCheck(false).setSessionPolicy(sessionPolicy).build();
// user1 doesn't have access without session-policy
assertFalse(ozoneAuthorizer.checkAccess(vol1, ctxListWithoutSessionPolicy), "session-policy should not allow list on volume vol1");
@@ -144,10 +152,10 @@ public void testAssumeRoleWithNullGrants() throws Exception {
assertEquals(RangerInlinePolicy.Mode.INLINE, inlinePolicy.getMode());
assertNull(inlinePolicy.getGrants());
- RequestContext ctxListWithoutSessionPolicy = new RequestContext(hostname, ipAddress, user1, OZONE_SERVICE_ID, IAccessAuthorizer.ACLIdentityType.ANONYMOUS, IAccessAuthorizer.ACLType.LIST, OWNER_NAME);
- RequestContext ctxReadWithoutSessionPolicy = new RequestContext(hostname, ipAddress, user1, OZONE_SERVICE_ID, IAccessAuthorizer.ACLIdentityType.ANONYMOUS, IAccessAuthorizer.ACLType.READ, OWNER_NAME);
- RequestContext ctxListWithSessionPolicy = new RequestContext(hostname, ipAddress, user1, OZONE_SERVICE_ID, IAccessAuthorizer.ACLIdentityType.ANONYMOUS, IAccessAuthorizer.ACLType.LIST, OWNER_NAME, false, sessionPolicy);
- RequestContext ctxReadWithSessionPolicy = new RequestContext(hostname, ipAddress, user1, OZONE_SERVICE_ID, IAccessAuthorizer.ACLIdentityType.ANONYMOUS, IAccessAuthorizer.ACLType.READ, OWNER_NAME, false, sessionPolicy);
+ RequestContext ctxListWithoutSessionPolicy = reqCtxBuilder.setAclRights(IAccessAuthorizer.ACLType.LIST).build();
+ RequestContext ctxReadWithoutSessionPolicy = reqCtxBuilder.setAclRights(IAccessAuthorizer.ACLType.READ).build();
+ RequestContext ctxListWithSessionPolicy = reqCtxBuilder.setAclRights(IAccessAuthorizer.ACLType.LIST).setRecursiveAccessCheck(false).setSessionPolicy(sessionPolicy).build();
+ RequestContext ctxReadWithSessionPolicy = reqCtxBuilder.setAclRights(IAccessAuthorizer.ACLType.READ).setRecursiveAccessCheck(false).setSessionPolicy(sessionPolicy).build();
// user1 doesn't have access without session-policy
assertFalse(ozoneAuthorizer.checkAccess(vol1, ctxListWithoutSessionPolicy), "session-policy should not allow list on volume vol1");
@@ -184,8 +192,8 @@ public void testAssumeRoleWithGrants() throws Exception {
assertTrue(inlinePolicy.getGrants().contains(new RangerInlinePolicy.Grant(null, new HashSet<>(Arrays.asList("volume:vol1", "bucket:vol1/buck1")), Collections.singleton("list"))));
assertTrue(inlinePolicy.getGrants().contains(new RangerInlinePolicy.Grant(null, Collections.singleton("key:vol1/buck1/key1"), Collections.singleton("read"))));
- RequestContext ctxListWithSessionPolicy = new RequestContext(hostname, ipAddress, user1, OZONE_SERVICE_ID, IAccessAuthorizer.ACLIdentityType.ANONYMOUS, IAccessAuthorizer.ACLType.LIST, OWNER_NAME, false, sessionPolicy);
- RequestContext ctxReadWithSessionPolicy = new RequestContext(hostname, ipAddress, user1, OZONE_SERVICE_ID, IAccessAuthorizer.ACLIdentityType.ANONYMOUS, IAccessAuthorizer.ACLType.READ, OWNER_NAME, false, sessionPolicy);
+ RequestContext ctxListWithSessionPolicy = reqCtxBuilder.setAclRights(IAccessAuthorizer.ACLType.LIST).setRecursiveAccessCheck(false).setSessionPolicy(sessionPolicy).build();
+ RequestContext ctxReadWithSessionPolicy = reqCtxBuilder.setAclRights(IAccessAuthorizer.ACLType.READ).setRecursiveAccessCheck(false).setSessionPolicy(sessionPolicy).build();
// user1 should have access with sessionPolicy
assertTrue(ozoneAuthorizer.checkAccess(vol1, ctxListWithSessionPolicy), "session-policy should allow list on volume vol1");
(ranger) 01/04: RANGER-5552: Remove ozone-2.1.0-rc repository from pom.xml (#914)
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
mneethiraj pushed a commit to branch ranger-2.9
in repository https://gitbox.apache.org/repos/asf/ranger.git
commit 1c7487503cff238950b8ca4363dc17ae8e4c84b1
Author: Abhishek Kumar <ab...@apache.org>
AuthorDate: Mon Apr 13 10:32:37 2026 -0700
RANGER-5552: Remove ozone-2.1.0-rc repository from pom.xml (#914)
(cherry picked from commit 8e81392bdfc85244344d3ae92bb52a42dc015476)
---
pom.xml | 5 -----
1 file changed, 5 deletions(-)
diff --git a/pom.xml b/pom.xml
index 811ae6802..e106dca53 100755
--- a/pom.xml
+++ b/pom.xml
@@ -763,11 +763,6 @@
<name>jetbrains-intellij-dependencies</name>
<url>https://packages.jetbrains.team/maven/p/ij/intellij-dependencies</url>
</repository>
- <repository>
- <id>ozone-2.1.0-rc</id>
- <name>ozone-2.1.0-rc</name>
- <url>https://repository.apache.org/content/repositories/orgapacheozone-1061</url>
- </repository>
</repositories>
<distributionManagement>
<repository>
(ranger) 04/04: RANGER-5546: update Polaris service-def resource label from Root to Realm Identifier (#919)
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
mneethiraj pushed a commit to branch ranger-2.9
in repository https://gitbox.apache.org/repos/asf/ranger.git
commit 050771e004153268295fc5ea9cb7d2fa7e417695
Author: Madhan Neethiraj <ma...@apache.org>
AuthorDate: Mon Apr 20 14:22:51 2026 -0700
RANGER-5546: update Polaris service-def resource label from Root to Realm Identifier (#919)
(cherry picked from commit 1134f613c6549c75010c8e7c0ab49b9817d41f8a)
---
.../src/main/resources/service-defs/ranger-servicedef-polaris.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/agents-common/src/main/resources/service-defs/ranger-servicedef-polaris.json b/agents-common/src/main/resources/service-defs/ranger-servicedef-polaris.json
index 3ae674fb3..b0103b840 100644
--- a/agents-common/src/main/resources/service-defs/ranger-servicedef-polaris.json
+++ b/agents-common/src/main/resources/service-defs/ranger-servicedef-polaris.json
@@ -8,8 +8,8 @@
{
"itemId": 1,
"name": "root",
- "label": "Root",
- "description": "Root",
+ "label": "Realm Identifier",
+ "description": "Realm Identifier",
"parent": "",
"level": 10,
"isValidLeaf": true,
(ranger) 03/04: RANGER-5538: username set incorrectly (#908)
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
mneethiraj pushed a commit to branch ranger-2.9
in repository https://gitbox.apache.org/repos/asf/ranger.git
commit 53d5ce33152528094ab504d8ed8632af22ccb77a
Author: Vyom Mani Tiwari <vy...@gmail.com>
AuthorDate: Mon Apr 20 14:16:21 2026 +0530
RANGER-5538: username set incorrectly (#908)
(cherry picked from commit 3442ce19c84a953549bd1d5274b2b945e6e6fbd0)
---
.../ranger/security/web/filter/RangerKRBAuthenticationFilter.java | 7 -------
1 file changed, 7 deletions(-)
diff --git a/security-admin/src/main/java/org/apache/ranger/security/web/filter/RangerKRBAuthenticationFilter.java b/security-admin/src/main/java/org/apache/ranger/security/web/filter/RangerKRBAuthenticationFilter.java
index 6a2f019ae..30ac069fe 100644
--- a/security-admin/src/main/java/org/apache/ranger/security/web/filter/RangerKRBAuthenticationFilter.java
+++ b/security-admin/src/main/java/org/apache/ranger/security/web/filter/RangerKRBAuthenticationFilter.java
@@ -112,7 +112,6 @@ public class RangerKRBAuthenticationFilter extends RangerKrbFilter {
static final String RULES_MECHANISM_PARAM = "kerberos.name.rules.mechanism";
private static final String KERBEROS_TYPE = "kerberos";
- private static final String S_USER = "suser";
private String originalUrlQueryParam = "originalUrl";
public static final String LOGOUT_URL = "/logout";
@@ -224,12 +223,6 @@ protected void doFilter(FilterChain filterChain,
}
}
}
- String sessionUserName = request.getParameter(S_USER);
- String pathInfo = request.getPathInfo();
- if(!StringUtils.isEmpty(sessionUserName) && "keyadmin".equalsIgnoreCase(sessionUserName) && !StringUtils.isEmpty(pathInfo) && pathInfo.contains("public/v2/api/service")){
- LOG.info("Session will be created by : "+sessionUserName);
- userName = sessionUserName;
- }
if(LOG.isDebugEnabled()) {
LOG.debug("Remote user from request = " + request.getRemoteUser());