Preparing the private CA and trust bundle

Create a certificate authority that signs the registry, Cloudera Cloud Core endpoint, and Cloudera Cloud Factory host certificates, and distribute the CA certificate to every host that must trust it.

In this procedure, you create a certificate authority (CA) that signs the certificates for the registry, the Cloudera Cloud Core endpoints, and the Cloudera Cloud Factory hosts, and you distribute the CA certificate to every host that must trust it. If your organization already has a private CA, use it and skip the creation step.

  • You have a secure location in which to store the CA key.
  • You have openssl on the host where you generate the CA.
  1. Generate the CA key and a version 3 CA certificate with the extensions that cert-manager requires.
    openssl genrsa -out ca.key 4096
    cat > ca.cnf <<'EOF'
    [req]
    distinguished_name = dn
    x509_extensions = v3_ca
    prompt = no
    [dn]
    CN = Example Private CA
    [v3_ca]
    basicConstraints = critical,CA:TRUE
    keyUsage = critical,digitalSignature,keyCertSign,cRLSign
    subjectKeyIdentifier = hash
    authorityKeyIdentifier = keyid:always
    EOF
    openssl req -x509 -new -nodes -key ca.key -sha256 -days 3650 \
      -config ca.cnf -extensions v3_ca -out ca.crt
    rm ca.cnf
  2. Verify the extensions.
    openssl x509 -in ca.crt -noout -text | grep -A1 -E 'Version:|Basic Constraints|Key Usage'

    The output must show Version: 3, X509v3 Basic Constraints: critical with CA:TRUE, and X509v3 Key Usage: critical with Digital Signature, Certificate Sign, CRL Sign.

  3. Combine the CA certificate and any intermediate certificates into one file, ca-chain.pem.
  4. On every Cloudera Cloud Core host and every host that pulls from the registry, install the chain in the system trust store.

    On Ubuntu:

    sudo cp ca-chain.pem /usr/local/share/ca-certificates/example-ca-chain.crt
    sudo update-ca-certificates
    sudo systemctl restart containerd

    On RHEL:

    sudo cp ca-chain.pem /etc/pki/ca-trust/source/anchors/example-ca-chain.crt
    sudo update-ca-trust
    sudo systemctl restart containerd

The hosts trust certificates that the CA signs. You mount the host trust store into the LCM container later, in the section Trusting the registry CA in the LCM container.