You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Kihwal Lee (JIRA)" <ji...@apache.org> on 2019/04/17 13:43:00 UTC

[jira] [Comment Edited] (HDFS-14434) webhdfs that connect secure hdfs should not use user.name parameter

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

Kihwal Lee edited comment on HDFS-14434 at 4/17/19 1:42 PM:
------------------------------------------------------------

I think server should ignore the parameter, "user.name", if in secure mode. I.e. do not use it even for validation.  Same goes for the "doAs" param.


was (Author: kihwal):
I think server should ignore the parameter, "user.name", if in secure mode.

> webhdfs that connect secure hdfs should not use user.name parameter
> -------------------------------------------------------------------
>
>                 Key: HDFS-14434
>                 URL: https://issues.apache.org/jira/browse/HDFS-14434
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: webhdfs
>    Affects Versions: 3.1.2
>            Reporter: KWON BYUNGCHANG
>            Priority: Minor
>         Attachments: HDFS-14434.001.patch
>
>
> I have two secure hadoop cluster.  Both cluster use cross-realm authentication. 
> [user_a@A.COM|mailto:user_a@A.COM] can access to HDFS of B.COM realm
> by the way, hadoop username of user_a@A.COM  in B.COM realm is  cross_realm_a_com_user_a.
> hdfs dfs command of user_a@A.COM using B.COM webhdfs failed.
> root cause is  webhdfs that connect secure hdfs use user.name parameter.
> according to webhdfs spec,  insecure webhdfs use user.name,  secure webhdfs use SPNEGO for authentication.
> I think webhdfs that connect secure hdfs  should not use user.name parameter.
> I will attach patch.
> below is error log
>  
> {noformat}
> $ hdfs dfs -ls  webhdfs://b.com:50070/
> ls: Usernames not matched: name=user_a != expected=cross_realm_a_com_user_a
>  
> # user.name in cross realm webhdfs
> $ curl -u : --negotiate 'http://b.com:50070/webhdfs/v1/?op=GETDELEGATIONTOKEN&user.name=user_a' 
> {"RemoteException":{"exception":"SecurityException","javaClassName":"java.lang.SecurityException","message":"Failed to obtain user group information: java.io.IOException: Usernames not matched: name=user_a != expected=cross_realm_a_com_user_a"}}
> # USE SPNEGO
> $ curl -u : --negotiate 'http://b.com:50070/webhdfs/v1/?op=GETDELEGATIONTOKEN'
> {"Token"{"urlString":"XgA....."}}
>  
> {noformat}
>  
>  
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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