3

I have a buildbot working and have added basic authentication following "Setting Authorized Web Users" from the manual http://docs.buildbot.net/current/tutorial/tour.html. I was hoping to restrict people who could trigger a new build.

But now the web interface shows no builds at all without login. How can I make the builds public?

My current config looks like this, minus the line giving the password details.

c['www']['authz'] = util.Authz(
        allowRules = [
                        util.AnyControlEndpointMatcher(role="admins")
                    ],
        roleMatchers = [
                        util.RolesFromUsername(roles=['admins'], usernames=['xxx'])
                    ]
)
Phil Lord
  • 2,917
  • 1
  • 20
  • 31

2 Answers2

2

You need to configure authentication and authorization.

Probably the simple example config is enough for your simple example http://docs.buildbot.net/latest/manual/cfg-www.html#example-configs

tardyp
  • 1,142
  • 11
  • 9
  • I have tried to copy this simple example (details added above). – Phil Lord Mar 29 '17 at 14:41
  • The simple example does not make sense to me. I cannot see which part of it opens access to public. Unless it is the `AnyControlEndpointMatcher` part, which I have tried and does not appear to achieve what I want. – Phil Lord Mar 29 '17 at 17:09
  • Something strange is up. I have replicated this on two machines now. In both cases, with login, I can see build. As "Anonymous" all I can see "waterfall", "console" and "builds" not they are empty; always "0 builds". Not sure where to debug from here. – Phil Lord Mar 29 '17 at 19:36
  • 1
    The simple example works for me. The default is open access to anyone, and the `AnyControlEndpointMatcher` matches the force build/cancel build etc endpoints. – Sam May 08 '17 at 06:55
1

I have crated a solution based on this message to the mailing list.

https://lists.buildbot.net/pipermail/users/2017-February/001066.html

##util.AnyControlEndpointMatcher(role="admins")

util.StopBuildEndpointMatcher(role="admins"),
util.ForceBuildEndpointMatcher(role="admins"),
util.RebuildBuildEndpointMatcher(role="admins")

This seems to run counter to the documentation which says a call to AnyControlEndpointMatcher should be added and the simple example. So still confused.

Phil Lord
  • 2,917
  • 1
  • 20
  • 31