5.6.4. サービスプロバイダーの設定
サービスプロバイダー (SP) は JBoss EAP サーバーインスタンスである可能性があります。
手順5.2 サービスプロバイダー (SP) の設定
SP の Web アプリケーションセキュリティーの設定
SP として設定する Web アプリケーションの web.xml ファイルで、FORM ベースのセキュリティーを有効にする必要があります。例5.9 SP の web.xml 設定
<display-name>IDP</display-name> <description>IDP</description> <!-- Define a security constraint that gives unlimited access to images --> <security-constraint> <web-resource-collection> <web-resource-name>Images</web-resource-name> <url-pattern>/images/*</url-pattern> </web-resource-collection> </security-constraint> <!-- Define a Security Constraint on this Application --> <security-constraint> <web-resource-collection> <web-resource-name>IDP</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <auth-constraint> <role-name>manager</role-name> </auth-constraint> </security-constraint> <!-- Define the Login Configuration for this Application --> <login-config> <auth-method>FORM</auth-method> <realm-name>IDP Application</realm-name> <form-login-config> <form-login-page>/jsp/login.jsp</form-login-page> <form-error-page>/jsp/loginerror.jsp</form-error-page> </form-login-config> </login-config> <!-- Security roles referenced by this web application --> <security-role> <description> The role that is required to log in to the IDP Application </description> <role-name>manager</role-name> </security-role> </web-app>
SP バルブの設定
SP のバルブを設定するには、SP Web アプリケーションの WEB-INF ディレクトリーにcontext.xml
を作成します。例5.10 IDP バルブの context.xml ファイル設定
<Context> <Valve className="org.jboss.identity.federation.bindings.tomcat.sp.SPRedirectSignatureFormAuthenticator" /> </Context>
PicketLink フェデレーション設定ファイル (picketlink-idfed.xml) の設定
IDP Web アプリケーションの WEB-INF ディレクトリーでpicketlink-idfed.xml
ファイルを設定します。この設定ファイルには、サービスプロバイダーおよび IDP への送信 SAML2 アサーションに発行側として追加される URL を指定します。以下はpicketlink-idfed.xml
の設定例になります。例5.11 picketlink-idfed.xml の設定
<PicketLinkIDP xmlns="urn:picketlink:identity-federation:config:1.0" > <IdentityURL>http://localhost:8080/idp/</IdentityURL> </PicketLinkIDP
PicketLink フェデレーションハンドラーファイル (
picketlink-handlers.xml
) の設定SP Web アプリケーションの WEB-INF でpicketlink-handlers.xml
を設定します。例5.12 picketlink-handlers.xml の設定
<Handlers xmlns="urn:picketlink:identity-federation:handler:config:1.0"> <Handler class="org.picketlink.identity.federation.web.handlers.saml2.SAML2LogOutHandler"/> <Handler class="org.picketlink.identity.federation.web.handlers.saml2.SAML2AuthenticationHandler"/> </Handlers>
注記
ハンドラーがリストされている順番を維持してください。