- Home
- Single Sign-On and MFA
- EmpowerID WAM
- Current: Configuring the Web application for the Reverse Proxy
Configuring the Web application for the Reverse Proxy
After creating the Reverse Proxy WAM application, the protected URLs, and the OAuth application, the last step to enable EmpowerID to protect the AndysBeans application is to add the necessary key/value pairs to the application's Web.config file as described below. Not all of these key/value pairs are used with AndysBeans. For example, the EidInitializeIdentityAssemblyInfo key is used to override the default logic of the Agent for setting the HttpContext Identity. However, we have included these optional keys here for your information.
To configure the Web application for the EmpowerID Reverse Proxy
From the Navigation Sidebar of the EmpowerID Web interface, navigate to the SAML Connections page by expandingAdmin and clicking SAML. Search for the reverse proxy application you created for AndysBeans and locate the ACS URL as well as the User Entered URL. Copy the GUID at the end of the ACS URL as well as the User Entered URL. You will need to add these values to the AndysBeans Web.config file. From Windows Explorer, navigate to your Web application folder and open theWeb.config file with any text editor. In the Web.config file, navigate to <appSettings> and add the following key/value pairs: certificateThumbprintForEncryption - This is the thumbprint of the certificate that the SAML request uses to deserialize the requested URL when the agent is in SAML mode. This thumbprint must be from the certificate used when creating the SSO Connection for your Web application. This setting is not needed when using the Reverse Proxy. EidInitializeIdentityAssemblyInfo: This allows you to override the default logic for setting the HttpContext Identity. (HttpContext is the object that contains all the information about an individual HTTP request.) To override this, you need to create your own assembly with an interface that implementsIInitializeUserIdentity and then set this value to that of your custom assembly.The syntax for this setting is as follows:
<add key="EidInitializeIdentityAssemblyInfo" value="AssemblyTest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/<
The syntax for this setting is as follows, where "YourWebServer" is the FQDN of the server hosting your Web application and "YourSSOConnection" is the name of the SSO Connection you created for your protected Web application.
<add key="eidIdpUrl" value="https://YourWebServer/WebIDPForms/Login/YourSSOConnection"/>
The syntax for this setting is as follows:
<add key="EidSlidingExpirationTimeout" value="60"/>
The syntax for this setting is as follows:
<add key="EnableEventLogging" value="false">
The syntax for this setting is as follows:
<add key="HTTPMODULEAuthorizationEncryptionSalt" value="11021"/>
The syntax for this setting is as follows:
<add key="HTTPMODULEIdentityPrincipalType" value="Forms"/>
The syntax for this setting is as follows:
<add key="HTTPMODULEEnablePathAuthorization" value="true">
The syntax for this setting is as follows:
<add key="HTTPModuleTokenMode" value="Forms"/>
The syntax for this setting is as follows, where /home/error is the location of the custom pagae on AndysBeans for displaying errors:
<add key="HTTPMODULEErrorUrl" value="http://sso.empowerid.com:8080/AndysBeans/home/error"/>
The syntax for this setting is as follows:
<add key="HTTPMODULENotAuthorizedUrl" value="https://sso.empowerid.com:8080/AndysBeans/home/unauthorized/">
The syntax for this setting is as follows:
<add key="RedirectUrlGuid" value="42f07925-1b7b-48a0-b48b-a431cca0f133">
After you have completed the above, your <appSettings> section of your configuration file should contain the following key/value pairs and look similar to the below image.
In the config file, navigate to the <system.webServer> section and add the following under <modules runAllManagedModulesForAllRequests="true">. Make sure the Net version matches the version of the .NET assembly you received from EmpowerID (Net35 or Net45).<add name="EidAuthenticationHeaderModule" type="TheDotNetFactory.EmpowerID.Web.Core.Modules.EidAuthenticationHeaderModule, TheDotNetFactory.EmpowerID.Web.Net45.Modules, Version=4.0.0.0, Culture=neutral"/>
The <system.webServer> section should now look similar to the following image.
Save your changes and reset IIS.Now that we have configured the AndysBeans Web.config file for use with the agent only, we cantest the Web agent.
- Related Topics
Concepts:
- Understanding EmpowerID Web Access Management
- Understanding the Reverse Proxy
- About the Sample Web Application
Administrative Procedures:
- Installing the EmpowerID Reverse Proxy
- Creating a Reverse Proxy WAM app for the Sample App
- Creating an OAuth app for the Reverse Proxy
- Configuring the Reverse Proxy for the Sample App
- Configuring the Sample App for the Reverse Proxy
- Testing WAM
References: