-
Type:
Bug
-
Resolution: Not A Defect
-
Priority:
Major
-
Component/s: authorize-project-plugin, credentials-plugin
-
None
-
Environment:Using plugin version 1.3.0
Using a trivial Pipeline project, we are seeing differing credential behavior with `Run As Specific User` vs `Run As User who Triggered Build` using User Private credentials (https://<server>/user/<user>/credentials/store/user/domain/_/).
Â
Here is the code for the Pipeline. This is configured inline in the Pipeline Job.
// code placeholder node { withCredentials([usernameColonPassword(credentialsId: 'user-private-credential', variable: 'SOME_VALUE')]) { sh('echo ${SOME_VALUE} | shasum') } }
Â
In the Pipeline above `user-private-credential` is defined for the user executing the script.
—
When the Authorization mode is set to "Run As Specific Build", the script is able to successfully retrieve the user's credentials.
Â
If the Authorization mode is set to "Run As User who Triggered Build", then the pipeline is unable to retrieve the credentials.
—
Â
The desired behavior is to be able to retrieve the credentials in both cases.
Â
- is related to
-
JENKINS-44772 User Scoped credentials are not used by the "withCredentials" pipeline step
-
- Open
-
-
JENKINS-24750 Cannot find user credentials when job is triggered with parameters
-
- Closed
-