mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 12:41:19 -03:30
Enhance secret retrieval documentation (#13914)
This commit is contained in:
parent
3919ea6270
commit
22464a5838
@ -12,8 +12,13 @@ To encrypt secret fields, AWX uses AES in CBC mode with a 256-bit key for encryp
|
||||
If necessary, credentials and encrypted settings can be extracted using the AWX shell:
|
||||
|
||||
```python
|
||||
# awx-manage shell_plus
|
||||
$ awx-manage shell_plus
|
||||
>>> from awx.main.utils import decrypt_field
|
||||
>>> cred = Credential.objects.get(name="my private key")
|
||||
>>> print(decrypt_field(cred, "ssh_key_data"))
|
||||
>>> print(decrypt_field(Credential.objects.get(name="my private key"), "ssh_key_data")) # Example for a credential
|
||||
>>> print(decrypt_field(Setting.objects.get(key='SOCIAL_AUTH_AZUREAD_OAUTH2_SECRET'), 'value')) # Example for a setting
|
||||
```
|
||||
|
||||
If you are running a kubernetes based deployment, you can execute awx-manage like this:
|
||||
```bash
|
||||
$ kubectl exec --stdin --tty [instance name]-task-[...] -c [instance name]-task -- awx-manage shell_plus
|
||||
```
|
||||
Loading…
x
Reference in New Issue
Block a user