You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2014/11/19 23:01:27 UTC

ambari git commit: AMBARI-7448. Create Kerberos Service. (Addendum patch) (Robert Levas via Jaimin)

Repository: ambari
Updated Branches:
  refs/heads/trunk a52b04976 -> b0d0552e7


AMBARI-7448. Create Kerberos Service. (Addendum patch) (Robert Levas via Jaimin)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b0d0552e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b0d0552e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b0d0552e

Branch: refs/heads/trunk
Commit: b0d0552e7214bf32ee1577482b71a950bb591803
Parents: a52b049
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Wed Nov 19 14:01:02 2014 -0800
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Wed Nov 19 14:01:02 2014 -0800

----------------------------------------------------------------------
 .../2.2/services/KERBEROS/configuration/kadm5-acl.xml |  2 +-
 .../2.2/services/KERBEROS/configuration/kdc-conf.xml  |  2 +-
 .../2.2/services/KERBEROS/configuration/krb5-conf.xml |  4 ++--
 .../2.2/services/KERBEROS/package/scripts/params.py   | 14 ++++++++++++++
 .../services/KERBEROS/package/templates/krb5_conf.j2  |  4 ++--
 5 files changed, 20 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b0d0552e/ambari-server/src/main/resources/stacks/HDP/2.2/services/KERBEROS/configuration/kadm5-acl.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/KERBEROS/configuration/kadm5-acl.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/KERBEROS/configuration/kadm5-acl.xml
index 44cce66..293bcbf 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/KERBEROS/configuration/kadm5-acl.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/KERBEROS/configuration/kadm5-acl.xml
@@ -30,7 +30,7 @@
     <value>
       */admin@{{realm}}	*
 
-      {# Append additional realm declarations should be placed below #}
+      {# Append additional realm declarations below #}
     </value>
   </property>
 </configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/b0d0552e/ambari-server/src/main/resources/stacks/HDP/2.2/services/KERBEROS/configuration/kdc-conf.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/KERBEROS/configuration/kdc-conf.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/KERBEROS/configuration/kdc-conf.xml
index ff8b9fb..ac41317 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/KERBEROS/configuration/kdc-conf.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/KERBEROS/configuration/kdc-conf.xml
@@ -51,7 +51,7 @@
           supported_enctypes = {{libdefaults_default_tgs_enctypes}}
       }
 
-      {# Append additional realm declarations should be placed below #}
+      {# Append additional realm declarations below #}
     </value>
   </property>
 </configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/b0d0552e/ambari-server/src/main/resources/stacks/HDP/2.2/services/KERBEROS/configuration/krb5-conf.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/KERBEROS/configuration/krb5-conf.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/KERBEROS/configuration/krb5-conf.xml
index 4f3ddbd..8e6b9ba 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/KERBEROS/configuration/krb5-conf.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/KERBEROS/configuration/krb5-conf.xml
@@ -161,7 +161,7 @@
 
 {% if domains %}
 [domain_realm]
-{% for domain in domains %}
+{% for domain in domains.split(',') %}
   {{domain}} = {{realm|upper()}}
 {% endfor %}
 {% endif %}
@@ -180,7 +180,7 @@
     kdc = {{kdc_host}}
   }
 
-{# Append additional realm declarations should be placed below #}
+{# Append additional realm declarations below #}
     </value>
   </property>
 </configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/b0d0552e/ambari-server/src/main/resources/stacks/HDP/2.2/services/KERBEROS/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/KERBEROS/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.2/services/KERBEROS/package/scripts/params.py
index 664de5b..cff6250 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/KERBEROS/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/KERBEROS/package/scripts/params.py
@@ -149,11 +149,25 @@ if config is not None:
     admin_password = get_property_value(krb5_conf_data, 'admin_password', admin_password)
     admin_keytab = get_property_value(krb5_conf_data, 'admin_keytab', admin_keytab)
 
+    # If the admin keytab is just white space, set it to None
+    if admin_keytab is not None:
+      admin_keytab = admin_keytab.strip()
+
+      if len(admin_keytab) == 0:
+        admin_keytab = None
+
     test_principal = get_property_value(krb5_conf_data, 'test_principal', test_principal)
     test_password = get_property_value(krb5_conf_data, 'test_password', test_password)
     test_keytab = get_property_value(krb5_conf_data, 'test_keytab', test_keytab)
     test_keytab_file = get_property_value(krb5_conf_data, 'test_keytab_file', test_keytab_file)
 
+    # If the test keytab is just white space, set it to None
+    if test_keytab is not None:
+      test_keytab = test_keytab.strip()
+
+      if len(test_keytab) == 0:
+        test_keytab = None
+
     krb5_conf_template = get_property_value(krb5_conf_data, 'content', krb5_conf_template)
     krb5_conf_dir = get_property_value(krb5_conf_data, 'conf_dir', krb5_conf_dir)
     krb5_conf_file = get_property_value(krb5_conf_data, 'conf_file', krb5_conf_file)

http://git-wip-us.apache.org/repos/asf/ambari/blob/b0d0552e/ambari-server/src/main/resources/stacks/HDP/2.2/services/KERBEROS/package/templates/krb5_conf.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/KERBEROS/package/templates/krb5_conf.j2 b/ambari-server/src/main/resources/stacks/HDP/2.2/services/KERBEROS/package/templates/krb5_conf.j2
index 41628b9..db1015a 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/KERBEROS/package/templates/krb5_conf.j2
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/KERBEROS/package/templates/krb5_conf.j2
@@ -25,7 +25,7 @@
 
 {% if domains %}
 [domain_realm]
-{% for domain in domains %}
+{% for domain in domains.split(',') %}
   {{domain}} = {{realm|upper()}}
 {% endfor %}
 {% endif %}
@@ -44,4 +44,4 @@
     kdc = {{kdc_host}}
   }
 
-{# Append additional realm declarations should be placed below #}
\ No newline at end of file
+{# Append additional realm declarations below #}
\ No newline at end of file