「Jitsi-meet」の版間の差分
(→Log evaluation: 翻訳) |
|||
| 360行目: | 360行目: | ||
次に、{{ic|jigasi.service}} を [[起動/有効化]] します。 |
次に、{{ic|jigasi.service}} を [[起動/有効化]] します。 |
||
| + | === ルーム作成時のアクセス制限 === |
||
| − | === Access restrictions for room creation === |
||
| + | ビデオ会議室の '''作成''' を認証されたユーザーに制限するには、次の手順を実行します。会議への参加者はまだ認証されていないことに注意してください。 |
||
| − | To restrict video conference room '''creation''' to authenticated users, you can do the following steps. Note that participants to the meeting are still not authenticated! |
||
| + | prosody の jitsi ドメインに認証を追加し、ゲスト用の新しい仮想ホストを追加します: |
||
| − | Add authentication to the jitsi domain in prosody and add a new virtual host for guests: |
||
{{hc|/etc/prosody/conf.d/jitsi.cfg.lua|2= |
{{hc|/etc/prosody/conf.d/jitsi.cfg.lua|2= |
||
| 389行目: | 389行目: | ||
}} |
}} |
||
| + | {{ic|jitsi-meet}} の設定ファイルを編集します。 |
||
| − | Edit the configuration file for {{ic|jitsi-meet}}: |
||
{{hc|/etc/webapps/jitsi-meet/config.js|2= |
{{hc|/etc/webapps/jitsi-meet/config.js|2= |
||
| 400行目: | 400行目: | ||
}} |
}} |
||
| − | + | {{ic|jicofo}} の認証を追加します: |
|
{{hc|/etc/jicofo/jicofo.conf|2= |
{{hc|/etc/jicofo/jicofo.conf|2= |
||
| 413行目: | 413行目: | ||
}} |
}} |
||
| + | 次に、目的のユーザーを作成します。 |
||
| − | Then create the desired users via |
||
{{bc|1= |
{{bc|1= |
||
| 419行目: | 419行目: | ||
}} |
}} |
||
| + | {{ic|jigasi}} を使用している場合のみ (知らない場合は編集しません)、匿名認証を許可しないように SIP インターフェースを編集します: |
||
| − | Only if you are using {{ic|jigasi}} (if you do not know, you do not) edit the SIP interface to not allow anonymous authentication: |
||
{{hc|/etc/jitsi/jigasi/sip-communicator.properties|2= |
{{hc|/etc/jitsi/jigasi/sip-communicator.properties|2= |
||
| 425行目: | 425行目: | ||
}} |
}} |
||
| − | + | これらの手順は [https://github.com/jitsi/jicofo#secure-domain このガイド] から引用されています。 |
|
=== Access restrictions with JWT token === |
=== Access restrictions with JWT token === |
||
2024年1月7日 (日) 00:49時点における版
Jitsi はセキュアなビデオ会議ソリューションを簡単に構築・デプロイすることができるオープンソースプロジェクトのセットです。Jitsi の中心は Jitsi Videobridge と Jitsi Meet で、インターネット上で会議を行うことができます。コミュニティの他のプロジェクトを使うことでオーディオ会議やダイアルイン、録音、サイマルキャストなどの機能を有効化できます。
目次
インストール
Jitsi-meet はいくつかのコンポーネントで設定されています。
jitsi-meet: Web インターフェイス用のファイル。Web サーバーによって提供されるファイル経由でアクセスされます。jitsi-meet-prosody: jitsi の韻律プラグインjitsi-meet-turnserver: スタン/ターンサーバーを実行する設定の例jitsi-videobridge: すべての参加者にビデオストリームを提供するビデオブリッジングサービスjicofo: Jitsi カンファレンスの焦点は誰が話すかを決定すること- Prosody: セットアップのベースとなる無料の XMPP サーバー
ユーザー間のインターフェースのグラフィカルな概要は、こちら に示されています。
git バージョン、nightly バージョン、または安定バージョンのいずれかを使用できます。
これらを同時にインストールすることは可能ですが、別のポートと韻律の複数のインスタンスを使用する必要があります (プラグインを仮想ホストごとにスコープすることはできません)
通常バージョンか bin バージョンを選択する必要があります。bin 1 は通常のバージョンと競合します (つまり、nightly と nightly-bin は同時にインストールできませんが、stable と nightly は可能です)
1 つだけを使用するようにしてください:
一部のパッケージでは、設定例が /usr/share/doc にインストールされます。必ず /etc/pacman.conf でこの行をコメント化してください:
#NoExtract = usr/share/gtk-doc/html/* usr/share/doc/*
スタンドアロンサーバーを実行するには、これらのオプションパッケージが必要です:
設定
サーバー名が example.com の場合、jitsi の一般的な選択は meet.example.com になりますが、自由に選択できます。ただし、セキュリティの観点から、独自のサブドメインで Web アプリをホストすることが強く推奨されます。 選択したサブドメインのエントリでサーバーの DNS レコードを更新する必要があります (上記の例では meet) 残りの部分では、これが完了していることを前提としています。
また、meet.example.com ドメインの SSL/TLS 証明書も必要です。無料の証明書を取得する方法については、certbot を参照してください。
以下では、次のプレースホルダーが使用されます:
JITSIFQDN:jitsi-meetドメイン、例:meet.example.comSECRET_JVB_USER: ビデオブリッジのパスワードSECRET_FOCUS_USER: 認証者のパスワード
パスワードは、mktemp -u XXXXXXXX または pwgen などの安全な方法で取得する必要があります。必ず別の安全なパスワードを使用してください。
設定パス
| パッケージ | 設定パス |
|---|---|
| Stable | |
| jitsi-meetAUR jitsi-meet-binAUR |
/etc/webapps/jitsi-meet
|
| jitsi-meet-prosodyAUR jitsi-meet-prosody-binAUR |
/usr/lib/jitsi-meet-prosody
|
| jitsi-meet-turnserverAUR jitsi-meet-turnserver-binAUR |
/usr/share/doc/jitsi-meet-turnserver
|
| jicofoAUR jicofo-binAUR |
/etc/jicofo
|
| jitsi-videobridgeAUR jitsi-videobridge-binAUR |
/etc/jitsi-videobridge
|
| Nightly | |
| jitsi-meet-nightlyAUR jitsi-meet-nightly-binAUR |
/etc/webapps/jitsi-meet-nightly
|
| jitsi-meet-prosody-nightlyAUR jitsi-meet-prosody-nightly-binAUR |
/usr/lib/jitsi-meet-prosody-nightly
|
| jitsi-meet-turnserver-nightlyAUR jitsi-meet-turnserver-nightly-binAUR |
/usr/share/doc/jitsi-meet-turnserver-nightly
|
| jicofo-nightlyAUR jicofo-nightly-binAUR |
/etc/jicofo-nightly
|
| jitsi-videobridge-nightlyAUR jitsi-videobridge-nightly-binAUR |
/etc/jitsi-videobridge-nightly
|
| Git | |
| jitsi-meet-gitAUR | /etc/webapps/jitsi-meet-git
|
| jitsi-meet-prosody-gitAUR | /usr/lib/jitsi-meet-prosody-git
|
| jitsi-meet-turnserver-gitAUR | /usr/share/doc/jitsi-meet-turnserver-git
|
| jicofo-gitAUR | /etc/jicofo-git
|
| jitsi-videobridge-gitAUR | /etc/jitsi-videobridge-git
|
ループバック
jitsi-meet コンポーネントがローカル IP を使用して相互に到達できるようにします。ドメインがサーバーの実際の IP を返さない Cloudflare のようなプロキシの背後にある場合でも機能します。
/etc/hosts 内:
127.0.0.1 JITSIFQDN auth.JITSIFQDN ::1 JITSIFQDN auth.JITSIFQDN
prosody の設定
prosody は前提条件であり、Jitsi サービス用の構成をそれに追加する必要があります。prosody サーバーをまだセットアップしていない場合は、今すぐ prosody と lua52-sec をインストールしてください。prosody 設定の残りの部分では、prosody がローカルにインストールされていることを前提としています。
パッケージ jitsi-meet-prosodyAUR は、簡単にカスタマイズできる設定を提供します。
# cd /etc/prosody # mkdir conf.d # cp /usr/share/doc/jitsi-meet-prosody/prosody.cfg.lua-jvb.example conf.d/jitsi.cfg.lua
次に、これを末尾に追加します:
/etc/prosody/prosody.cfg.lua
Include "conf.d/*.cfg.lua"
設定をカスタマイズします:
/etc/prosody/conf.d/jitsi.cfg.lua
-- replace all occurences of jitmeet.example.com by JITSIFQDN
-- replace all occurences of focusUser by focus
-- then add or update those section
VirtualHost "JITSIFQDN"
ssl = {
key = "/etc/prosody/certs/JITSIFQDN.key";
certificate = "/etc/prosody/certs/JITSIFQDN.crt";
}
VirtualHost "auth.JITSIFQDN"
ssl = {
key = "/etc/prosody/certs/auth.JITSIFQDN.key";
certificate = "/etc/prosody/certs/auth.JITSIFQDN.crt";
}
authentication = "internal_hashed"
/etc/prosody/conf.d/jitsi.cfg.lua
-- Proxy to jicofo's user JID, so that it does not have to register as a component.
Component "focus.JITSIFQDN" "client_proxy"
target_address = "focus@auth.JITSIFQDN"
ここで、JITSIFQDN および JITSIFQDN の証明書を生成する必要があります。
certbot を使用する場合は、次のコマンドを使用して証明書をインポートできます:
# prosodyctl --root cert import /etc/letsencrypt/live
自己生成した証明書を使用したい場合は、以下を使用できます:
[prosody]$ prosodyctl cert generate JITSIFQDN
[prosody]$ prosodyctl cert generate auth.JITSIFQDN
# mv /var/lib/prosody/*.{crt,cnf,key} /etc/prosody/certs/
# trust anchor /etc/prosody/certs/JITSIFQDN.crt
# trust anchor /etc/prosody/certs/auth.JITSIFQDN.crt
# update-ca-trust
ユーザー jvb と focus を登録します:
# prosodyctl register jvb auth.JITSIFQDN SECRET_JVB_USER # prosodyctl register focus auth.JITSIFQDN SECRET_FOCUS_USER # prosodyctl mod_roster_command subscribe focus.JITSIFQDN focus@auth.JITSIFQDN
次に、prosody.service を 再起動 (または、インストールしたばかりの場合は 起動/有効化) します。
jitsi-videobridge の設定
jitsi-videobridge の設定。nightly および git バージョンの場合は、-nightly または -git を /etc/jitsi-videobridge に追加します。
MUC_NICKNAME の場合は、uuidgen コマンドを使用します。
/etc/jitsi-videobridge/sip-communicator.properties
org.jitsi.videobridge.xmpp.user.shard.DOMAIN=auth.JITSIFQDN org.jitsi.videobridge.xmpp.user.shard.PASSWORD=SECRET_JVB_USER org.jitsi.videobridge.xmpp.user.shard.MUC_JIDS=JvbBrewery@internal.auth.JITSIFQDN org.jitsi.videobridge.xmpp.user.shard.MUC_NICKNAME=UUIDGEN_RESULT
jitsi-videobridge.service を 起動/有効化 してください。
jicofo の設定
jicofo の設定。nightly および git バージョンの場合は、/etc/jitsi-videobridge に -nightly または -git を追加します。
/etc/jicofo/jicofo.conf
jicofo {
xmpp: {
client: {
client-proxy: "focus.JITSIFQDN"
xmpp-domain: "JITSIFQDN"
domain: "auth.JITSIFQDN"
username: "focus"
password: "SECRET_FOCUS_USER"
conference-muc-jid = conference.JITSIFQDN
}
trusted-domains: [ "recorder.JITSIFQDN" ]
}
bridge: {
brewery-jid: "JvbBrewery@internal.auth.JITSIFQDN"
}
}
jicofo サービスを起動・有効化してください。
jitsi-meet の設定
jitsi-meet Web アプリの設定。nightly および git バージョンの場合は、-nightly または -git を /etc/jitsi-videobridge に追加します。
/etc/webapps/jitsi-meet/config.js
var config = {
hosts: {
domain: 'JITSIFQDN',
// ...
muc: 'conference.JITSIFQDN'
},
bosh: '//JITSIFQDN/http-bind',
// ...
}
nginx の設定
nginx#TLS の説明に従って、TLS を使用して nginx を設定します。
提供された例をコピーしてみましょう。
# cd /etc/nginx # mkdir sites # cp /usr/share/doc/jitsi-meet/jitsi-meet.example sites/jitsi.conf
次に、それをメイン設定に含めます:
/etc/nginx/nginx.conf
http {
// ...
// this should be placed near to the close bracket of the http block
include sites/*.conf;
}
次に、jitsi 設定を自分の設定に変更します:
/etc/nginx/sites/jitsi.conf
server {
# ...
server_name JITSIFQDN;
# ...
# use prosody path directly
ssl_certificate /etc/prosody/certs/JITSIFQDN.crt;
ssl_certificate_key /etc/prosody/certs/JITSIFQDN.key;
# or use letencrypt path
ssl_certificate /etc/letsencrypt/live/JITSIFQDN/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/JITSIFQDN/privkey.pem;
# set the config path
# replace alias /etc/jitsi/meet/jitmeet.example.com-config.js by
location = /config.js {
alias /etc/webapps/jitsi-meet/config.js;
}
# ...
location ~ ^/([^/?&:'"]+)/config.js$
{
set $subdomain "$1.";
set $subdir "$1/";
alias /etc/webapps/jitsi-meet/config.js;
}
}
それから nginx.service を 再起動 してください。
ヒントとテクニック
NAT 経由で実行
以下のポートをサーバーに転送する必要があります:
HTTPS:
- TCP/443
Jitsi Videobridge:
- TCP/4443
- UDP/10000
SIP への Jitsi ゲートウェイ (Jigasi)
Jitsi-meet ミーティングを従来の SIP とインターフェースするには、jigasiAUR または jigasi-gitAUR をインストールし、prosody 設定を編集します:
/etc/prosody/prosody.cfg.lua
Component "callcontrol.JITSIFQDN"
component_secret = "SECRET_JIGASI_USER"
SIP アクセス認証情報を入力します (SIPUSER SIPSERVER および SIPPASSWORD)
/opt/jigasi/jigasi-home/sip-communicator.properties
net.java.sip.communicator.impl.protocol.sip.acc1403273890647.ACCOUNT_UID=SIP\:"SIPUSER@SIPSERVER" net.java.sip.communicator.impl.protocol.sip.acc1403273890647.PASSWORD=SIPPASSWORD net.java.sip.communicator.impl.protocol.sip.acc1403273890647.SERVER_ADDRESS=SIPSERVER net.java.sip.communicator.impl.protocol.sip.acc1403273890647.USER_ID=SIPUSER
SIP が接続しているデフォルトのルーム名を変更するには、上記の設定の org.jitsi.jigasi.DEFAULT_JVB_ROOM_NAME を変更します。
次に、jigasi 設定を編集します
/etc/jitsi/jigasi/config
JIGASI_HOST=callcontrol.JITSIFQDN JIGASI_HOSTNAME=jitsi-videobridge.JITSIFQDN JIGASI_SECRET=SECRET_JIGASI_USER JIGASI_OPTS="" LOGFILE=/var/log/jitsi/jigasi.log
/opt/jitsi-meet/config.js
hosts.call_control = 'callcontrol.meet.jit.si'
次に、jigasi.service を 起動/有効化 します。
ルーム作成時のアクセス制限
ビデオ会議室の 作成 を認証されたユーザーに制限するには、次の手順を実行します。会議への参加者はまだ認証されていないことに注意してください。
prosody の jitsi ドメインに認証を追加し、ゲスト用の新しい仮想ホストを追加します:
/etc/prosody/conf.d/jitsi.cfg.lua
-- change authentification of your domain
VirtualHost "JITSIFQDN"
authentification = "internal_plain"
-- add guest virtual host to allow anonymous user to join your room
VirtualHost "guest.JITSIFQDN"
authentication = "jitsi-anonymous"
c2s_require_encryption = false
modules_enabled = {
-- copy the content of the modules_enabled
-- of the VirtualHost "JITSIFQDN"
-- remove only the module "muc_lobby_rooms" of the list
-- example:
"bosh";
"pubsub";
"ping"; -- Enable mod_ping
"speakerstats";
"external_services";
"conference_duration";
}
jitsi-meet の設定ファイルを編集します。
/etc/webapps/jitsi-meet/config.js
var config = {
host: {
// anonymous users need to use a dedicated muc without authentication
anonymousdomain: 'guest.JITSIFQDN',
},
}
jicofo の認証を追加します:
/etc/jicofo/jicofo.conf
jicofo {
authentication {
enabled = true
type = XMPP
login-url = JITSIFQDN
enable-auto-login = true
}
}
次に、目的のユーザーを作成します。
# prosodyctl register <username> JITSIFQDN <password>
jigasi を使用している場合のみ (知らない場合は編集しません)、匿名認証を許可しないように SIP インターフェースを編集します:
/etc/jitsi/jigasi/sip-communicator.properties
org.jitsi.jigasi.xmpp.acc.ANONYMOUS_AUTH=false
これらの手順は このガイド から引用されています。
Access restrictions with JWT token
To restrict video conference room creation to users authenticate with a JWT token (external service for authentication), you can do the following steps. Note that participants to the meeting are still not authenticated!
Install those dependencies:
Add authentication to the jitsi domain in prosody and add a new virtual host for guests:
/etc/prosody/conf.d/jitsi.cfg.lua
-- change authentification of your domain
VirtualHost "JITSIFQDN"
authentification = "token"
app_id = "APP_ID"
app_secret = "APP_SECRET"
allow_empty_token = false
modules_enabled = {
-- keep existing modules and add
"presence_identity";
}
c2s_require_encryption = false
-- add guest virtual host to allow anonymous user to join your room
VirtualHost "guest.JITSIFQDN"
authentication = "jitsi-anonymous"
c2s_require_encryption = false
modules_enabled = {
-- copy the content of the modules_enabled
-- of the VirtualHost "JITSIFQDN"
-- remove only the module "muc_lobby_rooms" of the list
-- example:
"bosh";
"pubsub";
"ping"; -- Enable mod_ping
"speakerstats";
"external_services";
"conference_duration";
"presence_identity";
}
Component "conference.JITSIFQDN" "muc"
modules_enabled = {
-- add this to the modules_enabled
"token_verification";
}
Edit the configuration file for jitsi-meet:
/etc/webapps/jitsi-meet/config.js
var config = {
host: {
// anonymous users need to use a dedicated muc without authentication
anonymousdomain: 'guest.JITSIFQDN',
},
}
Add authentication for jicofo:
/etc/jicofo/jicofo.conf
jicofo {
authentication {
enabled = true
type = JWT
login-url = JITSIFQDN
enable-auto-login = true
}
}
Then restart prosody.service (or start/enable it if it was just installed).
And restart jicofo.service (or start/enable it if it was just installed).
Now you can use a JWT token to authenticate an user.
You can read the spec here: Jitsi Meet Tokens
Here an quick example in nodejs:
const jwt = require('jsonwebtoken')
const crypto = require('crypto');
const words = require('random-words')
const yourDomain = "JITSIFQDN"
const appId = "APP_ID"
const appSecret = "APP_SECRET"
const userName = "YOUR_USERNAME"
const userEmail = "YOUR_EMAIL"
function getBody(domain, appId, name, email, room) {
const md5Email = crypto.createHash('md5').update(email).digest("hex");
const id = crypto.createHash('sha1').update(`${name}:${email}`).digest("hex")
return {
context: {
user: {
avatar: `https:/gravatar.com/avatar/${md5Email}`,
name,
email,
id,
},
group: 'users'
},
"aud": "jitsi",
"iss": appId,
"sub": domain,
room,
}
}
const room = process.argv[2] || words({exactly: 3, join: '-'})
const data = getBody(
yourDomain,
appId,
userName,
userEmail,
room,
)
const options = {
algorithm: 'HS256',
expiresIn: '2h',
}
const jwtToken = jwt.sign(data, appSecret, options)
console.log(`https://${yourDomain}/${room}?jwt=${jwtToken}`)
ログの評価
パブリックに利用可能な IP アドレスの場合、上記の設定はパブリックビデオ会議サーバーにつながります。サーバーの使用を監視するには、journalctl を使用して、少なくとも漠然とした使用法を把握できます:
# journalctl --unit=jicofo.service --grep="created new conference" --output cat
新しいチャットルーム作成のすべてのイベントを表示し、
# journalctl --unit=jicofo.service --grep="Stopped" --output cat
チャットルームの破壊に関するすべてのイベントを表示します。
'member' を grep すると、参加者に関する (匿名の) 情報も得られます。
独自の STUN サーバーを実行する
デフォルトでは、Jitsi Meet は jitsi.org の STUN サーバーを使用します。coturn を使用し、jitsi-meet の設定で設定することで、独自の STUN サーバーを簡単に実行できます。