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

Luke Lu commented on HADOOP-9421:
---------------------------------

bq. Using sasl-next, Nominal case with token O(1). 

Only if there is only one kind of tokens, which will not be true.

bq. In both cases, it's likely to be O(2). 

As I mentioned before, client can cache the server mechanism/protocol/name, so 
the smarter client can always be amortized O(1). There will be more tokens, 
especially if we add capability based tokens, sasl-next will degrade linearly.

bq. Benoy: An alternative approach in choosing a mechanism is to model after 
the SSL protocol. Here Client does "ClientHello" to server with a list of 
mechanisms it supports.

This is a generalization of the client initiation mechanism. If we implement my 
proposal, this can be added later in a _backward_ _compatible_ manner, as we 
can send the client capabilities in an optional field.

In terms of complexity. Sasl-next proposal actually seems more complex by 
intertwine sasl handshakes with mechanism/protocol selection/negotiation. An 
advantage of client initiation is that mechanism selection/negotiation and the 
actual sasl process can be cleanly decoupled:

For example: the client can be as simple as:
{code}
sendRpc(header, chosenMech);
res = readRpc();
if (mechSupported(res)) {
  return finishSasl(res);
} else {
  return finishSasl(chooseMech(res));
}
{code}




                
> Add full length to SASL response to allow non-blocking readers
> --------------------------------------------------------------
>
>                 Key: HADOOP-9421
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9421
>             Project: Hadoop Common
>          Issue Type: Sub-task
>    Affects Versions: 2.0.3-alpha
>            Reporter: Sanjay Radia
>            Assignee: Junping Du
>         Attachments: HADOOP-9421.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to