I use spring security core plugin in my grails project, and I set the securityConfigType to 'Requestmap', and I also insert entries to the Requestmap domain as below
for (String a in ['/',
'/index',
'/index.gsp',
'/assets/**',
'/**/js/**',
'/**/css/**',
'/**/images/**',
'/**/favicon.ico',
'/account/**',
'/dbconsole/**'
]) {
new SysRequestmap(url: a, configAttribute: 'permitAll').save(flush: true)
}
new SysRequestmap(url: '/*', configAttribute: 'IS_AUTHENTICATED_ANONYMOUSLY').save();
new SysRequestmap(url: '/logout/**', configAttribute: 'IS_AUTHENTICATED_REMEMBERED,IS_AUTHENTICATED_FULLY').save();
new SysRequestmap(url: '/login/**', configAttribute: 'IS_AUTHENTICATED_ANONYMOUSLY').save()
new SysRequestmap(url: '/index/**', configAttribute: 'IS_AUTHENTICATED_ANONYMOUSLY').save();
I verified the request map table that stored mapping entries. But the start up page cause too many redirects.
looks like there is a bug in the last version of the hibernate plugin.
So i solved this by using the hibernate hibernate4:4.3.5.5
In BuildConfig.groovy
runtime ':hibernate4:4.3.5.5'
Additional workarounds can be found in https://jira.grails.org/browse/GPSPRINGSECURITYCORE-312
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With