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 2018/01/26 15:22:14 UTC
[ambari] 09/21: AMBARI-22797. Dot not filter for PAM only;
we should inform the end user when configuring LDAP in case the
currently cond=figured auth method is not LDAP
This is an automated email from the ASF dual-hosted git repository.
ncole pushed a commit to branch branch-feature-AMBARI-21674
in repository https://gitbox.apache.org/repos/asf/ambari.git
commit cb452cf94830a5dfa0a41d68f9fcc97ddc5e5acb
Author: Sandor Molnar <sm...@hortonworks.com>
AuthorDate: Sun Jan 21 22:21:21 2018 +0100
AMBARI-22797. Dot not filter for PAM only; we should inform the end user when configuring LDAP in case the currently cond=figured auth method is not LDAP
---
ambari-server/src/main/python/ambari_server/setupSecurity.py | 7 ++++---
ambari-server/src/test/python/TestAmbariServer.py | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/ambari-server/src/main/python/ambari_server/setupSecurity.py b/ambari-server/src/main/python/ambari_server/setupSecurity.py
index f858198..0d98f6a 100644
--- a/ambari-server/src/main/python/ambari_server/setupSecurity.py
+++ b/ambari-server/src/main/python/ambari_server/setupSecurity.py
@@ -668,12 +668,13 @@ def setup_ldap(options):
err = 'Ambari Server is not running.'
raise FatalException(1, err)
- if get_value_from_properties(properties,CLIENT_SECURITY,"") == 'pam':
- query = "PAM is currently configured, do you wish to use LDAP instead [y/n] (n)? "
+ current_client_security = get_value_from_properties(properties,CLIENT_SECURITY,"no auth method")
+ if current_client_security != 'ldap':
+ query = "Currently '" + current_client_security + "' is configured, do you wish to use LDAP instead [y/n] (n)? "
if get_YN_input(query, False):
pass
else:
- err = "PAM is configured. Can not setup LDAP."
+ err = "Currently '" + current_client_security + "' configured. Can not setup LDAP."
raise FatalException(1, err)
isSecure = get_is_secure(properties)
diff --git a/ambari-server/src/test/python/TestAmbariServer.py b/ambari-server/src/test/python/TestAmbariServer.py
index 2b7be6b..75cd898 100644
--- a/ambari-server/src/test/python/TestAmbariServer.py
+++ b/ambari-server/src/test/python/TestAmbariServer.py
@@ -7516,7 +7516,7 @@ class TestAmbariServer(TestCase):
get_validated_string_input_method.side_effect = input_enable_ssl
read_password_method.return_value = "password"
get_YN_input_method.reset_mock()
- get_YN_input_method.side_effect = [True, True]
+ get_YN_input_method.side_effect = [True, True, True]
update_properties_method.reset_mock()
options.ldap_primary_host = None
--
To stop receiving notification emails like this one, please contact
ncole@apache.org.