Skip to content

Commit

Permalink
Ensure that MiniDFS is using simple auth in BaseTestImpersonation.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnturton committed Aug 16, 2023
1 parent 93e11f6 commit 78bce12
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ protected static void startMiniDfsCluster(String testClass) throws Exception {
*/
protected static void startMiniDfsCluster(String testClass, boolean isImpersonationEnabled) throws Exception {
Preconditions.checkArgument(!Strings.isNullOrEmpty(testClass), "Expected a non-null and non-empty test class name");
UserGroupInformation.reset();
dfsConf = new Configuration();

// Set the MiniDfs base dir to be the temp directory of the test, so that all files created within the MiniDfs
Expand All @@ -104,6 +103,8 @@ protected static void startMiniDfsCluster(String testClass, boolean isImpersonat
// Set the proxyuser settings so that the user who is running the Drillbits/MiniDfs can impersonate other users.
dfsConf.set(String.format("hadoop.proxyuser.%s.hosts", processUser), "*");
dfsConf.set(String.format("hadoop.proxyuser.%s.groups", processUser), "*");
dfsConf.set("hadoop.security.authentication", "simple");
UserGroupInformation.setConfiguration(dfsConf);
}

// Start the MiniDfs cluster
Expand Down

0 comments on commit 78bce12

Please sign in to comment.