Class InsecureChannelProcessor
- java.lang.Object
-
- org.springframework.security.web.access.channel.InsecureChannelProcessor
-
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
,ChannelProcessor
public class InsecureChannelProcessor extends java.lang.Object implements org.springframework.beans.factory.InitializingBean, ChannelProcessor
Ensures channel security is inactive by review ofHttpServletRequest.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 configuredChannelEntryPoint
is called. By default the entry point isRetryWithHttpEntryPoint
.The default
insecureKeyword
isREQUIRES_INSECURE_CHANNEL
.
-
-
Constructor Summary
Constructors Constructor Description InsecureChannelProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
void
decide(FilterInvocation invocation, java.util.Collection<ConfigAttribute> config)
Decided whether the presentedFilterInvocation
provides the appropriate level of channel security based on the requested list of ConfigAttributes.ChannelEntryPoint
getEntryPoint()
java.lang.String
getInsecureKeyword()
void
setEntryPoint(ChannelEntryPoint entryPoint)
void
setInsecureKeyword(java.lang.String secureKeyword)
boolean
supports(ConfigAttribute attribute)
Indicates whether thisChannelProcessor
is able to process the passedConfigAttribute
.
-
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
decide
public void decide(FilterInvocation invocation, java.util.Collection<ConfigAttribute> config) throws java.io.IOException, javax.servlet.ServletException
Description copied from interface:ChannelProcessor
Decided whether the presentedFilterInvocation
provides the appropriate level of channel security based on the requested list of ConfigAttributes.- Specified by:
decide
in interfaceChannelProcessor
- Throws:
java.io.IOException
javax.servlet.ServletException
-
getEntryPoint
public ChannelEntryPoint getEntryPoint()
-
getInsecureKeyword
public java.lang.String getInsecureKeyword()
-
setEntryPoint
public void setEntryPoint(ChannelEntryPoint entryPoint)
-
setInsecureKeyword
public void setInsecureKeyword(java.lang.String secureKeyword)
-
supports
public boolean supports(ConfigAttribute attribute)
Description copied from interface:ChannelProcessor
Indicates whether thisChannelProcessor
is able to process the passedConfigAttribute
.This allows the
ChannelProcessingFilter
to check every configuration attribute can be consumed by the configuredChannelDecisionManager
.- Specified by:
supports
in interfaceChannelProcessor
- Parameters:
attribute
- a configuration attribute that has been configured against the ChannelProcessingFilter.- Returns:
- true if this
ChannelProcessor
can support the passed configuration attribute
-
-