【发布时间】:2018-09-19 04:47:26
【问题描述】:
我正在一个 Grails 3.x 应用程序上使用 SAML 实现 Spring Security,而不使用插件。
我已经添加了必要的罐子如下:
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'
我的 securitycontext.xml 文件集成在 resources.groovy 中。
beans = {
importBeans('classpath:security/springSecuritySamlBeans.xml')
}
我需要在我的 web.xml 中添加以下安全过滤器,但在 Grails 3 中这是不可能的。谁能建议需要在哪里添加这些安全过滤器以及如何添加它们。
<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>
根据我的阅读,这些过滤器需要在 resources.groovy 中定义,但我不确定这是如何完成的。
【问题讨论】:
标签: spring grails spring-security