dnenciu
2011-02-20 01:03:10 UTC
Hello I have setup my app to use spring security.
I also setup secure channel for the login.
If I use the https link to login https://myserver/myapp/ it works fine but
if I try to use http://myserver/myapp/ it goes in an infinite loop.
The same behaviour happens on all links after.
On debug I see that it keeps on redirecting in a loop:
DEBUG web.FilterChainProxy - Converted URL to lowercase, from: '/'; to: '/'
2011-02-19 19:59:18,140 [http-9090-1] DEBUG web.FilterChainProxy -
Candidate is: '/'; pattern is /**; matched=true
2011-02-19 19:59:18,140 [http-9090-1] DEBUG web.FilterChainProxy - / at
position 1 of 9 in additional filter chain; firing Filter:
'ChannelProcessingFilter'
2011-02-19 19:59:18,140 [http-9090-1] DEBUG
intercept.DefaultFilterInvocationSecurityMetadataSource - Converted URL to
lowercase, from: '/'; to: '/'
2011-02-19 19:59:18,140 [http-9090-1] DEBUG
intercept.DefaultFilterInvocationSecurityMetadataSource - Candidate is:
'/'; pattern is /images/**; matched=false
2011-02-19 19:59:18,140 [http-9090-1] DEBUG
intercept.DefaultFilterInvocationSecurityMetadataSource - Candidate is:
'/'; pattern is /css/**; matched=false
2011-02-19 19:59:18,140 [http-9090-1] DEBUG
intercept.DefaultFilterInvocationSecurityMetadataSource - Candidate is:
'/'; pattern is /js/**; matched=false
2011-02-19 19:59:18,140 [http-9090-1] DEBUG
intercept.DefaultFilterInvocationSecurityMetadataSource - Candidate is:
'/'; pattern is /**; matched=true
2011-02-19 19:59:18,140 [http-9090-1] DEBUG channel.ChannelProcessingFilter
- Request: FilterInvocation: URL: /; ConfigAttributes:
[REQUIRES_SECURE_CHANNEL]
2011-02-19 19:59:18,140 [http-9090-1] DEBUG channel.RetryWithHttpsEntryPoint
- Redirecting to: /WebMining/
2011-02-19 19:59:18,140 [http-9090-1] DEBUG mvc.GrailsWebRequestFilter -
Cleared Grails thread-bound request context:
***@77af4e9d
2011-02-19 19:59:18,142 [http-9090-1] DEBUG
spring.ReloadAwareAutowireCapableBeanFactory - Returning cached instance of
singleton bean 'groovyPagesTemplateEngine'
2011-02-19 19:59:18,142 [http-9090-1] DEBUG
support.DefaultListableBeanFactory - Returning cached instance of singleton
bean 'pluginManager'
2011-02-19 19:59:18,142 [http-9090-1] DEBUG
support.DefaultListableBeanFactory - Returning cached instance of singleton
bean 'grailsApplication'
2011-02-19 19:59:18,142 [http-9090-1] DEBUG
spring.ReloadAwareAutowireCapableBeanFactory - Returning cached instance of
singleton bean 'groovyPagesUriService'
2011-02-19 19:59:18,142 [http-9090-1] DEBUG
spring.ReloadAwareAutowireCapableBeanFactory - Returning cached instance of
singleton bean 'messageSource'
2011-02-19 19:59:18,142 [http-9090-1] DEBUG mvc.GrailsWebRequestFilter -
Bound Grails request context to thread:
***@77af4e9d
2011-02-19 19:59:18,142 [http-9090-1] DEBUG filter.GrailsReloadServletFilter
- Executing Grails reload filter...
2011-02-19 19:59:18,142 [http-9090-1] DEBUG
support.DefaultListableBeanFactory - Returning cached instance of singleton
bean 'grailsApplication'
2011-02-19 19:59:18,142 [http-9090-1] DEBUG web.FilterChainProxy -
Converted URL to lowercase, from: '/'; to: '/'
2011-02-19 19:59:18,142 [http-9090-1] DEBUG web.FilterChainProxy -
Candidate is: '/'; pattern is /**; matched=true
2011-02-19 19:59:18,142 [http-9090-1] DEBUG web.FilterChainProxy - / at
position 1 of 9 in additional filter chain; firing Filter:
'ChannelProcessingFilter'
Here is my config:
grails.plugins.springsecurity.interceptUrlMap = [
'/login/**': ['IS_AUTHENTICATED_ANONYMOUSLY'],
'/**': ['ROLE_ADMIN', 'IS_AUTHENTICATED_FULLY']
]
grails.plugins.springsecurity.secureChannel.definition = [
'/images/**': 'ANY_CHANNEL',
'/css/**': 'ANY_CHANNEL',
'/js/**': 'ANY_CHANNEL',
'/**': 'REQUIRES_SECURE_CHANNEL'
]
Dragos
I also setup secure channel for the login.
If I use the https link to login https://myserver/myapp/ it works fine but
if I try to use http://myserver/myapp/ it goes in an infinite loop.
The same behaviour happens on all links after.
On debug I see that it keeps on redirecting in a loop:
DEBUG web.FilterChainProxy - Converted URL to lowercase, from: '/'; to: '/'
2011-02-19 19:59:18,140 [http-9090-1] DEBUG web.FilterChainProxy -
Candidate is: '/'; pattern is /**; matched=true
2011-02-19 19:59:18,140 [http-9090-1] DEBUG web.FilterChainProxy - / at
position 1 of 9 in additional filter chain; firing Filter:
'ChannelProcessingFilter'
2011-02-19 19:59:18,140 [http-9090-1] DEBUG
intercept.DefaultFilterInvocationSecurityMetadataSource - Converted URL to
lowercase, from: '/'; to: '/'
2011-02-19 19:59:18,140 [http-9090-1] DEBUG
intercept.DefaultFilterInvocationSecurityMetadataSource - Candidate is:
'/'; pattern is /images/**; matched=false
2011-02-19 19:59:18,140 [http-9090-1] DEBUG
intercept.DefaultFilterInvocationSecurityMetadataSource - Candidate is:
'/'; pattern is /css/**; matched=false
2011-02-19 19:59:18,140 [http-9090-1] DEBUG
intercept.DefaultFilterInvocationSecurityMetadataSource - Candidate is:
'/'; pattern is /js/**; matched=false
2011-02-19 19:59:18,140 [http-9090-1] DEBUG
intercept.DefaultFilterInvocationSecurityMetadataSource - Candidate is:
'/'; pattern is /**; matched=true
2011-02-19 19:59:18,140 [http-9090-1] DEBUG channel.ChannelProcessingFilter
- Request: FilterInvocation: URL: /; ConfigAttributes:
[REQUIRES_SECURE_CHANNEL]
2011-02-19 19:59:18,140 [http-9090-1] DEBUG channel.RetryWithHttpsEntryPoint
- Redirecting to: /WebMining/
2011-02-19 19:59:18,140 [http-9090-1] DEBUG mvc.GrailsWebRequestFilter -
Cleared Grails thread-bound request context:
***@77af4e9d
2011-02-19 19:59:18,142 [http-9090-1] DEBUG
spring.ReloadAwareAutowireCapableBeanFactory - Returning cached instance of
singleton bean 'groovyPagesTemplateEngine'
2011-02-19 19:59:18,142 [http-9090-1] DEBUG
support.DefaultListableBeanFactory - Returning cached instance of singleton
bean 'pluginManager'
2011-02-19 19:59:18,142 [http-9090-1] DEBUG
support.DefaultListableBeanFactory - Returning cached instance of singleton
bean 'grailsApplication'
2011-02-19 19:59:18,142 [http-9090-1] DEBUG
spring.ReloadAwareAutowireCapableBeanFactory - Returning cached instance of
singleton bean 'groovyPagesUriService'
2011-02-19 19:59:18,142 [http-9090-1] DEBUG
spring.ReloadAwareAutowireCapableBeanFactory - Returning cached instance of
singleton bean 'messageSource'
2011-02-19 19:59:18,142 [http-9090-1] DEBUG mvc.GrailsWebRequestFilter -
Bound Grails request context to thread:
***@77af4e9d
2011-02-19 19:59:18,142 [http-9090-1] DEBUG filter.GrailsReloadServletFilter
- Executing Grails reload filter...
2011-02-19 19:59:18,142 [http-9090-1] DEBUG
support.DefaultListableBeanFactory - Returning cached instance of singleton
bean 'grailsApplication'
2011-02-19 19:59:18,142 [http-9090-1] DEBUG web.FilterChainProxy -
Converted URL to lowercase, from: '/'; to: '/'
2011-02-19 19:59:18,142 [http-9090-1] DEBUG web.FilterChainProxy -
Candidate is: '/'; pattern is /**; matched=true
2011-02-19 19:59:18,142 [http-9090-1] DEBUG web.FilterChainProxy - / at
position 1 of 9 in additional filter chain; firing Filter:
'ChannelProcessingFilter'
Here is my config:
grails.plugins.springsecurity.interceptUrlMap = [
'/login/**': ['IS_AUTHENTICATED_ANONYMOUSLY'],
'/**': ['ROLE_ADMIN', 'IS_AUTHENTICATED_FULLY']
]
grails.plugins.springsecurity.secureChannel.definition = [
'/images/**': 'ANY_CHANNEL',
'/css/**': 'ANY_CHANNEL',
'/js/**': 'ANY_CHANNEL',
'/**': 'REQUIRES_SECURE_CHANNEL'
]
Dragos
--
View this message in context: http://grails.1312388.n4.nabble.com/Infinite-loop-on-http-https-redirect-spring-security-tp3314812p3314812.html
Sent from the Grails - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
View this message in context: http://grails.1312388.n4.nabble.com/Infinite-loop-on-http-https-redirect-spring-security-tp3314812p3314812.html
Sent from the Grails - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email