You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by rl...@apache.org on 2015/01/28 20:14:26 UTC
ambari git commit: AMBARI-9295. Remove toLowerCase() from
userPrincipalName in default Kerberos principal create template (rlevas)
Repository: ambari
Updated Branches:
refs/heads/trunk 4884a307a -> 454b31fd2
AMBARI-9295. Remove toLowerCase() from userPrincipalName in default Kerberos principal create template (rlevas)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/454b31fd
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/454b31fd
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/454b31fd
Branch: refs/heads/trunk
Commit: 454b31fd299aff30d60dda9d6bef05e4e2345973
Parents: 4884a30
Author: Robert Levas <rl...@hortonworks.com>
Authored: Wed Jan 28 14:14:10 2015 -0500
Committer: Robert Levas <rl...@hortonworks.com>
Committed: Wed Jan 28 14:14:15 2015 -0500
----------------------------------------------------------------------
.../serveraction/kerberos/ADKerberosOperationHandler.java | 2 +-
.../KERBEROS/1.10.3-10/configuration/kerberos-env.xml | 2 +-
.../kerberos/ADKerberosOperationHandlerTest.java | 10 +++++-----
3 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/454b31fd/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/ADKerberosOperationHandler.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/ADKerberosOperationHandler.java b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/ADKerberosOperationHandler.java
index 839a82a..4c1fdb5 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/ADKerberosOperationHandler.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/ADKerberosOperationHandler.java
@@ -502,7 +502,7 @@ public class ADKerberosOperationHandler extends KerberosOperationHandler {
"#if( $is_service )" +
" \"servicePrincipalName\": \"$principal_name\"," +
"#end" +
- "\"userPrincipalName\": \"$normalized_principal.toLowerCase()\"," +
+ "\"userPrincipalName\": \"$normalized_principal\"," +
"\"unicodePwd\": \"$password\"," +
"\"accountExpires\": \"0\"," +
"\"userAccountControl\": \"66048\"" +
http://git-wip-us.apache.org/repos/asf/ambari/blob/454b31fd/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/configuration/kerberos-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/configuration/kerberos-env.xml b/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/configuration/kerberos-env.xml
index d37e736..03b13d6 100644
--- a/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/configuration/kerberos-env.xml
+++ b/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/configuration/kerberos-env.xml
@@ -53,7 +53,7 @@
#if( $is_service )
"servicePrincipalName": "$principal_name",
#end
- "userPrincipalName": "$normalized_principal.toLowerCase()",
+ "userPrincipalName": "$normalized_principal",
"unicodePwd": "$password",
"accountExpires": "0",
"userAccountControl": "66048"
http://git-wip-us.apache.org/repos/asf/ambari/blob/454b31fd/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/ADKerberosOperationHandlerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/ADKerberosOperationHandlerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/ADKerberosOperationHandlerTest.java
index 8d2a3c4..4e0d8b0 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/ADKerberosOperationHandlerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/kerberos/ADKerberosOperationHandlerTest.java
@@ -300,7 +300,7 @@ public class ADKerberosOperationHandlerTest extends EasyMockSupport {
Assert.assertEquals("nn/c6501.ambari.apache.org", attributes.get("servicePrincipalName").get());
Assert.assertNotNull(attributes.get("userPrincipalName"));
- Assert.assertEquals("nn/c6501.ambari.apache.org@hdp01.local", attributes.get("userPrincipalName").get());
+ Assert.assertEquals("nn/c6501.ambari.apache.org@HDP01.LOCAL", attributes.get("userPrincipalName").get());
Assert.assertNotNull(attributes.get("unicodePwd"));
Assert.assertEquals("\"secret\"", new String((byte[]) attributes.get("unicodePwd").get(), Charset.forName("UTF-16LE")));
@@ -325,7 +325,7 @@ public class ADKerberosOperationHandlerTest extends EasyMockSupport {
Assert.assertEquals("hdfs", attributes.get("cn").get());
Assert.assertNotNull(attributes.get("userPrincipalName"));
- Assert.assertEquals("hdfs@hdp01.local", attributes.get("userPrincipalName").get());
+ Assert.assertEquals("hdfs@HDP01.LOCAL", attributes.get("userPrincipalName").get());
Assert.assertNotNull(attributes.get("unicodePwd"));
Assert.assertEquals("\"secret\"", new String((byte[]) attributes.get("unicodePwd").get(), Charset.forName("UTF-16LE")));
@@ -358,7 +358,7 @@ public class ADKerberosOperationHandlerTest extends EasyMockSupport {
" #if( $is_service )" +
" \"servicePrincipalName\": \"$principal_name\"," +
" #end" +
- " \"userPrincipalName\": \"$normalized_principal.toLowerCase()\"," +
+ " \"userPrincipalName\": \"$normalized_principal\"," +
" \"unicodePwd\": \"$password\"," +
" \"accountExpires\": \"0\"," +
" \"userAccountControl\": \"66048\"" +
@@ -424,7 +424,7 @@ public class ADKerberosOperationHandlerTest extends EasyMockSupport {
Assert.assertEquals("nn/c6501.ambari.apache.org", attributes.get("servicePrincipalName").get());
Assert.assertNotNull(attributes.get("userPrincipalName"));
- Assert.assertEquals("nn/c6501.ambari.apache.org@hdp01.local", attributes.get("userPrincipalName").get());
+ Assert.assertEquals("nn/c6501.ambari.apache.org@HDP01.LOCAL", attributes.get("userPrincipalName").get());
Assert.assertNotNull(attributes.get("sAMAccountName"));
Assert.assertTrue(attributes.get("sAMAccountName").get().toString().length() <= 20);
@@ -504,7 +504,7 @@ public class ADKerberosOperationHandlerTest extends EasyMockSupport {
" #if( $is_service )" +
" \"servicePrincipalName\": \"$principal_name\"," +
" #end" +
- " \"userPrincipalName\": \"$normalized_principal.toLowerCase()\"," +
+ " \"userPrincipalName\": \"$normalized_principal\"," +
" \"unicodePwd\": \"$password\"," +
" \"accountExpires\": \"0\"," +
" \"userAccountControl\": \"66048\"" +