Thursday, October 31, 2013

Kerberos token for a given spn

I am using the code below to get a Kerberos token to be later injected into a SAML assertion.

what I get back is a GSS wrapped Kerberos ticket, but what I need is an MIT File Credential Cache Kerberos ticket.


I haven't found an alternate way to retrieve a Kerberos token given a specific spn and user credentials. 99% ot the articles are about consuming one or using it as a WS ( not applicable to my case )


Any help or pointers are greatly appreciated



KerberosSecurityTokenProvider k1 = new KerberosSecurityTokenProvider(spn, System.Security.Principal.TokenImpersonationLevel.Impersonation, new System.Net.NetworkCredential(userName, password, domain));

KerberosRequestorSecurityToken T1 = k1.GetToken(TimeSpan.FromMinutes(1)) as KerberosRequestorSecurityToken;

sret = Convert.ToBase64String(T1.GetRequest());







No comments:

Post a Comment