jenkinsci / jenkinsci/gitlab-plugin
Multibranch pipeline project auth
- Dominant language
- Java
- Stars
- 1.4k
- Forks
- 615
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 10
Description
## Issue
### Context
- **Gitlab plugin version**: 1.5.2
- **Gitlab version**: 10.0.3
- **Jenkins version**: 2.97
- **Job type**: Multibranch pipeline
### Problem description
I have Role-Based authorization Strategy at my jenkins server and users without special permissions can't start any job.
I'm install gitlab plugin; at jenkins configuration check `Enable authentication for '/project' end-point`.
I'm not install any access tokens or something else, just install plugin and set `enable authentication`.
On gitlab project I create push-webhook to jenkins multibranch pipeline project, like `http://jenkins_url:8080/project/test_webhooks/` without secret token.
Then I press `Test` button and recieve `Hook executed successfully: HTTP 200`, but expected `Error 403`
Also I check it for freestyle project. If I not set secret token at job and webhook settings, after `Test` I recieve:
```
Error 403 anonymous is missing the Job/Build permission
HTTP ERROR 403
Problem accessing /project/test_webhooks/. Reason:
anonymous is missing the Job/Build permission
Powered by Jetty:// 9.4.z-SNAPSHOT
```
If I set secret token at jenkins freestyle project and not set at webhook settings:
```
Error 401 Invalid token
HTTP ERROR 401
Problem accessing /project/test_webhooks/. Reason:
Invalid token
Powered by Jetty:// 9.4.z-SNAPSHOT
```
So, how can I set authorization for multibranch pipeline projects like on freestyle projects?
Contributor guide
Assessment
This issue has not been assessed yet.