Commit graph

38 commits

Author SHA1 Message Date
Joachim Bauch deaa17acc5
Implement per-backend session limit for clusters. 2022-07-13 11:52:20 +02:00
Joachim Bauch f0eb80b6fd
Add tests for virtual sessions. 2022-07-12 12:10:01 +02:00
Joachim Bauch 95d5e50705
Disconnect sessions with the same room session id synchronously.
Previously there was a difference in the events being received by other
sessions for the clustered case compared to the single-server case.
Now the events / ordering are the same for both cases.
2022-07-11 10:39:06 +02:00
Joachim Bauch 66e502dc9b
Fix handling of "unshareScreen" messages and add test.
Also update tests for "requestoffer" / "sendoffer".
2022-07-08 17:09:22 +02:00
Joachim Bauch ab26dfe90d
Add testcase for initial permissions in a room. 2022-07-08 15:11:50 +02:00
Joachim Bauch 545bce0082
Fix and add test for clustered disconnect of duplicate room ids. 2022-07-08 14:57:29 +02:00
Joachim Bauch e99d843c65
Add testcase for anonymous clients needing to join new room. 2022-07-08 14:21:50 +02:00
Joachim Bauch d3f8876d25
Merge pull request #281 from strukturag/refactor-async-events
Clustering support
2022-07-07 16:24:15 +02:00
Joachim Bauch f7db8a38e1
Send initial "welcome" message when clients connect.
This can be used to detect server features before performing the
actual "hello" handshake.
2022-07-07 09:57:10 +02:00
Joachim Bauch ec62503bd3
Support arbitrary capabilities values. 2022-07-04 13:53:02 +02:00
Joachim Bauch 24eab34da7
Allow configuring backends through etcd. 2022-06-30 11:35:36 +02:00
Joachim Bauch 20cc51c2fe
grpc: Automatically detect if a target is the current server itself.
This allows configuring the same list of targets for all instances without
having to setup the "own" address differently for each server.
2022-06-30 11:35:35 +02:00
Joachim Bauch 0e144906a4
Added tests for clustered behaviour. 2022-06-30 11:35:33 +02:00
Joachim Bauch a0d3af14e0
Add initial clustering support. 2022-06-30 11:35:28 +02:00
Joachim Bauch 0115c97946
Refactor asynchronous events to central location. 2022-06-24 13:37:35 +02:00
Joachim Bauch 800ece1d90
Support combining ping requests of different rooms on the same backend. 2022-05-17 16:38:16 +02:00
Joachim Bauch 39cc523477
Add "permission" for sessions that may not receive display names.
By default, the "join" events contain the whole userdata as received
from the "auth" response. This might include a "displayname" field
containing the display name of the associated user.

For privacy reasons in certain scenarios, some attendees should not
be able to know which other users are connected to a room, therefore
the "displayname" should be hidden for them. By default, no filtering
occurrs.
2022-04-26 14:47:01 +02:00
Joachim Bauch 2a491ec3f0
Use "T.Cleanup()" instead of manually deferred shutdown function. 2022-04-05 12:57:40 +02:00
Joachim Bauch 81a52389aa
Stop using deprecated ioutil package. 2022-04-05 12:48:27 +02:00
Joachim Bauch 614c5f6e21
Fix issues reported by revive. 2022-02-11 12:09:42 +01:00
Joachim Bauch 4630c5f38c
Add testcase with PERMISSION_MAY_PUBLISH_MEDIA. 2021-11-08 12:16:26 +01:00
Joachim Bauch 707b125730
Check individual audio/video permissions on change.
If a client publishes audio/video and no longer has the video permission,
the whole publisher will be closed. Previously this was only checking
the generic "media" permission.
2021-11-08 12:08:14 +01:00
Joachim Bauch 572176b4f5
Add first tests for split audio/video permissions. 2021-11-08 12:08:13 +01:00
Joachim Bauch b398591447
Only allow subscribing if both users are in the same room and call.
Previously it was possible to subscribe any stream if the session id of the
publisher was known.
2021-09-23 09:05:25 +02:00
Joachim Bauch ec71f29fee
Force HTTPS for backend connections in old-style configurations.
Prevents clients from sending a HTTP auth URL to trigger an insecure
connection from the signaling server to Nextcloud.
2021-07-07 09:16:59 +02:00
Joachim Bauch 2bbc0a4d3c
Fetch capabilities to check if "v3" signaling API of Talk should be used. 2021-06-08 10:23:27 +02:00
Joachim Bauch c8886d03c9
Simplify loopback NATS client.
Only use one goroutine per client instead of one per subscription.
This ensures that (like with the "real" client), all messages are
processed in order across different subscriptions.
2021-06-07 16:53:26 +02:00
Joachim Bauch 04d315b0a4
Wait for any messages to be processed before stopping Hub in tests. 2021-06-07 10:37:56 +02:00
Joachim Bauch 6e54d8f4f4
Attempt to fix flaky tests. 2021-06-04 15:46:21 +02:00
Joachim Bauch 15d5c93b0b
Support session resumption while a room is being joined.
If a client resumed a session while a (slow) backend request to join a room
was still active, the response could get lost.
2021-06-04 15:40:42 +02:00
Joachim Bauch 52c1514978
Always use auth userid in ping requests.
Fixes issue introduced in 3a2adffab6 where some
ping requests were not evaluated correctly if a userid was given in the room
session data.
2021-05-19 16:24:15 +02:00
Joachim Bauch 9cf796640c
Don't require certain order of own/other "joined" events. 2021-04-27 08:39:19 +02:00
Joachim Bauch c8e4bfe007
Fix various issues found by golangci-lint. 2021-04-26 17:25:52 +02:00
Joachim Bauch 0c53f10fd7
No need to manually close rooms in testing, will be done by hub on client disconnects. 2021-04-23 15:26:05 +02:00
Joachim Bauch 8052df4ef5
Wait for clients to be terminated before destroying hub in tests.
This should help with the flaky test failures on CI.
2021-04-23 15:12:09 +02:00
Joachim Bauch a5faca00cd
Pass backend when fetching room for managing virtual sessions.
The internal room id is different depending on the backend.
2021-04-23 14:39:42 +02:00
Joachim Bauch 3a2adffab6
Get userid from room session data if present. 2021-04-22 14:18:35 +02:00
Joachim Bauch 8ba2e0ad64
Switch dependency tracking to Go modules.
With that bump minimum required version to Go 1.13.
2021-04-09 16:15:00 +02:00
Renamed from src/signaling/hub_test.go (Browse further)