jitsi / lib-jitsi-meet

A low-level JS video API that allows adding a completely custom video experience to web apps.
Apache License 2.0
1.33k stars 1.11k forks source link

JWT Jitsi Nextcloud Plugin Issue #2254

Open itdkr opened 1 year ago

itdkr commented 1 year ago

Hi everyone,

i have a issue with the Nextcloud Jitsi JWT Plugin.

If i connect to the Jitsi conference via Nextcloud i get this issue enclosed.

grafik

if i connect to a conference via the Jitsi Webinterface and use a JWT everthing is fine. (i use the same jwt for nextcloud an jitsi)

The log from /var/log/prosody/ grafik

Can anyone please help me? Thank you.

Regards itdkr

saghul commented 1 year ago

Can you please share a sample token?

itdkr commented 1 year ago

grafik

saghul commented 1 year ago

Your nbf field is missing. Also, any chance you configured the wrong secret in your installation? As you can see in the error there is a signature mismatch.

itdkr commented 1 year ago

Your nbf field is missing. Also, any chance you configured the wrong secret in your installation? As you can see in the error there is a signature mismatch.

i have configured a jwt with nbf and without and it works from the jitsi webinterface. But if i use the Nextcloud Jitsi Plugin with the same JWT it doesn´t work and i get these errors.

saghul commented 1 year ago

What plugin is that?

itdkr commented 1 year ago

What plugin is that?

It´s the Nextcloud Jitsi Plugin

grafik

saghul commented 1 year ago

I have never tried that one. Do you use a separate auth plugin on the Jitsi side?

itdkr commented 1 year ago

I have never tried that one. Do you use a separate auth plugin on the Jitsi side?

I use the prosody Plugin for Authentication.

I use this manual to configure the JWT authentication. https://github.com/jitsi/lib-jitsi-meet/blob/master/doc/tokens.md

saghul commented 1 year ago

Hum, if it works directly with the Jitsi web interface it could be something in the Nextcloud plugin. Can you use the web inspector to get a sample token which Nextcloud generated?

itdkr commented 1 year ago

Hum, if it works directly with the Jitsi web interface it could be something in the Nextcloud plugin. Can you use the web inspector to get a sample token which Nextcloud generated?

This token is created from Nextcloud. grafik

It is strange. If i copy the jitsinextcloudapiframe and take my JWT the link works but with the jitsi host subdomain. With the nextcloud jitsi plugin it should be possible to use them with the nextcloud subdomain.

Here is the JWT which i have take and then the connection works. grafik

Here is a sample iframe from nextcloud: https://test.jitsi.de/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjb250ZXh0Ijp7InVzZXIiOnsibmFtZSI6Im5jLXRlc3QifX0sImF1ZCI6InRlc3QiLCJpc3MiOiJ0ZXN0Iiwic3ViIjoiKiIsInJvb20iOiIwMmEwYTRkOS1kYzFiLTQ1NWQtYTczZC01MzUyMmI4ZWNiNzEiLCJleHAiOjE2ODA2NDI0MDl9.ip9XW5z48ustfi6vzIjxaLh8bulC0bP1Y-napqZzFO4#jitsi_meet_external_api_id=0&config.disableDeepLinking=true&config.prejoinPageEnabled=false&config.prejoinConfig.enabled=false&config.prejoinConfig=%7B%22enabled%22%3Afalse%7D&config.disableInviteFunctions=true&interfaceConfig.HIDE_INVITE_MORE_HEADER=true&interfaceConfig.MOBILE_APP_PROMO=false&interfaceConfig.SHARING_FEATURES=%5B%5D&userInfo.displayName=%22nc-test%22"

itdkr commented 1 year ago

Hum, if it works directly with the Jitsi web interface it could be something in the Nextcloud plugin. Can you use the web inspector to get a sample token which Nextcloud generated?

Here are the Jitsi Nextcloud Plugin Settings grafik

saghul commented 1 year ago

The audience and issuer don't match in the 2 examples. What did you configure in Prosody?

itdkr commented 1 year ago

The audience and issuer don't match in the 2 examples. What did you configure in Prosody?

Here are the Prosody config file prosodyconfig.txt