mirror of
https://github.com/ansible/awx.git
synced 2026-03-02 17:28:51 -03:30
Encrypt machine.ssh_public_key_data (in case users paste in signed data)
This commit is contained in:
committed by
Jake McDermott
parent
ca6d124417
commit
13366c1e75
@@ -824,6 +824,7 @@ ManagedCredentialType(
|
|||||||
'label': ugettext_noop('Signed SSH Certificate'),
|
'label': ugettext_noop('Signed SSH Certificate'),
|
||||||
'type': 'string',
|
'type': 'string',
|
||||||
'multiline': True,
|
'multiline': True,
|
||||||
|
'secret': True,
|
||||||
}, {
|
}, {
|
||||||
'id': 'ssh_key_unlock',
|
'id': 'ssh_key_unlock',
|
||||||
'label': ugettext_noop('Private Key Passphrase'),
|
'label': ugettext_noop('Private Key Passphrase'),
|
||||||
@@ -1360,8 +1361,11 @@ class CredentialInputSource(PrimordialModel):
|
|||||||
backend_kwargs[field_name] = value
|
backend_kwargs[field_name] = value
|
||||||
|
|
||||||
backend_kwargs.update(self.metadata)
|
backend_kwargs.update(self.metadata)
|
||||||
|
raw = self.target_credential.inputs.get(self.input_field_name)
|
||||||
|
if self.input_field_name in self.target_credential.credential_type.secret_fields:
|
||||||
|
raw = decrypt_field(self.target_credential, self.input_field_name)
|
||||||
return backend(
|
return backend(
|
||||||
self.target_credential.inputs.get(self.input_field_name),
|
raw,
|
||||||
**backend_kwargs
|
**backend_kwargs
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user