hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yuanbo Liu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-13707) If kerberos is enabled while HTTP SPNEGO is not configured, some links cannot be accessed
Date Wed, 12 Oct 2016 07:26:20 GMT

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

Yuanbo Liu commented on HADOOP-13707:
-------------------------------------

If HTTP SPNEGO is not enabled, user can not be authenticated, and "dr.who" is used as a default
user.
{{HttpServer2#hasAdministratorAccess}} is a authorization method to verify whether user has
admin access. Since user(dr.who) is not authenticated, http sever is in non-security environment,
there is no need to call {{hasAdministratorAccess}} to do authorization check.
{{HttpServletRequest#getAuthType}} returns null in non-security environment (without AuthenticationFilter),
so we can take advantage of it and use it  to determine whether {{hasAdministratorAccess}}
should be called.

> If kerberos is enabled while HTTP SPNEGO is not configured, some links cannot be accessed
> -----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-13707
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13707
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Yuanbo Liu
>            Assignee: Yuanbo Liu
>              Labels: security
>         Attachments: HADOOP-13707.001.patch, HADOOP-13707.002.patch
>
>
> In {{HttpServer2#hasAdministratorAccess}}, it uses `hadoop.security.authorization` to
detect whether HTTP is authenticated.
> It's not correct, because enabling Kerberos and HTTP SPNEGO are two steps. If Kerberos
is enabled while HTTP SPNEGO is not, some links cannot be accessed, such as "/logs", and it
will return error message as below:
> {quote}
> HTTP ERROR 403
> Problem accessing /logs/. Reason:
> User dr.who is unauthorized to access this page.
> {quote}
> We should make sure {{HttpServletRequest#getAuthType}} is not null before we invoke {{HttpServer2#hasAdministratorAccess}}.
> {{getAuthType}} means to get the authorization scheme of this request



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message