Dear community,

In the Jenkins OpenTelemetry plugin 
<https://github.com/jenkinsci/opentelemetry-plugin>, we want to optionally 
inject in shell & bat steps some OpenTelemetry configuration environment 
variables that contains secrets and we would like to mask those credentials 
in the console the same way the `withCredentials` step does it.

We identified that the `withCredentials` step creates a new BodyInvoker on `
o.j.p.w.steps.*StepExecution#start()**`* (see here 
<https://github.com/jenkinsci/credentials-binding-plugin/blob/5d15471b1485018b75c472355cd8473eb8bd3073/src/main/java/org/jenkinsci/plugins/credentialsbinding/impl/BindingStep.java#L147>
).

Is it possible implementing a `o.j.p.w.flow.*StepListener#notifyOfNewStep()*` 
or `o.j.p.w.flow.*GraphListener#onNewHead()*` to mask passwords in shell & 
bat steps? Are their limitations that would prevent it?

Implementing `*StepListener#notifyOfNewStep(step, stepContext)*` seems to 
provide access to the needed `stepContent`.

Cyrille

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/580bb4ab-128c-4ecc-80a5-9a144cb0baedn%40googlegroups.com.

Reply via email to