This article will discuss on how to publish SharePoint 2013 using Kerberos constrained delegation. I find that it works better than claimed-based authentication as users logged in using claimed-based authentication are identified by their email address instead of their actual name. Before publishing SharePoint 2013, we need the following components ready:
- At least one AD FS server installed on the Windows Server 2012 R2 operating system.
- At least one Web Application Proxy server installed on the Windows Server 2012 R2 operating system.
Configuring AD FS server
To configure a AD FS server, please read Deploying a Federation Server Farm. The installation and configuring of AD FS server is rather straight forward and simple. However, when I first try to deploy one, I find it hard to understand the certificate requirement as I can't actually picture the deployment scheme discussed.
To simplify the understanding of AD FS deployment, I come up with the following list:
- You need a public FQDN for your AD FS server. The certificate used to on your AD FS server must be enrolled with the public FQDN.
- Since the AD FS server will be enrolled with a certificate with a public subject name, it is recommend that you configure a split DNS infrastructure if you are hosting external DNS internally. Split DNS infrastructure can be configured using DNS Manager by creating a zone for each of the public FQDN and add an unnamed host to the internal IP for each zone.
- Zone: company.com
- Zone: fs.company.com
- Host A: (same as parent folder) - 192.168.20.1
- Zone: enterprise.company.com
- Host A: (same as parent folder) - 192.168.20.1
- Zone: sharepoint.company.com
- Host A: (same as parent folder) - 192.168.20.2
- The Web Application Proxy server must be enrolled with the same certificate used by the AD FS. Since it would be facing the Internet, it will be publishing itself using the AD FS server FQDN.
- Do not assign the certificate in IIS. AD FS 3.0 does not use IIS anymore.
Configuring Web Application Proxy server
To configure a Web Application Proxy server, please read Step 1 and Step 2 of Configure Publishing Applications through Web Application Proxy.
Preparing SharePoint 2013 for Kerberos constrained delegation
Step 1: Service Principle Name (SPN)
Before configuring the SPN for the SharePoint server, you'll need to figure out the account used to run the site by following the steps below:
- Start IIS Manager.
- Expand the IIS server.
- Expand Sites.
- Click on your SharePoint site.
- On the right panel, click Advanced Settings...
- Make a note on the Application Pool, and press Cancel.
- Click on Application Pools on the left panel.
- Look for the application pool from step 6 and make a note on its Identity. This is the name of the account used to run the site.
- Run "cmd" as Administrator.
- Execute, setspn -q http/<SharePoint internal FQDN>
- If nothing is returned then we can continue with setting the SPN. Else, you'll need to delete the existing record using the -d option.
- Run "cmd" as Administrator.
- Execute, setspn -a http/<SharePoint internal FQDN> <account>
- setspn -a http/sharepoint.mydomain.local mydomain\spWebPool
- Execute, setspn -a http/<SharePoint internal host> <account>
- setspn -a http/sharepoint mydomain\sbWebPool
- To verify, execute, setspn -q http/<SharePoint internal FQDN>
- setspn -q http/sharepoint.mydomain.local
- You should see two records.
Step 2: Trust for delegation
You now need to configure the SharePoint server for trust for delegation.- Start Active Directory Users and Computers on your Domain Controller.
- Browse to the SharePoint server account.
- Right click on it and choose Properties.
- Click on the Delegation tab and select Trust this computer for delegation to any service (Kerberos only).
- Click OK.
Step 3: SharePoint site authentication
On the SharePoint 2013 server,- Start SharePoint 2013 Central Administration.
- Click on Application Management followed by Manage web applications.
- Click on your site and click Authentication Providers in the Security ribbon.
- Click the available zone.
- Navigate to Claim Authentication Types and change the Integrated Windows authentication to Negotiate (Kerberos).
- Click Save.
- It'll take some time for SharePoint to reload the services, so the form would stay there. It will eventually closed after all the services being reloaded. While waiting for it to close, you can continue with the next step.
- Start IIS Manager.
- Select your SharePoint site and double-click on Authentication in the IIS section.
- Select Windows Authentication and click Providers...
- Add Negotiate into the Enabled Providers list and move it to the top.
- Click OK
Step 4: Verify Kerberos is working
On the SharePoint 2013 server,- Start Event Viewer.
- Expand Windows Log and select Services.
- On any machine, browse to you SharePoint site.
- Back to the Event Viewer, refresh the view and look for Event ID 4624.
- A successful logged on with Kerberos in both Logon Process and Authentication Package indicate the successful configuration.
Creating Relaying Party Trusts
On the AD FS server,- Start AD FS Management.
- Expand Trust Relationships and select Relaying Party Trusts.
- On the right panel, click on Add Non-Claims-Aware Relaying Party Trust...
- Proceed to Configure Identifiers.
- You can practically enter any string you like but to be on the safe side, enter the internal URL to your SharePoint site.
- https://sharepoint.mydomain.local
- Complete the wizard.
- Click Edit Issuance Authorization Rules... on the right panel.
- To permit all users, choose Permit All Users.
- To permit selected groups, choose Permit or Deny Users Based on an Incoming Claims and select Group SID for the Incoming claim type.
- After completing the form, click Finish.
Publish the SharePoint site
On the Web Application Proxy server,- Start Remote Access Management Console.
- Select Web Application Proxy on the left panel.
- Click Publish on the right panel.
- On the Preauthentication page, select Active Directory Federation Services (AD FS).
- On the Relying Party page, select the relying party you've created.
- On the Publishing Settings page,
- External URL: Enter the external URL
- External Certificate: Select the certificate that correspond to the external URL
- Backend server URL: Enter the internal URL. (Preferable the same as External URL. You'll need to configure split DNS for this to work properly.)
- Backend server SPN: Enter the SPN using the SharePoint server internal name. Example, http/sharepoint.internaldomain.local
- Complete the wizard