Interface SecurityInfoSanitizer

All Known Implementing Classes:
DefaultSecurityInfoSanitizer

public interface SecurityInfoSanitizer
  • Method Details

    • sanitize

      @NotNull default @NotNull Optional<ProcessingException> sanitize(@NotNull @NotNull ProcessingException exception, @NotNull @NotNull ProcessingExceptionConfig config)
      Deeply sanitize exception's message and it's context-info values.
      Parameters:
      exception - An exception to be sanitized.
      config - A config used for sanitization.
      Returns:
      Deep ProcessingException sanitization according to a configuration. Any of sub-objects that are subject of sanitization does not meet config criteria are dropped. In the case ProcessingMessage is dropped, Optional.empty() is returned. Otherwise a new sanitized exception is constructed.
    • sanitize

      @NotNull default @NotNull Optional<ProcessingMessage> sanitize(@Nullable @Nullable ProcessingMessage message, @NotNull @NotNull ProcessingExceptionConfig config)
      Deeply sanitize message and it's context-info values.
      Parameters:
      message - A message to be sanitized.
      config - A config used for sanitization.
      Returns:
      Deep ProcessingMessage sanitization according to a configuration. Any of sub-objects that are subject of sanitization does not meet config criteria are dropped. In the case ProcessingMessage alone is dropped, Optional.empty() is returned. Otherwise a new sanitized ProcessingMessage is constructed.
    • sanitize

      @NotNull default @NotNull Optional<ContextInfo> sanitize(@Nullable @Nullable ContextInfo contextInfo, @NotNull @NotNull ProcessingExceptionConfig config)
      Sanitize context-info.
      Parameters:
      contextInfo - A context-info to be sanitized.
      config - A config used for sanitization.
      Returns:
      ContextInfo sanitization according to a configuration. In the case ContextInfo is sanitized, Optional.empty() is returned. Otherwise the same object ContextInfo is returned in Optional.of(Object).
    • canPublish

      boolean canPublish(@Nullable @Nullable SecurityPolicy infoSecurityPolicy, @NotNull @NotNull ProcessingExceptionConfig config)
      Method checks whether information with infoSecurityPolicy could be published or not within given configuration.
      Parameters:
      infoSecurityPolicy - Information's security policy.
      config - A configuration used for evaluation of security policy information.
      Returns:
      true in the case information with given security policy could be published; false otherwise.