|
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12393231/4575-1-core.patch against trunk revision 709609. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 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 appears to introduce 1 new Findbugs warnings. +1 Eclipse classpath. The patch retains Eclipse classpath integrity. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3521/testReport/ This message is automatically generated. > There is a race condition in UserGroupInformationManager::getUgiForUser
I was aware of it and chose to punt on it since it doesn't affect correctness (the worst can happen is a few extra ugi objects get created and immediately garbage collected) and I was reluctant to make it a synchronized method since it may launch a shell command. Now that you view it as a problem, I've changed the code to use synchronized methods and no longer synchronize on the ugiCache object. This problem should go away. > It introduces a race condition in the jspHelper field initialization > Why does ProxyHttpServer not extend or own an HttpServer? > I don't understand why the proxy would return a status of 402 > Calling System.exit from createHdfsProxy is unnecessarily forceful... Your other comments are incorporated into the new patch. Thanks! The core changes look fine. The contrib changes are OK for now, but in the future:
Compiling against trunk, I got no errors when applying only the patch. Are the jars in lib.tgz supposed to go into src/contrib/hdfsproxy/lib ? > If there were a limit on even the number of elements in the cache...
> Something generic, like 400, perhaps? I attached a new patch (4575-3) that addressed the above concerns. > Are the jars in lib.tgz supposed to go into src/contrib/hdfsproxy/lib ? -1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12393458/4575-3.patch against trunk revision 711734. +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 warnings. +1 Eclipse classpath. The patch retains Eclipse classpath integrity. -1 core tests. The patch failed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3544/testReport/ This message is automatically generated. I just committed this. Thanks, Kan
Seems that this introduced some javadoc warnings. See
Integrated in Hadoop-trunk #655 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/655/
. Add a proxy service for relaying HsftpFileSystem requests. Includes client authentication via user certificates and config-based access control. (Kan Zhang via cdouglas) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Though the proxy does a fair amount of sanity checking and input sanitizing, future callers may not be so careful (e.g. userName = "foo ; rm -rf /"). Further, the login functionality is more general and a public static method on UnixUGI will impede future design. As a separate issue, replacing Shell::getGroupsCommand with "id -Gn" and the StringTokenizer with String::split are sound improvements. For this issue, though I can see why this functionality is associated with UnixUGI, looking up groups for arbitrary users belongs in the proxy code and is not required in core. The method should also do some of its own sanity checks.
On contrib:
+ } else { // http request, set ugi for servlets, only for testing purposes + String ugi = rqst.getParameter("ugi"); + rqst.setAttribute("authorized.ugi", new UnixUserGroupInformation(ugi + .split(","))); + }if a non-ssl listener is attached, this should probably log at WARN level on init at least.