https://github.com/classabbyamp/buildbot-netauth
NetAuth authentication, user info, and avatar plugin for buildbot
https://github.com/classabbyamp/buildbot-netauth
authentication-service buildbot buildbot-plugin netauth secure-access
Last synced: 4 months ago
JSON representation
NetAuth authentication, user info, and avatar plugin for buildbot
- Host: GitHub
- URL: https://github.com/classabbyamp/buildbot-netauth
- Owner: classabbyamp
- License: mit
- Created: 2024-08-03T23:48:43.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-12-14T23:47:48.000Z (over 1 year ago)
- Last Synced: 2026-01-04T06:16:44.311Z (6 months ago)
- Topics: authentication-service, buildbot, buildbot-plugin, netauth, secure-access
- Language: Python
- Homepage:
- Size: 47.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## 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:
```py
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:
```py
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-"),
]
)
```