9
2
Fork
You've already forked platform
2

api: proxy attestation over HTTP by IP to avoid on-demand TLS 502s #313

Manually merged
ryansquared merged 1 commit from fix/attestation-502-dashboard into main 2026年06月22日 06:11:41 +02:00

image

Fix intermittent 502 on dashboard attestation verification

The attestation dialog intermittently failed with 502, then recovered on its own — while a direct curl
http:///attestation always worked.

Cause: the API proxy forced HTTPS and preferred the domain (https:///attestation), hitting the enclave's
Caddy block that uses on-demand Let's Encrypt TLS. Uncached certs trigger inline ACME issuance during the handshake;
when that's slow/rate-limited/fails, the handshake fails and the API returns 502. Once the cert is cached it works
again — hence the come-and-go behavior. The working curl never hit TLS (port 80), which is why it was unaffected.

Fix: proxy attestation over plain HTTP by IP — the path that's proven reliable. The attestation document is a
COSE_Sign1 verified entirely client-side (cert chain + signature + nonce), so transport TLS isn't load-bearing here.
This drops the on-demand ACME dependency. Also removed the now-unneeded danger_accept_invalid_certs and tidied the
query to query_scalar.

![image](/attachments/a0c59bc5-89a9-4630-94e9-ee038db4d161) Fix intermittent 502 on dashboard attestation verification The attestation dialog intermittently failed with 502, then recovered on its own — while a direct curl http://<ip>/attestation always worked. Cause: the API proxy forced HTTPS and preferred the domain (https://<domain>/attestation), hitting the enclave's Caddy block that uses on-demand Let's Encrypt TLS. Uncached certs trigger inline ACME issuance during the handshake; when that's slow/rate-limited/fails, the handshake fails and the API returns 502. Once the cert is cached it works again — hence the come-and-go behavior. The working curl never hit TLS (port 80), which is why it was unaffected. Fix: proxy attestation over plain HTTP by IP — the path that's proven reliable. The attestation document is a COSE_Sign1 verified entirely client-side (cert chain + signature + nonce), so transport TLS isn't load-bearing here. This drops the on-demand ACME dependency. Also removed the now-unneeded danger_accept_invalid_certs and tidied the query to query_scalar.
ryansquared manually merged commit e0e2d1cb3a into main 2026年06月22日 06:11:41 +02:00
Sign in to join this conversation.
No reviewers
Labels
Clear labels
Compat/Breaking
Breaking change that won't be backward compatible
Component/Enclave-Builder
This issue affects Enclave Builder (git-push and CLI)
Component/Infrastructure
This issue affects generic Caution hosted infra components
Deploy/BYOC
Relates to Caution Bring-your-own-compute
Deploy/Full-managed
Relates to Caution fully managed cloud
Deploy/Self-hosted
Relates to Caution deployed on self-hosted infra
Interface/API
This issue affects the API
Interface/CLI
This issue affects the command line interface
Interface/Git
This issue affects the Git `push` interface
Interface/Web
This issue affects the web dashboard
Kind/Bug
Something is not working
Kind/Documentation
Documentation changes
Kind/Enhancement
Improve existing functionality
Kind/Feature
New functionality
Kind/Security
This is security issue
Kind/Testing
Issue or pull request related to testing
Priority
Critical
The priority is critical
Priority
High
The priority is high
Priority
Low
The priority is low
Priority
Medium
The priority is medium
Reviewed
Confirmed
Issue has been confirmed
Reviewed
Duplicate
This issue or pull request already exists
Reviewed
Invalid
Invalid issue
Reviewed
Won't Fix
This issue won't be fixed
Status
Abandoned
Somebody has started to work on this but abandoned work
Status
Blocked
Something is blocking this issue or pull request
Status
Need More Info
Feedback is required to reproduce issue or to continue work
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
caution/platform!313
Reference in a new issue
caution/platform
No description provided.
Delete branch "fix/attestation-502-dashboard"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?