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

image-rs: get rid of checking decrypt_config parameter #523

Merged

Conversation

Xynnn007
Copy link
Member

The high level API of image-rs is pull_image(). There is one parameter named decrypt_config passed to the api, and the parameter is to specify the orignal kbc parameter, e.g.

provider:attestation-agent:offline_fs_kbc:null

However, different parts of the parameter is now specified

  • attestation-agent: the key to look up keyprovider is embedded inside the encrypted image layer annotation.
  • offline_fs_kbc:null: so-called AA_KBC_PARAMS, is defined in CDH if Kata-CC is used, so in this case, we do not to ensure the parameter is given as it will not be used. This is why we get rid of this parameter checking in this commit.

In enclave-cc scenarios, the decrypt_config is still used, and we will check the parameter in concrete ocicrypt-rs's native key provider plugin.

@Xynnn007 Xynnn007 marked this pull request as draft March 29, 2024 04:58
@Xynnn007 Xynnn007 force-pushed the fix-pull-encrypt-image branch 2 times, most recently from 9acfabd to 5651b7d Compare March 29, 2024 05:11
The high level API of image-rs is `pull_image()`. There is one parameter
named `decrypt_config` passed to the api, and the parameter is to
specify the orignal kbc parameter, e.g.

provider:attestation-agent:offline_fs_kbc:null

However, different parts of the parameter is now specified
- `attestation-agent`: the key to look up keyprovider is embedded inside
the encrypted image layer annotation.
- `offline_fs_kbc:null`: so-called AA_KBC_PARAMS, is defined in CDH if
Kata-CC is used, so in this case, we do not to ensure the parameter is
given as it will not be used. This is why we get rid of this parameter
checking in this commit.

In enclave-cc scenarios, the `decrypt_config` is still used, and we will
check the parameter in concrete `ocicrypt-rs`'s  `native` key provider
plugin.

Signed-off-by: Xynnn007 <[email protected]>
Copy link
Member

@fitzthum fitzthum left a comment

Choose a reason for hiding this comment

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

LGTM

@Xynnn007 Xynnn007 merged commit 9f21aae into confidential-containers:main Apr 1, 2024
5 checks passed
@Xynnn007 Xynnn007 deleted the fix-pull-encrypt-image branch April 1, 2024 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants