Details

Description

We already authenticate requests to NM from any AM. We also need to authorize the requests, otherwise a rogue AM, but with proper tokens and thus authenticated to talk to NM, could either launch or kill a container with different ContainerID. We have two options:

Remove the explicit passing of the ContainerId as part of the API and instead get it from the RPC layer. In this case, we will need a ContainerToken for each container.

Do explicit authorization checks without relying on getting ContainerID from the RPC.

One ContainerToken per container is a serious restriction. We anyways want to be able to use application-ACLS to, say, stop containers owned by others. So I am going to take the later route of explicit checks.

Vinod Kumar Vavilapalli
added a comment - 25/Oct/11 07:54 Okay, I am realizing that each protocol is a good chunk of work in itself. I am going to do each of them separately. Using this ticket for ContainerManager protocol related authorization checks.

Vinod Kumar Vavilapalli
added a comment - 28/Oct/11 17:36 Patch to fix the authorization of requests to ContainerManager. Rogue users cannot fake the ContainerID or the Resource anymore.
(Was a fun patch, stepped through most of the RPC code ).

Hadoop QA
added a comment - 28/Oct/11 18:00 -1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12501322/MAPREDUCE-3256-20111028.1.txt
against trunk revision .
+1 @author. The patch does not contain any @author tags.
+1 tests included. The patch appears to include 10 new or modified tests.
+1 javadoc. The javadoc tool did not generate any warning messages.
+1 javac. The applied patch does not increase the total number of javac compiler warnings.
+1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.
+1 release audit. The applied patch does not increase the total number of release audit warnings.
-1 core tests. The patch failed these unit tests:
org.apache.hadoop.yarn.server.TestContainerManagerSecurity
+1 contrib tests. The patch passed contrib unit tests.
Test results: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/1193//testReport/
Console output: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/1193//console
This message is automatically generated.

Hadoop QA
added a comment - 28/Oct/11 22:25 +1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12501363/MAPREDUCE-3256-20111028.2_same
against trunk revision .
+1 @author. The patch does not contain any @author tags.
+1 tests included. The patch appears to include 10 new or modified tests.
+1 javadoc. The javadoc tool did not generate any warning messages.
+1 javac. The applied patch does not increase the total number of javac compiler warnings.
+1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.
+1 release audit. The applied patch does not increase the total number of release audit warnings.
+1 core tests. The patch passed unit tests in .
+1 contrib tests. The patch passed contrib unit tests.
Test results: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/1197//testReport/
Console output: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/1197//console
This message is automatically generated.

Hadoop QA
added a comment - 28/Oct/11 22:51 +1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12501363/MAPREDUCE-3256-20111028.2_same
against trunk revision .
+1 @author. The patch does not contain any @author tags.
+1 tests included. The patch appears to include 10 new or modified tests.
+1 javadoc. The javadoc tool did not generate any warning messages.
+1 javac. The applied patch does not increase the total number of javac compiler warnings.
+1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.
+1 release audit. The applied patch does not increase the total number of release audit warnings.
+1 core tests. The patch passed unit tests in .
+1 contrib tests. The patch passed contrib unit tests.
Test results: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/1200//testReport/
Console output: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/1200//console
This message is automatically generated.

Vinod Kumar Vavilapalli
added a comment - 29/Oct/11 06:40 That bug clearly demonstrates that my patch is working And of course, that there are more bugs to fix in AM.
AM is using the same tokens for starting/stopping various containers! Which is exactly what we are trying to prevent. Working on it.

Vinod Kumar Vavilapalli
added a comment - 29/Oct/11 07:59 This should fix it.
Tested this on a single node secure setup, but I guess that doesn't prove that this patch is better than the previous one.
I don't have access to a bigger cluster. Arun, can you please help with this? Thanks.

Hadoop QA
added a comment - 29/Oct/11 09:06 +1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12501436/MAPREDUCE-3256-20111029.1.txt
against trunk revision .
+1 @author. The patch does not contain any @author tags.
+1 tests included. The patch appears to include 16 new or modified tests.
+1 javadoc. The javadoc tool did not generate any warning messages.
+1 javac. The applied patch does not increase the total number of javac compiler warnings.
+1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.
+1 release audit. The applied patch does not increase the total number of release audit warnings.
+1 core tests. The patch passed unit tests in .
+1 contrib tests. The patch passed contrib unit tests.
Test results: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/1204//testReport/
Console output: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/1204//console
This message is automatically generated.