WildFly Picketlink SAML 2.0 POST-Binding AuthnRequest

时间:2016-02-22 15:31:48

标签: single-sign-on wildfly saml-2.0 wildfly-8 picketlink

我必须使用WildFly服务器和picketlink实现SAML 2.0身份提供程序,但我坚持认证过程。我按照了picketlink指南,也查看了github上的快速入门,但我仍然没有让它工作。

问题是我的服务提供商向Wildfly服务器发送POST AuthnRequest,该服务器通过GET请求重定向到login.jsp,然后我的SAMLRequest属性消失,然后在成功登录后,IDPFilter无法获取SAMLRequest属性。因此,用户未在服务提供商上进行身份验证或重定向回服务提供商。

我使用的是我在身份提供商项目的web.xml中配置的非常基本的FORM身份验证。

WildFly版本:8.1.0-FINAL

Picketlink版本:2.7.1.Final

firefox网络监控:

firefox network monitoring

picketlink.xml

<PicketLink xmlns="urn:picketlink:identity-federation:config:2.1">      
    <PicketLinkIDP xmlns="urn:picketlink:identity-federation:config:2.1" SupportsSignatures="true"
        AttributeManager="org.picketlink.identity.federation.bindings.wildfly.idp.UndertowAttributeManager"
        RoleGenerator="org.picketlink.identity.federation.bindings.wildfly.idp.UndertowRoleGenerator">

        <IdentityURL>${idp.url::http://localhost:7080/idp}</IdentityURL>

        <Trust>
            <Domains>locahost</Domains>
        </Trust>

        <KeyProvider ClassName="org.picketlink.identity.federation.core.impl.KeyStoreKeyManager">
            <Auth Key="KeyStoreURL" Value="/jbid_test_keystore.jks" />
            <Auth Key="KeyStorePass" Value="changeit" />
            <Auth Key="SigningKeyPass" Value="changeit" />
            <Auth Key="SigningKeyAlias" Value="wildfly" />

            <ValidatingAlias Key="localhost" Value="wildfly" />
            <ValidatingAlias Key="127.0.0.1" Value="wildfly" />
        </KeyProvider>

        <MetaDataProvider ClassName="org.picketlink.identity.federation.core.saml.md.providers.FileBasedEntityMetadataProvider">
           <Option Key="FileName" Value="/WEB-INF/classes/test_sp_metadata.xml"/>
        </MetaDataProvider>
    </PicketLinkIDP>

    <Handlers xmlns="urn:picketlink:identity-federation:handler:config:2.1">
        <Handler class="org.picketlink.identity.federation.web.handlers.saml2.SAML2IssuerTrustHandler" />
        <Handler class="org.picketlink.identity.federation.web.handlers.saml2.SAML2LogOutHandler" />
        <Handler class="org.picketlink.identity.federation.web.handlers.saml2.SAML2AuthenticationHandler" />
        <Handler class="org.picketlink.identity.federation.web.handlers.saml2.RolesGenerationHandler" />
        <Handler class="org.picketlink.identity.federation.web.handlers.saml2.SAML2EncryptionHandler" />
        <Handler class="org.picketlink.identity.federation.web.handlers.saml2.SAML2SignatureValidationHandler" />
    </Handlers>
</PicketLink>

的web.xml

...

<display-name>PicketLink Identity Provider</display-name>

<description>PicketLink Identity Provider Using a Servlet Filter</description>

<listener>
    <listener-class>org.picketlink.identity.federation.web.listeners.IDPHttpSessionListener</listener-class>
</listener>

<filter>
    <filter-name>IDPFilter</filter-name>
    <filter-class>org.picketlink.identity.federation.web.filters.IDPFilter</filter-class>
</filter>

<filter-mapping>
    <filter-name>IDPFilter</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

...

我希望你能帮我解决这个问题...

问候,克里斯

0 个答案:

没有答案