Skip to content

fix(signaling): forward federation joinAuthParams to the signaling server - #7024

Merged
AndyScherzinger merged 1 commit into
masterfrom
joinAuthParams
Nov 19, 2026
Merged

AndyScherzinger merged 1 commit into
masterfrom
joinAuthParams

Conversation

@mahibi

@mahibi mahibi commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

For federated conversations, the signaling settings now include joinAuthParams: a JWT signed by the own server and valid for one minute. The own signaling server will use it to check that the own Nextcloud allowed the federated join before connecting to the remote signaling server. Once signaling servers enforce this, clients that don't forward the token can no longer join federated conversations.

The token is forwarded in the room message as federation.auth with version 1.0, like the web and iOS clients do:

"federation": { "signaling": "…", "url": "…", "roomid": "…", "token": "<hello token>",
                "auth": { "version": "1.0", "token": "<join JWT>" } }

When the server does not send joinAuthParams (servers without spreed#20254), auth is left out, so older servers keep working. The capability federation-signaling-auth is not checked; the token is forwarded whenever the server sends it, same as web and iOS.

Every join uses freshly fetched signaling settings (chat: ChatActivity.setupWebsocket(), call: CallActivity.fetchSignalingSettings(), including after a websocket reconnect without resume), so the one-minute lifetime is not a problem.

🧪 Tested

Two federated servers (nextcloud-docker-dev master + spreed#20254, signaling server 2.1.1) and a physical device:

  • Federated conversation: the room message contains federation.auth with version 1.0 and the join JWT (iss = own server, sub = remote signaling server, nc = remote server, exp = iat + 60), the join is accepted, and chat relay works
  • Leave and rejoin after more than one minute: fresh token (newer iat)
  • Websocket reconnect during a call (new websocket connection): rejoin with a fresh token
  • Starting a call from the open chat reuses the existing join, so no new room message is sent (unchanged behavior)
  • Non-federated conversation: no federation block
  • Server without spreed#20254: no auth, federated join still works
  • Server side: join JWT signature checked with the own server's public signaling key; a JWT with changed claims fails the check
  • Unit tests: WebSocketConnectionHelperFederationJoinTest (parsing, forwarding, missing/empty token, non-federated join)

Assisted-by: Claude Code:claude-opus-5-5

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@mahibi mahibi self-assigned this Nov 11, 2026
@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

📱 QA build

Download app-qa-debug.apk
QR code Open the QR code for this download
Commit cee2fd7
Version 7024
Available until 7 days after this build

The QA build installs alongside a released Nextcloud app, so you can keep
using your existing install while testing.

Downloading the file requires a GitHub account, so open this link on the
device you want to test on, or transfer the APK to it.

@mahibi
mahibi force-pushed the joinAuthParams branch 2 times, most recently from 8b350e6 to d573f5a Compare November 18, 2026 11:56
…rver

The signaling settings of a federated room now include joinAuthParams,
a JWT that is valid for one minute and signed by the own server. The own
signaling server checks it before it connects to the remote signaling
server (nextcloud/spreed#20254). Signaling servers that require it
refuse federated joins without it.

The token is forwarded in the "room" message as federation.auth with
version "1.0", as the web and iOS clients do.
It is left out when the server does not send it, so older servers keep
working.

Fixes #7021

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
@mahibi
mahibi marked this pull request as ready for review November 18, 2026 14:06
@mahibi
mahibi requested a review from rapterjet2004 November 18, 2026 14:06
@mahibi mahibi added this to the 26.0.0 milestone Nov 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Codacy

Lint

TypemasterPR
Warnings1716
Errors00

SpotBugs

CategoryBaseNew
Bad practice77
Correctness88
Dodgy code4040
Internationalization33
Malicious code vulnerability33
Performance77
Security1111
Total7979

@AndyScherzinger
AndyScherzinger merged commit 7fea3c9 into master Nov 19, 2026
21 of 24 checks passed
@AndyScherzinger
AndyScherzinger deleted the joinAuthParams branch November 19, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Forward joinAuthParams when provided by singling settings endpoint

3 participants