Interface JsonInErrorMessageSanitizer


public interface JsonInErrorMessageSanitizer
Customize / sanitize the JSON before putting it in the stack trace / error messages. Mainly thought to avoid leaking secrets / credentials in the log.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Used by default when no other sanitizer are configured.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.sf.json.JSONObject
    sanitize(net.sf.json.JSONObject jsonData)
    Removes/redacts all the confidential information to let the result to be printed in the log / stack trace / error message.
  • Field Details

    • NOOP

      static final JsonInErrorMessageSanitizer NOOP
      Used by default when no other sanitizer are configured. Has no effect on the information, just returning a copy.
  • Method Details

    • sanitize

      net.sf.json.JSONObject sanitize(net.sf.json.JSONObject jsonData)
      Removes/redacts all the confidential information to let the result to be printed in the log / stack trace / error message. Must return a new instance of the JSON.