-
Notifications
You must be signed in to change notification settings - Fork 90
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
cloud-config: add support for CDH config #1748
cloud-config: add support for CDH config #1748
Conversation
b27fe58
to
0c60023
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.
This looks good to me.
Just to confirm I've understood correctly, you are currently leaving the agent-config.toml alone and not removing the AA_KBC
param from there? I'm not completely sure of how the interaction between agent_config AA_KBC and the cdh config will be in CCv0
, but you will understand better than I do the precedence of the new CDH configuration, so I guess that's okay for this PR, and we can re-visit when we switch to main
0c60023
to
fc7a00a
Compare
yes, we should remove that logic. I just pushed the draft PR in this state to get a libvirt test run since this is rather intrusive and I'd expect some breakage. |
fc7a00a
to
39cdd02
Compare
Ok, that error is unrelated to the change but it's another breaking change that prevents us from updating guest-components.. current revisions of guest-components will compile all attester modules and that doesn't always make sense e.g. the TDX bindings for the IBM archs. I wonder why this didn't pop up on the guest-components CI, do we have s390x builds there? |
I added some basic s390x workflow for CDH: but maybe that isn't running the TEE_PLATFORM="all", or whatever the issue that Wainer also found meant there were libc incompatibilities. Maybe Ding might understand it better? |
I see. we probably need something similar for attestation agent (which has the TEE specific attester code) It should be possible to set the |
d170d0a
to
92e50eb
Compare
I fixed guest-components to a revision with CDH config file, but not the latest, which will not run anyway, due to problems with CCv0 (see #1750), so we don't run into the build issues either. |
After testing it became clear that we need both:
It has to do with passport model that was introduced. AA will perform remote-attestation w/ the configured KBS to get a token. CDH will use that token to retrieve a secret from KBS. In theory we could have different kbs'es for CDH and AA (token-kbs vs resource-kbs) but we don't have any config options for this. |
Thanks for the info. Are there any plans to use an aa.toml type approach to avoid going through the kata-agent? I guess that shows that we still need:
in the current merge-to-main attestation resource testing as well? Though I don't think we have |
fixes confidential-containers#1720 This change will add a write_files entry to the cloud-config file that is produced by CAA. aa-kbc-params are converted into a config file with kbc name and kbc url. process-user-data has been made more flexible to also support this entry. guest-components in versions.yaml has been updated to a new revision that requires a cdh config file. the kata-agent service unit has been extended to have the env CDH_CONFIG_FILE=/run/confidential-containers/cdh.toml set, which is the path that we add as a cloud-config directive. Signed-off-by: Magnus Kulke <magnuskulke@microsoft.com>
92e50eb
to
2d5b755
Compare
there is some config file support for AA (see this PR), but I think it's not a full replacement for |
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 didn't try it by hand,
but the codes LGTM.
fixes #1720
This change will add a write_files entry to the cloud-config file that is produced by CAA. aa-kbc-params are converted into a config file with kbc name and kbc url.
process-user-data has been made more flexible to also support this entry.
guest-components in versions.yaml has been updated to a new revision that requires a cdh config file.
the kata-agent service unit has been extended to have the env
CDH_CONFIG_FILE=/run/confidential-containers/cdh.toml
set, which is the path that we add as a cloud-config directive.