Repository navigation
Enforce TLS - #76
Enforce TLS#76
Conversation
Move the composite viewer into echo, migrate examples to Livepeer Node
| uv sync --extra examples | ||
| LIVEPEER_ORCHESTRATOR_BOOTSTRAP_SECRET=abcdef livepeer orchestrator \ | ||
| --config="" --listen 127.0.0.1:8935 --runner-grants 127.0.0.1:8989 | ||
| --runner-grants 127.0.0.1 |
There was a problem hiding this comment.
@j0sh maybe we should keep the port so people do not accidentally use the full grants in production.
There was a problem hiding this comment.
Perhaps. I loosened it up because having to hard-code ports felt counterproductive with dynamic runner registration. It makes more sense for static registrations, but it's operationally cumbersome for dynamic runners, since you have to change the orchestrator every time you change the runner set, in which case you're better off just registering the runners statically.
There was a problem hiding this comment.
Ah sorry for being unclear. It was just about keep them listed in the docs or make a note about the security in production.
There was a problem hiding this comment.
Grants preserved in the docs here e537049
There was a problem hiding this comment.
🟢 Approval recommended
The transport changes are consistent, affected callers were checked, and no blocking issues were identified.
0 open findings
What changed in this PR
This PR enables standard HTTPS certificate verification across the gateway’s HTTP and trickle transports while preserving explicit HTTP support.
Changes:
- Removes TLS verification bypasses and synchronous HTTP helpers.
- Makes orchestrator discovery asynchronous.
- Adds regression tests and updates documentation.
| File | Description |
|---|---|
| tests/test_tls.py | Tests rejection of untrusted certificates. |
| tests/test_discovery.py | Tests asynchronous orchestrator discovery. |
| tests/test_call_runner_raw.py | Tests raw streaming responses. |
| tests/fixtures/untrusted-localhost-key.pem | Adds a test-only TLS private key. |
| tests/fixtures/untrusted-localhost-cert.pem | Adds an untrusted test certificate. |
| src/livepeer_gateway/trickle_subscriber.py | Restores default certificate verification. |
| src/livepeer_gateway/trickle_publisher.py | Restores default certificate verification. |
| src/livepeer_gateway/http.py | Enables certificate verification and removes synchronous helpers. |
| src/livepeer_gateway/discovery.py | Switches discovery to asynchronous HTTP. |
| examples/ping-pong/README.md | Simplifies the orchestrator startup command. |
| examples/echo/README.md | Simplifies the orchestrator startup command. |
| CHANGELOG.md | Documents transport and API changes. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@j0sh Risks: a downgrade lets on-path attackers read or tamper with traffic and capture session tokens and signed payment state (a bearer credential), and a stolen session token can be replayed to reuse a paid session. Might be better to require |
|
@rickstaa Sure we can add that in separately, since that's more of a new feature and less of a regression. |
No description provided.