From 7ec56a56e53dad5bc0d211f7d274914ce4b01fab Mon Sep 17 00:00:00 2001 From: Adam Migus Date: Tue, 29 Jun 2021 15:37:36 -0400 Subject: [PATCH] Fixed it. --- awx/main/credential_plugins/tss.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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']), )