【发布时间】:2018-11-08 20:48:27
【问题描述】:
我正在使用 Spring security SAML2.0 SSO 和 wso2IS 5.4.0。我已将角色声明添加到服务提供商内部的 wso2is 中。现在我可以在 saml 断言中获取用户角色。
在这里,我想验证他们角色的用户基础。我在 securityContext.xml 中映射了具有某些角色的应用程序(服务提供者)url
<security:http entry-point-ref="samlEntryPoint" use-expressions="false" auto-config="true" access-denied-page="/saml/web/auth/denied">
<security:intercept-url pattern="/saml/web/home" access="ROLE_MEMBER"/>
<security:intercept-url pattern="/saml/web/getUserDetails" access="ROLE_ADMIN"/>
<security:intercept-url pattern="/**" access="IS_AUTHENTICATED_FULLY"/>
<security:custom-filter before="FIRST" ref="metadataGeneratorFilter"/>
<security:custom-filter after="BASIC_AUTH_FILTER" ref="samlFilter"/>
</security:http>
【问题讨论】:
-
你能再解释一下你的要求吗?您是否希望将角色包含在 saml 断言中,或者您已经这样做了并且需要其他内容?
-
嗨@Maduranga是的,我希望角色也应该包含在saml断言中,然后在我希望用户应该根据作为saml断言一部分的角色访问我的服务提供商(应用程序)之后
标签: spring-security saml-2.0 wso2is