APIdia Launch Partner
Top Description Constructors Methods
sun.security.jgss.krb5

public Class Krb5Util

extends Object
Class Inheritance
Imports
javax.security.auth.kerberos.KerberosTicket, .KerberosPrincipal, .KeyTab, javax.security.auth.Subject, javax.security.auth.login.LoginException, sun.security.jgss.GSSUtil, .GSSCaller, sun.security.krb5.Credentials, .EncryptionKey, .KrbException, .KerberosSecrets, .PrincipalName, java.io.IOException

Utilities for obtaining and converting Kerberos tickets.

Constructor Summary

AccessConstructor and Description
private
Krb5Util()

Default constructor

Method Summary

Modifier and TypeMethod and Description
public static KerberosTicket
credsToTicket(Credentials serviceCreds)

pack-priv static KerberosTicket
getInitialTicket(GSSCaller caller, String clientPrincipal)

Retrieves the initial TGT corresponding to the client principal from the Subject in the specified AccessControlContext.

public static ServiceCreds
getServiceCreds(GSSCaller caller, String serverPrincipal)

Retrieves the ServiceCreds for the specified server principal from the Subject in the specified AccessControlContext.

pack-priv static KerberosTicket
getServiceTicket(GSSCaller caller, String clientPrincipal, String serverPrincipal)

Retrieves the ticket corresponding to the client/server principal pair from the Subject in the specified AccessControlContext.

public static String
keyInfo(byte[] data)

public static EncryptionKey[]

Returns:

the EKeys, never null, might be empty
keysFromJavaxKeyTab
(KeyTab
the javax..KeyTab object
ktab
,
PrincipalName
the PrincipalName
cname
)

A helper method to get EncryptionKeys from a javax..KeyTab

public static KeyTab

Returns:

the sun..KeyTab object
snapshotFromJavaxKeyTab
(KeyTab
the javax..KeyTab object
ktab
)

A helper method to get a sun..KeyTab from a javax..KeyTab

public static Credentials
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Krb5Utilback to summary
private Krb5Util()

Default constructor

Method Detail

credsToTicketback to summary
public static KerberosTicket credsToTicket(Credentials serviceCreds)
getInitialTicketback to summary
pack-priv static KerberosTicket getInitialTicket(GSSCaller caller, String clientPrincipal) throws LoginException

Retrieves the initial TGT corresponding to the client principal from the Subject in the specified AccessControlContext. If the ticket can not be found in the Subject, and if useSubjectCredsOnly is false, then obtain ticket from a LoginContext.

getServiceCredsback to summary
public static ServiceCreds getServiceCreds(GSSCaller caller, String serverPrincipal) throws LoginException

Retrieves the ServiceCreds for the specified server principal from the Subject in the specified AccessControlContext. If not found, and if useSubjectCredsOnly is false, then obtain from a LoginContext.

getServiceTicketback to summary
pack-priv static KerberosTicket getServiceTicket(GSSCaller caller, String clientPrincipal, String serverPrincipal)

Retrieves the ticket corresponding to the client/server principal pair from the Subject in the specified AccessControlContext.

keyInfoback to summary
public static String keyInfo(byte[] data)
keysFromJavaxKeyTabback to summary
public static EncryptionKey[] keysFromJavaxKeyTab(KeyTab ktab, PrincipalName cname)

A helper method to get EncryptionKeys from a javax..KeyTab

Parameters
ktab:KeyTab

the javax..KeyTab object

cname:PrincipalName

the PrincipalName

Returns:EncryptionKey[]

the EKeys, never null, might be empty

snapshotFromJavaxKeyTabback to summary
public static KeyTab snapshotFromJavaxKeyTab(KeyTab ktab)

A helper method to get a sun..KeyTab from a javax..KeyTab

Parameters
ktab:KeyTab

the javax..KeyTab object

Returns:KeyTab

the sun..KeyTab object

ticketToCredsback to summary
public static Credentials ticketToCreds(KerberosTicket kerbTicket) throws KrbException, IOException