是否可以将权限限制为仅允许在 Bitbucket Server 中进行 REST API 调用?

Is it possible to restrict the permissions to only allow REST API calls in Bitbucket Server?

我想知道是否可以将用户的凭据限制为仅允许执行 REST API 调用(最好选择)。

我想限制为 Jenkins 目的创建的用户能够:

  1. 触发构建(使用 POST 提交挂钩),
  2. 更新构建状态(使用Build Status API

谢谢。

简短的回答是 - 不。 REST api.

没有特定权限

详情:

  1. 一个post 收到的挂钩在推送操作后运行。在 Bitbucket Server 的情况下,它也在拉取请求合并后运行。 documentation 说:

    The authenticated user must have REPO_WRITE permission for the repository that this pull request targets to call this resource.

因此,您必须向用户授予写入权限才能触发 post-接收挂钩

  1. 根据 documentation:

The authenticated user must have LICENSED permission or higher to call this resource.

因此您可以使用具有最小权限的用户