In the previous part, we have setup a new AD FS 4.0 external farm and see some configuration changes with this new version. Now we will see how publish Application using both the AD FS Server and the Web Application Proxy role.
-
There is now more Preauthentication method in AD FS 4.0. Each have different objective and can be used on different purpose. Hereunder a table showing these usage:
These new methods include also new PowerShell CMDLet and new options in Publish New Application Wizard
For this demonstration, we have setup an Anonymous IIS website with a default.HTML in our Internal Network. The website has no certificate and no binding : http://web.contoso.local:4001 Objectives :
Add-WebApplicationProxyApplication `
-BackendServerUrl
'http://internal.contoso.local:8888'
`
-ExternalCertificateThumbprint
'057D644B7721BEEBD93C9E051200DE53C53F4D82'
-EnableHTTPRedirect:$true `
-ExternalUrl
'https://public.contoso.com'
-Name
'Contoso - Web Anonymous HTTP'
-ExternalPreAuthentication PassThrough
By default, the port 80 will not be authorized externally for a Workgroup computer. Only the appproxysvc can query this URL. > Netsh http show urlacl Reserved URL : http://public.contoso.com:80/ User: NT SERVICE\appproxysvc Listen: Yes Delegate: No
If you want to use the HTTP-to-HTTPS redirection in WAP 4.0, you will need to configure the Windows Firewall with a new rule: (don't completely disable the firewall, it's dangerous out there). Maybe this will be automatic in future release of Windows Server 2016.
If you have no SSL Requirement, you can also publish HTTP content with the WebApplication Proxy 4.0. (http://public.contoso.com)
'http://internal.contoso.local:8888' `
'http://public.contoso.com' `
'Contoso - Web Anonymous HTTP Only' `
So, when the security guy was asking : "Can you give me which Client IP made a request on our public website on %date%? You were looking at your shoes and say : The Reverse Proxy IP of course ! Today, WebApplicationProxy send by default the X-Forwarded-For to the backend application. So you should look after this header in the backend Application. However, you still need to capture this header ! Here an example with our previous IIS Anonymous Website :
For testing, make some request to https://public.contoso.com (Published with WAP); and restart IIS for the log drop. 2016-04-30 00:00:00 192.168.0.150 / - 8888 - 192.168.1.250 Mozilla/5.0+(Windows+NT+10.0;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko - 200 0 0 0 194.88.160.45
You will now have : - 192.168.0.150 as the Server-IP(Aka IIS) - 192.168.1.250 as the Client-IP (Aka the Reverse Proxy) - 194.88.160.45 as the Real-Client-IP (Aka X-Forwarded-For)
For this example, nothing is very new if you have already used the WebApplicationProxy Role for publishing a SharePoint Server Note : We assume you have configured SharePoint for Claims Based Authentication and it work with AD FS. Default Zone : (Internal & Public URL) : https://extranet.contoso.com with Claims Authentication (in-brief)
'https://extranet.contoso.com' `
'
'https://extranet.contoso.com'
"CONTOSO_SharePoint_Extranet'
-ExternalPreAuthentication
'ADFS'
-ADFSRelyingPartyName
'SharePoint 2013 - Extranet HTTPS'