Class AuditEvent.AuditParam

  • Enclosing interface:
    AuditEvent

    public static final class AuditEvent.AuditParam
    extends Object
    Named parameters of audit event. If sensitive, the audit provider should either encrypt them or obfuscate them.
    • Method Detail

      • plain

        public static AuditEvent.AuditParam plain​(String name,
                                                  Object parameter)
        New parameter of any type.
        Parameters:
        name - parameter name
        parameter - parameter value
        Returns:
        Plain audit parameter
      • sensitive

        public static AuditEvent.AuditParam sensitive​(String name,
                                                      Object parameter)
        New parameter of any type that is sensitive.
        Parameters:
        name - parameter name
        parameter - parameter value
        Returns:
        Sensitive audit parameter
      • name

        public String name()
        Name of this parameter.
        Returns:
        name
      • value

        public Optional<Object> value()
        Value of this parameter.
        Returns:
        value or empty if not defined (null).
      • isSensitive

        public boolean isSensitive()
        Whether this is sensitive information (such as passwords). Handle sensitive information carefully - e.g. do not log it.
        Returns:
        true if this is a sensitive value