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

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

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

    https://github.com/apache/calcite-avatica/pull/48#discussion_r189684450
  
    --- Diff: 
server/src/main/java/org/apache/calcite/avatica/server/HttpServer.java ---
    @@ -239,18 +239,8 @@ protected void internalStart() {
         server.setConnectors(new Connector[] { connector });
     
         // Default to using the handler that was passed in
    -    final HandlerList handlerList = new HandlerList();
    -    Handler avaticaHandler = handler;
    -
    -    // Wrap the provided handler for security if we made one
    -    if (null != securityHandler) {
    -      securityHandler.setHandler(handler);
    -      avaticaHandler = securityHandler;
    -    }
    +    configureHandlers(securityHandler);
    --- End diff --
    
    See my other comment. While what we care about is customizing security 
handlers, since we have to think about generic interface. Is it enough just to 
say CUSTOM means that the user will supply a list of handlers including 
whatever security handler they want to use, so we don't build anything canned 
ourselves? We are pretty close to this already. 


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