Skip to main content

buildbot plugin for integration with NetAuth

Project description

buildbot-netauth

NetAuth authentication, user info, and avatar plugin for buildbot

Usage

  1. Install the plugin, for example: pip install buildbot-netauth

  2. In your buildmaster.cfg, add:

from buildbot.plugins import util

netauth = util.BuildbotNetAuth(conf=Path("/etc/netauth/config.toml"))

# in your buildmaster config object
c["www"]["auth"] = netauth
c["www"]["avatar_methods"] = [netauth, ...]

Notes

The plugin looks at the following metadata on NetAuth entities:

  • entity ID: used as an "email" in the format entity_id@domain. domain is the base domain of the NetAuth server, but is overridable.
  • entity display name or legal name: if set, will be used for the full_name buildbot user property in that fallback order
  • entity group membership: used for the groups buildbot user property and can be used for buildbot authz, for example:
from buildbot.plugins import util

c["www"]["authz"] = util.Authz(
    allowRules=[
        util.AnyEndpointMatcher(role="ops", defaultDeny=False),
        util.AnyControlEndpointMatcher(role="ops"),
    ],
    roleMatchers=[
        util.RolesFromGroups(groupPrefix="build-"),
    ]
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

buildbot_netauth-0.1.0.tar.gz (5.8 kB view hashes)

Uploaded Source

Built Distribution

buildbot_netauth-0.1.0-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page