Package org.asynchttpclient.util
Class SensitiveLoggingUtils
- java.lang.Object
-
- org.asynchttpclient.util.SensitiveLoggingUtils
-
public final class SensitiveLoggingUtils extends Object
Shared policy for rendering sensitive HTTP headers in logs. The policy is read once from theorg.asynchttpclient.enableSensitiveLoggingsystem property orAHC_ENABLE_SENSITIVE_LOGGINGenvironment variable when this class is initialized.Covers request credential headers only.
WWW-AuthenticateandProxy-Authenticateresponse challenge headers are logged unredacted, and request form/query/multipart/body values are out of scope since they have no reliable generic sensitivity classification.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisSensitiveHeader(CharSequence name)Returns whether a header value must be redacted from logs.
-
-
-
Field Detail
-
REDACTED
public static final String REDACTED
The value used in place of sensitive header values.- See Also:
- Constant Field Values
-
-
Method Detail
-
isSensitiveHeader
public static boolean isSensitiveHeader(CharSequence name)
Returns whether a header value must be redacted from logs.- Parameters:
name- the header name- Returns:
truefor authentication and cookie headers when sensitive logging is disabled
-
-