mirror of
https://github.com/ansible/awx.git
synced 2026-02-25 15:06:02 -03:30
fix a bug that prevents launch-time passphrases w/ cred plugins
with the advent of credential plugins there's no way for us to *actually
know* the RSA key value at the time the credential is _created_, because
the order of operations is:
1. Create the credential with a specified passphrase
2. Associate a new dynamic inventory source pointed at some third party
provider (hashi, cyberark, etc...)
this commit removes the code that warns you about an extraneous
passphrase (if you don't specify a private key)
additionally, the code for determining whether or not a credential
_requires_ a password/phrase at launch time has been updated to test
private key validity based on the *actual* value from the third party
provider
see: https://github.com/ansible/awx/issues/4791
This commit is contained in:
@@ -137,7 +137,6 @@ def test_credential_creation(organization_factory):
|
||||
[PKCS8_PRIVATE_KEY, None, True], # unencrypted PKCS8 key, no unlock pass
|
||||
[PKCS8_PRIVATE_KEY, 'passme', False], # unencrypted PKCS8 key, unlock pass
|
||||
[None, None, True], # no key, no unlock pass
|
||||
[None, 'super-secret', False], # no key, unlock pass
|
||||
['INVALID-KEY-DATA', None, False], # invalid key data
|
||||
[EXAMPLE_PRIVATE_KEY.replace('=', '\u003d'), None, True], # automatically fix JSON-encoded GCE keys
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user