-
Notifications
You must be signed in to change notification settings - Fork 51
Add attested-tls-proxy to buildernet/mkosi recipe #367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| -----BEGIN CERTIFICATE----- | ||
| MIIDCTCCAfGgAwIBAgIUJiyepwRfje5+tjuPhiA9uWQj4WgwDQYJKoZIhvcNAQEL | ||
| BQAwFDESMBAGA1UEAwwJbG9jYWxob3N0MB4XDTI2MDIxMjAwMzMyOVoXDTI3MDIx | ||
| MjAwMzMyOVowFDESMBAGA1UEAwwJbG9jYWxob3N0MIIBIjANBgkqhkiG9w0BAQEF | ||
| AAOCAQ8AMIIBCgKCAQEAlLiVis9jbau8jlwE2uwnphidIuanbWdPJP4KQyrXsq7/ | ||
| DnF02qnghl9nT4bHSMUYCciOS2PNp9DH2ZWUJwX3tEO1nsT4V0msdYglz5x/1sYn | ||
| 3hqI8U7GEh3NAA0qkvzEdupyR3FhioRQSrAO6CMOoK84CtwcbCg8+sl1VXJgH7s6 | ||
| D2daEF3HyxaX4EQKj+vpZQ/TsOSRq2FFeJWtvOCHAczPk2A/3/kLqN2wlxmlJ6Dt | ||
| hMoXg8ZwYZKdDIW0qkvtAfvaee0AB4M2OwRQ8Hxgqb+kqMAn7Goo2WxZyIjQ6Mvi | ||
| Fl6Ljhp7f4G4RLb0ramVLCbGw3LHEEmQwhbb6i3Z2wIDAQABo1MwUTAdBgNVHQ4E | ||
| FgQULJFWsw3onq6iTBFmznbdp1CNoI4wHwYDVR0jBBgwFoAULJFWsw3onq6iTBFm | ||
| znbdp1CNoI4wDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAjZor | ||
| 0q0GiMU5D5puCVPEBexXzSeaATSxnQj88wjKYhYnsljniMS78TSNwGqHZQF5y4/M | ||
| 50S65+eNySfb5KP+3yKMQbVZwM+LCZkifQGaLKat6MqWS5blTMNJuGZAxTM8ba3K | ||
| RmidXHhio8VuR+gItOaB3tyYYEGKmDlzajFne68dwGTe9hwzmgqLVzDIE3GFxJ/H | ||
| lScxoqF0hiqtkhf8DxrFgC7IOLdItYaZAQluLKnGWS/0tmSYP/pxkaGL3m7M1G35 | ||
| egYidvH/Z0IJ42S+7Y6a/yhZaqMFqnMHd3rqobMUeUnCJd3MSJp1BRCf03u1JuIe | ||
| 917M8ZdcpnSZwd78FA== | ||
| -----END CERTIFICATE----- |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| -----BEGIN PRIVATE KEY----- | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Security concern: Private key committed to repository. Even if this is a self-signed key for local development/testing, committing private keys to a public repository is a bad practice:
Consider:
|
||
| MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCUuJWKz2Ntq7yO | ||
| XATa7CemGJ0i5qdtZ08k/gpDKteyrv8OcXTaqeCGX2dPhsdIxRgJyI5LY82n0MfZ | ||
| lZQnBfe0Q7WexPhXSax1iCXPnH/WxifeGojxTsYSHc0ADSqS/MR26nJHcWGKhFBK | ||
| sA7oIw6grzgK3BxsKDz6yXVVcmAfuzoPZ1oQXcfLFpfgRAqP6+llD9Ow5JGrYUV4 | ||
| la284IcBzM+TYD/f+Quo3bCXGaUnoO2EyheDxnBhkp0MhbSqS+0B+9p57QAHgzY7 | ||
| BFDwfGCpv6SowCfsaijZbFnIiNDoy+IWXouOGnt/gbhEtvStqZUsJsbDcscQSZDC | ||
| FtvqLdnbAgMBAAECggEANUB013vT++CbBxR+7o7R0aENnwIdIEj2J2ZJcWyFSKdt | ||
| j5Pjhip+yU6e9PRr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5AlBAoGBAIZC+HhJpdJxNoUnndqj | ||
| x0nvWM5ZrnPa/6QXyMNn52vbqG7ZMyYCHwDXWJfBfxM9wdsMJKoH8pES9BF9Qr4o | ||
| Vv7hb/t9kbB0mg2QgxRTFwiGW06LU03u/4YhluwePEHydUoai+hTV35rbAaKiNE9 | ||
| QXzE0i3NWnSqX3hksZSn+UD5 | ||
| -----END PRIVATE KEY----- | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,30 @@ | ||||||
| #!/usr/bin/env bash | ||||||
| # Spins up an atls-proxy client, curls through it, tears it down. | ||||||
| # Usage: ./test-atls-proxy.sh [server:port] [path] | ||||||
| set -euo pipefail | ||||||
|
|
||||||
| IMAGE="ghcr.io/flashbots/attested-tls-proxy:1.0.1" | ||||||
| NAME="atls-proxy-client-test" | ||||||
| PORT=6000 | ||||||
| SERVER="${1:-localhost:7000}" | ||||||
| PATH_="${2:-/api/l1-builder/v1/configuration}" | ||||||
|
|
||||||
| trap 'docker rm -f $NAME >/dev/null 2>&1 || true' EXIT | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
Suggested change
Wait — single quotes prevent variable expansion entirely. The |
||||||
| docker rm -f "$NAME" >/dev/null 2>&1 || true | ||||||
|
|
||||||
| echo "-> client connecting to ${SERVER}" | ||||||
| docker run -d --name "$NAME" --network host "$IMAGE" \ | ||||||
| client --listen-addr "0.0.0.0:${PORT}" \ | ||||||
| --client-attestation-type none \ | ||||||
| --allowed-remote-attestation-type none \ | ||||||
| --allow-self-signed \ | ||||||
| "$SERVER" >/dev/null | ||||||
|
|
||||||
| for i in $(seq 1 10); do | ||||||
| curl -s -o /dev/null "http://127.0.0.1:${PORT}/" 2>/dev/null && break | ||||||
| [ "$i" -eq 10 ] && { echo "client failed to start:"; docker logs "$NAME"; exit 1; } | ||||||
| sleep 0.5 | ||||||
| done | ||||||
|
|
||||||
| echo "-> GET ${PATH_}" | ||||||
| curl -s -w "\n--- %{http_code}\n" "http://127.0.0.1:${PORT}${PATH_}" | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing newline at end of file.
Suggested change
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both
--server-attestation-type noneand--allowed-remote-attestation-type nonedisable attestation verification. This is expected for local dev, but worth a comment in the YAML for clarity so future readers understand this is intentional and must not be used in production.