|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.geant.edugain.base.Configurator
public final class Configurator
This class is used to globally configure eduGAIN and the underlaying OpenSAML libraries. If you are using eduGAIN libraries, commonly the configurator will get instanced by validation classes, but you may want to get your own instance.
| Nested Class Summary | |
|---|---|
protected class |
Configurator.LoggerFilter
LoggerFilter extension to filter class names. |
| Field Summary | |
|---|---|
protected java.util.ArrayList<java.lang.String> |
components
|
protected org.opensaml.SAMLConfig |
config
|
protected java.security.cert.X509CRL |
crl
|
protected java.lang.Integer |
crl_timeout
|
protected java.util.Calendar |
crl_tmstamp
|
static java.lang.String |
DEFAULT_CONFIG_FILE
|
static java.lang.String |
DEFAULT_CRL_TIMEOUT
|
static java.lang.String |
DEFAULT_LOG_FILTER
|
static org.opensaml.common.SAMLVersion |
DEFAULT_SAML_VERSION
|
protected java.security.Key |
key
|
protected java.security.KeyStore |
keystore
|
protected org.apache.log4j.Logger |
log
|
protected java.util.Properties |
properties
|
static java.lang.String |
PROPS_CANONICALIZATION_ALG
|
static java.lang.String |
PROPS_CERT_CHAIN_ALIAS
|
static java.lang.String |
PROPS_CONFIG_FILE
|
static java.lang.String |
PROPS_CRL_TIMEOUT
|
static java.lang.String |
PROPS_CRL_URL
|
static java.lang.String |
PROPS_DIGEST_ALG
|
static java.lang.String |
PROPS_KEYSTORE_FILE
|
static java.lang.String |
PROPS_KEYSTORE_PASSWD
|
static java.lang.String |
PROPS_LOG_LOGGER_FILTER
|
static java.lang.String |
PROPS_MDS_URL
|
static java.lang.String |
PROPS_PRIV_KEY_ALIAS
|
static java.lang.String |
PROPS_PRIV_KEY_PASSWD
|
static java.lang.String |
PROPS_SAML_VERSION
|
static java.lang.String |
PROPS_SIGNATURE_ALG
|
static java.lang.String |
PROPS_TRUSTSTORE_FILE
|
static java.lang.String |
PROPS_TRUSTSTORE_PASSWD
|
static java.lang.String |
PROPS_VALID_COMPONENTS
|
protected static Configurator |
ref
|
protected java.security.KeyStore |
truststore
|
protected org.opensaml.common.SAMLVersion |
version
|
| Constructor Summary | |
|---|---|
protected |
Configurator()
Create a new instance of Configurator, loading default eduGAIN properties and wrapping them into OpenSAML properties. |
protected |
Configurator(java.util.Properties eduGAINprops)
Create a new instance of Configurator, wrapping eduGAIN properties into OpenSAML properties. |
protected |
Configurator(java.lang.String pathToProps)
Create a new instance of Configurator, loading default eduGAIN properties from the given location. |
| Method Summary | |
|---|---|
java.lang.Object |
clone()
This class is not clonable... |
java.security.cert.X509CRL |
getCRL()
Get a CRL with the full list of revocated certs. |
java.security.cert.X509CRL |
getCRL(java.lang.String url)
Get a CRL with the full list of revocated certs. |
java.lang.Integer |
getCRLTimeout()
Get the CRL timeout. |
static Configurator |
getInstance()
Get a running instance of the configuration or instantiate a new one. |
static Configurator |
getInstance(java.util.Properties props)
Instantiate a new configurator with the specified properties. |
static Configurator |
getInstance(java.lang.String propsPath)
Get a running instance of the configuration or instantiate a new one. |
java.security.Key |
getPrivateKey()
Get the keystore. |
private java.security.Key |
getPrivateKey(boolean force)
Force get the key from the keystore. |
java.util.Properties |
getProperties()
This method returns the properties stored in the current configuration. |
java.lang.String |
getProperty(java.lang.String property)
This method returns the value of a property, if set. |
java.lang.String |
getProperty(java.lang.String property,
java.lang.String value)
This method returns the value of a property if set, or a default value if not. |
org.opensaml.common.SAMLVersion |
getVersion()
Get the currently configured SAML version to use. |
java.util.ArrayList<java.lang.String> |
loadDefaultValidComponents()
Load default validComponentIdentifiers from file. |
java.security.KeyStore |
loadKeyStore()
Load the default keystore. |
private java.security.KeyStore |
loadKeyStore(java.lang.String path,
java.lang.String password)
Load a KeyStore. |
void |
loadProperties(java.io.InputStream inStream)
Load a set of configuration properties. |
java.security.KeyStore |
loadTrustStore()
Load the default truststore. |
boolean |
overrideCRL()
Determine whether user has overrided the CRL by configuration or not. |
protected void |
setLoggerFilter()
Set some eduGAIN custom log filters. |
void |
setVersion(java.lang.String v)
Set the SAML version to use within the library. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String PROPS_CONFIG_FILE
public static java.lang.String PROPS_SAML_VERSION
public static java.lang.String PROPS_LOG_LOGGER_FILTER
public static java.lang.String PROPS_CRL_URL
public static java.lang.String PROPS_CRL_TIMEOUT
public static java.lang.String PROPS_VALID_COMPONENTS
public static java.lang.String PROPS_PRIV_KEY_ALIAS
public static java.lang.String PROPS_PRIV_KEY_PASSWD
public static java.lang.String PROPS_CERT_CHAIN_ALIAS
public static java.lang.String PROPS_SIGNATURE_ALG
public static java.lang.String PROPS_DIGEST_ALG
public static java.lang.String PROPS_CANONICALIZATION_ALG
public static java.lang.String PROPS_MDS_URL
public static java.lang.String PROPS_KEYSTORE_FILE
public static java.lang.String PROPS_KEYSTORE_PASSWD
public static java.lang.String PROPS_TRUSTSTORE_FILE
public static java.lang.String PROPS_TRUSTSTORE_PASSWD
public static java.lang.String DEFAULT_CRL_TIMEOUT
public static java.lang.String DEFAULT_CONFIG_FILE
public static java.lang.String DEFAULT_LOG_FILTER
public static org.opensaml.common.SAMLVersion DEFAULT_SAML_VERSION
protected java.util.Properties properties
protected static Configurator ref
protected org.opensaml.SAMLConfig config
protected java.util.ArrayList<java.lang.String> components
protected java.security.cert.X509CRL crl
protected java.util.Calendar crl_tmstamp
protected java.lang.Integer crl_timeout
protected org.opensaml.common.SAMLVersion version
protected org.apache.log4j.Logger log
protected java.security.KeyStore keystore
protected java.security.KeyStore truststore
protected java.security.Key key
| Constructor Detail |
|---|
protected Configurator(java.util.Properties eduGAINprops)
throws BaseException
eduGAINprops - The properties to use.
BaseException
protected Configurator()
throws BaseException
BaseException
protected Configurator(java.lang.String pathToProps)
throws BaseException
pathToProps - The path to a valid eduGAIN configuration.
BaseException| Method Detail |
|---|
public static Configurator getInstance(java.util.Properties props)
props - The properties object representing a new eduGAIN configuration.
public static Configurator getInstance()
public static Configurator getInstance(java.lang.String propsPath)
public java.util.Properties getProperties()
public java.lang.String getProperty(java.lang.String property)
property - The name of the property.
public java.lang.String getProperty(java.lang.String property,
java.lang.String value)
property - The name of the property.value - The default value of the property.
public void setVersion(java.lang.String v)
v - A string defining the version of SAML to use.public org.opensaml.common.SAMLVersion getVersion()
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException
public void loadProperties(java.io.InputStream inStream)
throws java.io.IOException
java.io.IOException
private java.security.KeyStore loadKeyStore(java.lang.String path,
java.lang.String password)
throws BaseException
path - The path to the keystore.password - The password for the provided keystore.
BaseException - Thrown if an error occurs while loading the keystore.
public java.security.KeyStore loadKeyStore()
throws BaseException
BaseException - Thrown if an error occurs while loading the keystore.
public java.security.KeyStore loadTrustStore()
throws BaseException
BaseException - Thrown if an error occurs while loading the truststore.
public java.util.ArrayList<java.lang.String> loadDefaultValidComponents()
throws BaseException
BaseException - Thrown if an error occurs while loading the valid component identifiers file.
public java.security.cert.X509CRL getCRL(java.lang.String url)
throws BaseException
url - The URL where the CRL is located.
BaseException - Thrown if an error occurs while loading the CRL.
public java.security.cert.X509CRL getCRL()
throws BaseException
BaseException - Thrown if an error occurs while loading the CRL.public boolean overrideCRL()
public java.lang.Integer getCRLTimeout()
private java.security.Key getPrivateKey(boolean force)
throws BaseException
force - Whether to force fetch the key from the keystore or not.
BaseException
public java.security.Key getPrivateKey()
throws BaseException
BaseExceptionprotected void setLoggerFilter()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||