From cf0bc16cf782fd7f1c81c575904c99d98d819419 Mon Sep 17 00:00:00 2001 From: Bruno Cesar Rocha Date: Fri, 1 Aug 2025 19:38:33 +0100 Subject: [PATCH] fix: tacacs+ -> TACACSPLUS (#7039) * fix: tacacs+ -> TACACSPLUS Gateway doesn't allow `+` to be used in slug. AAP-50774 * Fixed assertion --------- Co-authored-by: Andrew Potozniak --- awx/sso/tests/unit/test_tacacs_migrator.py | 2 +- awx/sso/utils/tacacs_migrator.py | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/awx/sso/tests/unit/test_tacacs_migrator.py b/awx/sso/tests/unit/test_tacacs_migrator.py index fa5bc43479..05c075d33b 100644 --- a/awx/sso/tests/unit/test_tacacs_migrator.py +++ b/awx/sso/tests/unit/test_tacacs_migrator.py @@ -12,7 +12,7 @@ def test_get_controller_config(test_tacacs_config): result = obj.get_controller_config() assert len(result) == 1 config = result[0] - assert config['category'] == 'TACACS+' + assert config['category'] == 'TACACSPLUS' settings_data = config['settings'] assert settings_data['name'] == 'default' assert settings_data['type'] == 'ansible_base.authentication.authenticator_plugins.tacacs' diff --git a/awx/sso/utils/tacacs_migrator.py b/awx/sso/utils/tacacs_migrator.py index 5279c74fba..39666a7097 100644 --- a/awx/sso/utils/tacacs_migrator.py +++ b/awx/sso/utils/tacacs_migrator.py @@ -14,12 +14,14 @@ class TACACSMigrator(BaseAuthenticatorMigrator): Handles the migration of TACACS+ authenticators from AWX to Gateway. """ - CATEGORY = "TACACS+" + CATEGORY = "TACACSPLUS" AUTH_TYPE = "ansible_base.authentication.authenticator_plugins.tacacs" def get_authenticator_type(self): - """Get the human-readable authenticator type name.""" - return "TACACS+" + """Get the human-readable authenticator type name. + Named TACACSPLUS because `+` is not allowed in authenticator slug. + """ + return "TACACSPLUS" def get_controller_config(self): """