all groups > dotnet security > august 2005 >
You're in the

dotnet security

group:

Implementing Kerberos Authentication


Implementing Kerberos Authentication bkj
8/25/2005 9:13:08 AM
dotnet security:
Hi

I am developing ASP.Net(Internet) application. I am using Active
directory for storing and authenticating users. I want to use Forms
Authentication

Can I implement Kerberos authentication ?
Can I simulate the windows login from ASP.net code?

Is this Achievable?

Any Ideas????
Re: Implementing Kerberos Authentication Dominick Baier [DevelopMentor]
8/25/2005 11:29:37 AM
Hello bkj,

there are at least two ways

a) use LDAP to authenticate against AD
b) call LogonUser in your application

---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

[quoted text, click to view]


Re: Implementing Kerberos Authentication Joe Kaplan (MVP - ADSI)
8/25/2005 8:09:55 PM
The big question here is "why" though? There is already a built in
mechanism to support Kerberos authentication through the browser and Windows
auth in IIS and ASP.NET. I never understand why people want to kill
themselves trying to get the same stuff to work well with Forms auth. It is
so much extra work.

Joe K.

"Dominick Baier [DevelopMentor]" <dbaier@pleasepleasenospamdevelop.com>
[quoted text, click to view]

Re: Implementing Kerberos Authentication Dominick Baier [DevelopMentor]
8/25/2005 10:43:18 PM
Hello Joe,

you are right - thats the other questions - i started answering the first
one :)


---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

[quoted text, click to view]


Re: Implementing Kerberos Authentication bkj
8/26/2005 1:30:18 AM
Hi Guys,

Thanks for the replies

I am using LDAP to authenticate user against the active directory. It
is working fine.
If I use LogonUserA method will it login user to the domain and create
kerberos tickets.

I understand it is so much extra work.The user does not like use
windows login screen appearing when they go the website. They need
pretty forms insted. That is why i am using forms authentication.

Is there any major security threats in doing so?

Thanks and Regards
Biju
Re: Implementing Kerberos Authentication bkj
8/26/2005 7:31:15 AM
Hi Joe,

Thanks for the reply.

The scenario is users will be accessing my web application and at some
point they need to go to a document library setup in sharepoint portal
server03. users dont want to be challenged for security here again as
they have logged in already.we need apply user level security in
sharepoint as well to control what each of them has access to.

I was lead to belive that if we generate Kerberos tickets then i can
Impersonate that onto ASP.NET worker process, so each request made
there after will be under the logged in users credentials. Is this the
case?

Basically, I need the requests to the application and sharepoint to be
under the logged in users credential.

Is this acheivable??

If I follow this model what are security risks I am facing?

Thanks and regards
Biju
Re: Implementing Kerberos Authentication Joe Kaplan (MVP - ADSI)
8/26/2005 8:59:47 AM
The major issue from my standpoint is that you need to call LogonUser on
every single request that comes through the pipeline in order to have a
token for each request. Doing that means you need the user's plain text
password, so you need to store that securely somewhere. You basically need
to use session state or a cookie and just try to make that secure.

Alternately, you could try to cache the user's token somehow and reuse that
in between requests.

LogonUser will use the Negotiate protocol to the log the user in the local
machine, so that should use Kerberos if possible although it may fall back
to NTLM.

Why is it that you need Kerberos tickets out of curiosity?

Joe K.

[quoted text, click to view]

Re: Implementing Kerberos Authentication Joe Kaplan (MVP - ADSI)
8/26/2005 12:15:09 PM
If you use the LogonUser API and use an option that provides network
credentials, then you should be able to impersonate the resulting token and
use that to access SharePoint via a web service call or HttpWebRequest.
Also, if you have their plain text password, you don't even need to
impersonate. Just create an appropriate NetworkCredentials object and
associate it with the web request.

You should only need Kerberos delegation if you are using Windows
authentication on your application with IWA and want to access SharePoint
via impersonation.

Joe K.


[quoted text, click to view]

AddThis Social Bookmark Button