[ 
https://issues.apache.org/jira/browse/PHOENIX-3598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16063729#comment-16063729
 ] 

ASF GitHub Bot commented on PHOENIX-3598:
-----------------------------------------

Github user joshelser commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/265#discussion_r124110721
  
    --- Diff: 
phoenix-queryserver/src/main/java/org/apache/phoenix/queryserver/server/QueryServer.java
 ---
    @@ -274,6 +282,47 @@ public int run(String[] args) throws Exception {
       }
     
       /**
    +   * Use the correctly way to extract end user.
    +   */
    +
    +  static class PhoenixRemoteUserExtractor implements RemoteUserExtractor{
    +    private final HttpQueryStringParameterRemoteUserExtractor 
paramRemoteUserExtractor;
    +    private final HttpRequestRemoteUserExtractor 
requestRemoteUserExtractor;
    +    private final boolean enableDoAs;
    +    private final String doAsParam;
    +
    +    public PhoenixRemoteUserExtractor(Configuration conf) {
    +      this.requestRemoteUserExtractor = new 
HttpRequestRemoteUserExtractor();
    +      this.doAsParam = conf.get(QueryServices.QUERY_SERVER_DOAS_PARAM,
    +              QueryServicesOptions.DEFAULT_QUERY_SERVER_DOAS_PARAM);
    +      this.paramRemoteUserExtractor = new 
HttpQueryStringParameterRemoteUserExtractor(doAsParam);
    +      this.enableDoAs = 
conf.getBoolean(QueryServices.QUERY_SERVER_DOAS_ENABLED_ATTRIB,
    --- End diff --
    
    Can you move this check of whether or not we enable `doAs` above to 
selectively call `withRemoteUserExtractor`, please?


> Enable proxy access to Phoenix query server for third party on behalf of end 
> users
> ----------------------------------------------------------------------------------
>
>                 Key: PHOENIX-3598
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3598
>             Project: Phoenix
>          Issue Type: Improvement
>            Reporter: Jerry He
>            Assignee: Shi Wang
>         Attachments: 0001-PHOENIX-3598.patch
>
>
> This JIRA tracks the follow-on work of CALCITE-1539 needed on Phoenix query 
> server side.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to