|
1 | 1 | --- |
2 | 2 | id: secure-domain |
3 | | -title: Secure Domain setup |
| 3 | +title: Secure Domain Setup |
4 | 4 | sidebar_label: Authentication (Secure Domain) |
5 | 5 | --- |
6 | 6 |
|
7 | | -It is possible to allow only authenticated users to create new conference |
8 | | -rooms. Whenever a new room is about to be created, Jitsi Meet will prompt for |
9 | | -a user name and password. After the room is created, others will be able to join |
10 | | -from anonymous domain. Here's what has to be configured: |
| 7 | +It is possible to allow only authenticated users to create new conference rooms. |
| 8 | +Whenever a new room is about to be created, Jitsi Meet will prompt for a user |
| 9 | +name and password. After the room is created, others will be able to join from |
| 10 | +anonymous domain. Here's what has to be configured: |
11 | 11 |
|
12 | 12 | ## Prosody configuration |
13 | 13 |
|
14 | | -If you have installed Jitsi Meet from the Debian package, these changes should be made in `/etc/prosody/conf.avail/[your-hostname].cfg.lua` |
| 14 | +If you have installed Jitsi Meet from the Debian package, these changes should |
| 15 | +be made in `/etc/prosody/conf.avail/[your-hostname].cfg.lua` |
| 16 | + |
| 17 | +In the example below, this hostname is assumed to be `jitsi.example.com`. Update |
| 18 | +this value according to your own hostname. |
15 | 19 |
|
16 | 20 | ### Enable authentication |
17 | 21 |
|
18 | | -Inside the `VirtualHost "[your-hostname]"` block, replace anonymous authentication with hashed password authentication: |
| 22 | +Inside the `VirtualHost "[your-hostname]"` section, replace anonymous |
| 23 | +authentication with hashed password authentication: |
19 | 24 |
|
20 | 25 | ``` |
21 | | -VirtualHost "jitsi-meet.example.com" |
| 26 | +VirtualHost "jitsi.example.com" |
22 | 27 | authentication = "internal_hashed" |
23 | 28 | ``` |
24 | 29 |
|
25 | | -Replace `jitsi-meet.example.com` with your hostname. |
| 30 | +You will see your own hostname instead of `jitsi.example.com` in your config |
| 31 | +file. |
26 | 32 |
|
27 | 33 | ### Enable anonymous login for guests |
28 | 34 |
|
29 | | -Add this block **after the previous VirtualHost** to enable the anonymous login method for guests: |
| 35 | +Add this section **after the previous VirtualHost** to enable the anonymous |
| 36 | +login method for guests: |
30 | 37 |
|
31 | 38 | ``` |
32 | | -VirtualHost "guest.jitsi-meet.example.com" |
33 | | - authentication = "anonymous" |
| 39 | +VirtualHost "guest.jitsi.example.com" |
| 40 | + authentication = "jitsi-anonymous" |
34 | 41 | c2s_require_encryption = false |
35 | 42 | ``` |
36 | 43 |
|
37 | | -_Note that `guest.jitsi-meet.example.com` is internal to Jitsi, and you do not need to (and should not) create a DNS record for it, or generate an SSL/TLS certificate, or do any web server configuration. While it is internal, you should still replace `jitsi-meet.example.com` with your hostname._ |
| 44 | +_Note that `guest.jitsi.example.com` is internal to Jitsi, and you do not need |
| 45 | +to (and should not) create a DNS record for it, or generate an SSL/TLS |
| 46 | +certificate, or do any web server configuration. While it is internal, you |
| 47 | +should still replace `jitsi.example.com` with your hostname._ |
38 | 48 |
|
39 | 49 | ## Jitsi Meet configuration |
40 | 50 |
|
41 | 51 | In config.js, the `anonymousdomain` options has to be set. |
42 | 52 |
|
43 | | -If you have installed jitsi-meet from the Debian package, these changes should be made in `/etc/jitsi/meet/[your-hostname]-config.js`. |
| 53 | +If you have installed jitsi-meet from the Debian package, these changes should |
| 54 | +be made in `/etc/jitsi/meet/[your-hostname]-config.js`. |
44 | 55 |
|
45 | 56 | ``` |
46 | 57 | var config = { |
47 | 58 | hosts: { |
48 | | - domain: 'jitsi-meet.example.com', |
49 | | - anonymousdomain: 'guest.jitsi-meet.example.com', |
50 | | - ... |
51 | | - }, |
52 | | - ... |
| 59 | + domain: 'jitsi.example.com', |
| 60 | + anonymousdomain: 'guest.jitsi.example.com', |
| 61 | + // ... |
| 62 | + }, |
| 63 | + // ... |
53 | 64 | } |
54 | 65 | ``` |
55 | 66 |
|
| 67 | +You will see your own hostname instead of `jitsi.example.com` in your config |
| 68 | +file. You should add only the `anonymousdomain` line. Be carefull of commas. |
| 69 | + |
56 | 70 | ## Jicofo configuration |
57 | 71 |
|
58 | 72 | When running Jicofo, specify your main domain in an additional configuration |
59 | 73 | property. Jicofo will accept conference allocation requests only from the |
60 | | -authenticated domain. This should go as a new 'authentication' section in `/etc/jitsi/jicofo/jicofo.conf`: |
| 74 | +authenticated domain. This should go as a new `authentication` section in |
| 75 | +`/etc/jitsi/jicofo/jicofo.conf`: |
61 | 76 |
|
62 | 77 | ``` |
63 | 78 | jicofo { |
64 | 79 | authentication: { |
65 | 80 | enabled: true |
66 | 81 | type: XMPP |
67 | | - login-url: jitsi-meet.example.com |
68 | | - } |
69 | | - ... |
| 82 | + login-url: "jitsi.example.com" |
| 83 | + } |
| 84 | +} |
70 | 85 | ``` |
71 | 86 |
|
72 | | -When using token based authentication, the type must use `JWT` as the scheme instead: |
| 87 | +Replace `jitsi.example.com` with your own hostname. Don't create a new `jicofo` |
| 88 | +section. Create the `authentication` section inside the existing `jicofo` |
| 89 | +section. |
| 90 | + |
| 91 | +## Restart the services |
| 92 | + |
| 93 | +Restart prosody, jicofo and jitsi-videobridge2 as `root`. |
73 | 94 |
|
74 | 95 | ``` |
75 | | -jicofo { |
76 | | - authentication: { |
77 | | - enabled: true |
78 | | - type: JWT |
79 | | - login-url: jitsi-meet.example.com |
80 | | - } |
81 | | - ... |
| 96 | +systemctl restart prosody |
| 97 | +systemctl restart jicofo |
| 98 | +systemctl restart jitsi-videobridge2 |
82 | 99 | ``` |
83 | 100 |
|
84 | | -## Create users in Prosody (internal auth) |
| 101 | +## Create users in Prosody |
85 | 102 |
|
86 | 103 | Finally, run `prosodyctl` to create a user in Prosody: |
87 | 104 |
|
88 | 105 | ``` |
89 | | -sudo prosodyctl register <username> jitsi-meet.example.com <password> |
| 106 | +sudo prosodyctl register <username> <your-hostname> <password> |
90 | 107 | ``` |
91 | | -and then restart prosody, jicofo and jitsi-videobridge2 |
| 108 | + |
| 109 | +For example: |
| 110 | + |
92 | 111 | ``` |
93 | | -systemctl restart prosody |
94 | | -systemctl restart jicofo |
95 | | -systemctl restart jitsi-videobridge2 |
| 112 | +sudo prosodyctl register myname jitsi.example.com mypassword123 |
96 | 113 | ``` |
97 | 114 |
|
98 | 115 | :::note |
99 | | -Docker users may require an alternate config path. Users of the official [`jitsi/prosody`](https://github.com/jitsi/docker-jitsi-meet) image should invoke `prosodyctl` as follows. |
| 116 | +Docker users may require an alternate config path. Users of the official |
| 117 | +[`jitsi/prosody`](https://github.com/jitsi/docker-jitsi-meet) image should |
| 118 | +invoke `prosodyctl` as follows. |
100 | 119 |
|
101 | 120 | ``` |
102 | 121 | prosodyctl --config /config/prosody.cfg.lua register <username> meet.jitsi <password> |
103 | 122 | ``` |
104 | 123 |
|
105 | | -Full documentation for `prosodyctl` can be found on [the official site](https://prosody.im/doc/prosodyctl). |
| 124 | +Full documentation for `prosodyctl` can be found on |
| 125 | +[the official site](https://prosody.im/doc/prosodyctl). |
106 | 126 | ::: |
107 | 127 |
|
| 128 | +## Remove users from Prosody |
| 129 | + |
| 130 | +To remove an existing user: |
| 131 | + |
| 132 | +``` |
| 133 | +sudo prosodyctl unregister <username> <your-hostname> |
| 134 | +``` |
| 135 | + |
| 136 | +For example: |
| 137 | + |
| 138 | +``` |
| 139 | +sudo prosodyctl unregister myname jitsi.example.com |
| 140 | +``` |
| 141 | + |
108 | 142 | ## Optional: Jigasi configuration |
109 | 143 |
|
110 | 144 | ### Enable Authentication |
111 | 145 |
|
112 | | -If you are using Jigasi, set it to authenticate by editing the following lines in `/etc/jitsi/jigasi/sip-communicator.properties`: |
| 146 | +If you are using Jigasi, set it to authenticate by editing the following lines |
| 147 | +in `/etc/jitsi/jigasi/sip-communicator.properties`: |
113 | 148 |
|
114 | | -```` |
| 149 | +``` |
115 | 150 | org.jitsi.jigasi.xmpp.acc.USER_ID=SOME_USER@SOME_DOMAIN |
116 | 151 | org.jitsi.jigasi.xmpp.acc.PASS=SOME_PASS |
117 | 152 | org.jitsi.jigasi.xmpp.acc.ANONYMOUS_AUTH=false |
118 | | -```` |
| 153 | +``` |
119 | 154 |
|
120 | 155 | Note that the password is the actual plaintext password, not a base64 encoding. |
121 | 156 |
|
122 | 157 | ### Debugging |
123 | 158 |
|
124 | | -If you experience problems with a certificate chain, you may need to uncomment the following line, also in `sip-communicator.properties`: |
| 159 | +If you experience problems with a certificate chain, you may need to uncomment |
| 160 | +the following line, also in `sip-communicator.properties`: |
125 | 161 |
|
126 | | -```` |
| 162 | +``` |
127 | 163 | net.java.sip.communicator.service.gui.ALWAYS_TRUST_MODE_ENABLED=true |
128 | | -```` |
| 164 | +``` |
129 | 165 |
|
130 | 166 | :::note |
131 | | -This should only be used for testing/debugging purposes, or in controlled environments. If you confirm that this is the problem, you should then solve it in another way (e.g. get a signed certificate for Prosody, or add the particular certificate to Jigasi’s trust store). |
| 167 | +This should only be used for testing/debugging purposes, or in |
| 168 | +controlled environments. If you confirm that this is the problem, you should |
| 169 | +then solve it in another way (e.g. get a signed certificate for Prosody, or add |
| 170 | +the particular certificate to Jigasi’s trust store). |
132 | 171 | ::: |
0 commit comments