Extract principal on server side from outToken/KRB_AP_REQ

Hey,

I have a Kerberos SSO application with JAAS/JGSSAPI according to the tutorial which can be found here: http://java.sun.com/j2se/1.4.2/docs/guide/security/jgss/single-signon.html

Mutual authentication with initSecContext() and acceptSecContext() works fine. Now, on the server side, I would like to extract the principal from the outToken. In Kerberos terms this means the KRB_AP_REQ message which is generated by initSecContext() and send to the server.

Is there any possibility to get the principal's name from this byte array?

[559 byte] By [Santacruzshoresa] at [2008-2-19]
# 1
After successful JAAS authentication using Kerberos, the JAAS Subject will be populated with the Kerberos Principal name. Seema
Seema-1a at 2007-7-11 > top of java,Security,Kerberos & Java GSS (JGSS)...
# 2
Don't you have to use GSSUtil.createSubject on the server side to obtain a Subject, from which the principal name of the client can be obtained?Alec
alec_gilchrista at 2007-7-11 > top of java,Security,Kerberos & Java GSS (JGSS)...