Class IsolationRedactor

java.lang.Object
org.j7m.middleware.isolation.internal.IsolationRedactor

public final class IsolationRedactor extends Object
Internal redaction helper.
  • Constructor Details

    • IsolationRedactor

      public IsolationRedactor()
      Creates a redactor.
  • Method Details

    • sensitiveKey

      public boolean sensitiveKey(String key)
      Returns whether a key is sensitive.
      Parameters:
      key - key value
      Returns:
      true if sensitive
    • redactValue

      public String redactValue(String key, String value)
      Redacts a value by key.
      Parameters:
      key - key
      value - value
      Returns:
      redacted or original value
    • redactMap

      public Map<String,String> redactMap(Map<String,String> input)
      Redacts a map.
      Parameters:
      input - input map
      Returns:
      redacted map
    • redactText

      public String redactText(String text, org.j7m.middleware.api.isolation.StreamCapturePolicy policy)
      Redacts free text according to capture policy.
      Parameters:
      text - text
      policy - policy
      Returns:
      redacted text
    • safeCommand

      public String safeCommand(List<String> command)
      Redacts command arguments.
      Parameters:
      command - command list
      Returns:
      redacted command summary
    • pathSummary

      public String pathSummary(Path path, boolean redact)
      Returns a safe path summary.
      Parameters:
      path - path
      redact - whether to redact
      Returns:
      safe summary