Liking cljdoc? Tell your friends :D

boundary.core.utils.pii-redaction

Shared PII redaction utilities used by error reporting adapters.

Shared PII redaction utilities used by error reporting adapters.
raw docstring

apply-redactionclj

(apply-redaction context config)

Apply PII redaction to a context map that may contain :tags and :extra.

Always applies default PII redaction, even when :redact is omitted.

Apply PII redaction to a context map that may contain :tags and :extra.

Always applies default PII redaction, even when :redact is omitted.
sourceraw docstring

build-redact-stateclj

(build-redact-state config)

Build effective redaction configuration from adapter config.

Config structure (all optional):

{:redact {:keys [:password :authorization ...] :additional-keys [:custom-field] :mask-email? true}}

Build effective redaction configuration from adapter config.

Config structure (all optional):

{:redact {:keys           [:password :authorization ...]
          :additional-keys [:custom-field]
          :mask-email?    true}}
sourceraw docstring

default-redact-keysclj

Default set of keys whose values should be redacted before sending to external systems.

Keys are stored as lower-case strings for case-insensitive matching.

Default set of keys whose values should be redacted before sending to external systems.

Keys are stored as lower-case strings for case-insensitive matching.
sourceraw docstring

email-string?clj

(email-string? s)

Best-effort detection of email-like strings.

Args: s: String to check

Returns: Boolean indicating if string looks like an email

Best-effort detection of email-like strings.

Args:
  s: String to check

Returns:
  Boolean indicating if string looks like an email
sourceraw docstring

mask-emailclj

(mask-email s)

Mask an email address, preserving only the first character of the local part.

For non-email strings, returns [REDACTED].

Mask an email address, preserving only the first character of the local part.

For non-email strings, returns [REDACTED].
sourceraw docstring

normalize-key-nameclj

(normalize-key-name k)

Normalize a map key to a lower-case string for matching.

Normalize a map key to a lower-case string for matching.
sourceraw docstring

redact-piiclj

(redact-pii data state)

Recursively redact PII from arbitrarily nested data structures.

Redacts based on key names using the provided redaction state.

Recursively redact PII from arbitrarily nested data structures.

Redacts based on key names using the provided redaction state.
sourceraw docstring

redact-pii-valueclj

(redact-pii-value k v {:keys [keys mask-email?] :as _state})

Redact a single value based on its key and redaction state.

Email is treated specially:

  • when :mask-email? is true and the value looks like an email, the local part is masked
  • when :mask-email? is false, email values are left as-is, even if :email is in the default key set
Redact a single value based on its key and redaction state.

Email is treated specially:
- when :mask-email? is true and the value looks like an email, the local part is masked
- when :mask-email? is false, email values are left as-is, even if :email is in the default key set
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close