Hi
I need to dynamically allow or deny all kinds of requests to a BitBucker server based on the result of one or more queries to an external server. However, far from all operations seem to have hooks which you can use to deny the operation in question. Have I understood it coorectly that this is not possible to do in a plugin for all requests? Only push and merge have this kind of responsive hooks I think from reading the documentation but I may be wrong.
My alternative is to dynamically alter the Bitbucket permissions via API from a service that talks to the external server but I would really like to avoid this as it complicates other things. Is there another alternative strategy that I have not thought of?
Community moderators have prevented the ability to post new answers.
If you mean stuff like creating a repo, creating a PR, see https://developer.atlassian.com/static/javadoc/bitbucket-server/latest/api/reference/com/atlassian/bitbucket/event/CancelableEvent.html
Thank you for your response. Unfortunately, I need to be able to block ALL operations, even all kinds of read operations. Even those from the web UI. I do not believe this can reliably be done via listening to events and cancel disallowed operations but I would be very happy to be proven wrong.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if "all" you mean including "logging in", "making API calls to BS", you can just do that via a proxy (e.g. Apache)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.