Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installer: Don't quote passwords when not subject to shell interpolation #7695

Closed
philipsd6 opened this issue Jul 21, 2020 · 0 comments · Fixed by #7696
Closed

Installer: Don't quote passwords when not subject to shell interpolation #7695

philipsd6 opened this issue Jul 21, 2020 · 0 comments · Fixed by #7696
Labels

Comments

@philipsd6
Copy link
Contributor

ISSUE TYPE
  • Bug Report
SUMMARY

When setting docker_registry_password either with -e or directly in the installer/inventory file, the installer fails when the docker registry authentication fails, because the value s3cr1t is passed as 's3cr1t' due to the changes introduced in #3987.

ENVIRONMENT
  • AWX version: 13.0.0 (#bedbafe0f)
  • AWX install method: docker on linux
  • Ansible version: 2.8.12.post0
  • Operating System: Ubuntu 19.10 local / RHEL 7.6 remote
  • Web Browser: Firefox 78.0.2 (64-bit)
STEPS TO REPRODUCE
cd installer
ansible-playbook -i inventory -e docker_registry_password="s3cr1t" install.yml \
    --start-at-task="Authenticate with Docker registry if registry password given" -e "awx_version=13.0.0"
EXPECTED RESULTS
TASK [image_push : Authenticate with Docker registry if registry password given]
********************************************************************************
changed: [REMOTESERVER -> localhost]          
ACTUAL RESULTS
TASK [image_push : Authenticate with Docker registry if registry password given]
********************************************************************************
fatal: [REMOTESERVER -> localhost]: FAILED! => {"changed": false, "msg": "Logging into dockerhub.internal.site for user philipsd6 failed - 401 Client Error: Unauthorized (\"Get https://dockerhub.internal.site/v2/: unauthorized: BAD_CREDENTIAL\")"}                                                       
ADDITIONAL INFORMATION

The quote filter used in #3987 is appropriate for all the cases where passwords are exposed to the shell, via the shell or command module, or via templating into environment files. But this variable is supplied directly to the docker_image module, so it shouldn't be quoted.

philipsd6 added a commit to AmadeusITGroup/awx that referenced this issue Jul 21, 2020
The docker_registry_password var isn't interpolated by the shell, so
it shouldn't be quoted

Fixes: ansible#7695
Signed-off-by: Philip Douglass <[email protected]>
philipsd6 pushed a commit to AmadeusITGroup/awx that referenced this issue Jul 21, 2020
The docker_registry_password var isn't interpolated by the shell, so
it shouldn't be quoted

Fixes: ansible#7695
Signed-off-by: Philip DOUGLASS <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants