-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JENKINS-59109] Bind triggering user's credentials #210
base: master
Are you sure you want to change the base?
Conversation
Use CredentialsProvider.triggeredBy to handle case when cause is UpstreamCause chain ending in UserIdCause
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not exactly what I had in mind originally, but this might work. I'll take a closer look at this later in the week. In the meantime, maybe @jglick has any feedback?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not understand at a conceptual level how user-scoped credentials are supposed to work, so I cannot comment on whether this is “right”. IIUC the effective change here is that UserIdCause
is being considered not just on the “current” build but also on its transitive upstreams?
src/main/java/com/cloudbees/plugins/credentials/CredentialsProvider.java
Show resolved
Hide resolved
Yeah I think this might be backwards. I'd expect a build with a build step to bind its credential parameter bindings to the invoked build. |
I agree that the binding should happen at the call site of the upstream build creating the downstream one. But changing the architecture for me is a bit much, so I framed this as a bug of the current implementation - it already performs deferred binding of credentials if directly started by the user, it was just missing the case when started by the user as part of a causal chain. |
…vider.java Co-authored-by: Jesse Glick <jglick@cloudbees.com>
Oh that's interesting! Let me verify this works equivalently to what I had in mind before I can merge this. Should be within the next few days. |
Fixes JENKINS-59109