Skip to content

Conversation

@ameba23
Copy link
Contributor

@ameba23 ameba23 commented Dec 16, 2025

This almost definitely will not work as-is - but its a rough sketch as a starting point.

@ameba23 ameba23 marked this pull request as draft December 16, 2025 08:47
@ameba23 ameba23 changed the title Use attested-tls-proxy rather than cvm-reverse-proxy Use attested-tls-proxy rather than cvm-reverse-proxy on Buildernet Dec 16, 2025
Copy link
Member

Choose a reason for hiding this comment

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

For the first iteration, they could be running side be side (the previous reverse proxy and the new attested proxy server), right?
This way, we could have a fallback till we verify stability in further iterations, wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was thinking the other way around - for the first iteration we just want to know whether this works, and having a fallback might make us think it works when it doesn't. Once we know it works, add cvm-reverse-proxy as a fallback in case it stops working.

Copy link
Member

Choose a reason for hiding this comment

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

we could consider creating a reproducible debian packaging pipeline for attested-tls-proxy to avoid building it manually while building the image. This would accelerate the image building process and rollout times

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea. Here i was roughly following how the other rust projects on the main branch of this repo are build - with the build_rust_package.sh script, which isn't available on this branch.

It looks like we have a reproducible debian packaging pipeline for rbuilder - and since that is a rust project it would be probably quite easy to adapt it for this. In my experience i have had annoying issues with trying to get 100% reproducibility with docker - but if its working for rbuilder it will probably work for this project too.

Either way, i think it will be easiest to built the first few iterations like this, as it inevitable wont work the first few times.

ExecStart=/usr/bin/attested-tls-proxy server \
--listen-addr 0.0.0.0:7936 \
--server-attestation-type azure-tdx \
--tls-private-key-path var/lib/persistent/operator-api/key.pem \
Copy link

Choose a reason for hiding this comment

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

Suggested change
--tls-private-key-path var/lib/persistent/operator-api/key.pem \
--tls-private-key-path %S/persistent/operator-api/key.pem \

Copy link

Choose a reason for hiding this comment

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

The file should probably be renamed to attested-tls-proxy-client.... Also the the main service file in buildernet image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You mean the name of this file should match the service file it is overriding - in this case attested-tls-proxy-client.service?

--client-attestation-type azure-tdx \
--server-attestation-type none
--allowed-remote-attestation-type none
--tls-private-key-path var/lib/persistent/operator-api/key.pem \
Copy link

Choose a reason for hiding this comment

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

Should it really point to a Let's Encrypt certificate? If yes, we need to extend acme-le posthook to copy the certificate for this service separately, not re-using the path of operator-api

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this is the big difference between this and cvm-reverse-proxy - we require CA-signed certs. I agree its better to copy the pem files to a separate location for this service.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did this now, but i guess i need to set up a username and group for attested-tls-proxy. I can't see where that is being done for operator-api.

systemd-repart
systemd-resolved
tpm2-tools
libtss2-esys-3.0.2-0t64
Copy link

Choose a reason for hiding this comment

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

you can omit the package version. The main mkosi config file already points to a point in time snapshot repository which guarantees stable version of the packages.

Copy link

Choose a reason for hiding this comment

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

The package names should be alphabetically sorted

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.

3 participants