# Encrypted variable in settings

**URL:** <https://forum.ansible.com/t/encrypted-variable-in-settings/38280>\
**Category:** AWX Project\
**Created:** [July 31, 2023, 1:10pm UTC](https://forum.ansible.com/t/encrypted-variable-in-settings/38280 "2023-07-31T13:10:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dawid.grygrzc](https://avatars.discourse-cdn.com/v4/letter/d/59ef9b/32.png) [@dawid.grygrzc](https://forum.ansible.com/u/dawid.grygrzc)\
**Post date:** [July 31, 2023, 1:10pm UTC](https://forum.ansible.com/t/encrypted-variable-in-settings/38280/1 "2023-07-31T13:10:02Z")

</div>

Hello everyone!  
I have a few variables in Settings\>Job Settings\>Extra Environment Variables, which should be encrypted.

I kindly ask if there is any chance to encrypt the mentioned variables.

---

<div class="post-metadata">

**Author:** ![Pi3tr4sh3k](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/pi3tr4sh3k/32/1529_2.png) [@Pi3tr4sh3k](https://forum.ansible.com/u/Pi3tr4sh3k)\
**Post date:** [August 1, 2023, 2:10pm UTC](https://forum.ansible.com/t/encrypted-variable-in-settings/38280/2 "2023-08-01T14:10:42Z")

</div>

bump

---

<div class="post-metadata">

**Author:** ![iamroddo](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/iamroddo/32/321_2.png) [@iamroddo](https://forum.ansible.com/u/iamroddo)\
**Post date:** [August 2, 2023, 7:51am UTC](https://forum.ansible.com/t/encrypted-variable-in-settings/38280/3 "2023-08-02T07:51:10Z")

</div>

Not speaking as an expert, but IMHO an environment variable is not by itself encrypted, it’s value is text that can be seen by whomever or whatever has the rights to view the values of environment variables. There is nothing stopping a process encrypting the string prior to setting it as the value of an environment variable and then provisioning the intended consumer of this environment variable with the means to decrypt it.

---

<div class="post-metadata">

**Author:** ![AWX\_Project](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@AWX\_Project](https://forum.ansible.com/u/AWX_Project)\
**Post date:** [August 2, 2023, 6:58pm UTC](https://forum.ansible.com/t/encrypted-variable-in-settings/38280/4 "2023-08-02T18:58:51Z")

</div>

If these variables contain sensitive data, it would be better to create a custom credential that injects these environment variables

[https://docs.ansible.com/automation-controller/latest/html/userguide/credential\_types.html#create-a-new-credential-type](https://docs.ansible.com/automation-controller/latest/html/userguide/credential_types.html#create-a-new-credential-type)

AWX Team

---

<div class="post-metadata">

**Author:** ![dawid.grygrzc](https://avatars.discourse-cdn.com/v4/letter/d/59ef9b/32.png) [@dawid.grygrzc](https://forum.ansible.com/u/dawid.grygrzc)\
**Post date:** [August 18, 2023, 2:24pm UTC](https://forum.ansible.com/t/encrypted-variable-in-settings/38280/5 "2023-08-18T14:24:10Z")

</div>

Thanks, it works!
