You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+56-7Lines changed: 56 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,18 +3,66 @@
3
3
4
4
This is a work-in-progress crate designed to be an alternative to [`cvm-reverse-proxy`](https://github.com/flashbots/cvm-reverse-proxy).
5
5
6
-
It has three commands:
7
-
-`server` - run a proxy server, which accepts TLS connections from a proxy client, sends an attestation and then forwards traffic to a target CVM service.
8
-
-`client` - run a proxy client, which accepts connections from elsewhere, connects to and verifies the attestation from the proxy server, and then forwards traffic to it over TLS.
9
-
-`get-tls-cert` - connects to a proxy-server, verify the attestation, and if successful write the server's PEM-encoded TLS certificate chain to standard out. This can be used to make subsequent connections to services using this certificate over regular TLS.
6
+
It has three subcommands:
7
+
-`attested-tls-proxy server` - run a proxy server, which accepts TLS connections from a proxy client, sends an attestation and then forwards traffic to a target CVM service.
8
+
-`attested-tls-proxy client` - run a proxy client, which accepts connections from elsewhere, connects to and verifies the attestation from the proxy server, and then forwards traffic to it over TLS.
9
+
-`attested-tls-proxy get-tls-cert` - connects to a proxy-server, verify the attestation, and if successful write the server's PEM-encoded TLS certificate chain to standard out. This can be used to make subsequent connections to services using this certificate over regular TLS.
10
10
11
11
Unlike `cvm-reverse-proxy`, this uses post-handshake remote-attested TLS, meaning regular CA-signed TLS certificates can be used.
12
12
13
-
This repo shares some code with [ameba23/attested-channels](https://github.com/ameba23/attested-channels) and may eventually be merged with that crate.
14
13
15
-
##Measurement headers
14
+
### Overview
16
15
17
-
When attestation is validated successfully, the following values are injected into the request / response headers:
16
+
This is a reverse HTTP proxy allowing a normal HTTP client to communicate with a normal HTTP server over a remote-attested TLS channel, by tunneling requests through a proxy-client and proxy-server.
17
+
18
+
This works as follows:
19
+
1. The source HTTP client (eg: curl or a web browser) makes an HTTP request to a proxy-client instance running locally.
20
+
2. The proxy-client forwards the request to a proxy-server instance over a remote-attested TLS channel.
21
+
3. The proxy-server forwards the request to the target service over regular HTTP.
22
+
4. The response from the target service is sent back to the source client, via the proxy-server and proxy-client.
23
+
24
+
One or both of the proxy-client and proxy-server may be running in a confidential environment and provide attestations which will be verified by the remote party. Verification is configured by a measurements file, and attestation generation is configured by specifying an attestation type when starting the proxy client or server.
25
+
26
+
### Measurements File
27
+
28
+
Accepted measurements for the remote party are specified in a JSON file containing an array of objects, each of which specifies an accepted attestation type and set of measurements.
29
+
30
+
These object have the following fields:
31
+
-`measurement_id` - a name used to describe the entry. For example the name and version of the CVM OS image that these measurements correspond to.
32
+
-`attestation_type` - one of the attestation types (confidential computing platforms) described below.
33
+
-`measurements` - an object with fields referring to the five measurement registers.
When attestation is validated successfully, the following values are injected into the request / response headers making them available to the source client and/or target service:
18
66
19
67
Header name: `X-Flashbots-Measurement`
20
68
@@ -37,3 +85,4 @@ One of `none`, `dummy`, `azure-tdx`, `qemu-tdx`, `gcp-tdx`.
37
85
38
86
These aim to match the header formatting used by `cvm-reverse-proxy`.
0 commit comments