Skip to content

Bail when no attestation platform is detected, rather than falling back to no attestaion - #194

Open
ameba23 wants to merge 2 commits into
mainfrom
peg/bail-on-no-attestation-detected
Open

ameba23 wants to merge 2 commits into
mainfrom
peg/bail-on-no-attestation-detected

Conversation

@ameba23

@ameba23 ameba23 commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

This changes the behavior of attestation platform detection when the attestation type is set to 'auto'.

We assume that if the caller wants to detect the platform, they want some sort of attestation. So if none is detected, we should bail with an error rather than proceeding without attestation as before. This addresses issues we have had with attestation detection failing when we do actually want attestation.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The Docker and Compose examples omit local attestation settings, causing the documented walkthrough to fail on non-CVM hosts.

1 open issue
What changed in this PR

This PR makes HTTP proxy and TCP tunnel commands fail at startup when automatic local attestation detection finds no supported platform, rather than silently proceeding without attestation.

Changes:

  • Adds a shared generator builder requiring explicit none to disable local attestation.
  • Moves detection earlier in HTTP and TCP startup and adds validation tests.
  • Documents the new default behavior and opt-out flags.
File Description
README.md Explains automatic detection failures and explicit opt-out options.
crates/​attested-tls-proxy/​TCP_TUNNEL.md Updates tunnel attestation option documentation.
crates/​attested-tls-proxy/​src/​cli/​tcp_tunnel.rs Uses the shared builder before loading TLS credentials.
crates/​attested-tls-proxy/​src/​cli/​http.rs Uses the shared builder before health-check and TLS setup.
crates/​attested-tls-proxy/​src/​cli/​attestation.rs Adds platform validation, actionable errors, and unit tests.

Review effort: Balanced

Comment thread README.md
Comment on lines +83 to +85
The HTTP and TCP tunnel client/server commands default to `auto` when the local
attestation type is omitted. If no supported attestation platform is detected,
startup fails. To run without local attestation, explicitly pass
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