Skip to content

Enforce TLS - #76

Merged
j0sh merged 3 commits into
mainfrom
ja/enforce-tls
Oct 15, 2026
Merged

j0sh merged 3 commits into
mainfrom
ja/enforce-tls

Conversation

@j0sh

@j0sh j0sh commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

j0sh added 2 commits October 13, 2026 17:40
Move the composite viewer into echo, migrate examples to Livepeer Node
@j0sh
j0sh requested a review from rickstaa October 14, 2026 04:36
rickstaa
rickstaa previously approved these changes Oct 14, 2026

@rickstaa rickstaa left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good thanks!

Comment thread examples/echo/README.md Outdated
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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@j0sh maybe we should keep the port so people do not accidentally use the full grants in production.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@rickstaa rickstaa Oct 14, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry for being unclear. It was just about keep them listed in the docs or make a note about the security in production.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grants preserved in the docs here e537049

Comment thread src/livepeer_gateway/discovery.py
Base automatically changed from ja/remove-old to main October 15, 2026 07:05
@j0sh
j0sh dismissed rickstaa’s stale review October 15, 2026 07:05

The base branch was changed.

Copilot AI balanced review requested due to automatic review settings October 15, 2026 07:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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.

@rickstaa

rickstaa commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

@j0sh https:// is verified now, but http:// is still accepted everywhere, including http:// URLs an orchestrator returns after discovery over verified HTTPS. So the orchestrator picks the scheme and a client can't insist on a secure one.

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 https:// on the orch by default, with an explicit flag for development (or loopback only), applied to every URL the SDK follows, not just the first?

@j0sh

j0sh commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator Author

@rickstaa Sure we can add that in separately, since that's more of a new feature and less of a regression.

@j0sh
j0sh merged commit fc47903 into main Oct 15, 2026
7 checks passed
@j0sh
j0sh deleted the ja/enforce-tls branch October 15, 2026 22:02
@j0sh j0sh mentioned this pull request Oct 15, 2026
3 of 5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants