如何使用Buildbot启用基本访问身份验证 [英] How to enable basic access authentication with Buildbot

查看:92
本文介绍了如何使用Buildbot启用基本访问身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您如何配置Buildbot使用基本访问身份验证提示输入用户名/密码?

How do you configure Buildbot to prompt for username/password using basic access authentication?

我在Buildbot的文档中找不到任何明确提及此内容的内容。它具有 useHttpHeader 选项,但似乎没有任何作用。

I can't find anything in Buildbot's documentation that explicitly mentions this. It has a useHttpHeader option, but that doesn't seem to do anything.

我的WebStatus配置如下:

My WebStatus config looks like:

authz_cfg = authz.Authz(
    auth=auth.BasicAuth([("admin", "password")]),
    useHttpHeader=True,
    gracefulShutdown=False,
    forceBuild='auth',
    forceAllBuilds='auth',
    pingBuilder=False,
    stopBuild=True,
    stopAllBuilds=True,
    cancelPendingBuild=True,
)
c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))

我要部署运行Buildbot的服务器。不幸的是,默认情况下,Buildbot允许匿名用户访问几乎所有页面,并且我想阻止对机器人和陌生人的访问。

I want to deploy a server running Buildbot. Unfortunately, by default, Buildbot gives anonymous users read-access to almost all pages, and I want to block access to bots and strangers.

推荐答案

您需要添加 view ='auth'

实际上,这几乎是找不到的通过Buildbot文档。我什至不知道从哪里学到的(只是仔细检查了我的 master.cfg ...)

Indeed, this is almost impossible to find out via the Buildbot documentation. I'm not even sure where I learned that from (just double-checked my master.cfg...)

这篇关于如何使用Buildbot启用基本访问身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆