Artifact security
Kernel Cache artifacts are OCI images. Registry authentication controls who can push or pull an image; artifact security controls whether KServe accepts the artifact's signature and signer identity. Configure both when the registry and workload trust boundaries require it.
Configuration
Artifact security is configured in the kernelcache JSON object in inferenceservice-config.
data:
kernelcache: |-
{
"enabled": true,
"defaultMountType": "oci",
"artifactSecurity": {
"mode": "cert",
"failurePolicy": "reject",
"cert": {
"signingProfileRef": "kernelcache-signer",
"trustBundle": "kserve/kernelcache-root-ca",
"subjectRegexp": "spiffe://kserve/kernelcache-signer"
}
}
}
This is the default artifact security configuration.
The configuration fields are:
mode:noneorcert.failurePolicy: the current accepted value isreject.cert.signingProfileRef: the operator-managed signing profile used for capture signing.cert.trustBundle: the trust bundle reference innamespace/nameform. The referenced Secret is preferred; a ConfigMap is used as a fallback.cert.trustBundleKey: the key containing the trust bundle. It defaults toca.crt.cert.subjectRegexp: the regular expression restricting the certificate subject. It is required for certificate verification.
When mode is cert, signingProfileRef, trustBundle, and subjectRegexp are required. Validate the exact signing profile and trust bundle integration provided by your KServe installation before enabling this mode.
Mode none
With mode: none, capture signing and cache verification are skipped by policy. The capture status records a skipped signing result, and the cache status records a skipped verification result.
{
"mode": "none",
"failurePolicy": "reject"
}
failurePolicy remains part of the configuration contract even when signing is disabled.
Mode cert
With mode: cert:
- The capture controller resolves the configured signing profile.
- The completed artifact is signed through the operator signing integration.
- The capture is accepted for
KernelCachecreation only when signing succeeds. - The cache controller verifies the artifact before node preparation.
- A verification failure puts the
KernelCacheinto an error state and prevents normal preparation.
The digest is part of the signed artifact reference. A signature for a different digest does not make the requested artifact valid.
Status fields
Capture signing is reported in KernelCacheCapture.status.signing:
status:
signing:
mode: cert
state: Succeeded
signed: true
reason: SigningSucceeded
Cache verification is reported in KernelCache.status.verification:
status:
verification:
mode: cert
state: Succeeded
verified: true
reason: VerificationSucceeded
Security state values include Pending, Succeeded, Failed, and Skipped. Useful failure reasons include SigningProfileNotFound, SignerUnavailable, SigningFailed, InvalidArtifactReference, SignedDigestMismatch, VerifierUnavailable, VerificationError, VerifiedDigestMismatch, and VerificationFailed.
Operational checks
kubectl get kernelcachecapture <capture-name> -n <namespace> -o jsonpath='{.status.signing}{"\n"}'
kubectl get kernelcache <cache-name> -n <namespace> -o jsonpath='{.status.verification}{"\n"}'
kubectl describe kernelcache <cache-name> -n <namespace>
kubectl get events -n <namespace> --sort-by=.lastTimestamp
When verification fails, check the artifact digest, trust bundle contents, certificate subject, signing profile availability, and controller permissions. Changing the trust bundle or signer does not change an existing artifact digest; recapture or republish the artifact when the signed content must change.
Security boundaries
- Do not place private signing keys in a
KernelCacheorKernelCacheCaptureobject. - Use digest references for both runtime images and cache artifacts when reproducibility matters.
- Treat
mode: noneas an explicit decision to skip artifact verification. - Keep registry push and pull roles scoped to the repositories and namespaces required by the installation.