25. IIS7 – See MS KB 958473</li></li></ul><li>Logon Process<br />
26. KDC<br />
27. KDC<br />
28. KDC<br />SPN<br />
29. KDC<br />
30. Access Web Site<br />
31. 401<br />
32. SPN<br />
34. TroubleshootingKerberos Demos<br />
35. Delegation<br />
37. Demo<br />
38. FBA<br />Kerberos<br />
39. Demo<br />
40. References<br /><ul><li>Ken Schaefer’s Multi-Part Kerberos Blog Posts:http://www.adopenstatic.com/cs/blogs/ken/archive/2006/10/20/512.aspx
41. What Is Kerberos Authentication?http://technet.microsoft.com/en-us/library/cc780469%28WS.10%29.aspx
42. How the Kerberos Version 5 Authentication Protocol Workshttp://technet.microsoft.com/en-us/library/cc772815%28WS.10%29.aspx
43. Explained: Windows Authentication in ASP.NET 2.0http://msdn.microsoft.com/en-us/library/ff647076.aspx</li></li></ul><li>References<br /><ul><li>Kerberos Authentication Tools and Settingshttp://technet.microsoft.com/en-us/library/cc738673%28WS.10%29.aspx
44. How To: Use Protocol Transition and Constrained Delegation in ASP.NET 2.0http://msdn.microsoft.com/en-us/library/ff649317.aspx
47. <ul><li>Kerberos is an open authentication protocol. Kerberos v5 was invented in 1993 at MIT.
48. Authentication is the process of proving your identity to a remote system.
49. Your identity is who you are, and authentication is the process of proving that. In many systems your identity is your username, and you use a secret shared between you and the remote system (a password) to prove that your identity.
50. User password is encrypted as the user key. User key is stored in credentials cache. Once the logon session key is received, the user key is discarded.
51. Service password is encrypted as the service key.
52. KDCs are found through a DNS query. Service registered in DNS by DCs.</li></li></ul><li><ul><li>Showing detail behind what is happening inside of KDC but for day-to-day, use can just remember KDC
53. Another reason for simplification: encryption upon encryption upon encryption…just remember it is encrypted
54. This is a Windows-centric Kerberos presentation
55. Load balanced solutions need service account
56. All web applications hosted using the same SPN have to be hosted with the same account
57. Use A records, not CNAME records</li></li></ul><li><ul><li>Terms
58. Key Distribution Center (KDC) – In Windows AD, KDC lives on domain controllers (DC), KDCs share a long term key across all DCs.
59. KDC security account database – In Windows, it is Active Directory
60. Authorization Service (AS) – part of the KDC
61. Ticket Granting Service (TGS) – part of the KDC
62. Ticket Granting Ticket (TGT) - A user's initial ticket from the authentication service, used to request service tickets, and meant only for use by the ticket granting service. Keeps the user from having to enter password each time a ticket is requested.</li></li></ul><li>Tickets<br /><ul><li>Ticket Granting Ticket (TGT)
63. A user's initial ticket from the authentication service
64. Used to request service tickets
65. Meant only for use by the ticket-granting service.
66. Service ticket for the KDC (service class = krbtgt)
67. Service Ticket
68. Enables the ticket-granting service (TGS) to safely transport the requester's credentials to the target server or service.</li></li></ul><li>Tools<br /><ul><li>Knowledge
78. Have user logon and logoff if they don’t regularly: TGTs are only renewable for so long and then they expire (7 day default), then password has to be re-entered.
79. Remember that authenticators contain the current time. Check for time sync issues.</li></li></ul><li><ul><li>Common Issues
80. Missing SPN
81. Duplicate SPN
82. SPN assigned to wrong service account
83. Times are out of sync
84. Client TGT expired (7 days)
85. IE and non-default ports
86. Kerberos very chatty (see MS KB </li></li></ul><li><ul><li>Request TGT (Remember there is even more complexity)</li></ul>User (client) logs into workstation entering their password.<br />Client builds an authentication service request containing the user’s username (KPN), the SPN of the TGS, and encrypts the current time using the user’s password as an authenticator.<br />Client sends these three items to the KDC.<br />KDC get user’s password from AD, decrypts time and verifies it is valid.<br />AS generates a logon session key and encrypts with the user’s password. AS generates a service ticket which contains a logon session key and the user’s KPN encrypted with the AS shared key. This is a special service ticket called a Ticket Granting Ticket (TGT).<br />
87. <ul><li>Request TGT (Remember there is even more complexity)</li></ul>KDC sends both to the client.<br />Client decrypts logon session key using its password and stores the logon session key in cache. The client stores the TGT in cache.<br />
88. <ul><li>Access Service (Remember there is even more complexity)</li></ul>User (client) encrypts the current time using the logon session key in cache creating an authenticator and sends the authenticator, the user’s KPN, the name of the target service (SPN), and the TGT to the TGS.<br />TGS decrypts the TGT using its shared key to access the logon session key. The logon session key is used to decrypt the authenticator and confirms the time is valid. <br />TGS extracts the user’s KPN from the TGT. TGS generates a service session key and encrypts the service session key using the logon session key. TGS uses server session key to generate service ticket and encrypts it using service’s password.<br />TGS sends service session key and the service ticket to the client.<br />
89. <ul><li>Access Service (Remember there is even more complexity)</li></ul>Client decrypts service session key using cached logon session key, adds current time (as well as other items), and encrypts with the service session key to create an authenticator.<br />Client sends ticket and authenticator to remote server which runs service. <br />Service decrypts service ticket accessing the server session key and the KPN. Using the service session key, the service decrypts the authenticator and confirms the current time is valid. A Windows access token is generated<br />(Optional) If client requests mutual authentication, service encrypts current time using the service session key creating an authenticator and sends to the client.<br />Clients decrypts authenticator and validates time.<br />
90. Troubleshooting Tools<br /><ul><li>Patience – Test methodically and
91. Knowledge - Know your Forests, Domains, Trusts, Functional Levels…get a basic lay of the land.
92. Always test from a different machine than the web server or domain controller!
94. Windows Security Logs
95. Windows 2008 ADUC
97. Netmon and Fiddler
98. IIS Logs and IIS7 Failed Request Tracing
99. Kerberos Logging
100. Event Logging and/or Debug Logs</li></li></ul><li>Common Issues that break Kerberos<br /><ul><li>Times are out of sync – authenticators contain current time
101. Missing SPN
102. Duplicate SPN
103. SPN assigned to wrong service account
104. IIS Providers are incorrect (For IIS 5 or 6, see http://support.microsoft.com/kb/215383)