Class InsecureChannelProcessor

All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, ChannelProcessor

public class InsecureChannelProcessor extends Object implements org.springframework.beans.factory.InitializingBean, ChannelProcessor
Ensures channel security is inactive by review of HttpServletRequest.isSecure() responses.

The class responds to one case-sensitive keyword, getInsecureKeyword(). If this keyword is detected, HttpServletRequest.isSecure() is used to determine the channel security offered. If channel security is present, the configured ChannelEntryPoint is called. By default the entry point is RetryWithHttpEntryPoint.

The default insecureKeyword is REQUIRES_INSECURE_CHANNEL.

  • Constructor Details

    • InsecureChannelProcessor

      public InsecureChannelProcessor()
  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • decide

      public void decide(FilterInvocation invocation, Collection<ConfigAttribute> config) throws IOException, jakarta.servlet.ServletException
      Description copied from interface: ChannelProcessor
      Decided whether the presented FilterInvocation provides the appropriate level of channel security based on the requested list of ConfigAttributes.
      Specified by:
      decide in interface ChannelProcessor
    • getEntryPoint

      public ChannelEntryPoint getEntryPoint()
    • getInsecureKeyword

      public String getInsecureKeyword()
    • setEntryPoint

      public void setEntryPoint(ChannelEntryPoint entryPoint)
    • setInsecureKeyword

      public void setInsecureKeyword(String secureKeyword)
    • supports

      public boolean supports(ConfigAttribute attribute)
      Description copied from interface: ChannelProcessor
      Indicates whether this ChannelProcessor is able to process the passed ConfigAttribute.

      This allows the ChannelProcessingFilter to check every configuration attribute can be consumed by the configured ChannelDecisionManager.

      Specified by:
      supports in interface ChannelProcessor
      attribute - a configuration attribute that has been configured against the ChannelProcessingFilter.
      true if this ChannelProcessor can support the passed configuration attribute