Skip to content

Commit

Permalink
docs(case-study): add the table of contents
Browse files Browse the repository at this point in the history
  • Loading branch information
emrahcom committed Dec 16, 2024
1 parent ef35710 commit 855237b
Showing 1 changed file with 41 additions and 20 deletions.
61 changes: 41 additions & 20 deletions docs/case-tokenauthurl.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Jitsi setup with tokenAuthUrl

- [1. Installation](#1-installation)
- [1.1 Basic Jitsi](#11-basic-jitsi)
- [1.2 jitsi-meet-tokens](#12-jitsi-meet-tokens)
- [1.3 tokenAuthUrl](#13-tokenauthurl)
- [1.4 Jitsi-meet config](#14-jitsi-meet-config)
- [1.5 Disable auto ownersip](#15-disable-auto-ownership)
- [1.6 token_affiliation](#16-token-affiliation)
- [1.7 muc_wait_for_host](#17-muc-wait-for-host)
- [1.8 lobby_autostart](#18-lobby-autostart)
- [1.9 token_lobby_bypass](#19-token-lobby-bypass)
- [1.10 lobby_deactivate](#110-lobby-deactivate)
- [1.11 Restart services](#111-restart-services)
- [2. Token examples](#2-token-examples)
- [2.1 Guest](#21-guest)
- [2.2 Member](#22-member)
- [2.3 Moderator (deactivate the lobby)](#23-moderator-deactivate-the-lobby)
- [2.4 Moderator (keep the lobby)](#24-moderator-keep-the-lobby)
- [3. Hashes after authentication](#3-hashes-after-authentication)
- [3.1 Disable prejoin](#31-disable-prejoin)
- [3.2 Enable deeplinking](#32-enable-deeplinking)

This guide is about a Jitsi setup with the following features:

- JWT based authentication on Jitsi
Expand All @@ -9,25 +30,25 @@ This guide is about a Jitsi setup with the following features:
- Waiting room for guest and member participants
- Moderator can join directly

## Installation
## 1. Installation

Assumed that Jitsi will run on Debian 12 VM. It is possible to apply the same
features on different environments.

### Basic Jitsi
### 1.1 Basic Jitsi

Install a basic Jitsi without any customization using
[the official guide](https://jitsi.github.io/handbook/docs/devops-guide/devops-guide-quickstart).

### jitsi-meet-tokens
### 1.2 jitsi-meet-tokens

Install `jitsi-meet-tokens` package:

```bash
apt-get install jitsi-meet-tokens
```

### tokenAuthUrl
### 1.3 tokenAuthUrl

Set `tokenAuthUrl` in `config.js`. The link depends on how your authentication
system works:
Expand All @@ -36,7 +57,7 @@ system works:
config.tokenAuthUrl = "https://auth.mydomain.com/auth.html?state={state}";
```

### Additional config for jitsi-meet
### 1.4 Jitsi-meet config

The following features are also set in `config.js` for our case:

Expand Down Expand Up @@ -79,7 +100,7 @@ config.securityUi = {
};
```

### Disable auto ownership
### 1.5 Disable auto ownership

Disable the auto ownership in `Jicofo` to allow `token_affiliation` to manage
the ownership correctly.
Expand All @@ -89,7 +110,7 @@ hocon -f /etc/jitsi/jicofo/jicofo.conf set jicofo.conference.enable-auto-owner f
systemctl restart jicofo.service
```

### token_affiliation
### 1.6 token_affiliation

This module will control the participant's level in a meeting depending on
`affiliation` field in the token payload.
Expand All @@ -114,15 +135,15 @@ See
[token_affiliation](https://github.com/jitsi-contrib/prosody-plugins/tree/main/token_affiliation)
for details.

### muc_wait_for_host
### 1.7 muc_wait_for_host

This module is **NOT** used in this setup because it breaks the flow for our
case. It allows everyone to be a moderator if she has a token. So, even guest
participant can join the meeting directly if she has a token.

Therefore this setup implements the waiting room by using the following modules.

### lobby_autostart
### 1.8 lobby_autostart

This module will start the lobby automatically for each meeting. Only the
participant having a special value in her token payload will bypass this lobby.
Expand Down Expand Up @@ -153,7 +174,7 @@ See
[lobby_autostart](https://github.com/jitsi-contrib/prosody-plugins/tree/main/lobby_autostart)
for details.

### token_lobby_bypass
### 1.9 token_lobby_bypass

This module allows the participant to bypass the lobby if she has a special
value (`"lobby_bypass" = true`) in her token payload.
Expand All @@ -178,7 +199,7 @@ See
[token_lobby_bypass](https://github.com/jitsi-contrib/prosody-plugins/tree/main/token_lobby_bypass)
for details.

### lobby_deactivate
### 1.10 lobby_deactivate

This module will deactivate the lobby after the first moderator joins the
meeting. So, the participants in the waiting room will join the meeting after
Expand Down Expand Up @@ -207,16 +228,16 @@ See
[lobby_deactivate](https://github.com/jitsi-contrib/prosody-plugins/tree/main/lobby_deactivate)
for details.

### Restart services
### 1.11 Restart services

```bash
systemctl restart prosody.service
systemctl restart jicofo.service
```

## Token examples
## 2. Token examples

### Guest
### 2.1 Guest

The guest participant has no account on the identity system but she has still a
token generated by the authentication system.
Expand All @@ -240,7 +261,7 @@ token generated by the authentication system.
}
```

### Member
### 2.2 Member

The member participant has an account on the identity system but no moderator
privileges.
Expand All @@ -264,7 +285,7 @@ privileges.
}
```

### Moderator (decativate the lobby)
### 2.3 Moderator (decativate the lobby)

This participant has an account on the identity system and moderator privileges.
She deactivates the lobby automatically after joining (_because there is no
Expand All @@ -289,7 +310,7 @@ She deactivates the lobby automatically after joining (_because there is no
}
```

### Moderator (keep the lobby)
### 2.4 Moderator (keep the lobby)

This participant has an account on the identity system and moderator privileges.
She keeps the lobby after joining (_because there is `context.room.lobby` in her
Expand Down Expand Up @@ -317,7 +338,7 @@ token_).
}
```

## Hashes
## 3. Hashes after authentication

The authentication system can add some hashes to the link to change the behavior
on Jitsi after the authentication.
Expand All @@ -328,12 +349,12 @@ The format of the generated link will be like the following in this case:
https://jitsi.domain.com/roomname?jwt=eyJh...#config.prejoinConfig.enabled=false
```

### Disabling prejoin
### 3.1 Disable prejoin

Add `config.prejoinConfig.enabled=false` to the link to disable the prejoin page
after authentication.

### Enable deeplinking
### 3.2 Enable deeplinking

Add `config.deeplinking.disabled=false` to the link to enable the deeplinking
(_asking for selecting the app or the browser_) after authentication.

0 comments on commit 855237b

Please sign in to comment.