sun.security.mule.jgss
Class GSSUtil

java.lang.Object
  extended by sun.security.mule.jgss.GSSUtil

public class GSSUtil
extends Object

The GSSUtilImplementation that knows how to work with the internals of the GSS-API.


Field Summary
static int CALLER_ACCEPT
           
static int CALLER_HTTP_NEGOTIATE
           
static int CALLER_INITIATE
           
static int CALLER_SSL_CLIENT
           
static int CALLER_SSL_SERVER
           
static int CALLER_UNKNOWN
           
static Oid GSS_KRB5_MECH_OID
           
static Oid GSS_KRB5_MECH_OID2
           
static Oid GSS_SPNEGO_MECH_OID
           
static Oid NT_GSS_KRB5_PRINCIPAL
           
static Oid NT_HOSTBASED_SERVICE2
           
 
Constructor Summary
GSSUtil()
           
 
Method Summary
static Oid createOid(String oidStr)
           
static String getMechStr(Oid oid)
           
static Subject getSubject(GSSName name, GSSCredential creds)
          Note: The current impl only works with Sun's impl of GSSName and GSSCredential since it depends on package private APIs.
static boolean isKerberosMech(Oid oid)
           
static boolean isSpNegoMech(Oid oid)
           
static Subject login(int caller, Oid mech)
          Authenticate using the login module from the specified configuration entry.
static Vector searchSubject(GSSNameSpi name, Oid mech, boolean initiate, Class credCls)
          Searches the private credentials of current Subject with the specified criteria and returns the matching GSSCredentialSpi object out of Sun's impl of GSSCredential.
static boolean useMSInterop()
          Determines the SPNEGO interoperability mode with Microsoft; by default it is set to true.
static boolean useSubjectCredsOnly(int caller)
          Determines if the application doesn't mind if the mechanism obtains the required credentials from outside of the current Subject.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GSS_KRB5_MECH_OID

public static final Oid GSS_KRB5_MECH_OID

GSS_KRB5_MECH_OID2

public static final Oid GSS_KRB5_MECH_OID2

GSS_SPNEGO_MECH_OID

public static final Oid GSS_SPNEGO_MECH_OID

NT_GSS_KRB5_PRINCIPAL

public static final Oid NT_GSS_KRB5_PRINCIPAL

NT_HOSTBASED_SERVICE2

public static final Oid NT_HOSTBASED_SERVICE2

CALLER_UNKNOWN

public static final int CALLER_UNKNOWN
See Also:
Constant Field Values

CALLER_INITIATE

public static final int CALLER_INITIATE
See Also:
Constant Field Values

CALLER_ACCEPT

public static final int CALLER_ACCEPT
See Also:
Constant Field Values

CALLER_SSL_CLIENT

public static final int CALLER_SSL_CLIENT
See Also:
Constant Field Values

CALLER_SSL_SERVER

public static final int CALLER_SSL_SERVER
See Also:
Constant Field Values

CALLER_HTTP_NEGOTIATE

public static final int CALLER_HTTP_NEGOTIATE
See Also:
Constant Field Values
Constructor Detail

GSSUtil

public GSSUtil()
Method Detail

createOid

public static Oid createOid(String oidStr)

isSpNegoMech

public static boolean isSpNegoMech(Oid oid)

isKerberosMech

public static boolean isKerberosMech(Oid oid)

getMechStr

public static String getMechStr(Oid oid)

getSubject

public static Subject getSubject(GSSName name,
                                 GSSCredential creds)
Note: The current impl only works with Sun's impl of GSSName and GSSCredential since it depends on package private APIs.


login

public static Subject login(int caller,
                            Oid mech)
                     throws LoginException
Authenticate using the login module from the specified configuration entry.

Parameters:
caller - the caller of JAAS Login
mech - the mech to be used
Returns:
the authenticated subject
Throws:
LoginException

useSubjectCredsOnly

public static boolean useSubjectCredsOnly(int caller)
Determines if the application doesn't mind if the mechanism obtains the required credentials from outside of the current Subject. Our Kerberos v5 mechanism would do a JAAS login on behalf of the application if this were the case. The application indicates this by explicitly setting the system property javax.security.auth.useSubjectCredsOnly to false.


useMSInterop

public static boolean useMSInterop()
Determines the SPNEGO interoperability mode with Microsoft; by default it is set to true. To disable it, the application indicates this by explicitly setting the system property sun.security.spnego.interop to false.


searchSubject

public static Vector searchSubject(GSSNameSpi name,
                                   Oid mech,
                                   boolean initiate,
                                   Class credCls)
Searches the private credentials of current Subject with the specified criteria and returns the matching GSSCredentialSpi object out of Sun's impl of GSSCredential. Returns null if no Subject present or a Vector which contains 0 or more matching GSSCredentialSpi objects.



Copyright © 2013. All Rights Reserved.