You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by pr...@apache.org on 2018/09/26 15:42:45 UTC

[3/9] ranger git commit: RANGER-1648 : Ranger Kafka Plugin now should use the Short name from Kafka Session Object

RANGER-1648 : Ranger Kafka Plugin now should use the Short name from Kafka Session Object

(cherry picked from commit fdd1d294c6b3c0e3cd8dd4219d034ad63210b380)


Project: http://git-wip-us.apache.org/repos/asf/ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/ranger/commit/1c68d4fe
Tree: http://git-wip-us.apache.org/repos/asf/ranger/tree/1c68d4fe
Diff: http://git-wip-us.apache.org/repos/asf/ranger/diff/1c68d4fe

Branch: refs/heads/ranger-0.7
Commit: 1c68d4fe889520f17546eb0e925e06b85843b23c
Parents: 49d2962
Author: rmani <rm...@hortonworks.com>
Authored: Sat Jun 17 04:56:52 2017 +0530
Committer: Pradeep <pr...@apache.org>
Committed: Wed Sep 26 20:55:19 2018 +0530

----------------------------------------------------------------------
 .../authorization/kafka/authorizer/RangerKafkaAuthorizer.java      | 2 --
 1 file changed, 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ranger/blob/1c68d4fe/plugin-kafka/src/main/java/org/apache/ranger/authorization/kafka/authorizer/RangerKafkaAuthorizer.java
----------------------------------------------------------------------
diff --git a/plugin-kafka/src/main/java/org/apache/ranger/authorization/kafka/authorizer/RangerKafkaAuthorizer.java b/plugin-kafka/src/main/java/org/apache/ranger/authorization/kafka/authorizer/RangerKafkaAuthorizer.java
index 8425fd3..b3d5a74 100644
--- a/plugin-kafka/src/main/java/org/apache/ranger/authorization/kafka/authorizer/RangerKafkaAuthorizer.java
+++ b/plugin-kafka/src/main/java/org/apache/ranger/authorization/kafka/authorizer/RangerKafkaAuthorizer.java
@@ -140,8 +140,6 @@ public class RangerKafkaAuthorizer implements Authorizer {
 		String userName = null;
 		if (session.principal() != null) {
 			userName = session.principal().getName();
-			userName = StringUtils.substringBefore(userName, "/");
-			userName = StringUtils.substringBefore(userName, "@");
 		}
 		java.util.Set<String> userGroups = MiscUtil
 				.getGroupsForRequestUser(userName);