You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2020/07/29 07:58:58 UTC

[GitHub] [hbase] tedyu commented on a change in pull request #1843: HBASE-24268 REST and Thrift server do not handle the "doAs" parameter case insensitively

tedyu commented on a change in pull request #1843:
URL: https://github.com/apache/hbase/pull/1843#discussion_r461300843



##########
File path: hbase-http/src/main/java/org/apache/hadoop/hbase/http/ProxyUserAuthenticationFilter.java
##########
@@ -150,6 +150,18 @@ static boolean containsUpperCase(final Iterable<String> strings) {
     return false;
   }
 
+  public static String getDoasFromHeader(final  HttpServletRequest request) {
+    String doas = null;
+    final Enumeration<String> headers = request.getHeaderNames();
+    while (headers.hasMoreElements()){
+      String header = headers.nextElement();
+      if (header.toLowerCase().equals("doas")){
+        doas = request.getHeader(header);

Review comment:
       We can break out of the loop here, right ?




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org