-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add end-to-end test with docker compose and sample attester #283
Add end-to-end test with docker compose and sample attester #283
Conversation
Point the client tool to the most recent version of the kbs-protocol (to pick up changes involving the sample attester). Update the README with a few examples. Signed-off-by: Tobin Feldman-Fitzthum <[email protected]>
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.
Thanks for the nice feature. Some nits at first glance. Hope that will not break your work
Rework the docker compose yaml to build each component rather than pulling the images from ghcr. We might want to switch back to the pre-built images (or introduce a second yaml file) for the release, but for now we need the newest version. When building the components from source, we pickup a number of changes that need to be accounted for in the yaml files. Move the yaml file to the top of the repo since it covers all of the components. This also works best with the workspace. Signed-off-by: Tobin Feldman-Fitzthum <[email protected]>
Let's set a somewhat restrictive default by blocking any resource requests made with sample evidence. Also, add the `tee` field to the attestation token. The `tcb-status` will contain the tee anyway, but this makes it a little easier for a client to write a policy, especially since different verifiers will have different flattened claims. Signed-off-by: Tobin Feldman-Fitzthum <[email protected]>
9ad2863
to
4781096
Compare
7a0a335
to
d4453cc
Compare
Cargo.lock
Outdated
@@ -2921,18 +2943,18 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" | |||
|
|||
[[package]] | |||
name = "openssl-src" | |||
version = "300.1.6+3.1.4" |
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.
The build error https://github.com/confidential-containers/kbs/actions/runs/7483975835/job/20370068894?pr=283#step:7:849 is caused by chaing the version
and checksum
here. Although Cargo
will automatically update the rev here, but we'd better keep it as-is to make the csv building pass.
At the meantime, we are getting touch with csv colleagues to fix the upstream.
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.
Thanks for the tip!
8136a75
to
2643a8a
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.
Thanks for the great e2e test.
@@ -0,0 +1,73 @@ | |||
version: '3.2' |
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.
Once we move the docker-compose to the top directory, we might need add some contents to the top README to help the users who is not familiar with the project to use this? like a link to https://github.com/confidential-containers/kbs/blob/main/kbs/docs/cluster.md
wdyt?
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.
I have a number of changes to the docs planned, but I was thinking I would do that in a follow-up PR, especially so we can get the fix in this PR merged quickly. Does that work for you?
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.
It works
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.
See #287
We weren't actually checking the output of the policy engine. This makes sure that the request is rejected if the policy is not valid. Signed-off-by: Tobin Feldman-Fitzthum <[email protected]>
For testing we only need the sample attester. Introduce a feature to skip building all the other ones to avoid issues with network connectivity for certain dependencies. Signed-off-by: Tobin Feldman-Fitzthum <[email protected]>
Includes a negative test to make sure that policy validation does something. Signed-off-by: Tobin Feldman-Fitzthum <[email protected]>
the policy engine is very picky about the padding of the policy. Signed-off-by: Tobin Feldman-Fitzthum <[email protected]>
Update the Cargo lock (or the e2e tests won't pass) Signed-off-by: Tobin Feldman-Fitzthum <[email protected]>
Now that the default policy does not allow the sample evidence, update the e2e tests to set a permissive policy first. Signed-off-by: Tobin Feldman-Fitzthum <[email protected]>
2643a8a
to
14c9832
Compare
In order to integrate the KBS/AS into the Kata CI, we need an easy way for people to deploy it. I think the docker compose approach might be best, but it had some problems and wasn't tested. This should fix that.
The test itself is not yet done. PR is still WIP.