-
Notifications
You must be signed in to change notification settings - Fork 60
Description
Description
I am not sure if this is a bug or a documentation problem. I'm leaving this here as I imagine that anyone deploying these days probably has the same issue.
I deployed scaffold 0.6.36
, including tuf
and got stuck with the following error with cosign v2.2.0
when performing signing
**Warning** Missing fallback target ctfe.pub, skipping
Error: getting ctlog public keys: no matching targets by custom metadata, fallbacks not found: ctfe.pub
main.go:74: error during command execution: getting ctlog public keys: no matching targets by custom metadata, fallbacks not found: ctfe.pub
Error: Process completed with exit code 1.
I also noticed that I don't have ctfe.pub
in my root targets... I have ctlog_pubkey
.
cosign initialize --root redacted/root.json --mirror redacted
Root status:
{
"local": "redacted.../.sigstore/root",
"remote": "redacted",
"metadata": {
"root.json": {
"version": 1,
"len": redacted,
"expiration": "redacted",
"error": ""
},
"snapshot.json": {
"version": 1,
"len": redacted,
"expiration": "redacted",
"error": ""
},
"targets.json": {
"version": 1,
"len": redacted,
"expiration": "redacted",
"error": ""
},
"timestamp.json": {
"version": 1,
"len": redacted,
"expiration": "redacted",
"error": ""
}
},
"targets": [
"rekor-pubkey",
"ctlog-pubkey",
"fulcio-cert"
]
}
This is different from what I can find in all guides online to deploy sigstore, for instance https://blog.stephane-robert.info/post/devops-cosign-rekor-private/ (it's in french, sorry, scroll down to the cosign -d initialize --root root.json --mirror https://tuf.robert.local
)
Cosign does not seem to allow to override the filename, as it is hardcoded in https://github.com/sigstore/cosign/blob/878b6c766e17d59d5624c802a1e196e8e8d47f56/pkg/cosign/ctlog.go#L28.
In the end I was able to resolve this through the env variable SIGSTORE_CT_LOG_PUBLIC_KEY_FILE
. But that is annoying because it requires to manually inspect the kubernetes secret to copy the public key...
PS is there a way to fetch that public key like there is for rekor api/v1/log/publicKey
?
I do not understand currently if this is caused by configuration of tuf
, ctlog
, fulcio
or the copysecrets
jobs
Version
- cosign: v2.2.0
- scaffold: 0.6.36