[jira] [Comment Edited] (HDFS-12052) Set SWEBHDFS delegation token kind when ssl is enabled in HttpFS

2017-07-10 Thread John Zhuge (JIRA)

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

John Zhuge edited comment on HDFS-12052 at 7/11/17 1:54 AM:


Clicked the link 
https://builds.apache.org/job/PreCommit-HDFS-Build/20219/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs-httpfs.txt:
{noformat}
./hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/HttpFSAuthenticationFilter.java:22:import
 org.apache.hadoop.fs.http.server.HttpFSServerWebServer;:1:
Redundant import from the same package - 
org.apache.hadoop.fs.http.server.HttpFSServerWebServer. [RedundantImport]
{noformat}



was (Author: jzhuge):
Clicked the link 
https://builds.apache.org/job/PreCommit-HDFS-Build/20219/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs-httpfs.txt:
{noformat}
./hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/HttpFSAuthenticationFilter.java:22:import
 org.apache.hadoop.fs.http.server.HttpFSServerWebServer;:1: Redundant import 
from the same package - org.apache.hadoop.fs.http.server.HttpFSServerWebServer. 
[RedundantImport]
{noformat}


> Set SWEBHDFS delegation token kind when ssl is enabled in HttpFS
> 
>
> Key: HDFS-12052
> URL: https://issues.apache.org/jira/browse/HDFS-12052
> Project: Hadoop HDFS
>  Issue Type: Bug
>  Components: httpfs, webhdfs
>Affects Versions: 2.7.3, 3.0.0-alpha3
>Reporter: Zoran Dimitrijevic
>Assignee: Zoran Dimitrijevic
> Attachments: HDFS-12052.00.patch, HDFS-12052.01.patch, 
> HDFS-12052.02.patch, HDFS-12052.03.patch, HDFS-12052.04.patch, 
> HDFS-12052.05.patch, HDFS-12052.06.patch
>
>
> When httpfs runs with httpfs.ssl.enabled it should return SWEBHDFS delegation 
> tokens. 
> Currently, httpfs returns WEBHDFS delegation "kind" for tokens regardless of 
> whether ssl is enabled or not. If clients directly connect to renew tokens 
> (for example, hdfs dfs) all works because httpfs doesn't check whether token 
> kind is for swebhdfs or webhdfs. However, this breaks when yarn rm needs to 
> renew the token for the job (for example, when running hadoop distcp). Since 
> DT kind is WEBHDFS, rm tries to establish non-ssl connection to httpfs and 
> fails.
> I've tested a simple patch which I'll upload to this jira, and it fixes this 
> issue (hadoop distcp works).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Comment Edited] (HDFS-12052) Set SWEBHDFS delegation token kind when ssl is enabled in HttpFS

2017-07-10 Thread Ravi Prakash (JIRA)

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

Ravi Prakash edited comment on HDFS-12052 at 7/10/17 10:00 PM:
---

I tried understanding the whole sequence of configurations set in environment 
variables, xml files, properties being passed around between {{HttpFS*}} and 
{{HttpServer2}} and {{AuthenticationFilter}}, and threw up my hands. 

It makes sense to me that when HttpFS is configured with SSL, the delegation 
tokens returned by the server should be SWEBHDFS.

Just one change, could you please use {{HttpFSServerWebServer.SSL_ENABLED_KEY}} 
instead of the hard coded string {{"httpfs.ssl.enabled"}}?

I too am fine with the style fixes in this patch itself. 


was (Author: raviprak):
I tried understanding the whole sequence of configurations set in environment 
variables, xml files, properties being passed around between {{HttpFS*}} and 
{{HttpServer2}} and {{AuthenticationFilter}}, and threw up my hands. 

It makes sense to me that when HttpFS is configured with SSL, the delegation 
tokens returned by the server should be SWEBHDFS.

Just one change, could you please use {{HttpFSServerWebServer.SSL_ENABLED_KEY}} 
instead of the hard coded string {{"httpfs.ssl.enabled"}}?

> Set SWEBHDFS delegation token kind when ssl is enabled in HttpFS
> 
>
> Key: HDFS-12052
> URL: https://issues.apache.org/jira/browse/HDFS-12052
> Project: Hadoop HDFS
>  Issue Type: Bug
>  Components: httpfs, webhdfs
>Affects Versions: 2.7.3, 3.0.0-alpha3
>Reporter: Zoran Dimitrijevic
>Assignee: Zoran Dimitrijevic
> Attachments: HDFS-12052.00.patch, HDFS-12052.01.patch, 
> HDFS-12052.02.patch, HDFS-12052.03.patch, HDFS-12052.04.patch, 
> HDFS-12052.05.patch
>
>
> When httpfs runs with httpfs.ssl.enabled it should return SWEBHDFS delegation 
> tokens. 
> Currently, httpfs returns WEBHDFS delegation "kind" for tokens regardless of 
> whether ssl is enabled or not. If clients directly connect to renew tokens 
> (for example, hdfs dfs) all works because httpfs doesn't check whether token 
> kind is for swebhdfs or webhdfs. However, this breaks when yarn rm needs to 
> renew the token for the job (for example, when running hadoop distcp). Since 
> DT kind is WEBHDFS, rm tries to establish non-ssl connection to httpfs and 
> fails.
> I've tested a simple patch which I'll upload to this jira, and it fixes this 
> issue (hadoop distcp works).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Comment Edited] (HDFS-12052) Set SWEBHDFS delegation token kind when ssl is enabled in HttpFS

2017-07-10 Thread John Zhuge (JIRA)

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

John Zhuge edited comment on HDFS-12052 at 7/10/17 5:58 PM:


Thank you [~3opan] for the excellent find and the patch submitted.

Could you please revert the unrelated format changes? They add noise to the 
code review and will complicate backport. Please read 
https://wiki.apache.org/hadoop/HowToContribute regarding "reformat" :
{noformat}
Please do not:

* reformat code unrelated to the bug being fixed: formatting changes should be 
separate patches/commits.
{noformat}

Please note the reformat might been done automatically by your IDE.


was (Author: jzhuge):
Thank you [~3opan] for the excellent find and the patch submitted.

Could you please revert the unrelated format changes? They add noise to the 
code review and will complicate backport. Please read 
https://wiki.apache.org/hadoop/HowToContribute regard "reformat" :
{noformat}
Please do not:

* reformat code unrelated to the bug being fixed: formatting changes should be 
separate patches/commits.
{noformat}

Please note the reformat might been done automatically by your IDE.

> Set SWEBHDFS delegation token kind when ssl is enabled in HttpFS
> 
>
> Key: HDFS-12052
> URL: https://issues.apache.org/jira/browse/HDFS-12052
> Project: Hadoop HDFS
>  Issue Type: Bug
>  Components: httpfs, webhdfs
>Affects Versions: 2.7.3, 3.0.0-alpha3
>Reporter: Zoran Dimitrijevic
>Assignee: Zoran Dimitrijevic
> Attachments: HDFS-12052.00.patch, HDFS-12052.01.patch, 
> HDFS-12052.02.patch, HDFS-12052.03.patch, HDFS-12052.04.patch
>
>
> When httpfs runs with httpfs.ssl.enabled it should return SWEBHDFS delegation 
> tokens. 
> Currently, httpfs returns WEBHDFS delegation "kind" for tokens regardless of 
> whether ssl is enabled or not. If clients directly connect to renew tokens 
> (for example, hdfs dfs) all works because httpfs doesn't check whether token 
> kind is for swebhdfs or webhdfs. However, this breaks when yarn rm needs to 
> renew the token for the job (for example, when running hadoop distcp). Since 
> DT kind is WEBHDFS, rm tries to establish non-ssl connection to httpfs and 
> fails.
> I've tested a simple patch which I'll upload to this jira, and it fixes this 
> issue (hadoop distcp works).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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