public class ConfigurationBuilder extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static String |
AUTH_BKU_XPATH
an XPATH-Expression
|
protected static String |
AUTH_BKUSELECT_TEMPLATE_XPATH
an XPATH-Expression
|
static String |
AUTH_FOREIGN_IDENTITIES_XPATH
an XPATH-Expression
|
protected static String |
AUTH_IDENTITY_LINK_X509SUBJECTNAME_XPATH
an XPATH-Expression
|
protected static String |
AUTH_MOA_SP_VERIFY_AUTH_TRUST_ID_XPATH
an XPATH-Expression
|
protected static String |
AUTH_MOA_SP_VERIFY_AUTH_VERIFY_ID_XPATH
an XPATH-Expression
|
protected static String |
AUTH_MOA_SP_VERIFY_IDENTITY_TRUST_ID_XPATH
an XPATH-Expression
|
protected static String |
AUTH_MOA_SP_XPATH
an XPATH-Expression
|
static String |
AUTH_ONLINEMANDATES_XPATH
an XPATH-Expression
|
static String |
AUTH_SECLAYER_TRANSFORMS_INFO_FILENAME_XPATH
an XPATH-Expression
|
static String |
AUTH_TEMPLATE_ONLINEMANDATES_BKU_XPATH
an XPATH-Expression
|
protected static String |
AUTH_TEMPLATE_XPATH
an XPATH-Expression
|
static String |
AUTH_VERIFY_INFOBOXES_XPATH
an XPATH-Expression
|
protected static String |
CHAINING_MODES_DEFAULT_XPATH
an XPATH-Expression
|
protected static String |
CHAINING_MODES_XPATH
an XPATH-Expression
|
protected static String |
CM_CHAINING
an XPATH-Expression
|
protected static String |
CM_PKIX
an XPATH-Expression
|
protected static String |
CONF
an XPATH-Expression
|
protected Element |
configElem_
The root element of the MOA-ID configuration
|
protected static String |
CONNECTION_PARAMETER_ACCEPTED_CERTS_XPATH
an XPATH-Expression
|
protected static String |
CONNECTION_PARAMETER_KEYSTORE_PASS_XPATH
an XPATH-Expression
|
protected static String |
CONNECTION_PARAMETER_URL_XPATH
an XPATH-Expression
|
protected static String |
CONNECTION_PARAMETERN_KEYSTORE_XPATH
an XPATH-Expression
|
protected static String |
DEFAULT_ENCODING
an XPATH-Expression
|
protected static String |
DSIG
an XPATH-Expression
|
protected static String |
GENERIC_CONFIGURATION_XPATH
an XPATH-Expression
|
protected static String |
INPUT_PROCESSOR_TEMPLATE_XPATH
an XPATH-Expression
|
protected static String |
ISSUER_XPATH
an XPATH-Expression
|
protected static String |
OA_AUTH_COMPONENT_BKUSELECT_TEMPLATE_XPATH
an XPATH-Expression
|
protected static String |
OA_AUTH_COMPONENT_IDENT_NUMBER_XPATH
an XPATH-Expression
|
protected static String |
OA_AUTH_COMPONENT_MANDATES_PROFILES_XPATH
an XPATH-Expression
|
static String |
OA_AUTH_COMPONENT_TEMPLATE_ONLINEMANDATES_BKU_XPATH
an XPATH-Expression
|
protected static String |
OA_AUTH_COMPONENT_TEMPLATE_XPATH
an XPATH-Expression
|
protected static String |
OA_AUTH_COMPONENT_TRANSFORMS_INFO_FILENAME_XPATH
an XPATH-Expression
|
protected static String |
OA_AUTH_COMPONENT_VERIFY_INFOBOXES_XPATH
an XPATH-Expression
|
protected static String |
OA_AUTH_COMPONENT_XPATH
an XPATH-Expression
|
protected static String |
OA_LOGIN_XPATH
an XPATH-Expression
|
protected static String |
OA_XPATH
an XPATH-Expression
|
protected static String |
ROOT
an XPATH-Expression
|
protected String |
rootConfigFileDir_
main configuration file directory name used to configure MOA-ID
|
protected static String |
SERIAL_XPATH
an XPATH-Expression
|
protected static String |
TRUST_ANCHOR_XPATH
an XPATH-Expression
|
protected static String |
TRUSTED_BKUS
an XPATH-Expression
|
protected static String |
TRUSTED_CA_CERTIFICATES_XPATH
an XPATH-Expression
|
protected static String |
VERIFY_INFOBOXES_DEFAULT_TRUST_PROFILE_XPATH
an XPATH-Expression
|
protected static String |
VERIFY_INFOBOXES_INFOBOX_XPATH
an XPATH-Expression
|
protected static String |
VERIFY_INFOBOXES_TRUST_PROFILE_ID_XPATH
an XPATH-Expression
|
| Constructor and Description |
|---|
ConfigurationBuilder(Element configElem,
String rootConfigDir)
Creates a new
MOAConfigurationProvider. |
| Modifier and Type | Method and Description |
|---|---|
ConnectionParameter |
buildAuthBKUConnectionParameter()
Build a ConnectionParameter object containing all information
of the moa-sp element in the authentication component
|
String |
buildAuthBKUSelectionType()
Method buildAuthBKUSelectionType.
|
Map |
buildChainingModes()
Build the chaining modes for all configured trust anchors.
|
protected ConnectionParameter |
buildConnectionParameter(Element root)
Method buildConnectionParameter: internal Method for creating a
ConnectionParameter object with all data found in the incoming element
|
ConnectionParameter |
buildForeignIDConnectionParameter()
Build a ConnectionParameter containing all information
of the foreignid element in the authentication component
|
Map |
buildGenericConfiguration()
Build the mapping of generic configuration properties.
|
protected String |
buildIdentityLinkDomainIdentifier(Element number)
Builds the IdentityLinkDomainIdentifier as needed for providing it to the
SecurityLayer for computation of the wbPK.
|
protected IssuerAndSerial |
buildIssuerAndSerial(Element root)
Build an
IssuerAndSerial from the DOM representation. |
String[] |
buildMoaSpAuthBlockVerifyTransformsInfoIDs()
Build a string array with references to all verify transform info
IDs within the moa-sp part of the authentication component
|
ConnectionParameter |
buildMoaSpConnectionParameter()
Build a ConnectionParameter bean containing all information
of the authentication component moa-sp element
|
OAAuthParameter[] |
buildOnlineApplicationAuthParameters(VerifyInfoboxParameters defaultVerifyInfoboxParameters,
String moaSpIdentityLinkTrustProfileID)
Build an array of the OnlineApplication Parameters containing information
about the authentication component
|
ConnectionParameter |
buildOnlineMandatesConnectionParameter()
Build a ConnectionParameter containing all information
of the OnlineMandates element in the authentication component
|
protected String |
buildTemplateURL(Element oaAuthComponent,
String xpathExpr,
String defaultURL)
Builds the URL for a BKUSelectionTemplate or a Template.
|
String[] |
buildTransformsInfoFileNames(Node contextNode,
String xpathExpr)
Build a string array with all filenames leading
to the Transforms Information for the Security Layer
|
VerifyInfoboxParameters |
buildVerifyInfoboxParameters(Node verifyInfoboxesElem,
VerifyInfoboxParameters defaultVerifyInfoboxParameters,
String moaSpIdentityLinkTrustProfileID)
Builds the parameters for verifying additional infoboxes (additional to the
IdentityLink infobox).
|
Element |
getConfigElem()
Returns the root element of the MOA-ID configuration.
|
String |
getDefaultChainingMode()
Returns the default chaining mode from the configuration.
|
List |
getIdentityLink_X509SubjectNames()
Returns a list containing all X509 Subject Names
of the Identity Link Signers
|
String |
getMoaSpAuthBlockTrustProfileID()
Return a string with a url-reference to the VerifyAuthBlock trust
profile id within the moa-sp part of the authentication component
|
String |
getMoaSpIdentityLinkTrustProfileID()
Return a string with a url-reference to the VerifyIdentityLink trust
profile id within the moa-sp part of the authentication component
|
List |
getTrustedBKUs() |
String |
getTrustedCACertificates()
Return a string representation of an URL pointing to trusted CA Certificates
|
String[] |
loadTransformsInfos(String[] transformsInfoFileNames)
Loads the
transformsInfos from files. |
protected String |
translateChainingMode(String chainingMode)
Translate the chaining mode from the configuration file to one used in the
IAIK MOA API.
|
protected static void |
warn(String messageId,
Object[] parameters)
Method warn.
|
protected static void |
warn(String messageId,
Object[] args,
Throwable t)
Method warn.
|
protected static final String CONF
protected static final String DSIG
protected static final String CM_CHAINING
protected static final String CM_PKIX
protected static final String DEFAULT_ENCODING
protected static final String ROOT
protected static final String AUTH_BKU_XPATH
protected static final String AUTH_BKUSELECT_TEMPLATE_XPATH
protected static final String AUTH_TEMPLATE_XPATH
public static final String AUTH_TEMPLATE_ONLINEMANDATES_BKU_XPATH
protected static final String INPUT_PROCESSOR_TEMPLATE_XPATH
public static final String AUTH_SECLAYER_TRANSFORMS_INFO_FILENAME_XPATH
protected static final String AUTH_MOA_SP_XPATH
protected static final String AUTH_MOA_SP_VERIFY_IDENTITY_TRUST_ID_XPATH
protected static final String AUTH_MOA_SP_VERIFY_AUTH_TRUST_ID_XPATH
protected static final String AUTH_MOA_SP_VERIFY_AUTH_VERIFY_ID_XPATH
protected static final String AUTH_IDENTITY_LINK_X509SUBJECTNAME_XPATH
public static final String AUTH_VERIFY_INFOBOXES_XPATH
public static final String AUTH_FOREIGN_IDENTITIES_XPATH
public static final String AUTH_ONLINEMANDATES_XPATH
protected static final String OA_XPATH
protected static final String OA_LOGIN_XPATH
protected static final String OA_AUTH_COMPONENT_XPATH
protected static final String OA_AUTH_COMPONENT_IDENT_NUMBER_XPATH
protected static final String OA_AUTH_COMPONENT_BKUSELECT_TEMPLATE_XPATH
protected static final String OA_AUTH_COMPONENT_TEMPLATE_XPATH
public static final String OA_AUTH_COMPONENT_TEMPLATE_ONLINEMANDATES_BKU_XPATH
protected static final String OA_AUTH_COMPONENT_TRANSFORMS_INFO_FILENAME_XPATH
protected static final String OA_AUTH_COMPONENT_VERIFY_INFOBOXES_XPATH
protected static final String OA_AUTH_COMPONENT_MANDATES_PROFILES_XPATH
protected static final String CONNECTION_PARAMETER_URL_XPATH
protected static final String CONNECTION_PARAMETER_ACCEPTED_CERTS_XPATH
protected static final String CONNECTION_PARAMETERN_KEYSTORE_XPATH
protected static final String CONNECTION_PARAMETER_KEYSTORE_PASS_XPATH
protected static final String GENERIC_CONFIGURATION_XPATH
protected static final String TRUSTED_BKUS
protected static final String CHAINING_MODES_XPATH
protected static final String CHAINING_MODES_DEFAULT_XPATH
protected static final String TRUST_ANCHOR_XPATH
protected static final String ISSUER_XPATH
protected static final String SERIAL_XPATH
protected static final String TRUSTED_CA_CERTIFICATES_XPATH
protected static final String VERIFY_INFOBOXES_DEFAULT_TRUST_PROFILE_XPATH
protected static final String VERIFY_INFOBOXES_TRUST_PROFILE_ID_XPATH
protected static final String VERIFY_INFOBOXES_INFOBOX_XPATH
protected String rootConfigFileDir_
protected Element configElem_
public Element getConfigElem()
public ConnectionParameter buildAuthBKUConnectionParameter()
public ConnectionParameter buildForeignIDConnectionParameter()
public ConnectionParameter buildOnlineMandatesConnectionParameter()
public String buildAuthBKUSelectionType()
public String[] buildTransformsInfoFileNames(Node contextNode, String xpathExpr)
contextNode - The node from which should be searchedxpathExpr - The XPATH expression for the searchnull if no transforms are includedpublic String[] loadTransformsInfos(String[] transformsInfoFileNames) throws Exception
transformsInfos from files.Exception - on any exception thrownpublic ConnectionParameter buildMoaSpConnectionParameter()
public String getMoaSpIdentityLinkTrustProfileID()
public String getTrustedCACertificates()
public String getMoaSpAuthBlockTrustProfileID()
public String[] buildMoaSpAuthBlockVerifyTransformsInfoIDs()
public List getTrustedBKUs()
public List getIdentityLink_X509SubjectNames()
public OAAuthParameter[] buildOnlineApplicationAuthParameters(VerifyInfoboxParameters defaultVerifyInfoboxParameters, String moaSpIdentityLinkTrustProfileID) throws ConfigurationException
defaultVerifyInfoboxParameters - Default parameters for verifying additional
infoboxes. Maybe null.moaSpIdentityLinkTrustProfileID - The ID of the trust profile used for validating
the identity link signer certificate. Needed for
checking if this ID is not used for validating other
infoboxes.ConfigurationExceptionprotected String buildTemplateURL(Element oaAuthComponent, String xpathExpr, String defaultURL)
oaAuthComponent - The AuthComponent element to get the template from.xpathExpr - The xpath expression for selecting the template uri.defaultURL - The default template url.null.protected ConnectionParameter buildConnectionParameter(Element root)
root - This Element contains the ConnectionParameterpublic Map buildGenericConfiguration()
Map of generic configuration properties (a name to value
mapping) from the configuration.public String getDefaultChainingMode()
public Map buildChainingModes()
protected IssuerAndSerial buildIssuerAndSerial(Element root)
IssuerAndSerial from the DOM representation.root - The root element (being of type dsig:
X509IssuerSerialType.root
element or null if could not be built for any reason.protected String translateChainingMode(String chainingMode)
chainingMode - The chaining mode from the configuration.ChainingModes
interface.ChainingModesprotected String buildIdentityLinkDomainIdentifier(Element number)
e.g.:
input element:
<pr:Firmenbuchnummer Identifier="FN">000468 i</pr:Firmenbuchnummer>
return value: urn:publicid:gv.at+wbpk+FN468i
number - The element holding the identification number of the business
company.public VerifyInfoboxParameters buildVerifyInfoboxParameters(Node verifyInfoboxesElem, VerifyInfoboxParameters defaultVerifyInfoboxParameters, String moaSpIdentityLinkTrustProfileID) throws ConfigurationException
verifyInfoboxesElem - The VerifyInfoboxes element from the
config file. This maybe the global element or the
elment from an Online application.defaultVerifyInfoboxParameters - Default parameters to be used, if no
VerifyInfoboxes element is present.
This only applies to parameters
of an specific online application and is set to
null when building the global parameters.moaSpIdentityLinkTrustProfileID - The ID of the trust profile used for validating
the identity link signer certificate. Needed for
checking if this ID is not used for validating other
infoboxes.VerifyInfoboxParameters
object needed for verifying additional infoboxes.ConfigurationException - If the trust profile for validating the identity link
signer certificate is used for validating another infobox.protected static void warn(String messageId, Object[] parameters)
messageId - to identify a country-specific messageparameters - for the loggerCopyright © 2016. All Rights Reserved.