Verifying trust material before you deploy engines

Run a pre-flight check against the source Cloudera Cloud Factory project cluster before you deploy Anywhere Cloud engines, so that you catch certificate authority (CA) entries that Anywhere Cloud drops from the workload trust snapshot.

The Anywhere Cloud workload CA snapshot keeps only parseable CA certificates that have a valid basicConstraints extension with CA:TRUE. Leaf certificates, certificates with no basicConstraints extension, malformed blocks, and non-certificate PEM entries are silently dropped, which can cause engines to fail with an unknown authority error. For background, see Certificates and trust profile management in Anywhere Cloud.

The check extracts the inline trust sources and the public certificate from the signing-CA Secret, splits the PEM into individual certificates, and prints the Basic Constraints of each one so that you can see which entries are eligible and which are dropped. The check reads the public certificate tls.crt only, never the private key tls.key.

  • You have kubectl access to the source Cloudera Cloud Factory project cluster.
  • You have jq and openssl installed on your local machine.
  1. Extract the trust bundle inline sources into a fresh scratch file.
    kubectl get bundles.trust.cert-manager.io ccf-trust-bundle -o json \
      | jq -r '.spec.sources[].inLine // empty' > /tmp/ccf-inline.pem
  2. Optional: If the signing-CA Secret ca-key-pair exists, append its public certificate.
    kubectl -n ccf-cert-manager get secret ca-key-pair -o json \
      | jq -r '.data["tls.crt"]' | base64 -d >> /tmp/ccf-inline.pem

    Trust-only profiles do not have a signing-CA Secret. For those profiles, run the bundle check without this step.

  3. Split the combined PEM into individual certificates in a fresh scratch directory.
    mkdir -p /tmp/ccf-parts && awk '/-----BEGIN CERTIFICATE-----/{n++} n{print > sprintf("/tmp/ccf-parts/cert-%02d.pem", n)}' /tmp/ccf-inline.pem
  4. Print the subject and Basic Constraints of each certificate.
    for f in /tmp/ccf-parts/cert-*.pem; do
      printf '%s  %s  ' "$f" "$(openssl x509 -in "$f" -noout -subject)"
      bc=$(openssl x509 -in "$f" -noout -text | grep -A1 'Basic Constraints' | tr -d '\n' | sed 's/  */ /g')
      echo "${bc:-<no basicConstraints extension: will be dropped>}"
    done
  5. Interpret the results.
    • CA:TRUE identifies CA material that is eligible for inclusion.
    • CA:FALSE and the no-extension message identify entries that are dropped from the workload CA snapshot.
    • An OpenSSL parse failure identifies material that you must correct.

    When only a self-signed leaf certificate exists for an endpoint, obtain a proper CA-signed certificate or re-issue the material. Changing the PEM text cannot turn a leaf certificate into a CA certificate.

You have confirmed which CA certificates Anywhere Cloud includes in the workload trust snapshot, and you have corrected or re-issued any dropped or unparseable material before deploying engines.

Existing Anywhere Cloud engine trust is copied when you create, upgrade, or rebuild an engine. Editing a Certificate & Trust profile does not refresh the trust snapshot of an engine that is already running. After you change profile material:

  • In Cloudera Cloud Factory, run Repair on every project that uses the profile. For projects with external DNS enabled, dns-cert sync is another available method. CA-only and trust-only projects require Repair because the sync endpoint rejects them.
  • Restart any pods that mount the bundle through an injected subPath CA mount, so that they pick up the changed bundle.