Skip to content

[JENKINS-68176] Mask Passwords with specific pattern in pipeline job #167

@jenkins-infra-bot

Description

@jenkins-infra-bot

Hi,

We have a setup which has multiple servers and the credentials are defined in yaml file. the user name or password or the variable name differs for each server

example: 

server_a_user=abc

server_a_password=abc

server_b_password=abc

server_b_user=abc

And all these passwords do have a common pattern.

So all these are read dynamically, so we dont have specific variables to use mask function. Can you help us how can we mask the password with particualr regex and not using their variable names , as there are multiple variables used and read dynamically in Jenkins pipeline script(groovy)

 

 


Originally reported by kiruthisubbu, imported from: Mask Passwords with specific pattern in pipeline job
  • status: Open
  • priority: Major
  • component(s): mask-passwords-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 20251216-225446
Raw content of original issue

Hi,

We have a setup which has multiple servers and the credentials are defined in yaml file. the user name or password or the variable name differs for each server

example: 

server_a_user=abc

server_a_password=abc

server_b_password=abc

server_b_user=abc

And all these passwords do have a common pattern.

So all these are read dynamically, so we dont have specific variables to use mask function. Can you help us how can we mask the password with particualr regex and not using their variable names , as there are multiple variables used and read dynamically in Jenkins pipeline script(groovy)

 

 

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions