-
Notifications
You must be signed in to change notification settings - Fork 48
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
base: main
Are you sure you want to change the base?
Conversation
|
Claude finished @canercidam's task in 2m 12s —— View job PR Review: Add attested-tls-proxy to buildernet/mkosi recipe
SummaryThis PR adds an Issues Found1. Private key committed to repository (inline comment)
2. No The proxy forwards to 3. Attestation disabled without documentation (inline comment) Both attestation types are set to 4. Certificate expiry The certificate is valid from 2026-02-12 to 2027-02-12 (1 year). This is fine for dev but will silently expire. Runtime generation would avoid this concern entirely. 5. Missing PR description No description was provided. Adding context about why this proxy is needed and what service it fronts would help reviewers. |
| @@ -0,0 +1,28 @@ | |||
| -----BEGIN PRIVATE KEY----- | |||
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.
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:
- Credential hygiene - It normalizes committing secrets to version control. Anyone cloning this repo gets this key, and it could be mistakenly used beyond local dev.
- Key rotation - If this key ever needs to be rotated, it remains in git history forever.
Consider:
- Generating the key/cert pair at runtime (e.g., in an
initstep or as an artifact) instead of checking them in. Theattested-tls-proxyor a simpleopensslcommand in an init script could generate ephemeral certs. - If they must be static files, add a clear comment in the YAML or a README explaining they are intentionally throwaway dev-only credentials.
| - server | ||
| - --listen-addr | ||
| - 127.0.0.1:7000 | ||
| - --server-attestation-type |
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 none and --allowed-remote-attestation-type none disable 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.
| - /server.key | ||
| - --tls-certificate-path | ||
| - /server.crt | ||
| - 127.0.0.1:8000 |
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.
The last positional argument 127.0.0.1:8000 is the backend/upstream address being proxied to. What service is expected to be listening on port 8000? There's no depends_on configured for this service, so if the upstream isn't ready when the proxy starts, connections will fail. Consider adding a depends_on or a ready_check if the upstream service is defined elsewhere in the recipe.
… proper dev headers
|
Claude finished @fkondej's task in 2m 9s —— View job PR Review (re-review after sync): Add attested-tls-proxy to buildernet/mkosi recipe
Changes Since Last ReviewThe second commit (
Remaining Issues1. Private key still committed to repository
2. Missing newline at EOF in test script (inline comment)
3. No PR description Still no description explaining the purpose of the proxy, what traffic flow it enables, or why it's needed in the mkosi recipe. This context would help reviewers and future readers. |
| done | ||
|
|
||
| echo "-> GET ${PATH_}" | ||
| curl -s -w "\n--- %{http_code}\n" "http://127.0.0.1:${PORT}${PATH_}" No newline at end of file |
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.
Missing newline at end of file.
| curl -s -w "\n--- %{http_code}\n" "http://127.0.0.1:${PORT}${PATH_}" | |
| curl -s -w "\n--- %{http_code}\n" "http://127.0.0.1:${PORT}${PATH_}" |
| SERVER="${1:-localhost:7000}" | ||
| PATH_="${2:-/api/l1-builder/v1/configuration}" | ||
|
|
||
| trap 'docker rm -f $NAME >/dev/null 2>&1 || true' EXIT |
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.
The $NAME variable in the trap should be quoted to prevent word splitting. Also, the trap uses single quotes which means $NAME won't be expanded at trap definition time — but since it's a constant assigned on line 7, this works correctly. Just noting for clarity.
| trap 'docker rm -f $NAME >/dev/null 2>&1 || true' EXIT | |
| trap 'docker rm -f "$NAME" >/dev/null 2>&1 || true' EXIT |
Wait — single quotes prevent variable expansion entirely. The $NAME won't expand inside single quotes. This actually works because bash expands $NAME at trap execution time (not definition time) when using single quotes, but only if NAME is still in scope. Since this is the same script, it works. Disregard the suggestion above.
No description provided.