You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2016/11/28 19:23:01 UTC
[07/50] [abbrv] ambari git commit: AMBARI-18818 ADDENDUM Config
changes for Atlas to Support KnoxSSO Authentication (mugdha)
AMBARI-18818 ADDENDUM Config changes for Atlas to Support KnoxSSO Authentication (mugdha)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f13e0486
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f13e0486
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f13e0486
Branch: refs/heads/branch-dev-patch-upgrade
Commit: f13e0486ba22125c5b5338de26e353a21ce9f1a0
Parents: a10cc80
Author: Mugdha Varadkar <mu...@apache.org>
Authored: Tue Nov 22 17:06:29 2016 +0530
Committer: Mugdha Varadkar <mu...@apache.org>
Committed: Tue Nov 22 18:43:24 2016 +0530
----------------------------------------------------------------------
.../stacks/HDP/2.5/services/stack_advisor.py | 10 ++++---
.../services/ATLAS/themes/theme_version_2.json | 28 ++++++++++----------
.../stacks/HDP/2.6/services/stack_advisor.py | 2 +-
.../stacks/2.5/common/test_stack_advisor.py | 3 ++-
.../stacks/2.6/common/test_stack_advisor.py | 4 +--
5 files changed, 25 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/f13e0486/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
index 519602b..923c1f7 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
@@ -153,6 +153,7 @@ class HDP25StackAdvisor(HDP24StackAdvisor):
#<editor-fold desc="LDAP and AD">
auth_type = application_properties['atlas.authentication.method.ldap.type']
+ auth_ldap_enable = application_properties['atlas.authentication.method.ldap'].lower() == 'true'
Logger.info("Validating Atlas configs, authentication type: %s" % str(auth_type))
# Required props
@@ -182,10 +183,11 @@ class HDP25StackAdvisor(HDP24StackAdvisor):
elif auth_type.lower() == "none":
pass
- for prop in props_to_require:
- if prop not in application_properties or application_properties[prop] is None or application_properties[prop].strip() == "":
- validationItems.append({"config-name": prop,
- "item": self.getErrorItem("If authentication type is %s, this property is required." % auth_type)})
+ if auth_ldap_enable:
+ for prop in props_to_require:
+ if prop not in application_properties or application_properties[prop] is None or application_properties[prop].strip() == "":
+ validationItems.append({"config-name": prop,
+ "item": self.getErrorItem("If authentication type is %s, this property is required." % auth_type)})
#</editor-fold>
if application_properties['atlas.graph.index.search.backend'] == 'solr5' and \
http://git-wip-us.apache.org/repos/asf/ambari/blob/f13e0486/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/themes/theme_version_2.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/themes/theme_version_2.json b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/themes/theme_version_2.json
index f72ea4b..a5435e9 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/themes/theme_version_2.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/themes/theme_version_2.json
@@ -606,18 +606,18 @@
]
},
{
- "config": "application-properties/atlas.sso.enabled",
+ "config": "application-properties/atlas.sso.knox.enabled",
"subsection-name": "subsection-authentication-type"
},
{
- "config": "application-properties/atlas.sso.providerurl",
+ "config": "application-properties/atlas.sso.knox.providerurl",
"subsection-name": "subsection-atlas-sso",
"depends-on": [
{
"configs":[
- "application-properties/atlas.sso.enabled"
+ "application-properties/atlas.sso.knox.enabled"
],
- "if": "${application-properties/atlas.sso.enabled}",
+ "if": "${application-properties/atlas.sso.knox.enabled}",
"then": {
"property_value_attributes": {
"visible": true
@@ -632,14 +632,14 @@
]
},
{
- "config": "application-properties/atlas.sso.publicKey",
+ "config": "application-properties/atlas.sso.knox.publicKey",
"subsection-name": "subsection-atlas-sso",
"depends-on": [
{
"configs":[
- "application-properties/atlas.sso.enabled"
+ "application-properties/atlas.sso.knox.enabled"
],
- "if": "${application-properties/atlas.sso.enabled}",
+ "if": "${application-properties/atlas.sso.knox.enabled}",
"then": {
"property_value_attributes": {
"visible": true
@@ -654,14 +654,14 @@
]
},
{
- "config": "application-properties/atlas.sso.browser.useragent",
+ "config": "application-properties/atlas.sso.knox.browser.useragent",
"subsection-name": "subsection-atlas-sso",
"depends-on": [
{
"configs":[
- "application-properties/atlas.sso.enabled"
+ "application-properties/atlas.sso.knox.enabled"
],
- "if": "${application-properties/atlas.sso.enabled}",
+ "if": "${application-properties/atlas.sso.knox.enabled}",
"then": {
"property_value_attributes": {
"visible": true
@@ -817,25 +817,25 @@
}
},
{
- "config": "application-properties/atlas.sso.enabled",
+ "config": "application-properties/atlas.sso.knox.enabled",
"widget": {
"type":"checkbox"
}
},
{
- "config": "application-properties/atlas.sso.providerurl",
+ "config": "application-properties/atlas.sso.knox.providerurl",
"widget": {
"type": "text-field"
}
},
{
- "config": "application-properties/atlas.sso.publicKey",
+ "config": "application-properties/atlas.sso.knox.publicKey",
"widget": {
"type": "text-field"
}
},
{
- "config": "application-properties/atlas.sso.browser.useragent",
+ "config": "application-properties/atlas.sso.knox.browser.useragent",
"widget": {
"type": "text-field"
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/f13e0486/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
index 718da2c..bebeaf8 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py
@@ -49,7 +49,7 @@ class HDP26StackAdvisor(HDP25StackAdvisor):
knox_host = knox_hosts[0]
if 'gateway-site' in services['configurations'] and 'gateway.port' in services['configurations']["gateway-site"]["properties"]:
knox_port = services['configurations']["gateway-site"]["properties"]['gateway.port']
- putAtlasApplicationProperty('atlas.sso.providerurl', 'https://{0}:{1}/gateway/knoxsso/api/v1/websso'.format(knox_host, knox_port))
+ putAtlasApplicationProperty('atlas.sso.knox.providerurl', 'https://{0}:{1}/gateway/knoxsso/api/v1/websso'.format(knox_host, knox_port))
def recommendDruidConfigurations(self, configurations, clusterData, services, hosts):
http://git-wip-us.apache.org/repos/asf/ambari/blob/f13e0486/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
index 7759c09..f4538d7 100644
--- a/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
+++ b/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
@@ -6803,7 +6803,8 @@ class TestHDP25StackAdvisor(TestCase):
"atlas.kafka.bootstrap.servers": "",
"atlas.kafka.zookeeper.connect": "",
"atlas.graph.storage.hostname": "",
- "atlas.audit.hbase.zookeeper.quorum": ""
+ "atlas.audit.hbase.zookeeper.quorum": "",
+ "atlas.authentication.method.ldap": "false"
}}}
hosts = self.prepareHosts([])
result = self.stackAdvisor.validateConfigurations(services, hosts)
http://git-wip-us.apache.org/repos/asf/ambari/blob/f13e0486/ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py
index a7a45f8..011a874 100644
--- a/ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py
+++ b/ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py
@@ -572,7 +572,7 @@ class TestHDP26StackAdvisor(TestCase):
configurations = {
"application-properties": {
"properties": {
- "atlas.sso.providerurl": "",
+ "atlas.sso.knox.providerurl": "",
"atlas.graph.index.search.solr.zookeeper-url": "",
"atlas.audit.hbase.zookeeper.quorum": "",
"atlas.graph.storage.hostname": "",
@@ -604,7 +604,7 @@ class TestHDP26StackAdvisor(TestCase):
expected = {
"application-properties": {
"properties": {
- "atlas.sso.providerurl": "https://c6401.ambari.apache.org:8443/gateway/knoxsso/api/v1/websso",
+ "atlas.sso.knox.providerurl": "https://c6401.ambari.apache.org:8443/gateway/knoxsso/api/v1/websso",
"atlas.graph.index.search.solr.zookeeper-url": "",
"atlas.audit.hbase.zookeeper.quorum": "",
"atlas.graph.storage.hostname": "",