This repository was archived by the owner on Jun 28, 2024. It is now read-only.
CC: Add image signature tests for SEV#5578
Open
Alex-Carter01 wants to merge 1 commit intokata-containers:CCv0from
Open
CC: Add image signature tests for SEV#5578Alex-Carter01 wants to merge 1 commit intokata-containers:CCv0from
Alex-Carter01 wants to merge 1 commit intokata-containers:CCv0from
Conversation
a5d831b to
3ee87cb
Compare
e2438d8 to
3b714a6
Compare
8e2bc33 to
af9870b
Compare
3201c7b to
a21cb3e
Compare
a21cb3e to
c72dfe8
Compare
7cc7829 to
1db0f64
Compare
2796f6f to
e68a37f
Compare
fitzthum
reviewed
Apr 18, 2023
| #copy resources | ||
| cp ${TESTS_REPO_DIR}/integration/kubernetes/confidential/fixtures/policy.json resources/ | ||
| cp ${TESTS_REPO_DIR}/integration/kubernetes/confidential/fixtures/cosign.pub resources/ | ||
| #cp ${TESTS_REPO_DIR}/integration/kubernetes/confidential/fixtures/cosignWrong.pub resources/ |
There was a problem hiding this comment.
Remove comment. Don't we need this resource, though?
Contributor
Author
There was a problem hiding this comment.
We ended up decing to do the wrong key test by switching the image (quay.io/kata-containers/confidential-containers:cosign-signed-key2). So I am removing the wrong cosign key and all mentions to it.
| if [ -n "${measurement}" ]; then | ||
| mysql -u${KBS_DB_USER} -p${KBS_DB_PW} -h ${KBS_DB_HOST} -D ${KBS_DB} <<EOF | ||
| INSERT INTO resources SET resource_type="Policy", resource_path="policy.json", polid=10; | ||
| INSERT INTO resources SET resource_type="Cosign Key", resource_path="cosign.pub", polid=10; |
There was a problem hiding this comment.
These resource names will need to be updated using the new resource names. See #5577 for details.
Contributor
Author
There was a problem hiding this comment.
will update to the URI versions
| } | ||
|
|
||
| @test "$test_tag Test signed image with no required measurement" { | ||
| # Add resource files to |
|
|
||
| @test "$test_tag Test signed image with no required measurement, but wrong key (failure)" { | ||
| # Add resource files to | ||
| setup_cosign_signatures_files #"cosignWrong.pub" |
e68a37f to
b4fe6e2
Compare
b4fe6e2 to
fbb53c4
Compare
Inserts resource information to kbs for signing adds example cosign and policy files to be used along with signing tests Adds tests for: signed image with no required measurement signed image with no required measurement, but wrong key signed image with required measurement signed image with invalid measurement Fixes: kata-containers#5412
fbb53c4 to
1556f69
Compare
Contributor
Author
|
updated resource paths |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Inserts resource information to kbs for signing
adds example cosign and policy files to be used along with signing tests
Add currently one test for:
signed imagage with no required measurement
Will switch from draft PR to normal with the other three tests:
signed image with no required measurement, but wrong key (failure)
signed image with requirement measurement
signed image with required measurement (failure) eg. tamper with kernel_params,
Fixes: #5412