{"id":11678,"date":"2016-10-19T18:59:05","date_gmt":"2016-10-19T23:59:05","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=11678"},"modified":"2017-10-25T20:45:28","modified_gmt":"2017-10-26T01:45:28","slug":"openam12-iis-7-web-policy-agent","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=11678","title":{"rendered":"OpenAM12: IIS 7 Web Policy Agent"},"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=\"#Install_IIS_7\">Install IIS 7<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Create_IIS_Agent_Profile\">Create IIS Agent Profile<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Install_OpenAM_Agent\">Install OpenAM Agent<\/a>\n\t\t<ol class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Interactive_Install\">Interactive Install<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Silent_Install\">Silent Install<\/a>\n\t\t\t<\/li>\n\t\t<\/ol>\n\t<li>\n\t\t<a href=\"#Web_Site_Authentication\">Web Site Authentication<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Test\">Test<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Agentadmin_Commands\">Agentadmin Commands<\/a>\n\t\t<ol class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#List_Web_Sites\">List Web Sites<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#List_Installed_Agents\">List Installed Agents<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Disable_Agent\">Disable Agent<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Enable_Agent\">Enable Agent<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Remove_Agent\">Remove Agent<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Remove_All_Agent\">Remove All Agent<\/a>\n\t\t\t<\/li>\n\t\t<\/ol>\n\t<li>\n\t\t<a href=\"#References\">References<\/a>\n\t<\/li>\n<\/ol>\n<\/ol>\n<\/div>\n<div class='wptoc-end'>&nbsp;<\/div>\n<span id=\"Install_IIS_7\"><h2>Install IIS 7<\/h2><\/span>\n<p>* OS: Windows 2008R2<br \/>\n* Add roles:<br \/>\nWeb Server (IIS) with:<br \/>\n&#8211; <strong>Application Development<\/strong><br \/>\n* Add to <em>hosts <\/em>file:<\/p>\n<pre lang=\"bash\">\r\n192.168.1.7 openam.my.com\r\n192.168.1.35 iis7.my.com\r\n<\/pre>\n<span id=\"Create_IIS_Agent_Profile\"><h2>Create IIS Agent Profile<\/h2><\/span>\n<p>* Login OpenAM<br \/>\n* Go to : <em>Access Control > \/ (Top Level Realm) > Agents > Web<\/em> tab<br \/>\n* Add a new Web agent named <strong>IIS7<\/strong>:<br \/>\n&#8211; Note that you need to specify port number in both Server and Agent URL even for default ports 80 and 443<\/p>\n<span id=\"\"><h6><a href=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2016\/10\/OpenAM_IISAgent_Profile_1.jpg\" rel=\"attachment wp-att-11688\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2016\/10\/OpenAM_IISAgent_Profile_1.jpg\" alt=\"openam_iisagent_profile_1\" width=\"732\" height=\"273\" class=\"aligncenter size-full wp-image-11688\" srcset=\"https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2016\/10\/OpenAM_IISAgent_Profile_1.jpg 732w, https:\/\/jianmingli.com\/wp\/wp-content\/uploads\/2016\/10\/OpenAM_IISAgent_Profile_1-300x112.jpg 300w\" sizes=\"auto, (max-width: 732px) 100vw, 732px\" \/><\/a><\/h6><\/span>\n<p>* Select new agent and enable <em>SSO Only Mode<\/em><br \/>\n* If web server is behind a load balancer then<br \/>\n&#8211; Go to Advanced tab<br \/>\n&#8211; Select <em>all <\/em>Load Balancer options<\/p>\n<span id=\"Install_OpenAM_Agent\"><h2>Install OpenAM Agent<\/h2><\/span>\n<p>* Download IIS Web Policy Agent, e.g. <em>IIS_WINNT_64bit_4.0.0.zip<\/em>, from ForgeRock <a href=\"https:\/\/backstage.forgerock.com\/#!\/downloads\/OpenAM\/Web%20Policy%20Agents\/4.0.0\/Microsoft%20IIS%20(64-bit)\/?platformName=Microsoft%20IIS&#038;platformVersion=7%20and%208&#038;platformOs=Windows&#038;platformArchitecture=64-bit#list\">download <\/a>site.<br \/>\n* Unzip <em>iis_agent<\/em> folder to, e.g. <em>C:\\prog<\/em>, directory<br \/>\n* For SSL support (e.g. OpenAM uses HTTPS),<br \/>\n&#8211; Download pre-compiled openssl for Windows, e.g. from <a href=\"https:\/\/indy.fulgan.com\/SSL\/\">here<\/a>, e.g. <em>openssl-1.0.2k-x64_86-win64.zip<\/em>.<br \/>\n&#8211; Copy following Openssl dll files:<br \/>\nlibeay32.dll<br \/>\nssleay32.dll<br \/>\nto:<br \/>\nC:\\Windows\\SysWOW64 (for 32 bit Openssl)<br \/>\nC:\\Windows\\system32 (for 64 bit Openssl)<br \/>\n&#8211; Run <em>iisreset<\/em> in order for IIS to pickup Openssl dll files<br \/>\n* Create a new password file named <em>iis7pass.txt<\/em>. Enter password in the file, e.g. Wx1<br \/>\n* Open a privileged command window<br \/>\n* Go to <em>C:\\prog\\iis_agent\\bin<\/em> <\/p>\n<span id=\"Interactive_Install\"><h3>Interactive Install<\/h3><\/span>\n<pre lang=\"bash\">\r\nagentadmin.exe --i\r\n\r\nInstallation parameters:\r\n\r\n   OpenAM URL: http:\/\/openam.my.com:8080\/openam\r\n   Agent URL: http:\/\/iis7.my.com:80\r\n   Agent Profile name: IIS7\r\n   Agent realm\/organization name: \/\r\n   Agent Profile password source: C:\\prog\\iis_agent\\iis7pass.txt\r\n\r\nConfirm configuration (yes\/no): [no]: yes\r\nValidating...\r\nValidating... Success.\r\nCleaning up validation data...\r\nCreating configuration...\r\nInstallation complete.\r\n<\/pre>\n<p>* Don&#8217;t forget iisreset<\/p>\n<span id=\"Silent_Install\"><h3>Silent Install<\/h3><\/span>\n<pre lang=\"bash\">\r\n# Find which site to install agent into\r\nagentadmin.exe --n\r\nIIS Server Site configuration:\r\n\r\nNumber of Sites: 1\r\n\r\nid: 1   name: \"DEFAULT WEB SITE\"\r\n\r\n# Silent install\r\nagentadmin.exe --s \"1\" \"http:\/\/openam.my.com:8080\/openam\" \"http:\/\/iis7.my.com:80\" \"\/\" \"IIS7\" \"C:\\prog\\iis_agent\\iis7pass.txt\" --changeOwner --acceptLicence\r\n<\/pre>\n<p>* Don&#8217;t forget iisreset<\/p>\n<span id=\"Web_Site_Authentication\"><h2>Web Site Authentication<\/h2><\/span>\n<p>* Login IIS server<br \/>\n* Open IIS Manager<br \/>\n* Select the web site<br \/>\n* Enable anonymous authentication type for the site<br \/>\n* Disable all other authentication types for the site<\/p>\n<span id=\"Test\"><h2>Test<\/h2><\/span>\n<p>* Point browser to agent URL, e.g. <a href=\"http:\/\/iis7.my.com:80\">http:\/\/iis7.my.com:80<\/a><br \/>\n* You&#8217;ll be prompted to login OpenAM<br \/>\n* Once logged in, you&#8217;re redirected to agent site<\/p>\n<span id=\"Agentadmin_Commands\"><h2>Agentadmin Commands<\/h2><\/span>\n<span id=\"List_Web_Sites\"><h3>List Web Sites<\/h3><\/span>\n<pre lang=\"bash\">\r\nagentadmin.exe --n\r\nIIS Server Site configuration:\r\n\r\nNumber of Sites: 1\r\n\r\nid: 1   name: \"DEFAULT WEB SITE\"\r\n<\/pre>\n<span id=\"List_Installed_Agents\"><h3>List Installed Agents<\/h3><\/span>\n<pre lang=\"bash\">\r\nagentadmin.exe --l\r\n\r\nOpenAM Web Agent configuration instances:\r\n\r\n   id:            agent_1\r\n   configuration: C:\\prog\\iis_agent\\bin\\..\\instances\\agent_1\r\n   server\/site:   2\r\n<\/pre>\n<span id=\"Disable_Agent\"><h3>Disable Agent<\/h3><\/span>\n<p>* This does not work in version 4.0.0<\/p>\n<pre lang=\"bash\">\r\nagentadmin.exe --d agent_1\r\n<\/pre>\n<span id=\"Enable_Agent\"><h3>Enable Agent<\/h3><\/span>\n<pre lang=\"bash\">\r\nagentadmin.exe --e agent_1\r\n\r\nEnabling agent_1 module configuration in site 2... Done.\r\n<\/pre>\n<span id=\"Remove_Agent\"><h3>Remove Agent<\/h3><\/span>\n<pre lang=\"bash\">\r\nagentadmin.exe --r agent_1\r\n\r\nWarning! This procedure will remove agent_1 configuration from IIS Site 2.\r\n\r\nContinue (yes\/no): [no]: y\r\n\r\nRemoving agent_1 configuration...\r\n\r\nRemoving agent_1 configuration... Done.\r\n<\/pre>\n<span id=\"Remove_All_Agent\"><h3>Remove All Agent<\/h3><\/span>\n<pre lang=\"bash\">\r\nagentadmin.exe --g\r\n<\/pre>\n<span id=\"References\"><h2>References<\/h2><\/span>\n<p>* <a href=\"https:\/\/backstage.forgerock.com\/#!\/docs\/openam-web-policy-agents\/4\">Documentation<\/a><br \/>\n* <a href=\"https:\/\/backstage.forgerock.com\/#!\/docs\/openam-policy-agents\/4.0.0\/web-users-guide\">Users Guide<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Install IIS 7 * OS: Windows 2008R2 * Add roles: Web Server (IIS) with: &#8211; Application Development * Add to hosts file: 192.168.1.7 openam.my.com 192.168.1.35 iis7.my.com Create IIS Agent Profile * Login OpenAM * Go to : Access Control > &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=11678\">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":true,"_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":[6,720],"tags":[513,721],"class_list":["post-11678","post","type-post","status-publish","format-standard","hentry","category-iis","category-openam","tag-iis7","tag-openam"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-32m","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/11678","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=11678"}],"version-history":[{"count":14,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/11678\/revisions"}],"predecessor-version":[{"id":12074,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/11678\/revisions\/12074"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11678"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11678"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11678"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}