falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rag...@apache.org
Subject [33/41] git commit: FALCON-690: kinit with realm in order to support deployments with cross domain trust. Contributed by Arpit Gupta
Date Thu, 11 Sep 2014 22:19:38 GMT
FALCON-690: kinit with realm in order to support deployments with cross domain trust. Contributed
by Arpit Gupta


Project: http://git-wip-us.apache.org/repos/asf/incubator-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-falcon/commit/120c1c04
Tree: http://git-wip-us.apache.org/repos/asf/incubator-falcon/tree/120c1c04
Diff: http://git-wip-us.apache.org/repos/asf/incubator-falcon/diff/120c1c04

Branch: refs/heads/FALCON-585
Commit: 120c1c04d468e5a2aeec9c69da2d4664c6795d87
Parents: 581e592
Author: Raghav Kumar Gautam <raghav@apache.org>
Authored: Sat Sep 6 16:38:53 2014 -0700
Committer: Raghav Kumar Gautam <raghav@apache.org>
Committed: Sat Sep 6 16:38:53 2014 -0700

----------------------------------------------------------------------
 .../falcon/regression/core/enumsAndConstants/MerlinConstants.java | 1 +
 .../org/apache/falcon/regression/core/util/KerberosHelper.java    | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/120c1c04/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/enumsAndConstants/MerlinConstants.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/enumsAndConstants/MerlinConstants.java
b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/enumsAndConstants/MerlinConstants.java
index edd75ed..3a56530 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/enumsAndConstants/MerlinConstants.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/enumsAndConstants/MerlinConstants.java
@@ -46,6 +46,7 @@ public final class MerlinConstants {
     private static HashMap<String, String> keyTabMap;
     public static final String ACL_OWNER = Config.getProperty("ACL.OWNER", RequestKeys.CURRENT_USER);
     public static final String ACL_GROUP = Config.getProperty("ACL.GROUP", "default");
+    public static final String USER_REALM = Config.getProperty("USER.REALM", "");
 
     public static final boolean CLEAN_TEST_DIR =
         Boolean.valueOf(Config.getProperty("clean_test_dir", "true"));

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/120c1c04/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/KerberosHelper.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/KerberosHelper.java
b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/KerberosHelper.java
index 71d728e..3c666e7 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/KerberosHelper.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/KerberosHelper.java
@@ -41,7 +41,8 @@ public final class KerberosHelper {
             user = MerlinConstants.CURRENT_USER_NAME;
         }
         final String keytab = MerlinConstants.getKeytabForUser(user);
-        final String command = String.format("kinit -kt %s %s", keytab, user);
+        String principal = MerlinConstants.USER_REALM.isEmpty() ? user : user + '@' + MerlinConstants.USER_REALM;
+        final String command = String.format("kinit -kt %s %s", keytab, principal);
         final int exitVal = ExecUtil.executeCommandGetExitCode(command);
         Assert.assertEquals(exitVal, 0, "Switching Kerberos credential did not succeed.");
     }


Mime
View raw message