Security model for the cert-manager issuer
Enterprise
Appropriate Vault Enterprise license required
The Vault Secrets Operator can act as a cert-manager external issuer for Vault Enterprise. This security model describes how the integration handles certificate requests, the risks of issuing certificates for unauthorized names or identities, and controls you can use to reduce those risks.
cert-manager issuer overview
cert-manager manages certificate requests and private keys in Kubernetes. The
Vault Secrets Operator uses a VaultIssuer or VaultClusterIssuer and its
referenced VaultAuth to authenticate to Vault and sign approved requests with
a Vault PKI role. A VaultIssuer serves its own namespace; a
VaultClusterIssuer can serve the namespaces allowed by its VaultAuth.
The Vault PKI role constrains certificate names and lifetimes, and the approval
mechanism determines which requests can reach Vault. Neither a shared issuer nor
allowedNamespaces limits the names each permitted namespace can request.
Process flow
- A requester creates a cert-manager
Certificatethat references aVaultIssuerorVaultClusterIssuer. cert-manager generates a private key and creates aCertificateRequestcontaining a certificate signing request (CSR). A requester can also create aCertificateRequestusing a CSR for a private key they already hold. - An approver approves or denies the request. The operator signs only approved requests. cert-manager prevents changes to the request specification after creation.
- The operator resolves the issuer's
VaultAuthandVaultConnection, authenticates to Vault, and sends the CSR to the Vault PKI signing endpoint. - Vault returns the signed certificate and CA chain. The operator writes them to
the
CertificateRequeststatus. - For a
Certificate, cert-manager writes the private key, certificate, and CA chain to a Kubernetes TLS Secret. The Kubernetes API server stores the request and Secret in etcd, and workloads can use the Secret. - cert-manager renews the certificate before it expires.
The CSR, signed certificate, and CA chain are not secret. The private key is sensitive and never passes through the operator or Vault. Refer to the certificate issuance workflow for more details.
Security controls
| Control | Implementation and recommendation |
|---|---|
| Vault authentication | Set vaultAuthRef explicitly and use a dedicated VaultAuth and Vault role for each unit of trust. Do not grant PKI signing permissions to the operator namespace's default VaultAuth, which every namespace can use. |
| Namespace access | Use an explicit allowedNamespaces list for a VaultAuth with signing permissions, not ["*"]. The operator checks a VaultIssuer's namespace or a VaultClusterIssuer request's namespace. |
| PKI authorization | Scope the Vault PKI role to permitted DNS names, URI and IP subject alternative names, and certificate lifetimes. Grant its Vault policy only the required signing paths and read on sys/license/status. |
| Request approval | In multi-tenant clusters, keep certManager.approverRBAC.enabled disabled and use approver-policy to control which requests each namespace can make. |
| Vault TLS | Verify the Vault server certificate. Configure caCertSecretRef and, when needed, tlsServerName for a private CA; do not set skipTLSVerify. |
| Kubernetes access | Restrict access to issuer resources, their dependencies, the operator namespace, and TLS Secrets using Kubernetes role-based access control (RBAC). |
| Auditing | Enable and monitor Vault and Kubernetes audit logs. Correlate Vault audit entries with the requester recorded on the CertificateRequest. |
| Certificate lifetime | Set a short PKI role max_ttl and use cert-manager for renewal. Deleting a Certificate, CertificateRequest, or issuer does not revoke a certificate in Vault. |
Threat model coverage
Vault connection and trust anchors
An attacker who can impersonate Vault or modify traffic between Vault and the
operator can substitute a certificate and CA chain. cert-manager may place the
returned CA in the Secret's ca.crt, where a workload could use it as a trust
anchor.
Use TLS and verify the Vault server's certificate. Distribute workload trust
anchors independently, for example with
trust-manager, instead of
trusting the ca.crt in each issued Secret.
Signing permissions and shared issuers
An overly permissive PKI role can allow an approved requester to obtain
certificates for names or URI identities belonging to another tenant, even
when the VaultAuth namespace access is correctly scoped. The operator does not
restrict names based on the requesting namespace.
Configure each PKI role for its unit of trust, including allowed_domains,
allowed_uri_sans, allow_ip_sans, enforce_hostnames, and max_ttl as
appropriate. Only share a VaultClusterIssuer and role when every allowed
namespace may legitimately request the same names. Sharing a VaultAuth with
other operator resources also extends its Vault permissions to those resources.
Set the issuer's issuerRef to a Vault PKI issuer ID so that a change to the
mount's default issuer does not change the signing CA. Grant the
issuer-specific signing path in the Vault policy. A certificate remains valid
until it expires or you revoke it in Vault, even when you delete its
Certificate, CertificateRequest, or issuer.
Vault logs requests under the issuer's Vault identity, which can be shared by
multiple namespaces. Correlate Vault audit entries with the requester recorded
on the CertificateRequest. Refer to the
PKI API and
PKI considerations.
Certificate request approval
When certManager.approverRBAC.enabled is true, the Helm chart grants
cert-manager permission to approve requests for every Vault Secrets Operator
issuer. cert-manager then approves those requests automatically, leaving
Kubernetes RBAC and the Vault PKI role as the remaining limits on issuance.
Treat permission to create Certificate or CertificateRequest resources as
permission to obtain certificates for names allowed by the role.
In multi-tenant clusters, leave the setting disabled and configure approver-policy to restrict requests by namespace and certificate policy. Refer to certificate request approval for available approval options.
Kubernetes access and private keys
A requester with CertificateRequest create access can submit a CSR for a
private key they already hold; they do not need access to a Kubernetes Secret.
A requester with Certificate create access can cause cert-manager to store a
private key in a Secret they can access directly or indirectly, for example by
creating a Pod that mounts it. Restrict create access to these resources and
grant CertificateRequest create access only to cert-manager and identities
that need to submit their own CSRs.
Encrypt etcd at rest using a key management service (KMS) provider and restrict
direct access to the database. Encryption at rest does not replace Kubernetes
RBAC: authorized API clients can still read Secrets. Limit both direct Secret
access and indirect access through Pods or pods/exec.
Operator and issuer resource access
A compromised operator service account can update CertificateRequest status
across namespaces and could write forged certificates without calling Vault.
Run the operator in its own namespace, limit access to its Pods and service
account tokens, and monitor Kubernetes and Vault audit logs.
An attacker who can change a VaultClusterIssuer's VaultAuth,
VaultAuthGlobal, VaultConnection, or CA certificate Secret can redirect or
disrupt issuance for all namespaces using it. A malicious server can return a
certificate and CA of its choosing; the Vault Enterprise license check does not
authenticate the server. Keep shared issuer dependencies in the operator
namespace, restrict write access to cluster administrators, and audit changes.
Restrict who can create or modify either issuer type.
Issuer resources expose Vault namespaces, PKI mounts, roles, and issuer
identifiers, and issuer metrics include PKI mount and role labels. Restrict
read access to these resources and get access to /metrics. A cluster-wide
binding that grants read access to VaultClusterIssuer resources exposes every
cluster issuer, not only those used by one namespace.
Threat model exclusions
This page covers cert-manager's interaction with the Vault Secrets Operator, not the security of cert-manager itself. Refer to the cert-manager documentation for cert-manager security. Securing Vault and its policies is covered by the Vault security model.
For general operator risks, including secret synchronization and the CSI driver, refer to the Vault Secrets Operator threat model.