commit 246bef9c18748051191a6326c2b7f8c032b6a44b
parent cd3cf6220a3bcca8e1234d08c03040caa9fdd81d
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date: Fri, 30 Nov 2018 23:32:12 +0100
Opt for less verbose HTPasswdAuth mode.
Diffstat:
1 file changed, 2 insertions(+), 19 deletions(-)
diff --git 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