Package io.quarkus.vault.runtime
Enum LogConfidentialityLevel
- java.lang.Object
-
- java.lang.Enum<LogConfidentialityLevel>
-
- io.quarkus.vault.runtime.LogConfidentialityLevel
-
- All Implemented Interfaces:
Serializable,Comparable<LogConfidentialityLevel>
public enum LogConfidentialityLevel extends Enum<LogConfidentialityLevel>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringmaskWithTolerance(String info, LogConfidentialityLevel infoToleranceLevel)Mask the argument if the tolerance level is lower or equal to the receiver (which would typically represent the actual configuration).static LogConfidentialityLevelvalueOf(String name)Returns the enum constant of this type with the specified name.static LogConfidentialityLevel[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LOW
public static final LogConfidentialityLevel LOW
Display all secrets.This may be appropriate for development environments.
-
MEDIUM
public static final LogConfidentialityLevel MEDIUM
Display only usernames and lease ids (ie: passwords and token are masked).
-
HIGH
public static final LogConfidentialityLevel HIGH
Mask all secrets.
-
-
Method Detail
-
values
public static LogConfidentialityLevel[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (LogConfidentialityLevel c : LogConfidentialityLevel.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static LogConfidentialityLevel valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
maskWithTolerance
public String maskWithTolerance(String info, LogConfidentialityLevel infoToleranceLevel)
Mask the argument if the tolerance level is lower or equal to the receiver (which would typically represent the actual configuration). so for instance passwords and auth tokens would have a LOW tolerance, whereas lease ids and usernames would have a MEDIUM tolerance. As a result usernames would be shown and passwords would be hidden if the system was configured with a MEDIUM level.
-
-