0

This is what request map table contains:

'/', '/index', '/index.gsp', '/**/favicon.ico',
  '/assets/**', '/**/js/**', '/**/css/**', '/**/images/**',
  '/login', '/login.*', '/login/*',
  '/logout', '/logout.*', '/logout/*']

But no static resources are loaded in login page. every request to static resource redirects to login/auth.

dmahapatro
  • 49,365
  • 7
  • 88
  • 117
CSR
  • 770
  • 1
  • 14
  • 30

2 Answers2

0

In my (Spring Security 2.0-RC4) application I have:

grails.plugin.springsecurity.controllerAnnotations.staticRules = [
    '/'                 : ['permitAll'],
    '/searchable/**'    : ['permitAll'],
    '/index'            : ['permitAll'],
    '/index.gsp'        : ['permitAll'],
    '/assets/**'        : ['permitAll'],
    '/**/js/**'         : ['permitAll'],
    '/**/css/**'        : ['permitAll'],
    '/**/images/**'     : ['permitAll'],
    '/**/favicon.ico'   : ['permitAll']
]

and that is working without problems. Note that I use annotations.

It looks as if you use request mappings, and from the documentation I read that you probably create request mappings like this:

for (String url in [
  '/', '/index', '/index.gsp', '/**/favicon.ico',
  '/assets/**', '/**/js/**', '/**/css/**', '/**/images/**',
  '/login', '/login.*', '/login/*',
  '/logout', '/logout.*', '/logout/*']) {
       new Requestmap(url: url, configAttribute: 'permitAll').save()
   }

Perhaps you should consider to make a save(failOnError: true) to make sure, that you actually have data in your requestmap table.

sbglasius
  • 3,104
  • 20
  • 28
  • All spring security configuration works well in 2.3 version. Now i have started a 2.4 project. The data is saving in database. I have tried to create a new sample application and there also the assets are not displayed by default after installation of spring security & asset pipe line plugin. – CSR Nov 04 '14 at 07:26
  • My application is running 2.4, but as I said, I'm using annotations. Have you tried to debug into spring security, perhaps it can give you a hint? – sbglasius Nov 04 '14 at 16:37
0

Obviously you use request mappings. So have a look to Using Spring Security and Requestmap fails in Grails

In addition to be sure your requestmap is ok you may flush your requestmap, e.g.:

new Requestmap(url: '/login/**', configAttribute: 'permitAll').save(flush: true, failOnError: true)
Community
  • 1
  • 1
hab
  • 148
  • 1
  • 9