forked from sigstore/cosign
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix sigstore#1930 for AWS KMS formats
Signed-off-by: Ville Aikas <vaikas@chainguard.dev>
- Loading branch information
Showing
8 changed files
with
276 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
test/testdata/policy-controller/invalid/invalid-keyref-awskms.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Copyright 2022 The Sigstore Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http:#www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
--- | ||
apiVersion: policy.sigstore.dev/v1alpha1 | ||
kind: ClusterImagePolicy | ||
metadata: | ||
name: image-policy | ||
spec: | ||
images: | ||
- glob: images.* | ||
- key: | ||
# keyid is not supported | ||
kms: "awskms:///1234abcd-12ab-34cd-56ef-1234567890ab" | ||
- key: | ||
# keyid with hostname is still not supported | ||
kms: "awskms://localhost:4566/1234abcd-12ab-34cd-56ef-1234567890ab" | ||
- key: | ||
# alias is not supported | ||
kms: "awskms:///alias/ExampleAlias" | ||
= key: | ||
# alias is not supported, even if you give a hostname | ||
kms: "awskms://localhost:4566/alias/ExampleAlias" |
29 changes: 29 additions & 0 deletions
29
test/testdata/policy-controller/valid/valid-keyref-awskms.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Copyright 2022 The Sigstore Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http:#www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
--- | ||
apiVersion: policy.sigstore.dev/v1alpha1 | ||
kind: ClusterImagePolicy | ||
metadata: | ||
name: image-policy | ||
spec: | ||
images: | ||
- glob: images.* | ||
- key: | ||
kms: "awskms:///arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" | ||
- key: | ||
kms: "awskms://localhost:4566/arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab" | ||
- key: | ||
kms: "awskms:///arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias" | ||
= key: | ||
kms: "awskms://localhost:4566/arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias" |