Mask sensitive data in maven mojo parameter

151 Views Asked by At

I have a Maven Mojo where you have to pass user credentials. Now when you run the plugin with debug output these credentials are output on the StdOut.

[DEBUG] Configuring mojo 'plugin:1.2.0-SNAPSHOT:plugin' with basic configurator -->
[DEBUG]   (f) name = muster
[DEBUG]   (f) password = should-be-secret
[DEBUG]   (f) other = other
[DEBUG]   (f) skip = false
[DEBUG] -- end configuration --

Is there a way to mask single variables like password?

I have already tried the Maven documentation but unfortunately the configuration is not taken into account. Below src/main/resources I have already placed both the simplelogger.properties and various Logback.xml files. None of them worked.

The idea would be, as suggested here on Stackoverflow, to create an appropriate Masking PatternLayout and then apply it via configuration.

0

There are 0 best solutions below