In Config.groovy I decided to secure all actions that have to do with editing content like so:
grails.plugins.springsecurity.interceptUrlMap = [
'/admin/**' : ['ROLE_ADMIN', 'IS_AUTHENTICATED_FULLY'],
'/*/create/**' : ['ROLE_ADMIN', 'IS_AUTHENTICATED_FULLY'],
'/*/save/**' : ['ROLE_ADMIN', 'IS_AUTHENTICATED_FULLY'],
'/*/update/**' : ['ROLE_ADMIN', 'IS_AUTHENTICATED_FULLY'],
'/*/edit/**' : ['ROLE_ADMIN', 'IS_AUTHENTICATED_FULLY'],
'/contactUs/create/new_message.html' : ['IS_AUTHENTICATED_ANONYMOUSLY'],
'/**': ['IS_AUTHENTICATED_ANONYMOUSLY']
]
… just wonder if this is sufficient or am I asking for trouble? Or what would be better/proper way of securing all ‘create,save,update,edit’ actions in all controllers?
Thanks in advance.
just two thoughts…
PS: I use shiro, so I have no experience with spring security and don’t know how to whitelist controllers and actions.