Class Krb5TokenUtils


  • public class Krb5TokenUtils
    extends java.lang.Object
    Support class that implements all the low level Kerberos security calls
    Author:
    Martin Swales, Claudio Corsi
    • Constructor Summary

      Constructors 
      Constructor Description
      Krb5TokenUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static byte[] decodeDataFromStream​(java.io.DataInput in)  
      static void encodeDataToStream​(byte[] data, java.io.DataOutput out)  
      static javax.security.auth.Subject generateSecuritySubject​(java.lang.String jassLoginConfig, java.lang.String username, java.lang.String password)  
      static byte[] initiateSecurityContext​(javax.security.auth.Subject subject, java.lang.String servicePrincipalName)  
      static java.lang.String validateSecurityContext​(javax.security.auth.Subject subject, byte[] serviceTicket)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Krb5TokenUtils

        public Krb5TokenUtils()
    • Method Detail

      • generateSecuritySubject

        public static javax.security.auth.Subject generateSecuritySubject​(java.lang.String jassLoginConfig,
                                                                          java.lang.String username,
                                                                          java.lang.String password)
                                                                   throws javax.security.auth.login.LoginException
        Throws:
        javax.security.auth.login.LoginException
      • initiateSecurityContext

        public static byte[] initiateSecurityContext​(javax.security.auth.Subject subject,
                                                     java.lang.String servicePrincipalName)
                                              throws org.ietf.jgss.GSSException
        Throws:
        org.ietf.jgss.GSSException
      • validateSecurityContext

        public static java.lang.String validateSecurityContext​(javax.security.auth.Subject subject,
                                                               byte[] serviceTicket)
                                                        throws org.ietf.jgss.GSSException
        Throws:
        org.ietf.jgss.GSSException
      • encodeDataToStream

        public static void encodeDataToStream​(byte[] data,
                                              java.io.DataOutput out)
                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • decodeDataFromStream

        public static byte[] decodeDataFromStream​(java.io.DataInput in)
                                           throws java.lang.Exception
        Throws:
        java.lang.Exception