6

Im trying to do a Asp.net MVC , using Kerberos authentication. So far i haven't found a good example of how to implement this.

How do i implement something like a user getting access to a API server(where i would get the info to display on the page, such as list of users, lists of files etc) with Kerberos on ASP.net

Many of the websites i see have retired content or are outdate, like this one https://msdn.microsoft.com/en-us/library/ff649207.aspx

Also does Kerberos uses the windows account credentials or can it be any other?

For now i just have a ASP.net MVC default template created with visual studio 2013, (when creating the project i tick the use windows authentication) when i run the page, i get a Hello, domain\user! ).

Sorry if it seems a silly question but i don´t know where to start.

Thought
  • 5,326
  • 7
  • 33
  • 69
  • Is your question about how to get Kerberos to authenticate the user to the site? – tgolisch Sep 01 '15 at 16:59
  • Yes. Right now like i said i just have the template ASP MVC with windows authentication. I dont know where to configure kdc SPN , and how to make it authenticate – Thought Sep 01 '15 at 17:26

1 Answers1

5

The Kerberos stuff isn't configured via MVC, it is handled on IIS. From IIS (Authentication), make sure "Windows Authentication" is enabled (anonymous is disabled) and (select "Windows Authentication", click "Providers" (right)) "Negotiate", means [Try Kerberos and if that doesn't work, fall-back-to NTLM].

Here is another S/O answer that talks about configuring your web.config to set up authentication. https://stackoverflow.com/a/4336423/283895

If you need help setting up Kerberos, or some code examples for getting the authenticated user info, etc. Microsoft has some good docs on this page (Steps 1-3). https://msdn.microsoft.com/en-us/library/ms998355.aspx

Community
  • 1
  • 1
tgolisch
  • 6,549
  • 3
  • 24
  • 42
  • OK ill check it out, im not sure where i define my kdc and SPN – Thought Sep 01 '15 at 19:57
  • Have you already configured your Kerberos rights in Active Directory? That is where SPN and KDC is usually configured. Follow the link (above) in the Microsoft article, Step 2. it gives detailed instructions. – tgolisch Sep 02 '15 at 13:38