-
Notifications
You must be signed in to change notification settings - Fork 196
CC: Add image signature tests for SEV #5578
base: CCv0
Are you sure you want to change the base?
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments. Note that this will need a lot of changes on rebase if #5594 is merged.
#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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove comment. Don't we need this resource, though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These resource names will need to be updated using the new resource names. See #5577 for details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will update to the URI versions
@@ -514,7 +552,110 @@ EOF | |||
fi | |||
} | |||
|
|||
@test "$test_tag Test signed image with no required measurement" { | |||
# Add resource files to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to what?
|
||
@test "$test_tag Test signed image with no required measurement, but wrong key (failure)" { | ||
# Add resource files to | ||
setup_cosign_signatures_files #"cosignWrong.pub" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove comment
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
updated resource paths |
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