[jitsi-dev] Jitsi Meet and JWT integration


#1

Hello everyone,

I'm currently working on an authentication app based on OpenID Connect. Once my users are connected they'll be automatically redirected to Jitsi Meet server.

In order to do this, I would like to embed Jitsi Meet in to my authentication app through the Jitsi Meet API (external_api.js) and to make it more secure I want to add JWT Token authentication. So my question is, is JWT token authentication already working and fully implemented in Jitsi Meet ?

I would be extremely glad if someone could provide me with a documentation/sample of JWT integration using, because I couldn't find enough examples on the Github repository.

Best regards,
Hamza


#2

Dear all,

The JWT integration is done but I still have an error when I try to connect to jitsi meet.

on the Client JS Console I see : CONNECTION FAILED: connection.passwordRequired, it seems that prosody doesn't recognize the received JWT (No logs). Here's what I do in my node.js app to generate the token :

var myJWT=jwt.sign(
{
iss:"JitsiAuth",
exp:1505907723,
aud:"*",
sub:"meet.testServer",
room:"Hey"
},"MySecret");

So after this jwt is encoded, I use it in JitsiMeetExternalAPI constructor as below :

var domain = "meet.testServer";
var options = {
roomName: 'Hey',
width: "100%",
height: 700,
parentNode: document.querySelector('body'),
jwt:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJKaXRzaUF1dGgiLCJyb29tIjoiSGV5IiwiZXhwIjoxNTA1OTA3NzIzLCJzdWIiOiJtZWV0LnRlc3RTZXJ2ZXIiLCJhdWQiOiIqIn0.PDBa-UFU5aswM68rFAL3lkeYjXTwtkGfYKlfP3XCT6A"
}
var api = new JitsiMeetExternalAPI(domain, options);

Any ideas why this is not working ?

Best regards
Hamza KHAIT

···

Le 14/09/2017 18:12, > KHAIT Hamza - SG/SPSSI/CPII/DOSE/ET/PNE ANNUAIRE ET MESSAGERIE (par Internet, dépôt dev-bounces@jitsi.org) a écrit :

Hello everyone,

I'm currently working on an authentication app based on OpenID
Connect. Once my users are connected they'll be automatically
redirected to Jitsi Meet server.

In order to do this, I would like to embed Jitsi Meet in to my
authentication app through the Jitsi Meet API (external_api.js) and to
make it more secure I want to add JWT Token authentication. So my
question is, is JWT token authentication already working and fully
implemented in Jitsi Meet ?

I would be extremely glad if someone could provide me with a
documentation/sample of JWT integration using, because I couldn't find
enough examples on the Github repository.

Best regards,
Hamza

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev


#3

You may want to check what is the exact error returned by prosody. In
Chrome open networking tab and check for the bosh request that
contains the error response.

···

On Wed, Sep 20, 2017 at 10:33 AM, KHAIT Hamza - SG/SPSSI/CPII/DOSE/ET/PNE ANNUAIRE ET MESSAGERIE <hamza.khait@i-carre.net> wrote:

Dear all,

The JWT integration is done but I still have an error when I try to connect
to jitsi meet.

on the Client JS Console I see : CONNECTION FAILED:
connection.passwordRequired, it seems that prosody doesn't recognize the
received JWT (No logs). Here's what I do in my node.js app to generate the
token :

var myJWT=jwt.sign(
{
iss:"JitsiAuth",
exp:1505907723,
aud:"*",
sub:"meet.testServer",
room:"Hey"
},"MySecret");

So after this jwt is encoded, I use it in JitsiMeetExternalAPI constructor
as below :

var domain = "meet.testServer";
var options = {
roomName: 'Hey',
width: "100%",
height: 700,
parentNode: document.querySelector('body'),
jwt:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJKaXRzaUF1dGgiLCJyb29tIjoiSGV5IiwiZXhwIjoxNTA1OTA3NzIzLCJzdWIiOiJtZWV0LnRlc3RTZXJ2ZXIiLCJhdWQiOiIqIn0.PDBa-UFU5aswM68rFAL3lkeYjXTwtkGfYKlfP3XCT6A"
}
var api = new JitsiMeetExternalAPI(domain, options);

Any ideas why this is not working ?

Best regards
Hamza KHAIT

Le 14/09/2017 18:12, > KHAIT Hamza - SG/SPSSI/CPII/DOSE/ET/PNE ANNUAIRE ET > MESSAGERIE (par Internet, dépôt dev-bounces@jitsi.org) a écrit :

Hello everyone,

I'm currently working on an authentication app based on OpenID
Connect. Once my users are connected they'll be automatically
redirected to Jitsi Meet server.

In order to do this, I would like to embed Jitsi Meet in to my
authentication app through the Jitsi Meet API (external_api.js) and to
make it more secure I want to add JWT Token authentication. So my
question is, is JWT token authentication already working and fully
implemented in Jitsi Meet ?

I would be extremely glad if someone could provide me with a
documentation/sample of JWT integration using, because I couldn't find
enough examples on the Github repository.

Best regards,
Hamza

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev


#4

Problem solved.
the "exp" parameter was an expired timestamp.

Many thanks to you guys!

Regards
Hamza

···

Le 20/09/2017 17:39, > Paweł Domas (par Internet, dépôt dev-bounces@jitsi.org) a écrit :

You may want to check what is the exact error returned by prosody. In
Chrome open networking tab and check for the bosh request that
contains the error response.

On Wed, Sep 20, 2017 at 10:33 AM, KHAIT Hamza - > SG/SPSSI/CPII/DOSE/ET/PNE ANNUAIRE ET MESSAGERIE > <hamza.khait@i-carre.net> wrote:

Dear all,

The JWT integration is done but I still have an error when I try to connect
to jitsi meet.

on the Client JS Console I see : CONNECTION FAILED:
connection.passwordRequired, it seems that prosody doesn't recognize the
received JWT (No logs). Here's what I do in my node.js app to generate the
token :

var myJWT=jwt.sign(
{
iss:"JitsiAuth",
exp:1505907723,
aud:"*",
sub:"meet.testServer",
room:"Hey"
},"MySecret");

So after this jwt is encoded, I use it in JitsiMeetExternalAPI constructor
as below :

var domain = "meet.testServer";
var options = {
roomName: 'Hey',
width: "100%",
height: 700,
parentNode: document.querySelector('body'),
jwt:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJKaXRzaUF1dGgiLCJyb29tIjoiSGV5IiwiZXhwIjoxNTA1OTA3NzIzLCJzdWIiOiJtZWV0LnRlc3RTZXJ2ZXIiLCJhdWQiOiIqIn0.PDBa-UFU5aswM68rFAL3lkeYjXTwtkGfYKlfP3XCT6A"
}
var api = new JitsiMeetExternalAPI(domain, options);

Any ideas why this is not working ?

Best regards
Hamza KHAIT

Le 14/09/2017 18:12, > KHAIT Hamza - SG/SPSSI/CPII/DOSE/ET/PNE >> ANNUAIRE ET >> MESSAGERIE (par Internet, dépôt dev-bounces@jitsi.org) a écrit :

Hello everyone,

I'm currently working on an authentication app based on OpenID
Connect. Once my users are connected they'll be automatically
redirected to Jitsi Meet server.

In order to do this, I would like to embed Jitsi Meet in to my
authentication app through the Jitsi Meet API (external_api.js) and to
make it more secure I want to add JWT Token authentication. So my
question is, is JWT token authentication already working and fully
implemented in Jitsi Meet ?

I would be extremely glad if someone could provide me with a
documentation/sample of JWT integration using, because I couldn't find
enough examples on the Github repository.

Best regards,
Hamza

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev