Skip to content

fix(rtc): config + signalling require auth by default (ADR-0101, #252) - #254

Merged
tina4stack merged 1 commit into
v3from
fix/rtc-require-auth-252
Oct 23, 2026
Merged

tina4stack merged 1 commit into
v3from
fix/rtc-require-auth-252

Conversation

@tina4stack

Copy link
Copy Markdown
Owner

Fixes tina4-python#252 at four-framework parity: the RTC config route and the
signalling socket now require auth by default.

With TURN configured, GET {prefix}/api/rtc/config mints a fresh coturn
credential on every call and {prefix}/ws/rtc/{room} relays a call. Both were
public, so anyone could use the operator's TURN server as a relay (unbounded
bandwidth on their bill), and the short credential TTL did not bound it. There
was no way to close them.

ADR-0101: both are secured by default. An app that genuinely wants anonymous
calling opts out with TINA4_RTC_REQUIRE_AUTH=false (or 0/no/off). The
parse is a blacklist of falsey values, so a typo keeps the routes secured
rather than silently opening the relay. Each framework secures through its own
existing mechanism (Python _secured, PHP ->secure(), Ruby .secure, Node
.secure()).

BREAKING for an anonymous-calling app that does not set the opt-out — those
endpoints start returning 401. One env var restores the old behaviour.

Verified at HEAD, no mocks (auth_required read off the real route tables after a
real registration): 6/6 in all four frameworks, each mutation-proven. Existing
realtime suites updated for the new default (python config test authenticates;
node relay/content tests opt out). New contract rtc_auth_contract.json.

🤖 Generated with Claude Code

)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Signed-off-by: Andre van Zuydam <andrevanzuydam@gmail.com>
@tina4stack
tina4stack merged commit 6494a3c into v3 Oct 23, 2026
14 checks passed
@tina4stack
tina4stack deleted the fix/rtc-require-auth-252 branch October 23, 2026 15:18
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.

2 participants