Skip to content

fix(signaling): allow SIP bridge to access getSettings without a user session#18115

Merged
miaulalala merged 1 commit into
mainfrom
fix/noid/sip-bridge-token-check
May 27, 2026
Merged

fix(signaling): allow SIP bridge to access getSettings without a user session#18115
miaulalala merged 1 commit into
mainfrom
fix/noid/sip-bridge-token-check

Conversation

@miaulalala
Copy link
Copy Markdown
Contributor

@miaulalala miaulalala commented May 27, 2026

Summary

Fixes #18106

  • The fix in fix(signaling): Limit signaling support without conversation-token #17576 broke SIP bridge connections
  • The SIP bridge is a headless service (no userId) that authenticates via HMAC headers (talk-sipbridge-random / talk-sipbridge-checksum), which getSettings() was never taught to recognise
  • This PR mirrors the existing recording-backend detection block: validates SIP bridge headers when present, returns 401 + brute-force throttle on failure, and allows the no-token neutral-point path ($room = null) for authenticated SIP bridge requests

Test plan

  • New unit tests cover the four key cases: unauthenticated 404 (unchanged behaviour), invalid checksum → 401, short random → 401, valid HMAC without token → 200
  • Run tests/php/Controller/SignalingControllerTest.php inside the Docker container to confirm all new tests pass
  • Integration test: configure a SIP bridge with a shared secret and confirm GET /api/v3/signaling/settings returns 200 with valid headers and 401 with invalid ones

🤖 AI-Assisted-By: claude-sonnet-4-6

@miaulalala miaulalala self-assigned this May 27, 2026
@miaulalala miaulalala added bug regression feature: api 🛠️ OCS API for conversations, chats and participants feature: SFU & SIP ☎️ labels May 27, 2026
@miaulalala
Copy link
Copy Markdown
Contributor Author

/backport to stable34

Copy link
Copy Markdown
Member

@fancycode fancycode left a comment

Choose a reason for hiding this comment

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

Thanks! Was about to work on the same change :-)

Tested and works as expected, didn't check the code though.

@miaulalala
Copy link
Copy Markdown
Contributor Author

/backport to stable33

@miaulalala
Copy link
Copy Markdown
Contributor Author

/backport to stable32

@miaulalala
Copy link
Copy Markdown
Contributor Author

/backport to stable31

Comment thread lib/Controller/SignalingController.php
… session

The security fix in #17576 tightened unauthenticated access to
getSettings(), breaking SIP bridge connections. The SIP bridge is a
headless service with no userId that authenticates via HMAC headers
(talk-sipbridge-random / talk-sipbridge-checksum), which getSettings()
was never taught to recognise.

Mirror the existing recording-backend detection block: validate the SIP
bridge headers when present, return 401 + brute-force throttle on failure,
and allow the no-token neutral-point path when the request is authenticated.

AI-Assisted-By: claude-sonnet-4-6 <noreply@anthropic.com>
Signed-off-by: Anna Larch <anna@nextcloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug feature: api 🛠️ OCS API for conversations, chats and participants feature: SFU & SIP ☎️ regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Camera/Microphone not released in dial-out room on hangup

3 participants