* disable authenticators that require updating the redirect URL and add groups claim to AzureAD migrator

* update tests
This commit is contained in:
Peter Braun
2025-08-11 18:46:08 +02:00
committed by thedoubl3j
parent 0b17007764
commit 4f2d28db51
6 changed files with 7 additions and 6 deletions

View File

@@ -54,7 +54,7 @@ def test_create_gateway_authenticator(mocker, test_google_config):
assert payload['name'] == 'google'
assert payload['slug'] == 'aap-google-oauth2-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['remove_users'] is False

View File

@@ -56,12 +56,13 @@ class AzureADMigrator(BaseAuthenticatorMigrator):
"name": authenticator_name,
"slug": authenticator_slug,
"type": "ansible_base.authentication.authenticator_plugins.azuread",
"enabled": True,
"enabled": False,
"create_objects": True,
"remove_users": False,
"configuration": {
"KEY": key_value,
"SECRET": secret_value,
"GROUPS_CLAIM": "groups",
},
},
'org_mappers': org_mappers,

View File

@@ -157,7 +157,7 @@ class GitHubMigrator(BaseAuthenticatorMigrator):
"name": authenticator_name,
"slug": authenticator_slug,
"type": authenticator_type,
"enabled": True,
"enabled": False,
"create_objects": True, # Allow Gateway to create users/orgs/teams
"remove_users": False, # Don't remove users by default
"configuration": {"KEY": key_value, "SECRET": secret_value},

View File

@@ -71,7 +71,7 @@ class GoogleOAuth2Migrator(BaseAuthenticatorMigrator):
"name": "google",
"slug": authenticator_slug,
"type": "ansible_base.authentication.authenticator_plugins.google_oauth2",
"enabled": True,
"enabled": False,
"create_objects": True, # Allow Gateway to create users/orgs/teams
"remove_users": False, # Don't remove users by default
"configuration": {

View File

@@ -52,7 +52,7 @@ class OIDCMigrator(BaseAuthenticatorMigrator):
config_data = {
"name": "default",
"type": self.AUTH_TYPE,
"enabled": True,
"enabled": False,
"create_objects": True,
"remove_users": False,
"configuration": {

View File

@@ -64,7 +64,7 @@ class SAMLMigrator(BaseAuthenticatorMigrator):
"""
found_configs = []
enabled = True
enabled = False
remove_users = True
create_objects = getattr(settings, "SAML_AUTO_CREATE_OBJECTS", True)
idps = getattr(settings, "SOCIAL_AUTH_SAML_ENABLED_IDPS", {})