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

Alejandro Abdelnur commented on HADOOP-10398:
---------------------------------------------

Looking at the code, if a 200 response arrives there should be a token 
(cookie). 

If the cluster is configured as unsecure, there are 2 options, the 
PseudoAuthenticationHandler in the server side is configured to allow ANONYMOUS 
users or not,  by default is NOT. 

If ANONYMOUS is disabled, then there is no token (no cookie) and the response 
code is 401. This will trigger the fallback.

If ANONYMOUS is enabled, then there is a token (cookie) and the respose is 200. 
This does not  trigger a fallback.

It would help seeing the full request/response of the authentication sequence 
to understand what is going on.

> KerberosAuthenticator failed to fall back to PseudoAuthenticator after 
> HADOOP-10078
> -----------------------------------------------------------------------------------
>
>                 Key: HADOOP-10398
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10398
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: security
>            Reporter: Tsz Wo Nicholas Sze
>            Assignee: Tsz Wo Nicholas Sze
>         Attachments: c10398_20140310.patch
>
>
> {code}
> //KerberosAuthenticator.java
>       if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
>         LOG.debug("JDK performed authentication on our behalf.");
>         // If the JDK already did the SPNEGO back-and-forth for
>         // us, just pull out the token.
>         AuthenticatedURL.extractToken(conn, token);
>         return;
>       } else ...
> {code}
> The problem of the code above is that HTTP_OK does not implies authentication 
> completed.  We should check if the token can be extracted successfully.
> This problem was reported by [~bowenzhangusa] in [this 
> comment|https://issues.apache.org/jira/browse/HADOOP-10078?focusedCommentId=13896823&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13896823]
>  earlier.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to