Saturday, September 15, 2012

Adventures with Grails and Spring Security

Well, I had initially started down the path of creating my own User/Role security model for a Grails App I am building at home in the evenings/weekends.

However, I gave it a little more thought and going back to the "why re-invent the wheel" philosophy of development and just started looking into leveraging Grails Spring Security Plugin.

Found this great article on quick start with Spring Security:

Here's what I've done thus far:

1. Modify my BuildConfig.groovy to include Spring Security:

    plugins {
        build ":tomcat:$grailsVersion"
        compile ":spring-security-core:"
        compile ":twitter-bootstrap:2.1.1"
        compile ":resources:1.1.6"
        runtime ":hibernate:$grailsVersion"

2.Run s2-quickstart:

    s2-quickstart User Role Requestmap

3. Refactored the generated Controllers LoginController and LogoutController so that they are in the package. 

4. Customized Password algorithm to SHA-512:


I feel like this is just scratching the surface. I ended up running into questions and needed to post on StackOverflow: Grails Spring Security Custom UserDetailsService (goal of email in place of username).

No comments:

Post a Comment