Class DNLogFieldSyntax
- java.lang.Object
-
- com.unboundid.ldap.sdk.unboundidds.logs.v2.syntax.LogFieldSyntax<DN>
-
- com.unboundid.ldap.sdk.unboundidds.logs.v2.syntax.DNLogFieldSyntax
-
@ThreadSafety(level=COMPLETELY_THREADSAFE) public final class DNLogFieldSyntax extends LogFieldSyntax<DN>
This class defines a log field syntax for distinguished name values. This syntax allows individual attribute values to be redacted or tokenized within the DNs. If a DN is completely redacted, then the redacted representation will be "redacted={REDACTED}". If a DN is completely tokenized, then the tokenized representation will be "tokenized={TOKENIZED:token-value}", where token-value will be replaced with a generated value.
NOTE: This class, and other classes within the
com.unboundid.ldap.sdk.unboundiddspackage structure, are only supported for use against Ping Identity, UnboundID, and Nokia/Alcatel-Lucent 8661 server products. These classes provide support for proprietary functionality or for external specifications that are not considered stable or mature enough to be guaranteed to work in an interoperable way with other types of LDAP servers.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSYNTAX_NAMEThe name for this syntax.-
Fields inherited from class com.unboundid.ldap.sdk.unboundidds.logs.v2.syntax.LogFieldSyntax
CARRIAGE_RETURN_CODE_POINT, DOUBLE_QUOTE_CODE_POINT, NEWLINE_CODE_POINT, OCTOTHORPE_CODE_POINT, REDACTED_STRING, TAB_CODE_POINT, TOKEN_PREFIX_STRING, TOKEN_SUFFIX_STRING
-
-
Constructor Summary
Constructors Constructor Description DNLogFieldSyntax(int maxStringLengthCharacters, Schema schema, java.util.Collection<java.lang.String> includedSensitiveAttributes, java.util.Collection<java.lang.String> excludedSensitiveAttributes)Creates a new DN log field syntax instance that can optionally define specific attributes to include in or exclude from redaction or tokenization.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancompletelyRedactedValueConformsToSyntax()Indicates whether values that have been completely redacted still conform to this syntax.booleancompletelyTokenizedValueConformsToSyntax()Indicates whether values that have been completely tokenized still conform to this syntax.java.util.Set<java.lang.String>getExcludedSensitiveAttributes()Retrieves a set containing the names and/or OIDs of the attributes that will not be considered sensitive and will have not their values redacted or tokenized in methods that operate on DN components.java.util.Set<java.lang.String>getIncludedSensitiveAttributes()Retrieves a set containing the names and/or OIDs of the attributes that will be considered sensitive and will have their values redacted or tokenized in methods that operate on DN components.java.lang.StringgetSyntaxName()Retrieves the name for this syntax.voidlogCompletelyRedactedFieldToJSONFormattedLog(java.lang.String fieldName, JSONBuffer buffer)Appends a completely redacted representation of the specified field (both field name and value) for a JSON-formatted log message to the given buffer.voidlogCompletelyRedactedFieldToTextFormattedLog(java.lang.String fieldName, ByteStringBuffer buffer)Appends a completely redacted representation of the specified field (both field name and value) for a text-formatted log message to the given buffer.voidlogCompletelyRedactedValueToJSONFormattedLog(JSONBuffer buffer)Appends a completely redacted representation of a value (without a field name, as might be suitable for a value included in a JSON array) for a JSON-formatted log message to the given buffer.voidlogCompletelyTokenizedFieldToJSONFormattedLog(java.lang.String fieldName, DN fieldValue, byte[] pepper, JSONBuffer buffer)Appends a completely tokenized representation of the specified field (both field name and value) for a JSON-formatted log message to the given buffer.voidlogCompletelyTokenizedFieldToTextFormattedLog(java.lang.String fieldName, DN fieldValue, byte[] pepper, ByteStringBuffer buffer)Appends a completely tokenized representation of the specified field (both field name and value) for a text-formatted log message to the given buffer.voidlogCompletelyTokenizedValueToJSONFormattedLog(DN value, byte[] pepper, JSONBuffer buffer)Appends a completely tokenized representation of the provided value (without a field name, as might be suitable for a value included in a JSON array) for a JSON-formatted log message to the given buffer.voidlogRedactedComponentsFieldToJSONFormattedLog(java.lang.String fieldName, DN fieldValue, JSONBuffer buffer)Appends a representation of the specified field (both field name and value) with redacted value components for a JSON-formatted log message to the given buffer.voidlogRedactedComponentsFieldToTextFormattedLog(java.lang.String fieldName, DN fieldValue, ByteStringBuffer buffer)Appends a representation of the specified field (both field name and value) with redacted value components for a text-formatted log message to the given buffer.voidlogRedactedComponentsValueToJSONFormattedLog(DN value, JSONBuffer buffer)Appends a representation of the provided value (without a field name, as might be suitable for a value included in a JSON array) with redacted components for a JSON-formatted log message to the given buffer.voidlogSanitizedFieldToJSONFormattedLog(java.lang.String fieldName, DN fieldValue, JSONBuffer buffer)Appends a sanitized representation of the specified field (both field name and value) for a JSON-formatted log message to the given buffer.voidlogSanitizedFieldToTextFormattedLog(java.lang.String fieldName, DN fieldValue, ByteStringBuffer buffer)Appends a sanitized representation of the specified field (both field name and value) for a text-formatted log message to the given buffer.voidlogSanitizedValueToJSONFormattedLog(DN value, JSONBuffer buffer)Appends a sanitized representation of the provided value (without a field name, as might be suitable for a value included in a JSON array) for a JSON-formatted log message to the given buffer.voidlogTokenizedComponentsFieldToJSONFormattedLog(java.lang.String fieldName, DN fieldValue, byte[] pepper, JSONBuffer buffer)Appends a representation of the specified field (both field name and value) with tokenized value components for a JSON-formatted log message to the given buffer.voidlogTokenizedComponentsFieldToTextFormattedLog(java.lang.String fieldName, DN fieldValue, byte[] pepper, ByteStringBuffer buffer)Appends a representation of the specified field (both field name and value) with tokenized value components for a text-formatted log message to the given buffer.voidlogTokenizedComponentsValueToJSONFormattedLog(DN value, byte[] pepper, JSONBuffer buffer)Appends a representation of the provided value (without a field name, as might be suitable for a value included in a JSON array) with tokenized value components for a JSON-formatted log message to the given buffer.DNparseValue(java.lang.String valueString)Attempts to parse the provided string as a value in accordance with this syntax.voidredactComponents(DN value, ByteStringBuffer buffer)Appends a string representation of the given value with redacted components to the provided buffer.voidredactEntireValue(ByteStringBuffer buffer)Appends a string representation of a redacted entire value to the provided buffer.booleansupportsRedactedComponents()Indicates whether this syntax supports redacting individual components of the entire value.booleansupportsTokenizedComponents()Indicates whether this syntax supports tokenizing individual components of the entire value.voidtokenizeComponents(DN value, byte[] pepper, ByteStringBuffer buffer)Appends a string representation of the given value with zero or more of its components tokenized to the provided buffer.voidtokenizeEntireValue(DN value, byte[] pepper, ByteStringBuffer buffer)Appends a tokenized representation of the provided value to the given buffer.booleanvalueStringIsCompletelyRedacted(java.lang.String valueString)Determines whether the provided value string represents a value that has been completely redacted.booleanvalueStringIsCompletelyTokenized(java.lang.String valueString)Determines whether the provided value string represents a value that has been completely tokenized.voidvalueToSanitizedString(DN value, ByteStringBuffer buffer)Encodes the provided value to a sanitized string representation suitable for inclusion in a log message.booleanvalueWithRedactedComponentsConformsToSyntax()Indicates whether values with one or more redacted components still conform to this syntax.booleanvalueWithTokenizedComponentsConformsToSyntax()Indicates whether values with one or more tokenized components still conform to this syntax.-
Methods inherited from class com.unboundid.ldap.sdk.unboundidds.logs.v2.syntax.LogFieldSyntax
getMaxStringLengthCharacters, getTemporaryBuffer, redactComponents, redactEntireValue, releaseTemporaryBuffer, sanitize, sanitize, sha256, tokenize, tokenize, tokenize, tokenizeComponents, tokenizeEntireValue, valueStringIncludesRedactedComponent, valueStringIncludesTokenizedComponent, valueToSanitizedString
-
-
-
-
Field Detail
-
SYNTAX_NAME
@NotNull public static final java.lang.String SYNTAX_NAME
The name for this syntax.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DNLogFieldSyntax
public DNLogFieldSyntax(int maxStringLengthCharacters, @Nullable Schema schema, @Nullable java.util.Collection<java.lang.String> includedSensitiveAttributes, @Nullable java.util.Collection<java.lang.String> excludedSensitiveAttributes)
Creates a new DN log field syntax instance that can optionally define specific attributes to include in or exclude from redaction or tokenization. If any include attributes are specified, then only the values of those attributes will be considered sensitive and will have their values tokenized or redacted. If any exclude attributes are specified, then the values of any attributes except those will be considered sensitive. If no include attributes and no exclude attributes are specified, then all attributes will be considered sensitive and will have their values tokenized or redacted.- Parameters:
maxStringLengthCharacters- The maximum length (in characters) to use for strings within values. Strings that are longer than this should be truncated before inclusion in the log. This value must be greater than or equal to zero.schema- The schema to use in processing. It may optionally benullif no schema should be used.includedSensitiveAttributes- The set of names and OIDs for the specific attributes whose values should be considered sensitive and should have their values redacted or tokenized by methods that operate on value components. This may benullor empty if no included sensitive attributes should be defined.excludedSensitiveAttributes- The set of names and OIDs for the specific attributes whose values should not be considered sensitive and should not have their values redacted or tokenized by methods that operate on value components. This may benullor empty if no excluded sensitive attributes should be defined.
-
-
Method Detail
-
getIncludedSensitiveAttributes
@NotNull public java.util.Set<java.lang.String> getIncludedSensitiveAttributes()
Retrieves a set containing the names and/or OIDs of the attributes that will be considered sensitive and will have their values redacted or tokenized in methods that operate on DN components.- Returns:
- A set containing the names and/or OIDs of the attributes that will be considered sensitive, or an empty list if no included sensitive attributes are defined.
-
getExcludedSensitiveAttributes
@NotNull public java.util.Set<java.lang.String> getExcludedSensitiveAttributes()
Retrieves a set containing the names and/or OIDs of the attributes that will not be considered sensitive and will have not their values redacted or tokenized in methods that operate on DN components.- Returns:
- A set containing the names and/or OIDs of the attributes that will not be considered sensitive, or an empty list if no excluded sensitive attributes are defined.
-
getSyntaxName
@NotNull public java.lang.String getSyntaxName()
Retrieves the name for this syntax.- Specified by:
getSyntaxNamein classLogFieldSyntax<DN>- Returns:
- The name for this syntax.
-
valueToSanitizedString
public void valueToSanitizedString(@NotNull DN value, @NotNull ByteStringBuffer buffer)
Encodes the provided value to a sanitized string representation suitable for inclusion in a log message. The sanitized string should at least be cleaned of control characters and other non-printable characters, but depending on the syntax, it may clean other characters as well.- Specified by:
valueToSanitizedStringin classLogFieldSyntax<DN>- Parameters:
value- The value to be encoded. It must not benull.buffer- The buffer to which the string representation should be appended. It must not benull.
-
logSanitizedFieldToTextFormattedLog
public void logSanitizedFieldToTextFormattedLog(@NotNull java.lang.String fieldName, @NotNull DN fieldValue, @NotNull ByteStringBuffer buffer)
Appends a sanitized representation of the specified field (both field name and value) for a text-formatted log message to the given buffer.- Specified by:
logSanitizedFieldToTextFormattedLogin classLogFieldSyntax<DN>- Parameters:
fieldName- The name for the field. It must not benull.fieldValue- The value to use for the field. It must not benull.buffer- The buffer to which the sanitized log field should be appended. It must not benull.
-
logSanitizedFieldToJSONFormattedLog
public void logSanitizedFieldToJSONFormattedLog(@NotNull java.lang.String fieldName, @NotNull DN fieldValue, @NotNull JSONBuffer buffer)
Appends a sanitized representation of the specified field (both field name and value) for a JSON-formatted log message to the given buffer.- Specified by:
logSanitizedFieldToJSONFormattedLogin classLogFieldSyntax<DN>- Parameters:
fieldName- The name for the field. It must not benull.fieldValue- The value to use for the field. It must not benull.buffer- The buffer to which the sanitized log field should be appended. It must not benull.
-
logSanitizedValueToJSONFormattedLog
public void logSanitizedValueToJSONFormattedLog(@NotNull DN value, @NotNull JSONBuffer buffer)
Appends a sanitized representation of the provided value (without a field name, as might be suitable for a value included in a JSON array) for a JSON-formatted log message to the given buffer.- Specified by:
logSanitizedValueToJSONFormattedLogin classLogFieldSyntax<DN>- Parameters:
value- The value to be appended to the buffer. It must not benull.buffer- The buffer to which the sanitized value should be appended. It must not benull.
-
parseValue
@NotNull public DN parseValue(@NotNull java.lang.String valueString) throws RedactedValueException, TokenizedValueException, LogSyntaxException
Attempts to parse the provided string as a value in accordance with this syntax.- Specified by:
parseValuein classLogFieldSyntax<DN>- Parameters:
valueString- The string to be parsed.- Returns:
- The value that was parsed.
- Throws:
RedactedValueException- If the provided value has been redacted (either the complete value or one or more of its components), and the redacted form cannot be represented in this syntax.TokenizedValueException- If the provided value has been tokenized (either the complete value or one or more of its components), and the redacted form cannot be represented in this syntax.LogSyntaxException- If the provided value cannot be parsed in accordance with this syntax.
-
valueStringIsCompletelyRedacted
public boolean valueStringIsCompletelyRedacted(@NotNull java.lang.String valueString)
Determines whether the provided value string represents a value that has been completely redacted.- Overrides:
valueStringIsCompletelyRedactedin classLogFieldSyntax<DN>- Parameters:
valueString- The value for which to make the determination. It must not benull.- Returns:
trueif the provided value string represents a value that has been completely redacted, orfalseif not.
-
completelyRedactedValueConformsToSyntax
public boolean completelyRedactedValueConformsToSyntax()
Indicates whether values that have been completely redacted still conform to this syntax.- Specified by:
completelyRedactedValueConformsToSyntaxin classLogFieldSyntax<DN>- Returns:
trueif values that have been completely redacted still conform to this syntax, orfalseif not.
-
redactEntireValue
public void redactEntireValue(@NotNull ByteStringBuffer buffer)
Appends a string representation of a redacted entire value to the provided buffer.- Overrides:
redactEntireValuein classLogFieldSyntax<DN>- Parameters:
buffer- The buffer to which the redacted string representation should be appended. It must not benull.
-
logCompletelyRedactedFieldToTextFormattedLog
public void logCompletelyRedactedFieldToTextFormattedLog(@NotNull java.lang.String fieldName, @NotNull ByteStringBuffer buffer)
Appends a completely redacted representation of the specified field (both field name and value) for a text-formatted log message to the given buffer.- Specified by:
logCompletelyRedactedFieldToTextFormattedLogin classLogFieldSyntax<DN>- Parameters:
fieldName- The name for the field. It must not benull.buffer- The buffer to which the sanitized log field should be appended. It must not benull.
-
logCompletelyRedactedFieldToJSONFormattedLog
public void logCompletelyRedactedFieldToJSONFormattedLog(@NotNull java.lang.String fieldName, @NotNull JSONBuffer buffer)
Appends a completely redacted representation of the specified field (both field name and value) for a JSON-formatted log message to the given buffer.- Specified by:
logCompletelyRedactedFieldToJSONFormattedLogin classLogFieldSyntax<DN>- Parameters:
fieldName- The name for the field. It must not benull.buffer- The buffer to which the sanitized log field should be appended. It must not benull.
-
logCompletelyRedactedValueToJSONFormattedLog
public void logCompletelyRedactedValueToJSONFormattedLog(@NotNull JSONBuffer buffer)
Appends a completely redacted representation of a value (without a field name, as might be suitable for a value included in a JSON array) for a JSON-formatted log message to the given buffer.- Specified by:
logCompletelyRedactedValueToJSONFormattedLogin classLogFieldSyntax<DN>- Parameters:
buffer- The buffer to which the redacted value should be appended. It must not benull.
-
supportsRedactedComponents
public boolean supportsRedactedComponents()
Indicates whether this syntax supports redacting individual components of the entire value.- Specified by:
supportsRedactedComponentsin classLogFieldSyntax<DN>- Returns:
trueif this syntax supports redacting individual components of the entire value, orfalseif not.
-
valueWithRedactedComponentsConformsToSyntax
public boolean valueWithRedactedComponentsConformsToSyntax()
Indicates whether values with one or more redacted components still conform to this syntax.- Specified by:
valueWithRedactedComponentsConformsToSyntaxin classLogFieldSyntax<DN>- Returns:
trueif values with one or more redacted components still conform to this syntax.
-
redactComponents
public void redactComponents(@NotNull DN value, @NotNull ByteStringBuffer buffer)
Appends a string representation of the given value with redacted components to the provided buffer.- Overrides:
redactComponentsin classLogFieldSyntax<DN>- Parameters:
value- The value for which to obtain the redacted representation. It must not benull.buffer- The buffer to which the redacted string representation should be appended. It must not benull.
-
logRedactedComponentsFieldToTextFormattedLog
public void logRedactedComponentsFieldToTextFormattedLog(@NotNull java.lang.String fieldName, @NotNull DN fieldValue, @NotNull ByteStringBuffer buffer)
Appends a representation of the specified field (both field name and value) with redacted value components for a text-formatted log message to the given buffer. If this syntax does not support redacting components within a value, then it should redact the entire value.- Specified by:
logRedactedComponentsFieldToTextFormattedLogin classLogFieldSyntax<DN>- Parameters:
fieldName- The name for the field. It must not benull.fieldValue- The value to use for the field. It must not benull.buffer- The buffer to which the sanitized log field should be appended. It must not benull.
-
logRedactedComponentsFieldToJSONFormattedLog
public void logRedactedComponentsFieldToJSONFormattedLog(@NotNull java.lang.String fieldName, @NotNull DN fieldValue, @NotNull JSONBuffer buffer)
Appends a representation of the specified field (both field name and value) with redacted value components for a JSON-formatted log message to the given buffer. If this syntax does not support redacting components within a value, then it should redact the entire value.- Specified by:
logRedactedComponentsFieldToJSONFormattedLogin classLogFieldSyntax<DN>- Parameters:
fieldName- The name for the field. It must not benull.fieldValue- The value to use for the field. It must not benull.buffer- The buffer to which the sanitized log field should be appended. It must not benull.
-
logRedactedComponentsValueToJSONFormattedLog
public void logRedactedComponentsValueToJSONFormattedLog(@NotNull DN value, @NotNull JSONBuffer buffer)
Appends a representation of the provided value (without a field name, as might be suitable for a value included in a JSON array) with redacted components for a JSON-formatted log message to the given buffer. If this syntax does not support redacting components within a value, then it should redact the entire value.- Specified by:
logRedactedComponentsValueToJSONFormattedLogin classLogFieldSyntax<DN>- Parameters:
value- The value to be appended to the buffer in redacted form. It must not benull.buffer- The buffer to which the redacted value should be appended. It must not benull.
-
valueStringIsCompletelyTokenized
public boolean valueStringIsCompletelyTokenized(@NotNull java.lang.String valueString)
Determines whether the provided value string represents a value that has been completely tokenized.- Overrides:
valueStringIsCompletelyTokenizedin classLogFieldSyntax<DN>- Parameters:
valueString- The value for which to make the determination. It must not benull.- Returns:
trueif the provided value string represents a value that has been completely tokenized, orfalseif not.
-
completelyTokenizedValueConformsToSyntax
public boolean completelyTokenizedValueConformsToSyntax()
Indicates whether values that have been completely tokenized still conform to this syntax.- Specified by:
completelyTokenizedValueConformsToSyntaxin classLogFieldSyntax<DN>- Returns:
trueif values that have been completely tokenized still conform to this syntax, orfalseif not.
-
tokenizeEntireValue
public void tokenizeEntireValue(@NotNull DN value, @NotNull byte[] pepper, @NotNull ByteStringBuffer buffer)
Appends a tokenized representation of the provided value to the given buffer.
The resulting token will protect the provided value by representing it in a way that makes it at infeasible to determine what the original value was. However, tokenizing the same value with the same pepper should consistently yield the same token value, so that it will be possible to identify the same value across multiple log messages.- Specified by:
tokenizeEntireValuein classLogFieldSyntax<DN>- Parameters:
value- The value for which to generate the token. It must not benull.pepper- A pepper used to provide brute-force protection for the resulting token. The pepper value should be kept secret so that it is not available to unauthorized users who might be able to view log information, although the same pepper value should be consistently provided when tokenizing values so that the same value will consistently yield the same token. It must not benulland should not be empty.buffer- The buffer to which the tokenized representation should be appended. It must not benull.
-
logCompletelyTokenizedFieldToTextFormattedLog
public void logCompletelyTokenizedFieldToTextFormattedLog(@NotNull java.lang.String fieldName, @NotNull DN fieldValue, @NotNull byte[] pepper, @NotNull ByteStringBuffer buffer)
Appends a completely tokenized representation of the specified field (both field name and value) for a text-formatted log message to the given buffer.- Specified by:
logCompletelyTokenizedFieldToTextFormattedLogin classLogFieldSyntax<DN>- Parameters:
fieldName- The name for the field. It must not benull.fieldValue- The value to use for the field. It must not benull.pepper- A pepper used to provide brute-force protection for the resulting token. The pepper value should be kept secret so that it is not available to unauthorized users who might be able to view log information, although the same pepper value should be consistently provided when tokenizing values so that the same value will consistently yield the same token. It must not benulland should not be empty.buffer- The buffer to which the sanitized log field should be appended. It must not benull.
-
logCompletelyTokenizedFieldToJSONFormattedLog
public void logCompletelyTokenizedFieldToJSONFormattedLog(@NotNull java.lang.String fieldName, @NotNull DN fieldValue, @NotNull byte[] pepper, @NotNull JSONBuffer buffer)
Appends a completely tokenized representation of the specified field (both field name and value) for a JSON-formatted log message to the given buffer.- Specified by:
logCompletelyTokenizedFieldToJSONFormattedLogin classLogFieldSyntax<DN>- Parameters:
fieldName- The name for the field. It must not benull.fieldValue- The value to use for the field. It must not benull.pepper- A pepper used to provide brute-force protection for the resulting token. The pepper value should be kept secret so that it is not available to unauthorized users who might be able to view log information, although the same pepper value should be consistently provided when tokenizing values so that the same value will consistently yield the same token. It must not benulland should not be empty.buffer- The buffer to which the sanitized log field should be appended. It must not benull.
-
logCompletelyTokenizedValueToJSONFormattedLog
public void logCompletelyTokenizedValueToJSONFormattedLog(@NotNull DN value, @NotNull byte[] pepper, @NotNull JSONBuffer buffer)
Appends a completely tokenized representation of the provided value (without a field name, as might be suitable for a value included in a JSON array) for a JSON-formatted log message to the given buffer.- Specified by:
logCompletelyTokenizedValueToJSONFormattedLogin classLogFieldSyntax<DN>- Parameters:
value- The value to be appended to the buffer in tokenized form. It must not benull.pepper- A pepper used to provide brute-force protection for the resulting token. The pepper value should be kept secret so that it is not available to unauthorized users who might be able to view log information, although the same pepper value should be consistently provided when tokenizing values so that the same value will consistently yield the same token. It must not benulland should not be empty.buffer- The buffer to which the tokenized value should be appended. It must not benull.
-
supportsTokenizedComponents
public boolean supportsTokenizedComponents()
Indicates whether this syntax supports tokenizing individual components of the entire value.- Specified by:
supportsTokenizedComponentsin classLogFieldSyntax<DN>- Returns:
trueif this syntax supports tokenizing individual components of the entire value, orfalseif not.
-
valueWithTokenizedComponentsConformsToSyntax
public boolean valueWithTokenizedComponentsConformsToSyntax()
Indicates whether values with one or more tokenized components still conform to this syntax.- Specified by:
valueWithTokenizedComponentsConformsToSyntaxin classLogFieldSyntax<DN>- Returns:
trueif values with one or more tokenized components still conform to this syntax.
-
tokenizeComponents
public void tokenizeComponents(@NotNull DN value, @NotNull byte[] pepper, @NotNull ByteStringBuffer buffer)
Appends a string representation of the given value with zero or more of its components tokenized to the provided buffer. If this syntax does not support tokenized components, then the entire value should be tokenized.
The resulting tokens will protect components of the provided value by representing them in a way that makes it at infeasible to determine what the original components were. However, tokenizing the same value with the same pepper should consistently yield the same token value, so that it will be possible to identify the same value across multiple log messages.- Overrides:
tokenizeComponentsin classLogFieldSyntax<DN>- Parameters:
value- The value whose components should be tokenized. It must not benull.pepper- A pepper used to provide brute-force protection for the resulting token. The pepper value should be kept secret so that it is not available to unauthorized users who might be able to view log information, although the same pepper value should be consistently provided when tokenizing values so that the same value will consistently yield the same token. It must not benulland should not be empty.buffer- The buffer to which the tokenized representation should be appended. It must not benull.
-
logTokenizedComponentsFieldToTextFormattedLog
public void logTokenizedComponentsFieldToTextFormattedLog(@NotNull java.lang.String fieldName, @NotNull DN fieldValue, @NotNull byte[] pepper, @NotNull ByteStringBuffer buffer)
Appends a representation of the specified field (both field name and value) with tokenized value components for a text-formatted log message to the given buffer. If this syntax does not support tokenizing components within a value, then it should tokenize the entire value.- Specified by:
logTokenizedComponentsFieldToTextFormattedLogin classLogFieldSyntax<DN>- Parameters:
fieldName- The name for the field. It must not benull.fieldValue- The value to use for the field. It must not benull.pepper- A pepper used to provide brute-force protection for the resulting token. The pepper value should be kept secret so that it is not available to unauthorized users who might be able to view log information, although the same pepper value should be consistently provided when tokenizing values so that the same value will consistently yield the same token. It must not benulland should not be empty.buffer- The buffer to which the sanitized log field should be appended. It must not benull.
-
logTokenizedComponentsFieldToJSONFormattedLog
public void logTokenizedComponentsFieldToJSONFormattedLog(@NotNull java.lang.String fieldName, @NotNull DN fieldValue, @NotNull byte[] pepper, @NotNull JSONBuffer buffer)
Appends a representation of the specified field (both field name and value) with tokenized value components for a JSON-formatted log message to the given buffer. If this syntax does not support tokenizing components within a value, then it should tokenize the entire value.- Specified by:
logTokenizedComponentsFieldToJSONFormattedLogin classLogFieldSyntax<DN>- Parameters:
fieldName- The name for the field. It must not benull.fieldValue- The value to use for the field. It must not benull.pepper- A pepper used to provide brute-force protection for the resulting token. The pepper value should be kept secret so that it is not available to unauthorized users who might be able to view log information, although the same pepper value should be consistently provided when tokenizing values so that the same value will consistently yield the same token. It must not benulland should not be empty.buffer- The buffer to which the sanitized log field should be appended. It must not benull.
-
logTokenizedComponentsValueToJSONFormattedLog
public void logTokenizedComponentsValueToJSONFormattedLog(@NotNull DN value, @NotNull byte[] pepper, @NotNull JSONBuffer buffer)
Appends a representation of the provided value (without a field name, as might be suitable for a value included in a JSON array) with tokenized value components for a JSON-formatted log message to the given buffer. If this syntax does not support tokenizing components within a value, then it should tokenize the entire value.- Specified by:
logTokenizedComponentsValueToJSONFormattedLogin classLogFieldSyntax<DN>- Parameters:
value- The value to be appended to the buffer in tokenized form. It must not benull.pepper- A pepper used to provide brute-force protection for the resulting token. The pepper value should be kept secret so that it is not available to unauthorized users who might be able to view log information, although the same pepper value should be consistently provided when tokenizing values so that the same value will consistently yield the same token. It must not benulland should not be empty.buffer- The buffer to which the tokenized value should be appended. It must not benull.
-
-