|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsun.security.mule.krb5.Config
public class Config
This class maintains key-value pairs of Kerberos configurable constants from configuration file or from user specified system properties.
| Constructor Summary | |
|---|---|
Config()
Generate a config using the traditional JAAS way. |
|
Config(String realm,
String kdcLocation)
Generate a default config file using only as dinamic parameters the realm and the kdcLocation |
|
Config(Vector<String> configFile)
Generate a config using the information passed as parameter and not the system properties |
|
| Method Summary | |
|---|---|
int[] |
defaultEtype(String enctypes)
Returns the default encryption types. |
String |
getDefault(String name)
Gets the default string value for the specified name. |
String |
getDefault(String name,
String section)
Gets the default string value for the specified name in the specified section. |
boolean |
getDefaultBooleanValue(String name)
Gets the default boolean value for the specified name. |
boolean |
getDefaultBooleanValue(String name,
String section)
Gets the default boolean value for the specified name in the specified section. |
int |
getDefaultIntValue(String name)
Gets the default int value for the specified name. |
int |
getDefaultIntValue(String name,
String section)
Gets the default int value for the specified name in the specified section. |
String |
getDefaultRealm()
Gets default realm. |
String |
getKDCList(String realm)
Returns a list of KDC's with each KDC separated by a space |
GSSContextImpl |
getKerberosContext()
|
int |
getType(String input)
Get the etype and checksum value for the specified encryption and checksum type. |
void |
listTable()
For testing purpose. |
static Vector<String> |
loadDefaultConfigFile(String realm,
String kdcLocation)
Generate a Kerberos configuration using the default template. |
static void |
refresh()
Refresh and reload the Configuration. |
void |
resetDefaultRealm(String realm)
Resets the default kdc realm. |
Subject |
retrieveFirst()
|
Subject |
retrieveSubject(String principalName)
|
void |
setKerberosContext(GSSContextImpl kerberosContext)
|
void |
storeSubject(String principalName,
Subject subject)
|
boolean |
useAddresses()
Check to use addresses in tickets use addresses if "no_addresses" or "noaddresses" is set to false |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Config()
throws KrbException
KrbException
public Config(Vector<String> configFile)
throws KrbException
configFile - The VectorKrbException - If the configuration cannot be generated
public Config(String realm,
String kdcLocation)
throws KrbException
The configuration generated is:
[libdefaults]
default_realm = realm
default_tkt_enctypes = rc4-hmac aes128-cts des3-cbc-sha1 des-cbc-md5 des-cbc-crc
default_tgs_enctypes = rc4-hmac aes128-cts des3-cbc-sha1 des-cbc-md5 des-cbc-crc
permitted_enctypes = rc4-hmac aes128-cts des3-cbc-sha1 des-cbc-md5 des-cbc-crc
[realms]
realm = {
kdc = kdcLocation
}
[domain_realm]
.realmInLowerCase = realm
realmInLowerCase = realm
realm - The realm of the Authentication server (generally in upper case format)kdcLocation - The location of the Authentication server
KrbException - If the configuration cannot be generated| Method Detail |
|---|
public GSSContextImpl getKerberosContext()
public void setKerberosContext(GSSContextImpl kerberosContext)
public void storeSubject(String principalName,
Subject subject)
public Subject retrieveSubject(String principalName)
public Subject retrieveFirst()
public static void refresh()
throws KrbException
KrbException - if error occurs when constructing a Config
instance. Possible causes would be configuration file not
found, either of java.security.krb5.realm or java.security.krb5.kdc
not specified, error reading configuration file.
public static Vector<String> loadDefaultConfigFile(String realm,
String kdcLocation)
[libdefaults]
default_realm = realm
default_tkt_enctypes = rc4-hmac aes128-cts des3-cbc-sha1 des-cbc-md5 des-cbc-crc
default_tgs_enctypes = rc4-hmac aes128-cts des3-cbc-sha1 des-cbc-md5 des-cbc-crc
permitted_enctypes = rc4-hmac aes128-cts des3-cbc-sha1 des-cbc-md5 des-cbc-crc
[realms]
realm = {
kdc = kdcLocation
}
[domain_realm]
.realmInLowerCase = realm
realmInLowerCase = realm
realm - The realm (domain) provided using case sensitive (generally it is in upper case)kdcLocation - The domain or url where the kdc is located
Exception - If cannot generate the filepublic int getDefaultIntValue(String name)
name - the name.
public int getDefaultIntValue(String name,
String section)
name - the name.sectio - the name string of the section.
public String getDefault(String name)
name - the name.
public String getDefault(String name,
String section)
name - the name.section - the name of the section.
public boolean getDefaultBooleanValue(String name)
name - the name.
public boolean getDefaultBooleanValue(String name,
String section)
name - the name.section - the name of the section.
public void listTable()
public int[] defaultEtype(String enctypes)
public int getType(String input)
public void resetDefaultRealm(String realm)
public boolean useAddresses()
public String getDefaultRealm()
public String getKDCList(String realm)
realm - the realm for which the master KDC is desired
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||