bhouse-nexthop opened a new issue, #14917:
URL: https://github.com/apache/cloudstack/issues/14917

   ### Problem
   
   When a CKS cluster is created with a private registry (`dockerregistryurl`, 
`dockerregistryusername`,
   `dockerregistrypassword`):
   
   1. Every worker and control node runs `/opt/bin/setup-containerd` from its 
cloud-config as
      `bash -x /opt/bin/setup-containerd`. The trace prints each line of the 
script with its values filled in, so the
      registry user name and password (in plain text, and as the base64 auth 
string) are written to
      `/var/log/cloud-init-output.log` on every node.
   2. The registry URL, user name and password are put into the cloud-config by 
plain text substitution. A double quote,
      backslash, `$` or newline in them breaks the generated script or the 
YAML. The control node template is rendered
      by cloud-init as a Jinja template, so `{{`, `{%` or `{#` in any of these 
values makes the rendering fail; cloud-init
      then drops the whole cloud-config and the control node is never set up.
   
   `/opt/bin/setup-containerd` is also mode 0755, and the containerd config it 
writes the credentials into is 0644.
   
   ### Steps to reproduce
   
   1. Create a CKS cluster with a private registry.
   2. On a worker node, `sudo grep -c auth /var/log/cloud-init-output.log` 
finds the traced lines with the base64 auth
      string (`username`/`password` in plain text on 4.22).
   3. With `{{` in the password, the control node does not come up.
   
   ### Expected
   
   No registry credential in the node logs or in files other users can read, 
and any character in the registry values
   gets to containerd unchanged.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

  • [I] CKS: private registry cre... bhouse-nexthop (via GitHub) via commits

Reply via email to