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

runtime: Enable connection to Quote Generation Service (QGS) #9653

Conversation

JakubLedworowski
Copy link
Contributor

For the TD attestation to work the connection to QGS on the host is needed. By default QGS runs on vsock port 4050, but can be modified by the host owner. Format of the qemu object follows the SocketAddress structure, so it needs to be provided in the JSON format, as in the example below: -object '{"qom-type":"tdx-guest","id":"tdx","quote-generation-socket":{"type":"vsock","cid":"2","port":"4050"}}'

Fixes: #9497

@katacontainersbot katacontainersbot added the size/medium Average sized task label May 17, 2024
@fidencio fidencio self-requested a review May 17, 2024 09:16
@fidencio fidencio marked this pull request as draft May 17, 2024 09:32
@fidencio fidencio marked this pull request as ready for review May 20, 2024 09:30
@fidencio
Copy link
Member

I am setting this to "Ready to Review" as I was able to check that both Ubuntu and CentOS are using exactly the very same command line for QEMU, which is great, and avoids us to do any kind of distro check on the runtime side.

Copy link
Member

@fidencio fidencio left a comment

Choose a reason for hiding this comment

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

I've left one comment, apart from the comment, everything looks good, thanks @JakubLedworowski!

src/runtime/pkg/govmm/qemu/qemu.go Outdated Show resolved Hide resolved
@JakubLedworowski JakubLedworowski force-pushed the fixes-9497-ensure-quote-generation-service-is-added-to-qemu-cmd-2 branch from 7de53c6 to b4f5a6a Compare May 20, 2024 09:56
@fidencio
Copy link
Member

/test

@katacontainersbot katacontainersbot added size/large Task of significant size and removed size/medium Average sized task labels May 20, 2024
@JakubLedworowski JakubLedworowski force-pushed the fixes-9497-ensure-quote-generation-service-is-added-to-qemu-cmd-2 branch from 299a06c to f544438 Compare May 20, 2024 11:35
@katacontainersbot katacontainersbot added size/medium Average sized task and removed size/large Task of significant size labels May 20, 2024
@fidencio
Copy link
Member

/test

For the TD attestation to work the connection to QGS on the host is needed.
By default QGS runs on vsock port 4050, but can be modified by the host owner.
Format of the qemu object follows the SocketAddress structure, so it needs to be provided in the JSON format, as in the example below:
-object '{"qom-type":"tdx-guest","id":"tdx","quote-generation-socket":{"type":"vsock","cid":"2","port":"4050"}}'

Fixes: kata-containers#9497
Signed-off-by: Jakub Ledworowski <[email protected]>
@JakubLedworowski JakubLedworowski force-pushed the fixes-9497-ensure-quote-generation-service-is-added-to-qemu-cmd-2 branch from f544438 to fc68013 Compare May 22, 2024 09:21
Copy link
Member

@fidencio fidencio left a comment

Choose a reason for hiding this comment

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

@JakubLedworowski, very nice work, thanks, and lgtm!

@fidencio
Copy link
Member

/test

@fidencio fidencio merged commit 0e33ecf into kata-containers:main May 22, 2024
295 of 303 checks passed
@JakubLedworowski JakubLedworowski deleted the fixes-9497-ensure-quote-generation-service-is-added-to-qemu-cmd-2 branch May 23, 2024 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test size/medium Average sized task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TDX: Ensure quote-generation-service is added to the QEMU command line
4 participants