buildbot

Buildbot configurations
git clone git://git.danielmoch.com/buildbot.git
Log | Files | Refs

commit aa1bb8380f8bfe19e6bf431ba4823319d7a3aba6
parent 420e97fe8ca4e1945a00ff630e2f31388cd787cb
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Sun,  9 Dec 2018 21:32:13 -0500

Add authentication

Diffstat:
Mserver/master.cfg | 17++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/server/master.cfg b/server/master.cfg @@ -1,10 +1,20 @@ # -*- python -*- # vim: set filetype=python: +import grp +import os +import pam + from buildbot.plugins import * -# This is a sample buildmaster config file. It must be installed as -# 'master.cfg' in your buildmaster's base directory. +# Use PAM for authentication +class PamAuth(util.CustomAuth): + def check_credentials(self, username, passwd): + if username in grp.getgrnam('buildbot').gr_mem: + p = pam.pam() + return pam.authenticate(username, passwd) + else: + return False # This is the dictionary that the buildmaster pays attention to. We also use # a shorter alias to save typing. @@ -121,7 +131,8 @@ c['buildbotURL'] = "https://builds.danielmoch.com/" # minimalistic config to activate new web UI c['www'] = dict(port=8010, plugins=dict(waterfall_view={}, console_view={}, - grid_view={}, badges={"style": "flat"})) + grid_view={}, badges={"style": "flat"}), + auth=PamAuth()) ####### DB URL