English 中文(简体)
Mixed authentication modes: send both Kerberos token and username token over HTTPs with WCF
原标题:

Is it possible to send both username token and the kerberos token over HTTPs with WCF?

We are able to use custom binding with authentication mode set to UserNameOverTransport , which will include a username token in the SOAP header as per OASIS web services security standard.

Alternatively can set the authentication mode to KerberosOverTransport , which will include a Kerberos token in the SOAP header.

However the service we are trying to communicate has a requirement to authenticate use both kerberos token & username token. It doesn t seem to be possible with the existing authentication modes.

问题回答

The token (which is a Kerberos token) actually has the username embedded in it. So if you need to communicate with a service that requires both then you ll want to use KerberosOverTransport.

You ll then want to pass the token to the constructor of WindowsIdentity which asks for an IntPtr.

Once you have it constructed you can access the username via the name property. A piece of code that is almost what you need (sans the logging in bits) can be found here:

http://kseesharp.blogspot.com/2009/04/c-create-windowsidentity-from-userid.html





相关问题
ajax login using httpRequest?

I am trying to develop my login script to give feedback to the user if the login is valid or not. Basically if it isn t correct a div box will show saying its wrong, if its correct it will show its ...

Remotely authenticating client Windows user on demand

Suppose I am writing a server for a particular network protocol. If I know that the client is running on a Windows machine, is it possible for my server to authenticate the Windows user that owns the ...

Role/Permission based forms authorizing/authentication?

While looking into forms authorizing/authentication, I found that it is possible to do role based authorizing by adding an array of roles to a FormsAuthenticationTicket. That way I can write User....

热门标签