When I run a pipeline build with the Authorization set to either "Run as User who Triggered Build" or "Run as Specific User", the commands still execute as the account my Jenkins service is running as (hps\svcBuildAdmin). The below script demonstrates the problem
pipeline {
agent any
stages {
stage ('Check User') {
steps {
bat "whoami"
}
}
}
}
Output:
Started by user Michael Marcucilli
Running as Michael Marcucilli
Running in Durability level: MAX_SURVIVABILITY
[Pipeline] Start of Pipeline
[Pipeline] node
Running on Jenkins in C:\Program Files (x86)\Jenkins\workspace\ApplicationADSyncer-Deploy
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Check User)
[Pipeline] bat
C:\Program Files (x86)\Jenkins\workspace\ApplicationADSyncer-Deploy>whoami
hps\svcbuildadmin
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
Finished: SUCCESS
I classified this as "Major" because to me this is a severe loss of function, i.e. the core function of the plugin does not appear to be working.
Authorize Project changes the virtual user identity of the build running inside Jenkins, which controls the actions the build can take inside Jenkins (such as triggering other builds).
It does not magically cause processes to su to a different user that may not even exist in the OS.