cert-manager cainjector changes trust material inside admission paths

The cert-manager cainjector copies CA data from a source into resources that need a trust bundle. It can populate a webhook configuration's caBundle from a Certificate or Secret, or use the API server CA when the annotation requests it. That automation keeps admission webhooks working during certificate rotation. It also means a controller is changing trust material that other security controls rely on.

The observed footprint

At 2026-11-18 17:52 UTC, with sub_type=all, page 1, and page size 1, ZoomEye returned:

  • app="cert-manager": 0
  • title="cert-manager": 42
  • http.body="cert-manager": 1,789

This is not a count of exposed cainjector pods. The controller normally runs inside Kubernetes and does not need a public listener. Body matches may represent documentation, dashboards, error pages, or configuration examples. The application field produced no match for the selected query.

Injection is a trust change

The cainjector watches annotatable resources and populates CA data when an injection annotation is present. A ValidatingWebhookConfiguration can have cert-manager.io/inject-ca-from or inject-ca-from-secret. An inject-apiserver-ca annotation uses the API server's CA. The source and target must both be authorized and owned.

If a target webhook is intentionally protected by a specific CA, an unexpected injection can cause the API server to trust a different certificate. The webhook may then accept a server identity the security team did not expect. If the target is not protected and the new trust bundle is too broad, an attacker who can obtain a matching certificate may be able to impersonate the webhook.

Review the annotations and sources, not just the cainjector deployment. Confirm that each target is intended to be managed by cainjector and that the source Certificate or Secret has an owner. Check that the webhook's service name, namespace, and certificate subject match the source.

Keep the control loops scoped

The cainjector CLI reference includes flags that enable injection for additional resource types. Enable only the targets the environment needs. Restrict the controller's RBAC so it cannot write arbitrary webhook configurations or API service objects. Keep its service account separate from workload identities that can create certificates.

Monitor changes to caBundle fields and correlate them with certificate rotation events. An unexpected change should be investigated as a change in the admission trust chain. Preserve the old value and the source object so the API server can be returned to a known state if the update is wrong.

A practical review

List every webhook or API service with a cert-manager injection annotation. For each, record the source, target, intended CA, rotation schedule, and owner. Verify that the source has a certificate that matches the serving endpoint. Test a rotation in staging and confirm that admission continues to work without trusting an unrelated CA.

ZoomEye is useful for finding public pages that mention cert-manager, not for measuring the internal cainjector loop. The internal trust relationship is the control that matters.

References