Bug 1880252 - [ceph-ansible] docker registry password with special character quotation(') fails to log in when running ansible-playbook
Summary: [ceph-ansible] docker registry password with special character quotation(') f...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: Ceph-Ansible
Version: 4.1
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
: 4.2
Assignee: Dimitri Savineau
QA Contact: Ameena Suhani S H
Amrita
URL:
Whiteboard:
Depends On:
Blocks: 1890121
TreeView+ depends on / blocked
 
Reported: 2020-09-18 05:37 UTC by James Biao
Modified: 2023-12-15 19:25 UTC (History)
14 users (show)

Fixed In Version: ceph-ansible-4.0.34-1.el8cp, ceph-ansible-4.0.34-1.el7cp
Doc Type: Bug Fix
Doc Text:
.Special characters can be set in the Docker registry password Previously, special characters set in the Docker registry password were not handled correctly. With this release, the Ansible playbook does not fail when special characters are set in the Docker registry password. Special characters can now be used in the Docker registry password and the Ansible playbook works as expected
Clone Of:
Environment:
Last Closed: 2021-01-12 14:57:11 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github ceph ceph-ansible pull 5805 0 None closed [skip ci] container: quote registry password 2021-01-26 15:22:17 UTC
Red Hat Product Errata RHSA-2021:0081 0 None None None 2021-01-12 14:57:38 UTC

Description James Biao 2020-09-18 05:37:13 UTC
Description of problem:

Docker registry password with special character as configured in all.yml

"ceph_docker_registry_password: 123abc&'()"

podman login fails when installing with error

"ValueError: No closing quotation"




Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. set registry.redhat.io password with '
2. set password in all.yml ceph_docker_registry_password
3. ansible-playbook -i <hosts> site-docker.yml 

Actual results:
ansible-playbook fails

Expected results:
podman log in successful with special character password

Additional info:

Comment 1 James Biao 2020-09-18 05:46:57 UTC
Tried multiple formats of the password configurations in all.yml, like 123abc\&\'\(\) with no luck.

From /roles/ceph-container-common/tasks/registry.yml , Enclose variable in double quotes like "{{ ceph_docker_registry_password }}" has resolved the issue

Change from
---
- name: container registry authentication
  command: '{{ container_binary }} login -u {{ ceph_docker_registry_username }} -p {{ ceph_docker_registry_password }} {{ ceph_docker_registry }}'
  changed_when: false
  no_log: false
---

to

---
- name: container registry authentication
  command: '{{ container_binary }} login -u {{ ceph_docker_registry_username }} -p "{{ ceph_docker_registry_password }}" {{ ceph_docker_registry }}'
  changed_when: false
  no_log: false
---

In addition setting  no_log: true may protect the password

Comment 14 errata-xmlrpc 2021-01-12 14:57:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Red Hat Ceph Storage 4.2 Security and Bug Fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:0081


Note You need to log in before you can comment on or make changes to this bug.