mirror of
https://github.com/ansible/awx.git
synced 2026-05-10 19:07:36 -02:30
Aap 50951 (#7053)
* disable authenticators that require updating the redirect URL and add groups claim to AzureAD migrator * update tests
This commit is contained in:
@@ -54,7 +54,7 @@ def test_create_gateway_authenticator(mocker, test_google_config):
|
|||||||
assert payload['name'] == 'google'
|
assert payload['name'] == 'google'
|
||||||
assert payload['slug'] == 'aap-google-oauth2-google-oauth2'
|
assert payload['slug'] == 'aap-google-oauth2-google-oauth2'
|
||||||
assert payload['type'] == 'ansible_base.authentication.authenticator_plugins.google_oauth2'
|
assert payload['type'] == 'ansible_base.authentication.authenticator_plugins.google_oauth2'
|
||||||
assert payload['enabled'] is True
|
assert payload['enabled'] is False
|
||||||
assert payload['create_objects'] is True
|
assert payload['create_objects'] is True
|
||||||
assert payload['remove_users'] is False
|
assert payload['remove_users'] is False
|
||||||
|
|
||||||
|
|||||||
@@ -56,12 +56,13 @@ class AzureADMigrator(BaseAuthenticatorMigrator):
|
|||||||
"name": authenticator_name,
|
"name": authenticator_name,
|
||||||
"slug": authenticator_slug,
|
"slug": authenticator_slug,
|
||||||
"type": "ansible_base.authentication.authenticator_plugins.azuread",
|
"type": "ansible_base.authentication.authenticator_plugins.azuread",
|
||||||
"enabled": True,
|
"enabled": False,
|
||||||
"create_objects": True,
|
"create_objects": True,
|
||||||
"remove_users": False,
|
"remove_users": False,
|
||||||
"configuration": {
|
"configuration": {
|
||||||
"KEY": key_value,
|
"KEY": key_value,
|
||||||
"SECRET": secret_value,
|
"SECRET": secret_value,
|
||||||
|
"GROUPS_CLAIM": "groups",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'org_mappers': org_mappers,
|
'org_mappers': org_mappers,
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ class GitHubMigrator(BaseAuthenticatorMigrator):
|
|||||||
"name": authenticator_name,
|
"name": authenticator_name,
|
||||||
"slug": authenticator_slug,
|
"slug": authenticator_slug,
|
||||||
"type": authenticator_type,
|
"type": authenticator_type,
|
||||||
"enabled": True,
|
"enabled": False,
|
||||||
"create_objects": True, # Allow Gateway to create users/orgs/teams
|
"create_objects": True, # Allow Gateway to create users/orgs/teams
|
||||||
"remove_users": False, # Don't remove users by default
|
"remove_users": False, # Don't remove users by default
|
||||||
"configuration": {"KEY": key_value, "SECRET": secret_value},
|
"configuration": {"KEY": key_value, "SECRET": secret_value},
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ class GoogleOAuth2Migrator(BaseAuthenticatorMigrator):
|
|||||||
"name": "google",
|
"name": "google",
|
||||||
"slug": authenticator_slug,
|
"slug": authenticator_slug,
|
||||||
"type": "ansible_base.authentication.authenticator_plugins.google_oauth2",
|
"type": "ansible_base.authentication.authenticator_plugins.google_oauth2",
|
||||||
"enabled": True,
|
"enabled": False,
|
||||||
"create_objects": True, # Allow Gateway to create users/orgs/teams
|
"create_objects": True, # Allow Gateway to create users/orgs/teams
|
||||||
"remove_users": False, # Don't remove users by default
|
"remove_users": False, # Don't remove users by default
|
||||||
"configuration": {
|
"configuration": {
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ class OIDCMigrator(BaseAuthenticatorMigrator):
|
|||||||
config_data = {
|
config_data = {
|
||||||
"name": "default",
|
"name": "default",
|
||||||
"type": self.AUTH_TYPE,
|
"type": self.AUTH_TYPE,
|
||||||
"enabled": True,
|
"enabled": False,
|
||||||
"create_objects": True,
|
"create_objects": True,
|
||||||
"remove_users": False,
|
"remove_users": False,
|
||||||
"configuration": {
|
"configuration": {
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ class SAMLMigrator(BaseAuthenticatorMigrator):
|
|||||||
"""
|
"""
|
||||||
found_configs = []
|
found_configs = []
|
||||||
|
|
||||||
enabled = True
|
enabled = False
|
||||||
remove_users = True
|
remove_users = True
|
||||||
create_objects = getattr(settings, "SAML_AUTO_CREATE_OBJECTS", True)
|
create_objects = getattr(settings, "SAML_AUTO_CREATE_OBJECTS", True)
|
||||||
idps = getattr(settings, "SOCIAL_AUTH_SAML_ENABLED_IDPS", {})
|
idps = getattr(settings, "SOCIAL_AUTH_SAML_ENABLED_IDPS", {})
|
||||||
|
|||||||
Reference in New Issue
Block a user