From 246bef9c18748051191a6326c2b7f8c032b6a44b Mon Sep 17 00:00:00 2001 From: Marcello Stanisci Date: Fri, 30 Nov 2018 23:32:12 +0100 Subject: Opt for less verbose HTPasswdAuth mode. --- buildbot/master.cfg | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'buildbot') diff --git a/buildbot/master.cfg b/buildbot/master.cfg index a848e4e..fe4e633 100644 --- a/buildbot/master.cfg +++ b/buildbot/master.cfg @@ -454,24 +454,7 @@ c["titleURL"] = "https://taler.net" # We use nginx to expose the BB under this URL. c["buildbotURL"] = "https://buildbot.taler.net/" -PASSWORD_FILE_JSON = "/home/containers/buildbot/credentials.json" -import json - -class FileAuth(util.CustomAuth): - - def check_credentials(self, user, password): - data = open(PASSWORD_FILE_JSON) - d = json.load(data) - # if user+password matches, then True, else False. - pass = d.get(user) - if not pass: - print("User %s not found" % user) - return False - # User exists, check password now. - if not pass == password: - print("Wrong password given") - return False - return True +HTPASSWD_FILE = "/home/containers/buildbot/.htpasswd" # minimalistic config to activate new web UI c["www"] = { @@ -480,7 +463,7 @@ c["www"] = { "waterfall_view": {}, "console_view":{}}, "allowed_origins": ["https://*.taler.net"], - "auth": FileAuth()} + "auth": util.HTPasswdAuth(HTPASSWD_FILE))} ####### DB URL -- cgit v1.2.3