首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Jitsi Meet -只允许JWT令牌身份验证,并取消用户和密码身份验证

Jitsi Meet -只允许JWT令牌身份验证,并取消用户和密码身份验证
EN

Stack Overflow用户
提问于 2020-12-07 01:21:27
回答 1查看 4.2K关注 0票数 3

在我的~/.jitsi-meet-cfg/prosody/config/conf.d Jitsi Meet Prodody配置文件上

我有以下配置:

代码语言:javascript
运行
复制
admins = {
  "focus@auth.meet.jitsi",
  "jvb@auth.meet.jitsi"
}

plugin_paths = { "/prosody-plugins/", "/prosody-plugins-custom" }
http_default_host = "meet.jitsi"

VirtualHost "meet.jitsi"

authentication = "token"
app_id = "this-is-my-app-id"
app_secret = "FF0AE1DEC0F36167A100CF0C234CF4A5"
allow_empty_token = false

ssl = {
  key = "/config/certs/meet.jitsi.key";
  certificate = "/config/certs/meet.jitsi.crt";
}
modules_enabled = {
  "bosh";
  "pubsub";
  "ping";
  "speakerstats";
  "conference_duration";
}

speakerstats_component = "speakerstats.meet.jitsi"
conference_duration_component = "conferenceduration.meet.jitsi"

c2s_require_encryption = false

VirtualHost "auth.meet.jitsi"
ssl = {
  key = "/config/certs/auth.meet.jitsi.key";
  certificate = "/config/certs/auth.meet.jitsi.crt";
}
authentication = "internal_hashed"

VirtualHost "recorder.meet.jitsi"
modules_enabled = {
  "ping";
}
authentication = "internal_hashed"

Component "internal-muc.meet.jitsi" "muc"
storage = "memory"
modules_enabled = {
  "ping";
}
muc_room_locking = false
muc_room_default_public_jids = true

Component "muc.meet.jitsi" "muc"
storage = "memory"
modules_enabled = {
  "muc_meeting_id";
  "token_verification";
}
muc_room_cache_size = 1000
muc_room_locking = false
muc_room_default_public_jids = true

Component "focus.meet.jitsi"
component_secret = "1380629bfbc47acef63de093bcf231ec"

Component "speakerstats.meet.jitsi" "speakerstats_component"
muc_component = "muc.meet.jitsi"

Component "conferenceduration.meet.jitsi" "conference_duration_component"
muc_component = "muc.meet.jitsi"

有了它,我可以通过jwt令牌进行身份验证。

但是,如果我没有指定任何令牌,例如:

https://jitsi.mydummyserver.com/test

然后,我得到以下询问用户和密码的提示:

是否有任何方法只允许令牌身份验证并完全消除该提示?

谢谢!

EN

回答 1

Stack Overflow用户

发布于 2021-02-21 18:52:10

您可以在tokenAuthUrl文件中为/etc/jitsi/meet/<fqdn>-config.js文件中的令牌生成设置端点。

tokenAuthUrl目前是无文档的。您可以检查tokenAuthUrl 这里的拉请求。

如果您想要完全重定向,如果会议URL不包含JWT令牌,那么您可以在服务器配置中编写一个简单的Nginx或Apache规则。

由于会议URL是https://meet.example.com?jwt=<token>格式的,所以Nginx配置规则将类似于

代码语言:javascript
运行
复制
location / {

    set $url 1;    

    if ($arg_jwt = ''){
        set $url 0;
    }   

    if ($url = 1){
        return 301 https://$host$request_uri;
    }

    return 301 https://example.com;
 
}

如果会议URL不包含JWT查询参数,这将重定向到example.com &即使用户试图绕过Nginx规则,在会议URL的末尾添加jwt auery参数,访问也将被拒绝,因为JWT是无效的。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65174905

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档