Required tools :- setspn - For adding/deleting/listing SPN entries
kerbtray - For checking the list of kerberos tickets granted. This will help us to know if kerberos is working. Get this from
hereWireshark - Another way to find out if kerberos is working
Use IE 7.0 if you want to avoid lot of pain. Also, its better to run kerberized site on port 80.
This scenario is where we need backend to be kerberos enabled. So when we access the site the authentication will be done silently using kerberos.
The sample setup I had
Server - myserver.xyz.com
Client - client0
Here are some prerequisites -
client0 should be in the same domain as the Server (myserver). In my case myserver itself was the domain controller. So I had DC and IIS on the same machine.
myserver name is resolvable from the client. In my case myserver also had DNS running which resolved the name myserver So client was set to use DNS server as myserver
Create a domain user (say user1) and login to client machine using the domain user login. In my case, logged into client using user1 credentials.
Settings to be done at IIS side1. Open IIS manager
2. Click the Directory Security or File Security tab, and then, in the Authentication and access control section, click Edit.
3. In the Authenticated access section, select the Windows Integrated Authentication check box.
4. Click OK
Now, in IIS manager click on Websites node and check the identifier for the website to be "kerberized". In my case it is 694446059.
Use the following command
C:\Inetpub\AdminScripts>cscript adsutil.vbs get w3svc//root/NTAuthenticationProviders (replace identifier by your site identifier. In my case 694446059)
and verify that it gives the parameter "NTAuthenticationProviders" set to "Negotiate". If not set it to Negotiate by
C:\Inetpub\AdminScripts>cscript adsutil.vbs set w3svc//root/NTAuthenticationProviders "Negotiate"Now we need to set SPN. SPN is in the following format
SPN:HTTP/<fqdn> <iis computer-name>
Set the SPN using "setspn -A <SPN>" command. In my case,
setspn -A HTTP/myserver.xyz.com myserverSettings to be done on Domain Controller (DC):
I didn't find these setting necessary but it is mentioned in some websites.
- Under Active Directory Users and Computers ->
-> Computers, Select the web server, right click ->Properties
Make sure that "Trust Computer for delegation" is selected.
- Domain account (user1) is trusted for delegation
- Is a member of IIS_WPG group on the local IIS computer
- Has "Act as a part of Operating System"/"Impersonate a client after authentication" privileges.
Settings on IE:
- Add the URL to "Local Intranet Zone". In IE 7.0, you just need to have "Automatically detect intranet Sites" checked under Tools->internet Options -> Security->Sites
-Under Tools -> Internet Options -> Advanced Tab
enable Integrated Windows Authentication
Now login to client as domain user and checkout the website. If kerberos is setup correctly no password would be asked and you should get the website. If password is asked it means Windows is falling back to NTLM.
To verify that kerberos is actually being used, you may use the kerbtray tool.
Double click on the kerbtray tool. A green icon comes up in the system tray.
Right click on the icon and say list tickets. It should list ticket granted to http service and the details of it.
You may also run wireshark while accessing the website and filter the traffic by http later. Open the HTTP section of the packet and look for keywords GSS-API and SPNEGO.