此内容没有您所选择的语言版本。
15.7.4. Configure Service Provider using HTTP/REDIRECT Binding
Procedure 15.2. Configure Service Provider (SP)
Configure the Web Application Security For the SP
The web application to be configured as a SP should have FORM based security enabled in itsweb.xml
file.Example 15.11.
web.xml
Configuration for SPCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create Security Domain for SP
Create a Security Domain that usesSAML2LoginModule
. Here is an example configuration:<security-domain name="sp" cache-type="default"> <authentication> <login-module code="org.picketlink.identity.federation.bindings.jboss.auth.SAML2LoginModule" flag="required"/> </authentication> </security-domain>
<security-domain name="sp" cache-type="default"> <authentication> <login-module code="org.picketlink.identity.federation.bindings.jboss.auth.SAML2LoginModule" flag="required"/> </authentication> </security-domain>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the SP Valve
To configure the valve for the SP, create ajboss-web.xml
in theWEB-INF
directory of your SP web application.Example 15.12.
jboss-web.xml
File Configuration for SP ValvesCopy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the PicketLink Configuration File (
picketlink.xml
)The following is an example ofpicketlink.xml
configuration for the SP. In this configuration file you provide the URL for the SP and for the IDP, with corresponding handlers for the SP.Example 15.13.
picketlink.xml
ConfigurationCopy to Clipboard Copied! Toggle word wrap Toggle overflow By default,picketlink.xml
is located in theWEB-INF
directory of your application. However, you can configure a custom path to apicketlink.xml
that is external to the application:Optional: Configuring a custom path to
picketlink.xml
Add two paramaters to the valve element in your application'sWEB-INF/jboss-web.xml
:configFile
specifying for the path topicketlink.xml
, andtimerInterval
which specifies the interval in milliseconds to reload the configuration. For example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Declare dependencies on PicketLink module (
META-INF/MANIFEST.MF
, orjboss-deployment-structure.xml
)The web application also requires a dependency defining inMETA-INF/MANIFEST.MF
orjboss-deployment-structure.xml
, so that the PicketLink classes can be located.Example 15.14. Define Dependency in
META-INF/MANIFEST.MF
Manifest-Version: 1.0 Build-Jdk: 1.6.0_24 Dependencies: org.picketlink
Manifest-Version: 1.0 Build-Jdk: 1.6.0_24 Dependencies: org.picketlink
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example 15.15. Define Dependency in
META-INF/jboss-deployment-structure.xml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow