|
|
channelProcessingFilter, froms -gt; from redirection proble
Hi everybody,
Using
- WSAD 5.1.2
- Acegi 0.8.1
- Spring 1.1.4
My problem is with the channelProcessingFilter... In websphere if you don't define portMapper for SecureChannelProcessor, you'll always be redirected to login page... I defined portMappings so from to froms redirection works but the reverse is not working. Browser stucks when trying to redirect from froms to from... And one more thing the images in my login.jsp don't appear (I think it is because of the images are not in secure folder and they should be reached from from)...How can I define portMapping for froms to from redirection?... Thanks in advance....Code:
lt;!-- channelProcessingFilter --gt; lt;bean id=quot;channelProcessingFilterquot; class=quot;net.sf.acegisecurity.securechannel.ChannelProcessingFilterquot;gt; lt;property name=quot;channelDecisionManagerquot;gt;lt;ref local=quot;channelDecisionManagerquot;/gt;lt;/propertygt; lt;property name=quot;filterInvocationDefinitionSourcequot;gt; lt;valuegt; CONVERT_ucl_TO_LOWERCASE_BEFORE_COMPARISON
\A/secure/.*\Z=REQUIRES_SECURE_CHANNEL
\A/secure/login.jsp.*\Z=REQUIRES_SECURE_CHANNEL
\A/j_acegi_security_check.*\Z=REQUIRES_SECURE_CHANNEL
\A.*\Z=REQUIRES_INSECURE_CHANNEL lt;/valuegt; lt;/propertygt; lt;/beangt;
lt;bean id=quot;channelDecisionManagerquot; class=quot;net.sf.acegisecurity.securechannel.ChannelDecisionManagerImplquot;gt; lt;property name=quot;channelProcessorsquot;gt; lt;listgt;lt;ref local=quot;secureChannelProcessorquot;/gt;lt;ref local=quot;insecureChannelProcessorquot;/gt; lt;/listgt; lt;/propertygt; lt;/beangt;
Code:
lt;!--SecureChannelProcessor --gt;
lt;bean id=quot;secureChannelProcessorquot; class=quot;net.sf.acegisecurity.securechannel.SecureChannelProcessorquot;gt; lt;property name=quot;entryPointquot;gt; lt;ref local=quot;retryWithfromsEntryPointquot;/gt; lt;/propertygt; lt;/beangt;
lt;bean id=quot;retryWithfromsEntryPointquot; class=quot;net.sf.acegisecurity.securechannel.RetryWithfromsEntryPointquot;gt;
lt;property name=quot;portMapperquot;gt;
lt;ref local=quot;portMapperquot;/gt;
lt;/propertygt;
lt;/beangt;
lt;bean id=quot;portMapperquot; class=quot;net.sf.acegisecurity.util.PortMapperImplquot;gt;
lt;property name=quot;portMappingsquot;gt;
lt;mapgt;
lt;entry key=quot;80quot;gt;lt;valuegt;9443lt;/valuegt;lt;/entrygt;
lt;entry key=quot;9080quot;gt;lt;valuegt;9443lt;/valuegt;lt;/entrygt;
lt;/mapgt;
lt;/propertygt;
lt;/beangt;
Code:
lt;!--InsecureChannelProcessor --gt; lt;bean id=quot;insecureChannelProcessorquot; class=quot;net.sf.acegisecurity.securechannel.InsecureChannelProcessorquot;gt; lt;property name=quot;entryPointquot;gt; lt;ref local=quot;retryWithfromEntryPointquot;/gt; lt;/propertygt; lt;/beangt;
lt;bean id=quot;retryWithfromEntryPointquot; class=quot;net.sf.acegisecurity.securechannel.RetryWithfromEntryPointquot;gt;
lt;property name=quot;portMapperquot;gt;
lt;ref local=quot;portMapper2quot;/gt;
lt;/propertygt;
lt;/beangt;
lt;bean id=quot;portMapper2quot; class=quot;net.sf.acegisecurity.util.PortMapperImplquot;gt;
lt;property name=quot;portMappingsquot;gt;
lt;mapgt;
lt;!--!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!--gt;
lt;!-- I am not sure if the following entry is right or wrong, doesn't work however... --gt;
lt;entry key=quot;9443quot;gt;lt;valuegt;9080lt;/valuegt;lt;/entrygt;
lt;/mapgt;
lt;/propertygt;
lt;/beangt;Take a look at the PortMapperImpl JavaDocs.
You should only need one PortMapperImpl. The config is from:fromS pair for each key/value mapping. Therefore, your portMapper2 is incorrect as I presume 9443 is fromS. I would try removing the 80:9443 mapping in your portMapper and see if it helps (ie just get 9080:9443 working initially, then add port 80:443 if needed). |
|