Logging Redaction
ESS supports configurable redaction of JSON log messages.
Configure Redaction Rules
For an ESS service, operators can configure various INRUPT_LOGGING_REDACTION_{NAME}_ settings to create the redaction rules.
To specify a rule for an ESS service, the operator:
Determines a
{NAME}to use for the redaction rule. See also Uniqueness of Rule Name.Determines the target of the redaction rule by setting one of the following configurations for the service:
ConfigurationDescriptionINRUPT_LOGGING_REDACTION_{NAME}_FIELDTo target a specific log message field.
INRUPT_LOGGING_REDACTION_{NAME}_PATTERNTo target log message text that matches a specified pattern.
INRUPT_LOGGING_REDACTION_{NAME}_EXCEPTIONTo target an exception message class.
Specify the action in
INRUPT_LOGGING_REDACTION_{NAME}_ACTION:REPLACEDefault. Replaces the matching text with a specified replacement.
PLAINLeaves the matching field unprocessed. Only available if the redaction target is a field (i.e.,
INRUPT_LOGGING_REDACTION_{NAME}_FIELD).DROPSuppresses the matching field. Only available if the redaction target is a field (i.e.,
INRUPT_LOGGING_REDACTION_{NAME}_FIELD).PRIORITIZEChanges the log level of the matching message.
SHA256Replaces the matching text with its hash.
Specifies any associated configuration for the specified action:
If the action is
REPLACE, the operator can specifyINRUPT_LOGGING_REDACTION_{NAME}_REPLACEMENT(or use the default[REDACTED]).If the action is to
PRIORITIZE, the operator can specify theINRUPT_LOGGING_REDACTION_{NAME}_LEVEL(or use the defaultDEBUG).
Considerations
Uniqueness of Rule Name
Configurations with the same name, including redaction configurations, override the preceding value. For example, assume an operator has created the following redaction configuration for a service:
INRUPT_LOGGING_REDACTION_RULE1_FIELD
userid
INRUPT_LOGGING_REDACTION_RULE1_ACTION
PLAIN
These configurations create a configuration rule that:
Targets the field
useridandUses the
PLAINaction, which leaves theuseridvalue as is.
If later on, the operator wants to update the target field to username instead of userid , the operator can update INRUPT_LOGGING_REDACTION_RULE1_FIELD configuration value to username .
With this configuration update, the updated configuration rule now:
Targets the field
usernameandUses the
PLAINaction, which leaves theusernamevalue as is.
However, consider if another operator wants to create a new redaction rule for this service. If this operator also uses RULE1 for the {NAME} and decides to use the default replace action, the operator may decide to only set the following configuration:
INRUPT_LOGGING_REDACTION_RULE1_FIELD
password
The second operator may assume that with this configuration, the redaction rule will use the default replace action with the default replacement [REDACTED] . Instead, the service has the following configurations in place:
INRUPT_LOGGING_REDACTION_RULE1_FIELD
password
INRUPT_LOGGING_REDACTION_RULE1_ACTION
PLAIN
Because the redaction configurations depend on a user-specified {NAME} :
Ensure the uniqueness of the
{NAME}when creating new redaction rules.Explicitly specify the action.
Last updated