You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The sigstore-go TUF client fails when the validation init container has readOnlyRootFilesystem: true (added in #178). The client attempts to mkdir /.sigstore to cache trust root metadata, which fails on a read-only filesystem.
Error
failed to create sigstore verifier: failed to load trust root: failed to fetch production trust root:
failed to create TUF client failed to create initial TUF updater: mkdir /.sigstore: read-only file system
Create a pod with the validation.ml.sigstore.dev/ml label
The injected init container crashes with the above error
Expected Behavior
Sigstore verification should work with readOnlyRootFilesystem: true.
Root Cause
The restrictedSecurityContext() added in #178 sets ReadOnlyRootFilesystem: true, but the sigstore-go TUF client (sigstore-go@v1.1.4/pkg/tuf/options.go) defaults CachePath to $HOME/.sigstore/root and needs to write metadata there.
Fix
Inject an emptyDir volume at /.sigstore when sigstoreConfig is used. This provides a writable, ephemeral, pod-scoped mount point without compromising the read-only root filesystem.
Description
The sigstore-go TUF client fails when the validation init container has
readOnlyRootFilesystem: true(added in #178). The client attempts tomkdir /.sigstoreto cache trust root metadata, which fails on a read-only filesystem.Error
Steps to Reproduce
ModelValidationCR withsigstoreConfigvalidation.ml.sigstore.dev/mllabelExpected Behavior
Sigstore verification should work with
readOnlyRootFilesystem: true.Root Cause
The
restrictedSecurityContext()added in #178 setsReadOnlyRootFilesystem: true, but the sigstore-go TUF client (sigstore-go@v1.1.4/pkg/tuf/options.go) defaultsCachePathto$HOME/.sigstore/rootand needs to write metadata there.Fix
Inject an
emptyDirvolume at/.sigstorewhensigstoreConfigis used. This provides a writable, ephemeral, pod-scoped mount point without compromising the read-only root filesystem.