Why should secrets never be passed as AWX extra vars?
BeginnerProductionAWX, AAP and Cloud Integration
Answer
Extra vars are stored in the job record and shown in the job details to anyone who can view the job, and they can end up in the activity stream and API responses. A password passed as an extra var is effectively published.
Instead:
- Store secrets in credentials (built-in or custom types), which are encrypted and injected without being shown.
- If a survey must collect a secret, use the password field type, which is masked and encrypted.
- Mark tasks handling the secret with
no_log: trueso the value does not appear in job output.
Treat job output and extra vars as readable by your whole automation user base, because in practice they are.
More on AWX, AAP and Cloud Integration
AWX or Red Hat Ansible Automation Platform: what is the difference and what do you pay for?BeginnerWhat are the core objects in AWX and how do they fit together?BeginnerHow do you manage AWX configuration as code?IntermediateHow do custom credential types work in AWX?AdvancedHow do you connect AWX to an external secrets manager?IntermediateHow do you trigger AWX jobs from CI or other systems?Intermediate