Skip to content

Custom CA overwritten when certs::server_ca_cert is undefined #456

@selfsealingstembolts

Description

@selfsealingstembolts

When upgrading a smart proxy with a custom certificate bundle from Foreman 3.10, which uses puppet-certs v17.1.1, to Foreman 3.11, which uses puppet-certs v18.0.0, foreman-installer will fail with TLS verification errors.

The root cause is this module overwriting the custom CA in /root/ssl-build/katello-server-ca.crt with the contents of /root/ssl-build/katello-default-ca.crt when certs::server_ca_cert is undefined in the foreman-installer scenario answers file.

This behavior can be seen here. The commit introducing this behavior is 433dadc.

A workaround is to set the following values in /etc/foreman-installer/scenarios.d/foreman-proxy-content-answers.yaml

certs:
  server_cert: "/root/ssl-build/${smart-proxy.example.com}/${smart-proxy.example.com}-foreman-proxy.crt"
  server_key: "/root/ssl-build/${smart-proxy.example.com}/${smart-proxy.example.com}-foreman-proxy.key"
  server_ca_cert: "/root/ssl-build/katello-server-ca.crt"

The values of certs::server_cert and certs:server_key are required along with certs:server_ca_cert otherwise the installer will fail on the katello-certs-check step.

I am not sure what an appropriate fix would look like. It does seem desirable to use the default CA if it is not explicitly defined. The obvious candidate is testing if /root/ssl-build/katello-server-ca.crt already exists before overwriting it with the default CA. Alternatively, applying a migration to explicitly define the values mentioned above. Migrations appear to be outside the scope of this repository however.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions