taler-deployment

Deployment scripts and configuration files
Log | Files | Refs | README

commit 09cff1cd75cf3abc8f55bcc17671ac5c0f0dd77e
parent a2c1188d8a106c87aa115f800346739256df4e33
Author: buckE <buckE@disroot.org>
Date:   Tue,  9 Jun 2020 05:52:11 +0000

re-enabled www (webUI) and Authentication for webUI

Diffstat:
Mbuildbot/master.cfg | 94++++++++++++++++++++++++++++++++++++++++----------------------------------------
1 file changed, 47 insertions(+), 47 deletions(-)

diff --git a/buildbot/master.cfg b/buildbot/master.cfg @@ -976,58 +976,58 @@ BUILDER_LIST = [ "taler-test-healthcheck-builder", ] -# Authentication for Web UI. Not needed right now... -#exec(compile(open('../taler_bb_userpass_db/taler_bb_userpass_db/db.py').read(), filename='db.py', mode='exec')) - -#authz = util.Authz( -# allowRules=[ -# util.ForceBuildEndpointMatcher(role="admins", -# builder=b) -# for b in BUILDER_LIST -# ] + [ -# util.StopBuildEndpointMatcher(role="admins", -# builder=b) -# for b in BUILDER_LIST -# ] + [ -# util.RebuildBuildEndpointMatcher(role="admins", -# builder=b) -# for b in BUILDER_LIST -# ] + [ -# util.ForceBuildEndpointMatcher(role="norole", -# builder=b) -# for b in BUILDER_LIST -# ] + [ -# util.StopBuildEndpointMatcher(role="norole", -# builder=b) -# for b in BUILDER_LIST -# ] + [ -# util.RebuildBuildEndpointMatcher(role="norole", -# builder=b) -# for b in BUILDER_LIST -# ], -# roleMatchers=[ -# util.RolesFromUsername( -# roles=["admins"], -# usernames=["marcello", "florian", "christian"] -# ) -# ] -#) +# Authentication for Web UI. +exec(compile(open('../taler_bb_userpass_db/taler_bb_userpass_db/db.py').read(), filename='db.py', mode='exec')) + +authz = util.Authz( + allowRules=[ + util.ForceBuildEndpointMatcher(role="admins", + builder=b) + for b in BUILDER_LIST + ] + [ + util.StopBuildEndpointMatcher(role="admins", + builder=b) + for b in BUILDER_LIST + ] + [ + util.RebuildBuildEndpointMatcher(role="admins", + builder=b) + for b in BUILDER_LIST + ] + [ + util.ForceBuildEndpointMatcher(role="norole", + builder=b) + for b in BUILDER_LIST + ] + [ + util.StopBuildEndpointMatcher(role="norole", + builder=b) + for b in BUILDER_LIST + ] + [ + util.RebuildBuildEndpointMatcher(role="norole", + builder=b) + for b in BUILDER_LIST + ], + roleMatchers=[ + util.RolesFromUsername( + roles=["admins"], + usernames=["marcello", "florian", "christian"] + ) + ] +) # minimalistic config to activate new web UI # -- formerly commented out as not packaged properly in Debian and others, see # https://bugzilla.redhat.com/show_bug.cgi?id=1557687 # -- un-commented as "pip install buildbot.www" performed from buildbot-master account -#c["www"] = { -# "port": 8010, -# "plugins": { -# "waterfall_view": {}, -# "console_view": {} -# }, -# "allowed_origins": ["https://*.taler.net"], -# "avatar_methods": [], -# "auth": util.UserPasswordAuth(USER_PASSWORD_DB), -# "authz": authz -#} +c["www"] = { + "port": 8010, + "plugins": { + "waterfall_view": {}, + "console_view": {} + }, + "allowed_origins": ["https://*.taler.net"], + "avatar_methods": [], + "auth": util.UserPasswordAuth(USER_PASSWORD_DB), + "authz": authz +} ####### DB URL