FlowExecution#getAuthentication2#383
Conversation
|
@jglick Yes, such an implementation is planned but not currently assigned to any particular person. |
|
That is fine but this should probably stay on hold until the downstream PR has been prepared, as it is technically introducing a new API. |
jenkinsci/jenkins#4848 was not held back by the lack of downstream PRs (cf. jenkinsci/reverse-proxy-auth-plugin#153 (comment)), so I see no reason why this PR should stay on hold. |
|
There were some; this method is both implemented and called in only one place (AFAIK), (Actually |
Hence the plan to update those call sites eventually. Is there a particular reason that has to be done as a prerequisite to merging this PR? |
|
Yes: matching changes should be prepared in advance where feasible. Filed jenkinsci/workflow-cps-plugin#1002 and will merge this if it passes tests. |
| * @deprecated use {@link #getAuthentication2()} | ||
| */ | ||
| @Deprecated | ||
| public /* abstract */ @NonNull org.acegisecurity.Authentication getAuthentication() { |
There was a problem hiding this comment.
This commit causes:
java.lang.IllegalArgumentException: The specified derived class (org.jenkinsci.plugins.workflow.cps.CpsFlowExecution) does not derive from the specified base class (org.springframework.security.core.Authentication).
at hudson.Util.isOverridden(Util.java:1536)
at hudson.Util.ifOverridden(Util.java:1564)
at PluginClassLoader for workflow-api//org.jenkinsci.plugins.workflow.flow.FlowExecution.getAuthentication(FlowExecution.java:266)
at PluginClassLoader for opentelemetry//io.jenkins.plugins.opentelemetry.job.MonitoringPipelineListener.onAtomicStep(MonitoringPipelineListener.java:209)
It's impacting the OpenTelemetry plugin:
There was a problem hiding this comment.
@basil @jglick can you please check https://issues.jenkins.io/browse/JENKINS-75532
| return Util.ifOverridden( | ||
| () -> org.acegisecurity.Authentication.fromSpring(getAuthentication2()), | ||
| Authentication.class, | ||
| getClass(), |
There was a problem hiding this comment.
getClass() will return values like org.jenkinsci.plugins.workflow.cps.CpsFlowExecution which do NOT derive from org.springframework.security.core.Authentication
jenkinsci/jenkins#4848