joshelser commented on code in PR #104:
URL: 
https://github.com/apache/phoenix-queryserver/pull/104#discussion_r949204418


##########
phoenix-queryserver/src/main/java/org/apache/phoenix/queryserver/server/QueryServer.java:
##########
@@ -595,6 +595,15 @@ public <T> T doAsRemoteUser(String remoteUserName, String 
remoteAddress,
 
       // Proxy this user on top of the server's user (the real user). Get a 
cached instance, the
       // LoadingCache will create a new instance for us if one isn't cached.
+
+      // realm got removed from remoteUserName in CALCITE-4152
+      // so we remove the instance name to avoid geting 
KerberosName$NoMatchingRule exception
+
+      int separatorIndex = remoteUserName.indexOf('/');

Review Comment:
   I don't recall anymore if there's a chance that `remoteUserName` might also 
contain an `@REALM`. You could be defensive and guard against that for "free" 
(do a second `indexOf` and `substring` block)



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

Reply via email to