{"id":8956,"date":"2013-10-24T10:48:22","date_gmt":"2013-10-24T15:48:22","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=8956"},"modified":"2015-12-29T16:39:11","modified_gmt":"2015-12-29T21:39:11","slug":"jboss-picketlink","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=8956","title":{"rendered":"JBoss PicketLink SAML SSO with ADFS"},"content":{"rendered":"<div class='toc wptoc'>\n<h2>Contents<\/h2>\n<ol class='toc-odd level-1'>\n\t<li>\n\t\t<a href=\"#Environment\">Environment<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Prepare\">Prepare<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Download_PicketLink\">Download PicketLink<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Generate_JKS_Keystore\">Generate JKS Keystore<\/a>\n\t\t<ol class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Generate_keystore_using_Java_keytool\">Generate keystore using Java keytool<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Generate_keystore_using_Portecle\">Generate keystore using Portecle<\/a>\n\t\t\t\t<ol class='toc-odd level-3'>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Generate_New_Key_Store\">Generate New Key Store<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Generate_CSR\">Generate CSR<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Import_CA_Reply\">Import CA Reply<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t<\/ol>\n<\/ol>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Configure_Keystore_on_JBoss_AS\">Configure Keystore on JBoss AS<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Setup_NTP\">Setup NTP<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Export_ADFS_Token_Signing_Cert\">Export ADFS Token Signing Cert<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Create_AD_FS_Trust_Store\">Create AD FS Trust Store<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Install_PicketLink_Library_Files\">Install PicketLink Library Files<\/a>\n\t\t\t\t<ol class='toc-even level-2'>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Copy_Jar_Files_to_JBoss_common_lib_Directory\">Copy Jar Files to JBoss common lib Directory<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Authorize_PicketLink_jar_Files\">Authorize PicketLink jar Files<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Configure_PicketLink_Authenticator\">Configure PicketLink Authenticator<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Configure_login.module\">Configure login.module<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Configure_PicketLink_Properties\">Configure PicketLink Properties<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Copy_ADFS_Signing_Keystore\">Copy ADFS Signing Keystore<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t<\/ol>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Configure_WAR_hw.war_Deployment\">Configure WAR (hw.war) Deployment<\/a>\n\t\t\t\t<ol class='toc-even level-2'>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Create_a_Test_Web_App\">Create a Test Web App<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Configure_Application_Security_Constraints\">Configure Application Security Constraints<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Configure_login_module\">Configure login module<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Final_web.xml_File\">Final web.xml File<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Update_Security_Domain\">Update Security Domain<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Create_WEB-INFcontext.xml_File\">Create <em>WEB-INF\/context.xml<\/em> File<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Create_WEB-INFpicketlink.xml_File\">Create <em>WEB-INF\/picketlink.xml<\/em> File<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t<\/ol>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Create_ADFS_relying_party_named_jboss01-PicketLink\">Create ADFS relying party named <strong>jboss01-PicketLink<\/strong><\/a>\n\t\t\t\t<ol class='toc-even level-2'>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Add_Claim_Rule_for_SAM-Account-Name\">Add Claim Rule for SAM-Account-Name<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Add_Claim_Rule_for_Name_ID\">Add Claim Rule for Name ID<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Add_Claim_Rule_for_Role\">Add Claim Rule for Role<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#Add_SAML_Logout_Endpoint\">Add SAML Logout Endpoint<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t<\/ol>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Test\">Test<\/a>\n\t\t\t\t<ol class='toc-even level-2'>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#IDP_Initiated_Sign_on_URL\">IDP Initiated Sign on URL<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#SAML_Tracer\">SAML Tracer<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#PicketLink_Logging_Level\">PicketLink Logging Level<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t<\/ol>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Issues\">Issues<\/a>\n\t\t\t\t<ol class='toc-even level-2'>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#keytool_Import_Error\">keytool Import Error<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"#MSIS7004\">MSIS7004<\/a>\n\t\t\t\t\t<\/li>\n\t\t\t\t<\/ol>\n\t\t\t<li>\n\t\t\t\t<a href=\"#References\">References<\/a>\n\t\t\t<\/li>\n<\/ol>\n<\/ol>\n<\/div>\n<div class='wptoc-end'>&nbsp;<\/div>\n<span id=\"Environment\"><h2>Environment<\/h2><\/span>\n<p>* JBoss 5.1.0.GA or JBoss 4.2.2.GA<br \/>\n* Centos version:<\/p>\n<pre lang=\"bash\">\r\n[root@jboss01 ~]# cat \/etc\/redhat-release\r\nCentOS release 5.7 (Final)\r\n[root@jboss01 ~]# uname -m\r\nx86_64\r\n<\/pre>\n<p>* Java version:<\/p>\n<pre lang=\"bash\">\r\njava version \"1.6.0_24\"\r\nOpenJDK Runtime Environment (IcedTea6 1.11.11.90) (rhel-1.41.1.11.11.90.el5_9-x86_64)\r\nOpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)\r\n<\/pre>\n<span id=\"Prepare\"><h2>Prepare<\/h2><\/span>\n<p>* Install JBoss 5.1 AS. See <a href=\"?p=8966\">this post<\/a> for details.<\/p>\n<span id=\"Download_PicketLink\"><h2>Download PicketLink<\/h2><\/span>\n<p>* Download version <em>v2.1.8.Final<\/em> from <a href=\"https:\/\/docs.jboss.org\/author\/display\/PLINK\/v2.1.8.Final\">here<\/a><br \/>\n&#8211; Core jar: <em>picketlink-core-2.1.8.Final.jar<\/em><br \/>\n&#8211; Binding jar for AS 5.x: <em>picketlink-jbas5-2.1.8.Final.jar<\/em><br \/>\n* For JBOss 4.2.2.GA, also download <em>jboss-security-spi-3.0.0.Final.jar<\/em> from <a href=\"http:\/\/www.java2s.com\/Code\/Jar\/j\/Downloadjbosssecurityspi300Finaljar.htm\">here<\/a><\/p>\n<span id=\"Generate_JKS_Keystore\"><h2>Generate JKS Keystore<\/h2><\/span>\n<span id=\"Generate_keystore_using_Java_keytool\"><h3>Generate keystore using Java keytool<\/h3><\/span>\n<p>* Generate private key:<\/p>\n<pre lang=\"bash\">\r\nkeytool -genkey -alias jboss01 -keyalg RSA -sigalg SHA1withRSA -keysize 2048 -keystore jboss01.jks -storepass Welcome1 -keypass Welcome1 -dname \"CN=jboss01.mytest.local, OU=Lab, O=My Test, L=Reston, S=Virginia, C=US\" -validity 360\r\n<\/pre>\n<p>* Generate CSR:<\/p>\n<pre lang=\"bash\">\r\nkeytool -certreq -alias jboss01 -sigalg SHA1withRSA -file jboss01.csr -keystore jboss01.jks -storepass Welcome1 \r\n<\/pre>\n<p>* Send CSR to CA for signing.<br \/>\n* Import signed certificate:<\/p>\n<pre lang=\"bash\">\r\nkeytool -import -v -keystore jboss01.jks -alias jboss01 -storepass Welcome1 -file jboss01.p7b\r\n<\/pre>\n<span id=\"Generate_keystore_using_Portecle\"><h3>Generate keystore using Portecle<\/h3><\/span>\n<p>* Download Portecle from <a href=\"http:\/\/sourceforge.net\/projects\/portecle\/\">http:\/\/sourceforge.net\/projects\/portecle\/<\/a><br \/>\n* Start Portecle:<br \/>\n<em>java -jar portecle.jar<\/em><\/p>\n<span id=\"Generate_New_Key_Store\"><h4>Generate New Key Store<\/h4><\/span>\n<p>* Select <em>File > New Keystore&#8230;<\/em><\/p>\n<span id=\"\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_new.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_new.jpg\" alt=\"\" title=\"jboss01_keystore_new\" width=\"212\" height=\"227\" class=\"aligncenter size-full wp-image-8977\" \/><\/a><\/h6><\/span>\n<p>* Select JKS as store type:<\/p>\n<span id=\"_1\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_newJks.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_newJks.jpg\" alt=\"\" title=\"jboss01_keystore_newJks\" width=\"221\" height=\"273\" class=\"aligncenter size-full wp-image-8978\" \/><\/a><\/h6><\/span>\n<p>* Select <em>Tools > Generate Key Pair&#8230;<\/em> and select:<br \/>\n&#8211; Key Algorithm: <em>RSA<\/em><br \/>\n&#8211; Key Size: <em>2048<\/em><\/p>\n<span id=\"_2\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_genKeypair.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_genKeypair.jpg\" alt=\"\" title=\"jboss01_keystore_genKeypair\" width=\"242\" height=\"150\" class=\"aligncenter size-full wp-image-8973\" \/><\/a><\/h6><\/span>\n<p>* Enter CN for the new key:<\/p>\n<span id=\"_3\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_cn_jboss01.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_cn_jboss01-290x300.jpg\" alt=\"\" title=\"jboss01_keystore_cn_jboss01\" width=\"290\" height=\"300\" class=\"aligncenter size-medium wp-image-8979\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_cn_jboss01-290x300.jpg 290w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_cn_jboss01.jpg 336w\" sizes=\"auto, (max-width: 290px) 100vw, 290px\" \/><\/a><\/h6><\/span>\n<p>* Enter alias for the new key:<\/p>\n<span id=\"_4\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_jboss01_alias.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_jboss01_alias.jpg\" alt=\"\" title=\"jboss01_keystore_jboss01_alias\" width=\"259\" height=\"98\" class=\"aligncenter size-full wp-image-8980\" \/><\/a><\/h6><\/span>\n<p>* Keystore pass (e.g. Welcome1):<\/p>\n<span id=\"_5\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_pass.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_pass-300x95.jpg\" alt=\"\" title=\"jboss01_keystore_pass\" width=\"300\" height=\"95\" class=\"aligncenter size-medium wp-image-8971\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_pass-300x95.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_pass.jpg 356w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* Keystore generated:<\/p>\n<span id=\"_6\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_success.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_success.jpg\" alt=\"\" title=\"jboss01_keystore_success\" width=\"267\" height=\"111\" class=\"aligncenter size-full wp-image-8972\" \/><\/a><\/h6><\/span>\n<p>* Save keystore file jboss01.jks:<\/p>\n<span id=\"_7\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_saveKeyStore_fileName.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_saveKeyStore_fileName-300x231.jpg\" alt=\"\" title=\"jboss01_keystore_saveKeyStore_fileName\" width=\"300\" height=\"231\" class=\"aligncenter size-medium wp-image-8975\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_saveKeyStore_fileName-300x231.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_saveKeyStore_fileName.jpg 556w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* Set Keystore file password (e.g. Welcome1):<\/p>\n<span id=\"_8\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_saveKeyStore.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_saveKeyStore-300x172.jpg\" alt=\"\" title=\"jboss01_keystore_saveKeyStore\" width=\"300\" height=\"172\" class=\"aligncenter size-medium wp-image-8974\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_saveKeyStore-300x172.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_saveKeyStore.jpg 544w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"Generate_CSR\"><h4>Generate CSR<\/h4><\/span>\n<p>* Right click keystore entry and select <em>Generate Certification Request<\/em><br \/>\n&#8211; File Name: <em>jboss01_mytest_local.csr<\/em><br \/>\n* Submit to CA for signing<\/p>\n<span id=\"Import_CA_Reply\"><h4>Import CA Reply<\/h4><\/span>\n<p>* Import CA reply:<\/p>\n<span id=\"_9\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_jboss01_impCAReply.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_jboss01_impCAReply-300x271.jpg\" alt=\"\" title=\"jboss01_keystore_jboss01_impCAReply\" width=\"300\" height=\"271\" class=\"aligncenter size-medium wp-image-8983\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_jboss01_impCAReply-300x271.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_jboss01_impCAReply.jpg 330w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"_10\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_jboss01_impCAReply_2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_jboss01_impCAReply_2-300x208.jpg\" alt=\"\" title=\"jboss01_keystore_jboss01_impCAReply_2\" width=\"300\" height=\"208\" class=\"aligncenter size-medium wp-image-8984\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_jboss01_impCAReply_2-300x208.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_jboss01_impCAReply_2.jpg 501w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"_11\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_jboss01_impCAReply_3.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_jboss01_impCAReply_3-300x249.jpg\" alt=\"\" title=\"jboss01_keystore_jboss01_impCAReply_3\" width=\"300\" height=\"249\" class=\"aligncenter size-medium wp-image-8985\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_jboss01_impCAReply_3-300x249.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_jboss01_impCAReply_3.jpg 548w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"_12\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_jboss01_impCAReply_4.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_jboss01_impCAReply_4.jpg\" alt=\"\" title=\"jboss01_keystore_jboss01_impCAReply_4\" width=\"269\" height=\"110\" class=\"aligncenter size-full wp-image-8986\" \/><\/a><\/h6><\/span>\n<span id=\"Configure_Keystore_on_JBoss_AS\"><h2>Configure Keystore on JBoss AS<\/h2><\/span>\n<p>* Copy <em>jboss01.jks<\/em> to <em>$JBOSS_HOME\/server\/default\/conf<\/em><br \/>\n* Config JBoss AS to use the keystore<br \/>\n<em>vi $JBOSS_HOME\/server\/default\/deploy\/jbossweb.sar\/server.xml<\/em><\/p>\n<pre lang=\"xml\">\r\n<Connector protocol=\"HTTP\/1.1\" SSLEnabled=\"true\u201d port=\"8443\"\r\naddress=\"${jboss.bind.address}\"\r\nscheme=\"https\" secure=\"true\" clientAuth=\"false\"\r\nkeystoreFile=\"${jboss.server.home.dir}\/conf\/jboss01.jks\" keystorePass=\"Welcome1\"\r\nsslProtocol = \"TLS\" \/>\r\n<\/pre>\n<p>* Restart JBoss<br \/>\n* Open port 8443<\/p>\n<pre lang=\"bash\">\r\n-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8443 -j ACCEPT\r\nservice iptables restart\r\n<\/pre>\n<p>* Check https connection:<\/p>\n<span id=\"_13\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_testHttps.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_testHttps-192x300.jpg\" alt=\"\" title=\"jboss01_keystore_testHttps\" width=\"192\" height=\"300\" class=\"aligncenter size-medium wp-image-8988\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_testHttps-192x300.jpg 192w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_testHttps.jpg 255w\" sizes=\"auto, (max-width: 192px) 100vw, 192px\" \/><\/a><\/h6><\/span>\n<span id=\"Setup_NTP\"><h2>Setup NTP<\/h2><\/span>\n<p>* All servers should setup NTP clients.<\/p>\n<span id=\"Export_ADFS_Token_Signing_Cert\"><h2>Export ADFS Token Signing Cert<\/h2><\/span>\n<p>* Go to: <em>AD FS 2.0 console, open AD FS 2.0 > Service > Certificates<\/em><br \/>\n* Select: <em>Token-signing certificate > View Certificate<\/em><\/p>\n<span id=\"_14\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_exp.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_exp-300x113.jpg\" alt=\"\" title=\"jboss01_adfs2_tokenSigningCert_exp\" width=\"300\" height=\"113\" class=\"aligncenter size-medium wp-image-8990\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_exp-300x113.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_exp.jpg 759w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* Install as Trusted Root Certificate if prompted<\/p>\n<span id=\"_15\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_installCA.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_installCA-240x300.jpg\" alt=\"\" title=\"jboss01_adfs2_tokenSigningCert_installCA\" width=\"240\" height=\"300\" class=\"aligncenter size-medium wp-image-8991\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_installCA-240x300.jpg 240w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_installCA.jpg 402w\" sizes=\"auto, (max-width: 240px) 100vw, 240px\" \/><\/a><\/h6><\/span>\n<span id=\"_16\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_installCA_2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_installCA_2-286x300.jpg\" alt=\"\" title=\"jboss01_adfs2_tokenSigningCert_installCA_2\" width=\"286\" height=\"300\" class=\"aligncenter size-medium wp-image-8992\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_installCA_2-286x300.jpg 286w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_installCA_2.jpg 462w\" sizes=\"auto, (max-width: 286px) 100vw, 286px\" \/><\/a><\/h6><\/span>\n<span id=\"_17\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_installCA_3.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_installCA_3-300x269.jpg\" alt=\"\" title=\"jboss01_adfs2_tokenSigningCert_installCA_3\" width=\"300\" height=\"269\" class=\"aligncenter size-medium wp-image-8993\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_installCA_3-300x269.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_installCA_3.jpg 497w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"_18\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_installCA_4.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_installCA_4-300x267.jpg\" alt=\"\" title=\"jboss01_adfs2_tokenSigningCert_installCA_4\" width=\"300\" height=\"267\" class=\"aligncenter size-medium wp-image-8994\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_installCA_4-300x267.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_installCA_4.jpg 413w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* Select: <em>Token-signing certificate > View Certificate > Details<\/em><br \/>\n* Click <em>Copy to File&#8230;<\/em><\/p>\n<span id=\"_19\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_exp_2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_exp_2-241x300.jpg\" alt=\"\" title=\"jboss01_adfs2_tokenSigningCert_exp_2\" width=\"241\" height=\"300\" class=\"aligncenter size-medium wp-image-8995\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_exp_2-241x300.jpg 241w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_exp_2.jpg 404w\" sizes=\"auto, (max-width: 241px) 100vw, 241px\" \/><\/a><\/h6><\/span>\n<p>* Select Base-64 encoded X.509 (.CER)<\/p>\n<span id=\"_20\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_exp_3.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_exp_3-300x100.jpg\" alt=\"\" title=\"jboss01_adfs2_tokenSigningCert_exp_3\" width=\"300\" height=\"100\" class=\"aligncenter size-medium wp-image-8996\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_exp_3-300x100.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_exp_3.jpg 498w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* File name: <strong>adfs2_tokenSigning.cer<\/strong><\/p>\n<span id=\"_21\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_exp_4.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_exp_4-300x94.jpg\" alt=\"\" title=\"jboss01_adfs2_tokenSigningCert_exp_4\" width=\"300\" height=\"94\" class=\"aligncenter size-medium wp-image-8997\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_exp_4-300x94.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_exp_4.jpg 500w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"_22\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_exp_5.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_exp_5-300x269.jpg\" alt=\"\" title=\"jboss01_adfs2_tokenSigningCert_exp_5\" width=\"300\" height=\"269\" class=\"aligncenter size-medium wp-image-8998\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_exp_5-300x269.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_adfs2_tokenSigningCert_exp_5.jpg 497w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"Create_AD_FS_Trust_Store\"><h2>Create AD FS Trust Store<\/h2><\/span>\n<p>* Generate a new key store<br \/>\n* Generate a new key pair with CN: <strong>jboss01_adfs_sign.mytest.local<\/strong><\/p>\n<span id=\"_23\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_adfsSign_cn.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_adfsSign_cn-292x300.jpg\" alt=\"\" title=\"jboss01_keystore_adfsSign_cn\" width=\"292\" height=\"300\" class=\"aligncenter size-medium wp-image-9001\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_adfsSign_cn-292x300.jpg 292w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_adfsSign_cn.jpg 333w\" sizes=\"auto, (max-width: 292px) 100vw, 292px\" \/><\/a><\/h6><\/span>\n<span id=\"_24\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_adfsSign_alias.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_adfsSign_alias.jpg\" alt=\"\" title=\"jboss01_keystore_adfsSign_alias\" width=\"262\" height=\"95\" class=\"aligncenter size-full wp-image-9002\" \/><\/a><\/h6><\/span>\n<p>* Save as file name: <strong>jboss01_adfs_sign.jks<\/strong> with password, e.g. Welcome1<\/p>\n<span id=\"_25\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_adfsSign_pass.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_adfsSign_pass-300x96.jpg\" alt=\"\" title=\"jboss01_keystore_adfsSign_pass\" width=\"300\" height=\"96\" class=\"aligncenter size-medium wp-image-9003\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_adfsSign_pass-300x96.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_adfsSign_pass.jpg 356w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* Import ADFS token signing certificate, i.e. <em>adfs2_tokenSigning.cer<\/em> created previously.<br \/>\n&#8211; Select <em>Tools > Import Trusted Certificate&#8230;<\/em><br \/>\n&#8211; Enter Alias: <strong>adfs01-sign<\/strong><\/p>\n<span id=\"_26\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_adfsSign_imp_adfs01-sign.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_adfsSign_imp_adfs01-sign.jpg\" alt=\"\" title=\"jboss01_keystore_adfsSign_imp_adfs01-sign\" width=\"279\" height=\"230\" class=\"aligncenter size-full wp-image-9000\" \/><\/a><\/h6><\/span>\n<p>* Export keystore certificate. The certificate is used as encryption certificate by ADFS2:<br \/>\n&#8211; Right click keystore, select <em>Export<\/em> then select <em>PEM Encoded<\/em>:<\/p>\n<span id=\"_27\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_adfsSign_export.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_adfsSign_export-197x300.jpg\" alt=\"\" title=\"jboss01_keystore_adfsSign_export\" width=\"197\" height=\"300\" class=\"aligncenter size-medium wp-image-9005\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_adfsSign_export-197x300.jpg 197w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/09\/jboss01_keystore_adfsSign_export.jpg 212w\" sizes=\"auto, (max-width: 197px) 100vw, 197px\" \/><\/a><\/h6><\/span>\n<p>* Enter file name: <strong>jboss01_token_enc.cer<\/strong><\/p>\n<span id=\"_28\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_keystore_adfsSign_export_fileName.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_keystore_adfsSign_export_fileName-300x240.jpg\" alt=\"\" title=\"jboss01_keystore_adfsSign_export_fileName\" width=\"300\" height=\"240\" class=\"aligncenter size-medium wp-image-9017\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_keystore_adfsSign_export_fileName-300x240.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_keystore_adfsSign_export_fileName.jpg 601w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"Install_PicketLink_Library_Files\"><h2>Install PicketLink Library Files<\/h2><\/span>\n<span id=\"Copy_Jar_Files_to_JBoss_common_lib_Directory\"><h3>Copy Jar Files to JBoss common lib Directory<\/h3><\/span>\n<p>* Copy following files to $JBOSS_HOME\/common\/lib directory<br \/>\n&#8211; <em>picketlink-core-2.1.8.Final.jar<\/em><br \/>\n&#8211; <em>picketlink-jbas5-2.1.8.Final.jar<\/em><br \/>\n* For JBoss 4.2.2, copy <em>instead<\/em> to <em>$JBOSS_HOME\/server\/default\/lib<\/em> directory:<br \/>\n&#8211; <em>picketlink-core-2.1.8.Final.jar<\/em><br \/>\n&#8211; <em>picketlink-jbas5-2.1.8.Final.jar<\/em><br \/>\n&#8211; <em>jboss-security-spi-3.0.0.Final.jar<\/em><br \/>\n* Setup file permissions:<\/p>\n<pre lang=\"bash\">\r\nchmod 644 picketlink*jar\r\n<\/pre>\n<span id=\"Authorize_PicketLink_jar_Files\"><h3>Authorize PicketLink jar Files<\/h3><\/span>\n<p>* For EAP 5.1, edit <em>$JBOSS_HOME\/bin\/security_cc.policy<\/em> and grant permission to PicketLink jar files:<\/p>\n<pre lang=\"bash\">\r\n\/\/ Picketlink libraries\r\ngrant codeBase \"file:${jboss.home.dir}\/common\/lib\/picketlink-core-2.1.7.jar\" {\r\n   permission java.security.AllPermission;\r\n};\r\ngrant codeBase \"file:${jboss.home.dir}\/common\/lib\/picketlink-jbas5-2.1.7.jar\" {\r\n   permission java.security.AllPermission;\r\n};\r\n<\/pre>\n<span id=\"Configure_PicketLink_Authenticator\"><h3>Configure PicketLink Authenticator<\/h3><\/span>\n<p>* Add to <em>$JBOSS_HOME\/server\/default\/deployers\/jbossweb.deployer\/META-INF\/war-deployers-jboss-beans.xml<\/em> after the <em>BASIC<\/em> entry:<\/p>\n<pre lang=\"xml\">\r\n<entry>\r\n   <key>SAML_FEDERATION<\/key>\r\n   <value>org.picketlink.identity.federation.bindings.tomcat.sp.ServiceProviderAuthenticator<\/value>\r\n<\/entry>\r\n<\/pre>\n<p>* For JBoss 4.2.2, add <em>instead<\/em> to <em>$JBOSS_HOME\/server\/default\/deploy\/jboss-web.deployer\/META-INF\/jboss-service.xml<\/em>:<\/p>\n<pre lang=\"xml\">\r\n\t <java:property>\r\n\t   <java:key>SAML_FEDERATION<\/java:key>\r\n\t   <java:value>org.picketlink.identity.federation.bindings.tomcat.sp.ServiceProviderAuthenticator<\/java:value>\r\n\t<\/java:property>\r\n<\/pre>\n<span id=\"Configure_login.module\"><h3>Configure login.module<\/h3><\/span>\n<p>* Setup a PicketLink SAML2 Login Module by adding to <em>$JBOSS_HOME\/server\/default\/conf\/login-config.xml<\/em>:<\/p>\n<pre lang=\"xml\">\r\n<application-policy name=\"saml-federation-hw\">\r\n  <authentication>\r\n\t<login-module code=\"org.picketlink.identity.federation.bindings.jboss.auth.SAML2LoginModule\" flag=\"required\" \/>\r\n  <\/authentication>\r\n<\/application-policy>\r\n<\/pre>\n<span id=\"Configure_PicketLink_Properties\"><h3>Configure PicketLink Properties<\/h3><\/span>\n<p>* Create a directory named <strong>\/home\/jboss\/picketlink<\/strong> to place PicketLink property file.<br \/>\n* Create a file named <strong>picketlink.properties<\/strong> in the newly created directory with the following content:<\/p>\n<pre lang=\"bash\">\r\n# Identity Provider configuration\r\npicketlink.idp.domain=mytest.local\r\npicketlink.idp.public.fqdn=adfs01.mytest.local\r\npicketlink.idp.public.url=https:\/\/adfs01.mytest.local\/adfs\/ls\/\r\n\r\n# Service Provider configuration\r\npicketlink.sp.public.fqdn=jboss01.mytest.local\r\npicketlink.sp.public.port=8443\r\n\r\n# Trust Store configuration\r\npicketlink.truststore.url=file:\/\/\/home\/jboss\/picketlink\/jboss01_adfs_sign.jks\r\npicketlink.truststore.password=Welcome1\r\npicketlink.truststore.idp.alias=adfs01-sign\r\n<\/pre>\n<p>* Setup file permissions:<\/p>\n<pre lang=\"bash\">\r\nchmod 400 picketlink.properties\r\n<\/pre>\n<p>* Expose picketlink.properties file by adding to <em>$JBOSS_HOME\/server\/default\/deploy\/properties-service.xml<\/em> file&#8217;s <em>SystemPropertiesService<\/em> mbean:<\/p>\n<pre lang=\"xml\">\r\n    <attribute name=\"URLList\">\r\n        \/home\/jboss\/picketlink\/picketlink.properties\r\n    <\/attribute>\r\n<\/pre>\n<span id=\"Copy_ADFS_Signing_Keystore\"><h3>Copy ADFS Signing Keystore<\/h3><\/span>\n<p>* Copy <em>jbooss01_adfs_sign.jks<\/em> to <em>\/home\/jboss\/picketlink<\/em> directory<\/p>\n<span id=\"Configure_WAR_hw.war_Deployment\"><h2>Configure WAR (hw.war) Deployment<\/h2><\/span>\n<span id=\"Create_a_Test_Web_App\"><h3>Create a Test Web App<\/h3><\/span>\n<p>* Create a temp directory to host all files<br \/>\n* Create a jsp file named <strong>default.jsp<\/strong>:<\/p>\n<pre lang=\"xml\">\r\n<html>\r\n<head>\r\n<title>JSP Test<\/title>\r\n<%\r\nString userId = null;\r\nif (request.getUserPrincipal() != null){\r\n  userId = request.getUserPrincipal().getName();\r\n}else{\r\n  userId = request.getRemoteUser();\r\n}\r\n\r\nif (userId == null){\r\n  userId = \"World\";\r\n}\r\n\r\nString message = \"Hello, \" + userId;\r\n%>\r\n<\/head>\r\n<body>\r\n<span id=\"_29\"><h2><%= message%><\/h2><\/span>\r\n<% if (request.isUserInRole(\"SAMLUser\")){ %>\r\n<br\/>\r\nRole: SAMLUser\r\n<%}%>\r\n<br\/>\r\n<a href=\"https:\/\/adfs01.mytest.local\/adfs\/ls\/?wa=wsignout1.0\">Logout<\/a>\r\n<\/body>\r\n<\/html>\r\n<\/pre>\n<p>* Create a new directory named <strong>WEB-INF<\/strong><br \/>\n* Create a new file named <strong>web.xml<\/strong>:<\/p>\n<pre lang=\"xml\">\r\n<web-app>\r\n    <display-name>Hello World<\/display-name>\r\n<\/web-app> \r\n<\/pre>\n<p>* Jar all files into war file:<\/p>\n<pre lang=\"java\">\r\n\"%JAVA_HOME%\\jar\" -cvf hw.war *\r\n<\/pre>\n<p>* Copy hw.war file to <em>$JBOSS_HOME\/server\/default\/deploy<\/em> directory<\/p>\n<pre lang=\"java\">\r\n$JAVA_HOME\/bin\/jar -cvf hw.war *\r\n\r\n# Win\r\n\"%JAVA_HOME%\/bin\/jar\" -cvf hw.war *\r\n<\/pre>\n<p>* Check that page is displayed properly.<\/p>\n<span id=\"Configure_Application_Security_Constraints\"><h3>Configure Application Security Constraints<\/h3><\/span>\n<p>* Add to <em>web.xml<\/em>:<\/p>\n<pre lang=\"xml\">\r\n    <security-constraint>\r\n        <web-resource-collection>\r\n            <web-resource-name>All Pages<\/web-resource-name>\r\n            <url-pattern>\/*<\/url-pattern>\r\n        <\/web-resource-collection>\r\n        <auth-constraint>\r\n            <role-name>SAMLUser<\/role-name>\r\n        <\/auth-constraint>\r\n        <user-data-constraint>\r\n            <transport-guarantee>CONFIDENTIAL<\/transport-guarantee>\r\n        <\/user-data-constraint>\r\n    <\/security-constraint>\r\n\r\n    <security-role>\r\n        <role-name>SAMLUser<\/role-name>\r\n    <\/security-role>\r\n<\/pre>\n<p>* Add to <em>web.xml<\/em> a new constraint to act as SAML <em>Assertion Consumer Service<\/em>.<br \/>\n&#8211; <em>url-pattern<\/em> is not significant and does not map to any actual resource:<\/p>\n<pre lang=\"xml\">\r\n    <security-constraint>\r\n        <web-resource-collection>\r\n            <web-resource-name>SAML HW<\/web-resource-name>\r\n            <url-pattern>\/saml-hw<\/url-pattern>\r\n        <\/web-resource-collection>\r\n        <auth-constraint>\r\n            <role-name>*<\/role-name>\r\n        <\/auth-constraint>\r\n        <user-data-constraint>\r\n            <transport-guarantee>CONFIDENTIAL<\/transport-guarantee>\r\n        <\/user-data-constraint>\r\n    <\/security-constraint>\r\n<\/pre>\n<span id=\"Configure_login_module\"><h3>Configure login module<\/h3><\/span>\n<p>* Add to <em>web.xml<\/em><\/p>\n<pre lang=\"xml\">\r\n    <login-config>\r\n        <auth-method>SAML_FEDERATION<\/auth-method>\r\n        <realm-name>SAML Federation<\/realm-name>\r\n    <\/login-config>\r\n<\/pre>\n<span id=\"Final_web.xml_File\"><h3>Final web.xml File<\/h3><\/span>\n<pre lang=\"xml\">\r\n<web-app>\r\n\t<display-name>Hello World<\/display-name>\r\n    <security-constraint>\r\n        <web-resource-collection>\r\n            <web-resource-name>All Pages<\/web-resource-name>\r\n            <url-pattern>\/*<\/url-pattern>\r\n        <\/web-resource-collection>\r\n        <auth-constraint>\r\n            <role-name>SAMLUser<\/role-name>\r\n        <\/auth-constraint>\r\n        <user-data-constraint>\r\n            <transport-guarantee>CONFIDENTIAL<\/transport-guarantee>\r\n        <\/user-data-constraint>\r\n    <\/security-constraint>\r\n\r\n    <security-constraint>\r\n        <web-resource-collection>\r\n            <web-resource-name>SAML HW<\/web-resource-name>\r\n            <url-pattern>\/saml-hw<\/url-pattern>\r\n        <\/web-resource-collection>\r\n        <auth-constraint>\r\n            <role-name>*<\/role-name>\r\n        <\/auth-constraint>\r\n        <user-data-constraint>\r\n            <transport-guarantee>CONFIDENTIAL<\/transport-guarantee>\r\n        <\/user-data-constraint>\r\n    <\/security-constraint>\r\n\t\r\n    <login-config>\r\n        <auth-method>SAML_FEDERATION<\/auth-method>\r\n        <realm-name>SAML Federation<\/realm-name>\r\n    <\/login-config>\r\n    \r\n\t<security-role>\r\n        <role-name>SAMLUser<\/role-name>\r\n    <\/security-role>\r\n<\/web-app> \r\n<\/pre>\n<span id=\"Update_Security_Domain\"><h3>Update Security Domain<\/h3><\/span>\n<p>* Edit <em>WEB-INF\/jboss-web.xml<\/em> to use PicketLink login module defined previously:<\/p>\n<pre lang=\"xml\">\r\n<?xml version='1.0' encoding='UTF-8' ?>\r\n<!DOCTYPE jboss-web\r\n    PUBLIC \"-\/\/JBoss\/\/DTD Web Application 2.3V2\/\/EN\"\r\n    \"http:\/\/www.jboss.org\/j2ee\/dtd\/jboss-web_3_2.dtd\">\r\n<jboss-web>\r\n   <security-domain>java:\/jaas\/saml-federation-hw<\/security-domain>\r\n<\/jboss-web>\r\n<\/pre>\n<span id=\"Create_WEB-INFcontext.xml_File\"><h3>Create <em>WEB-INF\/context.xml<\/em> File<\/h3><\/span>\n<pre lang=\"xml\">\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<Context>\r\n    <Valve className=\"org.picketlink.identity.federation.bindings.tomcat.sp.ServiceProviderAuthenticator\" \/>\r\n<\/Context>\r\n<\/pre>\n<span id=\"Create_WEB-INFpicketlink.xml_File\"><h3>Create <em>WEB-INF\/picketlink.xml<\/em> File<\/h3><\/span>\n<pre lang=\"xml\">\r\n<PicketLink xmlns=\"urn:picketlink:identity-federation:config:2.1\">\r\n    <PicketLinkSP xmlns=\"urn:picketlink:identity-federation:config:2.1\"\r\n            CanonicalizationMethod=\"http:\/\/www.w3.org\/2001\/10\/xml-exc-c14n#\"\r\n            BindingType=\"POST\"\r\n            IDPUsesPostBindings=\"true\"\r\n            SupportsSignatures=\"true\">\r\n        <IdentityURL>${picketlink.idp.public.url}<\/IdentityURL>\r\n        <ServiceURL>https:\/\/${picketlink.sp.public.fqdn}:${picketlink.sp.public.port}\/hw\/saml-hw<\/ServiceURL>\r\n        <Trust>\r\n            <Domains>${picketlink.idp.domain}<\/Domains>\r\n        <\/Trust>\r\n        <KeyProvider ClassName=\"org.picketlink.identity.federation.core.impl.KeyStoreKeyManager\">\r\n            <Auth Key=\"KeyStoreURL\" Value=\"${picketlink.truststore.url}\"\/>\r\n            <Auth Key=\"KeyStorePass\" Value=\"${picketlink.truststore.password}\"\/>\r\n            <Auth Key=\"SigningKeyAlias\" Value=\"NOTUSED\"\/>\r\n            <Auth Key=\"SigningKeyPass\" Value=\"NOTUSED\"\/>\r\n            <ValidatingAlias Key=\"${picketlink.idp.public.fqdn}\" Value=\"${picketlink.truststore.idp.alias}\"\/>\r\n        <\/KeyProvider>\r\n    <\/PicketLinkSP>\r\n\r\n    <Handlers xmlns=\"urn:picketlink:identity-federation:handler:config:2.1\">\r\n        <Handler class=\"org.picketlink.identity.federation.web.handlers.saml2.SAML2IssuerTrustHandler\" \/>\r\n        <Handler class=\"org.picketlink.identity.federation.web.handlers.saml2.SAML2SignatureValidationHandler\" \/>\r\n        <Handler class=\"org.picketlink.identity.federation.web.handlers.saml2.SAML2LogOutHandler\" \/>\r\n        <Handler class=\"org.picketlink.identity.federation.web.handlers.saml2.SAML2AuthenticationHandler\">\r\n            <Option Key=\"ROLE_KEY\" Value=\"http:\/\/schemas.microsoft.com\/ws\/2008\/06\/identity\/claims\/role\"\/>\r\n        <\/Handler>\r\n        <Handler class=\"org.picketlink.identity.federation.web.handlers.saml2.SAML2AttributeHandler\"\/>\r\n    <\/Handlers>\r\n<\/PicketLink>\r\n<\/pre>\n<p>* Jar all files and deploy to JBoss as described previously.<\/p>\n<span id=\"Create_ADFS_relying_party_named_jboss01-PicketLink\"><h2>Create ADFS relying party named <strong>jboss01-PicketLink<\/strong><\/h2><\/span>\n<p>* Login ADFS server, e.g. <em>adfs01<\/em>, as domain administrator.<br \/>\n* Open AD FS 2.0 console<br \/>\n* Go to <em>AD FS 2.0 > Trust Relationships > Replying Party Trusts<\/em><br \/>\n* Right click and select <em>Add Relying Party Trust&#8230;<\/em><\/p>\n<h3Add Relying Party><\/h3>\n<p>* Click Start on Welcome page:<\/p>\n<span id=\"_30\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_welcome.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_welcome-300x114.jpg\" alt=\"\" title=\"jboss01_adfs2_addRP_welcome\" width=\"300\" height=\"114\" class=\"aligncenter size-medium wp-image-9023\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_welcome-300x114.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_welcome.jpg 994w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* Select <em>Enter data about the relying party manually<\/em><\/p>\n<span id=\"_31\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_manually.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_manually-300x168.jpg\" alt=\"\" title=\"jboss01_adfs2_addRP_manually\" width=\"300\" height=\"168\" class=\"aligncenter size-medium wp-image-9024\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_manually-300x168.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_manually.jpg 713w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* Enter<br \/>\n&#8211; Display name: <strong>jboss01.mytest.local:8443\/hw<\/strong><\/p>\n<span id=\"_32\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_displayName_8443.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_displayName_8443-300x139.jpg\" alt=\"\" title=\"jboss01_adfs2_addRP_displayName_8443\" width=\"300\" height=\"139\" class=\"aligncenter size-medium wp-image-9025\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_displayName_8443-300x139.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_displayName_8443.jpg 711w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* Select AD FS 2.0 profile<\/p>\n<span id=\"_33\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_adfs2Profile.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_adfs2Profile-300x145.jpg\" alt=\"\" title=\"jboss01_adfs2_addRP_adfs2Profile\" width=\"300\" height=\"145\" class=\"aligncenter size-medium wp-image-9026\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_adfs2Profile-300x145.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_adfs2Profile.jpg 661w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* (Skip for now)Configure Certificate by browsing to <em>jboss01_token_enc.cer<\/em><\/p>\n<span id=\"_34\"><h6><\/h6><\/span>\n<p>* Select <em>Enable support for the SAML 2.0 WebSSO protocol<\/em> and enter:<br \/>\n&#8211; Replying party SAML 2.0 SSO service URL: <strong>https:\/\/jboss01.mytest.local:8443\/hw\/saml-hw<\/strong><br \/>\nand click Add button:<\/p>\n<span id=\"_35\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_URL.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_URL-300x164.jpg\" alt=\"\" title=\"jboss01_adfs2_addRP_URL\" width=\"300\" height=\"164\" class=\"aligncenter size-medium wp-image-9027\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_URL-300x164.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_URL.jpg 714w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* On <em>Configure Identifiers<\/em> screen, enter<br \/>\n&#8211; Relying party trust identifier: <strong>https:\/\/jboss01.mytest.local:8443\/hw\/saml-hw<\/strong><\/p>\n<span id=\"_36\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_identifier_8443.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_identifier_8443-300x140.jpg\" alt=\"\" title=\"jboss01_adfs2_addRP_identifier_8443\" width=\"300\" height=\"140\" class=\"aligncenter size-medium wp-image-9029\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_identifier_8443-300x140.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_identifier_8443.jpg 715w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* On Choose Issuance Authorization Rules, select:<br \/>\n&#8211; Permit all users to access this relying party<\/p>\n<span id=\"_37\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_issuance.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_issuance-300x140.jpg\" alt=\"\" title=\"jboss01_adfs2_addRP_issuance\" width=\"300\" height=\"140\" class=\"aligncenter size-medium wp-image-9031\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_issuance-300x140.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_issuance.jpg 714w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* On <em>Ready to Add Trust<\/em> screen, click <strong>Next><\/strong><br \/>\n* On Finish screen, select Open the Edit Claim Rules and click Close<\/p>\n<span id=\"_38\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_finish.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_finish-300x240.jpg\" alt=\"\" title=\"jboss01_adfs2_addRP_finish\" width=\"300\" height=\"240\" class=\"aligncenter size-medium wp-image-9030\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_finish-300x240.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addRP_finish.jpg 716w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* Edit <em>Claim Rules for jboss01.mytest.local\/hw<\/em> opens<\/p>\n<span id=\"_39\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_start.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_start-300x274.jpg\" alt=\"\" title=\"jboss01_adfs2_addClaimRule_start\" width=\"300\" height=\"274\" class=\"aligncenter size-medium wp-image-9035\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_start-300x274.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_start.jpg 489w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"Add_Claim_Rule_for_SAM-Account-Name\"><h3>Add Claim Rule for SAM-Account-Name<\/h3><\/span>\n<p>* Select <em>Issuance Transform Rules<\/em> tab<br \/>\n* Click <em>Add Rule&#8230;<\/em><br \/>\n* Select <em>Send LDAP Attributes as Claims<\/em><\/p>\n<span id=\"_40\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_sam.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_sam-300x74.jpg\" alt=\"\" title=\"jboss01_adfs2_addClaimRule_sam\" width=\"300\" height=\"74\" class=\"aligncenter size-medium wp-image-9033\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_sam-300x74.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_sam.jpg 654w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* Enter:<br \/>\n&#8211; Claim rule name: <strong>Issue SAM-Account-Name<\/strong><br \/>\n&#8211; Attribute store: <strong>Active Directory<\/strong><br \/>\n&#8211; Mapping of LDAP attributes to outgoing claim types:<br \/>\nLDAP Attribute: <strong>SAM-Account-Name<\/strong><br \/>\nOutgoing Claim Type: <strong>http:\/\/mytest.local\/SAM-Account-Name<\/strong><\/p>\n<span id=\"_41\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_sam_detail.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_sam_detail-300x176.jpg\" alt=\"\" title=\"jboss01_adfs2_addClaimRule_sam_detail\" width=\"300\" height=\"176\" class=\"aligncenter size-medium wp-image-9034\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_sam_detail-300x176.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_sam_detail.jpg 713w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"Add_Claim_Rule_for_Name_ID\"><h3>Add Claim Rule for Name ID<\/h3><\/span>\n<p>* Select <em>Issuance Transform Rules<\/em> tab<br \/>\n* Click <em>Add Rule<\/em><br \/>\n* Select <em>Transform an Incoming Claim<\/em> and click <em>Next<\/em>:<\/p>\n<span id=\"_42\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_transformIncomingClaim.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_transformIncomingClaim-300x67.jpg\" alt=\"\" title=\"jboss01_adfs2_addClaimRule_transformIncomingClaim\" width=\"300\" height=\"67\" class=\"aligncenter size-medium wp-image-9036\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_transformIncomingClaim-300x67.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_transformIncomingClaim.jpg 713w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* Configure claim rule:<br \/>\n&#8211; Claim rule name: <strong>Issue Name ID<\/strong><br \/>\n&#8211; Incoming claim type: <strong>http:\/\/mytest.local\/SAM-Account-Name<\/strong><br \/>\n&#8211; Outgoing claim type: <strong>Name ID<\/strong><br \/>\n&#8211; Outgoing name ID format: <strong>Transient Identifier<\/strong><br \/>\n&#8211; Select: <strong>Pass through all claim values<\/strong><\/p>\n<span id=\"_43\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_transformIncomingClaim_detail.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_transformIncomingClaim_detail-300x248.jpg\" alt=\"\" title=\"jboss01_adfs2_addClaimRule_transformIncomingClaim_detail\" width=\"300\" height=\"248\" class=\"aligncenter size-medium wp-image-9037\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_transformIncomingClaim_detail-300x248.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_transformIncomingClaim_detail.jpg 551w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* Click <em>Finish<\/em><\/p>\n<span id=\"Add_Claim_Rule_for_Role\"><h3>Add Claim Rule for Role<\/h3><\/span>\n<p>* Still on Issuance Transform Rules tab<br \/>\n* Click Add Rule&#8230;<br \/>\n* Select <em>Send Group Membership as a Claim<\/em>:<\/p>\n<span id=\"_44\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_sendGrp.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_sendGrp-300x124.jpg\" alt=\"\" title=\"jboss01_adfs2_addClaimRule_sendGrp\" width=\"300\" height=\"124\" class=\"aligncenter size-medium wp-image-9038\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_sendGrp-300x124.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_sendGrp.jpg 718w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* Configure claim rule:<br \/>\n&#8211; Claim rule name: <strong>Issue SAMLUser<\/strong><br \/>\n&#8211; User&#8217;s group: <strong>MYTEST\\SAML Group<\/strong> (note this is an <em>existing<\/em> group in MYTEST domain)<br \/>\n&#8211; Outgoing claim type: <strong>Role<\/strong><br \/>\n&#8211; Outgoing claim value: <strong>SAMLUser<\/strong> (note that this need to match the role as defined in web application&#8217;s <em>web.xml<\/em> file)<\/p>\n<span id=\"_45\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_sendGrp_detail.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_sendGrp_detail-300x164.jpg\" alt=\"\" title=\"jboss01_adfs2_addClaimRule_sendGrp_detail\" width=\"300\" height=\"164\" class=\"aligncenter size-medium wp-image-9039\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_sendGrp_detail-300x164.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_sendGrp_detail.jpg 713w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* Click <em>Finish<\/em><br \/>\n* Click <em>OK<\/em> to add the newly configured Relying Party. Three rules are shown:<\/p>\n<span id=\"_46\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_overviewl.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_overviewl-300x86.jpg\" alt=\"\" title=\"jboss01_adfs2_addClaimRule_overviewl\" width=\"300\" height=\"86\" class=\"aligncenter size-medium wp-image-9040\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_overviewl-300x86.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_addClaimRule_overviewl.jpg 481w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"Add_SAML_Logout_Endpoint\"><h3>Add SAML Logout Endpoint<\/h3><\/span>\n<p>* From AD FS 2.0 console, go to <em>AD FS 2.0 > Trust Relationships > Relying Party Trusts<\/em><br \/>\n* Right click <em>jboss01.mytest.local:8443\/hw<\/em> relying party and select <em>Properties<\/em><br \/>\n* Select <em>Endpoints<\/em> tab and click <em>Add<\/em><br \/>\n* On Add an Endpoint screen, enter:<br \/>\n&#8211; Endpoint type: <em>SAML Logout<\/em><br \/>\n&#8211; Binding = <em>POST<\/em><br \/>\n&#8211; URL: <em>https:\/\/jboss01.mytest.local:8443\/hw\/signout.jsp<\/em> # This is the application logout page and should not be protected.<br \/>\n&#8211; Response URL: &lt;Can be left empty&gt;<\/p>\n<span id=\"_47\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_add_LogoutEndPoint2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_add_LogoutEndPoint2-300x296.jpg\" alt=\"\" title=\"jboss01_adfs2_add_LogoutEndPoint2\" width=\"300\" height=\"296\" class=\"aligncenter size-medium wp-image-9059\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_add_LogoutEndPoint2-300x296.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_add_LogoutEndPoint2.jpg 621w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* Click <em>OK<\/em> twice.<br \/>\n* Add logout URL on web site logout link: <em>https:\/\/adfs01.mytest.local\/adfs\/ls\/?wa=wsignout1.0<\/em><\/p>\n<span id=\"Test\"><h2>Test<\/h2><\/span>\n<p>* Import <em>MytestRootCA.cer<\/em> as <em>Trusted Root Certificate Authorities<\/em><br \/>\n* Point browser to <a href=\"https:\/\/jboss01.mytest.local:8443\/hw\">https:\/\/jboss01.mytest.local:8443\/hw\/default.jsp<\/a><br \/>\n* Enter username and password when prompted.<br \/>\n&#8211; Note that you will not be prompted for username and password if you logged into a domain computer.<\/p>\n<span id=\"_48\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_test_signin.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_test_signin-300x165.jpg\" alt=\"\" title=\"jboss01_adfs2_test_signin\" width=\"300\" height=\"165\" class=\"aligncenter size-medium wp-image-9052\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_test_signin-300x165.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_test_signin.jpg 424w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<p>* The page is displayed:<\/p>\n<span id=\"_49\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_test_loggedin.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_test_loggedin.jpg\" alt=\"\" title=\"jboss01_adfs2_test_loggedin\" width=\"175\" height=\"110\" class=\"aligncenter size-full wp-image-9053\" \/><\/a><\/h6><\/span>\n<p>* Click the Logout link, ADFS logout page is displayed:<\/p>\n<span id=\"_50\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_test_loggedout.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_test_loggedout-300x127.jpg\" alt=\"\" title=\"jboss01_adfs2_test_loggedout\" width=\"300\" height=\"127\" class=\"aligncenter size-medium wp-image-9054\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_test_loggedout-300x127.jpg 300w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2013\/10\/jboss01_adfs2_test_loggedout.jpg 613w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h6><\/span>\n<span id=\"IDP_Initiated_Sign_on_URL\"><h3>IDP Initiated Sign on URL<\/h3><\/span>\n<p>* <a href=\"https:\/\/adfs01.mytest.local\/adfs\/ls\/IdpInitiatedSignOn.aspx\">https:\/\/adfs01.mytest.local\/adfs\/ls\/IdpInitiatedSignOn.aspx<\/a><\/p>\n<span id=\"SAML_Tracer\"><h3>SAML Tracer<\/h3><\/span>\n<p>* Install SAML Tracer Addon for Firefox<br \/>\n* Open SAML Tracer console from <em>Tools > SAML tracer<\/em><br \/>\n* Example:<\/p>\n<pre lang=\"xml\">\r\n<samlp:Response ID=\"_4d71a2dd-b0b9-4e19-a0c1-a1718adb6f1f\"\r\n                Version=\"2.0\"\r\n                IssueInstant=\"2013-10-01T23:41:10.278Z\"\r\n                Destination=\"https:\/\/jboss01.mytest.local:8443\/hw\/saml-hw\"\r\n                Consent=\"urn:oasis:names:tc:SAML:2.0:consent:unspecified\"\r\n                InResponseTo=\"ID_8af19346-3479-4eac-9076-2b37f6d2c31f\"\r\n                xmlns:samlp=\"urn:oasis:names:tc:SAML:2.0:protocol\"\r\n                >\r\n    <Issuer xmlns=\"urn:oasis:names:tc:SAML:2.0:assertion\">http:\/\/adfs01.mytest.local\/adfs\/services\/trust<\/Issuer>\r\n    <samlp:Status>\r\n        <samlp:StatusCode Value=\"urn:oasis:names:tc:SAML:2.0:status:Success\" \/>\r\n    <\/samlp:Status>\r\n    <Assertion ID=\"_610520ab-d49d-49cc-95fb-c82bcf555af8\"\r\n               IssueInstant=\"2013-10-01T23:41:10.277Z\"\r\n               Version=\"2.0\"\r\n               xmlns=\"urn:oasis:names:tc:SAML:2.0:assertion\"\r\n               >\r\n        <Issuer>http:\/\/adfs01.mytest.local\/adfs\/services\/trust<\/Issuer>\r\n        <ds:Signature xmlns:ds=\"http:\/\/www.w3.org\/2000\/09\/xmldsig#\">\r\n            <ds:SignedInfo>\r\n                <ds:CanonicalizationMethod Algorithm=\"http:\/\/www.w3.org\/2001\/10\/xml-exc-c14n#\" \/>\r\n                <ds:SignatureMethod Algorithm=\"http:\/\/www.w3.org\/2001\/04\/xmldsig-more#rsa-sha256\" \/>\r\n                <ds:Reference URI=\"#_610520ab-d49d-49cc-95fb-c82bcf555af8\">\r\n                    <ds:Transforms>\r\n                        <ds:Transform Algorithm=\"http:\/\/www.w3.org\/2000\/09\/xmldsig#enveloped-signature\" \/>\r\n                        <ds:Transform Algorithm=\"http:\/\/www.w3.org\/2001\/10\/xml-exc-c14n#\" \/>\r\n                    <\/ds:Transforms>\r\n                    <ds:DigestMethod Algorithm=\"http:\/\/www.w3.org\/2001\/04\/xmlenc#sha256\" \/>\r\n                    <ds:DigestValue>M2oIWu3zrkQxt8t\/ARsSkape8m3nUNb8u0F9OiSVqy0=<\/ds:DigestValue>\r\n                <\/ds:Reference>\r\n            <\/ds:SignedInfo>\r\n            <ds:SignatureValue>aLInCoeyPfAA5Yt+ppCCr0vR4c2\/g2gFf8WtosdzNQgeewwhTNGQKF+DIK3OpkhiIlHZ8v58S+QO5DH5KeJ8NjuhIgujVNIbDev6+6eneIuXVx2HUZZwH8zhdj\/MT8Pir0BQq8\/BtC8wHzDWmyxmRH0fJ8rZ479ODJzqABWxdkPhkDoiIRiCrjCyZekGnwVlfi9tCVCs1Xs50txkOTpbQLODQf4PyLWzhZPghcNkrR1M8r9e+J3\/mtGAQHKeHI\/Ih\/WRic+nDHpPKi4PBAUZFcwQCkqku2SrQXecQJ3eLfZA6ujYJHSWHzoMuTFFRLY0Hnuwc3sMmZLbxLx7asrJVQ==<\/ds:SignatureValue>\r\n            <KeyInfo xmlns=\"http:\/\/www.w3.org\/2000\/09\/xmldsig#\">\r\n                <ds:X509Data>\r\n                    <ds:X509Certificate>MIIC4jCCAcqgAwIBAgIQaJY2+PWHmZxBo3mRmD1JCzANBgkqhkiG9w0BAQsFADAtMSswKQYDVQQDEyJBREZTIFNpZ25pbmcgLSBhZGZzMDEubXl0ZXN0LmxvY2FsMB4XDTEzMDkyODIzNDQxMloXDTE0MDkyODIzNDQxMlowLTErMCkGA1UEAxMiQURGUyBTaWduaW5nIC0gYWRmczAxLm15dGVzdC5sb2NhbDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKuuRT6vQ+XuzEq69yGlIsyttykycdOOf85VEZ7OKnFMN4H6zpp+OrjhFI4GBhjBIrX+BcgGauan18DPOs9mVl7AYS1iLtZay6cJ\/Nz8O5m66TPiB+k07pu6SdE23WOzxVotf6jwY8b+9DtDcy6ck3yCUBIHIpJ8dgn7we4\/yPFWY5ARHBJ0s5rsP2sDO3SQNz2ZZ9bKZxePnoScFDoM5mK0BOBqQuxGKi\/YtF+JdfYG5V1OuHlx3Oe0Ybyx9xSKdP1NAjbvWMrN3SptbBLixOguXTEkfAzYB6UZKi183yElV\/VogMGixRVu38a4R3w4yyXlYcshH7hwP07L4+hodTUCAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAolGuUbbv+d0E3OvjCDunOJVznYSAnca3HBToWItwHbM0MvXaft\/Kq+CV+vrPuaVM+n\/RJndqzMY5PUDAInOmVM72BGyKhgl8C899PfClsLcKBLQJciTRHRekLLv66wp2lFlF3VVaRc+U+6tQFW62l2ITAdyPp34NEk5TQVBh9A5L03WdMkiWJzXRGob8lTuFmBc15FUFE+noqT5Q+EP8LU5t54\/KaEr+9vLNqR6pCJePemHOZLXcxozSmMUEuCfi551g875TBT88feSVWBuW6FqfrTFPD9i4Lub5TjDPZ0S9zHuePzFjJ6KvLadtDva+r4aNV+NUR5UT5loJcVnqVQ==<\/ds:X509Certificate>\r\n                <\/ds:X509Data>\r\n            <\/KeyInfo>\r\n        <\/ds:Signature>\r\n        <Subject>\r\n            <NameID Format=\"urn:oasis:names:tc:SAML:2.0:nameid-format:transient\">Jimmy.Li<\/NameID>\r\n            <SubjectConfirmation Method=\"urn:oasis:names:tc:SAML:2.0:cm:bearer\">\r\n                <SubjectConfirmationData InResponseTo=\"ID_8af19346-3479-4eac-9076-2b37f6d2c31f\"\r\n                                         NotOnOrAfter=\"2013-10-01T23:46:10.278Z\"\r\n                                         Recipient=\"https:\/\/jboss01.mytest.local:8443\/hw\/saml-hw\"\r\n                                         \/>\r\n            <\/SubjectConfirmation>\r\n        <\/Subject>\r\n        <Conditions NotBefore=\"2013-10-01T23:41:09.507Z\"\r\n                    NotOnOrAfter=\"2013-10-02T00:41:09.507Z\"\r\n                    >\r\n            <AudienceRestriction>\r\n                <Audience>https:\/\/jboss01.mytest.local:8443\/hw\/saml-hw<\/Audience>\r\n            <\/AudienceRestriction>\r\n        <\/Conditions>\r\n        <AttributeStatement>\r\n            <Attribute Name=\"http:\/\/mytest.local\/SAM-Account-Name\">\r\n                <AttributeValue>Jimmy.Li<\/AttributeValue>\r\n            <\/Attribute>\r\n            <Attribute Name=\"http:\/\/schemas.microsoft.com\/ws\/2008\/06\/identity\/claims\/role\">\r\n                <AttributeValue>SAMLUser<\/AttributeValue>\r\n            <\/Attribute>\r\n        <\/AttributeStatement>\r\n        <AuthnStatement AuthnInstant=\"2013-10-01T23:41:09.455Z\"\r\n                        SessionIndex=\"_610520ab-d49d-49cc-95fb-c82bcf555af8\"\r\n                        >\r\n            <AuthnContext>\r\n                <AuthnContextClassRef>urn:federation:authentication:windows<\/AuthnContextClassRef>\r\n            <\/AuthnContext>\r\n        <\/AuthnStatement>\r\n    <\/Assertion>\r\n<\/samlp:Response>\r\n<\/pre>\n<span id=\"PicketLink_Logging_Level\"><h3>PicketLink Logging Level<\/h3><\/span>\n<p>* Replace log4j jar file in the <em>server\/default\/lib<\/em> directory with <em>log4j-1.2.17.jar<\/em><br \/>\n* For JBoss 4.2.2, logging file is <em>server\/default\/conf\/jboss-log4j.xml<\/em><br \/>\n* Duplicate <em>CONSOLE<\/em> appender and name it <strong>CONSOLE2<\/strong>.<br \/>\n&#8211; Also set <em>Threshold<\/em> value to <strong>TRACE<\/strong>:<\/p>\n<pre lang=\"xml\">\r\n   <appender name=\"CONSOLE2\" class=\"org.apache.log4j.ConsoleAppender\">\r\n      <errorHandler class=\"org.jboss.logging.util.OnlyOnceErrorHandler\"\/>\r\n      <param name=\"Target\" value=\"System.out\"\/>\r\n      <param name=\"Threshold\" value=\"TRACE\"\/>\r\n\r\n      <layout class=\"org.apache.log4j.PatternLayout\">\r\n         <!-- The default pattern: Date Priority [Category] Message\\n -->\r\n         <param name=\"ConversionPattern\" value=\"%d{ABSOLUTE} %-5p [%c{1}] %m%n\"\/>\r\n      <\/layout>\r\n   <\/appender>\r\n<\/pre>\n<p>* Set logging level to <strong>TRACE<\/strong> for <em>org.picketlink<\/em> category and <em>appender<\/em> to <strong>CONSOLE2<\/strong>:<\/p>\n<pre lang=\"xml\">\r\n   <category name=\"org.picketlink\">\r\n      <priority value=\"TRACE\" \/>\r\n      <appender-ref ref=\"CONSOLE2\"\/>\r\n   <\/category>\r\n<\/pre>\n<span id=\"Issues\"><h2>Issues<\/h2><\/span>\n<span id=\"keytool_Import_Error\"><h3>keytool Import Error<\/h3><\/span>\n<p>* I copied ADFS signing certificate from ADFS metadata URL (https:\/\/hostname\/federationmetadata\/2007-06\/federationmetadata.xml) and tried to do an import with<\/p>\n<pre lang=\"bash\">\r\nkeytool -import -v -keystore samTrust.jks -alias adfs -sotrepass changeit -file adfs_sign.cer\r\n<\/pre>\n<p>* Error message:<\/p>\n<pre lang=\"bash\">\r\nkeytool error: java.lang.Exception: Input not an x.509 certificate\r\n<\/pre>\n<p>* Solution: enclose the copied token signing certificate with<\/p>\n<pre lang=\"bash\">\r\n-----BEGIN CERTIFICATE-----\r\ntoken signing cert string goes here\r\n-----END CERTIFICATE-----\r\n<\/pre>\n<span id=\"MSIS7004\"><h3>MSIS7004<\/h3><\/span>\n<p>* Error message in <em>Event Viewer > Application and Services > AD FS 2.0 > Admin<\/em>:<\/p>\n<pre>\r\nIdentityServer.Protocols.WSTrust.StsConnectionException: MSIS7004: An exception occurred while connecting to the federation service\r\n<\/pre>\n<p>* Solutions:<br \/>\n&#8211; I got this error because all my ADFS 2.0 certificates (IIS cert, signing cert, encryption cert) expired. You need to renew all certificates. See <a href=\"?p=7261#Renew_Certificates\">this post<\/a> on how to renew ADFS 2.0 certificates.<br \/>\n&#8211; Also you need to enable net.tcp protocol for IIS sites. See this <a href=\"https:\/\/social.msdn.microsoft.com\/Forums\/vstudio\/en-US\/b6ab634b-71b8-46eb-9a49-d33113678aba\/adfs-20-and-the-msis7004-exception?forum=Geneva\">discussion<\/a> and quoted here:<\/p>\n<pre>\r\nYou need to add net.tcp to the enabled protocols of your site. Go to IIS Manager, right-click on your website, go to 'Manage Web Site' or 'Manage Application', then to 'Advanced Settings...'. There you see 'Enabled Protocols'. It probably says http. Change it to http,net.tcp\r\n<\/pre>\n<p>.<\/p>\n<span id=\"References\"><h2>References<\/h2><\/span>\n<p>* <a href=\"http:\/\/www.jboss.org\/picketlink\/downloads\">PicketLink Download<\/a><br \/>\n* <a href=\"http:\/\/docs.jboss.org\/picketlink\/2\/2.1.7.Final\/reference\/html_single\/\">PicketLink 2.1.7 Doc<\/a><br \/>\n* <a href=\"http:\/\/docs.jboss.org\/jbossidentity\/docs\/guides\/identity-fed\/UserGuide\/pdf\/UserGuide.pdf\">UserGuide.pdf<\/a><br \/>\n* <a href=\"https:\/\/community.jboss.org\/wiki\/SecurityFAQ\">JBoss SecurityFAQ<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Environment * JBoss 5.1.0.GA or JBoss 4.2.2.GA * Centos version: [root@jboss01 ~]# cat \/etc\/redhat-release CentOS release 5.7 (Final) [root@jboss01 ~]# uname -m x86_64 * Java version: java version &#8220;1.6.0_24&#8221; OpenJDK Runtime Environment (IcedTea6 1.11.11.90) (rhel-1.41.1.11.11.90.el5_9-x86_64) OpenJDK 64-Bit Server VM (build &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=8956\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[346,30],"tags":[275,448,450,449],"class_list":["post-8956","post","type-post","status-publish","format-standard","hentry","category-adfs","category-jboss","tag-ad","tag-adfs2","tag-jboss5-1","tag-saml2"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-2ks","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/8956","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8956"}],"version-history":[{"count":58,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/8956\/revisions"}],"predecessor-version":[{"id":11217,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/8956\/revisions\/11217"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8956"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8956"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8956"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}