Add telemetry for password field masking#26195
Conversation
There was a problem hiding this comment.
This only tells us whether this masking is used, but no additional information. So if we receive these reports, they're not actionable, as long as there's at least a few that hit this (~too many to just declare it unused).
To understand how this feature is used, we need to know the closest class name (which may be none of these types), as well as the view name. Ideally even the Jelly file hierarchy, if that's available, although I guess we'll likely be able to use installed plugins to find it.
Recommended next steps: Check how StaplerDispatches telemetry worked (including the part in Stapler) and whether that can be adapted to this. Alternatively, jelly.trace (but there should be quite some overlap). Looking at how stapler.jelly.trace works might give you an idea how to hook into view composition.
Nice. (I would not consider this plugin a reason to not simplify our masking code, given existing vulnerabilities…) |
|
This PR is now ready for merge. We will merge it after approximately 24 hours if there is no negative feedback. Please see the merge process documentation for more information about the merge process. /label ready-for-merge |
* Add telemetry for password field masking * Collect actionable info * Always send data and clear collection (cherry picked from commit 6c50589)
Add telemetry to track usage of the password field masking.
Fixes #26194
Testing done
Tested with
ExtensionList.lookupSingleton(jenkins.telemetry.impl.PasswordMasking).createContent()while running SECURITY-1809 test (#permissionIsCorrectlyCheckedOnNestedObject) to reach a view using the masking.Output:
UI description:

Screenshots (UI changes only)
Before
After
Proposed changelog entries
Proposed changelog category
/label rfe
Proposed upgrade guidelines
N/A
Submitter checklist
@Restrictedor have@since TODOJavadocs, as appropriate.@Deprecated(since = "TODO")or@Deprecated(forRemoval = true, since = "TODO"), if applicable.evalto ease future introduction of Content Security Policy (CSP) directives (see documentation).Desired reviewers
@daniel-beck
Before the changes are marked as
ready-for-merge:Maintainer checklist
upgrade-guide-neededlabel is set and there is a Proposed upgrade guidelines section in the pull request title (see example).lts-candidateto be considered.