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

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

Github user karanmehta93 commented on the issue:

    https://github.com/apache/calcite-avatica/pull/48
  
    `AvaticaServerConfiguration` has a few methods in place such as 
`getAllowedRoles` or `getHashLoginServiceRealm`, which are only applicable to 
certain types of auth methods. I feel that is breaks the interface level 
assumptions. We can rather have a class here that keeps these properties 
directly (rather than assigning them via Builder and passing them along) and 
various auth methods can inherit from it. This can help make 
`AvaticaServerConfiguration` self-sufficient for any security checks that we 
want to have in place. 
    
    Please advise on better ways of implementing this in terms of good code 
practices.
    
    FYI @vincentpoon


> 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