forked from jenkinsci/artifactory-plugin
-
Notifications
You must be signed in to change notification settings - Fork 189
Credentials cannot be retrieved when authorize-project plugin is enabled #247
Copy link
Copy link
Open
Description
When using the authorize-project plugin to run jobs with a specific user, then credentials are not retrieved correctly, only anonymous: is used for basic auth.
How to reproduce
- Create a global "Username with password" credential with id
example-id. - Setup a pipeline with a Jenkinsfile as follows.
node {
artifactoryDownload(
server: Artifactory.newServer(url: 'http://...', credentialsId: 'example-id'),
spec: '{ "files": [{"pattern": "example" }] }',
)
}
- Under "Manage Jenkins / Configure Global Security" enable security.
- Configure a user that is granted all permissions.
- Under "Manage Jenkins / Configure Global Security / Access Control for Builds" configure "Project default Build Authorization" to use this user.
- Perform a build.
On the server side the Authorization header contains Basic YW5vbnltb3VzOg== which decodes to anonymous:.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels