mirror of
https://github.com/ansible/awx.git
synced 2026-05-12 11:57:37 -02:30
My changes.
This commit is contained in:
committed by
Adam Migus
parent
0cc6bf9b60
commit
b0b295ba1e
@@ -8,19 +8,19 @@ tss_inputs = {
|
|||||||
{
|
{
|
||||||
'id': 'server_url',
|
'id': 'server_url',
|
||||||
'label': _('Secret Server URL'),
|
'label': _('Secret Server URL'),
|
||||||
'help_text': _(''),
|
'help_text': _('The Base URL of Secret Server e.g. https://myserver/SecretServer or https://mytenant.secretservercloud.com'),
|
||||||
'type': 'string',
|
'type': 'string',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'id': 'username',
|
'id': 'username',
|
||||||
'label': _('Username'),
|
'label': _('Username'),
|
||||||
'help_text': _(''),
|
'help_text': _('The (Application) user username'),
|
||||||
'type': 'string',
|
'type': 'string',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'id': 'password',
|
'id': 'password',
|
||||||
'label': _('Password'),
|
'label': _('Password'),
|
||||||
'help_text': _(''),
|
'help_text': _('The corresponding password'),
|
||||||
'type': 'string',
|
'type': 'string',
|
||||||
'secret': True,
|
'secret': True,
|
||||||
},
|
},
|
||||||
@@ -29,17 +29,17 @@ tss_inputs = {
|
|||||||
{
|
{
|
||||||
'id': 'secret_id',
|
'id': 'secret_id',
|
||||||
'label': _('Secret ID'),
|
'label': _('Secret ID'),
|
||||||
'help_text': _(''),
|
'help_text': _('The integer ID of the secret'),
|
||||||
'type': 'int',
|
'type': 'int',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
'required': ['server_url', 'username', 'password', 'secret_id'],
|
'required': ['server_url', 'username', 'password', 'secret_id'],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tss_plugin = CredentialPlugin(
|
||||||
def tss_backend(**kwargs):
|
'Thycotic Secret Server',
|
||||||
authorizer = PasswordGrantAuthorizer(kwargs['server_url'], kwargs['username'], kwargs['password'])
|
tss_inputs,
|
||||||
return SecretServer(authorizer).get_secret(kwargs['secret_id'])
|
lambda **kwargs: SecretServer(
|
||||||
|
PasswordGrantAuthorizer(**{k: v for (k, v) in kwargs.items() if k in [field['id'] for field in tss_inputs['fields']]})
|
||||||
|
).get_secret(kwargs['secret_id']),
|
||||||
tss_plugin = CredentialPlugin('Thycotic Secret Server', inputs=tss_inputs, backend=tss_backend)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user