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

ASF GitHub Bot commented on CALCITE-2294:
-----------------------------------------

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

    https://github.com/apache/calcite-avatica/pull/48#discussion_r191498705
  
    --- Diff: 
server/src/main/java/org/apache/calcite/avatica/server/HttpServer.java ---
    @@ -659,6 +686,12 @@ public Builder 
withRemoteUserExtractor(RemoteUserExtractor remoteUserExtractor)
           return withAuthentication(AuthenticationType.DIGEST, properties, 
allowedRoles);
         }
     
    +    public Builder<T> withCustomAuthentication(AvaticaServerConfiguration 
config) {
    --- End diff --
    
    Great. I feel that `withServerConfiguration()` method name is not a very 
good representative of what it does internally and hence would like to prefer 
my current approach only. I can probably overload the private method 
`withAuthentication()` so that we should not cause any trouble, but I think its 
good for now.


> Allow customization for AvaticaServerConfiguration for plugging new 
> authentication mechanisms
> ---------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-2294
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2294
>             Project: Calcite
>          Issue Type: Improvement
>          Components: avatica
>            Reporter: Karan Mehta
>            Priority: Major
>             Fix For: avatica-1.12.0
>
>
> {{AvaticaServerConfiguration}} is currently only created if authentication 
> mechanism such as {{BASIC, DIGEST or SPNEGO}} is provided. We can change it 
> to a builder pattern to create this object and provide a way for users to 
> plugin their own security configuration.
> An example here can be using it for custom config that supports MTLS.
> Thanks [~alexaraujo] for suggesting this approach.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to