[GH-183] Add jaas support#219
[GH-183] Add jaas support#219raghavaggarwal2308 wants to merge 69 commits intomattermost-community:masterfrom
Conversation
1. Added translation to texts in jitsi custom settings
1. Upgraded UI of jitsi settings in system console.
1. Fixed linting errors. 2. Fixed error while using own generated private key.
1. Specified method to generate a new key pair in private key description.
1. Removed console statements. 2. Used ?? operator instead of ||. 3. Created constants for "RSA PRIVATE KEY" and "PRIVATE KEY".
1. Converted to class components. 2. Created common func for duplicate code. 3. Used mux router. 4. Removed use of "any".
|
Small remark: README.md needs an update too. But preferably as a follow-up PR, since this PR has been delayed for years already... |
|
For who wants to test, see #206 how to build. Use the I'll be testing it out the coming weeks. I think it needs some more documentation, but that should not be obstructing for this PR |
|
Problems we found till now (everybody in EU):
I think all of these problems can be seen as different problem from this PR, except maybe the first. We have not tested with Jitsi's public server. |
|
@mickmister @VincentSC This PR has been on hold for a while. Should we assign this for QA review?
I am not sure if this is something we can handle as we are just sending a payload to an external Jitsi API. Can we create a separate issue for this if this is not concerning? So, this PR can be merged as it has been delayed a lot already. |
As the plugin has many problems (it does not build, as the dependencies are very outdated), I have not managed to test it yet. Even my comment of #206 (comment) is now outdated... Suggestion for order of fixes:
|
|
Can this be rebased against #237 ? Simply because that PR builds, and this one doesn't. |
|
@raghavaggarwal2308 Can you please update your branch with master to so it includes #237? |
|
It has been merged into master, I just saw. |
…i into add_jaas_support
|
@mickmister @VincentSC Updated |
webapp/package.json
Outdated
| "mattermost-redux": "5.23.0", | ||
| "prop-types": "15.7.2", | ||
| "react": "16.14.0", | ||
| "react-dom": "18.2.0", |
There was a problem hiding this comment.
This is causing build errors for me. I removed it again and it built fine. There are some test failures, though, but I'm not sure if they are caused by this.
There was a problem hiding this comment.
@Snektron It's building fine for me with this dependency and falling if I remove it. Also, this dependency is being used in the code, so I don't think it can be removed. Can you please share some screenshots of the errors you are facing?
There was a problem hiding this comment.
Note that if we are going to install react-dom, it should always have the same version number as react
|
It seems to be working for me (after fixing above issues) |
|
We tested for a few weeks. One big problem: every reconnect adds another MAU (Monthly Active User). Got this as a reply from 8x8:
|
|
Hi @VincentSC, thanks for reporting this.
Do you happen to have any suggestions on how we might solve this on our end? I'm not 100% sure what is meant by "reconnect" here |
…i into add_jaas_support
mickmister
left a comment
There was a problem hiding this comment.
Did another passthrough with some comments
|
|
||
| assets/i18n/translate.*.json | ||
|
|
||
| public/jaas |
There was a problem hiding this comment.
Why is this gitignored?
There was a problem hiding this comment.
make dist will automatically generate folder named Jaas inside the public directory
| const params = new URLSearchParams(window.location.search); | ||
| const jwt = params.get(JWT); | ||
| const meetingId = params.get(constants.MEETING_ID); | ||
|
|
||
| this.startJaaSMeetingWindow(jwt, meetingId); |
There was a problem hiding this comment.
IIUC, there is a JWT token in the user's location URL, while in Mattermost? That seems unnecessary if that's the case
There was a problem hiding this comment.
Can you please elaborate more on this comment?
There was a problem hiding this comment.
@ayusht2810 What is in window.location.search at the time of this code running? Is this in a Mattermost webapp context? Meaning is location.origin the Mattermost server at this time?
There was a problem hiding this comment.
@mickmister Yes, the origin is the mattermost URL at this time, and the location.search contains the meeting ID and the JWT token.
There was a problem hiding this comment.
The JWT token is being used to set the expiry of the meeting
https://developer.8x8.com/jaas/docs/api-keys-jwt
…lugin-jitsi into add_jaas_support
AayushChaudhary0001
left a comment
There was a problem hiding this comment.
@raghavaggarwal2308 I found a issue while testing this PR.
Issue: Authentication failed: Sorry you're not allowed to join this call.
Steps to reproduce:
- Upload the Jitsi plugin to mattermost server
- Switch the Jitsi server to Jaas
- Setup the AppID and API key
- Create a new Jitsi meeting and try to join it
Actual: Error toast message is shown - Authentication failed: Sorry you're not allowed to join this call and user is unable to join the call.
Expected: User should be able to join the jitsi call for jaas server.
…itsiJWT is true in setting
|
I'm surprised this is still open. AFAIK it works now? I do think we're using the MR. |

Summary
Most of the code here is from #185 . The person who created this PR was not responding to the review comments for a while. So, we recreated the same PR with the review comments fixed.
The review comments fixed are-
Screenshots
Updated UI

Updated description to clarify how to generate a private key

Ticket
Fixes #183 (JWT Configuration with JaaS)