mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 01:17:37 -02:30
Enhance secret retrieval documentation (#13914)
This commit is contained in:
@@ -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:
|
If necessary, credentials and encrypted settings can be extracted using the AWX shell:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
# awx-manage shell_plus
|
$ awx-manage shell_plus
|
||||||
>>> from awx.main.utils import decrypt_field
|
>>> from awx.main.utils import decrypt_field
|
||||||
>>> cred = Credential.objects.get(name="my private key")
|
>>> print(decrypt_field(Credential.objects.get(name="my private key"), "ssh_key_data")) # Example for a credential
|
||||||
>>> print(decrypt_field(cred, "ssh_key_data"))
|
>>> 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
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user