Class SecretMasker
java.lang.Object
io.jenkins.plugins.batchcontrol.store.SecretMasker
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public final class SecretMasker
extends Object
Masks secret material in config XML text BEFORE it is diffed or stored (SPEC item 9:
"unified diff with secrets masked"). Both diff sides must be masked with the same rules so a
secret can never leak through either side of a hunk.
Two rules:
- the text content of any element whose tag name contains
password,secret,token(coversapiToken) orpassphrase, case-insensitively; - anything shaped like an encrypted Jenkins
Secretpayload ({AQ<base64>}), wherever it appears.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringReturns the text with every secret occurrence replaced by "********".
-
Field Details
-
MASK
- See Also:
-
-
Method Details
-
mask
Returns the text with every secret occurrence replaced by "********".
-