Question

Can a Spring Security RequestMaps database table be grails application specific?

e.g., instead of having a rule like:

'/protectedcontroller/**': ['IS_AUTHENTICATED_FULLY'],

which only one grails app could use, I want to have all my rules for allmy grails app in one table...rules would then look like:

'/grailsapp1/protectedcontroller/**': ['IS_AUTHENTICATED_FULLY'],
'/grailsapp1/protectedcontroller/js/**': ['IS_AUTHENTICATED_ANONYMOUSLY'],

'/grailsapp2/protectedcontroller/**': ['IS_AUTHENTICATED_FULLY'],
'/grailsapp2/unprotectedcontroller/**': ['IS_AUTHENTICATED_ANONYMOUSLY'],

etc. ?

I have tried this but it doesn't seem to work.

Reason I am asking is, I want to store all my different apps RequestMaps in ONE table in the database.

No correct solution

OTHER TIPS

This blog shows how you would do that:

http://blog.springsource.com/2010/08/11/simplified-spring-security-with-grails/

You should have a look at "Dynamic request maps" in the blog. You will need to add a couple lines to Config.groovy, and then you can start creating Requestmaps:

import grails.plugins.springsecurity.SecurityConfigType
...
grails.plugins.springsecurity.securityConfigType = SecurityConfigType.Requestmap
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top