Home Grails 3 - Security without plugins
Reply: 0

Grails 3 - Security without plugins

user1650
1#
user1650 Published in April 26, 2018, 1:46 pm

I am implementing Spring Security with SAML on a Grails 3.x application without the use of plugins.

I have added the necessary jars as below :

     compile group: 'ca.juliusdavies', name: 'not-yet-commons-ssl', version: '0.3.17'
     compile 'org.opensaml:opensaml:2.6.0'
     compile 'org.opensaml:openws:1.4.1'
     compile 'org.opensaml:xmltooling:1.3.1'
     compile group: 'org.springframework.security', name: 'spring-security-core', version: '3.2.5.RELEASE'
     compile group: 'org.springframework.security', name: 'spring-security-config', version: '3.2.5.RELEASE'
     compile group: 'org.springframework.security.extensions', name: 'spring-security-saml2-core', version: '1.0.5.BUILD-SNAPSHOT'

I have my securitycontext.xml file integrated within resources.groovy.

beans = {
        importBeans('classpath:security/springSecuritySamlBeans.xml')
}

I need to add the following security filters in my web.xml but in Grails 3 this is not possible.Can anyone suggest where these need to be added and how they can be added.

<filter>
        <filter-name>springSecurityFilterChain</filter-name>
        <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>springSecurityFilterChain</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

From what i read these filters need to be defined in resources.groovy but I am not sure how this is done.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.300084 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO