liquibase.configuration.ConfigurationValueObfuscator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of liquibase-core Show documentation
Show all versions of liquibase-core Show documentation
Liquibase is a tool for managing and executing database changes.
The newest version!
package liquibase.configuration;
import liquibase.database.jvm.JdbcConnection;
/**
* Used by {@link ConfigurationDefinition#getCurrentValueObfuscated()} to obfuscate the current value.
*/
public interface ConfigurationValueObfuscator {
/**
* Standard obfuscator. Returns the constant "*****".
*/
ConfigurationValueObfuscator STANDARD = value -> value == null ? null : "*****";
/**
* Obfuscates credentials from the URL
*/
ConfigurationValueObfuscator URL_OBFUSCATOR = value -> value == null ? null : JdbcConnection.sanitizeUrl(value);
/**
* Not really an obfuscator -- simply returns the passed value directly.
* Used for times the code wants to explicitly say "I have no obfuscator"
*/
ConfigurationValueObfuscator NONE = value -> value;
/**
* Return an "obfuscated" version of the given value, suitable for logging or storing in non-secure environments.
*/
DataType obfuscate(DataType value);
}