Skip to content

flashbox - switch cvm-reverse-proxy to attested-tls-proxy#168

Merged
ameba23 merged 6 commits into
mainfrom
peg/flashbox-use-attested-tls-proxy
Jun 29, 2026
Merged

flashbox - switch cvm-reverse-proxy to attested-tls-proxy#168
ameba23 merged 6 commits into
mainfrom
peg/flashbox-use-attested-tls-proxy

Conversation

@ameba23

@ameba23 ameba23 commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

This switches cvm-reverse-proxy to attested-tls-proxy.

The purpose is to avoid a licensing issue and use more actively maintained attestation generation and verification code.

I have tried to make this as unopinionated as possible, making a drop-in replacement giving the exact same functionality as before.

This does NOT use the new nested attested TLS protocol. It is the older protocol which is currently used on Buildernet. The only difference between the 1.1.3 release used here and 1.1.2 currently used by Buildernet is some dependency updates relating to attestation.

I have tested the documented workflow for retrieving ssh public key on a GCP deployment.

Note that support for dstack-mr style measurement is still not merged - neither in attested-tls used here: flashbots/attested-tls#56 or in cvm-reverse-proxy: flashbots/cvm-reverse-proxy#49

@ameba23 ameba23 requested review from a team as code owners June 22, 2026 07:42
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not related to this PR but needed to build on nixos - see #130

@ameba23 ameba23 force-pushed the peg/flashbox-use-attested-tls-proxy branch from 3f0b3dd to 80be581 Compare June 22, 2026 08:26
cp -r "$cache_dir/$src"/* "$DESTDIR$dest/"
else
cp "$cache_dir/$src" "$DESTDIR$dest"
install -m 755 "$cache_dir/$src" "$DESTDIR$dest"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not strictly related to this PR but without this tdx-init was ending up having permissions 600 in the initrd, causing wait-for-key.service to get stuck trying to execute it:

[FAILED] Failed to start wait-for-key.service - SSH Public Key Server.
See 'systemctl status wait-for-key.service' for details.
         Starting wait-for-key.service - SSH Public Key Server...
[FAILED] Failed to start wait-for-key.service - SSH Public Key Server.
See 'systemctl status wait-for-key.service' for details.
         Starting wait-for-key.service - SSH Public Key Server...
[FAILED] Failed to start wait-for-key.service - SSH Public Key Server.
See 'systemctl status wait-for-key.service' for details.

Im not sure if this is a platform-specific difference in permissions handling due to a different umask, but i don't see a reason why this fix would cause issues when building on other platforms.

I can move this to a separate PR if needed.

@MoeMahhouk

Copy link
Copy Markdown
Member

Is this based on this older PR ? or is it supposed to replace it?


./ssh-pubkey-server/cmd/cli/add_to_known_hosts.sh \
./cvm-reverse-proxy/build/proxy-client \
http://127.0.0.1:8080 \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

what's this? do you mean curl using that address and the endpoint /pubkey?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I was a bit confuse why this line was ./cvm-reverse-proxy/build/proxy-client, because it appears the first argument to add_to_known_hosts.sh should be the url which is used to retrieve the public key:

https://github.com/flashbots/ssh-pubkey-server/blob/768f2ca3b9c22f23f91661710c5b68fd399cd02c/cmd/cli/add_to_known_hosts.sh#L11

Does that make sense?

This process could probably be simplified a bit by using the attested-get command rather than proxy client and then curl. But since that would mean making a change to this external script i left it as is it.

@MoeMahhouk MoeMahhouk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm
left small nits

@ameba23

ameba23 commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

Is this based on this older #98 ? or is it supposed to replace it?

I forgot that one was still open - i thought it got closed for some reason. What was the blocker with merging that one? Besides the merge conflicts that have since popped up.

No strong opinions whether to merge this one or that one. This has been tested on GCP, that one tested with bare Qemu and Azure.

@ameba23

ameba23 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

Im hesitating a bit to hit merge on this, because i realise its kind of a breaking change in that it requires searchers to use a different tool to fetch the ssh key. Even though this is documented, im not sure how much friction it will cause or if we should announce that somewhere.

@ameba23 ameba23 merged commit 322227a into main Jun 29, 2026
@ameba23 ameba23 deleted the peg/flashbox-use-attested-tls-proxy branch June 29, 2026 06:35
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