Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

requestmap type cause login/auth redirect infinitely

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.

like image 408
Bruce Zhang Avatar asked Feb 06 '26 15:02

Bruce Zhang


1 Answers

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

like image 128
Neoecos Avatar answered Feb 09 '26 08:02

Neoecos



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!