-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
buildbot-nix access control for private repos #165
Comments
It's possible. We already limit certain builder endpoints for projects: https://github.com/Mic92/buildbot-nix/blob/b0526ceab2ec89bed5e194a206391a7d85a833e7/buildbot_nix/__init__.py#L663 |
Could it also be extended to the builder activity? |
Ill look into it tomorrow, should be done with a prototype by the evening |
Very briefly looking into this, I instrumented buildbots authentication with the following code: any_endpoint_matcher = util.AnyEndpointMatcher(role="admin", defaultDeny=False)
old_match = any_endpoint_matcher.match
def match(self: util.AnyEndpointMatcher, ep: Any, action: Any, options: Any) -> Any:
import inspect
if options is None:
options = {}
try:
epobject, epdict = self.master.data.getEndpoint(ep)
for klass in inspect.getmro(epobject.__class__):
log.info(
"matching on {klass} with action: {action}",
klass=klass.__name__,
action=action,
)
except:
pass
old_match(ep, action, options)
import types
any_endpoint_matcher.match = types.MethodType(match, any_endpoint_matcher)
allow_rules.append(any_endpoint_matcher) Which then prints me a list of endpoints that buildbot is looking for auth for, said list reveals:
All of this testing has been done on the Not sure what's the correct path forward here and I would appreciate some input as to what to do here. (this little foray into buildbots endpoint handling also tells me that custom UI is possible with mixins and custom endpoints probably 🎉) |
|
Ok. I suspected something like this since Buildbot was designed for open-source use. Since this requires a major refactor, a better short-term solution is to shield the installation. Users can decide to make their instance private, and then only logged-in users can see build information. Webhooks need to be sent through still. |
I'm pushing this to the future milestone then |
Is this addressed by #251 |
Noy really, what #251 gets us is a all or nothing support for access control. Ideally one wouldn't have to run 2 instances for public and provate repositories. |
In some settings, we only want to show the builds to users with access to the repos.
Is it possible to map the repo access control to the authenticated users?
If not, create a "private" mode where only logged-in users can see the builds and builders.
The text was updated successfully, but these errors were encountered: