|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsun.security.mule.krb5.Credentials
public class Credentials
This class encapsulates the concept of a Kerberos service credential. That includes a Kerberos ticket and an associated session key.
| Constructor Summary | |
|---|---|
Credentials(byte[] encoding,
String client,
String server,
byte[] keyBytes,
int keyType,
boolean[] flags,
Date authTime,
Date startTime,
Date endTime,
Date renewTill,
InetAddress[] cAddrs,
Config kerberosConfig)
|
|
Credentials(Ticket new_ticket,
PrincipalName new_client,
PrincipalName new_server,
EncryptionKey new_key,
TicketFlags new_flags,
KerberosTime authTime,
KerberosTime new_startTime,
KerberosTime new_endTime,
KerberosTime renewTill,
HostAddresses cAddr)
|
|
| Method Summary | |
|---|---|
static Credentials |
acquireDefaultCreds()
Acquires default credentials. |
static Credentials |
acquireServiceCreds(String service,
Credentials ccreds,
Config kerberosConfig)
Acquires credentials for a specified service using initial credential. |
static Credentials |
acquireTGT(PrincipalName princ,
EncryptionKey[] secretKeys,
char[] password,
Config kerberosConfig)
Returns a TGT for the given client principal via an AS-Exchange. |
static Credentials |
acquireTGTFromCache(PrincipalName princ,
String ticketCache)
Returns a TGT for the given client principal from a ticket cache. |
boolean |
checkDelegate()
Checks if the service ticket returned by the KDC has the OK-AS-DELEGATE flag set |
Date |
getAuthTime()
|
CredentialsCache |
getCache()
|
PrincipalName |
getClient()
Acquires a service ticket for the specified service principal. |
InetAddress[] |
getClientAddresses()
|
byte[] |
getEncoded()
|
Date |
getEndTime()
|
boolean[] |
getFlags()
|
Date |
getRenewTill()
|
PrincipalName |
getServer()
|
static Credentials |
getServiceCreds(String serviceName,
File keyTabFile,
Config kerberosConfig)
Gets service credential from key table. |
EncryptionKey |
getServiceKey()
|
EncryptionKey |
getSessionKey()
|
Date |
getStartTime()
|
Ticket |
getTicket()
|
TicketFlags |
getTicketFlags()
|
boolean |
isForwardable()
|
boolean |
isRenewable()
|
static void |
printDebug(Credentials c)
|
Credentials |
renew(Config kerberosConfig)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Credentials(Ticket new_ticket,
PrincipalName new_client,
PrincipalName new_server,
EncryptionKey new_key,
TicketFlags new_flags,
KerberosTime authTime,
KerberosTime new_startTime,
KerberosTime new_endTime,
KerberosTime renewTill,
HostAddresses cAddr)
public Credentials(byte[] encoding,
String client,
String server,
byte[] keyBytes,
int keyType,
boolean[] flags,
Date authTime,
Date startTime,
Date endTime,
Date renewTill,
InetAddress[] cAddrs,
Config kerberosConfig)
throws KrbException,
IOException
KrbException
IOException| Method Detail |
|---|
public final PrincipalName getClient()
public final PrincipalName getServer()
public final EncryptionKey getSessionKey()
public final Date getAuthTime()
public final Date getStartTime()
public final Date getEndTime()
public final Date getRenewTill()
public final boolean[] getFlags()
public final InetAddress[] getClientAddresses()
public final byte[] getEncoded()
public boolean isForwardable()
public boolean isRenewable()
public Ticket getTicket()
public TicketFlags getTicketFlags()
public boolean checkDelegate()
public Credentials renew(Config kerberosConfig)
throws KrbException,
IOException
KrbException
IOException
public static Credentials acquireTGTFromCache(PrincipalName princ,
String ticketCache)
throws KrbException,
IOException
princ - the client principal. A value of null means that the
default principal name in the credentials cache will be used.ticketCache - the path to the tickets file. A value
of null will be accepted to indicate that the default
path should be searched
KrbException
IOException
public static Credentials acquireTGT(PrincipalName princ,
EncryptionKey[] secretKeys,
char[] password,
Config kerberosConfig)
throws KrbException,
IOException
princ - the client principal. This value cannot be null.secretKey - the secret key of the client principal.This value
cannot be null.
KrbException
IOExceptionpublic static Credentials acquireDefaultCreds()
KrbCreds object if the credential is found,
otherwise return null.
public static Credentials getServiceCreds(String serviceName,
File keyTabFile,
Config kerberosConfig)
serviceName - the name of service, using format component@realmkeyTabFile - the file of key table.
KrbCreds object.
public static Credentials acquireServiceCreds(String service,
Credentials ccreds,
Config kerberosConfig)
throws KrbException,
IOException
service - the name of service principal using format
components@realmccreds - client's initial credential.
Credentials object.
IOException - if an error occurs in reading the credentials
cache
KrbException - if an error occurs specific to Kerberospublic CredentialsCache getCache()
public EncryptionKey getServiceKey()
public static void printDebug(Credentials c)
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||