Class ConnectionPatterns

java.lang.Object
liquibase.database.jvm.ConnectionPatterns
Direct Known Subclasses:
JdbcConnectionPatterns

public abstract class ConnectionPatterns extends Object
A base class that holds connection string patterns with connection credentials that should be hidden in logs. Derived classes add their own connection string patterns.
  • Constructor Details

    • ConnectionPatterns

      public ConnectionPatterns()
  • Method Details

    • getJdbcBlankPatterns

      public Set<Map.Entry<Pattern,Pattern>> getJdbcBlankPatterns()
    • getJdbcBlankToObfuscatePatterns

      public Set<Map.Entry<Pattern,Pattern>> getJdbcBlankToObfuscatePatterns()
    • getJdbcObfuscatePatterns

      public Set<Map.Entry<Pattern,Pattern>> getJdbcObfuscatePatterns()
    • addJdbcBlankPatterns

      public void addJdbcBlankPatterns(Map.Entry<Pattern,Pattern> jdbcBlankPatterns)
      Holds credential patterns that should be replaced by empty string.

      jdbc:mysql://localhost:3306/lbcat?user=username&password=password

      jdbc:mariadb://username:password@localhost:3306/lbcat

    • addJdbcBlankToObfuscatePatterns

      public void addJdbcBlankToObfuscatePatterns(Map.Entry<Pattern,Pattern> patternJdbcBlankToObfuscate)
      Holds credential patterns that are located before the domain or subdomain part. They should be replaced by asterisks.

      jdbc:mariadb://username:password@localhost:3306/lbcat

    • addJdbcObfuscatePatterns

      public void addJdbcObfuscatePatterns(Map.Entry<Pattern,Pattern> jdbcObfuscatePatterns)
      Holds credential patterns that are located in the URL parameters. They should be replaced by asterisks.

      jdbc:postgresql://localhost:6432/lbcat?user=username&password=password