Skip to content
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

Support Cosign Image signature verification with KMS #360

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Xynnn007
Copy link
Member

@Xynnn007 Xynnn007 commented Sep 17, 2023

This PR mainly add the support to verify image signature with public keys provided by KMS.

  • Add PublicKeyProvider API for KMS crate
  • Add get_public_key api for CDH
  • image-rs can get cosign verification public key from CDH when both cosign and confidential-data-hub feature are enabled

@@ -93,6 +93,9 @@ encryption = ["ocicrypt-rs/block-cipher"]
encryption-ring = ["ocicrypt-rs/block-cipher-ring", "encryption"]
encryption-openssl = ["ocicrypt-rs/block-cipher-openssl", "encryption"]

# Get needed image verification keys from Confidential Data Hub
confidential-data-hub = ["dep:ttrpc", "dep:protobuf"]
Copy link
Member Author

@Xynnn007 Xynnn007 Nov 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me add tests for this feature in later PRs.

Copy link
Contributor

@1570005763 1570005763 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from my limited familiarity with cosign, the other parts generally seem quite good.

confidential-data-hub/kms/src/plugins/mod.rs Show resolved Hide resolved
@Xynnn007 Xynnn007 force-pushed the feat-cdh-kms-pubkey branch 2 times, most recently from 6bf1766 to 2faab59 Compare December 15, 2023 03:01
Confidential Data Hub now supports to get public key from the different
KMS services. The public keys are for signature verification. As
currently not all non-attestation functionalities of AA are moved to
CDH.

So `confidential-data-hub` is a workaround feature to make the code
compilable without breaking current logic.

After confidential-containers#412 is resolved, we should abandon the `confidential-data-hub`
feature.

Signed-off-by: Xynnn007 <[email protected]>
@Xynnn007 Xynnn007 marked this pull request as draft January 2, 2024 01:40
@Xynnn007
Copy link
Member Author

Xynnn007 commented Jan 2, 2024

After discussions with @arronwy , let's temporarily make this draft. As the KMS configurations are still not easy to use, we will keep on doing this PR after #413

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants