0

これがシナリオです。

Web アプリ <==> IDP プロキシ <==> IDP があります。IDP プロキシと IDP の両方が openam インスタンスです。アイデアは、追加の IDP (他のクライアントから) を追加する可能性があるため、複雑さを保護するためにプロキシが必要です。

したがって、IDP プロキシは次のとおりです。http://idpproxydev.devs1.int:8080/openam

IDP URL: http://idpdev.devs1.int:80/openam

私のウェブアプリは: http://ocr-jq0zt91.devs1.int:9081/LOS

統合のためにhttp://static.springsource.org/spring-security/site/extensions/saml/index.htmlの使用を開始し ましたが 、今では SAML: request wassent from my web app が表示されています。

私が現在抱えている問題は、Fedlet (IDP プロキシで Openam を使用して生成されたクライアント) を使用してセットアップをテストしたときに、リクエストがプロキシに送られ、Fedlet によって生成された SAML リクエストにその追加情報があるため、IDP にルーティングされることです。このスニペットは SAML リクエストにありますか

<samlp:Scoping xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"  ProxyCount="1"   >
       <samlp:IDPList xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol">
        <samlp:IDPEntry xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
                        ProviderID="http://idpdev.devs1.int:80/openam"  />
    </samlp:IDPList>
</samlp:Scoping>

したがって、私が目にする唯一の違いは、FEDLET で生成された SAML 要求でのこの追加のペイロードです。

したがって、SAML 要求で上記のスニペットを確認することにより、IDP プロキシは、最終的な宛先がそれ自体 ( http://idpproxydev.devs1.int:8080/openam ) ではなく、この場合はhttp://idpdev である別のエンティティであることを認識します。 devs1.int:80/openam

Fedlet には、拡張メタデータ (sp-extended.xml) 用の追加のプロパティ ファイルがあり、これらの追加のものを追加できます。

<Attribute name="enableIDPProxy">
           <Value>true</Value>
       </Attribute>
       <Attribute name="idpProxyList">
           <Value> http://idpdev.devs1.int:80/openam</Value>  (the attribute name is little confusing as this is the IDP)
       </Attribute>
       <Attribute name="idpProxyCount">
           <Value>1</Value>
       </Attribute>

ただし、春の saml セキュリティ ライブラリでは、これらの追加の属性を追加して、SAML リクエストにこの情報を含めることができる方法がわかりません。上記の追加属性をフィードする方法はありますか?

私のWebアプリがリクエストを送信したときにSpring saml拡張機能が読み取れるようにするには?

4

1 に答える 1

2

この問題の修正を見つけました。org.springframework.security.saml.websso.WebSSOProfileOptions を使用する必要があります

これは私の Web アプリからの一例です。これを security.xml に追加します

<beans:bean id="samlEntryPoint" class="org.springframework.security.saml.SAMLEntryPoint">
        <beans:property name="defaultProfileOptions">
            <beans:bean class="org.springframework.security.saml.websso.WebSSOProfileOptions">
                <beans:property name="binding" value="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"/>
                <beans:property name="includeScoping" value="true"/>
                <!-- to skip proxyCount, 0 to disable proxying, >0 to allow proxying-->
                <beans:property name="proxyCount" value="1"/>
                <beans:property name="allowedIDPs">
                    <beans:set>
     <beans:value>http://idpproxydev.devs1.int:80/openam</beans:value>                  
                    </beans:set>
               </beans:property>        
  <!--  Allowed Values are in  AuthnContextComparison.java -->
            <beans:property name="authnContextComparison" value="EXACT"/>
            <beans:property name="authnContexts">
                    <beans:list>
 <beans:value>
urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport
</beans:value>                  
                    </beans:list>
            </beans:property>
            <beans:property name="nameID" value="urn:oasis:names:tc:SAML:2.0:nameid-  format:transient"/>
            <beans:property name="allowCreate" value="true"/>
                </beans:bean>
        </beans:property>
    </beans:bean>

これで、WEB アプリからの SAML リクエストに IDP リストが含まれていることがわかりました。

また、SPRING SAML 拡張機能を使用して JSF Web アプリを openam と統合するための注意事項をいくつか追加しました。

Openam の概念に関連する一般的な情報に関する私の記事を参照してください http://reddymails.blogspot.com/2013/03/sso-for-Java-or-net-web-based.html

Spring SAML 拡張機能と Spring Security を使用して、JSF 2 Web アプリケーションを Openam と統合する手順。 http://reddymails.blogspot.com/2013/06/integrating-jsf-web-applicataion-with.html

-ラマ

于 2013-03-13T22:28:34.457 に答える