Commit Graph

62 Commits

Author SHA1 Message Date
luzpaz
30595584a3 chore(typos) fix various typos
Found via `codespell -q 3 -S "*.svg,./lang" -L anser,bu,dialin,goup,miliseconds,nd,vew`
2024-12-20 07:58:31 +01:00
Дамян Минков
4ee613ed1f fix(visitors): Fixes going live when the meeting is created. (#14905)
* fix(visitors): Fixes going live when first moderator joins.

* squash(jwt): Drop unused field.

* squash(jwt): Fixes loading token_util for visitors component.

* squash(jwt): Validate nbf if it exists as it is optional.

* squash(visitors): Keep prefer visitor state for not live meetings.

* squash(visitors): Automatically go live only when there is a moderator in the meeting.

* squash(visitors): Automatically go live only when there is an occupant in the meeting.

* squash(visitors): Drops a debug log.

* squash(visitors): Makes sure we first disconnect before attempting a reconnect.

If the reconnect happens too quickly, before being disconnected and the conference is still not live we will detect that we are still connected and will skip connecting to visitors service, and in the next moment we will disconnect.

* squash(visitors): Slow down successful reconnects.

If a meeting was just live but was destroyed jicofo will return it is not live, but service will return that it just got live. Slows down reconnects and at some point the service will return that the meeting is not live. The drawback is that it will take some time to connect when the meeting is created and back live.

* squash(visitors): Randomize the delay up to the available value.
2024-07-11 08:42:49 -05:00
Дамян Минков
f0fc63f573 feat(visitors): Handles live conference and queue service. (#14869)
* feat(visitors): Handling of live conference and queue service.

* squash: Small refactor mobile code.

* squash: Drop debug log.

* chore(deps) lib-jitsi-meet@latest

https://github.com/jitsi/lib-jitsi-meet/compare/v1836.0.0+d05325f3...v1839.0.0+ea523fc6

* squash: Adds a count function.

* squash: Drop debug print.

* squash: Skip if queueService is not enabled.

* squash: Avoids double subscribing for visitorsWaiting.

* squash: Fixes lint error.

* squash: Fixes showing dialog.
2024-06-28 07:29:41 -05:00
Aaron van Meerten
5d84a4cc90 fix: define local vars in public key handler (#14176) 2024-03-20 03:35:23 -05:00
damencho
954ef6df4f fix: Drops inspect print. 2024-02-29 12:52:19 -06:00
damencho
990d21038e fix: Fixes initializing cached keys. 2024-02-16 11:36:07 -06:00
damencho
b02c072ba7 fix: Handles few more cases for updating cached tokens. 2024-02-15 12:20:02 -06:00
damencho
a1ebcd559b feat: Adds a print for timing out http requests after the retry. 2024-02-15 07:13:12 -06:00
Дамян Минков
b6b77f55f1 feat: Drops some debug prints. (#14311)
* feat: Drops some debug prints.

* squash: Fix linter errors.
2024-02-02 11:11:50 -06:00
damencho
0a0b0a760e fix: Fixes promoting the only moderator in a non vpass meeting. 2024-01-31 17:53:16 -06:00
emrah
148fc103e3 fix(token): add jitsi_meet_context_room into the param list 2023-11-08 06:06:22 -06:00
Дамян Минков
0e55cbbda6 Clean up prosody modules with some extra checks (#14020)
* fix: Adds check for jitsi_meet_room not being string.

Oct 20 12:22:50 mod_bosh        error   Traceback[bosh]: /usr/share/jitsi-meet/prosody-plugins/token/util.lib.lua:336: bad argument #1 to 'lower' (string expected, got userdata)
        stack traceback:
        [C]: in function 'lower'
        /usr/share/jitsi-meet/prosody-plugins/token/util.lib.lua:336: in function 'verify_room'
        ...re/jitsi-meet/prosody-plugins/mod_token_verification.lua:78: in function 'verify_user'

* fix: Adds check for missing speaker stats for occupant.

error   Traceback[c2s]: ...itsi-meet/prosody-plugins/mod_speakerstats_component.lua:124: attempt to index field '?' (a nil value)
        stack traceback:
        ...itsi-meet/prosody-plugins/mod_speakerstats_component.lua:124: in function '?'

* fix: Nil check for breakout_rooms.

c2saaaad95a16c0 error   Traceback[c2s]: ...re/jitsi-meet/prosody-plugins/mod_muc_breakout_rooms.lua:345: attempt to index local 'main_room' (a nil value)
        stack traceback:
        ...re/jitsi-meet/prosody-plugins/mod_muc_breakout_rooms.lua:345: in function '?'
        /usr/share/lua/5.2/prosody/util/events.lua:81: in function </usr/share/lua/5.2/prosody/util/events.lua:77>
        (...tail calls...)
        /usr/lib/prosody/modules/muc/muc.lib.lua:496: in function </usr/lib/prosody/modules/muc/muc.lib.lua:492>

* fix: Adds nil check in allowners.

c2saaaae3024810 error   Traceback[c2s]: /usr/share/jitsi-meet/prosody-plugins/mod_muc_allowners.lua:171: attempt to index local 'room' (a nil value)
        stack traceback:
        /usr/share/jitsi-meet/prosody-plugins/mod_muc_allowners.lua:171: in function '?'
        /usr/share/lua/5.2/prosody/util/events.lua:81: in function </usr/share/lua/5.2/prosody/util/events.lua:77>

* fix: Adds nil check in lobby.

mod_bosh        error   Traceback[bosh]: ...share/jitsi-meet/prosody-plugins/mod_muc_lobby_rooms.lua:168: attempt to index local 'lobby_room' (a nil value)
        stack traceback:
        ...share/jitsi-meet/prosody-plugins/mod_muc_lobby_rooms.lua:168: in function '?'
        /usr/share/lua/5.2/prosody/util/filters.lua:25: in function 'filter'
        /usr/lib/prosody/modules/mod_bosh.lua:361: in function 'send'
        /usr/lib/prosody/modules/muc/mod_muc.lua:495: in function '?'

* fix: Fixes nil error in fmuc.

s2sinaaaaf2817260       error   Traceback[s2s]: /usr/share/jitsi-meet/prosody-plugins/mod_fmuc.lua:295: attempt to index local 'occupant' (a nil value)
        stack traceback:
        /usr/share/jitsi-meet/prosody-plugins/mod_fmuc.lua:295: in function '?'
        /usr/share/lua/5.2/prosody/util/events.lua:81: in function </usr/share/lua/5.2/prosody/util/events.lua:77>
        (...tail calls...)
        /usr/lib/prosody/modules/muc/muc.lib.lua:1201: in function </usr/lib/prosody/modules/muc/muc.lib.lua:1194>

* fix: Fixes nil occupant.

c2s55f4d5411dd0 error   Traceback[c2s]: /usr/share/jitsi-meet/prosody-plugins/mod_muc_flip.lua:120: attempt to index local 'kicked_occupant' (a nil value)
        stack traceback:
        /usr/share/jitsi-meet/prosody-plugins/mod_muc_flip.lua:120: in function '?'
        /usr/share/lua/5.2/prosody/util/events.lua:81: in function </usr/share/lua/5.2/prosody/util/events.lua:77>
        (...tail calls...)
        /usr/lib/prosody/modules/muc/muc.lib.lua:791: in function </usr/lib/prosody/modules/muc/muc.lib.lua:616>

* fix: Fixes caching main room.

Objects should not be set in room._data as this field is being serialized and we see errors like.

error   Traceback[c2s]: /usr/share/lua/5.2/prosody/util/serialization.lua:34: Can't serialize userdata
        stack traceback:
        [C]: in function 'error'
        /usr/share/lua/5.2/prosody/util/serialization.lua:34: in function </usr/share/lua/5.2/prosody/util/serialization.lua:33>
        (...tail calls...)
        /usr/share/lua/5.2/prosody/util/serialization.lua:199: in function 'serialize_table'
        /usr/share/lua/5.2/prosody/util/serialization.lua:197: in function 'serialize_table'
        /usr/share/lua/5.2/prosody/util/serialization.lua:197: in function 'serialize_table'
        /usr/share/lua/5.2/prosody/util/serialization.lua:219: in function </usr/share/lua/5.2/prosody/util/serialization.lua:217>
        (...tail calls...)
        /usr/lib/prosody/modules/mod_storage_memory.lua:42: in function </usr/lib/prosody/modules/mod_storage_memory.lua:40>
        (...tail calls...)
        ...re/jitsi-meet/prosody-plugins/mod_muc_breakout_rooms.lua:207: in function 'create_breakout_room'

* fix: Fixes calling save_occupant after changing its role.

* squash: Fixed passed value to type.
2023-11-06 15:31:59 -06:00
Дамян Минков
bae77f21f8 feat: Adds event for parsed jwt and check for required token.context (#13973)
* squash: Remove tabs.

* feat: Adds a check for context required in jwt.

* feat: Adds an event to notify for parsed jwt.
2023-10-20 08:50:38 -05:00
damencho
f9ac965e18 feat: Updates for jwt when room claim is not required.
This allows mod_token_verification to be used with token missing room claim (firebase) and jitsi tokens with the claim.
2023-09-27 19:29:16 -05:00
damencho
df81e0fe53 feat: Adds wait for host prosody module and handling it.
While the host arrives all other participants are waiting in lobby and once the host arrives lobby is destroyed and the participants join the call.
Adds reading some other fields in jwt to extract email.
Introduces tokenLogoutUrl to be used for logout.
2023-07-26 12:19:02 -05:00
damencho
e58cad0464 feat: Adds option for a url to list of pub keys for jwt to pre-fetch.
The URL is a link to a json file having a mapping kid -> public key.
The mapping can contain also certificates, which will be used to get the public key.
The list is being updated before the cache-control max-age header value is reached, if such a header is returned from the server.
2023-07-26 12:19:02 -05:00
Дамян Минков
744960bb1a feat: Several module optimizations to avoid constant parsing of jids. (#12594)
* feat: Several module optimizations to avoid constant parsing of jids.

Caches the parsed values in a rotating table with limited size.
Skips constant creating of a stanza with never changing values - create it once and then just clone it.

* squash: Fixes extract_subdomain multiple values.

* squash: Fix table values when there is a nil element.

* squash: Fix skipping the roomless IQs.

* squash: Fix comments.
2022-11-28 14:18:59 -06:00
Дамян Минков
079a2a505d feat: Adds LE choice when installing debian package. (#12154)
* feat: Adds LE choice when installing debian package.

* Update debian/jitsi-meet-web-config.templates

Co-authored-by: raluca8x8 <raluca.tocmag@8x8.com>

* squash: Print in the console the JaaS link everytime.

* squash: Note that JaaS does not support self-signed certs.

* squash: Fix message.

* squash: Moves acme.sh stuff into a script, so it is easy to re-run.

Co-authored-by: raluca8x8 <raluca.tocmag@8x8.com>
2022-09-13 07:55:00 -05:00
Stefan Weil
882d343e8b chore(typos) fix some typos 2022-08-30 16:21:58 +02:00
luzpaz
c7f96de787 fix(misc) fix typos
Found via `codespell -q 3 -S ./lang -L miliseconds`
2022-07-14 09:10:08 +02:00
Дамян Минков
4d51aedde0 feat: Adds room info http endpoint jwt protected. (#11738)
* feat: Adds room info http endpoint jwt protected.

Used from dialplan from jigasi for handling passwords in IVR.

* squash: Fixes comments.

* squash: nginx api/rom-info

* fix: Skips tenant checks when enableDomainVerification is false.

* squash: Drops duplicate code and supports multi-shards.

By adding room= parameter in query and tenant prefix for the api we add support for multi-shards setup.

* feat: Enable domain verification by default.

This is used when verifying room access with token_verification module.

* squash: Update docs.
2022-07-12 09:51:13 +03:00
Дамян Минков
1400b6ff0a feat: Moves luajwtjitsi in jitsi-meet. (#11501)
* feat: Moves luajwtjitsi in jitsi-meet.

* squash: Fix luajwtjitsi name to include lib.
2022-05-09 09:15:12 -05:00
philip-cc
46dd88c91b feat(jwt) refactor token authentication plugin to use new luajwtjitsi version 2022-04-19 13:06:20 +02:00
nosmicek
40353cf762 fix: Fixes nil error while processing wrong jwt value. Fixes #10970
Co-authored-by: David Mišurec <david.misurec@icewarp.com>
2022-02-17 12:05:39 -06:00
Дамян Минков
ba6247daaf fix: Fixes errors in prosody about string formatting and nil values. (#10037)
* fix: Fixes errors in prosody about string formatting and nil values.

error   Traceback[c2s]: /usr/lib/prosody/util/format.lua:59: invalid option '%b' to 'format'
stack traceback:

mod_polls.lua:25: attempt to index local 'data' (a nil value)
stack traceback:

* squash: Fix more formatting concatenation.
2021-09-27 14:48:13 -05:00
Scott Boone
7af23f35ba added comment for future proofing 2021-08-18 14:01:11 -05:00
damencho
acdde6f1f5 fix: Skips check on domain verification disabled. Fixes #9313. 2021-06-02 11:50:26 -05:00
Aaron van Meerten
81c4e9a7fd fix: prosody: token alg is checked before public key is used 2021-06-02 11:50:16 -05:00
Andrei Bora
27481f0270 Allow both regex and normal check for the room name 2021-05-27 13:37:24 -05:00
scott boone
9657bd9b6d removed a typo (#9244) 2021-05-19 16:02:59 -05:00
Scott Boone
e6242f5bc7 lowercase to fix tokens with uppercase letters (e.g., slack JWTs) 2021-05-19 15:52:04 -05:00
Andrei Bora
572b99b208 Verify room name using regex in JWT 2021-04-19 07:49:46 -05:00
damencho
895c92217a fix: Optimizes hot paths in prosody modules, string comparisons. 2020-11-06 13:33:14 -06:00
slauth
9742e90bb5 allow wildcard in token issuer verification 2020-11-03 10:45:47 -06:00
Andrei Bora
b765adca75 Solve review issues and add retries for http call 2020-08-19 17:11:18 +03:00
Andrei Bora
92e6cf7618 Add pre and post validation for users that want to use their own public keys 2020-08-19 16:50:24 +03:00
Aaron van Meerten
36565f0c50 FIX: token util keyurl definition move to above callback definition 2020-08-14 15:23:54 -05:00
Aaron van Meerten
0c48e205d7 Merge branch 'master' into aaronkvanmeerten/jibri-queue-component-modules 2020-08-14 14:21:13 -05:00
Aaron van Meerten
5e35b69fc9 FIX: prosody token util handles race on timeout gracefully 2020-08-14 14:14:29 -05:00
Aaron van Meerten
e439d065b7 FEAT: token util better logging for timeouts, verification 2020-08-14 13:52:25 -05:00
Aaron van Meerten
d05fa32413 FIX: add flag to control whether to check room claim in JWT validation
jibri queue component stop checking room validation in token
Jibri queue component debug output when bad token is found
2020-08-12 14:43:34 -05:00
Aaron van Meerten
6fc9606c0d FEAT: support updating accepted issuer/aud for token lib 2020-08-10 15:21:31 -05:00
Aaron van Meerten
0bd100f027 FIX: prosody: comment on destroy_request 2020-08-07 13:16:17 -05:00
Aaron van Meerten
f14a595462 FIX: prosody: destroy_request check 2020-08-07 13:15:55 -05:00
Aaron van Meerten
11ee71a51c FEAT: jwt pubkey cache inside object
Allows each module that does token validation to have its own cache
2020-08-07 11:51:44 -05:00
damencho
6d3d15a64b feat: Adds an option to validate a recording token. 2020-07-02 12:51:14 -05:00
Wuriyanto
1b8e5d0244 change cjson to cjson.safe and cath error from decode function 2020-05-11 05:46:07 -05:00
Aaron van Meerten
7ce44f85ca changed to using a setter for the asapKeyServer 2019-06-06 15:22:38 -05:00
Aaron van Meerten
41e0d782ce allows override of asap key server in token utility 2019-06-06 14:41:46 -05:00
jmacelroy
573cc64fcd Normalizing subdomain when checking JWTs; similar to room. 2019-02-01 13:19:33 -06:00