diff --git a/awx/main/credential_plugins/tss.py b/awx/main/credential_plugins/tss.py index 41ab72c28e..df4d3e7793 100644 --- a/awx/main/credential_plugins/tss.py +++ b/awx/main/credential_plugins/tss.py @@ -1,7 +1,7 @@ from .plugin import CredentialPlugin from django.utils.translation import ugettext_lazy as _ -from thycotic.secrets.server import SecretServer, PasswordGrantAuthorizer +from thycotic.secrets.server import SecretServerV1 as SecretServer, PasswordGrantAuthorizer tss_inputs = { 'fields': [ @@ -30,7 +30,7 @@ tss_inputs = { 'id': 'secret_id', 'label': _('Secret ID'), 'help_text': _('The integer ID of the secret'), - 'type': 'int', + 'type': 'string', }, ], 'required': ['server_url', 'username', 'password', 'secret_id'], @@ -40,6 +40,6 @@ tss_plugin = CredentialPlugin( 'Thycotic Secret Server', tss_inputs, lambda **kwargs: SecretServer( - PasswordGrantAuthorizer(**{k: v for (k, v) in kwargs.items() if k in [field['id'] for field in tss_inputs['fields']]}) + kwargs['server_url'], PasswordGrantAuthorizer(kwargs['server_url'].rstrip('/') + '/oauth2/token', kwargs['username'], kwargs['password']) ).get_secret(kwargs['secret_id']), )