mirror of
https://github.com/containers/podman.git
synced 2025-05-20 00:27:03 +08:00
Recognize the new lookaside names for simple signing sigstore
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
@ -22,6 +22,8 @@ type registryConfiguration struct {
|
|||||||
|
|
||||||
// registryNamespace defines lookaside locations for a single namespace.
|
// registryNamespace defines lookaside locations for a single namespace.
|
||||||
type registryNamespace struct {
|
type registryNamespace struct {
|
||||||
|
Lookaside string `json:"lookaside"` // For reading, and if LookasideStaging is not present, for writing.
|
||||||
|
LookasideStaging string `json:"lookaside-staging"` // For writing only.
|
||||||
SigStore string `json:"sigstore"` // For reading, and if SigStoreStaging is not present, for writing.
|
SigStore string `json:"sigstore"` // For reading, and if SigStoreStaging is not present, for writing.
|
||||||
SigStoreStaging string `json:"sigstore-staging"` // For writing only.
|
SigStoreStaging string `json:"sigstore-staging"` // For writing only.
|
||||||
}
|
}
|
||||||
|
3
pkg/trust/testdata/quay.io.yaml
vendored
Normal file
3
pkg/trust/testdata/quay.io.yaml
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
docker:
|
||||||
|
quay.io/multi-signed:
|
||||||
|
lookaside: https://quay.example.com/sigstore
|
@ -91,8 +91,12 @@ func getPolicyShowOutput(policyContentStruct policyContent, systemRegistriesDirP
|
|||||||
|
|
||||||
registryNamespace := haveMatchRegistry(repo, registryConfigs)
|
registryNamespace := haveMatchRegistry(repo, registryConfigs)
|
||||||
if registryNamespace != nil {
|
if registryNamespace != nil {
|
||||||
|
if registryNamespace.Lookaside != "" {
|
||||||
|
tempTrustShowOutput.SignatureStore = registryNamespace.Lookaside
|
||||||
|
} else { // incl. registryNamespace.SigStore == ""
|
||||||
tempTrustShowOutput.SignatureStore = registryNamespace.SigStore
|
tempTrustShowOutput.SignatureStore = registryNamespace.SigStore
|
||||||
}
|
}
|
||||||
|
}
|
||||||
output = append(output, &tempTrustShowOutput)
|
output = append(output, &tempTrustShowOutput)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ func TestPolicyDescription(t *testing.T) {
|
|||||||
Name: "quay.io/multi-signed",
|
Name: "quay.io/multi-signed",
|
||||||
RepoName: "quay.io/multi-signed",
|
RepoName: "quay.io/multi-signed",
|
||||||
Type: "signed",
|
Type: "signed",
|
||||||
SignatureStore: "",
|
SignatureStore: "https://quay.example.com/sigstore",
|
||||||
GPGId: "1, 2, 3",
|
GPGId: "1, 2, 3",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user