Class AuthenticationFilter

java.lang.Object
overit.geocall.cxf.filter.AuthenticationFilter
All Implemented Interfaces:
IOLogFilter

public class AuthenticationFilter extends Object implements IOLogFilter
This filter obfuscates authentication sensitive information (e.g. UsernameToken password value, apiKey, secrets, tokens, etc.)
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    filterError(T message)
    This method allow to manage the error message, adding or modifying its content.
    <T> T
    filterInput(T message)
    This method allow to manage the input message, adding or modifying its content.
    <T> T
    filterOutput(T message)
    This method allow to manage the output message, adding or modifying its content.
    protected boolean
    Checks if the node name contains any sensitive keyword (case insensitive).
    protected void
    Obfuscates the content of a sensitive node.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AuthenticationFilter

      public AuthenticationFilter()
  • Method Details

    • filterInput

      public <T> T filterInput(T message)
      Description copied from interface: IOLogFilter
      This method allow to manage the input message, adding or modifying its content.
      Specified by:
      filterInput in interface IOLogFilter
      Type Parameters:
      T - the type of the input message. It could be a JsonElement, SOAPMessage, String, etc, depending on the service. So it's important to check che type of the instance and cast the object to the correct class in order to modify it.
      Parameters:
      message - The message
      Returns:
      the message filtered.
    • filterOutput

      public <T> T filterOutput(T message)
      Description copied from interface: IOLogFilter
      This method allow to manage the output message, adding or modifying its content.
      Specified by:
      filterOutput in interface IOLogFilter
      Type Parameters:
      T - the type of the output message. It could be a JsonElement, SOAPMessage, String, etc, depending on the service. So it's important to check che type of the instance and cast the object to the correct class in order to modify it.
      Parameters:
      message - The message
      Returns:
      the message filtered.
    • filterError

      public <T> T filterError(T message)
      Description copied from interface: IOLogFilter
      This method allow to manage the error message, adding or modifying its content.
      Specified by:
      filterError in interface IOLogFilter
      Type Parameters:
      T - the type of the error message. It could be a JsonElement, SOAPMessage, String, etc, depending on the service. So it's important to check che type of the instance and cast the object to the correct class in order to modify it.
      Parameters:
      message - The message
      Returns:
      the message filtered.
    • isSensitiveNode

      protected boolean isSensitiveNode(Node n)
      Checks if the node name contains any sensitive keyword (case insensitive).
      Parameters:
      n - the node to check.
      Returns:
      true if the node name contains a sensitive keyword.
    • obfuscateNode

      protected void obfuscateNode(Node n)
      Obfuscates the content of a sensitive node. This includes text content and the "value" attribute if present.
      Parameters:
      n - the node to obfuscate.