mirror of
https://github.com/ansible/awx.git
synced 2026-03-02 17:28:51 -03:30
Remove LDAP authentication (#15546)
Remove LDAP authentication from AWX
This commit is contained in:
committed by
jessicamack
parent
6dea7bfe17
commit
f22b192fb4
@@ -52,21 +52,6 @@ EXAMPLES = '''
|
||||
name: "AWX_ISOLATION_SHOW_PATHS"
|
||||
value: "'/var/lib/awx/projects/', '/tmp'"
|
||||
register: testing_settings
|
||||
|
||||
- name: Set the LDAP Auth Bind Password
|
||||
settings:
|
||||
name: "AUTH_LDAP_BIND_PASSWORD"
|
||||
value: "Password"
|
||||
no_log: true
|
||||
|
||||
- name: Set all the LDAP Auth Bind Params
|
||||
settings:
|
||||
settings:
|
||||
AUTH_LDAP_BIND_PASSWORD: "password"
|
||||
AUTH_LDAP_USER_ATTR_MAP:
|
||||
email: "mail"
|
||||
first_name: "givenName"
|
||||
last_name: "surname"
|
||||
'''
|
||||
|
||||
from ..module_utils.controller_api import ControllerAPIModule
|
||||
|
||||
@@ -7,36 +7,6 @@ import pytest
|
||||
from awx.conf.models import Setting
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_setting_flat_value(run_module, admin_user):
|
||||
the_value = 'CN=service_account,OU=ServiceAccounts,DC=domain,DC=company,DC=org'
|
||||
result = run_module('settings', dict(name='AUTH_LDAP_BIND_DN', value=the_value), admin_user)
|
||||
assert not result.get('failed', False), result.get('msg', result)
|
||||
assert result.get('changed'), result
|
||||
|
||||
assert Setting.objects.get(key='AUTH_LDAP_BIND_DN').value == the_value
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_setting_dict_value(run_module, admin_user):
|
||||
the_value = {'email': 'mail', 'first_name': 'givenName', 'last_name': 'surname'}
|
||||
result = run_module('settings', dict(name='AUTH_LDAP_USER_ATTR_MAP', value=the_value), admin_user)
|
||||
assert not result.get('failed', False), result.get('msg', result)
|
||||
assert result.get('changed'), result
|
||||
|
||||
assert Setting.objects.get(key='AUTH_LDAP_USER_ATTR_MAP').value == the_value
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_setting_nested_type(run_module, admin_user):
|
||||
the_value = {'email': 'mail', 'first_name': 'givenName', 'last_name': 'surname'}
|
||||
result = run_module('settings', dict(settings={'AUTH_LDAP_USER_ATTR_MAP': the_value}), admin_user)
|
||||
assert not result.get('failed', False), result.get('msg', result)
|
||||
assert result.get('changed'), result
|
||||
|
||||
assert Setting.objects.get(key='AUTH_LDAP_USER_ATTR_MAP').value == the_value
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_setting_bool_value(run_module, admin_user):
|
||||
for the_value in (True, False):
|
||||
|
||||
Reference in New Issue
Block a user