Announcement Announcement Module
Collapse
No announcement yet.
Grails 2.1.1 + Spring Security Core Plugin 1.2.7.3 trying to single sign-on Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Grails 2.1.1 + Spring Security Core Plugin 1.2.7.3 trying to single sign-on

    I have an existing SSO product (intercepts requests in Apache web server, authenticates user, set a token, mod_proxy to JBoss where web applications using Grails run on). The SSO product basically injects JAAS/Spring credentials after authenticating/authorizing with an external server.

    The SSO product has been successfully integrated with JAAS and Spring (without Grails); for the Spring integration, only a custom UserDetails class and custom UserDetailsService class are provided. The UserDetailsService uses information provided by the SSO product to construct the UserDetails object, which the web applications using Spring can retrieve successfully.

    However when I tried to integrate with Grails + Spring, I found my custom UserDetailsService isn't invoked at all. Calling applicationContext.getBean do give me the hash code of an instance of my class, but otherwise my UserDetailsService isn't called at all.

    I already did these steps:
    - Modify grails-app/conf/BuildConfig.groovy to include this line in the plugin section:
    plugins {
    compile ':spring-security-core:1.2.7.3'
    }
    - Included the JAR files of the SSO product in the lib folder of the Groovy+Grails Eclipse project.
    - Execute grails install-templates to generate web.xml
    - Modified web.xml to include my SSO product's filter (reads headers and stores them for retrieval later)
    - Modify grails-app/conf/spring/resources.groovy and add:
    beans = {
    userDetailsService(com.mycompany.spring.CustomUser DetailsService)
    }

    I tried turning spring's log level to all, but I failed to find anything relevant.

    What is required to use a custom UserDetailsService in Spring + Grails? What else can I do to troubleshoot this?
Working...
X