aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkstranacher <kstranacher@d688527b-c9ab-4aba-bd8d-4036d912da1d>2011-04-08 14:45:39 +0000
committerkstranacher <kstranacher@d688527b-c9ab-4aba-bd8d-4036d912da1d>2011-04-08 14:45:39 +0000
commit7ff58b0342621ccde37531c134163b8f25855597 (patch)
tree36a6606e2e764196d5af7d2dd86a76bd8dffdf93
parent4058e2e88786962c63c2d9ecd193cf085982adc5 (diff)
parent07449c789f2561bb768d111e5b7d2c14e5dec26f (diff)
downloadmoa-id-spss-tags/1.5.0-Pre-Release.tar.gz
moa-id-spss-tags/1.5.0-Pre-Release.tar.bz2
moa-id-spss-tags/1.5.0-Pre-Release.zip
Pre-Release Version 1.5.0tags/1.5.0-Pre-Release
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/tags/1.5.0-Pre-Release@1205 d688527b-c9ab-4aba-bd8d-4036d912da1d
-rw-r--r--.classpath6
-rw-r--r--.project29
-rw-r--r--.settings/org.eclipse.jdt.core.prefs5
-rw-r--r--.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--IAIK-LICENSE.txt108
-rw-r--r--LICENSE-2.0.txt202
-rw-r--r--NOTICE.txt16
-rw-r--r--build.bat10
-rw-r--r--common/.classpath10
-rw-r--r--common/.project36
-rw-r--r--common/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--common/.settings/org.eclipse.wst.common.component7
-rw-r--r--common/.settings/org.eclipse.wst.common.project.facet.core.xml7
-rw-r--r--common/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--common/pom.xml85
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/logging/LogMsg.java58
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/logging/Logger.java190
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/logging/LoggingContext.java61
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/logging/LoggingContextManager.java71
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/Base64Utils.java124
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/BoolUtils.java39
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/CollectionUtils.java51
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/Constants.java367
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java1066
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/DateTimeUtils.java372
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/EntityResolverChain.java67
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/FileUtils.java131
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/KeyStoreUtils.java149
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/MOADefaultHandler.java97
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/MOAEntityResolver.java118
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/MOAErrorHandler.java100
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/MOATimer.java125
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/MessageProvider.java78
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/Messages.java132
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/NodeIteratorAdapter.java102
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/NodeListAdapter.java59
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/OutputXML2File.java93
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/ResourceBundleChain.java81
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/SSLUtils.java235
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/StreamEntityResolver.java79
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/StreamUtils.java188
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/StringUtils.java169
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/URLDecoder.java75
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/URLEncoder.java78
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/XPathException.java73
-rw-r--r--common/src/main/java/at/gv/egovernment/moa/util/XPathUtils.java541
-rw-r--r--common/src/main/resources/resources/properties/common_messages_de.properties16
-rw-r--r--common/src/main/resources/resources/schemas/Core-1.2.xsd881
-rw-r--r--common/src/main/resources/resources/schemas/Core.20020225.xsd399
-rw-r--r--common/src/main/resources/resources/schemas/Core.20020831.xsd153
-rw-r--r--common/src/main/resources/resources/schemas/ECDSAKeyValue.ancient.xsd122
-rw-r--r--common/src/main/resources/resources/schemas/ECDSAKeyValue.wrong.xsd122
-rw-r--r--common/src/main/resources/resources/schemas/ECDSAKeyValue.xsd122
-rw-r--r--common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.2.xsd350
-rw-r--r--common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.3.xsd424
-rw-r--r--common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.4.2.xsd616
-rw-r--r--common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.4.3.xsd612
-rw-r--r--common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.4.7.xsd625
-rw-r--r--common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.4.xsd505
-rw-r--r--common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.5.0.xsd650
-rw-r--r--common/src/main/resources/resources/schemas/MOA-SPSS-1.3.xsd469
-rw-r--r--common/src/main/resources/resources/schemas/MOA-SPSS-1.4.7.xsd470
-rw-r--r--common/src/main/resources/resources/schemas/MOA-SPSS-config-1.3.xsd253
-rw-r--r--common/src/main/resources/resources/schemas/MOA-SPSS-config-1.4.3.xsd312
-rw-r--r--common/src/main/resources/resources/schemas/MOA-SPSS-config-1.4.5.xsd268
-rw-r--r--common/src/main/resources/resources/schemas/MOA-SPSS-config-1.4.7.xsd268
-rw-r--r--common/src/main/resources/resources/schemas/MOAIdentities.xsd51
-rw-r--r--common/src/main/resources/resources/schemas/PersonData.xsd426
-rw-r--r--common/src/main/resources/resources/schemas/PersonData_20_en_moaWID.xsd1229
-rw-r--r--common/src/main/resources/resources/schemas/PersonName-1_2.xsd115
-rw-r--r--common/src/main/resources/resources/schemas/PostalAddress-1_2.xsd95
-rw-r--r--common/src/main/resources/resources/schemas/TelcomNumber-1_0.xsd89
-rw-r--r--common/src/main/resources/resources/schemas/XAdES-1.1.1.xsd545
-rw-r--r--common/src/main/resources/resources/schemas/XAdES-1.2.2.xsd551
-rw-r--r--common/src/main/resources/resources/schemas/XAdES-1.3.2.xsd466
-rw-r--r--common/src/main/resources/resources/schemas/XAdES-1.4.1.xsd15
-rw-r--r--common/src/main/resources/resources/schemas/XMLSchema-instance.xsd37
-rw-r--r--common/src/main/resources/resources/schemas/XMLSchema.dtd402
-rw-r--r--common/src/main/resources/resources/schemas/cs-sstc-schema-assertion-01.xsd194
-rw-r--r--common/src/main/resources/resources/schemas/cs-sstc-schema-protocol-01.xsd127
-rw-r--r--common/src/main/resources/resources/schemas/datatypes.dtd203
-rw-r--r--common/src/main/resources/resources/schemas/exclusive-canonicalization.xsd22
-rw-r--r--common/src/main/resources/resources/schemas/xml.xsd83
-rw-r--r--common/src/main/resources/resources/schemas/xmldsig-core-schema.xsd264
-rw-r--r--common/src/main/resources/resources/schemas/xmldsig-filter2.xsd38
-rw-r--r--common/src/test/java/test/at/gv/egovernment/moa/AllTests.java53
-rw-r--r--common/src/test/java/test/at/gv/egovernment/moa/MOATestCase.java90
-rw-r--r--common/src/test/java/test/at/gv/egovernment/moa/util/DOMUtilsTest.java152
-rw-r--r--common/src/test/java/test/at/gv/egovernment/moa/util/DateTimeUtilsTest.java119
-rw-r--r--common/src/test/java/test/at/gv/egovernment/moa/util/KeyStoreUtilsTest.java105
-rw-r--r--common/src/test/java/test/at/gv/egovernment/moa/util/SSLUtilsTest.java175
-rw-r--r--common/src/test/java/test/at/gv/egovernment/moa/util/URLDecoderTest.java44
-rw-r--r--common/src/test/java/test/at/gv/egovernment/moa/util/URLEncoderTest.java58
-rw-r--r--common/src/test/java/test/at/gv/egovernment/moa/util/XMLGrammarBuilderTest.java114
-rw-r--r--common/src/test/java/test/at/gv/egovernment/moa/util/XPathUtilsTest.java66
-rw-r--r--component-pkcs11libs.xml39
-rw-r--r--id/.classpath6
-rw-r--r--id/.project29
-rw-r--r--id/.settings/org.eclipse.jdt.core.prefs5
-rw-r--r--id/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--id/assembly-auth.xml121
-rw-r--r--id/assembly-proxy.xml118
-rw-r--r--id/history.txt586
-rw-r--r--id/oa/.classpath12
-rw-r--r--id/oa/.project37
-rw-r--r--id/oa/.settings/.jsdtscope11
-rw-r--r--id/oa/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--id/oa/.settings/org.eclipse.wst.common.component8
-rw-r--r--id/oa/.settings/org.eclipse.wst.common.project.facet.core.xml5
-rw-r--r--id/oa/.settings/org.eclipse.wst.jsdt.ui.superType.container1
-rw-r--r--id/oa/.settings/org.eclipse.wst.jsdt.ui.superType.name1
-rw-r--r--id/oa/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--id/oa/pom.xml18
-rw-r--r--id/oa/src/main/webapp/META-INF/MANIFEST.MF3
-rw-r--r--id/oa/src/main/webapp/WEB-INF/web.xml9
-rw-r--r--id/oa/src/main/webapp/auth.jsp48
-rw-r--r--id/oa/src/main/webapp/chooseBKU.jsp19
-rw-r--r--id/oa/src/main/webapp/form.jsp20
-rw-r--r--id/oa/src/main/webapp/getBKUSelectTag.jsp6
-rw-r--r--id/oa/src/main/webapp/index.jsp60
-rw-r--r--id/oa/src/main/webapp/stateful_login.jsp29
-rw-r--r--id/pom.xml26
-rw-r--r--id/readme_1.3.1.txt244
-rw-r--r--id/readme_1.3.3.txt150
-rw-r--r--id/readme_1.4.0.txt154
-rw-r--r--id/readme_1.4.1.txt205
-rw-r--r--id/readme_1.4.2.txt237
-rw-r--r--id/readme_1.4.3-1.txt224
-rw-r--r--id/readme_1.4.3.txt234
-rw-r--r--id/readme_1.4.4.txt233
-rw-r--r--id/readme_1.4.5.txt254
-rw-r--r--id/readme_1.4.6.txt302
-rw-r--r--id/readme_1.4.7.txt344
-rw-r--r--id/readme_1.4.8.txt375
-rw-r--r--id/readme_1.5.0.txt431
-rw-r--r--id/server/.classpath6
-rw-r--r--id/server/.project29
-rw-r--r--id/server/.settings/org.eclipse.jdt.core.prefs5
-rw-r--r--id/server/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--id/server/auth/.classpath14
-rw-r--r--id/server/auth/.project46
-rw-r--r--id/server/auth/.settings/.jsdtscope11
-rw-r--r--id/server/auth/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--id/server/auth/.settings/org.eclipse.wst.common.component18
-rw-r--r--id/server/auth/.settings/org.eclipse.wst.common.project.facet.core.xml5
-rw-r--r--id/server/auth/.settings/org.eclipse.wst.jsdt.ui.superType.container1
-rw-r--r--id/server/auth/.settings/org.eclipse.wst.jsdt.ui.superType.name1
-rw-r--r--id/server/auth/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--id/server/auth/pom.xml123
-rw-r--r--id/server/auth/src/main/resources/META-INF/services/org.apache.axis.components.net.SecureSocketFactory1
-rw-r--r--id/server/auth/src/main/webapp/BKAuswahl-MOA-Template-Howto.pdfbin0 -> 191806 bytes
-rw-r--r--id/server/auth/src/main/webapp/META-INF/MANIFEST.MF2
-rw-r--r--id/server/auth/src/main/webapp/WCAG-Pruefprotokoll.pdfbin0 -> 721803 bytes
-rw-r--r--id/server/auth/src/main/webapp/WEB-INF/server-config.wsdd29
-rw-r--r--id/server/auth/src/main/webapp/WEB-INF/web.xml153
-rw-r--r--id/server/auth/src/main/webapp/css/index.css235
-rw-r--r--id/server/auth/src/main/webapp/css/mandates.css57
-rw-r--r--id/server/auth/src/main/webapp/css/styles.css741
-rw-r--r--id/server/auth/src/main/webapp/css/styles_opera.css11
-rw-r--r--id/server/auth/src/main/webapp/errorpage-auth.jsp50
-rw-r--r--id/server/auth/src/main/webapp/iframeHandyBKU.html61
-rw-r--r--id/server/auth/src/main/webapp/iframeOnlineBKU.html61
-rw-r--r--id/server/auth/src/main/webapp/img/ecard_aktivieren.jpgbin0 -> 18927 bytes
-rw-r--r--id/server/auth/src/main/webapp/img/egov_schrift.gifbin0 -> 1843 bytes
-rw-r--r--id/server/auth/src/main/webapp/img/handy.gifbin0 -> 2632 bytes
-rw-r--r--id/server/auth/src/main/webapp/img/info.gifbin0 -> 892 bytes
-rw-r--r--id/server/auth/src/main/webapp/img/karte.gifbin0 -> 2369 bytes
-rw-r--r--id/server/auth/src/main/webapp/img/logo.jpgbin0 -> 18260 bytes
-rw-r--r--id/server/auth/src/main/webapp/img/mobilsig_aktivieren.jpgbin0 -> 19202 bytes
-rw-r--r--id/server/auth/src/main/webapp/img/rufezeichen.gifbin0 -> 844 bytes
-rw-r--r--id/server/auth/src/main/webapp/img/stern.gifbin0 -> 856 bytes
-rw-r--r--id/server/auth/src/main/webapp/index.html201
-rw-r--r--id/server/auth/src/main/webapp/info_bk.html96
-rw-r--r--id/server/auth/src/main/webapp/javascript/fa.js8
-rw-r--r--id/server/auth/src/main/webapp/javascript/formallg.js315
-rw-r--r--id/server/auth/src/main/webapp/message-auth.jsp20
-rw-r--r--id/server/auth/src/main/webapp/template_handyBKU.html37
-rw-r--r--id/server/auth/src/main/webapp/template_localBKU.html29
-rw-r--r--id/server/auth/src/main/webapp/template_onlineBKU.html35
-rw-r--r--id/server/auth/src/main/wsdl/MOA-ID-1.0.wsdl40
-rw-r--r--id/server/auth/src/main/wsdl/MOA-ID-1.x.wsdl40
-rw-r--r--id/server/auth/src/main/wsdl/MOA-SPSS-1.2.xsd454
-rw-r--r--id/server/component-idlibs.xml39
-rw-r--r--id/server/data/deploy/conf/Catalina/localhost/proxy.xml25
-rw-r--r--id/server/data/deploy/conf/moa-id/MOAIdentities.xsd59
-rw-r--r--id/server/data/deploy/conf/moa-id/SampleIdentities.xml34
-rw-r--r--id/server/data/deploy/conf/moa-id/SampleMOAIDConfiguration.xml131
-rw-r--r--id/server/data/deploy/conf/moa-id/SampleMOAIDConfigurationProxy.xml151
-rw-r--r--id/server/data/deploy/conf/moa-id/SampleMOAIDConfiguration_withTestBKs.xml130
-rw-r--r--id/server/data/deploy/conf/moa-id/SampleMOAIDConfiguration_withTestBKsProxy.xml151
-rw-r--r--id/server/data/deploy/conf/moa-id/SampleMOAWIDConfiguration.xml113
-rw-r--r--id/server/data/deploy/conf/moa-id/SampleMOAWIDConfigurationProxy.xml131
-rw-r--r--id/server/data/deploy/conf/moa-id/SampleMOAWIDConfiguration_withTestBKs.xml117
-rw-r--r--id/server/data/deploy/conf/moa-id/SampleMOAWIDConfiguration_withTestBKsProxy.xml132
-rw-r--r--id/server/data/deploy/conf/moa-id/certs/ca-certs/A-Trust-nQual-03.cerbin0 -> 979 bytes
-rw-r--r--id/server/data/deploy/conf/moa-id/certs/ca-certs/a-sign-SSL-03.cerbin0 -> 1147 bytes
-rw-r--r--id/server/data/deploy/conf/moa-id/certs/ca-certs/gateway.stammzahlenregister.gv.at.cerbin0 -> 1356 bytes
-rw-r--r--id/server/data/deploy/conf/moa-id/log4j.properties25
-rw-r--r--id/server/data/deploy/conf/moa-id/oa/BasicOAConfiguration.xml9
-rw-r--r--id/server/data/deploy/conf/moa-id/oa/HeaderOAConfiguration.xml10
-rw-r--r--id/server/data/deploy/conf/moa-id/oa/ParamOAConfiguration.xml10
-rw-r--r--id/server/data/deploy/conf/moa-id/oa/SampleOAConfiguration.xml9
-rw-r--r--id/server/data/deploy/conf/moa-id/oa/SamplewbPKOAConfiguration.xml9
-rw-r--r--id/server/data/deploy/conf/moa-id/sampleTemplates/LIESMICH_TEMPLATES.txt26
-rw-r--r--id/server/data/deploy/conf/moa-id/sampleTemplates/ParepInputProcessorSignTemplate.html61
-rw-r--r--id/server/data/deploy/conf/moa-id/sampleTemplates/SampleBKUSelectionTemplate.html44
-rw-r--r--id/server/data/deploy/conf/moa-id/sampleTemplates/SampleInputProcessorSignTemplate.html39
-rw-r--r--id/server/data/deploy/conf/moa-id/sampleTemplates/SampleTemplate.html56
-rw-r--r--id/server/data/deploy/conf/moa-id/transforms/TransformsInfoAuthBlockTable_DE.xml176
-rw-r--r--id/server/data/deploy/conf/moa-id/transforms/TransformsInfoAuthBlockTable_EN.xml176
-rw-r--r--id/server/data/deploy/conf/moa-spss/SampleMOASPSSConfiguration.xml71
-rw-r--r--id/server/data/deploy/conf/moa-spss/profiles/MOAIDTransformAuthBlockTable_DE.xml174
-rw-r--r--id/server/data/deploy/conf/moa-spss/profiles/MOAIDTransformAuthBlockTable_EN.xml174
-rw-r--r--id/server/data/deploy/conf/moa-spss/sslKeys/customer1/moa-ssl-kunde1.derbin0 -> 1076 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/sslKeys/customer1/moa-ssl-kunde1[pwd=kunde1].p12bin0 -> 4893 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/sslKeys/customer1/trustedServers[pwd=servers].keystorebin0 -> 1202 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/sslKeys/customer2/moa-ssl-kunde2.derbin0 -> 1076 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/sslKeys/customer2/moa-ssl-kunde2[pwd=kunde2].p12bin0 -> 4893 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/sslKeys/customer2/trustedServers[pwd=servers].keystorebin0 -> 1202 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/sslKeys/server/moa-ssl-server.derbin0 -> 1115 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/sslKeys/tomcat/tomcat[pwd=server].keystorebin0 -> 4481 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/sslKeys/tomcat/trustedClients[pwd=clients].keystorebin0 -> 1078 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-Qual-01.20011130-20041130.SerNo01f6(SecureSignatureKeypair).cerbin0 -> 901 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-Qual-01.20011215-20041215.SerNo021e(SecureSignatureKeypair).cerbin0 -> 901 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-Qual-01.20020207-20050207.SerNo0291(SecureSignatureKeypair).cerbin0 -> 1110 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-Qual-01.20020207-20050207.SerNo210d(SecureSignatureKeypair).cerbin0 -> 1110 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-Qual-01.20041201-20141201.SerNoE243(SecureSignatureKeypair).cerbin0 -> 1111 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-Qual-02.20041203-20141203.SerNoE248(SecureSignatureKeypair).cerbin0 -> 975 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-Qual-03.20080425-20180425.SerNoe694(SecureSignatureKeypair).cerbin0 -> 975 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-nQual-01-20011201-20041201.SerNo0213(CertifiedKeypair).cerbin0 -> 864 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-nQual-01.20010427-20040427.SerNo006f(CertifiedKeypair).cerbin0 -> 860 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-nQual-01.20011212-20041212.SerNo0213(CertifiedKeypair).cerbin0 -> 864 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-nQual-01.20011212-20041212.SerNo0218(CertifiedKeypair).cerbin0 -> 861 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-nQual-01.20040326-20070326.SerNo6632(CertifiedKeypair).cerbin0 -> 864 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-nQual-01.20041201-20141201.SerNoe242(CertifiedKeypair).cerbin0 -> 865 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cerbin0 -> 979 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.derbin0 -> 1747 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/EGIZ_Test_CA_-_User.20070829-20140101.SerNo00.cerbin0 -> 1262 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/a-sign-Premium-Test-Sig-02.20041227-20141201.SerNo00b5ac.cerbin0 -> 1028 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/a-sign-TEST-Qual-01a.20041117-20141117.SerNo00da88.cerbin0 -> 991 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/a-sign-TEST-nQual-01a.20041117-20080630.SerNo00da8b.cerbin0 -> 995 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/mobilkom.A1 Signatur.20040326-20140326.SerNo6646(SecureSignatureKeypair_CertifiedKeypair).cerbin0 -> 1076 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cerbin0 -> 1141 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cerbin0 -> 870 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-Qual-01.20011130-20041130.SerNo01f6(SecureSignatureKeypair).cerbin0 -> 901 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-Qual-01.20011215-20041215.SerNo021e(SecureSignatureKeypair).cerbin0 -> 901 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-Qual-01.20020207-20050207.SerNo0291(SecureSignatureKeypair).cerbin0 -> 1110 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-Qual-01.20020207-20050207.SerNo210d(SecureSignatureKeypair).cerbin0 -> 1110 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-Qual-01.20041201-20141201.SerNoE243(SecureSignatureKeypair).cerbin0 -> 1111 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-Qual-02.20041203-20141203.SerNoE248(SecureSignatureKeypair).cerbin0 -> 975 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-Qual-03.20080425-20180425.SerNoe694(SecureSignatureKeypair).cerbin0 -> 975 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-nQual-01-20011201-20041201.SerNo0213(CertifiedKeypair).cerbin0 -> 864 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-nQual-01.20010427-20040427.SerNo006f(CertifiedKeypair).cerbin0 -> 860 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-nQual-01.20011212-20041212.SerNo0213(CertifiedKeypair).cerbin0 -> 864 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-nQual-01.20011212-20041212.SerNo0218(CertifiedKeypair).cerbin0 -> 861 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-nQual-01.20040326-20070326.SerNo6632(CertifiedKeypair).cerbin0 -> 864 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-nQual-01.20041201-20141201.SerNoe242(CertifiedKeypair).cerbin0 -> 865 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cerbin0 -> 979 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.derbin0 -> 1747 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/mobilkom.A1 Signatur.20040326-20140326.SerNo6646(SecureSignatureKeypair_CertifiedKeypair).cerbin0 -> 1076 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cerbin0 -> 1141 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cerbin0 -> 870 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungMitTestkarten/EGIZ_Test_CA_-_Signaturdienst.20070829-20140101.SerNo02.cerbin0 -> 1272 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungMitTestkarten/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cerbin0 -> 1205 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungMitTestkarten/a-sign-corporate-light-02.cerbin0 -> 1167 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungMitTestkarten/a-sign-corporate-light-03-20051114-20151114.SerNo01AAED.cerbin0 -> 1171 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungOhneTestkarten/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cerbin0 -> 1205 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungOhneTestkarten/a-sign-corporate-light-02.cerbin0 -> 1167 bytes
-rw-r--r--id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungOhneTestkarten/a-sign-corporate-light-03-20051114-20151114.SerNo01AAED.cerbin0 -> 1171 bytes
-rw-r--r--id/server/data/deploy/errorpages/errorpage-auth_debug.jsp53
-rw-r--r--id/server/data/deploy/errorpages/errorpage-auth_empty.jsp13
-rw-r--r--id/server/data/deploy/errorpages/errorpage-proxy_debug.jsp53
-rw-r--r--id/server/data/deploy/errorpages/errorpage-proxy_empty.jsp13
-rw-r--r--id/server/data/deploy/templates/LIESMICH_TEMPLATES.txt39
-rw-r--r--id/server/data/deploy/tomcat/catalina.policy244
-rw-r--r--id/server/data/deploy/tomcat/tomcat-4.1.x/server.mod_jk.xml162
-rw-r--r--id/server/data/deploy/tomcat/tomcat-4.1.x/server.xml171
-rw-r--r--id/server/data/deploy/tomcat/tomcat-5.0.x/server.mod_jk.xml386
-rw-r--r--id/server/data/deploy/tomcat/tomcat-5.0.x/server.xml388
-rw-r--r--id/server/data/deploy/tomcat/tomcat-util-4.1.27-patched/tomcat-util.jarbin0 -> 178544 bytes
-rw-r--r--id/server/data/deploy/tomcat/unix/tomcat-start.sh28
-rw-r--r--id/server/data/deploy/tomcat/unix/tomcat-stop.sh7
-rw-r--r--id/server/data/deploy/tomcat/uriworkermap.properties9
-rw-r--r--id/server/data/deploy/tomcat/win32/startTomcat.bat26
-rw-r--r--id/server/data/deploy/tomcat/win32/stopTomcat.bat13
-rw-r--r--id/server/data/deploy/tomcat/workers.properties6
-rw-r--r--id/server/doc/Architektur ID.vsdbin0 -> 318464 bytes
-rw-r--r--id/server/doc/MOA ID 1.x.wsdl41
-rw-r--r--id/server/doc/MOA-ID Feinspezifikation.docbin0 -> 268288 bytes
-rw-r--r--id/server/doc/MOA-ID-Configuration-1.5.0.xsd642
-rw-r--r--id/server/doc/MOA-Testzertifikate.pdfbin0 -> 33476 bytes
-rw-r--r--id/server/doc/MOA-Testzertifikate.vsdbin0 -> 316416 bytes
-rw-r--r--id/server/doc/MOA_ID_1.2_20040315.pdfbin0 -> 577309 bytes
-rw-r--r--id/server/doc/MOA_ID_1.3_20060315.pdfbin0 -> 355156 bytes
-rw-r--r--id/server/doc/MOA_ID_1.4_20070802.pdfbin0 -> 239502 bytes
-rw-r--r--id/server/doc/MOA_ID_1.4_Anhang.pdfbin0 -> 286834 bytes
-rw-r--r--id/server/doc/OID-1-0-3.pdfbin0 -> 347041 bytes
-rw-r--r--id/server/doc/bku-auswahl.20030408.pdfbin0 -> 131587 bytes
-rw-r--r--id/server/doc/cs-sstc-schema-assertion-01.xsd194
-rw-r--r--id/server/doc/cs-sstc-schema-protocol-01.xsd127
-rw-r--r--id/server/doc/moa-id.htm7
-rw-r--r--id/server/doc/moa_id/examples/BKUSelectionTemplate.html52
-rw-r--r--id/server/doc/moa_id/examples/ChainingModes.txt6
-rw-r--r--id/server/doc/moa_id/examples/IdentityLinkSigners.txt9
-rw-r--r--id/server/doc/moa_id/examples/LoginServletExample.txt171
-rw-r--r--id/server/doc/moa_id/examples/SampleMOAIDVerifyInfoboxesConfiguration.xml148
-rw-r--r--id/server/doc/moa_id/examples/Template.html50
-rw-r--r--id/server/doc/moa_id/examples/TransformsInfoAuthBlock.txt35
-rw-r--r--id/server/doc/moa_id/examples/conf/MOA-ID-Configuration.xml103
-rw-r--r--id/server/doc/moa_id/examples/conf/OAConfBasicAuth.xml9
-rw-r--r--id/server/doc/moa_id/examples/conf/OAConfHeaderAuth.xml10
-rw-r--r--id/server/doc/moa_id/examples/conf/OAConfParamAuth.xml10
-rw-r--r--id/server/doc/moa_id/examples/moa-id-env.sh.txt15
-rw-r--r--id/server/doc/moa_id/examples/startTomcat.bat.txt26
-rw-r--r--id/server/doc/moa_id/faqs.htm217
-rw-r--r--id/server/doc/moa_id/id-admin.htm321
-rw-r--r--id/server/doc/moa_id/id-admin_1.htm549
-rw-r--r--id/server/doc/moa_id/id-admin_2.htm1477
-rw-r--r--id/server/doc/moa_id/id-admin_3.htm204
-rw-r--r--id/server/doc/moa_id/id-anwendung.htm104
-rw-r--r--id/server/doc/moa_id/id-anwendung_1.htm211
-rw-r--r--id/server/doc/moa_id/id-anwendung_2.htm247
-rw-r--r--id/server/doc/moa_id/links.htm145
-rw-r--r--id/server/doc/moa_id/moa-id-ablauf.jpgbin0 -> 15550 bytes
-rw-r--r--id/server/doc/moa_id/moa.htm258
-rw-r--r--id/server/doc/moa_images/east.gifbin0 -> 966 bytes
-rw-r--r--id/server/doc/moa_images/idle.gifbin0 -> 869 bytes
-rw-r--r--id/server/doc/moa_images/moa_diagramm1.jpgbin0 -> 60602 bytes
-rw-r--r--id/server/doc/moa_images/moa_thema.gifbin0 -> 25120 bytes
-rw-r--r--id/server/doc/moa_images/north.gifbin0 -> 967 bytes
-rw-r--r--id/server/doc/moa_images/pfeil.gifbin0 -> 843 bytes
-rw-r--r--id/server/doc/moa_images/print.gifbin0 -> 211 bytes
-rw-r--r--id/server/doc/moa_images/select.gifbin0 -> 880 bytes
-rw-r--r--id/server/doc/moa_images/south.gifbin0 -> 965 bytes
-rw-r--r--id/server/doc/moa_images/transdot.gifbin0 -> 43 bytes
-rw-r--r--id/server/doc/moa_images/west.gifbin0 -> 966 bytes
-rw-r--r--id/server/idserverlib/.classpath9
-rw-r--r--id/server/idserverlib/.project36
-rw-r--r--id/server/idserverlib/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--id/server/idserverlib/.settings/org.eclipse.wst.common.component7
-rw-r--r--id/server/idserverlib/.settings/org.eclipse.wst.common.project.facet.core.xml7
-rw-r--r--id/server/idserverlib/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--id/server/idserverlib/pom.xml197
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/AuthenticationException.java46
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/BuildException.java49
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/ECDSAConverterException.java49
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/MOAIDException.java174
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/ParseException.java49
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/ServiceException.java49
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java1905
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationSessionCleaner.java67
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthConstants.java107
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthInitializer.java180
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/WrongParametersException.java38
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationAssertionBuilder.java103
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationBlockAssertionBuilder.java362
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationDataAssertionBuilder.java172
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/BPKBuilder.java94
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/Builder.java74
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/CertInfoVerifyXMLSignatureRequestBuilder.java99
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/CreateXMLSignatureRequestBuilder.java252
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/CreateXMLSignatureRequestBuilderForeign.java126
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/DataURLBuilder.java98
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilder.java231
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/GetVerifyAuthBlockFormBuilder.java101
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/InfoboxReadRequestBuilder.java101
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/InfoboxReadRequestBuilderCertificate.java94
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/InfoboxValidatorParamsBuilder.java97
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/PersonDataBuilder.java74
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SAMLArtifactBuilder.java92
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SAMLResponseBuilder.java106
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SelectBKUFormBuilder.java78
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/VerifyXMLSignatureRequestBuilder.java363
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/AuthenticationSession.java630
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/CreateXMLSignatureResponse.java88
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/ExtendedSAMLAttribute.java88
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/ExtendedSAMLAttributeImpl.java152
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/IdentityLink.java281
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/InfoboxToken.java80
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/InfoboxTokenImpl.java144
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/InfoboxValidationResult.java72
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/InfoboxValidationResultImpl.java116
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/InfoboxValidatorParams.java195
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/InfoboxValidatorParamsImpl.java384
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/SAMLAttribute.java94
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/Schema.java41
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/SchemaImpl.java78
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/VerifyXMLSignatureResponse.java215
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationInvoker.java107
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/CreateXMLSignatureResponseParser.java234
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/ErrorResponseParser.java87
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/ExtendedInfoboxReadResponseParser.java172
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/IdentityLinkAssertionParser.java334
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/InfoboxReadResponseParser.java231
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/SAMLArtifactParser.java73
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/VerifyXMLSignatureResponseParser.java178
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AuthServlet.java249
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/ConfigurationServlet.java97
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GetAuthenticationDataService.java150
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GetForeignIDServlet.java309
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GetMISSessionIDServlet.java174
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/ProcessValidatorInputServlet.java249
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/SelectBKUServlet.java145
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/StartAuthenticationServlet.java165
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyAuthenticationBlockServlet.java169
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyCertificateServlet.java337
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyIdentityLinkServlet.java203
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/CreateXMLSignatureResponseValidator.java293
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/IdentityLinkValidator.java177
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/InfoboxValidator.java96
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/ValidateException.java50
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/VerifyXMLSignatureResponseValidator.java196
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepInputProcessor.java83
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepInputProcessorImpl.java314
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepUtils.java733
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepValidator.java598
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/PartyRepresentative.java174
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/CreateIdentityLinkResponse.java41
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/CreateMandateRequest.java272
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/CreateMandateResponse.java135
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/SOAPConstants.java32
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/SZRGWClient.java387
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/SZRGWClientException.java52
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/SZRGWConstants.java69
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/SZRGWSecureSocketFactory.java139
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/config/ParepConfiguration.java427
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationBuilder.java989
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationException.java46
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationProvider.java143
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConnectionParameter.java121
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/OAParameter.java115
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/TargetToSectorNameMapper.java67
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/TargetsAndSectorNames.java194
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java478
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameter.java350
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/VerifyInfoboxParameter.java402
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/VerifyInfoboxParameters.java150
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/proxy/OAConfiguration.java188
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/proxy/OAProxyParameter.java199
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/proxy/ProxyConfigurationBuilder.java256
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/proxy/ProxyConfigurationProvider.java203
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/AuthenticationData.java409
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/Cookie.java134
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/CookieManager.java129
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/IssuerAndSerial.java126
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/SAMLStatus.java74
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/config/CertStoreConfigurationImpl.java111
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/config/LoggerConfigImpl.java66
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/config/PKIConfigurationImpl.java81
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/config/RevocationConfigurationImpl.java55
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/config/ValidationConfigurationImpl.java66
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/pki/PKIProfileImpl.java201
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/pki/jsse/MOAIDTrustManager.java134
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/servertools/observer/ObservableImpl.java61
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/ConnectionBuilder.java79
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/ConnectionBuilderFactory.java83
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/DefaultConnectionBuilder.java196
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/DefaultLoginParameterResolver.java158
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/ElakConnectionBuilder.java273
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/EnhancedConnectionBuilder.java232
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/LoginParameterResolver.java101
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/LoginParameterResolverException.java52
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/LoginParameterResolverFactory.java97
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/MOAIDProxyInitializer.java110
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/NotAllowedException.java54
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/XMLLoginParameterResolverEncryptedData.java693
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/XMLLoginParameterResolverPlainData.java437
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/builder/SAMLRequestBuilder.java70
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/invoke/GetAuthenticationDataInvoker.java158
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/parser/AuthenticationDataAssertionParser.java173
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/parser/SAMLResponseParser.java115
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/servlet/ConfigurationServlet.java86
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/servlet/ProxyException.java50
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/servlet/ProxyServlet.java901
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/AxisSecureSocketFactory.java227
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ECDSAConstants.java51
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ECDSAKeyValueConverter.java587
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/HTTPRequestJSPForwarder.java91
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/HTTPUtils.java83
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/InOrderServletRequestWrapper.java403
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/MOAIDMessageProvider.java73
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ParamValidatorUtils.java480
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ParameterInOrderFilter.java77
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/Random.java46
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/SSLUtils.java205
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ServletUtils.java140
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/client/mis/simple/MISMandate.java48
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/client/mis/simple/MISSessionId.java22
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/client/mis/simple/MISSimpleClient.java261
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/client/mis/simple/MISSimpleClientException.java22
-rw-r--r--id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties173
-rw-r--r--id/server/idserverlib/src/main/resources/resources/templates/ParepMinTemplate.html135
-rw-r--r--id/server/idserverlib/src/main/resources/resources/templates/ParepTemplate.html171
-rw-r--r--id/server/idserverlib/src/main/resources/resources/wsdl/MOA-ID-1.0.wsdl40
-rw-r--r--id/server/idserverlib/src/main/resources/resources/wsdl/MOA-ID-1.x.wsdl40
-rw-r--r--id/server/idserverlib/src/main/resources/resources/wsdl/MOA-SPSS-1.2.xsd454
-rw-r--r--id/server/idserverlib/src/main/resources/resources/xmldata/CertInfoDsigSignature.xml139
-rw-r--r--id/server/idserverlib/src/test/java/test/MOAIDTestCase.java218
-rw-r--r--id/server/idserverlib/src/test/java/test/abnahme/A/Test100StartAuthentication.java187
-rw-r--r--id/server/idserverlib/src/test/java/test/abnahme/A/Test200VerifyIdentityLink.java384
-rw-r--r--id/server/idserverlib/src/test/java/test/abnahme/A/Test300VerifyAuthBlock.java624
-rw-r--r--id/server/idserverlib/src/test/java/test/abnahme/A/Test400GetAuthenticationData.java152
-rw-r--r--id/server/idserverlib/src/test/java/test/abnahme/A/Test500StartAuthenticationServlet.java320
-rw-r--r--id/server/idserverlib/src/test/java/test/abnahme/A/Test600GetAuthenticationDataService.java296
-rw-r--r--id/server/idserverlib/src/test/java/test/abnahme/A/Test700SelectBKU.java78
-rw-r--r--id/server/idserverlib/src/test/java/test/abnahme/AbnahmeTestCase.java180
-rw-r--r--id/server/idserverlib/src/test/java/test/abnahme/AllTests.java64
-rw-r--r--id/server/idserverlib/src/test/java/test/abnahme/C/Test100Konfiguration.java75
-rw-r--r--id/server/idserverlib/src/test/java/test/abnahme/P/Test100LoginParameterResolver.java150
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/AllTests.java56
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/UnitTestCase.java50
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/AuthenticationServerTest.java71
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/MOAIDAuthInitialiserTest.java62
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/AllTests.java48
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/AuthenticationBlockAssertionBuilderTest.java62
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/CreateXMLSignatureBuilderTest.java120
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilderTest.java88
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/InfoboxReadRequestBuilderTest.java44
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/PersonDataBuilderTest.java66
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/SAMLArtifactBuilderTest.java67
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/VerifyXMLSignatureRequestBuilderTest.java108
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/invoke/MOASPSSTestCase.java53
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationTest.java181
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/AllTests.java44
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/IdentityLinkAssertionParserTest.java152
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/InfoboxReadResponseParserTest.java82
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/SAMLArtifactParserTest.java70
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/servlet/GetAuthenticationDataServiceTest.java106
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/config/auth/MOAIDAuthConfigurationProviderTest.java127
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/config/proxy/MOAIDProxyConfigurationProviderTest.java142
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/AllTests.java46
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/builder/DOMTreeCompare.java477
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/builder/SAMLRequestBuilderTest.java47
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/builder/SAMLRequestCompare.java34
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/parser/SAMLResponseParserTest.java195
-rw-r--r--id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/util/SSLUtilsTest.java107
-rw-r--r--id/server/idserverlib/src/test/java/test/lasttest/Dispatcher.java79
-rw-r--r--id/server/idserverlib/src/test/java/test/lasttest/HostnameVerifierHack.java28
-rw-r--r--id/server/idserverlib/src/test/java/test/lasttest/LasttestClient.java233
-rw-r--r--id/server/idserverlib/src/test/java/test/lasttest/TestThread.java266
-rw-r--r--id/server/licenses/APACHE-LICENSE-2.0.txt202
-rw-r--r--id/server/licenses/IAIK-LICENSE.txt13
-rw-r--r--id/server/pom.xml27
-rw-r--r--id/server/proxy/.classpath12
-rw-r--r--id/server/proxy/.project37
-rw-r--r--id/server/proxy/.settings/.jsdtscope11
-rw-r--r--id/server/proxy/.settings/org.eclipse.jdt.core.prefs5
-rw-r--r--id/server/proxy/.settings/org.eclipse.jdt.core.prefs.merge-left.r11135
-rw-r--r--id/server/proxy/.settings/org.eclipse.jdt.core.prefs.merge-right.r11137
-rw-r--r--id/server/proxy/.settings/org.eclipse.jdt.core.prefs.working7
-rw-r--r--id/server/proxy/.settings/org.eclipse.wst.common.component17
-rw-r--r--id/server/proxy/.settings/org.eclipse.wst.common.project.facet.core.xml5
-rw-r--r--id/server/proxy/.settings/org.eclipse.wst.jsdt.ui.superType.container1
-rw-r--r--id/server/proxy/.settings/org.eclipse.wst.jsdt.ui.superType.name1
-rw-r--r--id/server/proxy/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--id/server/proxy/pom.xml118
-rw-r--r--id/server/proxy/src/main/webapp/META-INF/MANIFEST.MF3
-rw-r--r--id/server/proxy/src/main/webapp/WEB-INF/web.xml82
-rw-r--r--id/server/proxy/src/main/webapp/errorpage-proxy.jsp50
-rw-r--r--id/server/proxy/src/main/webapp/message-proxy.jsp20
-rw-r--r--id/templates/.classpath12
-rw-r--r--id/templates/.project37
-rw-r--r--id/templates/.settings/.jsdtscope11
-rw-r--r--id/templates/.settings/org.eclipse.jdt.core.prefs5
-rw-r--r--id/templates/.settings/org.eclipse.jdt.core.prefs.merge-left.r11135
-rw-r--r--id/templates/.settings/org.eclipse.jdt.core.prefs.merge-right.r11137
-rw-r--r--id/templates/.settings/org.eclipse.jdt.core.prefs.working7
-rw-r--r--id/templates/.settings/org.eclipse.wst.common.component8
-rw-r--r--id/templates/.settings/org.eclipse.wst.common.project.facet.core.xml5
-rw-r--r--id/templates/.settings/org.eclipse.wst.jsdt.ui.superType.container1
-rw-r--r--id/templates/.settings/org.eclipse.wst.jsdt.ui.superType.name1
-rw-r--r--id/templates/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--id/templates/pom.xml25
-rw-r--r--id/templates/src/main/webapp/META-INF/MANIFEST.MF3
-rw-r--r--id/templates/src/main/webapp/SampleBKUSelectionTemplate.html52
-rw-r--r--id/templates/src/main/webapp/SampleInputProcessorSignTemplate.html45
-rw-r--r--id/templates/src/main/webapp/SampleLogo.gifbin0 -> 24664 bytes
-rw-r--r--id/templates/src/main/webapp/SampleTemplate.html47
-rw-r--r--id/templates/src/main/webapp/WEB-INF/web.xml9
-rw-r--r--id/templates/src/main/webapp/css/display.css52
-rw-r--r--id/templates/src/main/webapp/css/main.css74
-rw-r--r--id/templates/src/main/webapp/valid-html401.gifbin0 -> 2328 bytes
-rw-r--r--pom.xml433
-rw-r--r--repository/at/gv/egovernment/moa/id/mandate-validate/1.1/mandate-validate-1.1.jarbin0 -> 24292 bytes
-rw-r--r--repository/at/gv/egovernment/moa/id/mandate-validate/1.1/mandate-validate-1.1.jar.md51
-rw-r--r--repository/at/gv/egovernment/moa/id/mandate-validate/1.1/mandate-validate-1.1.jar.sha11
-rw-r--r--repository/at/gv/egovernment/moa/id/mandate-validate/1.1/mandate-validate-1.1.pom7
-rw-r--r--repository/at/gv/egovernment/moa/id/mandate-validate/1.1/mandate-validate-1.1.pom.md51
-rw-r--r--repository/at/gv/egovernment/moa/id/mandate-validate/1.1/mandate-validate-1.1.pom.sha11
-rw-r--r--repository/dav4j/dav4j/0.1/dav4j-0.1.jarbin0 -> 323880 bytes
-rw-r--r--repository/dav4j/dav4j/0.1/dav4j-0.1.pom7
-rw-r--r--repository/dav4j/dav4j/maven-metadata-local.xml11
-rw-r--r--repository/httpsclient/httpsclient/JSSE-1.0/httpsclient-JSSE-1.0.jarbin0 -> 216839 bytes
-rw-r--r--repository/httpsclient/httpsclient/JSSE-1.0/httpsclient-JSSE-1.0.pom7
-rw-r--r--repository/httpsclient/httpsclient/maven-metadata-local.xml11
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Provider/1.2.4/iaik_Pkcs11Provider-1.2.4.jarbin0 -> 350831 bytes
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Provider/1.2.4/iaik_Pkcs11Provider-1.2.4.jar.md51
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Provider/1.2.4/iaik_Pkcs11Provider-1.2.4.jar.sha11
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Provider/1.2.4/iaik_Pkcs11Provider-1.2.4.pom7
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Provider/1.2.4/iaik_Pkcs11Provider-1.2.4.pom.md51
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Provider/1.2.4/iaik_Pkcs11Provider-1.2.4.pom.sha11
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Provider/1.2.6/iaik_Pkcs11Provider-1.2.6.jarbin0 -> 340956 bytes
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Provider/1.2.6/iaik_Pkcs11Provider-1.2.6.jar.md51
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Provider/1.2.6/iaik_Pkcs11Provider-1.2.6.jar.sha11
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Provider/1.2.6/iaik_Pkcs11Provider-1.2.6.pom7
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Provider/1.2.6/iaik_Pkcs11Provider-1.2.6.pom.md51
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Provider/1.2.6/iaik_Pkcs11Provider-1.2.6.pom.sha11
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Provider/maven-metadata-central.xml14
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Provider/maven-metadata-central.xml.md51
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Provider/maven-metadata-central.xml.sha11
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Provider/maven-metadata.xml14
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Provider/maven-metadata.xml.md51
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Provider/maven-metadata.xml.sha11
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-linux.sobin0 -> 113226 bytes
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-linux.so.md51
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-linux.so.sha11
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-linux_x64.sobin0 -> 119858 bytes
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-linux_x64.so.md51
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-linux_x64.so.sha11
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-solaris_sparc.sobin0 -> 151944 bytes
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-solaris_sparc.so.md51
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-solaris_sparc.so.sha11
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-solaris_sparcv9.sobin0 -> 211040 bytes
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-solaris_sparcv9.so.md51
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-solaris_sparcv9.so.sha11
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-win32.dllbin0 -> 98304 bytes
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-win32.dll.md51
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-win32.dll.sha11
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-wince30arm.dllbin0 -> 67584 bytes
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-wince30arm.dll.md51
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-wince30arm.dll.sha11
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16.jarbin0 -> 257600 bytes
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16.jar.md51
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16.jar.sha11
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16.pom7
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16.pom.md51
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16.pom.sha11
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-linux.sobin0 -> 120041 bytes
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-linux.so.md51
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-linux.so.sha11
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-linux_x64.sobin0 -> 130203 bytes
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-linux_x64.so.md51
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-linux_x64.so.sha11
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-solaris_sparc.sobin0 -> 159280 bytes
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-solaris_sparc.so.md51
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-solaris_sparc.so.sha11
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-solaris_sparcv9.sobin0 -> 219768 bytes
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-solaris_sparcv9.so.md51
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-solaris_sparcv9.so.sha11
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-win32.dllbin0 -> 91136 bytes
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-win32.dll.md51
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-win32.dll.sha11
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-win64.dllbin0 -> 104960 bytes
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-win64.dll.md51
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-win64.dll.sha11
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17.jarbin0 -> 271088 bytes
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17.jar.md51
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17.jar.sha11
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17.pom7
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17.pom.md51
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17.pom.sha11
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/maven-metadata-central.xml14
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/maven-metadata-central.xml.md51
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/maven-metadata-central.xml.sha11
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/maven-metadata.xml14
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/maven-metadata.xml.md51
-rw-r--r--repository/iaik/prod/iaik_Pkcs11Wrapper/maven-metadata.xml.sha11
-rw-r--r--repository/iaik/prod/iaik_X509TrustManager/0.2/iaik_X509TrustManager-0.2.jarbin0 -> 3635 bytes
-rw-r--r--repository/iaik/prod/iaik_X509TrustManager/0.2/iaik_X509TrustManager-0.2.jar.md51
-rw-r--r--repository/iaik/prod/iaik_X509TrustManager/0.2/iaik_X509TrustManager-0.2.jar.sha11
-rw-r--r--repository/iaik/prod/iaik_X509TrustManager/0.2/iaik_X509TrustManager-0.2.pom7
-rw-r--r--repository/iaik/prod/iaik_X509TrustManager/0.2/iaik_X509TrustManager-0.2.pom.md51
-rw-r--r--repository/iaik/prod/iaik_X509TrustManager/0.2/iaik_X509TrustManager-0.2.pom.sha11
-rw-r--r--repository/iaik/prod/iaik_X509TrustManager/maven-metadata-central.xml13
-rw-r--r--repository/iaik/prod/iaik_X509TrustManager/maven-metadata-central.xml.md51
-rw-r--r--repository/iaik/prod/iaik_X509TrustManager/maven-metadata-central.xml.sha11
-rw-r--r--repository/iaik/prod/iaik_X509TrustManager/maven-metadata.xml13
-rw-r--r--repository/iaik/prod/iaik_X509TrustManager/maven-metadata.xml.md51
-rw-r--r--repository/iaik/prod/iaik_X509TrustManager/maven-metadata.xml.sha11
-rw-r--r--repository/iaik/prod/iaik_cms/4.01_MOA/iaik_cms-4.01_MOA.jarbin0 -> 340782 bytes
-rw-r--r--repository/iaik/prod/iaik_cms/4.01_MOA/iaik_cms-4.01_MOA.jar.md51
-rw-r--r--repository/iaik/prod/iaik_cms/4.01_MOA/iaik_cms-4.01_MOA.jar.sha11
-rw-r--r--repository/iaik/prod/iaik_cms/4.01_MOA/iaik_cms-4.01_MOA.pom6
-rw-r--r--repository/iaik/prod/iaik_cms/4.01_MOA/iaik_cms-4.01_MOA.pom.md51
-rw-r--r--repository/iaik/prod/iaik_cms/4.01_MOA/iaik_cms-4.01_MOA.pom.sha11
-rw-r--r--repository/iaik/prod/iaik_cms/4.1_MOA/iaik_cms-4.1_MOA.jarbin0 -> 364606 bytes
-rw-r--r--repository/iaik/prod/iaik_cms/4.1_MOA/iaik_cms-4.1_MOA.pom6
-rw-r--r--repository/iaik/prod/iaik_cms/maven-metadata.xml15
-rw-r--r--repository/iaik/prod/iaik_cms/maven-metadata.xml.md51
-rw-r--r--repository/iaik/prod/iaik_cms/maven-metadata.xml.sha11
-rw-r--r--repository/iaik/prod/iaik_ecc/2.16/iaik_ecc-2.16.jarbin0 -> 146013 bytes
-rw-r--r--repository/iaik/prod/iaik_ecc/2.16/iaik_ecc-2.16.jar.md51
-rw-r--r--repository/iaik/prod/iaik_ecc/2.16/iaik_ecc-2.16.jar.sha11
-rw-r--r--repository/iaik/prod/iaik_ecc/2.16/iaik_ecc-2.16.pom6
-rw-r--r--repository/iaik/prod/iaik_ecc/2.16/iaik_ecc-2.16.pom.md51
-rw-r--r--repository/iaik/prod/iaik_ecc/2.16/iaik_ecc-2.16.pom.sha11
-rw-r--r--repository/iaik/prod/iaik_ecc/2.19/iaik_ecc-2.19.jarbin0 -> 111446 bytes
-rw-r--r--repository/iaik/prod/iaik_ecc/2.19/iaik_ecc-2.19.jar.md51
-rw-r--r--repository/iaik/prod/iaik_ecc/2.19/iaik_ecc-2.19.jar.sha11
-rw-r--r--repository/iaik/prod/iaik_ecc/2.19/iaik_ecc-2.19.pom6
-rw-r--r--repository/iaik/prod/iaik_ecc/2.19/iaik_ecc-2.19.pom.md51
-rw-r--r--repository/iaik/prod/iaik_ecc/2.19/iaik_ecc-2.19.pom.sha11
-rw-r--r--repository/iaik/prod/iaik_ecc/maven-metadata.xml12
-rw-r--r--repository/iaik/prod/iaik_ecc/maven-metadata.xml.md51
-rw-r--r--repository/iaik/prod/iaik_ecc/maven-metadata.xml.sha11
-rw-r--r--repository/iaik/prod/iaik_ixsil/1.2.2.3/iaik_ixsil-1.2.2.3.jarbin0 -> 205081 bytes
-rw-r--r--repository/iaik/prod/iaik_ixsil/1.2.2.3/iaik_ixsil-1.2.2.3.jar.md51
-rw-r--r--repository/iaik/prod/iaik_ixsil/1.2.2.3/iaik_ixsil-1.2.2.3.jar.sha11
-rw-r--r--repository/iaik/prod/iaik_ixsil/1.2.2.3/iaik_ixsil-1.2.2.3.pom7
-rw-r--r--repository/iaik/prod/iaik_ixsil/1.2.2.3/iaik_ixsil-1.2.2.3.pom.md51
-rw-r--r--repository/iaik/prod/iaik_ixsil/1.2.2.3/iaik_ixsil-1.2.2.3.pom.sha11
-rw-r--r--repository/iaik/prod/iaik_ixsil/1.2.2.4/iaik_ixsil-1.2.2.4.jarbin0 -> 205197 bytes
-rw-r--r--repository/iaik/prod/iaik_ixsil/1.2.2.4/iaik_ixsil-1.2.2.4.jar.md51
-rw-r--r--repository/iaik/prod/iaik_ixsil/1.2.2.4/iaik_ixsil-1.2.2.4.jar.sha11
-rw-r--r--repository/iaik/prod/iaik_ixsil/1.2.2.4/iaik_ixsil-1.2.2.4.pom7
-rw-r--r--repository/iaik/prod/iaik_ixsil/1.2.2.4/iaik_ixsil-1.2.2.4.pom.md51
-rw-r--r--repository/iaik/prod/iaik_ixsil/1.2.2.4/iaik_ixsil-1.2.2.4.pom.sha11
-rw-r--r--repository/iaik/prod/iaik_ixsil/maven-metadata-MOA.xml12
-rw-r--r--repository/iaik/prod/iaik_jce_full/3.16_MOA/iaik_jce_full-3.16_MOA.jarbin0 -> 854872 bytes
-rw-r--r--repository/iaik/prod/iaik_jce_full/3.16_MOA/iaik_jce_full-3.16_MOA.jar.md51
-rw-r--r--repository/iaik/prod/iaik_jce_full/3.16_MOA/iaik_jce_full-3.16_MOA.jar.sha11
-rw-r--r--repository/iaik/prod/iaik_jce_full/3.16_MOA/iaik_jce_full-3.16_MOA.pom6
-rw-r--r--repository/iaik/prod/iaik_jce_full/3.16_MOA/iaik_jce_full-3.16_MOA.pom.md51
-rw-r--r--repository/iaik/prod/iaik_jce_full/3.16_MOA/iaik_jce_full-3.16_MOA.pom.sha11
-rw-r--r--repository/iaik/prod/iaik_jce_full/3.18_MOA/iaik_jce_full-3.18_MOA.jarbin0 -> 919238 bytes
-rw-r--r--repository/iaik/prod/iaik_jce_full/3.18_MOA/iaik_jce_full-3.18_MOA.jar.md51
-rw-r--r--repository/iaik/prod/iaik_jce_full/3.18_MOA/iaik_jce_full-3.18_MOA.jar.sha11
-rw-r--r--repository/iaik/prod/iaik_jce_full/3.18_MOA/iaik_jce_full-3.18_MOA.pom6
-rw-r--r--repository/iaik/prod/iaik_jce_full/3.18_MOA/iaik_jce_full-3.18_MOA.pom.md51
-rw-r--r--repository/iaik/prod/iaik_jce_full/3.18_MOA/iaik_jce_full-3.18_MOA.pom.sha11
-rw-r--r--repository/iaik/prod/iaik_jce_full/4.0_MOA/iaik_jce_full-4.0_MOA.jarbin0 -> 999669 bytes
-rw-r--r--repository/iaik/prod/iaik_jce_full/4.0_MOA/iaik_jce_full-4.0_MOA.pom6
-rw-r--r--repository/iaik/prod/iaik_jce_full/maven-metadata-central.xml15
-rw-r--r--repository/iaik/prod/iaik_jce_full/maven-metadata-central.xml.md51
-rw-r--r--repository/iaik/prod/iaik_jce_full/maven-metadata-central.xml.sha11
-rw-r--r--repository/iaik/prod/iaik_jce_full/maven-metadata.xml15
-rw-r--r--repository/iaik/prod/iaik_jce_full/maven-metadata.xml.md51
-rw-r--r--repository/iaik/prod/iaik_jce_full/maven-metadata.xml.sha11
-rw-r--r--repository/iaik/prod/iaik_moa/1.23/iaik_moa-1.23.jarbin0 -> 696910 bytes
-rw-r--r--repository/iaik/prod/iaik_moa/1.23/iaik_moa-1.23.jar.md51
-rw-r--r--repository/iaik/prod/iaik_moa/1.23/iaik_moa-1.23.jar.sha11
-rw-r--r--repository/iaik/prod/iaik_moa/1.23/iaik_moa-1.23.pom6
-rw-r--r--repository/iaik/prod/iaik_moa/1.23/iaik_moa-1.23.pom.md51
-rw-r--r--repository/iaik/prod/iaik_moa/1.23/iaik_moa-1.23.pom.sha11
-rw-r--r--repository/iaik/prod/iaik_moa/1.24/iaik_moa-1.24.jarbin0 -> 697496 bytes
-rw-r--r--repository/iaik/prod/iaik_moa/1.24/iaik_moa-1.24.jar.md51
-rw-r--r--repository/iaik/prod/iaik_moa/1.24/iaik_moa-1.24.jar.sha11
-rw-r--r--repository/iaik/prod/iaik_moa/1.24/iaik_moa-1.24.pom7
-rw-r--r--repository/iaik/prod/iaik_moa/1.24/iaik_moa-1.24.pom.md51
-rw-r--r--repository/iaik/prod/iaik_moa/1.24/iaik_moa-1.24.pom.sha11
-rw-r--r--repository/iaik/prod/iaik_moa/1.26/iaik_moa-1.26.jarbin0 -> 710601 bytes
-rw-r--r--repository/iaik/prod/iaik_moa/1.26/iaik_moa-1.26.jar.md51
-rw-r--r--repository/iaik/prod/iaik_moa/1.26/iaik_moa-1.26.jar.sha11
-rw-r--r--repository/iaik/prod/iaik_moa/1.26/iaik_moa-1.26.pom7
-rw-r--r--repository/iaik/prod/iaik_moa/1.26/iaik_moa-1.26.pom.md51
-rw-r--r--repository/iaik/prod/iaik_moa/1.26/iaik_moa-1.26.pom.sha11
-rw-r--r--repository/iaik/prod/iaik_moa/1.27/iaik_moa-1.27.jarbin0 -> 711034 bytes
-rw-r--r--repository/iaik/prod/iaik_moa/1.28/iaik_moa-1.28.jarbin0 -> 711652 bytes
-rw-r--r--repository/iaik/prod/iaik_moa/1.28/iaik_moa-1.28.pom6
-rw-r--r--repository/iaik/prod/iaik_moa/1.29/iaik_moa-1.29.jarbin0 -> 711857 bytes
-rw-r--r--repository/iaik/prod/iaik_moa/1.29/iaik_moa-1.29.pom6
-rw-r--r--repository/iaik/prod/iaik_moa/maven-metadata-MOA.xml16
-rw-r--r--repository/iaik/prod/iaik_moa/maven-metadata-local.xml12
-rw-r--r--repository/xalan-bin-dist/serializer/2.7.0/serializer-2.7.0.jarbin0 -> 188993 bytes
-rw-r--r--repository/xalan-bin-dist/serializer/2.7.0/serializer-2.7.0.jar.md51
-rw-r--r--repository/xalan-bin-dist/serializer/2.7.0/serializer-2.7.0.jar.sha11
-rw-r--r--repository/xalan-bin-dist/serializer/2.7.0/serializer-2.7.0.pom6
-rw-r--r--repository/xalan-bin-dist/serializer/2.7.0/serializer-2.7.0.pom.md51
-rw-r--r--repository/xalan-bin-dist/serializer/2.7.0/serializer-2.7.0.pom.sha11
-rw-r--r--repository/xalan-bin-dist/serializer/maven-metadata.xml11
-rw-r--r--repository/xalan-bin-dist/serializer/maven-metadata.xml.md51
-rw-r--r--repository/xalan-bin-dist/serializer/maven-metadata.xml.sha11
-rw-r--r--repository/xalan-bin-dist/xalan/2.7.0/xalan-2.7.0.jarbin0 -> 3078601 bytes
-rw-r--r--repository/xalan-bin-dist/xalan/2.7.0/xalan-2.7.0.jar.md51
-rw-r--r--repository/xalan-bin-dist/xalan/2.7.0/xalan-2.7.0.jar.sha11
-rw-r--r--repository/xalan-bin-dist/xalan/2.7.0/xalan-2.7.0.pom6
-rw-r--r--repository/xalan-bin-dist/xalan/2.7.0/xalan-2.7.0.pom.md51
-rw-r--r--repository/xalan-bin-dist/xalan/2.7.0/xalan-2.7.0.pom.sha11
-rw-r--r--repository/xalan-bin-dist/xalan/maven-metadata.xml11
-rw-r--r--repository/xalan-bin-dist/xalan/maven-metadata.xml.md51
-rw-r--r--repository/xalan-bin-dist/xalan/maven-metadata.xml.sha11
-rw-r--r--repository/xalan-bin-dist/xml-apis/2.7.0/xml-apis-2.7.0.jarbin0 -> 194205 bytes
-rw-r--r--repository/xalan-bin-dist/xml-apis/2.7.0/xml-apis-2.7.0.jar.md51
-rw-r--r--repository/xalan-bin-dist/xml-apis/2.7.0/xml-apis-2.7.0.jar.sha11
-rw-r--r--repository/xalan-bin-dist/xml-apis/2.7.0/xml-apis-2.7.0.pom6
-rw-r--r--repository/xalan-bin-dist/xml-apis/2.7.0/xml-apis-2.7.0.pom.md51
-rw-r--r--repository/xalan-bin-dist/xml-apis/2.7.0/xml-apis-2.7.0.pom.sha11
-rw-r--r--repository/xalan-bin-dist/xml-apis/maven-metadata.xml11
-rw-r--r--repository/xalan-bin-dist/xml-apis/maven-metadata.xml.md51
-rw-r--r--repository/xalan-bin-dist/xml-apis/maven-metadata.xml.sha11
-rw-r--r--spss/assembly-lib.xml157
-rw-r--r--spss/assembly.xml143
-rw-r--r--spss/handbook/.classpath6
-rw-r--r--spss/handbook/.project29
-rw-r--r--spss/handbook/.settings/org.eclipse.jdt.core.prefs5
-rw-r--r--spss/handbook/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--spss/handbook/clients/.classpath6
-rw-r--r--spss/handbook/clients/.project29
-rw-r--r--spss/handbook/clients/.settings/org.eclipse.jdt.core.prefs5
-rw-r--r--spss/handbook/clients/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--spss/handbook/clients/api/.classpath7
-rw-r--r--spss/handbook/clients/api/.project29
-rw-r--r--spss/handbook/clients/api/.settings/org.eclipse.jdt.core.prefs5
-rw-r--r--spss/handbook/clients/api/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--spss/handbook/clients/api/pom.xml137
-rw-r--r--spss/handbook/clients/api/signatures/SimpleSignature.xml23
-rw-r--r--spss/handbook/clients/api/src/main/java/at/gv/egovernment/moa/spss/handbook/clients/api/CreateXMLSignature.java145
-rw-r--r--spss/handbook/clients/api/src/main/java/at/gv/egovernment/moa/spss/handbook/clients/api/VerifyXMLSignature.java162
-rw-r--r--spss/handbook/clients/pom.xml26
-rw-r--r--spss/handbook/clients/referencedData/.classpath12
-rw-r--r--spss/handbook/clients/referencedData/.project37
-rw-r--r--spss/handbook/clients/referencedData/.settings/.jsdtscope11
-rw-r--r--spss/handbook/clients/referencedData/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--spss/handbook/clients/referencedData/.settings/org.eclipse.wst.common.component8
-rw-r--r--spss/handbook/clients/referencedData/.settings/org.eclipse.wst.common.project.facet.core.xml5
-rw-r--r--spss/handbook/clients/referencedData/.settings/org.eclipse.wst.jsdt.ui.superType.container1
-rw-r--r--spss/handbook/clients/referencedData/.settings/org.eclipse.wst.jsdt.ui.superType.name1
-rw-r--r--spss/handbook/clients/referencedData/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--spss/handbook/clients/referencedData/pom.xml39
-rw-r--r--spss/handbook/clients/referencedData/src/main/webapp/META-INF/MANIFEST.MF3
-rw-r--r--spss/handbook/clients/referencedData/src/main/webapp/Text.b641
-rw-r--r--spss/handbook/clients/referencedData/src/main/webapp/Text.txt1
-rw-r--r--spss/handbook/clients/referencedData/src/main/webapp/WEB-INF/web.xml10
-rw-r--r--spss/handbook/clients/referencedData/src/main/webapp/XMLDocument.Para.xsl19
-rw-r--r--spss/handbook/clients/referencedData/src/main/webapp/XMLDocument.signed.xml27
-rw-r--r--spss/handbook/clients/referencedData/src/main/webapp/XMLDocument.withResolvableSchemaHint.xml6
-rw-r--r--spss/handbook/clients/referencedData/src/main/webapp/XMLDocument.withSchemaHint.xml6
-rw-r--r--spss/handbook/clients/referencedData/src/main/webapp/XMLDocument.xml6
-rw-r--r--spss/handbook/clients/referencedData/src/main/webapp/XMLDocument.xsd15
-rw-r--r--spss/handbook/clients/referencedData/src/main/webapp/XMLDocument.xsl18
-rw-r--r--spss/handbook/clients/referencedData/src/main/webapp/XMLDocumentRef.xsl4
-rw-r--r--spss/handbook/clients/webservice/.classpath7
-rw-r--r--spss/handbook/clients/webservice/.project29
-rw-r--r--spss/handbook/clients/webservice/.settings/org.eclipse.jdt.core.prefs5
-rw-r--r--spss/handbook/clients/webservice/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--spss/handbook/clients/webservice/conf/http.properties78
-rw-r--r--spss/handbook/clients/webservice/conf/log4j.properties25
-rw-r--r--spss/handbook/clients/webservice/pom.xml137
-rw-r--r--spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Refs.resp.xml31
-rw-r--r--spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Refs.xml137
-rw-r--r--spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Simple.resp.xml23
-rw-r--r--spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Simple.response.xml24
-rw-r--r--spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Simple.xml19
-rw-r--r--spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Supplements.resp.xml29
-rw-r--r--spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Supplements.response.xml2
-rw-r--r--spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Supplements.xml40
-rw-r--r--spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Transforms.resp.xml39
-rw-r--r--spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Transforms.xml52
-rw-r--r--spss/handbook/clients/webservice/resources/requests/VerifyCMSSignatureRequest.Extended.resp.xml29
-rw-r--r--spss/handbook/clients/webservice/resources/requests/VerifyCMSSignatureRequest.Extended.xml44
-rw-r--r--spss/handbook/clients/webservice/resources/requests/VerifyCMSSignatureRequest.Simple.resp.xml29
-rw-r--r--spss/handbook/clients/webservice/resources/requests/VerifyCMSSignatureRequest.Simple.xml39
-rw-r--r--spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.Enveloped.resp.xml28
-rw-r--r--spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.Enveloped.xml10
-rw-r--r--spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.FileURIs.DataObject.xml82
-rw-r--r--spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.FileURIs.ServerSupplements.xml66
-rw-r--r--spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.FileURIs.Supplements.xml70
-rw-r--r--spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.FileURIs.xml58
-rw-r--r--spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.SigManifest.resp.xml24
-rw-r--r--spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.SigManifest.xml50
-rw-r--r--spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.Simple.resp.xml23
-rw-r--r--spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.Simple.xml30
-rw-r--r--spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.Supplements.resp.xml23
-rw-r--r--spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.Supplements.response.xml23
-rw-r--r--spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.Supplements.xml62
-rw-r--r--spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.XMLDSigManifest.resp.xml23
-rw-r--r--spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.XMLDSigManifest.xml31
-rw-r--r--spss/handbook/clients/webservice/resources/requests/signatures2bverified/CreateXMLSignatureRequest.VerifyXML.Enveloped.response.xml27
-rw-r--r--spss/handbook/clients/webservice/resources/requests/signatures2bverified/CreateXMLSignatureRequest.VerifyXML.Enveloped.xml25
-rw-r--r--spss/handbook/clients/webservice/resources/requests/signatures2bverified/CreateXMLSignatureRequest.VerifyXML.SigManifest.response.xml29
-rw-r--r--spss/handbook/clients/webservice/resources/requests/signatures2bverified/CreateXMLSignatureRequest.VerifyXML.SigManifest.xml30
-rw-r--r--spss/handbook/clients/webservice/resources/requests/signatures2bverified/CreateXMLSignatureRequest.VerifyXML.XMLDSigManifest.response.xml23
-rw-r--r--spss/handbook/clients/webservice/resources/requests/signatures2bverified/CreateXMLSignatureRequest.VerifyXML.XMLDSigManifest.xml18
-rw-r--r--spss/handbook/clients/webservice/resources/requests/transformResults/CreateXMLSignatureRequest.Transforms.hashinput.ref2.txt8
-rw-r--r--spss/handbook/clients/webservice/resources/sslKeys/customer1/moa-ssl-kunde1.derbin0 -> 882 bytes
-rw-r--r--spss/handbook/clients/webservice/resources/sslKeys/customer1/moa-ssl-kunde1[pwd=kunde1].p12bin0 -> 3926 bytes
-rw-r--r--spss/handbook/clients/webservice/resources/sslKeys/customer1/trustedServers[pwd=servers].keystorebin0 -> 943 bytes
-rw-r--r--spss/handbook/clients/webservice/resources/sslKeys/customer2/moa-ssl-kunde2.derbin0 -> 882 bytes
-rw-r--r--spss/handbook/clients/webservice/resources/sslKeys/customer2/moa-ssl-kunde2[pwd=kunde2].p12bin0 -> 3926 bytes
-rw-r--r--spss/handbook/clients/webservice/resources/sslKeys/customer2/trustedServers[pwd=servers].keystorebin0 -> 943 bytes
-rw-r--r--spss/handbook/clients/webservice/src/main/java/at/gv/egovernment/moa/spss/handbook/clients/webservice/HTTP.java219
-rw-r--r--spss/handbook/clients/webservice/src/main/java/at/gv/egovernment/moa/spss/handbook/clients/webservice/HTTPSClientAuth.java137
-rw-r--r--spss/handbook/clients/webservice/src/main/java/at/gv/egovernment/moa/spss/handbook/clients/webservice/HTTPSServerAuth.java140
-rw-r--r--spss/handbook/conf/moa-spss/certstore/01540E2704537AA810D671E1C4106FD8821EB52A/C2556DADDF68A9EEF7F5C14A24CA33BCA930B201bin0 -> 1385 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/032F2123890A879585CE96674CA4C37B55986729/E1201A308CC10323C27D9084B048996E44B8F710bin0 -> 806 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/04462EF01783744F9F4CDE3705FD86D488697C9F/D44EED7580C7792242D73E267A89C7DB25E4BD08bin0 -> 1314 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/083E1A0528C48475951A6610360D813E2713DCC7/7E691392F741B7E4B4AA9A76D75851BDE18BE5A7bin0 -> 864 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/0889EBEC55D9E34E782E6D3C250840EB932EEA2F/9CD9ADF04626E7E8C9A1C8DACE3B0B8A2979C726bin0 -> 1383 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/0A5C2C9276B649D088A86BD9FD97E2B95658481D/08CAE18D8CFF86144CB8FFD671B916CAAB8BD4E9bin0 -> 991 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/0AF04E7099C9829BD1F8437362BA0036E0705C4D/0F843FB1E0C626540BE638B79A2987E2611CE630bin0 -> 1018 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/0AF04E7099C9829BD1F8437362BA0036E0705C4D/69F21C82DC9A7A940ACEC414593E59C9E61E522Fbin0 -> 990 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/0AF04E7099C9829BD1F8437362BA0036E0705C4D/FC72939DC06EDDF8C51549ECF00AC92BF2B39F35bin0 -> 1087 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/0FE419AB943E7E5C6A7190CC6BBE8E3F914C658A/FB356CEF4406D1F135E3FC59026B338D3F518F9Abin0 -> 886 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/10D143E18C03A4A29F783D26F2F67E3B64C35CB0/BE9D654B0DE0F3CC53CA36703DD9D9049A5F9330bin0 -> 995 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/10F17BDACD8DEAA1E8F23FBEAE7B3EC3D9773D1D/E7340D1FB627D8917A9C0D23F21515C441BF1214bin0 -> 1292 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/125E4AC6B38C1E0BF34BF7D927CBB947E35141E8/2CA36B76BC6CCDC29296111A4EFCAFC0553BBC7Dbin0 -> 820 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/15A052B0DC4E0333656264E2FEEBE45B1BE449BF/386C1663C6390BC288DC171522439210AF361958bin0 -> 1000 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/1607988A938D3D339F40AFB567384BC5B7540935/9FDCFE5A082FD69BF5D9E73C25FBE9EA1AC0ACF2bin0 -> 1151 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/1A283D1183DB82A548427B4F19E99E7A8EA728D7/49969819654C230ECDF779ABB9629A211FCC43D6bin0 -> 1353 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/1BF3C1D2767F5C333AD5531531FEE3A712935B73/D0AF386E182F00983637F97C0A5F4708F9F641A7bin0 -> 1157 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/20DD04B052D2D364E5FF851A3FD314F0FD91253E/6814C7316CEA7191C9CB3BE58199B4A957210D9Cbin0 -> 704 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/22973CFC20EA68162A0B2E837D45FB8266ACDBCF/C529469053D9F95810A8F7F2DB9A6596A7655732bin0 -> 913 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/238ACC1D03DA5A2E7E580D760FB3EE218FDC5A97/D3C063F219ED073E34AD5D750B327629FFD59AF2bin0 -> 979 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/1C43C0BA36CC8DE659180B2FAC9A6F54430D5941bin0 -> 991 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/AC36A78C66FEC87CC0FD2C32B49214C65676E0C5bin0 -> 919 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/C92238A7178A6C61F8BACA22D6CF7E50772BA9F0bin0 -> 1018 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/DFAE695342AC81A521025904406884399822B233bin0 -> 987 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/2962CDAADFA0BF8EE53B80870C53E551A43EA72A/12B06E039F1A36D8238AFC508009E1ADF88BF66Fbin0 -> 1253 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/2C976220B378E08DF5E68CBC54C05CE41224FD29/0CC37CC35E18F9909E43E4E9894D0CDF06EE9A38bin0 -> 704 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/2F5DA022AAFF668F34C35A80049D690F3CFE3040/D62327E6B19B7968A8BE6588DEAB0BC0DB684D8Dbin0 -> 914 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/31B5BA02D476873C5220CDCFA0C095C4A31DEFDF/88D6151358A5E3C81D7AE1A536121DC03011BC03bin0 -> 1205 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/328AA897B7E6270202B2FC0889FF88D66BB41122/35A40EF932B1F23980E2C672FC939E91EEBD0317bin0 -> 1262 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/3314CE3E42175EACC28D57C35F192430BBADAC1A/B1D0BC027906A3B7E7518C93ACB26D978233ED27bin0 -> 1171 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/337F895A0435AA7E2629C5282B5A0DBBE19EE1C7/75F792DE2CF544007F470F1B924961C2BD2EF517bin0 -> 802 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/3868959083AA986194E58E73798BCD724D785A0E/66AB66128A44574873E54E6584E450C4EB3B9A1Ebin0 -> 1170 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/3A095C38EB5D5824FE61BE43F9CDF6515DC94805/65698A39E03FF00FD552D4AD99FB290C2B9D4BEAbin0 -> 1018 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/0F5A0342F5CD448799C3C6D178607E3F2B5BCB8Fbin0 -> 861 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/51A44C28F313E3F9CB5E7C0A1E0E0DD2843758AEbin0 -> 865 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/9E0512DD61DA5949D1D8631C3F19D75F496C3733bin0 -> 864 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/E6E6FC88719177C9B7421825757C5E47BCAC85F6bin0 -> 860 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/3B76D7A5CE7EC6022D7990CFEA534C908717DF54/C0C699EFE6E837CB5E4CFC3A61077617A22C1A9Ebin0 -> 1298 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/3C627C9D89A5BFB5E4E385982DF33B7E7F6E8D2D/C5AC86EC5B771BEBDF8B6E040F109A1186E229B9bin0 -> 1234 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/3C7CE93947421CB66603DC7DBAB0F04C4788382F/23E594945195F2414803B4D564D2A3A3F5D88B8Cbin0 -> 791 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/405D86C9D39B1061885678ED90780A0F04A76327/6F61A0C50B4E6ED821F032A4DF3DA7DDDFD2FE6Abin0 -> 1256 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/4224231A54F64581FBA2AB6ED82ADE467F144BDC/65EF37033859C2F709A64086D3A5BD1B8F1A85A4bin0 -> 1045 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/427765A998398EE1B138ABDBA20313DC4A3738A0/07298E24461954E4696D2ED9FFB7D52B57F325B3bin0 -> 1279 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/45E2F3F807C6EAB9EDC1B3250F7558CA12A063DE/3A77E9B577661D99F9BBA5A352B29C7FF58A3D26bin0 -> 914 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/47ED4C584F9DCD54A6C2925252C5603ADAC93F49/84E4E75DBB2FD6397E6ABBD27FBE16D5BA71923Ebin0 -> 1747 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/487F4DEE9E63DADEB4CAAB07E0E166ACC9F584B6/9891BBEA9FDA665EEEC31C403A00A5CA5628D0FAbin0 -> 1391 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/52B42552A440A54C21A39D46D7F176AF28BEB5AA/51AC8CFF36818AA25498A293DF48EBCFFFF6D0B4bin0 -> 1130 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/53CF955B19387A437659158BC050B7BC4B238132/F5F2456D79490C268569970E900C68FD1C7DC8E5bin0 -> 1264 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/550E9627E9094A2D1BB6385821334D02122BCF26/B7BCA7BC3C41FD0DC835175486FAB3FB4626EC0Fbin0 -> 1188 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/562428A359B1CC3A820ABCC9C8F625CBB6A6A510/620127A8E5886A4805403977C3EF7D5EAF881526bin0 -> 870 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/562428A359B1CC3A820ABCC9C8F625CBB6A6A510/FCD9E881BCCCB9352EEF337C8D4EAAD65C4EC830bin0 -> 1141 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/5650A465FD3B5EF83639E11F324A2A0EA98AF935/4B5B0C2A0BF944CD467A6140F8C782E2BE9D15F9bin0 -> 984 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/58090A698038FEDAD56B4B976F23C29950D1D5A5/6BDA1FF41EEBC5DA66912F3C69B60C2A41C6E25Bbin0 -> 1159 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/59484253C7D4C5BEAB7D2BABFAC13DDD1CA53FCC/341EA32E448659125A67DD04177FD17468FCFCB1bin0 -> 1366 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/5E043AA9A832C33C7065B7633F4C007E0394BA19/069519EC949AC6B91D4C33A3F3665441F0220D20bin0 -> 1313 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/5E043AA9A832C33C7065B7633F4C007E0394BA19/2F5EBA5055E9F7444852ADCEEB769E5DE157A03Dbin0 -> 1352 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/60EF765436B4F314F2285BE2D89A511073AC0D58/334710B9169BCD20687A6302EEB16AEB97F288CDbin0 -> 825 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/6144BFC0CBE85C63DEFB6F208D80385B89F68046/D031945D982820B92FADBC7F71F6D1D9DFFDA2C9bin0 -> 1213 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/68AF646E90A6FF370230F64ACD4E8A4F12C03916/CA80A13D41116E24CB1479E970CDC1C030C5907Cbin0 -> 1272 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/6F5F08A3A5D59CA877CB146F00BB0264369B2304/ADEC5673B57A18F16EFAF75EEFBFAD4841E2CD2Bbin0 -> 901 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/6F86F897C45679B45F03C67D44B6447EFF43B758/53CB69CF933C2D28FB9DF91F2852A99EC3352EA0bin0 -> 1546 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/728C819D737EE42627F96F839C33BB6E68E85F68/00845B74CA13FE0A9056E6C0B5126FECF73B0D8Cbin0 -> 740 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/738B34854780955AE8FAF12349F2C9C52105A52C/474BC41135FB88BF58B5A8D976A1D5583378D85Ebin0 -> 1133 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/738B34854780955AE8FAF12349F2C9C52105A52C/6B618820CE6A5EC0B5E63A9170335E5EA9F3BA01bin0 -> 1171 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/76011AE57123CC4E476C094C48C461DC37A0DEDD/FDC348410699803DE7D8276813BC2232EA99A878bin0 -> 835 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/7A9DC855647136050A8D75D6571AC64739F36C6C/BF648929E7DAABD8D97B3202F48D6C4A19C78F6Cbin0 -> 990 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/88D9F0C0EBB72C58516EC96AEED397FA86B40E39/6DCD5118D1542E6C205C580775C5420B7509506Bbin0 -> 1076 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/8B23D64DBA1572885563DF070BE9C22A39A3BD26/3B8484BF1370941BF03F206B5C4958DA4E1559BBbin0 -> 1065 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/8B23D64DBA1572885563DF070BE9C22A39A3BD26/C0EF3E7A54B4C501295F77974B1995E36B25C92Bbin0 -> 1066 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/8FDB1CB752D82C88C89F9E9DA7AD2F54C6FA6F3B/842B3870A64001CDD90978D0E554DAF94D9ABDFEbin0 -> 947 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/9014D44A2072A5D74E12C7FE47F37D68371E1C42/679A4F81FC705DDEC419778DD2EBD875F4C242C6bin0 -> 975 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/91C4DD783D6D38F0325FE74930BF61F656364EA9/53A6B611F8CEE0315BCCE5D59898931ED390E400bin0 -> 761 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/92E5C38466AECA677325C25C3C3011C97D24CCF6/A149EE01A250491C07D5A279D3B58A646288DA22bin0 -> 1185 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/92E5C38466AECA677325C25C3C3011C97D24CCF6/AD8ECBB67B9DC59406F92A296A38192297A4F169bin0 -> 1191 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/96107213A757FFB88DECEE469373162636D7146C/45B43346251FDF9E95DCB7F36928785D46D63913bin0 -> 1136 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/96107213A757FFB88DECEE469373162636D7146C/E33619C88426E4FE956041E6751ADDEC9C10F0BCbin0 -> 1136 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/975729FFAF7EB667BCF68E9B886EA876E44F46D0/35202B14F69409EAA51CD8AB547AC0CD5E993F3Fbin0 -> 1053 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/9C5C7CD895AABBFF23E79907A97FB2D68423CA8E/41E3FCC9470F8634DBCB5CEA7FB688E04E7575BAbin0 -> 1165 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/9D3E6FACCD6AF894CDD2B91D1B9E3C2E310EAB93/3F4E01DF7547CDD38DCCFCCD76170C299ECEB9F6bin0 -> 1030 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/9D3E6FACCD6AF894CDD2B91D1B9E3C2E310EAB93/9D4CB7E3DBF24AE596972D59C375DD6384BB5E8Bbin0 -> 932 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/9D3E6FACCD6AF894CDD2B91D1B9E3C2E310EAB93/A562C4B99E2847251CB4A1F05DA1FF43E7296F0Bbin0 -> 999 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/9F5A9B8D0F919C96B9472442BFBBDD34232A627D/9039DBD29DB8AD0F8E2015F05FCD40582CCCBE8Cbin0 -> 997 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/9F5A9B8D0F919C96B9472442BFBBDD34232A627D/9F0E0FBB25F66FF88C8E033EFF358923C84A2926bin0 -> 930 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/9F5A9B8D0F919C96B9472442BFBBDD34232A627D/C87D1855227D995C332C4C9072A2E2053F2CC623bin0 -> 1028 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/A07E912CAA2AB620034B05353E7D4B91807880ED/42AD1897A4643D2AA634D980F16349E6694F3B1Bbin0 -> 1237 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/A07E912CAA2AB620034B05353E7D4B91807880ED/FE7891B6ED7B178F528A28B21478299F865889BDbin0 -> 1333 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/A15B5DBE14A19CF859F48E2DA2A29A4C3DB4D680/3AC12E21FFF9ACAB2BCFF52BBD885FB7AAC9A02Bbin0 -> 1201 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/A24C49B7F1B637E7F72C12CAB35910EC8EF1C6CF/8784ED81F5A22779EB0B081945FD151992557FBEbin0 -> 1159 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/A4B140FBD4D5EA2AC3A570299945D8FCBBAD2231/20CAECDCA766243AAD6FA1327618FC81BA65DC0Fbin0 -> 1057 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/A4B140FBD4D5EA2AC3A570299945D8FCBBAD2231/96D5D179016A5A6546973BA63733617EE1F1540Dbin0 -> 1058 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/A95F0C3FA54CA93E3D5BA61AD23459300FA498D6/DFA7DDEF5C212F0F0651E2A9DE1CE4A1AC63AF7Abin0 -> 1110 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/A95F0C3FA54CA93E3D5BA61AD23459300FA498D6/E619D25B380B7B13FDA33E8A58CD82D8A88E0515bin0 -> 1111 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/A95F0C3FA54CA93E3D5BA61AD23459300FA498D6/F825578F8F5484DFB40F81867C392D6CB0012B92bin0 -> 1110 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/AAB27F0E98B28AF253454415F6490CB5F43A4B49/A9D28607928FA8615E2615CC9D71B535C5D0D419bin0 -> 734 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/AC1B67D7D5A300767C0944ACE8458DD49960F1BD/4D523730501ADB80A76B0B473A4D21C7D86F8374bin0 -> 1167 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/AF03510E8BCAE72BB7C4E9D1910B4E12057075A4/7AC3EFA52DE27A930EC8754DB5E061476948E914bin0 -> 1028 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/B310CEED301C503EDB15720F94D5D7E76BF423DA/AA94FD422AEB8F5B6E8508314CE0DC68BCD53305bin0 -> 1339 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/B3EB7B59ECFF1E25E16C64BB24993D1B20DCFC28/07A6DEED70213CCF598F278789680DA4C04A0331bin0 -> 1266 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/B749506C821467F7D6F4E8943D07DDED771A7B47/A5A00B223EF24AED92D03F652CFE367CA9D1B200bin0 -> 958 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/BAA9ADD095E87E0B490B6DD933AA2F450C6B9492/7A430B6E3592BEEDFAA0DD5DD6262C27EB8D26D2bin0 -> 920 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/BE47A5DA41A35F740D98305DA8FF4096B71492BE/D1474E7D99512D05B98DD37B3FE86496A03D088Dbin0 -> 922 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/BED4C70D83B5042F4254459064FDEACD43DD1EDF/7BE0C8E441786C69A3CB35BDBEF235F8B5310E04bin0 -> 700 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/BF375B55D8D7CFC31FD8E3FBF7B1981A91A1A6CA/42EFDDE6BFF35ED0BAE6ACDD204C50AE86C4F4FAbin0 -> 975 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/C15FFFE6EFAD484909C9EFC6CD5C20435E326685/DDBAE68B1FF60FFBB2854C78727B76C95EC83BBEbin0 -> 823 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/C2A7CAE9E68EB7945828D193CB22CDD246BC7F95/6955D95F6B0799F7D96F4FC28E6E6C64758C1240bin0 -> 1224 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/C52E4A04A22D98C70E19F1969AD71C838E4371B3/F96FE4F59166EFA9000B21A16EF22CF14468890Cbin0 -> 944 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/C7E1D3604D2A960201D70F29B8A80EDA11475EEB/C18ECC8FD712ACAFBEAEDC1FA13F5AB19930E3EDbin0 -> 406 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/C976280EC7FECF169577E31D8CA0BB00967904B1/7666A8BD2C2513DE489C06D08D566F177ECE84AAbin0 -> 1260 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/CABD2EA6CA438084840DCCAE875F341E2D3A2C43/02A0E6456442E35198532ACFFB6FEE3B606D9FA3bin0 -> 1366 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/CD2D87A57D1568A515128BE9DA8B3CAE7AC007A4/C6658C25AFB8A9D738F2BC591775D167549FFD3Abin0 -> 1264 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/CE91CC7CF2DDDEE6623A1A91B3298DCAD2375F2B/8AB0A3519AFA7F3C04074522678BAA1CB3DC734Fbin0 -> 930 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/CE91CC7CF2DDDEE6623A1A91B3298DCAD2375F2B/DF47B3040E7632614464BD2EC4ECD1B8030F53E3bin0 -> 933 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/CE91CC7CF2DDDEE6623A1A91B3298DCAD2375F2B/E117479B4A41D7F3223FCAE50560B0D57B22217Dbin0 -> 997 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/D4D40BD33958CD9169A7AB6304AA2BBAD22DC595/07976A2A16EC182670161B46886B05E1FEAC16B1bin0 -> 1209 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/D708C897515970D33EF7CD0C2474449D3AB6AA83/52ED0FAFBD38A868C678174D7EB03D266ADB221Cbin0 -> 994 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/DD29E76659D18371B78E61E7DF4D4B8FEDCAF8E7/8BA5C0847597612C7E16970EAE55EF58D32E9CF3bin0 -> 1202 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/DF5F53FDADAFC93F4789141B5A7627EB9F3BD29F/27337257493B86B9BFF78D569F938D692A430EAEbin0 -> 1218 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/DF5F53FDADAFC93F4789141B5A7627EB9F3BD29F/4832F0A28C3724A92F6CB3314F747D0E74FC7344bin0 -> 1217 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/E6A4C843059A6043B4DC967F9EF892B695990777/B4B77C83465979E3679E3A33F972F48EE3730A18bin0 -> 924 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/EA7E6D37E678C1BCA5060F97DAF09F559DFD04B7/3AAD23B00CA10E54E6368DF7952E3F4B5108B65Cbin0 -> 606 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/EEE6351C5C6EBD8644AB88E7648D44FA07C72A80/14E59C02A6877B0EBD2C4203886BA25959C1D267bin0 -> 1020 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/F1B84756A1EAB09C171B2783DD163B42A9BD0BBB/ED5608CE67EA5CB79AC024CEA7445F9BCBE48703bin0 -> 1067 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/F3DA7C495789E656FA27E611CCAFA05F232ADEA0/F3AE9FEA4DECEE5330770A2520BD86909929E7BEbin0 -> 758 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/F48B57F89BACD8687EBB12223A5B8E5EF3774583/CAF84A42305615AC2C582F6412BDA3E36DAC3D25bin0 -> 786 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/F613568C1D7A1300B32609998288211959DBDFB0/D7EDAF7381F7FC93B4C28FA372190D7A59CFA696bin0 -> 660 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/F7D331850EC13D22284909E0FC3493A65FFA7F30/EC988340526163D5B7AC80481B2AC76828EDDC6Cbin0 -> 1157 bytes
-rw-r--r--spss/handbook/conf/moa-spss/keys/common/moa-signaturdienst-allekunden.derbin0 -> 1074 bytes
-rw-r--r--spss/handbook/conf/moa-spss/keys/common/moa-signaturdienst-allekunden[pwd=allekunden].p12bin0 -> 3901 bytes
-rw-r--r--spss/handbook/conf/moa-spss/keys/customer1/moa-signaturdienst-kunde1.derbin0 -> 1106 bytes
-rw-r--r--spss/handbook/conf/moa-spss/keys/customer1/moa-signaturdienst-kunde1[pwd=kunde1].p12bin0 -> 4877 bytes
-rw-r--r--spss/handbook/conf/moa-spss/keys/customer2/moa-signaturdienst-kunde2.derbin0 -> 1254 bytes
-rw-r--r--spss/handbook/conf/moa-spss/keys/customer2/moa-signaturdienst-kunde2[pwd=kunde2].p12bin0 -> 4133 bytes
-rw-r--r--spss/handbook/conf/moa-spss/log4j.properties37
-rw-r--r--spss/handbook/conf/moa-spss/sp.minimum.config.xml54
-rw-r--r--spss/handbook/conf/moa-spss/spss.config.xml160
-rw-r--r--spss/handbook/conf/moa-spss/ss.minimum.config.xml34
-rw-r--r--spss/handbook/conf/moa-spss/sslKeys/server/moa-ssl-server.derbin0 -> 1115 bytes
-rw-r--r--spss/handbook/conf/moa-spss/sslKeys/server/moa-ssl-server[pwd=server].p12bin0 -> 4925 bytes
-rw-r--r--spss/handbook/conf/moa-spss/sslKeys/tomcat/tomcat[pwd=server].keystorebin0 -> 4481 bytes
-rw-r--r--spss/handbook/conf/moa-spss/sslKeys/tomcat/trustedClients[pwd=clients].keystorebin0 -> 1078 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust-nQual-01.20040326-20070326.SerNo6632(CertifiedKeypair).cerbin0 -> 864 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust-nQual-01.20041201-20141201.SerNoe242.cerbin0 -> 865 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cerbin0 -> 979 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.A-Trust-nQual-01.20010427-20040427.SerNo006f[CertifiedKeypair].cerbin0 -> 860 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0213[CertifiedKeypair].cerbin0 -> 864 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0218[CertifiedKeypair].cerbin0 -> 861 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.derbin0 -> 1747 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/EGIZ_Test_CA_-_Root.20070829-20180101.SerNo00.cerbin0 -> 1170 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/MOA_Test_CA.20070823-20131022.Serno01.cerbin0 -> 958 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/a-sign-TEST-nQual-01a.20041117-20080630.SerNo00da8b.cerbin0 -> 995 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/mobilkom.A1-Signatur.20040326-20140326.SerNo6646[SecureSignatureKeypair].cerbin0 -> 1076 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cerbin0 -> 1141 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cerbin0 -> 870 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust-nQual-01.20040326-20070326.SerNo6632(CertifiedKeypair).cerbin0 -> 864 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust-nQual-01.20041201-20141201.SerNoe242.cerbin0 -> 865 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cerbin0 -> 979 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust.A-Trust-nQual-01.20010427-20040427.SerNo006f[CertifiedKeypair].cerbin0 -> 860 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0213[CertifiedKeypair].cerbin0 -> 864 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0218[CertifiedKeypair].cerbin0 -> 861 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.derbin0 -> 1747 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/mobilkom.A1-Signatur.20040326-20140326.SerNo6646.cerbin0 -> 1076 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cerbin0 -> 1141 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cerbin0 -> 870 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test-signerCerts/Dr. Waltraut Kotschy.20070119-20120119.SerNo02de1c.cerbin0 -> 1385 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test-signerCerts/EGIZ_Administrator.20070829-20120829.SerNo00.cerbin0 -> 1273 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test-signerCerts/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cerbin0 -> 1205 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test/EGIZ_Test_CA_-_Signaturdienst.20070829-20140101.SerNo02.cerbin0 -> 1272 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cerbin0 -> 1205 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test/a-sign-corporate-light-03-20051114-20151114.SerNo01aaed.derbin0 -> 1171 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/identityLink-signerCerts/Dr. Waltraut Kotschy-20070119-20120119.SerNo02de1c.derbin0 -> 1385 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/identityLink-signerCerts/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cerbin0 -> 1205 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/identityLink/Nikolaus-Schwab-BM-f-Inneres-20040219-20070219.SerNo5c39.derbin0 -> 1205 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/identityLink/a-sign-corporate-light-03-20051114-20151114.SerNo01aaed.derbin0 -> 1171 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust-Qual-01.20041201-20141201.SerNoE243.cerbin0 -> 1111 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust-Qual-02.20041203-20141203.SerNoE248.cerbin0 -> 975 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust-Qual-03.20080425-20180425.SerNoe694(SecureSignatureKeypair).cerbin0 -> 975 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20011130-20041130.SerNo01f6[SecureSignatureKeypair].cerbin0 -> 901 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20011215-20041215.SerNo021e[SecureSignatureKeypair].cerbin0 -> 901 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo0291[SecureSignatureKeypair].cerbin0 -> 1110 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo210d[SecureSignatureKeypair].cerbin0 -> 1110 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.derbin0 -> 1747 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/EGIZ_Test_CA_-_Root.20070829-20180101.SerNo00.cerbin0 -> 1170 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/MOA_Test_CA.20070823-20131022.Serno01.cerbin0 -> 958 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/a-sign-TEST-Qual-01a.20041117-20141117.SerNo00da88.cerbin0 -> 991 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/mobilkom.A1-Signatur.20040326-20140326.SerNo6646[SecureSignatureKeypair].cerbin0 -> 1076 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cerbin0 -> 1141 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cerbin0 -> 870 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust-Qual-01.20041201-20141201.SerNoE243[SecureSignatureKeypair].cerbin0 -> 1111 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust-Qual-02.20041203-20141203.SerNoE248[SecureSignatureKeypair].cerbin0 -> 975 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust-Qual-03.20080425-20180425.SerNoe694(SecureSignatureKeypair).cerbin0 -> 975 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20011130-20041130.SerNo01f6[SecureSignatureKeypair].cerbin0 -> 901 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20011215-20041215.SerNo021e[SecureSignatureKeypair].cerbin0 -> 901 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo0291[SecureSignatureKeypair].cerbin0 -> 1110 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo210d[SecureSignatureKeypair].cerbin0 -> 1110 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust-Qual-01.20041201-20141201.SerNoE243.cerbin0 -> 1111 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust-Qual-02.20041203-20141203.SerNoE248.cerbin0 -> 975 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust-Qual-03.20080425-20180425.SerNoe694(SecureSignatureKeypair).cerbin0 -> 975 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20011130-20041130.SerNo01f6[SecureSignatureKeypair].cerbin0 -> 901 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20011215-20041215.SerNo021e[SecureSignatureKeypair].cerbin0 -> 901 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo0291[SecureSignatureKeypair].cerbin0 -> 1110 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo210d[SecureSignatureKeypair].cerbin0 -> 1110 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.derbin0 -> 1747 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature/mobilkom.A1-Signatur.20040326-20140326.SerNo6646[SecureSignatureKeypair].cerbin0 -> 1076 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cerbin0 -> 1141 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cerbin0 -> 870 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/test/EGIZ_Test_CA_-_Root.20070829-20180101.SerNo00.cerbin0 -> 1170 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/test/MOA_Test_CA.20070823-20131022.Serno01.cerbin0 -> 958 bytes
-rw-r--r--spss/handbook/handbook.html6
-rw-r--r--spss/handbook/handbook/common/LogoBKA.pngbin0 -> 8062 bytes
-rw-r--r--spss/handbook/handbook/common/LogoMoa4c.3148x3545.jpgbin0 -> 1584855 bytes
-rw-r--r--spss/handbook/handbook/common/LogoMoa4c.jpgbin0 -> 45624 bytes
-rw-r--r--spss/handbook/handbook/common/LogoMoaBw.jpgbin0 -> 41375 bytes
-rw-r--r--spss/handbook/handbook/common/MOA.css300
-rw-r--r--spss/handbook/handbook/config/MOA-SPSS-config-1.4.7.xsd268
-rw-r--r--spss/handbook/handbook/config/config.html1078
-rw-r--r--spss/handbook/handbook/faq/faq.html126
-rw-r--r--spss/handbook/handbook/index.html34
-rw-r--r--spss/handbook/handbook/install/install.html489
-rw-r--r--spss/handbook/handbook/intro/intro.html44
-rw-r--r--spss/handbook/handbook/spec/MOA-SPSS-1.3.pdfbin0 -> 146062 bytes
-rw-r--r--spss/handbook/handbook/spec/MOA-SPSS-1.3.wsdl105
-rw-r--r--spss/handbook/handbook/spec/MOA-SPSS-1.3.xsd469
-rw-r--r--spss/handbook/handbook/usage/usage.html1232
-rw-r--r--spss/handbook/pom.xml24
-rw-r--r--spss/pom.xml25
-rw-r--r--spss/server/.classpath6
-rw-r--r--spss/server/.project29
-rw-r--r--spss/server/.settings/org.eclipse.jdt.core.prefs5
-rw-r--r--spss/server/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--spss/server/history.txt410
-rw-r--r--spss/server/pom.xml26
-rw-r--r--spss/server/readme.inst.txt56
-rw-r--r--spss/server/readme.update.txt133
-rw-r--r--spss/server/serverlib/.classpath9
-rw-r--r--spss/server/serverlib/.project36
-rw-r--r--spss/server/serverlib/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--spss/server/serverlib/.settings/org.eclipse.wst.common.component7
-rw-r--r--spss/server/serverlib/.settings/org.eclipse.wst.common.project.facet.core.xml7
-rw-r--r--spss/server/serverlib/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--spss/server/serverlib/pom.xml245
-rw-r--r--spss/server/serverlib/resources/data/deploy/tomcat/server.mod_jk.xml166
-rw-r--r--spss/server/serverlib/resources/data/deploy/tomcat/server.xml169
-rw-r--r--spss/server/serverlib/resources/data/deploy/tomcat/unix/moa-env.sh12
-rw-r--r--spss/server/serverlib/resources/data/deploy/tomcat/uriworkermap.properties4
-rw-r--r--spss/server/serverlib/resources/data/deploy/tomcat/win32/startTomcat.bat27
-rw-r--r--spss/server/serverlib/resources/data/deploy/tomcat/win32/stopTomcat.bat13
-rw-r--r--spss/server/serverlib/resources/data/deploy/tomcat/workers.properties6
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOAApplicationException.java56
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOAException.java176
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOARuntimeException.java178
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOASystemException.java55
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/Configurator.java75
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SPSSFactory.java1028
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SignatureCreationService.java72
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SignatureVerificationService.java84
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSContent.java43
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentExcplicit.java34
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentReference.java32
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSDataObject.java40
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureRequest.java67
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponse.java36
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponseElement.java48
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/Base64Transform.java28
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/CanonicalizationTransform.java32
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/CheckResult.java40
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/Content.java62
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentBinary.java36
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentLocRef.java32
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentReference.java26
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentXML.java34
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ElementSelector.java43
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/EnvelopedSignatureTransform.java30
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ExclusiveCanonicalizationTransform.java42
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/InputData.java62
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/MetaInfo.java52
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/SignerInfo.java58
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/Transform.java31
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/X509IssuerSerial.java40
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XMLDataObjectAssociation.java40
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathFilter.java53
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathFilter2Transform.java40
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathTransform.java45
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XSLTTransform.java38
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/Base64TransformImpl.java37
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSContentExplicitImpl.java55
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSContentReferenceImpl.java53
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSDataObjectImpl.java61
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CanonicalizationTransformImpl.java40
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CheckResultImpl.java67
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentBinaryImpl.java55
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentImpl.java43
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentLocRefImpl.java59
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentReferenceImpl.java39
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentXMLImpl.java55
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileExplicitImpl.java81
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileIDImpl.java54
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureInfoImpl.java65
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureLocationImpl.java46
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoImpl.java66
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileExplicitImpl.java77
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileIDImpl.java53
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureRequestImpl.java68
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureResponseImpl.java52
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/DataObjectInfoImpl.java94
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ElementSelectorImpl.java62
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/EnvelopedSignatureTransformImpl.java37
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ErrorResponseImpl.java67
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ExclusiveCanonicalizationTransformImpl.java63
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataBinaryImpl.java114
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataXMLImpl.java114
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultImpl.java59
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultInfoImpl.java47
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/MetaInfoImpl.java90
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferenceInfoImpl.java53
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultImpl.java61
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultInfoImpl.java61
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SPSSFactoryImpl.java586
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignatureEnvironmentResponseImpl.java56
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignatureManifestCheckParamsImpl.java67
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignerInfoImpl.java96
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SingleSignatureInfoImpl.java64
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SupplementProfileExplicitImpl.java54
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SupplementProfileIDImpl.java52
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformImpl.java41
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterBinaryImpl.java57
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterImpl.java40
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterURIImpl.java39
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformPatameterHashImpl.java69
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureRequestImpl.java108
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureResponseElementImpl.java77
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSinatureResponseImpl.java52
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifySignatureInfoImpl.java62
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifySignatureLocationImpl.java30
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsDataImpl.java51
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileExplicitImpl.java76
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileIDImpl.java53
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureRequestImpl.java128
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureResponseImpl.java157
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/X509IssuerSerialImpl.java60
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XMLDataObjectAssociationImpl.java60
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathFilter2TransformImpl.java58
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathFilterImpl.java79
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathTransformImpl.java74
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XSLTransformImpl.java52
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureRequestParser.java303
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureResponseBuilder.java134
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/ProfileParser.java300
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/RequestParserUtils.java172
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/ResponseBuilderUtils.java256
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/TransformParser.java261
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureRequestParser.java184
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureResponseBuilder.java118
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureRequestParser.java290
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureResponseBuilder.java327
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfile.java45
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfileExplicit.java45
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfileID.java35
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureInfo.java40
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureLocation.java38
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfo.java42
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfile.java43
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfileExplicit.java41
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfileID.java33
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureRequest.java41
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureResponse.java35
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureResponseElement.java44
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/DataObjectInfo.java63
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/ErrorResponse.java39
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/SignatureEnvironmentResponse.java35
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/SingleSignatureInfo.java47
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ManifestRefsCheckResult.java39
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ManifestRefsCheckResultInfo.java34
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ReferenceInfo.java34
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ReferencesCheckResult.java38
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ReferencesCheckResultInfo.java40
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SignatureManifestCheckParams.java41
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfile.java43
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfileExplicit.java34
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfileID.java33
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameter.java55
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterBinary.java36
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterHash.java41
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterURI.java27
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifySignatureInfo.java42
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifySignatureLocation.java28
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfile.java43
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfileExplicit.java40
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfileID.java33
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyXMLSignatureRequest.java70
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyXMLSignatureResponse.java78
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/CRLDistributionPoint.java180
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationException.java49
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationPartsBuilder.java1305
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationProvider.java743
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/DistributionPoint.java53
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/HardwareCryptoModule.java75
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/HardwareKeyModule.java74
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/IssuerAndSerial.java140
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyGroup.java84
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyGroupEntry.java121
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyModule.java56
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/OCSPDistributionPoint.java48
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/SoftwareKeyModule.java63
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/TrustProfile.java75
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/cmsverify/CMSSignatureVerificationProfileImpl.java52
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/AbstractKeyModuleConfigurationImpl.java51
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/AbstractObservableConfiguration.java63
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/ArchiveConfigurationImpl.java112
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/CRLRetriever.java84
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/CertStoreConfigurationImpl.java65
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/ConfigurationDataImpl.java136
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/DataBaseArchiveParameterImpl.java48
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/DirectoryCertStoreParametersImpl.java96
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/HardwareCryptoModuleConfigurationImpl.java66
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/HardwareKeyModuleConfigurationImpl.java70
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/IaikConfigurator.java188
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/LoggerConfigImpl.java49
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/PKIConfigurationImpl.java95
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/RevocationConfigurationImpl.java80
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/SoftwareKeyModuleConfigurationImpl.java90
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/ValidationConfigurationImpl.java71
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/PKIProfileImpl.java131
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/pathvalidation/ValidationProfileImpl.java122
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/revocation/RevocationProfileImpl.java79
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/store/truststore/TrustStoreProfileImpl.java150
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/Base64TransformationImpl.java58
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/ByteArrayDataObjectImpl.java69
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/ByteStreamDataObjectImpl.java64
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/CanonicalizationImpl.java58
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/DataObjectImpl.java102
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/EnvelopedSignatureTransformationImpl.java57
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/ExclusiveCanonicalizationImpl.java91
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/SigningTimeImpl.java49
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/TransformationImpl.java58
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XMLDataObjectImpl.java61
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XMLNodeListDataObjectImpl.java62
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XMLSignatureImpl.java58
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XPath2FilterImpl.java131
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XPath2TransformationImpl.java97
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XPathTransformationImpl.java113
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XSLTTransformationImpl.java183
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlsign/DataObjectTreatmentImpl.java165
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlsign/XMLSignatureCreationProfileImpl.java301
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlsign/XMLSignatureInsertionLocationImpl.java60
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlverify/XMLSignatureVerificationProfileImpl.java163
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/init/ConfiguratorImpl.java57
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/init/SystemInitializer.java121
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationInvoker.java241
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationProfileFactory.java76
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CreateXMLSignatureResponseBuilder.java86
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/DataObjectFactory.java1000
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/ExternalURIResolver.java162
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/IaikExceptionMapper.java282
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/InvokerUtils.java78
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/ProfileMapper.java264
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/ServiceContextUtils.java66
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/SignatureCreationServiceImpl.java60
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/SignatureVerificationServiceImpl.java87
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/TransformationFactory.java273
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/VerifyCMSSignatureResponseBuilder.java112
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/VerifyXMLSignatureResponseBuilder.java455
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureCreationInvoker.java560
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureCreationProfileFactory.java470
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvoker.java693
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationProfileFactory.java161
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/IaikLog.java141
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/IaikLogFactory.java57
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/IaikLogMsg.java69
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/TransactionId.java53
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/AxisHandler.java449
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/ConfigurationServlet.java135
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/RevocationArchiveCleaner.java93
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/ServiceUtils.java87
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/SignatureCreationService.java126
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/SignatureVerificationService.java166
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/transaction/TransactionContext.java371
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/transaction/TransactionContextManager.java77
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/transaction/TransactionIDGenerator.java66
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/util/IdGenerator.java76
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/util/MessageProvider.java80
-rw-r--r--spss/server/serverlib/src/main/javadoc/overview.html155
-rw-r--r--spss/server/serverlib/src/main/resources/resources/properties/spss_messages_de.properties150
-rw-r--r--spss/server/serverlib/src/main/resources/resources/security/cacertsbin0 -> 7365 bytes
-rw-r--r--spss/server/serverlib/src/main/resources/resources/wsdl/MOA-SPSS-1.3.wsdl105
-rw-r--r--spss/server/serverlib/src/main/resources/resources/wsdl/MOA-SPSS-1.3.xsd469
-rw-r--r--spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/AllTests.java55
-rw-r--r--spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/SPSSTestCase.java97
-rw-r--r--spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/api/xmlbind/AllTests.java39
-rw-r--r--spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureRequestParserTest.java86
-rw-r--r--spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/api/xmlbind/TransformParserTest.java128
-rw-r--r--spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureRequestParserTest.java76
-rw-r--r--spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureRequestParserTest.java96
-rw-r--r--spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/config/AllTests.java35
-rw-r--r--spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/config/ConfigurationProviderTest1.java392
-rw-r--r--spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/config/ConfigurationProviderTest2.java240
-rw-r--r--spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/config/ConfigurationProviderTest3.java181
-rw-r--r--spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/iaik/config/ConfigurationDataImplTest.java164
-rw-r--r--spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/iaik/config/IaikConfiguratorTest.java51
-rw-r--r--spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/AllTests.java40
-rw-r--r--spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationInvokerTest.java78
-rw-r--r--spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/DataObjectFactoryTest.java195
-rw-r--r--spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/TransformationFactoryTest.java216
-rw-r--r--spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureCreationInvokerTest.java78
-rw-r--r--spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvokerTest.java76
-rw-r--r--spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/tools/CertToolTest.java64
-rw-r--r--spss/server/serverws/.classpath13
-rw-r--r--spss/server/serverws/.project39
-rw-r--r--spss/server/serverws/.settings/.jsdtscope11
-rw-r--r--spss/server/serverws/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--spss/server/serverws/.settings/org.eclipse.wst.common.component14
-rw-r--r--spss/server/serverws/.settings/org.eclipse.wst.common.project.facet.core.xml5
-rw-r--r--spss/server/serverws/.settings/org.eclipse.wst.jsdt.ui.superType.container1
-rw-r--r--spss/server/serverws/.settings/org.eclipse.wst.jsdt.ui.superType.name1
-rw-r--r--spss/server/serverws/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--spss/server/serverws/WebContent/META-INF/MANIFEST.MF3
-rw-r--r--spss/server/serverws/WebContent/WEB-INF/web.xml13
-rw-r--r--spss/server/serverws/data/deploy/tomcat/server.mod_jk.xml166
-rw-r--r--spss/server/serverws/data/deploy/tomcat/server.xml169
-rw-r--r--spss/server/serverws/data/deploy/tomcat/unix/moa-env.sh12
-rw-r--r--spss/server/serverws/data/deploy/tomcat/uriworkermap.properties4
-rw-r--r--spss/server/serverws/data/deploy/tomcat/win32/startTomcat.bat27
-rw-r--r--spss/server/serverws/data/deploy/tomcat/win32/stopTomcat.bat13
-rw-r--r--spss/server/serverws/data/deploy/tomcat/workers.properties6
-rw-r--r--spss/server/serverws/data/deploy/tools/certtool.bat25
-rw-r--r--spss/server/serverws/data/deploy/tools/certtool.sh20
-rw-r--r--spss/server/serverws/data/deploy/tools/configtool.bat25
-rw-r--r--spss/server/serverws/data/deploy/tools/configtool.sh20
-rw-r--r--spss/server/serverws/pom.xml124
-rw-r--r--spss/server/serverws/resources/properties/spss_messages_de.properties151
-rw-r--r--spss/server/serverws/resources/security/cacertsbin0 -> 7365 bytes
-rw-r--r--spss/server/serverws/resources/wsdl/MOA-SPSS-1.3.wsdl105
-rw-r--r--spss/server/serverws/resources/wsdl/MOA-SPSS-1.3.xsd469
-rw-r--r--spss/server/serverws/spec/MOA-SPSS-1.3.docbin0 -> 559616 bytes
-rw-r--r--spss/server/serverws/src/main/webapp/META-INF/MANIFEST.MF3
-rw-r--r--spss/server/serverws/src/main/webapp/WEB-INF/server-config.wsdd48
-rw-r--r--spss/server/serverws/src/main/webapp/WEB-INF/web.xml55
-rw-r--r--spss/server/tools/.classpath8
-rw-r--r--spss/server/tools/.project29
-rw-r--r--spss/server/tools/.settings/org.eclipse.jdt.core.prefs5
-rw-r--r--spss/server/tools/.settings/org.maven.ide.eclipse.prefs9
-rw-r--r--spss/server/tools/pom.xml68
-rw-r--r--spss/server/tools/src/main/java/at/gv/egovernment/moa/spss/server/tools/CertTool.java242
-rw-r--r--spss/server/tools/src/main/java/at/gv/egovernment/moa/spss/server/tools/ConfigTool.java59
-rw-r--r--spss/server/tools/src/main/resources/tools/ConfigurationMapper.xsl343
-rw-r--r--spss/server/tools/src/main/scripts/certtool.bat25
-rw-r--r--spss/server/tools/src/main/scripts/certtool.sh20
-rw-r--r--spss/server/tools/src/main/scripts/configtool.bat25
-rw-r--r--spss/server/tools/src/main/scripts/configtool.sh20
-rw-r--r--todos.txt22
1432 files changed, 114462 insertions, 0 deletions
diff --git a/.classpath b/.classpath
new file mode 100644
index 000000000..f93d181b5
--- /dev/null
+++ b/.classpath
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/.project b/.project
new file mode 100644
index 000000000..39ef529c0
--- /dev/null
+++ b/.project
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>MOA</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..ecfce1f61
--- /dev/null
+++ b/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,5 @@
+#Tue Jul 07 16:07:12 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.source=1.4
diff --git a/.settings/org.maven.ide.eclipse.prefs b/.settings/org.maven.ide.eclipse.prefs
new file mode 100644
index 000000000..5c026f6b8
--- /dev/null
+++ b/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,9 @@
+#Tue Jul 07 16:06:45 CEST 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
diff --git a/IAIK-LICENSE.txt b/IAIK-LICENSE.txt
new file mode 100644
index 000000000..4fa412cf8
--- /dev/null
+++ b/IAIK-LICENSE.txt
@@ -0,0 +1,108 @@
+Stiftung SIC License Agreement for "IAIK MOA"
+
+Valid from December 1st, 2005
+
+The Stiftung SIC
+Stiftung Secure Information and Communication Technologies
+Inffeldgasse16a, A-8010 Graz, Austria, hereafter referred to as "Stiftung SIC",
+offers to grant licences for the SOFTWARE defined below according to the following conditions:
+
+1. DEFINITIONS
+For the purpose of this Licence Agreement, the following definitions are valid:
+
+a. The term "SOFTWARE" refers to the "IAIK MOA" bundle in any
+form (object code or other) including documentation. The
+SOFTWARE is the sole property of Stiftung SIC and protected by
+Austrian, International Copyright Law, e.g. the Revised Berne
+Convention, and the US Copyright Act.
+
+b. "IAIK MOA" is distributed in documentation, manuals, and user
+guides, tools - including any revisions, patches and updates
+downloaded by the customer.
+
+c."IAIK MOA Runtime Modules" means the runtime object code
+modules provided with, or derived from the SOFTWARE.
+
+d. "MOA modules" mean the modules for online applications made
+available by the Austrian Federal Chancellery and they consist of
+MOA-Signature Creation (MOA-SS), MOA-Signature Verification
+(MOA-SP) and MOA-Identification (MOA-ID).
+
+2. GRANTING of LICENCES
+
+The licensee is granted as specified below:
+
+o IAIK MOA Runtime License
+Stiftung SIC grants the Licensee a non-exclusive, non-transferable runtime licence to use the
+"IAIK MOA" modules in the context of unmodified MOA modules. Any attempt to use any parts or
+the whole IAIK Crypto Toolkits which come bundled together with the MOA modules for any
+purpose other than accessing these MOA modules by applications, including, but not limited to,
+the development of applications, the creation of a toolkit, or inclusion in a different toolkit, is not
+permitted without additional licenses. These licences are not transferable to contractors or any
+other persons, organisations or companies outside the licensee's organisation without making
+such persons, organisations or companies explicitly aware of the restrictions of these licenses
+and such persons, organisations or companies explicitly agree to observe these restrictions.
+
+3. LIMITATIONS for all LICENCES:
+LICENSEES must not attempt to reverse engineer, decompile, disassemble, reverse, translate or in
+any other manner decode the computer programmes in the IAIK libraries in order to derive the
+source code there from.
+
+4. WARRANTY:
+Stiftung SIC guarantees that the SOFTWARE is free of any computer virus or other malicious
+hidden routines that would intentionally cause damage to or corrupt data, storage media or
+equipment. For proving the integrity of the SOFTWARE, Stiftung SIC may calculate a SHA-1 hash
+value over the distribution file and publish it on its web site. It is the duty of the licensee to verify this
+hash value. If the hash value cannot be verified, Stiftung SIC declines any warranties on that
+software, and the licensee should immediately (or within 30 days of delivery at the latest), contact
+Stiftung SIC for verification and reshipment.
+The SOFTWARE is provided "as is" and except for the declaration and warranty stated in this
+section, Stiftung SIC makes no representations, conditions or warranties, either express or implied,
+relative to the SOFTWARE or services provided hereunder, including all implied conditions or
+warranties of merchantability and fitness for a particular purpose and all conditions with respect to
+intellectual property infringement. Stiftung SIC may, but shall not be obliged to, fix errors in any
+SOFTWARE.
+
+5. PROPRIETARY INFORMATION and CONFIDENTIALITY:
+The LICENSEE acknowledges that the SOFTWARE remains the property of, and is confidential to,
+Stiftung SIC and incorporates trade secrets of Stiftung SIC, and that Stiftung SIC shall have the
+exclusive right to any copyrights or patents in respect of the SOFTWARE. The LICENSEE agrees to
+maintain the confidentiality of the SOFTWARE.
+The LICENSEE further agrees that (with the exception of paragraph 2 above), he shall not make
+any disclosure of the SOFTWARE (including copies thereof or methods or concepts utilised therein)
+to any person or entity, other than employees of the LICENSEE, to whom such disclosure is
+necessary in order to use the SOFTWARE as provided herein. The LICENSEE shall appropriately
+notify each employee to whom any such disclosure is made. Such disclosure must be made in
+confidence and shall be kept in confidence by the employee in question.
+The LICENSEE agrees to use diligent and determined efforts to secure and protect the
+SOFTWARE and copies thereof in a manner consistent with their proprietary character and the
+maintenance of Licensor's rights therein, and without limitation thereof, to take appropriate action,
+by instruction or agreement with its employees who are permitted access to the SOFTWARE or
+copies thereof, or otherwise, to satisfy its obligations as hereby stated.
+
+6. TERMINATION:
+Stiftung SIC may terminate this Agreement without prior notice, if the licensee 1. neglects or fails to
+perform or observe, or correct a breach of its obligations to Stiftung SIC; 2. goes out of business,
+files a bankruptcy petition or has such a petition filed involuntarily against it or becomes insolvent; 3.
+develops, sells, licenses or distributes or attempts to develop, sell, license or distribute any software
+based on the SOFTWARE which is outside the scope of the limited rights granted herein, to any
+third party. In the event of such a termination, the Licensee shall immediately destroy all copies and
+ensure that all backup copies are destroyed as well.
+
+Stiftung SIC may at any time stop granting free licenses of the SOFTWARE in combination with the
+MOA modules without prior notice. In this case, all licenses granted until that time remain valid, i.e.
+allow the licensee to continue using the SOFTWARE in combination with the unmodified MOA
+modules.
+
+7. LIABILITY:
+To the maximum extent allowed by applicable law Stiftung SIC shall not be liable for any damages
+whatsoever (including, without limitation, damages for loss of business profits, business interruption,
+loss of business information, or other pecuniary loss) arising out of the use of or inability to use the
+SOFTWARE, even if Stiftung SIC has been advised of the possibility of such damages.
+
+8. WAIVER:
+Invalidity, on legal grounds, of any term of this Agreement does not render the Agreement as a whole
+invalid.
+
+9. GOVERNING LAW, ARBITRATION:
+This Agreement is governed by Austrian law.
diff --git a/LICENSE-2.0.txt b/LICENSE-2.0.txt
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/LICENSE-2.0.txt
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/NOTICE.txt b/NOTICE.txt
new file mode 100644
index 000000000..1296eeb2c
--- /dev/null
+++ b/NOTICE.txt
@@ -0,0 +1,16 @@
+MOA-ID/SP/SS
+Copyright 2008 Federal Chancellery Austria
+
+This product includes software originally developed at the
+Austrian Federal Computing Centre (BRZ - Bundesrechenzentrum,
+www.brz.gv.at) and the Federal Chancellery Austria (Stabsstelle
+IKT-Strategie des Bundes, Bundeskanzleramt,
+www.digitales.oesterreich.gv.at).
+
+This product includes software developed by third parties
+and provided under an open source license (www.opensource.org).
+
+This product includes software "IAIK MOA" provided by
+Stiftung Secure Information and Communication Technologies SIC
+(www.sic.st). This software has been licensed under the terms
+and conditions given in "IAIK-LICENSE". \ No newline at end of file
diff --git a/build.bat b/build.bat
new file mode 100644
index 000000000..ae6a940c5
--- /dev/null
+++ b/build.bat
@@ -0,0 +1,10 @@
+@echo off
+
+mvn %1 source:jar source:test-jar install package assembly:assembly
+
+rem 2 stufiger Build-Prozess mit Javadoc
+rem call mvn %1 source:jar source:test-jar install
+rem echo ################################################################################################
+rem echo Errorlevel:%ErrorLevel%
+rem If not ErrorLevel 0 goto ende
+rem call mvn javadoc:jar package assembly:assembly
diff --git a/common/.classpath b/common/.classpath
new file mode 100644
index 000000000..acbdc4f5b
--- /dev/null
+++ b/common/.classpath
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/common/.project b/common/.project
new file mode 100644
index 000000000..bde7e0e97
--- /dev/null
+++ b/common/.project
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>moa-common</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ </natures>
+</projectDescription>
diff --git a/common/.settings/org.eclipse.jdt.core.prefs b/common/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..af8eeb2ca
--- /dev/null
+++ b/common/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Wed Jan 16 15:02:15 CET 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.source=1.4
diff --git a/common/.settings/org.eclipse.wst.common.component b/common/.settings/org.eclipse.wst.common.component
new file mode 100644
index 000000000..6351b73de
--- /dev/null
+++ b/common/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="moa-common">
+ <wb-resource deploy-path="/" source-path="/src/main/java"/>
+ <wb-resource deploy-path="/" source-path="/src/main/resources"/>
+ </wb-module>
+</project-modules>
diff --git a/common/.settings/org.eclipse.wst.common.project.facet.core.xml b/common/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 000000000..8b6262d32
--- /dev/null
+++ b/common/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <fixed facet="jst.utility"/>
+ <fixed facet="jst.java"/>
+ <installed facet="jst.java" version="1.4"/>
+ <installed facet="jst.utility" version="1.0"/>
+</faceted-project>
diff --git a/common/.settings/org.maven.ide.eclipse.prefs b/common/.settings/org.maven.ide.eclipse.prefs
new file mode 100644
index 000000000..6d43bf12f
--- /dev/null
+++ b/common/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,9 @@
+#Tue Jul 07 16:06:47 CEST 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
diff --git a/common/pom.xml b/common/pom.xml
new file mode 100644
index 000000000..117200229
--- /dev/null
+++ b/common/pom.xml
@@ -0,0 +1,85 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>MOA</groupId>
+ <artifactId>MOA</artifactId>
+ <version>1.5.0</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>MOA</groupId>
+ <artifactId>moa-common</artifactId>
+ <version>1.5.0</version>
+ <packaging>jar</packaging>
+ <name>MOA common library</name>
+
+ <properties>
+ <repositoryPath>${basedir}/../repository</repositoryPath>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_jce_full</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>jaxen</groupId>
+ <artifactId>jaxen</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>saxpath</groupId>
+ <artifactId>saxpath</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>xalan</artifactId>
+ <scope>compile</scope>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>xml-apis</artifactId>
+ <scope>compile</scope>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>serializer</artifactId>
+ <scope>runtime</scope>
+ <optional>true</optional>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <addMavenDescriptor>false</addMavenDescriptor>
+ </archive>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/common/src/main/java/at/gv/egovernment/moa/logging/LogMsg.java b/common/src/main/java/at/gv/egovernment/moa/logging/LogMsg.java
new file mode 100644
index 000000000..890bbeff7
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/logging/LogMsg.java
@@ -0,0 +1,58 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.logging;
+
+/**
+ * A unified message type to log messages from inside the MOA subsystem.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class LogMsg {
+ /** The message to log. */
+ private Object message;
+
+ /**
+ * Create a <code>LogMsg</code> object.
+ *
+ * @param message The actual message to log. May be <code>null</code>.
+ */
+ public LogMsg(Object message) {
+ this.message = message;
+ }
+
+ /**
+ * Convert this log message to a <code>String</code>.
+ *
+ * @return The <code>String</code> representation of this log message.
+ */
+ public String toString() {
+ StringBuffer msg = new StringBuffer();
+ LoggingContext ctx =
+ LoggingContextManager.getInstance().getLoggingContext();
+ String tid = ctx != null ? ctx.getTransactionID() : null;
+ String nodeId = ctx != null ? ctx.getNodeID() : null;
+
+ msg.append("TID=");
+ msg.append(tid != null ? tid : "<null>");
+ msg.append(" NID=");
+ msg.append(nodeId != null ? nodeId : "<null>");
+ msg.append(" MSG=");
+ msg.append(message != null ? message.toString() : "<null>");
+
+ return msg.toString();
+ }
+}
diff --git a/common/src/main/java/at/gv/egovernment/moa/logging/Logger.java b/common/src/main/java/at/gv/egovernment/moa/logging/Logger.java
new file mode 100644
index 000000000..dd36bfc4b
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/logging/Logger.java
@@ -0,0 +1,190 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.logging;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * A utility class acting as a facade to the logging subsystem.
+ *
+ * Configure the logging defaultHierarchy that the <code>Logger</code> uses by
+ * calling <code>setHierarchy</code> once before calling any of the logging
+ * output functions.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class Logger {
+
+ /** The default logging hierarchy. */
+ private static String defaultHierarchy = "";
+
+ /**
+ * Get the <code>Log</code> object for the default hierarchy.
+ *
+ * @return The <code>Log</code> object to write log messages to.
+ */
+ private static Log getLog() {
+ return LogFactory.getLog(defaultHierarchy);
+ }
+
+ /**
+ * Get the <code>Log</code> object for a given hierarchy.
+ *
+ * @param hierarchy The logging hierarchy for which to return the logger.
+ * @return The <code>Log</code> object to write log messages to.
+ */
+ private static Log getLog(String hierarchy) {
+ return LogFactory.getLog(hierarchy);
+ }
+
+ /**
+ * Set the default hierarchy to which the <code>Logger</code> should send its
+ * logging output.
+ * @param hierarchy The logging defaultHierarchy.
+ */
+ public static void setHierarchy(String hierarchy) {
+ defaultHierarchy = hierarchy;
+ }
+
+ /**
+ * Test, if the trace log level is enabled.
+ *
+ * @return boolean <code>true</code>, if tracing output is enabled
+ * <code>false</code> otherwise.
+ */
+ public static boolean isTraceEnabled() {
+ return getLog().isTraceEnabled();
+ }
+
+ /**
+ * Test, if the trace log level is enabled for a given hierarchy.
+ *
+ * @param hierarchy requested log hierarchy
+ * @return boolean <code>true</code>, if tracing output is enabled
+ * <code>false</code> otherwise.
+ */
+ public static boolean isTraceEnabled(String hierarchy) {
+ return getLog(hierarchy).isTraceEnabled();
+ }
+
+ /**
+ * Trace a message.
+ *
+ * @param message The message to trace.
+ */
+ public static void trace(Object message) {
+ getLog().trace(message);
+ }
+
+ /**
+ * Test, if the debug log level is enabled.
+ *
+ * @return boolean <code>true</code>, if debug output is enabled
+ * <code>false</code> otherwise.
+ */
+ public static boolean isDebugEnabled() {
+ return getLog().isDebugEnabled();
+ }
+
+ /**
+ * Test, if the debug log level is enabled for a given hierarchy.
+ *
+ * @param hierarchy requested log hierarchy
+ * @return boolean <code>true</code>, if debug output is enabled
+ * <code>false</code> otherwise.
+ */
+ public static boolean isDebugEnabled(String hierarchy) {
+ return getLog(hierarchy).isDebugEnabled();
+ }
+
+ /**
+ * Log a debug message.
+ *
+ * @param message The message to log.
+ */
+ public static void debug(Object message) {
+ getLog().debug(message);
+ }
+
+ /**
+ * Log an info message.
+ *
+ * @param message The message to log.
+ */
+ public static void info(Object message) {
+ getLog().info(message);
+ }
+
+ /**
+ * Log a warning message.
+ *
+ * @param message The message to log.
+ */
+ public static void warn(Object message) {
+ getLog().warn(message);
+ }
+
+ /**
+ * Log a warning message.
+ *
+ * @param message The message to log.
+ * @param t An exception that may be the cause of the warning.
+ */
+ public static void warn(Object message, Throwable t) {
+ getLog().warn(message, t);
+ }
+
+ /**
+ * Log an error message.
+ *
+ * @param message The message to log.
+ */
+ public static void error(Object message) {
+ getLog().error(message);
+ }
+
+ /**
+ * Log an error message.
+ *
+ * @param message The message to log.
+ * @param t An exception that may be the cause of the error.
+ */
+ public static void error(Object message, Throwable t) {
+ getLog().error(message, t);
+ }
+
+ /**
+ * Log a fatal error message.
+ *
+ * @param message The message to log.
+ */
+ public static void fatal(Object message) {
+ getLog().fatal(message);
+ }
+
+ /**
+ * Log a fatal error message.
+ *
+ * @param message The message to log.
+ * @param t An exception that may be the cause of the error.
+ */
+ public static void fatal(Object message, Throwable t) {
+ getLog().fatal(message, t);
+ }
+
+}
diff --git a/common/src/main/java/at/gv/egovernment/moa/logging/LoggingContext.java b/common/src/main/java/at/gv/egovernment/moa/logging/LoggingContext.java
new file mode 100644
index 000000000..249c80184
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/logging/LoggingContext.java
@@ -0,0 +1,61 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.logging;
+
+/**
+ * Encapsulates contextual information (i.e. per request information) for
+ * logging purposes.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class LoggingContext {
+ /** The name of the node ID system property. */
+ public static final String NODE_ID_PROPERTY = "moa.node-id";
+
+ /** The current transaction ID. */
+ private String transactionID;
+ /** The node ID. */
+ private String nodeID;
+
+ /**
+ * Create a new <code>LoggingContext</code>.
+ *
+ * @param transactionID The transaction ID. May be <code>null</code>.
+ */
+ public LoggingContext(String transactionID) {
+ this.transactionID = transactionID;
+ this.nodeID = System.getProperty(NODE_ID_PROPERTY);
+ }
+
+ /**
+ * Return the transaction ID.
+ *
+ * @return The transaction ID.
+ */
+ public String getTransactionID() {
+ return transactionID;
+ }
+
+ /**
+ * Return the node ID.
+ *
+ * @return The node ID.
+ */
+ public String getNodeID() {
+ return nodeID;
+ }
+}
diff --git a/common/src/main/java/at/gv/egovernment/moa/logging/LoggingContextManager.java b/common/src/main/java/at/gv/egovernment/moa/logging/LoggingContextManager.java
new file mode 100644
index 000000000..ef37dc6ba
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/logging/LoggingContextManager.java
@@ -0,0 +1,71 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.logging;
+
+/**
+ * Provides each thread with a single instance of <code>LoggingContext</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class LoggingContextManager {
+ /** The single instance of this class. */
+ private static LoggingContextManager instance = null;
+
+ /** The <code>LoggingContext</code> for each thread. */
+ private ThreadLocal context;
+
+ /**
+ * Get the single instance of the <code>LoggingContextManager</code> class.
+ *
+ * @return LoggingContextManager The single instance.
+ */
+ public static synchronized LoggingContextManager getInstance() {
+ if (instance == null) {
+ instance = new LoggingContextManager();
+ }
+ return instance;
+ }
+
+ /**
+ * Creates a new <code>LoggingContextManager</code>.
+ *
+ * Protected to disallow direct instantiation.
+ */
+ protected LoggingContextManager() {
+ context = new ThreadLocal();
+ }
+
+ /**
+ * Set the <code>LoggingContext</code> context for the current thread.
+ *
+ * @param ctx The <code>LoggingContext</code> for the current thread.
+ */
+ public void setLoggingContext(LoggingContext ctx) {
+ context.set(ctx);
+ }
+
+ /**
+ * Return the <code>LoggingContext</code> for the current thread.
+ *
+ * @return LoggingContext The <code>LoggingContext</code> for the current
+ * thread, or <code>null</code> if none has been set.
+ */
+ public LoggingContext getLoggingContext() {
+ return (LoggingContext) context.get();
+ }
+
+}
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/Base64Utils.java b/common/src/main/java/at/gv/egovernment/moa/util/Base64Utils.java
new file mode 100644
index 000000000..3729881f7
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/util/Base64Utils.java
@@ -0,0 +1,124 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.util;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+
+import iaik.utils.Base64InputStream;
+import iaik.utils.Base64OutputStream;
+
+/**
+ * Utitility functions for encoding/decoding Base64 strings.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class Base64Utils {
+
+ /**
+ * Read the bytes encoded in a Base64 encoded <code>String</code>.
+ *
+ * @param base64String The <code>String</code> containing the Base64 encoded
+ * bytes.
+ * @param ignoreInvalidChars Whether to ignore invalid Base64 characters.
+ * @return byte[] The raw bytes contained in the <code>base64String</code>.
+ * @throws IOException Failed to read the Base64 data.
+ */
+ public static byte[] decode(String base64String, boolean ignoreInvalidChars)
+ throws IOException {
+
+ Base64InputStream in =
+ new Base64InputStream(
+ new ByteArrayInputStream(base64String.getBytes("UTF-8")),
+ ignoreInvalidChars);
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ byte[] bytes = new byte[256];
+ int bytesRead;
+
+ while ((bytesRead = in.read(bytes)) > 0) {
+ out.write(bytes, 0, bytesRead);
+ }
+
+ return out.toByteArray();
+ }
+
+ /**
+ * Read the bytes encoded in a Base64 encoded <code>String</code> and provide
+ * them via an <code>InputStream</code>.
+ *
+ * @param base64String The <code>String</code> containing the Base64 encoded
+ * bytes.
+ * @param ignoreInvalidChars Whether to ignore invalid Base64 characters.
+ * @return The <code>InputStream</code> from which the binary content of the
+ * <code>base64String</code> can be read.
+ */
+ public static InputStream decodeToStream(
+ String base64String,
+ boolean ignoreInvalidChars) {
+
+ try {
+ ByteArrayInputStream bin =
+ new ByteArrayInputStream(base64String.getBytes("UTF-8"));
+ Base64InputStream in = new Base64InputStream(bin, ignoreInvalidChars);
+
+ return in;
+ } catch (UnsupportedEncodingException e) {
+ // cannot occur, since UTF-8 is required to be supported by every JRE
+ return null;
+ }
+ }
+
+ /**
+ * Convert a byte array to a Base64 encoded <code>String</code>.
+ *
+ * @param bytes The bytes to encode.
+ * @return String The Base64 encoded representation of the <code>bytes</code>.
+ * @throws IOException Failed to write the bytes as Base64 data.
+ */
+ public static String encode(byte[] bytes) throws IOException {
+ return encode(new ByteArrayInputStream(bytes));
+ }
+
+ /**
+ * Convert the data contained in the given stream to a Base64 encoded
+ * <code>String</code>.
+ *
+ * @param inputStream The stream containing the data to encode.
+ * @return The Base64 encoded data of <code>inputStream</code>, as a
+ * <code>String</code>.
+ * @throws IOException Failed to convert the data in the stream.
+ */
+ public static String encode(InputStream inputStream) throws IOException {
+ ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
+ Base64OutputStream base64Stream = new Base64OutputStream(byteStream, "\n".getBytes());
+ byte[] bytes = new byte[256];
+ int bytesRead;
+
+ while ((bytesRead = inputStream.read(bytes)) > 0) {
+ base64Stream.write(bytes, 0, bytesRead);
+ }
+ base64Stream.flush();
+ base64Stream.close();
+ inputStream.close();
+
+ return byteStream.toString("UTF-8");
+ }
+
+}
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/BoolUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/BoolUtils.java
new file mode 100644
index 000000000..8776442a3
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/util/BoolUtils.java
@@ -0,0 +1,39 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.util;
+
+/**
+ * Utility class for parsing XML schema boolean values.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class BoolUtils {
+
+ /**
+ * Return the boolean value of an <code>xsd:boolean</code> type of DOM
+ * element/attribute.
+ *
+ * @param boolStr The value of the <code>xsd:boolean</code> element/attribute.
+ * @return <code>true</code>, if <code>boolStr</code> equals
+ * <code>&quot;true&quot;</code> or <code>&quot;1;&quot;</code>. Otherwise,
+ * <code>false</code> is returned.
+ */
+ public static boolean valueOf(String boolStr) {
+ return "true".equals(boolStr) || "1".equals(boolStr);
+ }
+
+}
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/CollectionUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/CollectionUtils.java
new file mode 100644
index 000000000..7a4c3850f
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/util/CollectionUtils.java
@@ -0,0 +1,51 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.util;
+
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Various utility methods for dealing with <code>java.util.Collection</code>
+ * classes.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CollectionUtils {
+
+ /**
+ * Convert a <code>List</code> of <code>Number</code> objects to an
+ * <code>int</code> array.
+ *
+ * @param nums The <code>List</code> containing the numbers whose integer
+ * value to put into the result.
+ * @return The <code>int</code> values of the <code>Number</code>s contained
+ * in <code>nums</code>.
+ */
+ public static int[] toIntArray(List nums) {
+ int[] result = new int[nums.size()];
+ Iterator iter;
+ int i;
+
+ for (i = 0, iter = nums.iterator(); iter.hasNext(); i++) {
+ Number num = (Number) iter.next();
+ result[i] = num.intValue();
+ }
+
+ return result;
+ }
+}
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/Constants.java b/common/src/main/java/at/gv/egovernment/moa/util/Constants.java
new file mode 100644
index 000000000..cf7824562
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/util/Constants.java
@@ -0,0 +1,367 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.util;
+
+import java.util.HashMap;
+
+/**
+ * Contains various constants used throughout the system.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface Constants {
+ /** Root location of the schema files. */
+ public static final String SCHEMA_ROOT = "/resources/schemas/";
+
+ /** URI of the Widerrufregister XML namespace. */
+ public static final String WRR_NS_URI =
+ "http://reference.e-government.gv.at/namespace/moavv/20041223";
+
+ /** Prefix used for the Widerrufregister XML namespace */
+ public static final String WRR_PREFIX = "wrr";
+
+ /** URI of the StandardTextBlock XML namespace. */
+ public static final String STB_NS_URI =
+ "http://reference.e-government.gv.at/namespace/standardtextblock/20041105#";
+
+ /** Prefix used for the standard text block XML namespace */
+ public static final String STB_PREFIX = "stb";
+
+ /** URI of the MOA XML namespace. */
+ public static final String MOA_NS_URI =
+ "http://reference.e-government.gv.at/namespace/moa/20020822#";
+
+ /** Name of the mandates infobox */
+ public static final String INFOBOXIDENTIFIER_MANDATES = "Mandates";
+
+ /** Prefix used for the Mandate XML namespace */
+ public static final String MD_PREFIX = "md";
+
+ /** URI of the Mandate XML namespace. */
+ public static final String MD_NS_URI =
+ "http://reference.e-government.gv.at/namespace/mandates/20040701#";
+
+ /** Prefix used for the Mandate XML namespace */
+ public static final String MVV_PREFIX = "mvv";
+
+ /** URI of the Mandate XML namespace. */
+ public static final String MVV_NS_URI =
+ "http://reference.e-government.gv.at/namespace/moavv/app2mvv/20041125";
+
+ /** Prefix used for the MandateCheckProfile XML namespace */
+ public static final String MDP_PREFIX = "mdp";
+
+ /** URI of the Mandate XML namespace. */
+ public static final String MDP_NS_URI =
+ "http://reference.e-government.gv.at/namespace/mandateprofile/20041105#";
+
+ /** Prefix used for the MOA XML namespace */
+ public static final String MOA_PREFIX = "moa";
+
+ /** Local location of the MOA XML schema definition. */
+ public static final String MOA_SCHEMA_LOCATION =
+ SCHEMA_ROOT + "MOA-SPSS-1.4.7.xsd";
+
+ /** URI of the MOA configuration XML namespace. */
+ public static final String MOA_CONFIG_NS_URI =
+ "http://reference.e-government.gv.at/namespace/moaconfig/20021122#";
+
+ /** URI of the MOA ID configuration XML namespace. */
+ public static final String MOA_ID_CONFIG_NS_URI =
+ "http://www.buergerkarte.at/namespaces/moaconfig#";
+
+ /** Prefix used for the MOA configuration XML namespace */
+ public static final String MOA_CONFIG_PREFIX = "conf";
+
+ /** Prefix used for the MOA configuration XML namespace */
+ public static final String MOA_ID_CONFIG_PREFIX = "confID";
+
+ /** Local location of the MOA configuration XML schema definition. */
+ public static final String MOA_CONFIG_SCHEMA_LOCATION =
+ SCHEMA_ROOT + "MOA-SPSS-config-1.4.7.xsd";
+
+ /** Local location of the MOA ID configuration XML schema definition. */
+ public static final String MOA_ID_CONFIG_SCHEMA_LOCATION =
+ SCHEMA_ROOT + "MOA-ID-Configuration-1.5.0.xsd";
+
+ /** URI of the Security Layer 1.0 namespace. */
+ public static final String SL10_NS_URI =
+ "http://www.buergerkarte.at/namespaces/securitylayer/20020225#";
+
+ /** Prefix used for the Security Layer 1.0 XML namespace */
+ public static final String SL10_PREFIX = "sl10";
+
+ /** Local location of the Security Layer 1.0 XML schema definition */
+ public static final String SL10_SCHEMA_LOCATION =
+ SCHEMA_ROOT + "Core.20020225.xsd";
+
+ /** URI of the Security Layer 1.1 XML namespace */
+ public static final String SL11_NS_URI =
+ "http://www.buergerkarte.at/namespaces/securitylayer/20020831#";
+
+ /** Prefix used for the Security Layer 1.1 XML namespace */
+ public static final String SL11_PREFIX = "sl11";
+
+ /** Local location of the Security Layer 1.1 XML schema definition */
+ public static final String SL11_SCHEMA_LOCATION =
+ SCHEMA_ROOT + "Core.20020831.xsd";
+
+ /** URI of the Security Layer 1.2 XML namespace */
+ public static final String SL12_NS_URI =
+ "http://www.buergerkarte.at/namespaces/securitylayer/1.2#";
+
+ /** Prefix used for the Security Layer 1.2 XML namespace */
+ public static final String SL12_PREFIX = "sl";
+
+ /** Local location of the Security Layer 1.2 XML schema definition */
+ public static final String SL12_SCHEMA_LOCATION =
+ SCHEMA_ROOT + "Core-1.2.xsd";
+
+ /** URI of the ECDSA XML namespace */
+ public static final String ECDSA_NS_URI =
+ "http://www.w3.org/2001/04/xmldsig-more#";
+
+ /** Prefix used for ECDSA namespace */
+ public static final String ECDSA_PREFIX = "ecdsa";
+
+ /** Local location of ECDSA XML schema definition */
+ public static final String ECDSA_SCHEMA_LOCATION =
+ SCHEMA_ROOT + "ECDSAKeyValue.xsd";
+
+ /** URI of the PersonData XML namespace. */
+ public static final String PD_NS_URI =
+ "http://reference.e-government.gv.at/namespace/persondata/20020228#";
+
+ /** Prefix used for the PersonData XML namespace */
+ public static final String PD_PREFIX = "pr";
+
+// /** Local location of the PersonData XML schema definition */
+// public static final String PD_SCHEMA_LOCATION =
+// SCHEMA_ROOT + "PersonData.xsd";
+
+ /** Local location of the PersonData XML schema definition */
+ public static final String PD_SCHEMA_LOCATION =
+ SCHEMA_ROOT + "PersonData_20_en_moaWID.xsd";
+
+ /** URI of the SAML namespace. */
+ public static final String SAML_NS_URI =
+ "urn:oasis:names:tc:SAML:1.0:assertion";
+
+ /** Prefix used for the SAML XML namespace */
+ public static final String SAML_PREFIX = "saml";
+
+ /** Local location of the SAML XML schema definition. */
+ public static final String SAML_SCHEMA_LOCATION =
+ SCHEMA_ROOT + "cs-sstc-schema-assertion-01.xsd";
+
+ /** URI of the SAML request-response protocol namespace. */
+ public static final String SAMLP_NS_URI =
+ "urn:oasis:names:tc:SAML:1.0:protocol";
+
+ /** Prefix used for the SAML request-response protocol namespace */
+ public static final String SAMLP_PREFIX = "samlp";
+
+ /** Local location of the SAML request-response protocol schema definition. */
+ public static final String SAMLP_SCHEMA_LOCATION =
+ SCHEMA_ROOT + "cs-sstc-schema-protocol-01.xsd";
+
+ /** URI of the XML namespace. */
+ public static final String XML_NS_URI =
+ "http://www.w3.org/XML/1998/namespace";
+
+ /** Prefix used for the XML namespace */
+ public static final String XML_PREFIX = "xml";
+
+ /** Local location of the XML schema definition. */
+ public static final String XML_SCHEMA_LOCATION = SCHEMA_ROOT + "xml.xsd";
+
+ /** URI of the XMLNS namespace */
+ public static final String XMLNS_NS_URI = "http://www.w3.org/2000/xmlns/";
+
+ /** Prefix used for the XSI namespace */
+ public static final String XSI_PREFIX = "xsi";
+
+ /** Local location of the XSI schema definition. */
+ public static final String XSI_SCHEMA_LOCATION =
+ SCHEMA_ROOT + "XMLSchema-instance.xsd";
+
+ /** URI of the XSI XMLNS namespace */
+ public static final String XSI_NS_URI =
+ "http://www.w3.org/2001/XMLSchema-instance";
+
+ /** URI of the XSLT XML namespace */
+ public static final String XSLT_NS_URI =
+ "http://www.w3.org/1999/XSL/Transform";
+
+ /** Prefix used for the XSLT XML namespace */
+ public static final String XSLT_PREFIX = "xsl";
+
+ /** URI of the XMLDSig XML namespace. */
+ public static final String DSIG_NS_URI = "http://www.w3.org/2000/09/xmldsig#";
+
+ /** Prefix used for the XMLDSig XML namespace */
+ public static final String DSIG_PREFIX = "dsig";
+
+ /** Local location of the XMLDSig XML schema. */
+ public static final String DSIG_SCHEMA_LOCATION =
+ SCHEMA_ROOT + "xmldsig-core-schema.xsd";
+
+ /** URI of the XMLDSig XPath Filter XML namespace. */
+ public static final String DSIG_FILTER2_NS_URI =
+ "http://www.w3.org/2002/06/xmldsig-filter2";
+
+ /** Prefix used for the XMLDSig XPath Filter XML namespace */
+ public static final String DSIG_FILTER2_PREFIX = "dsig-filter2";
+
+ /** Local location of the XMLDSig XPath Filter XML schema definition. */
+ public static final String DSIG_FILTER2_SCHEMA_LOCATION =
+ SCHEMA_ROOT + "xmldsig-filter2.xsd";
+
+ /** URI of the Exclusive Canonicalization XML namespace */
+ public static final String DSIG_EC_NS_URI =
+ "http://www.w3.org/2001/10/xml-exc-c14n#";
+
+ /** Prefix used for the Exclusive Canonicalization XML namespace */
+ public static final String DSIG_EC_PREFIX = "ec";
+
+ /** Local location of the Exclusive Canonicalizaion XML schema definition */
+ public static final String DSIG_EC_SCHEMA_LOCATION =
+ SCHEMA_ROOT + "exclusive-canonicalization.xsd";
+
+ /** URI of the XMLLoginParameterResolver Configuration XML namespace */
+ public static final String XMLLPR_NS_URI="http://reference.e-government.gv.at/namespace/moa/20020822#/xmllpr20030814";
+
+ /** Local location of the XMLLoginParameterResolver Configuration XML schema definition */
+ public static final String XMLLPR_SCHEMA_LOCATION =
+ SCHEMA_ROOT + "MOAIdentities.xsd";
+
+ /** Local location of the XAdES v1.1.1 schema definition */
+ public static final String XADES_1_1_1_SCHEMA_LOCATION =
+ SCHEMA_ROOT + "XAdES-1.1.1.xsd";
+
+ /** URI of the XAdES v1.1.1 namespace */
+ public static final String XADES_1_1_1_NS_URI = "http://uri.etsi.org/01903/v1.1.1#";
+
+ /** Local location of the XAdES v1.2.2 schema definition */
+ public static final String XADES_1_2_2_SCHEMA_LOCATION =
+ SCHEMA_ROOT + "XAdES-1.2.2.xsd";
+
+ /** URI of the XAdES v1.2.2 namespace */
+ public static final String XADES_1_2_2_NS_URI = "http://uri.etsi.org/01903/v1.2.2#";
+
+ /** Local location of the XAdES v1.1.1 schema definition */
+ public static final String XADES_1_3_2_SCHEMA_LOCATION =
+ SCHEMA_ROOT + "XAdES-1.3.2.xsd";
+
+ /** URI of the XAdES v1.3.2 namespace */
+ public static final String XADES_1_3_2_NS_URI = "http://uri.etsi.org/01903/v1.3.2#";
+
+ /** Local location of the XAdES v1.4.1 schema definition */
+ public static final String XADES_1_4_1_SCHEMA_LOCATION =
+ SCHEMA_ROOT + "XAdES-1.4.1.xsd";
+
+ /** URI of the XAdES v1.4.1 namespace */
+ public static final String XADES_1_4_1_NS_URI = "http://uri.etsi.org/01903/v1.4.1#";
+
+ /**
+ * Contains all namespaces and local schema locations for XML schema
+ * definitions relevant for MOA. For use in validating XML parsers.
+ */
+ public static final String ALL_SCHEMA_LOCATIONS =
+ (MOA_NS_URI + " " + MOA_SCHEMA_LOCATION + " ")
+ + (MOA_CONFIG_NS_URI + " " + MOA_CONFIG_SCHEMA_LOCATION + " ")
+ + (MOA_ID_CONFIG_NS_URI + " " + MOA_ID_CONFIG_SCHEMA_LOCATION + " ")
+ + (SL10_NS_URI + " " + SL10_SCHEMA_LOCATION + " ")
+ + (SL11_NS_URI + " " + SL11_SCHEMA_LOCATION + " ")
+ + (SL12_NS_URI + " " + SL12_SCHEMA_LOCATION + " ")
+ + (ECDSA_NS_URI + " " + ECDSA_SCHEMA_LOCATION + " ")
+ + (PD_NS_URI + " " + PD_SCHEMA_LOCATION + " ")
+ + (SAML_NS_URI + " " + SAML_SCHEMA_LOCATION + " ")
+ + (SAMLP_NS_URI + " " + SAMLP_SCHEMA_LOCATION + " ")
+ + (XML_NS_URI + " " + XML_SCHEMA_LOCATION + " ")
+ + (XSI_NS_URI + " " + XSI_SCHEMA_LOCATION + " ")
+ + (DSIG_NS_URI + " " + DSIG_SCHEMA_LOCATION + " ")
+ + (DSIG_FILTER2_NS_URI + " " + DSIG_FILTER2_SCHEMA_LOCATION + " ")
+ + (DSIG_EC_NS_URI + " " + DSIG_EC_SCHEMA_LOCATION + " ")
+ + (XMLLPR_NS_URI + " " + XMLLPR_SCHEMA_LOCATION + " ")
+ + (XADES_1_1_1_NS_URI + " " + XADES_1_1_1_SCHEMA_LOCATION + " ")
+ + (XADES_1_2_2_NS_URI + " " + XADES_1_2_2_SCHEMA_LOCATION + " ")
+ + (XADES_1_3_2_NS_URI + " " + XADES_1_3_2_SCHEMA_LOCATION + " ")
+ + (XADES_1_4_1_NS_URI + " " + XADES_1_4_1_SCHEMA_LOCATION);
+
+ /** URN prefix for bPK and wbPK. */
+ public static final String URN_PREFIX = "urn:publicid:gv.at";
+
+ /** URN prefix for context dependent id. */
+ public static final String URN_PREFIX_CDID = URN_PREFIX + ":cdid";
+
+ /** URN prefix for context dependent id (bPK). */
+ public static final String URN_PREFIX_BPK = URN_PREFIX_CDID + "+bpk";
+
+ /** URN prefix for context dependent id (HPI). */
+ public static final String URN_PREFIX_HPI = URN_PREFIX_CDID + "+EHSP";
+
+ /** URN prefix for context dependent id (wbPK). */
+ public static final String URN_PREFIX_WBPK = URN_PREFIX + ":wbpk";
+
+ /** URN prefix for context dependent id. */
+ public static final String URN_PREFIX_BASEID = URN_PREFIX + ":baseid";
+
+ /** Security Layer manifest type URI. */
+ public static final String SL_MANIFEST_TYPE_URI =
+ "http://www.buergerkarte.at/specifications/Security-Layer/20020225#SignatureManifest";
+
+ /** URI of the SHA1 digest algorithm */
+ public static final String SHA1_URI =
+ "http://www.w3.org/2000/09/xmldsig#sha1";
+
+ /** URI of the Canonical XML algorithm */
+ public static final String C14N_URI =
+ "http://www.w3.org/TR/2001/REC-xml-c14n-20010315";
+
+ /** URI of the Canoncial XML with comments algorithm */
+ public static final String C14N_WITH_COMMENTS_URI =
+ "http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments";
+
+ /** URI of the Exclusive Canonical XML algorithm */
+ public static final String EXC_C14N_URI =
+ "http://www.w3.org/2001/10/xml-exc-c14n#";
+
+ /** URI of the Exclusive Canonical XML with commments algorithm */
+ public static final String EXC_C14N_WITH_COMMENTS_URI =
+ "http://www.w3.org/2001/10/xml-exc-c14n#WithComments";
+
+ //
+ // Local names for elements of the MOA SPSS schema
+ //
+
+ /**
+ * Local name of request for creating an XML signature.
+ */
+ public static final String MOA_SPSS_CREATE_XML_REQUEST = "CreateXMLSignatureRequest";
+
+ /**
+ * Local name of request for verifying an XML signature.
+ */
+ public static final String MOA_SPSS_VERIFY_XML_REQUEST = "VerifiyXMLSignatureRequest";
+
+ /**
+ * A map used to map namespace prefixes to namespace URIs
+ */
+ public static HashMap nSMap = new HashMap(5);
+
+}
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java
new file mode 100644
index 000000000..c5daacdc3
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java
@@ -0,0 +1,1066 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.util;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringWriter;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.Vector;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.apache.xerces.parsers.DOMParser;
+import org.apache.xerces.parsers.SAXParser;
+import org.apache.xerces.parsers.XMLGrammarPreparser;
+import org.apache.xerces.util.SymbolTable;
+import org.apache.xerces.util.XMLGrammarPoolImpl;
+import org.apache.xerces.xni.grammars.XMLGrammarDescription;
+import org.apache.xerces.xni.grammars.XMLGrammarPool;
+import org.apache.xerces.xni.parser.XMLInputSource;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.DocumentFragment;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+import at.gv.egovernment.moa.logging.Logger;
+
+/**
+ * Various utility functions for handling XML DOM trees.
+ *
+ * The parsing methods in this class make use of some features internal to the
+ * Xerces DOM parser, mainly for performance reasons. As soon as JAXP
+ * (currently at version 1.2) is better at schema handling, it should be used as
+ * the parser interface.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class DOMUtils {
+
+ /** Feature URI for namespace aware parsing. */
+ private static final String NAMESPACES_FEATURE =
+ "http://xml.org/sax/features/namespaces";
+ /** Feature URI for validating parsing. */
+ private static final String VALIDATION_FEATURE =
+ "http://xml.org/sax/features/validation";
+ /** Feature URI for schema validating parsing. */
+ private static final String SCHEMA_VALIDATION_FEATURE =
+ "http://apache.org/xml/features/validation/schema";
+ /** Feature URI for normalization of element/attribute values. */
+ private static final String NORMALIZED_VALUE_FEATURE =
+ "http://apache.org/xml/features/validation/schema/normalized-value";
+ /** Feature URI for parsing ignorable whitespace. */
+ private static final String INCLUDE_IGNORABLE_WHITESPACE_FEATURE =
+ "http://apache.org/xml/features/dom/include-ignorable-whitespace";
+ /** Feature URI for creating EntityReference nodes in the DOM tree. */
+ private static final String CREATE_ENTITY_REF_NODES_FEATURE =
+ "http://apache.org/xml/features/dom/create-entity-ref-nodes";
+ /** Property URI for providing external schema locations. */
+ private static final String EXTERNAL_SCHEMA_LOCATION_PROPERTY =
+ "http://apache.org/xml/properties/schema/external-schemaLocation";
+ /** Property URI for providing the external schema location for elements
+ * without a namespace. */
+ private static final String EXTERNAL_NO_NAMESPACE_SCHEMA_LOCATION_PROPERTY =
+ "http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation";
+ /** Property URI for the Xerces grammar pool. */
+ private static final String GRAMMAR_POOL =
+ org.apache.xerces.impl.Constants.XERCES_PROPERTY_PREFIX
+ + org.apache.xerces.impl.Constants.XMLGRAMMAR_POOL_PROPERTY;
+ /** A prime number for initializing the symbol table. */
+ private static final int BIG_PRIME = 2039;
+ /** Symbol table for the grammar pool. */
+ private static SymbolTable symbolTable = new SymbolTable(BIG_PRIME);
+ /** Xerces schema grammar pool. */
+ private static XMLGrammarPool grammarPool = new XMLGrammarPoolImpl();
+ /** Set holding the NamespaceURIs of the grammarPool, to prevent multiple
+ * entries of same grammars to the pool */
+ private static Set grammarNamespaces;
+
+ static {
+ grammarPool.lockPool();
+ grammarNamespaces = new HashSet();
+ }
+
+ /**
+ * Preparse a schema and add it to the schema pool.
+ * The method only adds the schema to the pool if a schema having the same
+ * <code>systemId</code> (namespace URI) is not already present in the pool.
+ *
+ * @param inputStream An <code>InputStream</code> providing the contents of
+ * the schema.
+ * @param systemId The systemId (namespace URI) to use for the schema.
+ * @throws IOException An error occurred reading the schema.
+ */
+ public static void addSchemaToPool(InputStream inputStream, String systemId)
+ throws IOException {
+ XMLGrammarPreparser preparser;
+
+ if (!grammarNamespaces.contains(systemId)) {
+
+ grammarNamespaces.add(systemId);
+
+ // unlock the pool so that we can add another grammar
+ grammarPool.unlockPool();
+
+ // prepare the preparser
+ preparser = new XMLGrammarPreparser(symbolTable);
+ preparser.registerPreparser(XMLGrammarDescription.XML_SCHEMA, null);
+ preparser.setProperty(GRAMMAR_POOL, grammarPool);
+ preparser.setFeature(NAMESPACES_FEATURE, true);
+ preparser.setFeature(VALIDATION_FEATURE, true);
+
+ // add the grammar to the pool
+ preparser.preparseGrammar(
+ XMLGrammarDescription.XML_SCHEMA,
+ new XMLInputSource(null, systemId, null, inputStream, null));
+
+ // lock the pool again so that schemas are not added automatically
+ grammarPool.lockPool();
+ }
+ }
+
+ /**
+ * Parse an XML document from an <code>InputStream</code>.
+ *
+ * @param inputStream The <code>InputStream</code> containing the XML
+ * document.
+ * @param validating If <code>true</code>, parse validating.
+ * @param externalSchemaLocations A <code>String</code> containing namespace
+ * URI to schema location pairs, the same way it is accepted by the <code>xsi:
+ * schemaLocation</code> attribute.
+ * @param externalNoNamespaceSchemaLocation The schema location of the
+ * schema for elements without a namespace, the same way it is accepted by the
+ * <code>xsi:noNamespaceSchemaLocation</code> attribute.
+ * @param entityResolver An <code>EntityResolver</code> to resolve external
+ * entities (schemas and DTDs). If <code>null</code>, it will not be set.
+ * @param errorHandler An <code>ErrorHandler</code> to decide what to do
+ * with parsing errors. If <code>null</code>, it will not be set.
+ * @return The parsed XML document as a DOM tree.
+ * @throws SAXException An error occurred parsing the document.
+ * @throws IOException An error occurred reading the document.
+ * @throws ParserConfigurationException An error occurred configuring the XML
+ * parser.
+ */
+ public static Document parseDocument(
+ InputStream inputStream,
+ boolean validating,
+ String externalSchemaLocations,
+ String externalNoNamespaceSchemaLocation,
+ EntityResolver entityResolver,
+ ErrorHandler errorHandler)
+ throws SAXException, IOException, ParserConfigurationException {
+
+ DOMParser parser;
+
+
+
+ //if Debug is enabled make a copy of inputStream to enable debug output in case of SAXException
+ byte buffer [] = null;
+ ByteArrayInputStream baStream = null;
+ if(true == Logger.isDebugEnabled()) {
+ int len = inputStream.available();
+ buffer = new byte[len];
+ inputStream.read(buffer);
+ baStream = new ByteArrayInputStream(buffer);
+ }
+
+ // create the DOM parser
+ if (symbolTable != null) {
+ parser = new DOMParser(symbolTable, grammarPool);
+ } else {
+ parser = new DOMParser();
+ }
+
+ // set parser features and properties
+ try {
+ parser.setFeature(NAMESPACES_FEATURE, true);
+ parser.setFeature(VALIDATION_FEATURE, validating);
+ parser.setFeature(SCHEMA_VALIDATION_FEATURE, validating);
+ parser.setFeature(NORMALIZED_VALUE_FEATURE, false);
+ parser.setFeature(INCLUDE_IGNORABLE_WHITESPACE_FEATURE, true);
+ parser.setFeature(CREATE_ENTITY_REF_NODES_FEATURE, false);
+
+ if (validating) {
+ if (externalSchemaLocations != null) {
+ parser.setProperty(
+ EXTERNAL_SCHEMA_LOCATION_PROPERTY,
+ externalSchemaLocations);
+ }
+ if (externalNoNamespaceSchemaLocation != null) {
+ parser.setProperty(
+ EXTERNAL_NO_NAMESPACE_SCHEMA_LOCATION_PROPERTY,
+ externalNoNamespaceSchemaLocation);
+ }
+ }
+
+ // set entity resolver and error handler
+ if (entityResolver != null) {
+ parser.setEntityResolver(entityResolver);
+ }
+ if (errorHandler != null) {
+ parser.setErrorHandler(errorHandler);
+ }
+
+ // parse the document and return it
+ // if debug is enabled: use copy of strem (baStream) else use orig stream
+ if(null != baStream)
+ parser.parse(new InputSource(baStream));
+ else
+ parser.parse(new InputSource(inputStream));
+ } catch(SAXException e) {
+ if(true == Logger.isDebugEnabled() && null != buffer) {
+ String xmlContent = new String(buffer);
+ Logger.debug("SAXException in:\n" + xmlContent);
+ }
+ throw(e);
+ }
+
+ return parser.getDocument();
+ }
+
+ /**
+ * Parse an XML document from an <code>InputStream</code>.
+ *
+ * @param inputStream The <code>InputStream</code> containing the XML
+ * document.
+ * @param validating If <code>true</code>, parse validating.
+ * @param externalSchemaLocations A <code>String</code> containing namespace
+ * URI to schema location pairs, the same way it is accepted by the <code>xsi:
+ * schemaLocation</code> attribute.
+ * @param externalNoNamespaceSchemaLocation The schema location of the
+ * schema for elements without a namespace, the same way it is accepted by the
+ * <code>xsi:noNamespaceSchemaLocation</code> attribute.
+ * @param entityResolver An <code>EntityResolver</code> to resolve external
+ * entities (schemas and DTDs). If <code>null</code>, it will not be set.
+ * @param errorHandler An <code>ErrorHandler</code> to decide what to do
+ * with parsing errors. If <code>null</code>, it will not be set.
+ * @return The parsed XML document as a DOM tree.
+ * @throws SAXException An error occurred parsing the document.
+ * @throws IOException An error occurred reading the document.
+ * @throws ParserConfigurationException An error occurred configuring the XML
+ * parser.
+ */
+ public static Document parseDocumentSimple(InputStream inputStream)
+ throws SAXException, IOException, ParserConfigurationException {
+
+ DOMParser parser;
+
+ parser = new DOMParser();
+ // set parser features and properties
+ parser.setFeature(NAMESPACES_FEATURE, true);
+ parser.setFeature(VALIDATION_FEATURE, false);
+ parser.setFeature(SCHEMA_VALIDATION_FEATURE, false);
+ parser.setFeature(NORMALIZED_VALUE_FEATURE, false);
+ parser.setFeature(INCLUDE_IGNORABLE_WHITESPACE_FEATURE, true);
+ parser.setFeature(CREATE_ENTITY_REF_NODES_FEATURE, false);
+
+ parser.parse(new InputSource(inputStream));
+
+ return parser.getDocument();
+ }
+
+
+ /**
+ * Parse an XML document from an <code>InputStream</code>.
+ *
+ * It uses a <code>MOAEntityResolver</code> as the <code>EntityResolver</code>
+ * and a <code>MOAErrorHandler</code> as the <code>ErrorHandler</code>.
+ *
+ * @param inputStream The <code>InputStream</code> containing the XML
+ * document.
+ * @param validating If <code>true</code>, parse validating.
+ * @param externalSchemaLocations A <code>String</code> containing namespace
+ * URI to schema location pairs, the same way it is accepted by the <code>xsi:
+ * schemaLocation</code> attribute.
+ * @param externalNoNamespaceSchemaLocation The schema location of the
+ * schema for elements without a namespace, the same way it is accepted by the
+ * <code>xsi:noNamespaceSchemaLocation</code> attribute.
+ * @return The parsed XML document as a DOM tree.
+ * @throws SAXException An error occurred parsing the document.
+ * @throws IOException An error occurred reading the document.
+ * @throws ParserConfigurationException An error occurred configuring the XML
+ * parser.
+ */
+ public static Document parseDocument(
+ InputStream inputStream,
+ boolean validating,
+ String externalSchemaLocations,
+ String externalNoNamespaceSchemaLocation)
+ throws SAXException, IOException, ParserConfigurationException {
+
+ return parseDocument(
+ inputStream,
+ validating,
+ externalSchemaLocations,
+ externalNoNamespaceSchemaLocation,
+ new MOAEntityResolver(),
+ new MOAErrorHandler());
+ }
+
+ /**
+ * Parse an XML document from a <code>String</code>.
+ *
+ * It uses a <code>MOAEntityResolver</code> as the <code>EntityResolver</code>
+ * and a <code>MOAErrorHandler</code> as the <code>ErrorHandler</code>.
+ *
+ * @param xmlString The <code>String</code> containing the XML document.
+ * @param encoding The encoding of the XML document.
+ * @param validating If <code>true</code>, parse validating.
+ * @param externalSchemaLocations A <code>String</code> containing namespace
+ * URI to schema location pairs, the same way it is accepted by the <code>xsi:
+ * schemaLocation</code> attribute.
+ * @param externalNoNamespaceSchemaLocation The schema location of the
+ * schema for elements without a namespace, the same way it is accepted by the
+ * <code>xsi:noNamespaceSchemaLocation</code> attribute.
+ * @return The parsed XML document as a DOM tree.
+ * @throws SAXException An error occurred parsing the document.
+ * @throws IOException An error occurred reading the document.
+ * @throws ParserConfigurationException An error occurred configuring the XML
+ * parser.
+ */
+ public static Document parseDocument(
+ String xmlString,
+ String encoding,
+ boolean validating,
+ String externalSchemaLocations,
+ String externalNoNamespaceSchemaLocation)
+ throws SAXException, IOException, ParserConfigurationException {
+
+ InputStream in = new ByteArrayInputStream(xmlString.getBytes(encoding));
+ return parseDocument(
+ in,
+ validating,
+ externalSchemaLocations,
+ externalNoNamespaceSchemaLocation);
+ }
+
+ /**
+ * Parse an UTF-8 encoded XML document from a <code>String</code>.
+ *
+ * @param xmlString The <code>String</code> containing the XML document.
+ * @param validating If <code>true</code>, parse validating.
+ * @param externalSchemaLocations A <code>String</code> containing namespace
+ * URI to schema location pairs, the same way it is accepted by the <code>xsi:
+ * schemaLocation</code> attribute.
+ * @param externalNoNamespaceSchemaLocation The schema location of the
+ * schema for elements without a namespace, the same way it is accepted by the
+ * <code>xsi:noNamespaceSchemaLocation</code> attribute.
+ * @return The parsed XML document as a DOM tree.
+ * @throws SAXException An error occurred parsing the document.
+ * @throws IOException An error occurred reading the document.
+ * @throws ParserConfigurationException An error occurred configuring the XML
+ * parser.
+ */
+ public static Document parseDocument(
+ String xmlString,
+ boolean validating,
+ String externalSchemaLocations,
+ String externalNoNamespaceSchemaLocation)
+ throws SAXException, IOException, ParserConfigurationException {
+
+ return parseDocument(
+ xmlString,
+ "UTF-8",
+ validating,
+ externalSchemaLocations,
+ externalNoNamespaceSchemaLocation);
+ }
+
+ /**
+ * A convenience method to parse an XML document validating.
+ *
+ * @param inputStream The <code>InputStream</code> containing the XML
+ * document.
+ * @return The root element of the parsed XML document.
+ * @throws SAXException An error occurred parsing the document.
+ * @throws IOException An error occurred reading the document.
+ * @throws ParserConfigurationException An error occurred configuring the XML
+ * parser.
+ */
+ public static Element parseXmlValidating(InputStream inputStream)
+ throws ParserConfigurationException, SAXException, IOException {
+ return DOMUtils
+ .parseDocument(inputStream, true, Constants.ALL_SCHEMA_LOCATIONS, null)
+ .getDocumentElement();
+ }
+
+ /**
+ * A convenience method to parse an XML document non validating.
+ *
+ * @param inputStream The <code>InputStream</code> containing the XML
+ * document.
+ * @return The root element of the parsed XML document.
+ * @throws SAXException An error occurred parsing the document.
+ * @throws IOException An error occurred reading the document.
+ * @throws ParserConfigurationException An error occurred configuring the XML
+ * parser.
+ */
+ public static Element parseXmlNonValidating(InputStream inputStream)
+ throws ParserConfigurationException, SAXException, IOException {
+ return DOMUtils
+ .parseDocument(inputStream, false, Constants.ALL_SCHEMA_LOCATIONS, null)
+ .getDocumentElement();
+ }
+
+ /**
+ * Schema validate a given DOM element.
+ *
+ * @param element The element to validate.
+ * @param externalSchemaLocations A <code>String</code> containing namespace
+ * URI to schema location pairs, the same way it is accepted by the <code>xsi:
+ * schemaLocation</code> attribute.
+ * @param externalNoNamespaceSchemaLocation The schema location of the
+ * schema for elements without a namespace, the same way it is accepted by the
+ * <code>xsi:noNamespaceSchemaLocation</code> attribute.
+ * @return <code>true</code>, if the <code>element</code> validates against
+ * the schemas declared in it.
+ * @throws SAXException An error occurred parsing the document.
+ * @throws IOException An error occurred reading the document from its
+ * serialized representation.
+ * @throws ParserConfigurationException An error occurred configuring the XML
+ * @throws TransformerException An error occurred serializing the element.
+ */
+ public static boolean validateElement(
+ Element element,
+ String externalSchemaLocations,
+ String externalNoNamespaceSchemaLocation)
+ throws
+ ParserConfigurationException,
+ IOException,
+ SAXException,
+ TransformerException {
+
+ byte[] docBytes;
+ SAXParser parser;
+
+ // create the SAX parser
+ if (symbolTable != null) {
+ parser = new SAXParser(symbolTable, grammarPool);
+ } else {
+ parser = new SAXParser();
+ }
+
+ // serialize the document
+ docBytes = serializeNode(element, "UTF-8");
+
+ // set up parser features and attributes
+ parser.setFeature(NAMESPACES_FEATURE, true);
+ parser.setFeature(VALIDATION_FEATURE, true);
+ parser.setFeature(SCHEMA_VALIDATION_FEATURE, true);
+ if (externalSchemaLocations != null) {
+ parser.setProperty(
+ EXTERNAL_SCHEMA_LOCATION_PROPERTY,
+ externalSchemaLocations);
+ }
+ if (externalNoNamespaceSchemaLocation != null) {
+ parser.setProperty(
+ EXTERNAL_NO_NAMESPACE_SCHEMA_LOCATION_PROPERTY,
+ "externalNoNamespaceSchemaLocation");
+ }
+
+ // set up entity resolver and error handler
+ parser.setEntityResolver(new MOAEntityResolver());
+ parser.setErrorHandler(new MOAErrorHandler());
+
+ // parse validating
+ parser.parse(new InputSource(new ByteArrayInputStream(docBytes)));
+ return true;
+ }
+
+ /**
+ * Serialize the given DOM node.
+ *
+ * The node will be serialized using the UTF-8 encoding.
+ *
+ * @param node The node to serialize.
+ * @return String The <code>String</code> representation of the given DOM
+ * node.
+ * @throws TransformerException An error occurred transforming the
+ * node to a <code>String</code>.
+ * @throws IOException An IO error occurred writing the node to a byte array.
+ */
+ public static String serializeNode(Node node)
+ throws TransformerException, IOException {
+ return new String(serializeNode(node, "UTF-8", false), "UTF-8");
+ }
+
+
+ /**
+ * Serialize the given DOM node.
+ *
+ * The node will be serialized using the UTF-8 encoding.
+ *
+ * @param node The node to serialize.
+ * @param omitXmlDeclaration The boolean value for omitting the XML Declaration.
+ * @return String The <code>String</code> representation of the given DOM
+ * node.
+ * @throws TransformerException An error occurred transforming the
+ * node to a <code>String</code>.
+ * @throws IOException An IO error occurred writing the node to a byte array.
+ */
+ public static String serializeNode(Node node, boolean omitXmlDeclaration)
+ throws TransformerException, IOException {
+ return new String(serializeNode(node, "UTF-8", omitXmlDeclaration), "UTF-8");
+ }
+
+ /**
+ * Serialize the given DOM node.
+ *
+ * The node will be serialized using the UTF-8 encoding.
+ *
+ * @param node The node to serialize.
+ * @param omitXmlDeclaration The boolean value for omitting the XML Declaration.
+ * @param lineSeperator Sets the line seperator String of the parser
+ * @return String The <code>String</code> representation of the given DOM
+ * node.
+ * @throws TransformerException An error occurred transforming the
+ * node to a <code>String</code>.
+ * @throws IOException An IO error occurred writing the node to a byte array.
+ */
+ public static String serializeNode(Node node, boolean omitXmlDeclaration, String lineSeperator)
+ throws TransformerException, IOException {
+ return new String(serializeNode(node, "UTF-8", omitXmlDeclaration, lineSeperator), "UTF-8");
+ }
+
+ /**
+ * Serialize the given DOM node to a byte array.
+ *
+ * @param node The node to serialize.
+ * @param xmlEncoding The XML encoding to use.
+ * @return The serialized node, as a byte array. Using a compatible encoding
+ * this can easily be converted into a <code>String</code>.
+ * @throws TransformerException An error occurred transforming the node to a
+ * byte array.
+ * @throws IOException An IO error occurred writing the node to a byte array.
+ */
+ public static byte[] serializeNode(Node node, String xmlEncoding)
+ throws TransformerException, IOException {
+ return serializeNode(node, xmlEncoding, false);
+ }
+
+ /**
+ * Serialize the given DOM node to a byte array.
+ *
+ * @param node The node to serialize.
+ * @param xmlEncoding The XML encoding to use.
+ * @param omitDeclaration The boolean value for omitting the XML Declaration.
+ * @return The serialized node, as a byte array. Using a compatible encoding
+ * this can easily be converted into a <code>String</code>.
+ * @throws TransformerException An error occurred transforming the node to a
+ * byte array.
+ * @throws IOException An IO error occurred writing the node to a byte array.
+ */
+ public static byte[] serializeNode(Node node, String xmlEncoding, boolean omitDeclaration)
+ throws TransformerException, IOException {
+ return serializeNode(node, xmlEncoding, omitDeclaration, null);
+ }
+
+
+ /**
+ * Serialize the given DOM node to a byte array.
+ *
+ * @param node The node to serialize.
+ * @param xmlEncoding The XML encoding to use.
+ * @param omitDeclaration The boolean value for omitting the XML Declaration.
+ * @param lineSeperator Sets the line seperator String of the parser
+ * @return The serialized node, as a byte array. Using a compatible encoding
+ * this can easily be converted into a <code>String</code>.
+ * @throws TransformerException An error occurred transforming the node to a
+ * byte array.
+ * @throws IOException An IO error occurred writing the node to a byte array.
+ */
+ public static byte[] serializeNode(Node node, String xmlEncoding, boolean omitDeclaration, String lineSeperator)
+ throws TransformerException, IOException {
+
+ TransformerFactory transformerFactory = TransformerFactory.newInstance();
+ Transformer transformer = transformerFactory.newTransformer();
+ ByteArrayOutputStream bos = new ByteArrayOutputStream(16384);
+
+ transformer.setOutputProperty(OutputKeys.METHOD, "xml");
+ transformer.setOutputProperty(OutputKeys.ENCODING, xmlEncoding);
+ String omit = omitDeclaration ? "yes" : "no";
+ transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, omit);
+ if (null!=lineSeperator) {
+ transformer.setOutputProperty("{http://xml.apache.org/xalan}line-separator", lineSeperator);//does not work for xalan <= 2.5.1
+ }
+ transformer.transform(new DOMSource(node), new StreamResult(bos));
+
+ bos.flush();
+ bos.close();
+
+ return bos.toByteArray();
+ }
+
+ /**
+ * Return the text that a node contains.
+ *
+ * This routine:
+ * <ul>
+ * <li>Ignores comments and processing instructions.</li>
+ * <li>Concatenates TEXT nodes, CDATA nodes, and the results recursively
+ * processing EntityRef nodes.</li>
+ * <li>Ignores any element nodes in the sublist. (Other possible options are
+ * to recurse into element sublists or throw an exception.)</li>
+ * </ul>
+ *
+ * @param node A DOM node from which to extract text.
+ * @return A String representing its contents.
+ */
+ public static String getText(Node node) {
+ if (!node.hasChildNodes()) {
+ return "";
+ }
+
+ StringBuffer result = new StringBuffer();
+ NodeList list = node.getChildNodes();
+
+ for (int i = 0; i < list.getLength(); i++) {
+ Node subnode = list.item(i);
+ if (subnode.getNodeType() == Node.TEXT_NODE) {
+ result.append(subnode.getNodeValue());
+ } else if (subnode.getNodeType() == Node.CDATA_SECTION_NODE) {
+ result.append(subnode.getNodeValue());
+ } else if (subnode.getNodeType() == Node.ENTITY_REFERENCE_NODE) {
+ // Recurse into the subtree for text
+ // (and ignore comments)
+ result.append(getText(subnode));
+ }
+ }
+ return result.toString();
+ }
+
+ /**
+ * Build the namespace prefix to namespace URL mapping in effect for a given
+ * node.
+ *
+ * @param node The context node for which build the map.
+ * @return The namespace prefix to namespace URL mapping (
+ * a <code>String</code> value to <code>String</code> value mapping).
+ */
+ public static Map getNamespaceDeclarations(Node node) {
+ Map nsDecls = new HashMap();
+ int i;
+
+ do {
+ if (node.hasAttributes()) {
+ NamedNodeMap attrs = node.getAttributes();
+
+ for (i = 0; i < attrs.getLength(); i++) {
+ Attr attr = (Attr) attrs.item(i);
+
+ // add prefix mapping if none exists
+ if ("xmlns".equals(attr.getPrefix())
+ || "xmlns".equals(attr.getName())) {
+
+ String nsPrefix =
+ attr.getPrefix() != null ? attr.getLocalName() : "";
+
+ if (nsDecls.get(nsPrefix) == null) {
+ nsDecls.put(nsPrefix, attr.getValue());
+ }
+ }
+ }
+ }
+ } while ((node = node.getParentNode()) != null);
+
+ return nsDecls;
+ }
+
+ /**
+ * Add all namespace declarations declared in the parent(s) of a given
+ * element and used in the subtree of the given element to the given element.
+ *
+ * @param context The element to which to add the namespaces.
+ */
+ public static void localizeNamespaceDeclarations(Element context) {
+ Node parent = context.getParentNode();
+
+ if (parent != null) {
+ Map namespaces = getNamespaceDeclarations(context.getParentNode());
+ Set nsUris = collectNamespaceURIs(context);
+ Iterator iter;
+
+ for (iter = namespaces.entrySet().iterator(); iter.hasNext();) {
+ Map.Entry e = (Map.Entry) iter.next();
+
+ if (nsUris.contains(e.getValue())) {
+ String prefix = (String) e.getKey();
+ String nsUri = (String) e.getValue();
+ String nsAttrName = "".equals(prefix) ? "xmlns" : "xmlns:" + prefix;
+
+ context.setAttributeNS(Constants.XMLNS_NS_URI, nsAttrName, nsUri);
+ }
+ }
+ }
+ }
+
+ /**
+ * Collect all the namespace URIs used in the subtree of a given element.
+ *
+ * @param context The element that should be searched for namespace URIs.
+ * @return All namespace URIs used in the subtree of <code>context</code>,
+ * including the ones used in <code>context</code> itself.
+ */
+ public static Set collectNamespaceURIs(Element context) {
+ Set result = new HashSet();
+
+ collectNamespaceURIsImpl(context, result);
+ return result;
+ }
+
+ /**
+ * A recursive method to do the work of <code>collectNamespaceURIs</code>.
+ *
+ * @param context The context element to evaluate.
+ * @param result The result, passed as a parameter to avoid unnecessary
+ * instantiations of <code>Set</code>.
+ */
+ private static void collectNamespaceURIsImpl(Element context, Set result) {
+ NamedNodeMap attrs = context.getAttributes();
+ NodeList childNodes = context.getChildNodes();
+ String nsUri;
+ int i;
+
+ // add the namespace of the context element
+ nsUri = context.getNamespaceURI();
+ if (nsUri != null && nsUri != Constants.XMLNS_NS_URI) {
+ result.add(nsUri);
+ }
+
+ // add all namespace URIs from attributes
+ for (i = 0; i < attrs.getLength(); i++) {
+ nsUri = attrs.item(i).getNamespaceURI();
+ if (nsUri != null && nsUri != Constants.XMLNS_NS_URI) {
+ result.add(nsUri);
+ }
+ }
+
+ // add all namespaces from subelements
+ for (i = 0; i < childNodes.getLength(); i++) {
+ Node node = childNodes.item(i);
+
+ if (node.getNodeType() == Node.ELEMENT_NODE) {
+ collectNamespaceURIsImpl((Element) node, result);
+ }
+ }
+ }
+
+ /**
+ * Check, that each attribute node in the given <code>NodeList</code> has its
+ * parent in the <code>NodeList</code> as well.
+ *
+ * @param nodes The <code>NodeList</code> to check.
+ * @return <code>true</code>, if each attribute node in <code>nodes</code>
+ * has its parent in <code>nodes</code> as well.
+ */
+ public static boolean checkAttributeParentsInNodeList(NodeList nodes) {
+ Set nodeSet = new HashSet();
+ int i;
+
+ // put the nodes into the nodeSet
+ for (i = 0; i < nodes.getLength(); i++) {
+ nodeSet.add(nodes.item(i));
+ }
+
+ // check that each attribute node's parent is in the node list
+ for (i = 0; i < nodes.getLength(); i++) {
+ Node n = nodes.item(i);
+
+ if (n.getNodeType() == Node.ATTRIBUTE_NODE) {
+ Attr attr = (Attr) n;
+ Element owner = attr.getOwnerElement();
+
+ if (owner == null) {
+ if (!isNamespaceDeclaration(attr)) {
+ return false;
+ }
+ }
+
+ if (!nodeSet.contains(owner) && !isNamespaceDeclaration(attr)) {
+ return false;
+ }
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Convert an unstructured <code>NodeList</code> into a
+ * <code>DocumentFragment</code>.
+ *
+ * @param nodeList Contains the node list to be converted into a DOM
+ * DocumentFragment.
+ * @return the resulting DocumentFragment. The DocumentFragment will be
+ * backed by a new DOM Document, i.e. all noded of the node list will be
+ * cloned.
+ * @throws ParserConfigurationException An error occurred creating the
+ * DocumentFragment.
+ * @precondition The nodes in the node list appear in document order
+ * @precondition for each Attr node in the node list, the owning Element is
+ * in the node list as well.
+ * @precondition each Element or Attr node in the node list is namespace
+ * aware.
+ */
+ public static DocumentFragment nodeList2DocumentFragment(NodeList nodeList)
+ throws ParserConfigurationException {
+
+ DocumentBuilder builder =
+ DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ Document doc = builder.newDocument();
+ DocumentFragment result = doc.createDocumentFragment();
+
+ if (null == nodeList || nodeList.getLength() == 0) {
+ return result;
+ }
+
+ int currPos = 0;
+ currPos =
+ nodeList2DocumentFragment(nodeList, currPos, result, null, null) + 1;
+
+ while (currPos < nodeList.getLength()) {
+ currPos =
+ nodeList2DocumentFragment(nodeList, currPos, result, null, null) + 1;
+ }
+ return result;
+ }
+
+ /**
+ * Helper method for the <code>nodeList2DocumentFragment</code>.
+ *
+ * @param nodeList The <code>NodeList</code> to convert.
+ * @param currPos The current position in the <code>nodeList</code>.
+ * @param result The resulting <code>DocumentFragment</code>.
+ * @param currOrgElem The current original element.
+ * @param currClonedElem The current cloned element.
+ * @return The current position.
+ */
+ private static int nodeList2DocumentFragment(
+ NodeList nodeList,
+ int currPos,
+ DocumentFragment result,
+ Element currOrgElem,
+ Element currClonedElem) {
+
+ while (currPos < nodeList.getLength()) {
+ Node currentNode = nodeList.item(currPos);
+ switch (currentNode.getNodeType()) {
+ case Node.COMMENT_NODE :
+ case Node.PROCESSING_INSTRUCTION_NODE :
+ case Node.TEXT_NODE :
+ {
+ // Append current node either to resulting DocumentFragment or to
+ // current cloned Element
+ if (null == currClonedElem) {
+ result.appendChild(
+ result.getOwnerDocument().importNode(currentNode, false));
+ } else {
+ // Stop processing if current Node is not a descendant of
+ // current Element
+ if (!isAncestor(currOrgElem, currentNode)) {
+ return --currPos;
+ }
+
+ currClonedElem.appendChild(
+ result.getOwnerDocument().importNode(currentNode, false));
+ }
+ break;
+ }
+
+ case Node.ELEMENT_NODE :
+ {
+ Element nextCurrOrgElem = (Element) currentNode;
+ Element nextCurrClonedElem =
+ result.getOwnerDocument().createElementNS(
+ nextCurrOrgElem.getNamespaceURI(),
+ nextCurrOrgElem.getNodeName());
+
+ // Append current Node either to resulting DocumentFragment or to
+ // current cloned Element
+ if (null == currClonedElem) {
+ result.appendChild(nextCurrClonedElem);
+ currOrgElem = nextCurrOrgElem;
+ currClonedElem = nextCurrClonedElem;
+ } else {
+ // Stop processing if current Node is not a descendant of
+ // current Element
+ if (!isAncestor(currOrgElem, currentNode)) {
+ return --currPos;
+ }
+
+ currClonedElem.appendChild(nextCurrClonedElem);
+ }
+
+ // Process current Node (of type Element) recursively
+ currPos =
+ nodeList2DocumentFragment(
+ nodeList,
+ ++currPos,
+ result,
+ nextCurrOrgElem,
+ nextCurrClonedElem);
+
+ break;
+ }
+
+ case Node.ATTRIBUTE_NODE :
+ {
+ Attr currAttr = (Attr) currentNode;
+
+ // GK 20030411: Hack to overcome problems with IAIK IXSIL
+ if (currAttr.getOwnerElement() == null)
+ break;
+ if (currClonedElem == null)
+ break;
+
+ // currClonedElem must be the owner Element of currAttr if
+ // preconditions are met
+ currClonedElem.setAttributeNS(
+ currAttr.getNamespaceURI(),
+ currAttr.getNodeName(),
+ currAttr.getValue());
+ break;
+ }
+
+ default :
+ {
+ // All other nodes will be ignored
+ }
+ }
+
+ currPos++;
+ }
+
+ return currPos;
+ }
+
+ /**
+ * Check, if the given attribute is a namespace declaration.
+ *
+ * @param attr The attribute to check.
+ * @return <code>true</code>, if the attribute is a namespace declaration,
+ * <code>false</code> otherwise.
+ */
+ private static boolean isNamespaceDeclaration(Attr attr) {
+ return Constants.XMLNS_NS_URI.equals(attr.getNamespaceURI());
+ }
+
+ /**
+ * Check, if a given DOM element is an ancestor of a given node.
+ *
+ * @param candAnc The DOM element to check for being the ancestor.
+ * @param cand The node to check for being the child.
+ * @return <code>true</code>, if <code>candAnc</code> is an (indirect)
+ * ancestor of <code>cand</code>; <code>false</code> otherwise.
+ */
+ public static boolean isAncestor(Element candAnc, Node cand) {
+ Node currPar = cand.getParentNode();
+
+ while (currPar != null) {
+ if (candAnc == currPar)
+ return true;
+ currPar = currPar.getParentNode();
+ }
+ return false;
+ }
+
+ /**
+ * Selects the (first) element from a node list and returns it.
+ *
+ * @param nl The NodeList to get the element from.
+ * @return The (first) element included in the node list or <code>null</code>
+ * if the node list is <code>null</code> or empty or no element is
+ * included in the list.
+ */
+ public static Element getElementFromNodeList (NodeList nl) {
+ if ((nl == null) || (nl.getLength() == 0)) {
+ return null;
+ }
+ for (int i=0; i<nl.getLength(); i++) {
+ Node node = nl.item(i);
+ if (node.getNodeType() == Node.ELEMENT_NODE) {
+ return (Element)node;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns all child elements of the given element.
+ *
+ * @param parent The element to get the child elements from.
+ *
+ * @return A list including all child elements of the given element.
+ * Maybe empty if the parent element has no child elements.
+ */
+ public static List getChildElements (Element parent) {
+ Vector v = new Vector();
+ NodeList nl = parent.getChildNodes();
+ int length = nl.getLength();
+ for (int i=0; i < length; i++) {
+ Node node = nl.item(i);
+ if (node.getNodeType() == Node.ELEMENT_NODE) {
+ v.add((Element)node);
+ }
+ }
+ return v;
+ }
+
+ /**
+ * Returns a byte array from given node.
+ * @param node
+ * @return
+ * @throws TransformerException
+ */
+ public static byte[] nodeToByteArray(Node node) throws TransformerException {
+ Source source = new DOMSource(node);
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ //StringWriter stringWriter = new StringWriter();
+ Result result = new StreamResult(out);
+ TransformerFactory factory = TransformerFactory.newInstance();
+ Transformer transformer = factory.newTransformer();
+ transformer.transform(source, result);
+ return out.toByteArray();
+ }
+
+
+}
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/DateTimeUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/DateTimeUtils.java
new file mode 100644
index 000000000..88133832a
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/util/DateTimeUtils.java
@@ -0,0 +1,372 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.util;
+
+import java.io.StringWriter;
+import java.text.ParseException;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.TimeZone;
+
+/**
+ * Utility for parsing and building XML type <code>dateTime</code>,
+ * according to ISO 8601.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ * @see <code>http://www.w3.org/2001/XMLSchema-datatypes"</code>
+ */
+public class DateTimeUtils {
+ /** Error messages. */
+ private static MessageProvider msg = MessageProvider.getInstance();
+
+ /**
+ * Builds a <code>dateTime</code> value from a <code>Calendar</code> value.
+ * @param cal the <code>Calendar</code> value
+ * @return the <code>dateTime</code> value
+ */
+ public static String buildDateTime(Calendar cal) {
+ StringWriter out = new StringWriter();
+ out.write("" + cal.get(Calendar.YEAR));
+ out.write("-");
+ out.write(to2DigitString(cal.get(Calendar.MONTH) + 1));
+ out.write("-");
+ out.write(to2DigitString(cal.get(Calendar.DAY_OF_MONTH)));
+ out.write("T");
+ out.write(to2DigitString(cal.get(Calendar.HOUR_OF_DAY)));
+ out.write(":");
+ out.write(to2DigitString(cal.get(Calendar.MINUTE)));
+ out.write(":");
+ out.write(to2DigitString(cal.get(Calendar.SECOND)));
+ int tzOffsetMilliseconds =
+ cal.get(Calendar.ZONE_OFFSET) + cal.get(Calendar.DST_OFFSET);
+ if (tzOffsetMilliseconds != 0) {
+ int tzOffsetMinutes = tzOffsetMilliseconds / (1000 * 60);
+ int tzOffsetHours = tzOffsetMinutes / 60;
+ tzOffsetMinutes -= tzOffsetHours * 60;
+ if (tzOffsetMilliseconds > 0) {
+ out.write("+");
+ out.write(to2DigitString(tzOffsetHours));
+ out.write(":");
+ out.write(to2DigitString(tzOffsetMinutes));
+ } else {
+ out.write("-");
+ out.write(to2DigitString(-tzOffsetHours));
+ out.write(":");
+ out.write(to2DigitString(-tzOffsetMinutes));
+ }
+ }
+ return out.toString();
+ }
+
+ /**
+ * Builds a <code>dateTime</code> value from a <code>Calendar</code> value.
+ * @param cal the <code>Calendar</code> value
+ * @return the <code>dateTime</code> value
+ */
+ public static String buildDate(Calendar cal) {
+ StringWriter out = new StringWriter();
+ out.write("" + cal.get(Calendar.YEAR));
+ out.write("-");
+ out.write(to2DigitString(cal.get(Calendar.MONTH) + 1));
+ out.write("-");
+ out.write(to2DigitString(cal.get(Calendar.DAY_OF_MONTH)));
+ return out.toString();
+ }
+
+ /**
+ * Builds a <code>dateTime</code> value from a <code>Calendar</code> value.
+ * @param cal the <code>Calendar</code> value
+ * @return the <code>dateTime</code> value
+ */
+ public static String buildTime(Calendar cal) {
+ StringWriter out = new StringWriter();
+ out.write(to2DigitString(cal.get(Calendar.HOUR_OF_DAY)));
+ out.write(":");
+ out.write(to2DigitString(cal.get(Calendar.MINUTE)));
+ out.write(":");
+ out.write(to2DigitString(cal.get(Calendar.SECOND)));
+
+ return out.toString();
+ }
+
+ /**
+ * Converts month, day, hour, minute, or second value
+ * to a 2 digit String.
+ * @param number the month, day, hour, minute, or second value
+ * @return 2 digit String
+ */
+ private static String to2DigitString(int number) {
+ if (number < 10)
+ return "0" + number;
+ else
+ return "" + number;
+ }
+
+ /**
+ * Parse a <code>String</code> containing a date and time instant, given in
+ * ISO 8601 format.
+ *
+ * @param dateTime The <code>String</code> to parse.
+ * @return The <code>Date</code> representation of the contents of
+ * <code>dateTime</code>.
+ * @throws ParseException Parsing the <code>dateTime</code> failed.
+ */
+ public static Date parseDateTime(String dateTime) throws ParseException {
+ GregorianCalendar calendar;
+ long time;
+ int yearSign = 1, year, month, day;
+ int hour, minute, second;
+ double fraction = 0.0;
+ int tzSign = 1, tzHour = 0, tzMinute = 0;
+ int curPos = 0;
+ String fractStr;
+ boolean localTime = false;
+ char c;
+
+ // parse year sign
+ ensureChars(dateTime, curPos, 1);
+ c = dateTime.charAt(curPos);
+ if (c == '+' || c == '-') {
+ yearSign = c == '+' ? 1 : -1;
+ curPos++;
+ }
+
+ // parse year
+ year = parseInt(dateTime, curPos, 4);
+ curPos += 4;
+
+ // parse '-'
+ ensureChar(dateTime, curPos, '-');
+ curPos++;
+
+ // parse month
+ month = parseInt(dateTime, curPos, 2);
+ ensureValue(month, 1, 12, curPos);
+ curPos += 2;
+
+ // parse '-'
+ ensureChar(dateTime, curPos, '-');
+ curPos++;
+
+ // parse day
+ day = parseInt(dateTime, curPos, 2);
+ ensureValue(day, 1, 31, curPos);
+ curPos += 2;
+
+ // parse 'T'
+ ensureChar(dateTime, curPos, 'T');
+ curPos++;
+
+ // parse hour
+ hour = parseInt(dateTime, curPos, 2);
+ ensureValue(hour, 0, 23, curPos);
+ curPos += 2;
+
+ // parse ':'
+ ensureChar(dateTime, curPos, ':');
+ curPos++;
+
+ // parse minute
+ minute = parseInt(dateTime, curPos, 2);
+ ensureValue(minute, 0, 59, curPos);
+ curPos += 2;
+
+ // parse ':'
+ ensureChar(dateTime, curPos, ':');
+ curPos++;
+
+ // parse second
+ second = parseInt(dateTime, curPos, 2);
+ ensureValue(second, 0, 59, curPos);
+ curPos += 2;
+
+ // parse a fraction
+ if (dateTime.length() > curPos && dateTime.charAt(curPos) == '.') {
+ curPos++;
+ ensureDigits(dateTime, curPos, 1);
+ fractStr = "0.";
+ fractStr
+ += dateTime.substring(curPos, curPos + countDigits(dateTime, curPos));
+ fraction = Double.parseDouble(fractStr);
+ curPos += countDigits(dateTime, curPos);
+ }
+
+ // parse a time zone
+ if (dateTime.length() > curPos) {
+ c = dateTime.charAt(curPos);
+ if (c == 'Z') {
+ curPos++;
+ } else if (c == '+' || c == '-') {
+ // parse time zone sign
+ tzSign = c == '+' ? 1 : -1;
+ curPos++;
+
+ // parse time zone hour
+ tzHour = parseInt(dateTime, curPos, 2);
+ ensureValue(tzHour, 0, 14, curPos);
+ curPos += 2;
+
+ // parse ':'
+ ensureChar(dateTime, curPos, ':');
+ curPos++;
+
+ // parse time zone minute
+ tzMinute = parseInt(dateTime, curPos, 2);
+ ensureValue(tzMinute, 0, 59, curPos);
+ curPos += 2;
+ }
+ } else {
+ localTime = true;
+ }
+
+ // if we have characters left, it's an error
+ if (dateTime.length() != curPos) {
+ throw new ParseException(msg.getMessage("datetime.00", null), curPos);
+ }
+
+ // build the Date object
+ year = year * yearSign;
+ try {
+ calendar = new GregorianCalendar(TimeZone.getTimeZone("GMT"));
+ calendar.set(year, month - 1, day, hour, minute, second);
+ calendar.set(Calendar.MILLISECOND, 0);
+ time = calendar.getTime().getTime();
+ time += (long) (fraction * 1000.0);
+ time -= tzSign * ((tzHour * 60) + tzMinute) * 60 * 1000;
+ if (localTime) {
+ time -= TimeZone.getDefault().getRawOffset();
+ }
+ return new Date(time);
+ } catch (IllegalArgumentException e) {
+ throw new ParseException(msg.getMessage("datetime.00", null), curPos);
+ }
+
+ }
+
+ /**
+ * Parse an integer value.
+ *
+ * @param str The <code>String</code> containing the digits.
+ * @param curPos The starting position.
+ * @param digits The number of digist making up the integer value.
+ * @return int The integer representation of the digits contained in
+ * <code>str</code>.
+ * @throws ParseException Parsing the integer value failed.
+ */
+ private static int parseInt(String str, int curPos, int digits)
+ throws ParseException {
+
+ ensureDigits(str, curPos, digits);
+ return Integer.parseInt(str.substring(curPos, curPos + digits));
+ }
+
+ /**
+ * Count the number of digits following <code>curPos</code>.
+ *
+ * @param str The <code>String</code> in which to count digits.
+ * @param curPos The starting position.
+ * @return int The number of digits.
+ */
+ private static int countDigits(String str, int curPos) {
+ int i;
+
+ for (i = curPos; i < str.length() && Character.isDigit(str.charAt(i)); i++);
+ return i - curPos;
+ }
+
+ /**
+ * Ensure that a value falls in a given min/max range.
+ *
+ * @param value The value to check.
+ * @param min The minimum allowed value.
+ * @param max The maximum allowed value.
+ * @param curPos To indicate the parsing position in the
+ * <code>ParseException</code>.
+ * @throws ParseException Thrown, if <code>value &lt; min || value &gt;
+ * max</code>
+ */
+ private static void ensureValue(int value, int min, int max, int curPos)
+ throws ParseException {
+
+ if (value < min || value > max) {
+ throw new ParseException(msg.getMessage("datetime.00", null), curPos);
+ }
+ }
+
+ /**
+ * Ensure that the given <code>String</code> has a number of characters left.
+ *
+ * @param str The <code>String</code> to check for its length.
+ * @param curPos The starting position.
+ * @param count The minimum number of characters that <code>str</code> must
+ * contain, starting at from <code>curPos</code>.
+ * @throws ParseException Thrown, if
+ * <code>curPos + count &gt; str.length()</code>.
+ */
+ private static void ensureChars(String str, int curPos, int count)
+ throws ParseException {
+ if (curPos + count > str.length()) {
+ throw new ParseException(msg.getMessage("datetime.00", null), curPos);
+ }
+ }
+
+ /**
+ * Ensure that a given <code>String</code> contains a certain character at a
+ * certain position.
+ *
+ * @param str The <code>String</code> in which to look up the character.
+ * @param curPos The position in <code>str</code> that must contain the
+ * character.
+ * @param c The character value that must be contained at position
+ * <code>curPos</code>.
+ * @throws ParseException Thrown, if the characters do not match or
+ * <code>curPos</code> is out of range.
+ */
+ private static void ensureChar(String str, int curPos, char c)
+ throws ParseException {
+
+ ensureChars(str, curPos, 1);
+ if (str.charAt(curPos) != c) {
+ throw new ParseException(msg.getMessage("datetime.00", null), curPos);
+ }
+ }
+
+ /**
+ * Ensure that a given <code>String</code> contains a number of digits,
+ * starting at a given position.
+ *
+ * @param str The <code>String</code> to scan for digits.
+ * @param curPos The starting postion.
+ * @param count The number of digits that must be contained in
+ * <code>str</code>, starting at <code>curPos</code>.
+ * @throws ParseException Thrown, if <code>str</code> is not long enough, or
+ * one of the characters following <code>curPos</code> in <code>str</code> is
+ * not a digit.
+ */
+ private static void ensureDigits(String str, int curPos, int count)
+ throws ParseException {
+
+ ensureChars(str, curPos, count);
+ for (int i = curPos; i < curPos + count; i++) {
+ if (!Character.isDigit(str.charAt(i))) {
+ throw new ParseException(msg.getMessage("datetime.00", null), curPos);
+ }
+ }
+ }
+
+}
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/EntityResolverChain.java b/common/src/main/java/at/gv/egovernment/moa/util/EntityResolverChain.java
new file mode 100644
index 000000000..88932494d
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/util/EntityResolverChain.java
@@ -0,0 +1,67 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.util;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.xml.sax.EntityResolver;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+/**
+ * Implementation of the <code>org.xml.sax.EntityResolver</code>,
+ * for use by a <code>org.apache.xerces.parsers.DOMParser</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class EntityResolverChain implements EntityResolver {
+ /** The <code>EntityResolver</code>s in the chain. */
+ private List resolvers = new ArrayList();
+
+ /**
+ * @see org.xml.sax.EntityResolver#resolveEntity(java.lang.String, java.lang.String)
+ */
+ public InputSource resolveEntity(String publicId, String systemId)
+ throws SAXException, IOException {
+
+ Iterator iter;
+
+ for (iter = resolvers.iterator(); iter.hasNext(); ) {
+ EntityResolver resolver = (EntityResolver) iter.next();
+ InputSource is = resolver.resolveEntity(publicId, systemId);
+
+ if (is != null) {
+ return is;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Add an <code>EntityResolver</code> to the chain.
+ *
+ * @param entityResolver The <code>EntityResolver</code> to add.
+ */
+ public void addEntityResolver(EntityResolver entityResolver) {
+ resolvers.add(entityResolver);
+ }
+
+}
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/FileUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/FileUtils.java
new file mode 100644
index 000000000..1368b41d2
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/util/FileUtils.java
@@ -0,0 +1,131 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.util;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+/**
+ * Utility for accessing files on the file system, and for reading from input streams.
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class FileUtils {
+
+ /**
+ * Reads a file, given by URL, into a byte array.
+ * @param urlString file URL
+ * @return file content
+ * @throws IOException on any exception thrown
+ */
+ public static byte[] readURL(String urlString) throws IOException {
+ URL url = new URL(urlString);
+ InputStream in = new BufferedInputStream(url.openStream());
+ byte[] content = StreamUtils.readStream(in);
+ in.close();
+ return content;
+ }
+ /**
+ * Reads a file, given by URL, into a String.
+ * @param urlString file URL
+ * @param encoding character encoding
+ * @return file content
+ * @throws IOException on any exception thrown
+ */
+ public static String readURL(String urlString, String encoding) throws IOException {
+ byte[] content = readURL(urlString);
+ return new String(content, encoding);
+ }
+ /**
+ * Reads a file, given by filename, into a byte array.
+ * @param filename filename
+ * @return file content
+ * @throws IOException on any exception thrown
+ */
+ public static byte[] readFile(String filename) throws IOException {
+ BufferedInputStream in = new BufferedInputStream(new FileInputStream(filename));
+ byte[] content = StreamUtils.readStream(in);
+ in.close();
+ return content;
+ }
+ /**
+ * Reads a file, given by filename, into a String.
+ * @param filename filename
+ * @param encoding character encoding
+ * @return file content
+ * @throws IOException on any exception thrown
+ */
+ public static String readFile(String filename, String encoding) throws IOException {
+ byte[] content = readFile(filename);
+ return new String(content, encoding);
+ }
+ /**
+ * Reads a file from a resource.
+ * @param name resource name
+ * @return file content as a byte array
+ * @throws IOException on any exception thrown
+ */
+ public static byte[] readResource(String name) throws IOException {
+ ClassLoader cl = FileUtils.class.getClassLoader();
+ BufferedInputStream in = new BufferedInputStream(cl.getResourceAsStream(name));
+ byte[] content = StreamUtils.readStream(in);
+ in.close();
+ return content;
+ }
+ /**
+ * Reads a file from a resource.
+ * @param name filename
+ * @param encoding character encoding
+ * @return file content
+ * @throws IOException on any exception thrown
+ */
+ public static String readResource(String name, String encoding) throws IOException {
+ byte[] content = readResource(name);
+ return new String(content, encoding);
+ }
+
+ /**
+ * Returns the absolute URL of a given url which is relative to the parameter root
+ * @param url
+ * @param root
+ * @return String
+ */
+ public static String makeAbsoluteURL(String url, String root) {
+ //if url is relative to rootConfigFileDirName make it absolute
+
+ File keyFile;
+ String newURL = url;
+
+ if(null == url) return null;
+
+ if (url.startsWith("http:/") || url.startsWith("https:/") || url.startsWith("file:/") || url.startsWith("ftp:/")) {
+ return url;
+ } else {
+ // check if absolute - if not make it absolute
+ keyFile = new File(url);
+ if (!keyFile.isAbsolute()) {
+ keyFile = new File(root, url);
+ newURL = keyFile.getPath();
+ }
+ return newURL;
+ }
+ }
+
+}
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/KeyStoreUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/KeyStoreUtils.java
new file mode 100644
index 000000000..b08feaffb
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/util/KeyStoreUtils.java
@@ -0,0 +1,149 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.util;
+
+import iaik.x509.X509Certificate;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.security.GeneralSecurityException;
+import java.security.KeyStore;
+import java.security.cert.Certificate;
+
+/**
+ * Utility for creating and loading key stores.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class KeyStoreUtils {
+
+ /**
+ * Loads a key store from file.
+ *
+ * @param keystoreType key store type
+ * @param urlString URL of key store
+ * @param password password protecting the key store
+ * @return key store loaded
+ * @throws IOException thrown while reading the key store from file
+ * @throws GeneralSecurityException thrown while creating the key store
+ */
+ public static KeyStore loadKeyStore(
+ String keystoreType,
+ String urlString,
+ String password)
+ throws IOException, GeneralSecurityException {
+
+ URL keystoreURL = new URL(urlString);
+ InputStream in = keystoreURL.openStream();
+ return loadKeyStore(keystoreType, in, password);
+ }
+ /**
+ * Loads a key store from an <code>InputStream</code>, and
+ * closes the <code>InputStream</code>.
+ *
+ * @param keystoreType key store type
+ * @param in input stream
+ * @param password password protecting the key store
+ * @return key store loaded
+ * @throws IOException thrown while reading the key store from the stream
+ * @throws GeneralSecurityException thrown while creating the key store
+ */
+ public static KeyStore loadKeyStore(
+ String keystoreType,
+ InputStream in,
+ String password)
+ throws IOException, GeneralSecurityException {
+
+ char[] chPassword = null;
+ if (password != null)
+ chPassword = password.toCharArray();
+ KeyStore ks = KeyStore.getInstance(keystoreType);
+ ks.load(in, chPassword);
+ in.close();
+ return ks;
+ }
+ /**
+ * Creates a key store from X509 certificate files, aliasing them with
+ * the index in the <code>String[]</code>, starting with <code>"0"</code>.
+ *
+ * @param keyStoreType key store type
+ * @param certFilenames certificate filenames
+ * @return key store created
+ * @throws IOException thrown while reading the certificates from file
+ * @throws GeneralSecurityException thrown while creating the key store
+ */
+ public static KeyStore createKeyStore(
+ String keyStoreType,
+ String[] certFilenames)
+ throws IOException, GeneralSecurityException {
+
+ KeyStore ks = KeyStore.getInstance(keyStoreType);
+ ks.load(null, null);
+ for (int i = 0; i < certFilenames.length; i++) {
+ Certificate cert = loadCertificate(certFilenames[i]);
+ ks.setCertificateEntry("" + i, cert);
+ }
+ return ks;
+ }
+ /**
+ * Creates a key store from a directory containg X509 certificate files,
+ * aliasing them with the index in the <code>String[]</code>, starting with <code>"0"</code>.
+ * All the files in the directory are considered to be certificates.
+ *
+ * @param keyStoreType key store type
+ * @param certDirURLString file URL of directory containing certificate filenames
+ * @return key store created
+ * @throws IOException thrown while reading the certificates from file
+ * @throws GeneralSecurityException thrown while creating the key store
+ */
+ public static KeyStore createKeyStoreFromCertificateDirectory(
+ String keyStoreType,
+ String certDirURLString)
+ throws IOException, GeneralSecurityException {
+
+ URL certDirURL = new URL(certDirURLString);
+ String certDirname = certDirURL.getFile();
+ File certDir = new File(certDirname);
+ String[] certFilenames = certDir.list();
+ String separator =
+ (certDirname.endsWith(File.separator) ? "" : File.separator);
+ for (int i = 0; i < certFilenames.length; i++) {
+ certFilenames[i] = certDirname + separator + certFilenames[i];
+ }
+ return createKeyStore(keyStoreType, certFilenames);
+ }
+
+ /**
+ * Loads an X509 certificate from file.
+ * @param certFilename filename
+ * @return the certificate loaded
+ * @throws IOException thrown while reading the certificate from file
+ * @throws GeneralSecurityException thrown while creating the certificate
+ */
+ private static Certificate loadCertificate(String certFilename)
+ throws IOException, GeneralSecurityException {
+
+ FileInputStream in = new FileInputStream(certFilename);
+ Certificate cert = new X509Certificate(in);
+ in.close();
+ return cert;
+ }
+
+}
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/MOADefaultHandler.java b/common/src/main/java/at/gv/egovernment/moa/util/MOADefaultHandler.java
new file mode 100644
index 000000000..c6b0a3c32
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/util/MOADefaultHandler.java
@@ -0,0 +1,97 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.util;
+
+import java.io.IOException;
+
+import org.xml.sax.EntityResolver;
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * A <code>DefaultHandler</code> that uses a <code>MOAEntityResolver</code> and
+ * a <code>MOAErrorHandler</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class MOADefaultHandler extends DefaultHandler {
+ /** The <code>EntityResolver</code> to use. */
+ private EntityResolver entityResolver;
+ /** The <code>ErrorHandler</code> to use. */
+ private ErrorHandler errorHandler;
+
+ /**
+ * Create a new <code>MOADefaultHandler</code>.
+ */
+ public MOADefaultHandler() {
+ entityResolver = new MOAEntityResolver();
+ errorHandler = new MOAErrorHandler();
+ }
+
+ /**
+ * Create a new <code>MOADefaultHandler</code>.
+ *
+ * @param entityResolver The <code>EntityResolver</code> to use for resolving
+ * external entities.
+ * @param errorHandler The <code>ErrorHandler</code> to use for reporting
+ * parsing errors.
+ */
+ public MOADefaultHandler(
+ EntityResolver entityResolver,
+ ErrorHandler errorHandler) {
+
+ this.entityResolver = entityResolver;
+ this.errorHandler = errorHandler;
+ }
+
+ /**
+ * @see org.xml.sax.EntityResolver#resolveEntity(java.lang.String, java.lang.String)
+ */
+ public InputSource resolveEntity(String publicId, String systemId)
+ throws SAXException {
+ try {
+ return entityResolver.resolveEntity(publicId, systemId);
+ } catch (IOException e) {
+ return null;
+ }
+ }
+
+ /**
+ * @see org.xml.sax.ErrorHandler#warning(org.xml.sax.SAXParseException)
+ */
+ public void warning(SAXParseException exception) throws SAXException {
+ errorHandler.warning(exception);
+ }
+
+ /**
+ * @see org.xml.sax.ErrorHandler#error(org.xml.sax.SAXParseException)
+ */
+ public void error(SAXParseException exception) throws SAXException {
+ errorHandler.error(exception);
+ }
+
+ /**
+ * @see org.xml.sax.ErrorHandler#fatalError(org.xml.sax.SAXParseException)
+ */
+ public void fatalError(SAXParseException exception) throws SAXException {
+ errorHandler.fatalError(exception);
+ }
+
+}
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/MOAEntityResolver.java b/common/src/main/java/at/gv/egovernment/moa/util/MOAEntityResolver.java
new file mode 100644
index 000000000..02302cb65
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/util/MOAEntityResolver.java
@@ -0,0 +1,118 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.util;
+
+import java.io.InputStream;
+
+import org.apache.xerces.util.URI;
+import org.apache.xerces.util.URI.MalformedURIException;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.InputSource;
+
+import at.gv.egovernment.moa.logging.LogMsg;
+import at.gv.egovernment.moa.logging.Logger;
+
+/**
+ * An <code>EntityResolver</code> that looks up entities stored as
+ * local resources.
+ *
+ * <p>The following DTDs are mapped to local resources:
+ * <ul>
+ * <li>The XMLSchema.dtd</li>
+ * <li>The datatypes.dtd</li>
+ * </ul>
+ * </p>
+ * <p>For all other resources, an attempt is made to resolve them as resources,
+ * either absolute or relative to <code>Constants.SCHEMA_ROOT</code>.
+ *
+ * @author Patrick Peck
+ * @author Sven Aigner
+ */
+public class MOAEntityResolver implements EntityResolver {
+
+ /**
+ * Resolve an entity.
+ *
+ * The <code>systemId</code> parameter is used to perform the lookup of the
+ * entity as a resource, either by interpreting the <code>systemId</code> as
+ * an absolute resource path, or by appending the last path component of
+ * <code>systemId</code> to <code>Constants.SCHEMA_ROOT</code>.
+ *
+ * @param publicId The public ID of the resource.
+ * @param systemId The system ID of the resource.
+ * @return An <code>InputSource</code> from which the entity can be read, or
+ * <code>null</code>, if the entity could not be found.
+ * @see org.xml.sax.EntityResolver#resolveEntity(java.lang.String, java.lang.String)
+ */
+ public InputSource resolveEntity(String publicId, String systemId) {
+ InputStream stream;
+ int slashPos;
+
+ if (Logger.isDebugEnabled()) {
+ Logger.debug(
+ new LogMsg("resolveEntity: p=" + publicId + " s=" + systemId));
+ }
+
+ if (publicId != null) {
+ // check if we can resolve some standard dtd's
+ if (publicId.equalsIgnoreCase("-//W3C//DTD XMLSchema 200102//EN")) {
+ return new InputSource(
+ getClass().getResourceAsStream(
+ Constants.SCHEMA_ROOT + "XMLSchema.dtd"));
+ } else if (publicId.equalsIgnoreCase("datatypes")) {
+ return new InputSource(
+ getClass().getResourceAsStream(
+ Constants.SCHEMA_ROOT + "datatypes.dtd"));
+ }
+ } else if (systemId != null) {
+ // get the URI path
+ try {
+ URI uri = new URI(systemId);
+ systemId = uri.getPath();
+ if (!"file".equals(uri.getScheme()) || "".equals(systemId.trim())) {
+ return null;
+ }
+ } catch (MalformedURIException e) {
+ return null;
+ }
+
+ // try to get the resource from the full path
+ stream = getClass().getResourceAsStream(systemId);
+ if (stream != null) {
+ InputSource source = new InputSource(stream);
+
+ source.setSystemId(systemId);
+ return source;
+ }
+
+ // try to get the resource from the last path component
+ slashPos = systemId.lastIndexOf('/');
+ if (slashPos >= 0 && systemId.length() > slashPos) {
+ systemId = systemId.substring(slashPos + 1, systemId.length());
+ stream =
+ getClass().getResourceAsStream(Constants.SCHEMA_ROOT + systemId);
+ if (stream != null) {
+ InputSource source = new InputSource(stream);
+
+ source.setSystemId(systemId);
+ return source;
+ }
+ }
+ }
+
+ return null; // nothing found - let the parser handle the entity
+ }
+} \ No newline at end of file
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/MOAErrorHandler.java b/common/src/main/java/at/gv/egovernment/moa/util/MOAErrorHandler.java
new file mode 100644
index 000000000..4885fedb7
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/util/MOAErrorHandler.java
@@ -0,0 +1,100 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.util;
+
+import org.apache.xml.utils.DefaultErrorHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+
+import at.gv.egovernment.moa.logging.LogMsg;
+import at.gv.egovernment.moa.logging.Logger;
+
+/**
+ * An <code>ErrorHandler</code> that logs a message and throws a
+ * <code>SAXException</code> upon <code>error</code> and <code>fatal</code>
+ * parsing errors.
+ *
+ * @author Patrick Peck
+ * @author Sven Aigner
+ */
+public class MOAErrorHandler extends DefaultErrorHandler {
+
+ /**
+ * Logs a warning message.
+ *
+ * @see org.xml.sax.ErrorHandler#warning(SAXParseException)
+ */
+ public void warning(SAXParseException exception) throws SAXException {
+ warn("parser.00", messageParams(exception), null);
+ }
+
+ /**
+ * Logs a warning and rethrows the <code>exception</code>.
+ *
+ * @see org.xml.sax.ErrorHandler#error(SAXParseException)
+ */
+ public void error(SAXParseException exception) throws SAXException {
+ warn("parser.01", messageParams(exception), null);
+ throw exception;
+ }
+
+ /**
+ * Logs a warning and rethrows the <code>exception</code>.
+ *
+ * @see org.xml.sax.ErrorHandler#fatalError(SAXParseException)
+ */
+ public void fatalError(SAXParseException exception) throws SAXException {
+ warn("parser.02", messageParams(exception), null);
+ throw exception;
+ }
+
+ /**
+ * Log a warning message.
+ *
+ * @param messageId The message ID to log.
+ * @param parameters Additional message parameters.
+ * @param t The <code>Throwable</code> to log; usually the cause of this
+ * warning.
+ */
+ private static void warn(
+ String messageId,
+ Object[] parameters,
+ Throwable t) {
+
+ MessageProvider msg = MessageProvider.getInstance();
+ Logger.warn(new LogMsg(msg.getMessage(messageId, parameters)), t);
+ }
+
+ /**
+ * Put the system id, line and column number information from the exception
+ * into an <code>Object</code> array, to provide it as a
+ * <code>MessageFormat</code> parameter.
+ *
+ * @param e The <code>SAXParseException</code> containing the
+ * source system id and line/column numbers.
+ * @return An array containing the system id (a <code>String</code>) as well
+ * as line/column numbers (2 <code>Integer</code> objects) from the
+ * <code>SAXParseException</code>.
+ */
+ private static Object[] messageParams(SAXParseException e) {
+ return new Object[] {
+ e.getMessage(),
+ e.getSystemId(),
+ new Integer(e.getLineNumber()),
+ new Integer(e.getColumnNumber())};
+ }
+
+} \ No newline at end of file
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/MOATimer.java b/common/src/main/java/at/gv/egovernment/moa/util/MOATimer.java
new file mode 100644
index 000000000..a2ec7386c
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/util/MOATimer.java
@@ -0,0 +1,125 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.util;
+
+import java.util.Map;
+import java.util.WeakHashMap;
+
+/**
+ * A timer utility for named timers.
+ *
+ * @author Sven Aigner
+ */
+public class MOATimer {
+
+ /** The single instance of this class. */
+ private static MOATimer instance = null;
+ /** The starting points of single timings. */
+ private static Map timemapstart = new WeakHashMap();
+ /** The end points of single timings. */
+ private static Map timemapend = new WeakHashMap();
+
+ /**
+ * Return the single instance of this class.
+ *
+ * @return The single instance of this class.
+ */
+ public static MOATimer getInstance() {
+ if (instance == null) {
+ instance = new MOATimer();
+ }
+ return instance;
+ }
+
+ /**
+ * Create a new <code>MOATimer</code>.
+ *
+ * Protected to disallow multiple instances.
+ */
+ protected MOATimer() {
+ super();
+ }
+
+ /**
+ * Start timing a certain action.
+ *
+ * The timing belonging to the action ID is garbage collected as soon as there
+ * exists no other reference to the action ID.
+ *
+ * @param id The action ID.
+ */
+ public void startTiming(Object id) {
+ timemapstart.put(id, new Long(System.currentTimeMillis()));
+ }
+
+ /**
+ * Stop timing an action.
+ *
+ * @param id The action ID.
+ */
+ public void stopTiming(Object id) {
+ timemapend.put(id, new Long(System.currentTimeMillis()));
+ }
+
+ /**
+ * Get the duration of an action.
+ *
+ * @param id The action ID for which to compute the duration.
+ * @return long The duration in milliseconds between calls to
+ * <code>startTiming()</code> and <code>stopTiming()</code>. If
+ * only <code>startTiming()</code> has been called for the action, then
+ * current difference to the system time is returned. If no timing exists for
+ * the action, <code>- 1</code> is returned.
+ */
+ public long duration(Object id) {
+ if (timemapstart.containsKey(id)) {
+ long start = ((Long) timemapstart.get(id)).longValue();
+ if (timemapend.containsKey(id)) {
+ long end = ((Long) timemapend.get(id)).longValue();
+ return end - start;
+ } else {
+ return System.currentTimeMillis() - start;
+ }
+ } else
+ return -1;
+ }
+
+ /**
+ * Get the duration of an action, as a nicely formatted <code>String</code>.
+ *
+ * @param id The action ID.
+ * @return String The <code>duration()</code> as a <code>String</code>.
+ */
+ public String durationAsString(Object id) {
+ long dur = duration(id);
+ long second = dur / 1000;
+ long mil = (dur) - (second * 1000);
+ return "Duration: " + second + "." + mil + " seconds";
+ }
+
+ /**
+ * Remove a timing.
+ *
+ * @param id The action ID.
+ */
+ public void clearTiming(String id) {
+ if (timemapstart.containsKey(id))
+ timemapstart.remove(id);
+ if (timemapend.containsKey(id))
+ timemapend.remove(id);
+ }
+
+}
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/MessageProvider.java b/common/src/main/java/at/gv/egovernment/moa/util/MessageProvider.java
new file mode 100644
index 000000000..dde220a6e
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/util/MessageProvider.java
@@ -0,0 +1,78 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.util;
+
+import java.util.Locale;
+
+/**
+ * A singleton wrapper around a <code>Message</code> object.
+ *
+ * Provides the messages used in the common project.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class MessageProvider {
+ /** The location of the default message resources. */
+ private static final String[] DEFAULT_MESSAGE_RESOURCES =
+ { "resources/properties/common_messages" };
+ /** The locale of the default message resources. */
+ private static final Locale[] DEFAULT_MESSAGE_LOCALES =
+ new Locale[] { new Locale("de", "AT") };
+ /** The single instance of this class. */
+ private static MessageProvider instance;
+
+ /** The messages provided by this <code>MessageProvider</code>. */
+ private Messages messages;
+
+ /**
+ * Return the single instance of the <code>MessageProvider</code>.
+ *
+ * Intialilizes the <code>MessageProvider</code> with the default message
+ * locations: <code>/resources/properties/common_messages</code>.
+ *
+ * @return The single <code>MessageProvider</code>.
+ */
+ public static synchronized MessageProvider getInstance() {
+ if (instance == null) {
+ instance =
+ new MessageProvider(DEFAULT_MESSAGE_RESOURCES, DEFAULT_MESSAGE_LOCALES);
+ }
+ return instance;
+ }
+
+ /**
+ * Create a <code>MessageProvider</code>.
+ *
+ * @param resourceNames The names of the resources containing the messages.
+ * @param locales The corresponding locales.
+ */
+ protected MessageProvider(String[] resourceNames, Locale[] locales) {
+ this.messages = new Messages(resourceNames, locales);
+ }
+
+ /**
+ * Get the message corresponding to a given message ID.
+ *
+ * @param messageId The ID of the message.
+ * @param parameters The parameters to fill in into the message arguments.
+ * @return The formatted message.
+ */
+ public String getMessage(String messageId, Object[] parameters) {
+ return messages.getMessage(messageId, parameters);
+ }
+
+}
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/Messages.java b/common/src/main/java/at/gv/egovernment/moa/util/Messages.java
new file mode 100644
index 000000000..476f75046
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/util/Messages.java
@@ -0,0 +1,132 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.util;
+
+import java.text.MessageFormat;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.PropertyResourceBundle;
+
+import at.gv.egovernment.moa.logging.Logger;
+
+/**
+ * Provides access to the system messages resource used for exception handling
+ * and logging messages.
+ *
+ * Messages must be provided as a resource bundle at the path.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class Messages {
+ /** Error message indicating that no messages are avaiable. */
+ private static final String ERROR_MESSAGES_UNAVAILABLE =
+ "Fehler in der Server-Konfiguration. "
+ + "Die Fehlertexte konnten nicht geladen werden.";
+ /** Error message indicating that the message is not available. */
+ private static final String ERROR_NO_MESSAGE =
+ "Keine Fehlermeldung für Fehler-Nr.={0}";
+
+ /** The names of the resources containing the messages. */
+ private String[] resourceNames;
+ /** The corresponding <code>Locale</code>s of the resources. */
+ private Locale[] locales;
+ /** The <code>ResourceBundle</code>s containing the messages. */
+ private ResourceBundleChain messages;
+
+ /**
+ * Create a new <code>Message</code> object containing the messages
+ * in the given resources.
+ *
+ * @param resourceNames The names of the resources containing the messages.
+ * @param locales The corresponding locales.
+ */
+ public Messages(String[] resourceNames, Locale[] locales) {
+ this.resourceNames = resourceNames;
+ this.locales = locales;
+ this.messages = null;
+ }
+
+ /**
+ * Get the message corresponding to a given message ID.
+ *
+ * @param messageId The ID of the message.
+ * @param parameters The parameters to fill in into the message arguments.
+ * @return The formatted message.
+ */
+ public String getMessage(String messageId, Object[] parameters) {
+ // initialize messages
+ if (messages == null) {
+ initMessages();
+ }
+
+ // create the message
+ if (messages == null) {
+ return ERROR_MESSAGES_UNAVAILABLE;
+ } else {
+ try {
+ String rawMessage = messages.getString(messageId);
+ return MessageFormat.format(rawMessage, parameters);
+ } catch (MissingResourceException e2) {
+ // couldn't find any message -> set to default error message
+ return MessageFormat.format(
+ ERROR_NO_MESSAGE,
+ new Object[] { messageId });
+ }
+ }
+ }
+
+ /**
+ * Return the names of the resources containing the messages.
+ *
+ * @return String[] The names of the resource bundles containing the messages.
+ */
+ private String[] getResourceNames() {
+ return resourceNames;
+ }
+
+ /**
+ * Return the <code>Locale</code>s of the resources containing the messages.
+ *
+ * @return Locale[] The <code>Locale</code>s of the resource bundles
+ * containing the messages.
+ */
+ private Locale[] getLocales() {
+ return locales;
+ }
+
+ /**
+ * Initialize the <code>messages</code> <code>ResourceBundle</code> containing
+ * the MOA error messages.
+ */
+ private void initMessages() {
+ messages = new ResourceBundleChain();
+ int i;
+
+ // initialize the message resources
+ for (i = 0; i < resourceNames.length; i++) {
+ try {
+ messages.addResourceBundle(
+ PropertyResourceBundle.getBundle(
+ getResourceNames()[i],
+ getLocales()[i]));
+ } catch (MissingResourceException e) {
+ Logger.error(ERROR_MESSAGES_UNAVAILABLE, e);
+ }
+ }
+ }
+
+}
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/NodeIteratorAdapter.java b/common/src/main/java/at/gv/egovernment/moa/util/NodeIteratorAdapter.java
new file mode 100644
index 000000000..1ca222d94
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/util/NodeIteratorAdapter.java
@@ -0,0 +1,102 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.util;
+
+import java.util.ListIterator;
+
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Node;
+import org.w3c.dom.traversal.NodeFilter;
+import org.w3c.dom.traversal.NodeIterator;
+
+/**
+ * A <code>NodeIterator</code> implementation based on a
+ * <code>ListIterator</code>.
+ *
+ * @see java.util.ListIterator
+ * @see org.w3c.dom.traversal.NodeIterator
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class NodeIteratorAdapter implements NodeIterator {
+
+ /** The <code>ListIterator</code> to wrap. */
+ private ListIterator nodeIterator;
+
+ /**
+ * Create a new <code>NodeIteratorAdapter</code>.
+ * @param nodeIterator The <code>ListIterator</code> to iterate over.
+ */
+ public NodeIteratorAdapter(ListIterator nodeIterator) {
+ this.nodeIterator = nodeIterator;
+ }
+
+ /**
+ * @see org.w3c.dom.traversal.NodeIterator#getRoot()
+ */
+ public Node getRoot() {
+ return null;
+ }
+
+ /**
+ * @see org.w3c.dom.traversal.NodeIterator#getWhatToShow()
+ */
+ public int getWhatToShow() {
+ return NodeFilter.SHOW_ALL;
+ }
+
+ /**
+ * @see org.w3c.dom.traversal.NodeIterator#getFilter()
+ */
+ public NodeFilter getFilter() {
+ return null;
+ }
+
+ /**
+ * @see org.w3c.dom.traversal.NodeIterator#getExpandEntityReferences()
+ */
+ public boolean getExpandEntityReferences() {
+ return false;
+ }
+
+ /**
+ * @see org.w3c.dom.traversal.NodeIterator#nextNode()
+ */
+ public Node nextNode() throws DOMException {
+ if (nodeIterator.hasNext()) {
+ return (Node) nodeIterator.next();
+ }
+ return null;
+ }
+
+ /**
+ * @see org.w3c.dom.traversal.NodeIterator#previousNode()
+ */
+ public Node previousNode() throws DOMException {
+ if (nodeIterator.hasPrevious()) {
+ return (Node) nodeIterator.previous();
+ }
+ return null;
+ }
+
+ /**
+ * @see org.w3c.dom.traversal.NodeIterator#detach()
+ */
+ public void detach() {
+ }
+
+}
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/NodeListAdapter.java b/common/src/main/java/at/gv/egovernment/moa/util/NodeListAdapter.java
new file mode 100644
index 000000000..8e1d7dd8a
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/util/NodeListAdapter.java
@@ -0,0 +1,59 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.util;
+
+import java.util.List;
+
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * A <code>NodeList</code> implementation based on a <code>List</code>.
+ *
+ * @see java.util.List
+ * @see org.w3c.dom.NodeList
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class NodeListAdapter implements NodeList {
+ /** The <code>List</code> to wrap. */
+ private List nodeList;
+
+ /**
+ * Create a new <code>NodeListAdapter</code>.
+ *
+ * @param nodeList The <code>List</code> containing the nodes.
+ */
+ public NodeListAdapter(List nodeList) {
+ this.nodeList = nodeList;
+ }
+
+ /**
+ * @see org.w3c.dom.NodeList#item(int)
+ */
+ public Node item(int index) {
+ return (Node) nodeList.get(index);
+ }
+
+ /**
+ * @see org.w3c.dom.NodeList#getLength()
+ */
+ public int getLength() {
+ return nodeList.size();
+ }
+
+}
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/OutputXML2File.java b/common/src/main/java/at/gv/egovernment/moa/util/OutputXML2File.java
new file mode 100644
index 000000000..6663f7a3c
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/util/OutputXML2File.java
@@ -0,0 +1,93 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+/*
+ * Created on 26.04.2004
+ *
+ * @author rschamberger
+ * $ID$
+ */
+package at.gv.egovernment.moa.util;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.logging.Logger;
+
+/**
+ * utility functions to write XML data to files
+ * @author rschamberger
+ * @version $Id$
+ */
+public class OutputXML2File {
+
+ /**
+ * writes an XML structure to file if debug is enabled in hierarchy (Encoding: UTF-8)
+ *
+ * @param filename file name
+ * @param rootElem root element in DOM tree
+ * @param hierarchy of the Logger
+ */
+ public static void debugOutputXML2File(String filename, Element rootElem, String hierarchy) {
+ if (Logger.isDebugEnabled(hierarchy)) {
+ outputXML2File(filename, rootElem);
+ }
+ }
+
+ /**
+ * writes an XML structure to file if debug is enabled in hierarchy (Encoding: UTF-8)
+ *
+ * @param filename file name
+ * @param xmlString XML string
+ * @param hierarchy of the Logger
+ */
+ public static void debugOutputXML2File(String filename, String xmlString, String hierarchy) {
+ if (Logger.isDebugEnabled(hierarchy)) {
+ outputXML2File(filename, xmlString);
+ }
+ }
+
+ /**
+ * writes an XML structure to file (Encoding: UTF-8)
+ *
+ * @param filename file name
+ * @param rootElem root element in DOM tree
+ */
+ public static void outputXML2File(String filename, Element rootElem) {
+ try {
+ String xmlString = new String(DOMUtils.serializeNode(rootElem));
+ outputXML2File(filename, xmlString);
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+ }
+
+ /**
+ * writes an XML structure to file (Encoding: UTF-8)
+ *
+ * @param filename file name
+ * @param xmlString XML string
+ */
+ public static void outputXML2File(String filename, String xmlString) {
+ try {
+ java.io.OutputStream fout = new java.io.FileOutputStream(filename);
+ byte[] xmlData = xmlString.getBytes("UTF-8");
+ fout.write(xmlData);
+ fout.close();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+ }
+
+}
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/ResourceBundleChain.java b/common/src/main/java/at/gv/egovernment/moa/util/ResourceBundleChain.java
new file mode 100644
index 000000000..609c873ff
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/util/ResourceBundleChain.java
@@ -0,0 +1,81 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.util;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * A class to chain <code>ResourceBundle</code>s.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ResourceBundleChain {
+ /** Error message indicating the resource is not available. */
+ private static final String ERROR_MISSING_RESOURCE = "Missing resource";
+ /** The <code>ResourceBundle</code>s contained in this chain. */
+ private List resourceBundles = new ArrayList();
+
+ /**
+ * Add a <code>ResourceBundle</code> to the chain.
+ *
+ * @param resourceBundle The <code>ResourceBundle</code> to add.
+ */
+ public void addResourceBundle(ResourceBundle resourceBundle) {
+ resourceBundles.add(resourceBundle);
+ }
+
+ /**
+ * Return the value of the resource.
+ *
+ * @param key The key to access the <code>String</code> resource.
+ * @return The resource value. All the registered <code>ResourceBundle</code>s
+ * are searched in the order in which they have previously been added to this
+ * <code>ResourceBundleChain</code>.
+ * @throws MissingResourceException The resource coult not be found in any of
+ * the bundles.
+ */
+ public String getString(String key) throws MissingResourceException {
+ MissingResourceException lastException = null;
+ Iterator iter;
+
+ // handle case where no resource bundles have been added
+ if (resourceBundles.size() == 0) {
+ throw new MissingResourceException(
+ ERROR_MISSING_RESOURCE,
+ this.getClass().getName(),
+ key);
+ }
+
+ // try to find the resource in one of the bundles; if it cannot be found,
+ // return the exception thrown by the last bundle in the list
+ for (iter = resourceBundles.iterator(); iter.hasNext();) {
+ ResourceBundle resourceBundle = (ResourceBundle) iter.next();
+ try {
+ String value = resourceBundle.getString(key);
+ return value;
+ } catch (MissingResourceException e) {
+ lastException = e;
+ }
+ }
+ throw lastException;
+ }
+
+}
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/SSLUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/SSLUtils.java
new file mode 100644
index 000000000..a7937b1bd
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/util/SSLUtils.java
@@ -0,0 +1,235 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.util;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.security.GeneralSecurityException;
+import java.security.KeyStore;
+
+import javax.net.ssl.KeyManager;
+import javax.net.ssl.KeyManagerFactory;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSocketFactory;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.TrustManagerFactory;
+
+/**
+ * Utility for connecting to server applications via SSL.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class SSLUtils {
+
+ /**
+ * Creates an <code>SSLSocketFactory</code> which utilizes the given trust store.
+ *
+ * @param trustStoreType key store type of trust store
+ * @param trustStoreInputStream input stream for reading JKS trust store containing
+ * trusted server certificates; if <code>null</code>, the default
+ * trust store will be utilized
+ * @param trustStorePassword if provided, it will be used to check
+ * the integrity of the trust store; if omitted, it will not be checked
+ * @return <code>SSLSocketFactory</code> to be used by an <code>HttpsURLConnection</code>
+ * @throws IOException thrown while reading from the input stream
+ * @throws GeneralSecurityException thrown while creating the socket factory
+ */
+ public static SSLSocketFactory getSSLSocketFactory(
+ String trustStoreType,
+ InputStream trustStoreInputStream,
+ String trustStorePassword)
+ throws IOException, GeneralSecurityException {
+
+ TrustManager[] tms = getTrustManagers(trustStoreType, trustStoreInputStream, trustStorePassword);
+ SSLContext ctx = SSLContext.getInstance("TLS");
+ ctx.init(null, tms, null);
+
+ SSLSocketFactory sf = ctx.getSocketFactory();
+ return sf;
+ }
+ /**
+ * Creates an <code>SSLSocketFactory</code> which utilizes the
+ * given trust store and keystore.
+ *
+ * @param trustStore trust store containing trusted server certificates;
+ * if <code>null</code>, the default trust store will be utilized
+ * @param clientKeyStoreType key store type of <code>clientKeyStore</code>
+ * @param clientKeyStoreURL URL of key store containing keys to be used for
+ * client authentication; if <code>null</code>, the default key store will be utilized
+ * @param clientKeyStorePassword if provided, it will be used to check
+ * the integrity of the client key store; if omitted, it will not be checked
+ * @return <code>SSLSocketFactory</code> to be used by an <code>HttpsURLConnection</code>
+ * @throws IOException thrown while reading key store file
+ * @throws GeneralSecurityException thrown while creating the socket factory
+ */
+ public static SSLSocketFactory getSSLSocketFactory(
+ KeyStore trustStore,
+ String clientKeyStoreType,
+ String clientKeyStoreURL,
+ String clientKeyStorePassword)
+ throws IOException, GeneralSecurityException {
+
+ SSLContext ctx = getSSLContext(
+ trustStore, clientKeyStoreType, clientKeyStoreURL, clientKeyStorePassword);
+ SSLSocketFactory sf = ctx.getSocketFactory();
+ return sf;
+ }
+ /**
+ * Creates an <code>SSLContext</code> initialized for the
+ * given trust store and keystore.
+ *
+ * @param trustStore trust store containing trusted server certificates;
+ * if <code>null</code>, the default trust store will be utilized
+ * @param clientKeyStoreType key store type of <code>clientKeyStore</code>
+ * @param clientKeyStoreURL URL of key store containing keys to be used for
+ * client authentication; if <code>null</code>, the default key store will be utilized
+ * @param clientKeyStorePassword if provided, it will be used to check
+ * the integrity of the client key store; if omitted, it will not be checked
+ * @return <code>SSLContext</code> to be used for creating an <code>SSLSocketFactory</code>
+ * @throws IOException thrown while reading key store file
+ * @throws GeneralSecurityException thrown while creating the SSL context
+ */
+ public static SSLContext getSSLContext(
+ KeyStore trustStore,
+ String clientKeyStoreType,
+ String clientKeyStoreURL,
+ String clientKeyStorePassword)
+ throws IOException, GeneralSecurityException {
+
+ TrustManager[] tms = getTrustManagers(trustStore);
+ KeyManager[] kms = getKeyManagers(clientKeyStoreType, clientKeyStoreURL, clientKeyStorePassword);
+ SSLContext ctx = SSLContext.getInstance("TLS");
+ ctx.init(kms, tms, null);
+ return ctx;
+ }
+ /**
+ * Loads the trust store from an input stream and gets the
+ * <code>TrustManager</code>s from a default <code>TrustManagerFactory</code>,
+ * initialized from the given trust store.
+ * @param trustStoreType key store type of trust store
+ * @param trustStoreInputStream input stream for reading JKS trust store containing
+ * trusted server certificates; if <code>null</code>, the default
+ * trust store will be utilized
+ * @param trustStorePassword if provided, it will be used to check
+ * the integrity of the trust store; if omitted, it will not be checked
+ * @return <code>TrustManager</code>s to be used for creating an
+ * <code>SSLSocketFactory</code> utilizing the given trust store
+ * @throws IOException thrown while reading from the input stream
+ * @throws GeneralSecurityException thrown while initializing the
+ * default <code>TrustManagerFactory</code>
+ */
+ protected static TrustManager[] getTrustManagers(
+ String trustStoreType,
+ InputStream trustStoreInputStream,
+ String trustStorePassword)
+ throws IOException, GeneralSecurityException {
+
+ if (trustStoreInputStream == null)
+ return null;
+
+ // Set up the TrustStore to use. We need to load the file into
+ // a KeyStore instance.
+ KeyStore trustStore = KeyStoreUtils.loadKeyStore(trustStoreType, trustStoreInputStream, trustStorePassword);
+ return getTrustManagers(trustStore);
+ }
+ /**
+ * Gets the <code>TrustManager</code>s from a default <code>TrustManagerFactory</code>,
+ * initialized from the given trust store.
+ *
+ * @param trustStore the trust store to use
+ * @return <code>TrustManager</code>s to be used for creating an
+ * <code>SSLSocketFactory</code> utilizing the given trust store
+ * @throws GeneralSecurityException thrown while initializing the
+ * default <code>TrustManagerFactory</code>
+ */
+ protected static TrustManager[] getTrustManagers(KeyStore trustStore)
+ throws GeneralSecurityException {
+
+ if (trustStore == null)
+ return null;
+
+ // Initialize the default TrustManagerFactory with this KeyStore
+ String alg=TrustManagerFactory.getDefaultAlgorithm();
+ TrustManagerFactory tmFact=TrustManagerFactory.getInstance(alg);
+ tmFact.init(trustStore);
+
+ // And now get the TrustManagers
+ TrustManager[] tms=tmFact.getTrustManagers();
+ return tms;
+ }
+ /**
+ * Loads the client key store from file and gets the
+ * <code>KeyManager</code>s from a default <code>KeyManagerFactory</code>,
+ * initialized from the given client key store.
+ * @param clientKeyStoreType key store type of <code>clientKeyStore</code>
+ * @param clientKeyStoreURL URL of key store containing keys to be used for
+ * client authentication; if <code>null</code>, the default key store will be utilized
+ * @param clientKeyStorePassword password used to check the integrity of the client key store;
+ * if <code>null</code>, it will not be checked
+ * @return <code>KeyManager</code>s to be used for creating an
+ * <code>SSLSocketFactory</code> utilizing the given client key store
+ * @throws IOException thrown while reading from the key store file
+ * @throws GeneralSecurityException thrown while initializing the
+ * default <code>KeyManagerFactory</code>
+ */
+ public static KeyManager[] getKeyManagers (
+ String clientKeyStoreType,
+ String clientKeyStoreURL,
+ String clientKeyStorePassword)
+ throws IOException, GeneralSecurityException {
+
+ if (clientKeyStoreURL == null)
+ return null;
+
+ // Set up the KeyStore to use. We need to load the file into
+ // a KeyStore instance.
+ KeyStore clientKeyStore = KeyStoreUtils.loadKeyStore(
+ clientKeyStoreType, clientKeyStoreURL, clientKeyStorePassword);
+ return getKeyManagers(clientKeyStore, clientKeyStorePassword);
+ }
+ /**
+ * Gets the <code>KeyManager</code>s from a default <code>KeyManagerFactory</code>,
+ * initialized from the given client key store.
+ * @param clientKeyStore client key store
+ * @param clientKeyStorePassword if provided, it will be used to check
+ * the integrity of the client key store; if omitted, it will not be checked
+ * @return <code>KeyManager</code>s to be used for creating an
+ * <code>SSLSocketFactory</code> utilizing the given client key store
+ * @throws GeneralSecurityException thrown while initializing the
+ * default <code>KeyManagerFactory</code>
+ */
+ public static KeyManager[] getKeyManagers (
+ KeyStore clientKeyStore,
+ String clientKeyStorePassword)
+ throws GeneralSecurityException {
+
+ if (clientKeyStore == null)
+ return null;
+
+ // Now we initialize the default KeyManagerFactory with this KeyStore
+ String alg=KeyManagerFactory.getDefaultAlgorithm();
+ KeyManagerFactory kmFact=KeyManagerFactory.getInstance(alg);
+ char[] password = null;
+ if (clientKeyStorePassword != null)
+ password = clientKeyStorePassword.toCharArray();
+ kmFact.init(clientKeyStore, password);
+
+ // And now get the KeyManagers
+ KeyManager[] kms=kmFact.getKeyManagers();
+ return kms;
+ }
+}
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/StreamEntityResolver.java b/common/src/main/java/at/gv/egovernment/moa/util/StreamEntityResolver.java
new file mode 100644
index 000000000..6fd67e97a
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/util/StreamEntityResolver.java
@@ -0,0 +1,79 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.util;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Map;
+
+import org.xml.sax.EntityResolver;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+/**
+ * An <code>EntityResolver</code> that maps system IDs to
+ * <code>InputStream</code>s.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class StreamEntityResolver implements EntityResolver {
+
+ /** A mapping from Public ID or System ID to an <code>InputStream</code>
+ * containing the entity. */
+ private Map mappedEntities;
+
+ /**
+ * Create a <code>StreamEntityResolver</code>.
+ *
+ * @param mappedEntities A mapping from public or system IDs
+ * (<code>String</code> objects) to <code>InputStream</code>s.
+ */
+ public StreamEntityResolver(Map mappedEntities) {
+ this.mappedEntities = mappedEntities;
+ }
+
+ /**
+ * Resolve an entity by looking it up in the mapped entities.
+ *
+ * First, the public ID is looked up in the mapping, then the system ID.
+ *
+ * @param publicId The public ID of the entity.
+ * @param systemId The system ID of the entity.
+ * @return An <code>InputStream</code> containing the entity or
+ * <code>null</code> if no entity could be found.
+ * @throws SAXException Signalling a parsing exception.
+ * @throws IOException Error reading the entity.
+ */
+ public InputSource resolveEntity(String publicId, String systemId)
+ throws SAXException, IOException {
+
+ InputSource src = null;
+
+ if (publicId != null && mappedEntities.get(publicId) != null) {
+ src = new InputSource((InputStream) mappedEntities.get(publicId));
+ } else if (systemId != null && mappedEntities.get(systemId) != null) {
+ src = new InputSource((InputStream) mappedEntities.get(systemId));
+ }
+
+ if (src != null) {
+ src.setPublicId(publicId);
+ src.setSystemId(systemId);
+ }
+
+ return src;
+ }
+}
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/StreamUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/StreamUtils.java
new file mode 100644
index 000000000..0300dcd2d
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/util/StreamUtils.java
@@ -0,0 +1,188 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.util;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PrintStream;
+
+/**
+ * Utility methods for streams.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class StreamUtils {
+
+ /**
+ * Compare the contents of two <code>InputStream</code>s.
+ *
+ * @param is1 The 1st <code>InputStream</code> to compare.
+ * @param is2 The 2nd <code>InputStream</code> to compare.
+ * @return boolean <code>true</code>, if both streams contain the exactly the
+ * same content, <code>false</code> otherwise.
+ * @throws IOException An error occurred reading one of the streams.
+ */
+ public static boolean compareStreams(InputStream is1, InputStream is2)
+ throws IOException {
+
+ byte[] buf1 = new byte[256];
+ byte[] buf2 = new byte[256];
+ int length1;
+ int length2;
+
+ try {
+ while (true) {
+ length1 = is1.read(buf1);
+ length2 = is2.read(buf2);
+
+ if (length1 != length2) {
+ return false;
+ }
+ if (length1 <= 0) {
+ return true;
+ }
+ if (!compareBytes(buf1, buf2, length1)) {
+ return false;
+ }
+ }
+ } catch (IOException e) {
+ throw e;
+ } finally {
+ // close both streams
+ try {
+ is1.close();
+ is2.close();
+ } catch (IOException e) {
+ // ignore this
+ }
+ }
+ }
+
+ /**
+ * Compare two byte arrays, up to a given maximum length.
+ *
+ * @param b1 1st byte array to compare.
+ * @param b2 2nd byte array to compare.
+ * @param length The maximum number of bytes to compare.
+ * @return <code>true</code>, if the byte arrays are equal, <code>false</code>
+ * otherwise.
+ */
+ private static boolean compareBytes(byte[] b1, byte[] b2, int length) {
+ if (b1.length != b2.length) {
+ return false;
+ }
+
+ for (int i = 0; i < b1.length && i < length; i++) {
+ if (b1[i] != b2[i]) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Reads a byte array from a stream.
+ * @param in The <code>InputStream</code> to read.
+ * @return The bytes contained in the given <code>InputStream</code>.
+ * @throws IOException on any exception thrown
+ */
+ public static byte[] readStream(InputStream in) throws IOException {
+
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ copyStream(in, out, null);
+
+ /*
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ int b;
+ while ((b = in.read()) >= 0)
+ out.write(b);
+
+ */
+ in.close();
+ return out.toByteArray();
+ }
+
+ /**
+ * Reads a <code>String</code> from a stream, using given encoding.
+ * @param in The <code>InputStream</code> to read.
+ * @param encoding The character encoding to use for converting the bytes
+ * of the <code>InputStream</code> into a <code>String</code>.
+ * @return The content of the given <code>InputStream</code> converted into
+ * a <code>String</code>.
+ * @throws IOException on any exception thrown
+ */
+ public static String readStream(InputStream in, String encoding) throws IOException {
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ copyStream(in, out, null);
+
+ /*
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ int b;
+ while ((b = in.read()) >= 0)
+ out.write(b);
+ */
+ in.close();
+ return out.toString(encoding);
+ }
+
+ /**
+ * Reads all data (until EOF is reached) from the given source to the
+ * destination stream. If the destination stream is null, all data is dropped.
+ * It uses the given buffer to read data and forward it. If the buffer is
+ * null, this method allocates a buffer.
+ *
+ * @param source The stream providing the data.
+ * @param destination The stream that takes the data. If this is null, all
+ * data from source will be read and discarded.
+ * @param buffer The buffer to use for forwarding. If it is null, the method
+ * allocates a buffer.
+ * @exception IOException If reading from the source or writing to the
+ * destination fails.
+ */
+ private static void copyStream(InputStream source, OutputStream destination, byte[] buffer) throws IOException {
+ if (source == null) {
+ throw new NullPointerException("Argument \"source\" must not be null.");
+ }
+ if (buffer == null) {
+ buffer = new byte[8192];
+ }
+
+ if (destination != null) {
+ int bytesRead;
+ while ((bytesRead = source.read(buffer)) >= 0) {
+ destination.write(buffer, 0, bytesRead);
+ }
+ } else {
+ while (source.read(buffer) >= 0);
+ }
+ }
+
+ /**
+ * Gets the stack trace of the <code>Throwable</code> passed in as a string.
+ * @param t The <code>Throwable</code>.
+ * @return a String representing the stack trace of the <code>Throwable</code>.
+ */
+ public static String getStackTraceAsString(Throwable t)
+ {
+ ByteArrayOutputStream stackTraceBIS = new ByteArrayOutputStream();
+ t.printStackTrace(new PrintStream(stackTraceBIS));
+ return new String(stackTraceBIS.toByteArray());
+ }
+}
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/StringUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/StringUtils.java
new file mode 100644
index 000000000..dbc2b5011
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/util/StringUtils.java
@@ -0,0 +1,169 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.util;
+
+import java.util.StringTokenizer;
+
+/**
+ * Utitility functions for string manipulations.
+ *
+ * @author Harald Bratko
+ */
+public class StringUtils {
+
+ /**
+ * Removes all blanks and tabs from the given string.
+ *
+ * @param s The string to remove all blanks and tabs from.
+ * @return The input string with all blanks and tabs removed from.
+ */
+ public static String removeBlanks(String s) {
+ StringTokenizer st = new StringTokenizer(s);
+ StringBuffer sb = new StringBuffer(s.length());
+ while (st.hasMoreTokens()) {
+ sb.append(st.nextToken());
+ }
+ return sb.toString();
+ }
+
+ /**
+ * Removes all occurences of the specified token from the the given string.
+ *
+ * @param s The string to remove all occurences of the specified token from.
+ * @return The input string with all occurences of the specified token removed from.
+ */
+ public static String removeToken(String s, String token) {
+ StringTokenizer st = new StringTokenizer(s, token);
+ StringBuffer sb = new StringBuffer(s.length());
+ while (st.hasMoreTokens()) {
+ sb.append(st.nextToken());
+ }
+ return sb.toString();
+ }
+
+ /**
+ * Removes all leading zeros from the input string.
+ *
+ * @param s The string remove the leading zeros from.
+ * @return The input string with the leading zeros removed from.
+ */
+ public static String deleteLeadingZeros(String s) {
+ StringBuffer sb = new StringBuffer(s);
+ int l = sb.length();
+ int j = 0;
+ for (int i=0; i<l; i++) {
+ if (sb.charAt(i) == '0') {
+ j++;
+ } else {
+ break;
+ }
+ }
+ return sb.substring(j, l);
+ }
+
+ /**
+ * Replaces each substring of string <code>s</code> that matches the given
+ * <code>search</code> string by the given <code>replace</code> string.
+ *
+ * @param s The string where the replacement should take place.
+ * @param search The pattern that should be replaced.
+ * @param replace The string that should replace all each <code>search</code>
+ * string within <code>s</code>.
+ * @return A string where all occurrence of <code>search</code> are
+ * replaced with <code>replace</code>.
+ */
+ public static String replaceAll (String s, String search, String replace)
+ {
+ StringBuffer sb = new StringBuffer();
+ int i = 0, j = 0;
+ int len = search.length();
+ while (j > -1)
+ {
+ j = s.indexOf(search, i);
+
+ if (j > -1)
+ {
+ sb.append(s.substring(i,j));
+ sb.append(replace);
+ i = j + len;
+ }
+ }
+
+ sb.append(s.substring(i, s.length()));
+
+ return sb.toString();
+ }
+
+ /**
+ * Changes the SecurityLayer version in the given string.
+ * This method usually takes as input an XML structure represented in a string
+ * format and changes the SecurityLayer namespaces prefixes and URIs from
+ * one SecurityLayer version to another.
+ * e.g.: code>sl10</code> to <code>sl</code> and
+ * <code>http://www.buergerkarte.at/namespaces/securitylayer/20020225#</code>
+ * to
+ * <code>http://www.buergerkarte.at/namespaces/securitylayer/1.2#</code>
+ *
+ * @param s The string (usally an XML structure) where the
+ * SecurityLayer version should be changed.
+ * @param slPrefixOld The SecurityLayer namespace prefix that should be
+ * replaced by the new one.
+ * @param slPrefixNew The new SecurityLayer namespace prefix that should
+ * replace the old one.
+ * @param slNSUriOld The SecurityLayer namespace URI that should be
+ * replaced by the new one.
+ * @param slNSUriNew The new SecurityLayer namespace URI that should
+ * replace the old one.
+ * @return A string where the SecurityLayer namespace prefixes
+ * and URIs are replaced by new ones.
+ */
+ public static String changeSLVersion(String s, String slPrefixOld, String slPrefixNew, String slNSUriOld, String slNSUriNew) {
+ String retString = replaceAll(s, slPrefixOld, slPrefixNew);
+ retString = replaceAll(retString, slNSUriOld, slNSUriNew);
+ return retString ;
+ }
+
+ /**
+ * Removes the XML declaration from an XML expression.
+ *
+ * @param xmlString XML expression as String
+ *
+ * @return XML expression, XML declaration removed
+ */
+ public static String removeXMLDeclaration(String xmlString) {
+ if (xmlString!=null && xmlString.startsWith("<?xml")) {
+ int firstElement = xmlString.indexOf("<", 1);
+ return xmlString.substring(firstElement);
+ } else {
+ return xmlString;
+ }
+ }
+
+ /**
+ * Checks if String is empty
+ * @param s String to be checked if empty
+ * @return True if String is empty, false otherwise
+ */
+ public static boolean isEmpty(String s) {
+ if (s == null || s.length() == 0)
+ return true;
+ else
+ return false;
+
+ }
+
+
+}
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/URLDecoder.java b/common/src/main/java/at/gv/egovernment/moa/util/URLDecoder.java
new file mode 100644
index 000000000..2fc721db9
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/util/URLDecoder.java
@@ -0,0 +1,75 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.util;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.StringReader;
+import java.io.UnsupportedEncodingException;
+
+/**
+ * Decodes an URL encoded String using a specified character encoding.
+ * Provides a function missing in JDK 1.3.
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class URLDecoder {
+
+ /**
+ * Decodes an <code>application/x-www-form-urlencoded</code> string using a specific encoding scheme.
+ * @param s the string to decode
+ * @param encoding name of character encoding
+ * @return the newly decoded string
+ * @throws UnsupportedEncodingException if the encoding is not supported
+ */
+ public static String decode(String s, String encoding) throws UnsupportedEncodingException {
+ StringReader in = new StringReader(s);
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ for (int b = read(in); b >= 0; b = read(in))
+ bout.write(b);
+ return bout.toString(encoding);
+ }
+ /**
+ * Decodes the next byte from the string reader.
+ * @param in string reader
+ * @return the next byte decoded;
+ * -1 upon end of string, on erroneous data, and on any exception caught
+ * @todo syntax check on string
+ */
+ private static int read(StringReader in) {
+ try {
+ int b = in.read();
+ if (b == '+')
+ return ' ';
+ if (b == '%') {
+ char[] hex = new char[2];
+ if (in.read(hex, 0, 2) >= 0) {
+ String hexString = new String(hex);
+ return Integer.valueOf(hexString, 16).intValue();
+ }
+ else
+ return -1;
+ }
+ return b;
+ }
+ catch (IOException ex) {
+ return -1;
+ }
+ catch (NumberFormatException ex) {
+ return -1;
+ }
+ }
+}
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/URLEncoder.java b/common/src/main/java/at/gv/egovernment/moa/util/URLEncoder.java
new file mode 100644
index 000000000..f73936487
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/util/URLEncoder.java
@@ -0,0 +1,78 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.util;
+
+import java.io.ByteArrayInputStream;
+import java.io.StringWriter;
+import java.io.UnsupportedEncodingException;
+
+/**
+ * Translates a string into mime format "x-www-form-urlencoded".
+ * Provides a function missing in JDK 1.3.
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class URLEncoder {
+
+ /**
+ * Translates a string into x-www-form-urlencoded format.
+ * @param s the string to be translated
+ * @param encoding the encoding to use
+ * @return the translated string
+ * @throws UnsupportedEncodingException when the desired encoding is not supported
+ */
+ public static String encode(String s, String encoding) throws UnsupportedEncodingException {
+ byte[] barr = s.getBytes(encoding);
+ ByteArrayInputStream bin = new ByteArrayInputStream(barr);
+ StringWriter out = new StringWriter();
+ for (int b = bin.read(); b >= 0; b = bin.read())
+ encode(b, out);
+ return out.toString();
+ }
+
+ /**
+ * Encode a character.
+ * @param ch The character to encode.
+ * @param out The <code>StringWriter</code> containing the result.
+ */
+ private static void encode(int ch, StringWriter out) {
+ if ((ch >= 'a' && ch <= 'z')
+ || (ch >= 'A' && ch <= 'Z')
+ || (ch >= '0' && ch <= '9')
+ || ch == '.' || ch == '-' || ch == '*' || ch == '_')
+ out.write(ch);
+ else if (ch == ' ')
+ out.write('+');
+ else
+ encodeHex(ch, out);
+ }
+
+ /**
+ * Encode a character as an escaped hex value.
+ * @param ch The character to encode.
+ * @param out The <code>StringWriter</code> containing the result.
+ */
+ private static void encodeHex(int ch, StringWriter out) {
+ out.write('%');
+ String hex = Integer.toHexString(ch).toUpperCase();
+ if (hex.length() < 2)
+ out.write('0');
+ else
+ out.write(hex.charAt(hex.length() - 2));
+ out.write(hex.charAt(hex.length() - 1));
+ }
+
+}
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/XPathException.java b/common/src/main/java/at/gv/egovernment/moa/util/XPathException.java
new file mode 100644
index 000000000..6899dfd9b
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/util/XPathException.java
@@ -0,0 +1,73 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.util;
+
+import java.io.PrintStream;
+import java.io.PrintWriter;
+
+/**
+ * An exception occurred evaluating an XPath.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XPathException extends RuntimeException {
+ /** The wrapped exception. */
+ private Throwable wrapped;
+
+ /**
+ * Create a <code>XPathException</code>.
+ *
+ * @param message The exception message.
+ * @param wrapped The exception being the likely cause of this exception.
+ */
+ public XPathException(String message, Throwable wrapped) {
+ super(message);
+ this.wrapped = wrapped;
+ }
+
+ /**
+ * Return the wrapped exception.
+ *
+ * @return The wrapped exception being the likely cause of this exception.
+ */
+ public Throwable getWrapped() {
+ return wrapped;
+ }
+
+ /**
+ * @see java.lang.Throwable#printStackTrace(java.io.PrintStream)
+ */
+ public void printStackTrace(PrintStream s) {
+ super.printStackTrace(s);
+ if (getWrapped() != null) {
+ s.print("Caused by: ");
+ getWrapped().printStackTrace(s);
+ }
+ }
+
+ /**
+ * @see java.lang.Throwable#printStackTrace(java.io.PrintWriter)
+ */
+ public void printStackTrace(PrintWriter s) {
+ super.printStackTrace(s);
+ if (getWrapped() != null) {
+ s.print("Caused by: ");
+ getWrapped().printStackTrace(s);
+ }
+ }
+
+}
diff --git a/common/src/main/java/at/gv/egovernment/moa/util/XPathUtils.java b/common/src/main/java/at/gv/egovernment/moa/util/XPathUtils.java
new file mode 100644
index 000000000..01fe3a3aa
--- /dev/null
+++ b/common/src/main/java/at/gv/egovernment/moa/util/XPathUtils.java
@@ -0,0 +1,541 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.util;
+
+import java.util.List;
+import java.util.Map;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.traversal.NodeIterator;
+
+import org.jaxen.JaxenException;
+import org.jaxen.NamespaceContext;
+import org.jaxen.SimpleNamespaceContext;
+import org.jaxen.dom.DOMXPath;
+import org.jaxen.dom.DocumentNavigator;
+
+/**
+ * Utility methods to evaluate XPath expressions on DOM nodes.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XPathUtils {
+
+ /**
+ * The XPath expression selecting all nodes under a given root (including the
+ * root node itself).
+ */
+ public static final String ALL_NODES_XPATH =
+ "(.//. | .//@* | .//namespace::*)";
+
+ /** The <code>DocumentNavigator</code> to use for navigating the document. */
+ private static DocumentNavigator documentNavigator =
+ DocumentNavigator.getInstance();
+ /** The default namespace prefix to namespace URI mappings. */
+ private static NamespaceContext NS_CONTEXT;
+
+ static {
+ SimpleNamespaceContext ctx = new SimpleNamespaceContext();
+ ctx.addNamespace(Constants.MOA_PREFIX, Constants.MOA_NS_URI);
+ ctx.addNamespace(Constants.MOA_CONFIG_PREFIX, Constants.MOA_CONFIG_NS_URI);
+ ctx.addNamespace(Constants.MOA_ID_CONFIG_PREFIX, Constants.MOA_ID_CONFIG_NS_URI);
+ ctx.addNamespace(Constants.SL10_PREFIX, Constants.SL10_NS_URI);
+ ctx.addNamespace(Constants.SL11_PREFIX, Constants.SL11_NS_URI);
+ ctx.addNamespace(Constants.SL12_PREFIX, Constants.SL12_NS_URI);
+ ctx.addNamespace(Constants.ECDSA_PREFIX, Constants.ECDSA_NS_URI);
+ ctx.addNamespace(Constants.PD_PREFIX, Constants.PD_NS_URI);
+ ctx.addNamespace(Constants.SAML_PREFIX, Constants.SAML_NS_URI);
+ ctx.addNamespace(Constants.SAMLP_PREFIX, Constants.SAMLP_NS_URI);
+ ctx.addNamespace(Constants.DSIG_PREFIX, Constants.DSIG_NS_URI);
+ ctx.addNamespace(Constants.XSLT_PREFIX, Constants.XSLT_NS_URI);
+ ctx.addNamespace(Constants.XSI_PREFIX, Constants.XSI_NS_URI);
+ ctx.addNamespace(Constants.DSIG_FILTER2_PREFIX, Constants.DSIG_FILTER2_NS_URI);
+ ctx.addNamespace(Constants.DSIG_EC_PREFIX, Constants.DSIG_EC_NS_URI);
+ ctx.addNamespace(Constants.MD_PREFIX, Constants.MD_NS_URI);
+ ctx.addNamespace(Constants.MDP_PREFIX, Constants.MDP_NS_URI);
+ ctx.addNamespace(Constants.MVV_PREFIX, Constants.MVV_NS_URI);
+ ctx.addNamespace(Constants.STB_PREFIX, Constants.STB_NS_URI);
+ ctx.addNamespace(Constants.WRR_PREFIX, Constants.WRR_NS_URI);
+ NS_CONTEXT = ctx;
+ }
+
+ /**
+ * Return a <code>NodeIterator</code> over the nodes matching the XPath
+ * expression.
+ *
+ * All namespace URIs and prefixes declared in the <code>Constants</code>
+ * interface are used for resolving namespaces.
+ *
+ * @param contextNode The root node from which to evaluate the XPath
+ * expression.
+ * @param exp The XPath expression to evaluate.
+ * @return An iterator over the resulting nodes.
+ * @throws XPathException An error occurred evaluating the XPath expression.
+ */
+ public static NodeIterator selectNodeIterator(Node contextNode, String exp)
+ throws XPathException {
+
+ return selectNodeIterator(contextNode, NS_CONTEXT, exp);
+ }
+
+ /**
+ * Return a <code>NodeIterator</code> over the nodes matching the XPath
+ * expression.
+ *
+ * @param contextNode The root node from which to evaluate the XPath
+ * expression.
+ * @param namespaceElement An element from which to build the
+ * namespace mapping for evaluating the XPath expression
+ * @param exp The XPath expression to evaluate.
+ * @return An iterator over the resulting nodes.
+ * @throws XPathException An error occurred evaluating the XPath expression.
+ */
+ public static NodeIterator selectNodeIterator(
+ Node contextNode,
+ Element namespaceElement,
+ String exp)
+ throws XPathException {
+
+ try {
+ SimpleNamespaceContext ctx = new SimpleNamespaceContext();
+ ctx.addElementNamespaces(documentNavigator, namespaceElement);
+ return selectNodeIterator(contextNode, ctx, exp);
+ } catch (JaxenException e) {
+ MessageProvider msg = MessageProvider.getInstance();
+ String message = msg.getMessage("xpath.00", new Object[] { exp });
+ throw new XPathException(message, e);
+ }
+ }
+
+ /**
+ * Return a <code>NodeIterator</code> over the nodes matching the XPath
+ * expression.
+ *
+ * @param contextNode The root node from which to evaluate the XPath
+ * expression.
+ * @param namespaceMapping A namespace prefix to namespace URI mapping
+ * (<code>String</code> to <code>String</code>) for evaluating the XPath
+ * expression.
+ * @param exp The XPath expression to evaluate.
+ * @return An iterator over the resulting nodes.
+ * @throws XPathException An error occurred evaluating the XPath expression.
+ */
+ public static NodeIterator selectNodeIterator(
+ Node contextNode,
+ Map namespaceMapping,
+ String exp)
+ throws XPathException {
+
+ SimpleNamespaceContext ctx = new SimpleNamespaceContext(namespaceMapping);
+
+ return selectNodeIterator(contextNode, ctx, exp);
+ }
+
+ /**
+ * Return a <code>NodeIterator</code> over the nodes matching the XPath
+ * expression.
+ *
+ * @param contextNode The root node from which to evaluate the XPath
+ * expression.
+ * @param nsContext The <code>NamespaceContext</code> for resolving namespace
+ * prefixes to namespace URIs for evaluating the XPath expression.
+ * @param exp The XPath expression to evaluate.
+ * @return An iterator over the resulting nodes.
+ * @throws XPathException An error occurred evaluating the XPath expression.
+ */
+ private static NodeIterator selectNodeIterator(
+ Node contextNode,
+ NamespaceContext nsContext,
+ String exp)
+ throws XPathException {
+
+ try {
+ DOMXPath xpath = new DOMXPath(exp);
+ List nodes;
+
+ xpath.setNamespaceContext(nsContext);
+ nodes = xpath.selectNodes(contextNode);
+ return new NodeIteratorAdapter(nodes.listIterator());
+ } catch (JaxenException e) {
+ MessageProvider msg = MessageProvider.getInstance();
+ String message = msg.getMessage("xpath.00", new Object[] { exp });
+ throw new XPathException(message, e);
+ }
+ }
+
+ /**
+ * Return a <code>NodeList</code> of all the nodes matching the XPath
+ * expression.
+ *
+ * All namespace URIs and prefixes declared in the <code>Constants</code>
+ * interface are used for resolving namespaces.
+ *
+ * @param contextNode The root node from which to evaluate the XPath
+ * expression.
+ * @param exp The XPath expression to evaluate.
+ * @return A <code>NodeList</code> containing the matching nodes.
+ * @throws XPathException An error occurred evaluating the XPath expression.
+ */
+ public static NodeList selectNodeList(Node contextNode, String exp)
+ throws XPathException {
+
+ return selectNodeList(contextNode, NS_CONTEXT, exp);
+ }
+
+ /**
+ * Return a <code>NodeList</code> of all the nodes matching the XPath
+ * expression.
+ *
+ * @param contextNode The root node from which to evaluate the XPath
+ * expression.
+ * @param namespaceElement An element from which to build the
+ * namespace mapping for evaluating the XPath expression
+ * @param exp The XPath expression to evaluate.
+ * @return A <code>NodeList</code> containing the matching nodes.
+ * @throws XPathException An error occurred evaluating the XPath expression.
+ */
+ public static NodeList selectNodeList(
+ Node contextNode,
+ Element namespaceElement,
+ String exp)
+ throws XPathException {
+
+ try {
+ SimpleNamespaceContext ctx = new SimpleNamespaceContext();
+
+ ctx.addElementNamespaces(documentNavigator, namespaceElement);
+ return selectNodeList(contextNode, ctx, exp);
+ } catch (JaxenException e) {
+ MessageProvider msg = MessageProvider.getInstance();
+ String message = msg.getMessage("xpath.00", new Object[] { exp });
+ throw new XPathException(message, e);
+ }
+ }
+
+ /**
+ * Return a <code>NodeList</code> of all the nodes matching the XPath
+ * expression.
+ *
+ * @param contextNode The root node from which to evaluate the XPath
+ * expression.
+ * @param namespaceMapping A namespace prefix to namespace URI mapping
+ * (<code>String</code> to <code>String</code>) for evaluating the XPath
+ * expression.
+ * @param exp The XPath expression to evaluate.
+ * @return A <code>NodeList</code> containing the matching nodes.
+ * @throws XPathException An error occurred evaluating the XPath expression.
+ */
+ public static NodeList selectNodeList(
+ Node contextNode,
+ Map namespaceMapping,
+ String exp)
+ throws XPathException {
+
+ SimpleNamespaceContext ctx = new SimpleNamespaceContext(namespaceMapping);
+
+ return selectNodeList(contextNode, ctx, exp);
+ }
+
+ /**
+ * Return a <code>NodeList</code> of all the nodes matching the XPath
+ * expression.
+ *
+ * @param contextNode The root node from which to evaluate the XPath
+ * expression.
+ * @param nsContext The <code>NamespaceContext</code> for resolving namespace
+ * prefixes to namespace URIs for evaluating the XPath expression.
+ * @param exp The XPath expression to evaluate.
+ * @return A <code>NodeList</code> containing the matching nodes.
+ * @throws XPathException An error occurred evaluating the XPath expression.
+ */
+ private static NodeList selectNodeList(
+ Node contextNode,
+ NamespaceContext nsContext,
+ String exp)
+ throws XPathException {
+
+ try {
+ DOMXPath xpath = new DOMXPath(exp);
+ List nodes;
+
+ xpath.setNamespaceContext(nsContext);
+ nodes = xpath.selectNodes(contextNode);
+ return new NodeListAdapter(nodes);
+ } catch (JaxenException e) {
+ MessageProvider msg = MessageProvider.getInstance();
+ String message = msg.getMessage("xpath.00", new Object[] { exp });
+ throw new XPathException(message, e);
+ }
+ }
+
+ /**
+ * Select the first node matching an XPath expression.
+ *
+ * All namespace URIs and prefixes declared in the <code>Constants</code>
+ * interface are used for resolving namespaces.
+ *
+ * @param contextNode The root node from which to evaluate the XPath
+ * expression.
+ * @param exp The XPath expression to evaluate.
+ * @return Node The first node matching the XPath expression, or
+ * <code>null</code>, if no node matched.
+ * @throws XPathException An error occurred evaluating the XPath expression.
+ */
+ public static Node selectSingleNode(Node contextNode, String exp)
+ throws XPathException {
+
+ return selectSingleNode(contextNode, NS_CONTEXT, exp);
+ }
+
+ /**
+ * Select the first node matching an XPath expression.
+ *
+ * @param contextNode The root node from which to evaluate the XPath
+ * expression.
+ * @param namespaceElement An element from which to build the
+ * namespace mapping for evaluating the XPath expression
+ * @param exp The XPath expression to evaluate.
+ * @return Node The first node matching the XPath expression, or
+ * <code>null</code>, if no node matched.
+ * @throws XPathException An error occurred evaluating the XPath expression.
+ */
+ public static Node selectSingleNode(
+ Node contextNode,
+ Element namespaceElement,
+ String exp)
+ throws XPathException {
+
+ try {
+ SimpleNamespaceContext ctx = new SimpleNamespaceContext();
+ ctx.addElementNamespaces(documentNavigator, namespaceElement);
+
+ return selectSingleNode(contextNode, ctx, exp);
+ } catch (JaxenException e) {
+ MessageProvider msg = MessageProvider.getInstance();
+ String message = msg.getMessage("xpath.00", new Object[] { exp });
+ throw new XPathException(message, e);
+ }
+ }
+
+ /**
+ * Select the first node matching an XPath expression.
+ *
+ * @param contextNode The root node from which to evaluate the XPath
+ * expression.
+ * @param namespaceMapping A namespace prefix to namespace URI mapping
+ * (<code>String</code> to <code>String</code>) for evaluating the XPath
+ * expression.
+ * @param exp The XPath expression to evaluate.
+ * @return Node The first node matching the XPath expression, or
+ * <code>null</code>, if no node matched.
+ * @throws XPathException An error occurred evaluating the XPath expression.
+ */
+ public static Node selectSingleNode(
+ Node contextNode,
+ Map namespaceMapping,
+ String exp)
+ throws XPathException {
+
+ SimpleNamespaceContext ctx = new SimpleNamespaceContext(namespaceMapping);
+
+ return selectSingleNode(contextNode, ctx, exp);
+ }
+
+ /**
+ * Select the first node matching an XPath expression.
+ *
+ * @param contextNode The root node from which to evaluate the XPath
+ * expression.
+ * @param nsContext The <code>NamespaceContext</code> for resolving namespace
+ * prefixes to namespace URIs for evaluating the XPath expression.
+ * @param exp The XPath expression to evaluate.
+ * @return Node The first node matching the XPath expression, or
+ * <code>null</code>, if no node matched.
+ * @throws XPathException An error occurred evaluating the XPath expression.
+ */
+ private static Node selectSingleNode(
+ Node contextNode,
+ NamespaceContext nsContext,
+ String exp)
+ throws XPathException {
+
+ try {
+ DOMXPath xpath = new DOMXPath(exp);
+ xpath.setNamespaceContext(nsContext);
+ return (Node) xpath.selectSingleNode(contextNode);
+ } catch (JaxenException e) {
+ MessageProvider msg = MessageProvider.getInstance();
+ String message = msg.getMessage("xpath.00", new Object[] { exp });
+ throw new XPathException(message, e);
+ }
+ }
+
+ /**
+ * Return the value of a DOM element whose location is given by an XPath
+ * expression.
+ *
+ * @param root The root element from which to evaluate the XPath.
+ * @param xpath The XPath expression pointing to the element whose value
+ * to return.
+ * @param def The default value to return, if no element can be found using
+ * the given <code>xpath</code>.
+ * @return The element value, if it can be located using the
+ * <code>xpath</code>. Otherwise, <code>def</code> is returned.
+ */
+ public static String getElementValue(
+ Element root,
+ String xpath,
+ String def) {
+
+ Element elem = (Element) XPathUtils.selectSingleNode(root, xpath);
+ return elem != null ? DOMUtils.getText(elem) : def;
+ }
+
+ /**
+ * Return the value of a DOM attribute whose location is given by an XPath
+ * expression.
+ *
+ * @param root The root element from which to evaluate the XPath.
+ * @param xpath The XPath expression pointing to the attribute whose value to
+ * return.
+ * @param def The default value to return, if no attribute can be found using
+ * the given <code>xpath</code>.
+ * @return The element value, if it can be located using the
+ * <code>xpath</code>. Otherwise, <code>def</code> is returned.
+ */
+ public static String getAttributeValue(
+ Element root,
+ String xpath,
+ String def) {
+
+ Attr attr = (Attr) XPathUtils.selectSingleNode(root, xpath);
+ return attr != null ? attr.getValue() : def;
+ }
+
+ /**
+ * Returns the namespace prefix used within <code>XPathUtils</code> for referring to
+ * the namespace of the specified (Security Layer command) element.
+ *
+ * This namespace prefix can be used in various XPath expression evaluation methods
+ * within <code> XPathUtils</code> without explicitely binding it to the particular
+ * namespace.
+ *
+ * @param contextElement The (Security Layer command) element.
+ *
+ * @return the namespace prefix used within <code>XPathUtils</code> for referring to
+ * the namespace of the specified (Security Layer command) element.
+ *
+ * throws XpathException If the specified element has a namespace other than the ones
+ * known by this implementation as valid Security Layer namespaces (cf.
+ * @link Constants#SL10_NS_URI, @link Constants#SL11_NS_URI, @link Constants#SL12_NS_URI).
+ */
+ public static String getSlPrefix (Element contextElement) throws XPathException
+ {
+ String sLNamespace = contextElement.getNamespaceURI();
+ String sLPrefix = null;
+
+ if (sLNamespace.equals(Constants.SL10_NS_URI))
+ {
+ sLPrefix = Constants.SL10_PREFIX;
+ }
+ else if (sLNamespace.equals(Constants.SL12_NS_URI))
+ {
+ sLPrefix = Constants.SL12_PREFIX;
+ }
+ else if (sLNamespace.equals(Constants.SL11_NS_URI))
+ {
+ sLPrefix = Constants.SL11_PREFIX;
+ }
+ else
+ {
+ MessageProvider msg = MessageProvider.getInstance();
+ String message = msg.getMessage("xpath.00", new Object[] { "Ungültiger Security Layer Namespace: \"" + sLNamespace + "\"."});
+ throw new XPathException(message, null);
+ }
+
+ return sLPrefix;
+ }
+
+
+ /**
+ * Return the SecurityLayer namespace prefix of the context element.
+ * If the context element is not the element that lies within the
+ * SecurityLayer namespace. The Securitylayer namespace is derived from
+ * the <code>xmlns:sl10</code>, <code>sl11</code> or <code>sl</code>
+ * attribute of the context element.
+ *
+ * The returned prefix is needed for evaluating XPATH expressions.
+ *
+ * @param contextElement The element to get a prefix for the Securitylayer namespace,
+ * that is used within the corresponding document.
+ *
+ * @return The string <code>sl10</code>, <code>sl11</code> or <code>sl</code>,
+ * depending on the SecurityLayer namespace of the contextElement.
+ *
+ * throws XPathException If no (vlalid) SecurityLayer namespace prefix or namespace
+ * is defined.
+ */
+ public static String getSlPrefixFromNoRoot (Element contextElement) throws XPathException {
+
+ String slPrefix = checkSLnsDeclaration(contextElement, Constants.SL10_PREFIX, Constants.SL10_NS_URI);
+ if (slPrefix == null) {
+ slPrefix = checkSLnsDeclaration(contextElement, Constants.SL11_PREFIX, Constants.SL11_NS_URI);
+ }
+ if (slPrefix == null) {
+ slPrefix = checkSLnsDeclaration(contextElement, Constants.SL12_PREFIX, Constants.SL12_NS_URI);
+ }
+
+ return slPrefix;
+
+ }
+
+ /**
+ * Checks if the context element has an attribute <code>xmlns:slPrefix</code> and
+ * if the prefix of that attribute corresponds with a valid SecurityLayer namespace.
+ *
+ * @param contextElement The element to be checked.
+ * @param slPrefix The prefix which should be checked. Must be a valid SecurityLayer
+ * namespace prefix.
+ * @param slNameSpace The SecurityLayer namespace that corresponds to the specified prefix.
+ *
+ * @return The valid SecurityLayer prefix or <code>null</code> if this prefix is
+ * not used.
+ * @throws XPathException
+ */
+ private static String checkSLnsDeclaration(Element contextElement, String slPrefix, String slNameSpace)
+ throws XPathException
+ {
+ String nsAtt = "xmlns:" + slPrefix;
+ String nameSpace = contextElement.getAttribute(nsAtt);
+ if (nameSpace == "") {
+ return null;
+ } else {
+ // check if namespace is correct
+ if (nameSpace.equals(slNameSpace)) {
+ return slPrefix;
+ } else {
+ MessageProvider msg = MessageProvider.getInstance();
+ String message = msg.getMessage("xpath.00", new Object[] { "Ungültiger SecurityLayer Namespace: \"" + nameSpace + "\"."});
+ throw new XPathException(message, null);
+ }
+ }
+ }
+
+}
diff --git a/common/src/main/resources/resources/properties/common_messages_de.properties b/common/src/main/resources/resources/properties/common_messages_de.properties
new file mode 100644
index 000000000..ac05b7996
--- /dev/null
+++ b/common/src/main/resources/resources/properties/common_messages_de.properties
@@ -0,0 +1,16 @@
+# This file contains exception messages in the standard Java properties
+# format. The messages may contain formatting patterns as definied in the
+# java.text.MessageFormat class.
+
+
+#
+# Messages private to the MOA common subsystem
+#
+
+parser.00=Leichter Fehler beim Parsen: {0}, SystemID={1}, Zeile={2}, Spalte={3}
+parser.01=Fehler beim Parsen: {0}, SystemID={1}, Zeile={2}, Spalte={3}
+parser.02=Schwerer Fehler beim Parsen: {0}, SystemID={1}, Zeile={2}, Spalte={3}
+
+xpath.00=Fehler beim Auswerten des XPath-Ausdruckes: {0}
+
+datetime.00=Fehler beim Parsen der DateTime \ No newline at end of file
diff --git a/common/src/main/resources/resources/schemas/Core-1.2.xsd b/common/src/main/resources/resources/schemas/Core-1.2.xsd
new file mode 100644
index 000000000..864fee6d5
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/Core-1.2.xsd
@@ -0,0 +1,881 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Securitylayer, Schnittstellenspezifikation -->
+
+<!-- XML-Schema fuer Schnittstellenspezifikation Version 1.2.2 -->
+
+<!-- 01. 03. 2005, Bundeskanzleramt, Stabsstelle IKT-Strategie, Technik und Standards -->
+
+<xsd:schema targetNamespace="http://www.buergerkarte.at/namespaces/securitylayer/1.2#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.2.1" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.buergerkarte.at/namespaces/securitylayer/1.2#">
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+ <!--###################################################################### -->
+ <!--# Create CMS Signature # -->
+ <!--###################################################################### -->
+ <!--====================================================================== -->
+ <!--= Create CMS Signature Request = -->
+ <!--====================================================================== -->
+ <xsd:element name="CreateCMSSignatureRequest" type="CreateCMSSignatureRequestType"/>
+ <xsd:complexType name="CreateCMSSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="KeyboxIdentifier" type="BoxIdentifierType"/>
+ <xsd:element name="DataObject" type="CMSDataObjectRequiredMetaType"/>
+ </xsd:sequence>
+ <xsd:attribute name="Structure" use="required">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="detached"/>
+ <xsd:enumeration value="enveloping"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ </xsd:complexType>
+ <xsd:complexType name="CMSDataObjectRequiredMetaType">
+ <xsd:complexContent>
+ <xsd:restriction base="CMSDataObjectOptionalMetaType">
+ <xsd:sequence>
+ <xsd:element name="MetaInfo" type="MetaInfoType"/>
+ <xsd:element name="Content" type="Base64OptRefContentType"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="CMSDataObjectOptionalMetaType">
+ <xsd:sequence>
+ <xsd:element name="MetaInfo" type="MetaInfoType" minOccurs="0"/>
+ <xsd:element name="Content" type="Base64OptRefContentType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--====================================================================== -->
+ <!--= Create CMS Siganture Response = -->
+ <!--====================================================================== -->
+ <xsd:element name="CreateCMSSignatureResponse" type="CreateCMSSignatureResponseType"/>
+ <xsd:complexType name="CreateCMSSignatureResponseType">
+ <xsd:sequence>
+ <xsd:element name="CMSSignature" type="xsd:base64Binary"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--###################################################################### -->
+ <!--# Create XML Signature # -->
+ <!--###################################################################### -->
+ <!--====================================================================== -->
+ <!--= Create XML Signature Request = -->
+ <!--====================================================================== -->
+ <xsd:element name="CreateXMLSignatureRequest" type="CreateXMLSignatureRequestType"/>
+ <xsd:complexType name="CreateXMLSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="KeyboxIdentifier" type="BoxIdentifierType"/>
+ <xsd:element name="DataObjectInfo" type="DataObjectInfoType" maxOccurs="unbounded"/>
+ <xsd:element name="SignatureInfo" type="SignatureInfoCreationType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="SignatureInfoCreationType">
+ <xsd:sequence>
+ <xsd:element name="SignatureEnvironment" type="Base64XMLOptRefContentType"/>
+ <xsd:element name="SignatureLocation">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:token">
+ <xsd:attribute name="Index" type="xsd:nonNegativeInteger" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Supplement" type="DataObjectAssociationType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="MetaInfoType">
+ <xsd:sequence>
+ <xsd:element name="MimeType" type="MimeTypeType"/>
+ <xsd:element name="Description" type="xsd:string" minOccurs="0"/>
+ <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="DataObjectInfoType">
+ <xsd:sequence>
+ <xsd:element name="DataObject" type="Base64XMLLocRefOptRefContentType"/>
+ <xsd:element name="TransformsInfo" type="TransformsInfoType" maxOccurs="unbounded"/>
+ <xsd:element name="Supplement" type="DataObjectAssociationType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="Structure" use="required">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="detached"/>
+ <xsd:enumeration value="enveloping"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ </xsd:complexType>
+ <xsd:complexType name="TransformsInfoType">
+ <xsd:sequence>
+ <xsd:element ref="dsig:Transforms" minOccurs="0"/>
+ <xsd:element name="FinalDataMetaInfo" type="MetaInfoType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--====================================================================== -->
+ <!--= Create XML Signature Response = -->
+ <!--====================================================================== -->
+ <xsd:element name="CreateXMLSignatureResponse" type="CreateXMLSignatureResponseType"/>
+ <xsd:complexType name="CreateXMLSignatureResponseType">
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="lax"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--###################################################################### -->
+ <!--# Verify CMS Signature # -->
+ <!--###################################################################### -->
+ <!--====================================================================== -->
+ <!--= Verify CMS Signature Request = -->
+ <!--====================================================================== -->
+ <xsd:element name="VerifyCMSSignatureRequest" type="VerifyCMSSignatureRequestType"/>
+ <xsd:complexType name="VerifyCMSSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="DateTime" type="xsd:dateTime" minOccurs="0"/>
+ <xsd:element name="CMSSignature" type="xsd:base64Binary"/>
+ <xsd:element name="DataObject" type="CMSDataObjectOptionalMetaType" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="Signatories" type="SignatoriesType" use="optional" default="1"/>
+ </xsd:complexType>
+ <xsd:simpleType name="SignatoriesType">
+ <xsd:union memberTypes="AllSignatoriesType">
+ <xsd:simpleType>
+ <xsd:list itemType="xsd:positiveInteger"/>
+ </xsd:simpleType>
+ </xsd:union>
+ </xsd:simpleType>
+ <xsd:simpleType name="AllSignatoriesType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="all"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <!--====================================================================== -->
+ <!--= Verify CMS Signature Response = -->
+ <!--====================================================================== -->
+ <xsd:element name="VerifyCMSSignatureResponse" type="VerifyCMSSignatureResponseType"/>
+ <xsd:complexType name="VerifyCMSSignatureResponseType">
+ <xsd:sequence maxOccurs="unbounded">
+ <xsd:element name="SignerInfo" type="dsig:KeyInfoType"/>
+ <xsd:element name="SignatureCheck" type="CheckResultType"/>
+ <xsd:element name="CertificateCheck" type="CheckResultType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:element name="QualifiedCertificate"/>
+ <!--###################################################################### -->
+ <!--# Verify XML Signature # -->
+ <!--###################################################################### -->
+ <!--====================================================================== -->
+ <!--= Verify XML Signature Request = -->
+ <!--====================================================================== -->
+ <xsd:element name="VerifyXMLSignatureRequest" type="VerifyXMLSignatureRequestType"/>
+ <xsd:complexType name="VerifyXMLSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="DateTime" type="xsd:dateTime" minOccurs="0"/>
+ <xsd:element name="SignatureInfo" type="SignatureInfoVerificationType"/>
+ <xsd:element name="Supplement" type="DataObjectAssociationType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="SignatureInfoVerificationType">
+ <xsd:sequence>
+ <xsd:element name="SignatureEnvironment" type="Base64XMLOptRefContentType"/>
+ <xsd:element name="SignatureLocation" type="xsd:token"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--====================================================================== -->
+ <!--= Verify XML Signature Response = -->
+ <!--====================================================================== -->
+ <xsd:element name="VerifyXMLSignatureResponse" type="VerifyXMLSignatureResponseType"/>
+ <xsd:complexType name="VerifyXMLSignatureResponseType">
+ <xsd:sequence>
+ <xsd:element name="SignerInfo" type="dsig:KeyInfoType"/>
+ <xsd:element name="SignatureCheck" type="ReferencesCheckResultType"/>
+ <xsd:element name="SignatureManifestCheck" type="ReferencesCheckResultType"/>
+ <xsd:element name="XMLDSIGManifestCheck" type="ManifestRefsCheckResultType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="CertificateCheck" type="CheckResultType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ReferencesCheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="ReferencesCheckResultInfoType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ReferencesCheckResultInfoType" mixed="true">
+ <xsd:sequence>
+ <xsd:element name="FailedReference" type="xsd:positiveInteger" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ManifestRefsCheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="ManifestRefsCheckResultInfoType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ManifestRefsCheckResultInfoType" mixed="true">
+ <xsd:sequence>
+ <xsd:element name="ReferringSigReference" type="xsd:positiveInteger"/>
+ <xsd:element name="FailedReference" type="xsd:positiveInteger" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="AnyMixedChildrenType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--###################################################################### -->
+ <!--# Encrypt a CMS message # -->
+ <!--###################################################################### -->
+ <!--====================================================================== -->
+ <!--= Encrypt a CMS message: Request = -->
+ <!--====================================================================== -->
+ <xsd:element name="EncryptCMSRequest" type="EncryptCMSRequestType"/>
+ <xsd:complexType name="EncryptCMSRequestType">
+ <xsd:sequence>
+ <xsd:element name="RecipientPublicKey" type="CMSRecipientPublicKeyType" maxOccurs="unbounded"/>
+ <xsd:element name="ToBeEncrypted" type="CMSToBeEncryptedType"/>
+ </xsd:sequence>
+ <xsd:attribute name="ReturnBinaryResult" type="xsd:boolean" use="optional" default="false"/>
+ </xsd:complexType>
+ <xsd:complexType name="CMSToBeEncryptedType">
+ <xsd:sequence>
+ <xsd:element name="MetaInfo" type="MetaInfoType"/>
+ <xsd:element name="Content" type="Base64OptRefContentType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CMSRecipientPublicKeyType">
+ <xsd:choice>
+ <xsd:element name="X509Certificate" type="xsd:base64Binary"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <!--====================================================================== -->
+ <!--= Encrypt a CMS message: Response = -->
+ <!--====================================================================== -->
+ <xsd:element name="EncryptCMSResponse" type="EncryptCMSResponseType"/>
+ <xsd:complexType name="EncryptCMSResponseType">
+ <xsd:sequence>
+ <xsd:element name="CMSMessage" type="xsd:base64Binary"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--###################################################################### -->
+ <!--# Decrypt a CMS message # -->
+ <!--###################################################################### -->
+ <!--====================================================================== -->
+ <!--= Decrypt a CMS message: Request = -->
+ <!--====================================================================== -->
+ <xsd:element name="DecryptCMSRequest" type="DecryptCMSRequestType"/>
+ <xsd:complexType name="DecryptCMSRequestType">
+ <xsd:sequence>
+ <xsd:element name="CMSMessage" type="xsd:base64Binary"/>
+ <xsd:element name="EncryptedContent" type="CMSEncryptedContentType" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="ReturnResult" type="ReturnResultType" use="optional" default="xml"/>
+ </xsd:complexType>
+ <xsd:complexType name="CMSEncryptedContentType">
+ <xsd:sequence>
+ <xsd:element name="MetaInfo" type="MetaInfoType" minOccurs="0"/>
+ <xsd:element name="Content" type="Base64OptRefContentType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:simpleType name="ReturnResultType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="binary"/>
+ <xsd:enumeration value="xml"/>
+ <xsd:enumeration value="none"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <!--====================================================================== -->
+ <!--= Decrypt a CMS message: Response = -->
+ <!--====================================================================== -->
+ <xsd:element name="DecryptCMSResponse" type="DecryptCMSResponseType"/>
+ <xsd:complexType name="DecryptCMSResponseType">
+ <xsd:sequence>
+ <xsd:element name="DecryptedData" type="xsd:base64Binary"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--###################################################################### -->
+ <!--# Encrypt an XML document # -->
+ <!--###################################################################### -->
+ <!--====================================================================== -->
+ <!--= Encrypt an XML document: Request = -->
+ <!--====================================================================== -->
+ <xsd:element name="EncryptXMLRequest">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="EncryptXMLRequestType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:complexType name="EncryptXMLRequestType">
+ <xsd:sequence>
+ <xsd:element name="RecipientPublicKey" type="XMLRecipientPublicKeyType" maxOccurs="unbounded"/>
+ <xsd:element name="ToBeEncrypted" type="ToBeEncryptedType" maxOccurs="unbounded"/>
+ <xsd:element name="EncryptionInfo" type="EncryptionInfoType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ToBeEncryptedType">
+ <xsd:choice>
+ <xsd:element name="Element">
+ <xsd:complexType>
+ <xsd:attribute name="Selector" type="xsd:token" use="required"/>
+ <xsd:attribute name="EncDataReference" type="xsd:anyURI" use="optional"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ElementContent">
+ <xsd:complexType>
+ <xsd:attribute name="Selector" type="xsd:token" use="required"/>
+ <xsd:attribute name="EncDataReference" type="xsd:anyURI" use="optional"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="New" type="XMLToBeEncryptedNewType"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:complexType name="XMLToBeEncryptedNewType">
+ <xsd:sequence>
+ <xsd:element name="MetaInfo" type="MetaInfoType"/>
+ <xsd:element name="Content" type="XMLToBeEncryptedNewContentType"/>
+ </xsd:sequence>
+ <xsd:attribute name="ParentSelector" type="xsd:token" use="required"/>
+ <xsd:attribute name="NodeCount" type="xsd:nonNegativeInteger" use="required"/>
+ </xsd:complexType>
+ <xsd:complexType name="XMLToBeEncryptedNewContentType">
+ <xsd:complexContent>
+ <xsd:extension base="Base64XMLLocRefContentType">
+ <xsd:attribute name="EncDataReference" type="xsd:anyURI" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="XMLRecipientPublicKeyType">
+ <xsd:choice>
+ <xsd:element ref="dsig:KeyValue"/>
+ <xsd:element name="X509Certificate" type="xsd:base64Binary"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:complexType name="EncryptionInfoType">
+ <xsd:sequence>
+ <xsd:element name="EncryptionEnvironment" type="Base64XMLOptRefContentType"/>
+ <xsd:element name="EncryptedKeyLocation" minOccurs="0">
+ <xsd:complexType>
+ <xsd:attribute name="ParentSelector" type="xsd:token" use="required"/>
+ <xsd:attribute name="NodeCount" type="xsd:nonNegativeInteger" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Supplement" type="DataObjectAssociationType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--====================================================================== -->
+ <!--= Encrypt an XML document: Response = -->
+ <!--====================================================================== -->
+ <xsd:element name="EncryptXMLResponse" type="EncryptXMLResponseType"/>
+ <xsd:complexType name="EncryptXMLResponseType">
+ <xsd:sequence>
+ <xsd:element name="EncryptionEnvironment">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="lax"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="EncryptedData" type="EncryptedDataType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="EncryptedDataType">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:base64Binary">
+ <xsd:attribute name="EncDataReference" type="xsd:anyURI" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ <!--###################################################################### -->
+ <!--# Decrypt an XML document # -->
+ <!--###################################################################### -->
+ <!--====================================================================== -->
+ <!--= Decrypt an XML document: Request = -->
+ <!--====================================================================== -->
+ <xsd:element name="DecryptXMLRequest" type="DecryptXMLRequestType"/>
+ <xsd:complexType name="DecryptXMLRequestType">
+ <xsd:sequence>
+ <xsd:element name="EncryptedContent" type="Base64XMLOptRefContentType"/>
+ <xsd:element name="EncrElemsSelector" type="xsd:string"/>
+ <xsd:element name="Supplement" type="DataObjectAssociationType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="ReturnResult" type="ReturnResultType" use="optional" default="xml"/>
+ </xsd:complexType>
+ <!--====================================================================== -->
+ <!--= Decrypt an XML document: Response = -->
+ <!--====================================================================== -->
+ <xsd:element name="DecryptXMLResponse" type="DecryptXMLResponseType"/>
+ <xsd:complexType name="DecryptXMLResponseType">
+ <xsd:sequence minOccurs="0">
+ <xsd:element name="CandidateDocument" type="XMLContentType"/>
+ <xsd:element name="DecryptedBinaryData" minOccurs="0" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:base64Binary">
+ <xsd:attribute name="EncrElemSelector" type="xsd:string" use="required"/>
+ <xsd:attribute name="MimeType" type="xsd:string" use="optional"/>
+ <xsd:attribute name="Encoding" type="xsd:anyURI" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--###################################################################### -->
+ <!--# Hashing # -->
+ <!--###################################################################### -->
+ <!--====================================================================== -->
+ <!--= Hash Computation Request = -->
+ <!--====================================================================== -->
+ <xsd:element name="CreateHashRequest" type="CreateHashRequestType"/>
+ <xsd:complexType name="CreateHashRequestType">
+ <xsd:sequence>
+ <xsd:element name="HashInfo" type="CreateHashInfoRequestType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CreateHashInfoRequestType">
+ <xsd:sequence>
+ <xsd:element name="HashData" type="HashDataType"/>
+ <xsd:element name="HashAlgorithm" type="xsd:anyURI"/>
+ <xsd:element name="FriendlyName" type="xsd:string" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="RespondHashData" type="xsd:boolean" use="required"/>
+ </xsd:complexType>
+ <xsd:complexType name="HashDataType">
+ <xsd:sequence>
+ <xsd:element name="MetaInfo" type="MetaInfoType"/>
+ <xsd:element name="Content" type="Base64XMLOptRefContentType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--====================================================================== -->
+ <!--= Hash Computation Response = -->
+ <!--====================================================================== -->
+ <xsd:element name="CreateHashResponse" type="CreateHashResponseType"/>
+ <xsd:complexType name="CreateHashResponseType">
+ <xsd:sequence>
+ <xsd:element name="HashInfo" type="CreateHashInfoResponseType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CreateHashInfoResponseType">
+ <xsd:sequence>
+ <xsd:element name="HashData" type="HashDataType" minOccurs="0"/>
+ <xsd:element name="HashAlgorithm" type="xsd:anyURI"/>
+ <xsd:element name="FriendlyName" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="HashValue" type="xsd:base64Binary"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--====================================================================== -->
+ <!--= Hash Verification Request = -->
+ <!--====================================================================== -->
+ <xsd:element name="VerifyHashRequest" type="VerifyHashRequestType"/>
+ <xsd:complexType name="VerifyHashRequestType">
+ <xsd:sequence>
+ <xsd:element name="HashInfo" type="VerifyHashInfoRequestType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="VerifyHashInfoRequestType">
+ <xsd:sequence>
+ <xsd:element name="HashData" type="HashDataType"/>
+ <xsd:element name="HashAlgorithm" type="xsd:anyURI"/>
+ <xsd:element name="FriendlyName" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="HashValue" type="xsd:base64Binary"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--====================================================================== -->
+ <!--= Hash Verification Response = -->
+ <!--====================================================================== -->
+ <xsd:element name="VerifyHashResponse" type="VerifyHashResponseType"/>
+ <xsd:complexType name="VerifyHashResponseType">
+ <xsd:sequence>
+ <xsd:element name="VerificationResult" type="VerificationResultType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="VerificationResultType">
+ <xsd:sequence>
+ <xsd:element name="FriendlyName" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="Result" type="xsd:boolean"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--###################################################################### -->
+ <!--# Infobox Commands # -->
+ <!--###################################################################### -->
+ <!--====================================================================== -->
+ <!--= Check Available Infoboxes Request = -->
+ <!--====================================================================== -->
+ <xsd:element name="InfoboxAvailableRequest" type="InfoboxAvailableRequestType"/>
+ <xsd:complexType name="InfoboxAvailableRequestType"/>
+ <!--====================================================================== -->
+ <!--= Check Available Infoboxes Response = -->
+ <!--====================================================================== -->
+ <xsd:element name="InfoboxAvailableResponse" type="InfoboxAvailableResponseType"/>
+ <xsd:complexType name="InfoboxAvailableResponseType">
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="InfoboxIdentifier" type="BoxIdentifierType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--====================================================================== -->
+ <!--= Create Infobox Request = -->
+ <!--====================================================================== -->
+ <xsd:element name="InfoboxCreateRequest" type="InfoboxCreateRequestType"/>
+ <xsd:complexType name="InfoboxCreateRequestType">
+ <xsd:sequence>
+ <xsd:element name="InfoboxIdentifier" type="BoxIdentifierType"/>
+ <xsd:element name="InfoboxType" type="InfoboxTypeType"/>
+ <xsd:element name="Creator" type="xsd:string"/>
+ <xsd:element name="Purpose" type="xsd:string"/>
+ <xsd:element name="ReadAccessAuthorization" type="AccessAuthorizationType" minOccurs="0"/>
+ <xsd:element name="UpdateAccessAuthorization" type="AccessAuthorizationType" minOccurs="0"/>
+ <xsd:element name="ReadUserConfirmation" type="UserConfirmationType" minOccurs="0"/>
+ <xsd:element name="UpdateUserConfirmation" type="UserConfirmationType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:simpleType name="InfoboxTypeType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="BinaryFile"/>
+ <xsd:enumeration value="AssocArray"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:complexType name="AccessAuthorizationType">
+ <xsd:sequence>
+ <xsd:element name="RequesterID" type="RequesterIDType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="UserMayChange" type="xsd:boolean" use="required"/>
+ </xsd:complexType>
+ <xsd:simpleType name="RequesterIDSimpleType">
+ <xsd:restriction base="xsd:string"/>
+ </xsd:simpleType>
+ <xsd:complexType name="RequesterIDType">
+ <xsd:simpleContent>
+ <xsd:extension base="RequesterIDSimpleType">
+ <xsd:attribute name="AuthenticationClass" type="AuthenticationClassType" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ <xsd:complexType name="UserConfirmationType">
+ <xsd:simpleContent>
+ <xsd:extension base="UserConfirmationSimpleType">
+ <xsd:attribute name="UserMayChange" type="xsd:boolean" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ <xsd:simpleType name="UserConfirmationSimpleType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="none"/>
+ <xsd:enumeration value="info"/>
+ <xsd:enumeration value="confirm"/>
+ <xsd:enumeration value="confirmWithSecret"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="AuthenticationClassType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="anonym"/>
+ <xsd:enumeration value="pseudoanonym"/>
+ <xsd:enumeration value="certified"/>
+ <xsd:enumeration value="certifiedGovAgency"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <!--====================================================================== -->
+ <!--= Create Infobox Response = -->
+ <!--====================================================================== -->
+ <xsd:element name="InfoboxCreateResponse" type="InfoboxCreateResponseType"/>
+ <xsd:complexType name="InfoboxCreateResponseType"/>
+ <!--====================================================================== -->
+ <!--= Delete Infobox Request = -->
+ <!--====================================================================== -->
+ <xsd:element name="InfoboxDeleteRequest" type="InfoboxDeleteRequestType"/>
+ <xsd:complexType name="InfoboxDeleteRequestType">
+ <xsd:sequence>
+ <xsd:element name="InfoboxIdentifier" type="BoxIdentifierType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--====================================================================== -->
+ <!--= Delete Infobox Response = -->
+ <!--====================================================================== -->
+ <xsd:element name="InfoboxDeleteResponse" type="InfoboxDeleteResponseType"/>
+ <xsd:complexType name="InfoboxDeleteResponseType"/>
+ <!--====================================================================== -->
+ <!--= Read Infobox Request = -->
+ <!--====================================================================== -->
+ <xsd:element name="InfoboxReadRequest" type="InfoboxReadRequestType"/>
+ <xsd:complexType name="InfoboxReadRequestType">
+ <xsd:sequence>
+ <xsd:element name="InfoboxIdentifier" type="BoxIdentifierType"/>
+ <xsd:choice>
+ <xsd:element name="BinaryFileParameters" type="InfoboxReadParamsBinaryFileType"/>
+ <xsd:element name="AssocArrayParameters" type="InfoboxReadParamsAssocArrayType"/>
+ </xsd:choice>
+ <xsd:element name="BoxSpecificParameters" type="AnyChildrenType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="InfoboxReadParamsBinaryFileType">
+ <xsd:attribute name="ContentIsXMLEntity" type="xsd:boolean" use="optional" default="false"/>
+ </xsd:complexType>
+ <xsd:complexType name="InfoboxReadParamsAssocArrayType">
+ <xsd:choice>
+ <xsd:element name="ReadKeys">
+ <xsd:complexType>
+ <xsd:attribute name="SearchString" type="WildCardSearchStringType" use="required"/>
+ <xsd:attribute name="UserMakesUnique" type="xsd:boolean" use="optional" default="false"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ReadPairs">
+ <xsd:complexType>
+ <xsd:attribute name="SearchString" type="WildCardSearchStringType" use="required"/>
+ <xsd:attribute name="UserMakesUnique" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="ValuesAreXMLEntities" type="xsd:boolean" use="optional" default="false"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ReadValue">
+ <xsd:complexType>
+ <xsd:attribute name="Key" type="BoxIdentifierType" use="required"/>
+ <xsd:attribute name="ValueIsXMLEntity" type="xsd:boolean" use="optional" default="false"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:element name="IdentityLinkDomainIdentifier" type="xsd:anyURI"/>
+ <!--====================================================================== -->
+ <!--= Read Infobox Response = -->
+ <!--====================================================================== -->
+ <xsd:element name="InfoboxReadResponse" type="InfoboxReadResponseType"/>
+ <xsd:complexType name="InfoboxReadResponseType">
+ <xsd:choice>
+ <xsd:element name="BinaryFileData" type="Base64XMLContentType"/>
+ <xsd:element name="AssocArrayData" type="InfoboxReadDataAssocArrayType"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:complexType name="InfoboxReadDataAssocArrayType">
+ <xsd:choice>
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="Key" type="BoxIdentifierType"/>
+ </xsd:sequence>
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="Pair" type="InfoboxAssocArrayPairType"/>
+ </xsd:sequence>
+ </xsd:choice>
+ </xsd:complexType>
+ <!--====================================================================== -->
+ <!--= Update Infobox Request = -->
+ <!--====================================================================== -->
+ <xsd:element name="InfoboxUpdateRequest" type="InfoboxUpdateRequestType"/>
+ <xsd:complexType name="InfoboxUpdateRequestType">
+ <xsd:sequence>
+ <xsd:element name="InfoboxIdentifier" type="BoxIdentifierType"/>
+ <xsd:choice>
+ <xsd:element name="BinaryFileParameters" type="Base64XMLContentType"/>
+ <xsd:element name="AssocArrayParameters" type="InfoboxUpdateParamsAssocArrayType"/>
+ </xsd:choice>
+ <xsd:element name="BoxSpecificParameters" type="AnyChildrenType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="InfoboxUpdateParamsAssocArrayType">
+ <xsd:choice>
+ <xsd:element name="UpdateKey">
+ <xsd:complexType>
+ <xsd:attribute name="Key" type="xsd:token" use="required"/>
+ <xsd:attribute name="NewKey" type="xsd:token" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="UpdateValue" type="InfoboxAssocArrayPairType"/>
+ <xsd:element name="DeletePair">
+ <xsd:complexType>
+ <xsd:attribute name="Key" type="xsd:token" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ <!--====================================================================== -->
+ <!--= Update Infobox Response = -->
+ <!--====================================================================== -->
+ <xsd:element name="InfoboxUpdateResponse" type="InfoboxUpdateResponseType"/>
+ <xsd:complexType name="InfoboxUpdateResponseType"/>
+ <!--###################################################################### -->
+ <!--# Null-Operation # -->
+ <!--###################################################################### -->
+ <!--====================================================================== -->
+ <!--= Null-Operation ReQuest = -->
+ <!--====================================================================== -->
+ <xsd:element name="NullOperationRequest" type="NullOperationRequestType"/>
+ <xsd:complexType name="NullOperationRequestType"/>
+ <!--====================================================================== -->
+ <!--= Null-Operation Response = -->
+ <!--====================================================================== -->
+ <xsd:element name="NullOperationResponse" type="NullOperationResponseType"/>
+ <xsd:complexType name="NullOperationResponseType"/>
+ <!--###################################################################### -->
+ <!--# Get Properties # -->
+ <!--###################################################################### -->
+ <xsd:element name="GetPropertiesRequest">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="GetPropertiesRequestType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:complexType name="GetPropertiesRequestType"/>
+ <!--====================================================================== -->
+ <!--= Get Properties Response = -->
+ <!--====================================================================== -->
+ <xsd:element name="GetPropertiesResponse" type="GetPropertiesResponseType"/>
+ <xsd:complexType name="GetPropertiesResponseType">
+ <xsd:sequence>
+ <xsd:element name="ViewerMediaType" type="MimeTypeType" maxOccurs="unbounded"/>
+ <xsd:element name="XMLSignatureTransform" type="xsd:anyURI" maxOccurs="unbounded"/>
+ <xsd:element name="KeyboxIdentifier" type="QualifiedBoxIdentifierType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="Binding" type="BindingType" maxOccurs="unbounded"/>
+ <xsd:element name="ProtocolVersion" type="xsd:token" maxOccurs="unbounded"/>
+ <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="BindingType">
+ <xsd:complexContent>
+ <xsd:extension base="AnyChildrenType">
+ <xsd:attribute name="Identifier" type="xsd:token" use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="QualifiedBoxIdentifierType">
+ <xsd:simpleContent>
+ <xsd:extension base="BoxIdentifierType">
+ <xsd:attribute name="Signature" type="xsd:boolean" use="required"/>
+ <xsd:attribute name="Encryption" type="xsd:boolean" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ <!--###################################################################### -->
+ <!--# Get Token Status # -->
+ <!--###################################################################### -->
+ <!--====================================================================== -->
+ <!--= Get Token Status Request = -->
+ <!--====================================================================== -->
+ <xsd:element name="GetStatusRequest" type="GetStatusRequestType"/>
+ <xsd:complexType name="GetStatusRequestType">
+ <xsd:sequence minOccurs="0">
+ <xsd:element name="TokenStatus" type="TokenStatusType"/>
+ <xsd:element name="MaxDelay" type="xsd:nonNegativeInteger"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--====================================================================== -->
+ <!--= Get Token Status Response = -->
+ <!--====================================================================== -->
+ <xsd:element name="GetStatusResponse" type="GetStatusResponseType"/>
+ <xsd:complexType name="GetStatusResponseType">
+ <xsd:sequence>
+ <xsd:element name="TokenStatus" type="TokenStatusType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:simpleType name="TokenStatusType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="ready"/>
+ <xsd:enumeration value="removed"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <!--###################################################################### -->
+ <!--# Error Response # -->
+ <!--###################################################################### -->
+ <xsd:element name="ErrorResponse" type="ErrorResponseType"/>
+ <xsd:complexType name="ErrorResponseType">
+ <xsd:sequence>
+ <xsd:element name="ErrorCode" type="ErrorCodeType"/>
+ <xsd:element name="Info" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:simpleType name="ErrorCodeType">
+ <xsd:restriction base="xsd:integer">
+ <xsd:minInclusive value="1000"/>
+ <xsd:maxInclusive value="99999"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <!--###################################################################### -->
+ <!--# Auxiliary Types # -->
+ <!--###################################################################### -->
+ <xsd:simpleType name="BoxIdentifierType">
+ <xsd:restriction base="xsd:token"/>
+ </xsd:simpleType>
+ <xsd:simpleType name="MimeTypeType">
+ <xsd:restriction base="xsd:token"/>
+ </xsd:simpleType>
+ <xsd:simpleType name="WildCardSearchStringType">
+ <xsd:restriction base="xsd:string">
+ <xsd:pattern value="[^\*/]*(\*[^\*/]*)?(/[^\*/]*(\*[^\*/]*)?)*"/>
+ <xsd:pattern value="\*\*"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:complexType name="InfoboxAssocArrayPairType">
+ <xsd:complexContent>
+ <xsd:extension base="Base64XMLContentType">
+ <xsd:attribute name="Key" type="xsd:string" use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="AnyChildrenType" mixed="false">
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:any namespace="##any" processContents="lax"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="AnyMixedChildrenType" mixed="true">
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:any namespace="##any" processContents="skip"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="XMLContentType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:extension base="AnyMixedChildrenType">
+ <xsd:attribute ref="xml:space" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="Base64XMLLocRefOptRefContentType">
+ <xsd:complexContent>
+ <xsd:extension base="Base64XMLLocRefContentType">
+ <xsd:attribute name="Reference" type="xsd:anyURI" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="Base64XMLLocRefReqRefContentType">
+ <xsd:complexContent>
+ <xsd:extension base="Base64XMLLocRefContentType">
+ <xsd:attribute name="Reference" type="xsd:anyURI" use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="Base64XMLOptRefContentType">
+ <xsd:complexContent>
+ <xsd:extension base="Base64XMLContentType">
+ <xsd:attribute name="Reference" type="xsd:anyURI" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="Base64OptRefContentType">
+ <xsd:complexContent>
+ <xsd:extension base="Base64ContentType">
+ <xsd:attribute name="Reference" type="xsd:anyURI" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="Base64ContentType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:complexType name="Base64XMLContentType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:complexType name="Base64XMLLocRefContentType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ <xsd:element name="LocRefContent" type="xsd:anyURI"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:complexType name="DataObjectAssociationType">
+ <xsd:sequence>
+ <xsd:element name="MetaInfo" type="MetaInfoType" minOccurs="0"/>
+ <xsd:element name="Content" type="Base64XMLLocRefReqRefContentType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+</xsd:schema>
diff --git a/common/src/main/resources/resources/schemas/Core.20020225.xsd b/common/src/main/resources/resources/schemas/Core.20020225.xsd
new file mode 100644
index 000000000..5dd2836a0
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/Core.20020225.xsd
@@ -0,0 +1,399 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Securitylayer, Schnittstellenspezifikation -->
+<!-- XML-Schema für Schnittstellenspezifikation Version 1.1.0, Protokollelemente im datierten Namespace 20020225 -->
+<!-- 31. 08. 2002, Operative Unit, CIO, BMOeLS -->
+<xsd:schema xmlns="http://www.buergerkarte.at/namespaces/securitylayer/20020225#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" targetNamespace="http://www.buergerkarte.at/namespaces/securitylayer/20020225#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.1.0">
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+ <!--########### Create CMS Signature ###-->
+ <!--### Create CMS Signature Request ###-->
+ <xsd:element name="CreateCMSSignatureRequest" type="CreateCMSSignatureRequestType"/>
+ <xsd:complexType name="CreateCMSSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="KeyboxIdentifier" type="BoxIdentifierType"/>
+ <xsd:element name="DataObject" type="CMSDataObjectRequiredMetaType"/>
+ </xsd:sequence>
+ <xsd:attribute name="Structure" use="required">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="detached"/>
+ <xsd:enumeration value="enveloping"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ </xsd:complexType>
+ <xsd:complexType name="CMSDataObjectRequiredMetaType">
+ <xsd:complexContent>
+ <xsd:restriction base="CMSDataObjectOptionalMetaType">
+ <xsd:sequence>
+ <xsd:element name="MetaInfo" type="MetaInfoType"/>
+ <xsd:element name="Content" type="CMSContentBaseType"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="CMSDataObjectOptionalMetaType">
+ <xsd:sequence>
+ <xsd:element name="MetaInfo" type="MetaInfoType" minOccurs="0"/>
+ <xsd:element name="Content" type="CMSContentBaseType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CMSContentBaseType">
+ <xsd:complexContent>
+ <xsd:restriction base="ContentOptionalRefType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ </xsd:choice>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <!--### Create CMS Siganture Response ###-->
+ <xsd:element name="CreateCMSSignatureResponse" type="CreateCMSSignatureResponseType"/>
+ <xsd:complexType name="CreateCMSSignatureResponseType">
+ <xsd:sequence>
+ <xsd:element name="CMSSignature" type="xsd:base64Binary"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--########## Create XML Signature ###-->
+ <!--### Create XML Signature Request ###-->
+ <xsd:element name="CreateXMLSignatureRequest" type="CreateXMLSignatureRequestType"/>
+ <xsd:complexType name="CreateXMLSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="KeyboxIdentifier" type="BoxIdentifierType"/>
+ <xsd:element name="DataObjectInfo" type="DataObjectInfoType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="MetaInfoType">
+ <xsd:sequence>
+ <xsd:element name="MimeType" type="MimeTypeType"/>
+ <xsd:element name="Description" type="xsd:anyURI" minOccurs="0"/>
+ <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="DataObjectInfoType">
+ <xsd:sequence>
+ <xsd:element name="DataObject" type="ContentOptionalRefType"/>
+ <xsd:element name="TransformsInfo" type="TransformsInfoType" maxOccurs="unbounded"/>
+ <xsd:element name="Supplement" type="XMLDataObjectAssociationType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="Structure" use="required">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="detached"/>
+ <xsd:enumeration value="enveloping"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ </xsd:complexType>
+ <xsd:complexType name="TransformsInfoType">
+ <xsd:sequence>
+ <xsd:element ref="dsig:Transforms" minOccurs="0"/>
+ <xsd:element name="FinalDataMetaInfo" type="MetaInfoType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="XMLDataObjectAssociationType">
+ <xsd:sequence>
+ <xsd:element name="MetaInfo" type="MetaInfoType" minOccurs="0"/>
+ <xsd:element name="Content" type="ContentRequiredRefType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Create XML Signature Response ###-->
+ <xsd:element name="CreateXMLSignatureResponse" type="CreateXMLSignatureResponseType"/>
+ <xsd:complexType name="CreateXMLSignatureResponseType">
+ <xsd:sequence>
+ <xsd:element ref="dsig:Signature"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--########## Verify CMS Signature ###-->
+ <!--### Verifiy CMS Signature Request ###-->
+ <xsd:element name="VerifyCMSSignatureRequest" type="VerifyCMSSignatureRequestType"/>
+ <xsd:complexType name="VerifyCMSSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="DateTime" type="xsd:dateTime" minOccurs="0"/>
+ <xsd:element name="CMSSignature" type="xsd:base64Binary"/>
+ <xsd:element name="DataObject" type="CMSDataObjectOptionalMetaType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Verify CMS Signature Response ###-->
+ <xsd:element name="VerifyCMSSignatureResponse" type="VerifyCMSSignatureResponseType"/>
+ <xsd:complexType name="VerifyCMSSignatureResponseType">
+ <xsd:sequence>
+ <xsd:element name="SignerInfo" type="dsig:KeyInfoType"/>
+ <xsd:element name="SignatureCheck" type="CheckResultType"/>
+ <xsd:element name="CertificateCheck" type="CheckResultType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--########## Verify XML Signature ###-->
+ <!--### Verify XML Signature Request ###-->
+ <xsd:element name="VerifyXMLSignatureRequest" type="VerifyXMLSignatureRequestType"/>
+ <xsd:complexType name="VerifyXMLSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="DateTime" type="xsd:dateTime" minOccurs="0"/>
+ <xsd:element name="SignatureInfo">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="SignatureEnvironment">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="skip"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="SignatureLocation" type="xsd:token"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Supplement" type="XMLDataObjectAssociationType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Verify XML Signature Response ###-->
+ <xsd:element name="VerifyXMLSignatureResponse" type="VerifyXMLSignatureResponseType"/>
+ <xsd:complexType name="VerifyXMLSignatureResponseType">
+ <xsd:sequence>
+ <xsd:element name="SignerInfo" type="dsig:KeyInfoType"/>
+ <xsd:element name="SignatureCheck" type="CheckResultType"/>
+ <xsd:element name="SignatureManifestCheck" type="CheckResultType"/>
+ <xsd:element name="CertificateCheck" type="CheckResultType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="AnyChildrenType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--########## Infobox Commands ###-->
+ <!--### Check Available Infoboxes Request ###-->
+ <xsd:element name="InfoboxAvailableRequest" type="InfoboxAvailableRequestType"/>
+ <xsd:complexType name="InfoboxAvailableRequestType"/>
+ <!--### Check Available Infoboxes Response ###-->
+ <xsd:element name="InfoboxAvailableResponse" type="InfoboxAvailableResponseType"/>
+ <xsd:complexType name="InfoboxAvailableResponseType">
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="InfoboxIdentifier" type="BoxIdentifierType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Read Infobox Request ###-->
+ <xsd:element name="InfoboxReadRequest" type="InfoboxReadRequestType"/>
+ <xsd:complexType name="InfoboxReadRequestType">
+ <xsd:sequence>
+ <xsd:element name="InfoboxIdentifier" type="BoxIdentifierType"/>
+ <xsd:choice>
+ <xsd:element name="BinaryFileParameters" type="InfoboxReadParamsBinaryFileType"/>
+ <xsd:element name="AssocArrayParameters" type="InfoboxReadParamsAssocArrayType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="InfoboxReadParamsBinaryFileType">
+ <xsd:attribute name="ContentIsXMLEntity" type="xsd:boolean" use="optional" default="false"/>
+ </xsd:complexType>
+ <xsd:complexType name="InfoboxReadParamsAssocArrayType">
+ <xsd:choice>
+ <xsd:element name="ReadKeys">
+ <xsd:complexType>
+ <xsd:attribute name="SearchString" type="WildCardSearchStringType" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ReadPairs">
+ <xsd:complexType>
+ <xsd:attribute name="SearchString" type="WildCardSearchStringType" use="required"/>
+ <xsd:attribute name="ValuesAreXMLEntities" type="xsd:boolean" use="optional" default="false"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ReadValue">
+ <xsd:complexType>
+ <xsd:attribute name="Key" type="BoxIdentifierType" use="required"/>
+ <xsd:attribute name="ValueIsXMLEntity" type="xsd:boolean" use="optional" default="false"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ <!--### Read Infobox Response ###-->
+ <xsd:element name="InfoboxReadResponse" type="InfoboxReadResponseType"/>
+ <xsd:complexType name="InfoboxReadResponseType">
+ <xsd:choice>
+ <xsd:element name="BinaryFileData" type="ContentBaseType"/>
+ <xsd:element name="AssocArrayData" type="InfoboxReadDataAssocArrayType"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:complexType name="InfoboxReadDataAssocArrayType">
+ <xsd:choice>
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="Key" type="BoxIdentifierType"/>
+ </xsd:sequence>
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="Pair" type="InfoboxAssocArrayPairType"/>
+ </xsd:sequence>
+ </xsd:choice>
+ </xsd:complexType>
+ <!--### Update Infobox Request ###-->
+ <xsd:element name="InfoboxUpdateRequest" type="InfoboxUpdateRequestType"/>
+ <xsd:complexType name="InfoboxUpdateRequestType">
+ <xsd:sequence>
+ <xsd:element name="InfoboxIdentifier" type="BoxIdentifierType"/>
+ <xsd:choice>
+ <xsd:element name="BinaryFileParameters" type="ContentBaseType"/>
+ <xsd:element name="AssocArrayParameters" type="InfoboxUpdateParamsAssocArrayType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="InfoboxUpdateParamsAssocArrayType">
+ <xsd:choice>
+ <xsd:element name="UpdateKey">
+ <xsd:complexType>
+ <xsd:attribute name="Key" type="xsd:token" use="required"/>
+ <xsd:attribute name="NewKey" type="xsd:token" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="UpdateValue" type="InfoboxAssocArrayPairType"/>
+ <xsd:element name="DeletePair">
+ <xsd:complexType>
+ <xsd:attribute name="Key" type="xsd:token" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ <!--### Update Infobox Response ###-->
+ <xsd:element name="InfoboxUpdateResponse" type="InfoboxUpdateResponseType"/>
+ <xsd:complexType name="InfoboxUpdateResponseType"/>
+ <!--########## Create Session Certificate ###-->
+ <!--### Create Session Certificate Request ###-->
+ <xsd:element name="CreateSessionKeyRequest" type="CreateSessionKeyRequestType"/>
+ <xsd:complexType name="CreateSessionKeyRequestType">
+ <xsd:sequence>
+ <xsd:element name="KeyboxIdentifier" type="BoxIdentifierType"/>
+ <xsd:element name="Password" type="xsd:string"/>
+ <xsd:element name="Minutes" type="xsd:positiveInteger"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Create Session Certificate Response ###-->
+ <xsd:element name="CreateSessionKeyResponse" type="CreateSessionKeyResponseType"/>
+ <xsd:complexType name="CreateSessionKeyResponseType">
+ <xsd:sequence>
+ <xsd:element name="PKCS12Object" type="xsd:base64Binary"/>
+ <xsd:element name="Certificate" type="xsd:base64Binary"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--########## Create Symmetric Key ###-->
+ <!--### Create SymmetricKey Request ###-->
+ <xsd:element name="CreateSymmetricSecretRequest" type="CreateSymmetricSecretRequestType"/>
+ <xsd:complexType name="CreateSymmetricSecretRequestType" mixed="false">
+ <xsd:sequence>
+ <xsd:element name="KeyboxIdentifier" type="BoxIdentifierType"/>
+ <xsd:element ref="dsig:KeyInfo"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Create SymmetricKey Response ###-->
+ <xsd:element name="CreateSymmetricSecretResponse" type="CreateSymmetricSecretResponseType"/>
+ <xsd:complexType name="CreateSymmetricSecretResponseType" mixed="false">
+ <xsd:sequence>
+ <xsd:element name="SymmetricSecretValue" type="xsd:base64Binary"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--########## Get Properties ###-->
+ <!--### Get Properties Request ###-->
+ <xsd:element name="GetPropertiesRequest" type="GetPropertiesRequestType"/>
+ <xsd:complexType name="GetPropertiesRequestType"/>
+ <!--### Get Properties Response ###-->
+ <xsd:element name="GetPropertiesResponse" type="GetPropertiesResponseType"/>
+ <xsd:complexType name="GetPropertiesResponseType">
+ <xsd:sequence>
+ <xsd:element name="ViewerMediaType" type="MimeTypeType" maxOccurs="unbounded"/>
+ <xsd:element name="XMLSignatureTransform" type="xsd:anyURI" minOccurs="5" maxOccurs="unbounded"/>
+ <xsd:element name="KeyboxIdentifier" type="BoxIdentifierType" minOccurs="2" maxOccurs="unbounded"/>
+ <xsd:element name="Binding" type="BindingType" minOccurs="2" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="BindingType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:extension base="AnyChildrenType">
+ <xsd:attribute name="Identifier" type="xsd:token" use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <!--########### Get Token Status ###-->
+ <!--### Get Token Status Reqeust ###-->
+ <xsd:element name="GetStatusRequest" type="GetStatusRequestType"/>
+ <xsd:complexType name="GetStatusRequestType">
+ <xsd:sequence minOccurs="0">
+ <xsd:element name="TokenStatus" type="TokenStatusType"/>
+ <xsd:element name="MaxDelay" type="xsd:nonNegativeInteger"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Get Token Status Response ###-->
+ <xsd:element name="GetStatusResponse" type="GetStatusResponseType"/>
+ <xsd:complexType name="GetStatusResponseType">
+ <xsd:sequence>
+ <xsd:element name="TokenStatus" type="TokenStatusType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:simpleType name="TokenStatusType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="ready"/>
+ <xsd:enumeration value="removed"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <!--########## Error Response ###-->
+ <xsd:element name="ErrorResponse" type="ErrorResponseType"/>
+ <xsd:complexType name="ErrorResponseType">
+ <xsd:sequence>
+ <xsd:element name="ErrorCode" type="xsd:integer"/>
+ <xsd:element name="Info" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--########## Auxiliary Types ###-->
+ <xsd:simpleType name="BoxIdentifierType">
+ <xsd:restriction base="xsd:token"/>
+ </xsd:simpleType>
+ <xsd:simpleType name="MimeTypeType">
+ <xsd:restriction base="xsd:token"/>
+ </xsd:simpleType>
+ <xsd:simpleType name="WildCardSearchStringType">
+ <xsd:restriction base="xsd:string">
+ <xsd:pattern value="[^\*/]*(\*[^\*/]*)?(/[^\*/]*(\*[^\*/]*)?)*"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:complexType name="AnyChildrenType" mixed="true">
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:any namespace="##any" processContents="skip"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="XMLContentType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:extension base="AnyChildrenType">
+ <xsd:attribute ref="xml:space" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ContentBaseType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:complexType name="ContentOptionalRefType">
+ <xsd:complexContent>
+ <xsd:extension base="ContentBaseType">
+ <xsd:attribute name="Reference" type="xsd:anyURI" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ContentRequiredRefType">
+ <xsd:complexContent>
+ <xsd:restriction base="ContentOptionalRefType">
+ <xsd:choice>
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ </xsd:choice>
+ <xsd:attribute name="Reference" type="xsd:anyURI" use="required"/>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="InfoboxAssocArrayPairType">
+ <xsd:complexContent>
+ <xsd:extension base="ContentBaseType">
+ <xsd:attribute name="Key" type="xsd:string" use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+</xsd:schema>
diff --git a/common/src/main/resources/resources/schemas/Core.20020831.xsd b/common/src/main/resources/resources/schemas/Core.20020831.xsd
new file mode 100644
index 000000000..6ec40be63
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/Core.20020831.xsd
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Securitylayer, Schnittstellenspezifikation -->
+<!-- XML-Schema für Schnittstellenspezifikation Version 1.1.0, Protokollelemente im datierten Namespace 20020831 -->
+<!-- 31. 08. 2002, Operative Unit, CIO, BMOeLS -->
+<xsd:schema targetNamespace="http://www.buergerkarte.at/namespaces/securitylayer/20020831#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.buergerkarte.at/namespaces/securitylayer/20020831#" xmlns:sl10="http://www.buergerkarte.at/namespaces/securitylayer/20020225#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.1.0">
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+ <xsd:import namespace="http://www.buergerkarte.at/namespaces/securitylayer/20020225#" schemaLocation="Core.20020225.xsd"/>
+ <!--########## Create XML Signature ###-->
+ <!--### Create XML Signature Request ###-->
+ <xsd:element name="CreateXMLSignatureRequest" type="CreateXMLSignatureRequestType"/>
+ <xsd:complexType name="CreateXMLSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="KeyboxIdentifier" type="sl10:BoxIdentifierType"/>
+ <xsd:element name="DataObjectInfo" type="sl10:DataObjectInfoType" maxOccurs="unbounded"/>
+ <xsd:element name="SignatureInfo" type="SignatureInfoCreationType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="SignatureInfoCreationType">
+ <xsd:sequence>
+ <xsd:element name="SignatureEnvironment" type="sl10:ContentOptionalRefType"/>
+ <xsd:element name="SignatureLocation">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:token">
+ <xsd:attribute name="Index" type="xsd:nonNegativeInteger" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Supplement" type="sl10:XMLDataObjectAssociationType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Create XML Signature Response ###-->
+ <xsd:element name="CreateXMLSignatureResponse" type="CreateXMLSignatureResponseType"/>
+ <xsd:complexType name="CreateXMLSignatureResponseType">
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="lax"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--########## Verify CMS Signature ###-->
+ <!--### Verifiy CMS Signature Request ###-->
+ <xsd:element name="VerifyCMSSignatureRequest" type="VerifyCMSSignatureRequestType"/>
+ <xsd:complexType name="VerifyCMSSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="DateTime" type="xsd:dateTime" minOccurs="0"/>
+ <xsd:element name="CMSSignature" type="xsd:base64Binary"/>
+ <xsd:element name="DataObject" type="sl10:CMSDataObjectOptionalMetaType" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="Signatories" type="SignatoriesType" use="optional" default="1"/>
+ </xsd:complexType>
+ <xsd:simpleType name="SignatoriesType">
+ <xsd:union memberTypes="AllSignatoriesType">
+ <xsd:simpleType>
+ <xsd:list itemType="xsd:positiveInteger"/>
+ </xsd:simpleType>
+ </xsd:union>
+ </xsd:simpleType>
+ <xsd:simpleType name="AllSignatoriesType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="all"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <!--### Verify CMS Signature Response ###-->
+ <xsd:element name="VerifyCMSSignatureResponse" type="VerifyCMSSignatureResponseType"/>
+ <xsd:complexType name="VerifyCMSSignatureResponseType">
+ <xsd:sequence maxOccurs="unbounded">
+ <xsd:element name="SignerInfo" type="dsig:KeyInfoType"/>
+ <xsd:element name="SignatureCheck" type="sl10:CheckResultType"/>
+ <xsd:element name="CertificateCheck" type="sl10:CheckResultType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:element name="QualifiedCertificate"/>
+ <!--########## Verify XML Signature ###-->
+ <!--### Verify XML Signature Request ###-->
+ <xsd:element name="VerifyXMLSignatureRequest" type="VerifyXMLSignatureRequestType"/>
+ <xsd:complexType name="VerifyXMLSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="DateTime" type="xsd:dateTime" minOccurs="0"/>
+ <xsd:element name="SignatureInfo" type="SignatureInfoVerificationType"/>
+ <xsd:element name="Supplement" type="sl10:XMLDataObjectAssociationType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="SignatureInfoVerificationType">
+ <xsd:sequence>
+ <xsd:element name="SignatureEnvironment" type="sl10:ContentOptionalRefType"/>
+ <xsd:element name="SignatureLocation" type="xsd:token"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Verify XML Signature Response ###-->
+ <xsd:element name="VerifyXMLSignatureResponse" type="VerifyXMLSignatureResponseType"/>
+ <xsd:complexType name="VerifyXMLSignatureResponseType">
+ <xsd:sequence>
+ <xsd:element name="SignerInfo" type="dsig:KeyInfoType"/>
+ <xsd:element name="SignatureCheck" type="ReferencesCheckResultType"/>
+ <xsd:element name="SignatureManifestCheck" type="ReferencesCheckResultType"/>
+ <xsd:element name="XMLDSIGManifestCheck" type="ManifestRefsCheckResultType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="CertificateCheck" type="sl10:CheckResultType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ReferencesCheckResultType">
+ <xsd:complexContent>
+ <xsd:restriction base="sl10:CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="ReferencesCheckResultInfoType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ReferencesCheckResultInfoType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:restriction base="sl10:AnyChildrenType">
+ <xsd:sequence>
+ <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="FailedReference" type="xsd:positiveInteger" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ManifestRefsCheckResultType">
+ <xsd:complexContent>
+ <xsd:restriction base="sl10:CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="ManifestRefsCheckResultInfoType"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ManifestRefsCheckResultInfoType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:extension base="ReferencesCheckResultInfoType">
+ <xsd:sequence>
+ <xsd:element name="ReferringSigReference" type="xsd:positiveInteger"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <!--########## Get Properties ###-->
+ <!--### Get Properties Response ###-->
+ <xsd:element name="GetPropertiesResponse" type="GetPropertiesResponseType"/>
+ <xsd:complexType name="GetPropertiesResponseType">
+ <xsd:sequence>
+ <xsd:element name="ViewerMediaType" type="sl10:MimeTypeType" maxOccurs="unbounded"/>
+ <xsd:element name="XMLSignatureTransform" type="xsd:anyURI" maxOccurs="unbounded"/>
+ <xsd:element name="KeyboxIdentifier" type="sl10:BoxIdentifierType" maxOccurs="unbounded"/>
+ <xsd:element name="Binding" type="sl10:BindingType" maxOccurs="unbounded"/>
+ <xsd:element name="ProtocolVersion" type="xsd:anyURI" maxOccurs="unbounded"/>
+ <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+</xsd:schema>
diff --git a/common/src/main/resources/resources/schemas/ECDSAKeyValue.ancient.xsd b/common/src/main/resources/resources/schemas/ECDSAKeyValue.ancient.xsd
new file mode 100644
index 000000000..833d327f2
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/ECDSAKeyValue.ancient.xsd
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema targetNamespace="http://www.buergerkarte.at/namespaces/ecdsa/200206030#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ecdsa="http://www.buergerkarte.at/namespaces/ecdsa/200206030#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="0.3">
+ <!--ECDSA key value root element-->
+ <xs:element name="ECDSAKeyValue" type="ecdsa:ECDSAKeyValueType"/>
+ <xs:complexType name="ECDSAKeyValueType">
+ <xs:sequence>
+ <xs:element name="DomainParameters" type="ecdsa:DomainParamsType" minOccurs="0"/>
+ <xs:element name="PublicKey" type="ecdsa:ECPointType"/>
+ </xs:sequence>
+ </xs:complexType>
+ <!--EC domain parameters-->
+ <xs:complexType name="DomainParamsType">
+ <xs:choice>
+ <xs:element name="ExplicitParams" type="ecdsa:ExplicitParamsType"/>
+ <xs:element name="NamedCurve">
+ <xs:complexType>
+ <xs:attribute name="URN" type="xs:anyURI" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ <xs:complexType name="FieldParamsType" abstract="true"/>
+ <xs:complexType name="PrimeFieldParamsType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:FieldParamsType">
+ <xs:sequence>
+ <xs:element name="P" type="xs:positiveInteger"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="CharTwoFieldParamsType" abstract="true">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:FieldParamsType">
+ <xs:sequence>
+ <xs:element name="M" type="xs:positiveInteger"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="OddCharExtensionFieldParamsType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:FieldParamsType">
+ <xs:sequence>
+ <xs:element name="M" type="xs:positiveInteger"/>
+ <xs:element name="W" type="xs:positiveInteger"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="TnBFieldParamsType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:CharTwoFieldParamsType">
+ <xs:sequence>
+ <xs:element name="K" type="xs:positiveInteger"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="PnBFieldParamsType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:CharTwoFieldParamsType">
+ <xs:sequence>
+ <xs:element name="K1" type="xs:positiveInteger"/>
+ <xs:element name="K2" type="xs:positiveInteger"/>
+ <xs:element name="K3" type="xs:positiveInteger"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="ExplicitParamsType">
+ <xs:sequence>
+ <xs:element name="FieldParams" type="ecdsa:FieldParamsType"/>
+ <xs:element name="CurveParams" type="ecdsa:CurveParamsType"/>
+ <xs:element name="BasePointParams" type="ecdsa:BasePointParamsType"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="CurveParamsType">
+ <xs:sequence>
+ <xs:element name="A" type="ecdsa:FieldElemType"/>
+ <xs:element name="B" type="ecdsa:FieldElemType"/>
+ <xs:element name="Seed" type="xs:hexBinary" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="BasePointParamsType">
+ <xs:sequence>
+ <xs:element name="BasePoint" type="ecdsa:ECPointType"/>
+ <xs:element name="Order" type="xs:positiveInteger"/>
+ <xs:element name="Cofactor" type="xs:positiveInteger" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ <!--EC point-->
+ <xs:complexType name="ECPointType">
+ <xs:sequence minOccurs="0">
+ <xs:element name="X" type="ecdsa:FieldElemType"/>
+ <xs:element name="Y" type="ecdsa:FieldElemType"/>
+ </xs:sequence>
+ </xs:complexType>
+ <!--Field element-->
+ <xs:complexType name="FieldElemType" abstract="true"/>
+ <xs:complexType name="PrimeFieldElemType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:FieldElemType">
+ <xs:attribute name="Value" type="xs:nonNegativeInteger" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="CharTwoFieldElemType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:FieldElemType">
+ <xs:attribute name="Value" type="xs:hexBinary" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="OddCharExtensionFieldElemType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:FieldElemType">
+ <xs:attribute name="Value" type="xs:nonNegativeInteger" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+</xs:schema>
diff --git a/common/src/main/resources/resources/schemas/ECDSAKeyValue.wrong.xsd b/common/src/main/resources/resources/schemas/ECDSAKeyValue.wrong.xsd
new file mode 100644
index 000000000..db83c9df5
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/ECDSAKeyValue.wrong.xsd
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema targetNamespace="http://www.w3.org/2004/01/xmldsig-more#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ecdsa="http://www.w3.org/2004/01/xmldsig-more#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="0.3">
+ <!--ECDSA key value root element-->
+ <xs:element name="ECDSAKeyValue" type="ecdsa:ECDSAKeyValueType"/>
+ <xs:complexType name="ECDSAKeyValueType">
+ <xs:sequence>
+ <xs:element name="DomainParameters" type="ecdsa:DomainParamsType" minOccurs="0"/>
+ <xs:element name="PublicKey" type="ecdsa:ECPointType"/>
+ </xs:sequence>
+ </xs:complexType>
+ <!--EC domain parameters-->
+ <xs:complexType name="DomainParamsType">
+ <xs:choice>
+ <xs:element name="ExplicitParams" type="ecdsa:ExplicitParamsType"/>
+ <xs:element name="NamedCurve">
+ <xs:complexType>
+ <xs:attribute name="URN" type="xs:anyURI" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ <xs:complexType name="FieldParamsType" abstract="true"/>
+ <xs:complexType name="PrimeFieldParamsType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:FieldParamsType">
+ <xs:sequence>
+ <xs:element name="P" type="xs:positiveInteger"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="CharTwoFieldParamsType" abstract="true">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:FieldParamsType">
+ <xs:sequence>
+ <xs:element name="M" type="xs:positiveInteger"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="OddCharExtensionFieldParamsType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:FieldParamsType">
+ <xs:sequence>
+ <xs:element name="M" type="xs:positiveInteger"/>
+ <xs:element name="W" type="xs:positiveInteger"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="TnBFieldParamsType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:CharTwoFieldParamsType">
+ <xs:sequence>
+ <xs:element name="K" type="xs:positiveInteger"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="PnBFieldParamsType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:CharTwoFieldParamsType">
+ <xs:sequence>
+ <xs:element name="K1" type="xs:positiveInteger"/>
+ <xs:element name="K2" type="xs:positiveInteger"/>
+ <xs:element name="K3" type="xs:positiveInteger"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="ExplicitParamsType">
+ <xs:sequence>
+ <xs:element name="FieldParams" type="ecdsa:FieldParamsType"/>
+ <xs:element name="CurveParams" type="ecdsa:CurveParamsType"/>
+ <xs:element name="BasePointParams" type="ecdsa:BasePointParamsType"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="CurveParamsType">
+ <xs:sequence>
+ <xs:element name="A" type="ecdsa:FieldElemType"/>
+ <xs:element name="B" type="ecdsa:FieldElemType"/>
+ <xs:element name="Seed" type="xs:hexBinary" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="BasePointParamsType">
+ <xs:sequence>
+ <xs:element name="BasePoint" type="ecdsa:ECPointType"/>
+ <xs:element name="Order" type="xs:positiveInteger"/>
+ <xs:element name="Cofactor" type="xs:positiveInteger" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ <!--EC point-->
+ <xs:complexType name="ECPointType">
+ <xs:sequence minOccurs="0">
+ <xs:element name="X" type="ecdsa:FieldElemType"/>
+ <xs:element name="Y" type="ecdsa:FieldElemType"/>
+ </xs:sequence>
+ </xs:complexType>
+ <!--Field element-->
+ <xs:complexType name="FieldElemType" abstract="true"/>
+ <xs:complexType name="PrimeFieldElemType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:FieldElemType">
+ <xs:attribute name="Value" type="xs:nonNegativeInteger" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="CharTwoFieldElemType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:FieldElemType">
+ <xs:attribute name="Value" type="xs:hexBinary" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="OddCharExtensionFieldElemType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:FieldElemType">
+ <xs:attribute name="Value" type="xs:nonNegativeInteger" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+</xs:schema>
diff --git a/common/src/main/resources/resources/schemas/ECDSAKeyValue.xsd b/common/src/main/resources/resources/schemas/ECDSAKeyValue.xsd
new file mode 100644
index 000000000..7a01b23d1
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/ECDSAKeyValue.xsd
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema targetNamespace="http://www.w3.org/2001/04/xmldsig-more#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ecdsa="http://www.w3.org/2001/04/xmldsig-more#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="0.3">
+ <!--ECDSA key value root element-->
+ <xs:element name="ECDSAKeyValue" type="ecdsa:ECDSAKeyValueType"/>
+ <xs:complexType name="ECDSAKeyValueType">
+ <xs:sequence>
+ <xs:element name="DomainParameters" type="ecdsa:DomainParamsType" minOccurs="0"/>
+ <xs:element name="PublicKey" type="ecdsa:ECPointType"/>
+ </xs:sequence>
+ </xs:complexType>
+ <!--EC domain parameters-->
+ <xs:complexType name="DomainParamsType">
+ <xs:choice>
+ <xs:element name="ExplicitParams" type="ecdsa:ExplicitParamsType"/>
+ <xs:element name="NamedCurve">
+ <xs:complexType>
+ <xs:attribute name="URN" type="xs:anyURI" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ <xs:complexType name="FieldParamsType" abstract="true"/>
+ <xs:complexType name="PrimeFieldParamsType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:FieldParamsType">
+ <xs:sequence>
+ <xs:element name="P" type="xs:positiveInteger"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="CharTwoFieldParamsType" abstract="true">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:FieldParamsType">
+ <xs:sequence>
+ <xs:element name="M" type="xs:positiveInteger"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="OddCharExtensionFieldParamsType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:FieldParamsType">
+ <xs:sequence>
+ <xs:element name="M" type="xs:positiveInteger"/>
+ <xs:element name="W" type="xs:positiveInteger"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="TnBFieldParamsType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:CharTwoFieldParamsType">
+ <xs:sequence>
+ <xs:element name="K" type="xs:positiveInteger"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="PnBFieldParamsType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:CharTwoFieldParamsType">
+ <xs:sequence>
+ <xs:element name="K1" type="xs:positiveInteger"/>
+ <xs:element name="K2" type="xs:positiveInteger"/>
+ <xs:element name="K3" type="xs:positiveInteger"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="ExplicitParamsType">
+ <xs:sequence>
+ <xs:element name="FieldParams" type="ecdsa:FieldParamsType"/>
+ <xs:element name="CurveParams" type="ecdsa:CurveParamsType"/>
+ <xs:element name="BasePointParams" type="ecdsa:BasePointParamsType"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="CurveParamsType">
+ <xs:sequence>
+ <xs:element name="A" type="ecdsa:FieldElemType"/>
+ <xs:element name="B" type="ecdsa:FieldElemType"/>
+ <xs:element name="Seed" type="xs:hexBinary" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="BasePointParamsType">
+ <xs:sequence>
+ <xs:element name="BasePoint" type="ecdsa:ECPointType"/>
+ <xs:element name="Order" type="xs:positiveInteger"/>
+ <xs:element name="Cofactor" type="xs:positiveInteger" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ <!--EC point-->
+ <xs:complexType name="ECPointType">
+ <xs:sequence minOccurs="0">
+ <xs:element name="X" type="ecdsa:FieldElemType"/>
+ <xs:element name="Y" type="ecdsa:FieldElemType"/>
+ </xs:sequence>
+ </xs:complexType>
+ <!--Field element-->
+ <xs:complexType name="FieldElemType" abstract="true"/>
+ <xs:complexType name="PrimeFieldElemType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:FieldElemType">
+ <xs:attribute name="Value" type="xs:nonNegativeInteger" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="CharTwoFieldElemType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:FieldElemType">
+ <xs:attribute name="Value" type="xs:hexBinary" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="OddCharExtensionFieldElemType">
+ <xs:complexContent>
+ <xs:extension base="ecdsa:FieldElemType">
+ <xs:attribute name="Value" type="xs:nonNegativeInteger" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+</xs:schema>
diff --git a/common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.2.xsd b/common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.2.xsd
new file mode 100644
index 000000000..4b018db64
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.2.xsd
@@ -0,0 +1,350 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) by Rudolf Schamberger (Stabsstelle IKT-Strategie) (Bundesrechenzentrum GmbH) -->
+<xsd:schema targetNamespace="http://www.buergerkarte.at/namespaces/moaconfig#" xmlns:sl10="http://www.buergerkarte.at/namespaces/securitylayer/20020225#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.buergerkarte.at/namespaces/moaconfig#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.1.1">
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
+ <xsd:import namespace="http://www.buergerkarte.at/namespaces/securitylayer/20020225#" schemaLocation="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20020831/core/Core.20020225.xsd"/>
+ <xsd:element name="Configuration">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="LoginType" type="LoginType" default="stateful"/>
+ <xsd:element name="Binding" minOccurs="0" maxOccurs="1">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="full"/>
+ <xsd:enumeration value="userName"/>
+ <xsd:enumeration value="none"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:choice>
+ <xsd:element ref="ParamAuth"/>
+ <xsd:element ref="BasicAuth"/>
+ <xsd:element ref="HeaderAuth"/>
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:simpleType name="LoginType">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="stateless"/>
+ <xsd:enumeration value="stateful"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:element name="ParamAuth">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Parameter" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Parameter">
+ <xsd:complexType>
+ <xsd:attribute name="Name" type="xsd:token" use="required"/>
+ <xsd:attribute name="Value" type="MOAAuthDataType" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="BasicAuth">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="UserID" type="MOAAuthDataType"/>
+ <xsd:element name="Password" type="MOAAuthDataType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="HeaderAuth">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Header" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Header">
+ <xsd:complexType>
+ <xsd:attribute name="Name" type="xsd:token" use="required"/>
+ <xsd:attribute name="Value" type="MOAAuthDataType" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:simpleType name="MOAAuthDataType">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="MOAGivenName"/>
+ <xsd:enumeration value="MOAFamilyName"/>
+ <xsd:enumeration value="MOADateOfBirth"/>
+ <xsd:enumeration value="MOABPK"/>
+ <xsd:enumeration value="MOAPublicAuthority"/>
+ <xsd:enumeration value="MOABKZ"/>
+ <xsd:enumeration value="MOAQualifiedCertificate"/>
+ <xsd:enumeration value="MOAStammzahl"/>
+ <xsd:enumeration value="MOAIdentificationValueType"/>
+ <xsd:enumeration value="MOAIPAddress"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="MOAKeyBoxSelector">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="SecureSignatureKeypair"/>
+ <xsd:enumeration value="CertifiedKeypair"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <!--Konfiguration für Authentisierungs- und Proxy-Komponente und Online-Applikation-->
+ <xsd:element name="MOA-IDConfiguration">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="AuthComponent" type="AuthComponentType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter der
+ Authentisierungs-Komponente</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="ProxyComponent" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Konfigurationsparameter der
+ Proxy-Komponente</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="AuthComponent">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Kommunikation zw.
+ Proxykomponente und Authenttisierungskomponente</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die SOAP-Verbindung von der
+ Proxy-Komponente zur Auth-Komponente (vgl.
+ AuthComponent/MOA-SP/ConnectionParameter)</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="OnlineApplication" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die OA</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="OnlineApplicationType">
+ <xsd:attribute name="publicURLPrefix" type="xsd:anyURI" use="required"/>
+ <xsd:attribute name="keyBoxIdentifier" type="MOAKeyBoxSelector" use="optional" default="SecureSignatureKeypair"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ChainingModes" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>spezifiziert den Algorithmus ("pkix" oder "chaining") für die
+ Zertifikatspfadvalidierung</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="TrustAnchor">
+ <xsd:annotation>
+ <xsd:documentation>ein vom SystemDefaultMode abweichender ChiningMode kann
+ für jeden TrustAnchor gesetzt werden</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="dsig:X509IssuerSerialType">
+ <xsd:attribute name="mode" type="ChainingModeType" use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="systemDefaultMode" type="ChainingModeType" use="optional" default="pkix"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="TrustedCACertificates" type="xsd:anyURI" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>verweist auf ein Verzeichnis, das vertrauenswürdige CA
+ (Zwischen-CA, Wurzel-CA) Zertifikate enthält.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="GenericConfiguration" minOccurs="0" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:attribute name="name" type="xsd:string" use="required"/>
+ <xsd:attribute name="value" type="xsd:string" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:complexType name="AuthComponentType">
+ <xsd:sequence>
+ <xsd:element name="BKUSelection" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterServerAuthType"/>
+ </xsd:sequence>
+ <xsd:attribute name="BKUSelectionAlternative" type="BKUSelectionType" use="optional" default="HTMLComplete"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="SecurityLayer">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Kommunikation mit dem
+ Security-Layer</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="TransformsInfo" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>das Attribut filename verweist auf eine Datei mit globalem
+ Element TransformsInfo vom Typ sl10:TransformsInfo; diese TransformsInfo
+ werden in den CreateXMLSignatureRequest für die Signatur des AUTH-Blocks
+ inkludiert</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:attribute name="filename" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="MOA-SP">
+ <xsd:annotation>
+ <xsd:documentation>enthält Konfiguratiosnparameter für die Kommunikation mit dem MOA
+ SP Modul</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die SOAP-Verbindung von der
+ AUTH-Komponente zu MOA-SP; das Attribut URL enthält den Endpunkt des Server;
+ wird das Schema "https" verwendet müssen die Kind-Elemente angegeben werden;
+ wird das Schema "http" verwendet dürfen keine Kind-Elemente angegeben
+ werden; wird das Element nicht verwendet dann wird MOA-SP über das API
+ aufgerufen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="VerifyIdentityLink">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Überprüfung der
+ Personenbindung</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="TrustProfileID"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="VerifyAuthBlock">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Überprüfung des
+ AUTH-Blocks</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="TrustProfileID"/>
+ <xsd:element name="VerifyTransformsInfoProfileID" type="xsd:string" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="IdentityLinkSigners">
+ <xsd:annotation>
+ <xsd:documentation>enthält Informationen über akzeptierte Signers des
+ IdentityLinks</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="X509SubjectName" type="xsd:string" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>akzeptierte Signer des IdentityLinks werden per
+ X509SubjectName (Kodierung nach RFC 2253) identifiziert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ProxyComponentType"/>
+ <xsd:complexType name="OnlineApplicationType">
+ <xsd:sequence>
+ <xsd:element name="AuthComponent" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter über die OA, die die
+ Authentisierungs-Komponente betreffen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:attribute name="provideStammzahl" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideAUTHBlock" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideIdentityLink" type="xsd:boolean" use="optional" default="false"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ProxyComponent" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter über die OA, die die Proxy-Komponente
+ betreffen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter über die OA, die die Proxy-Komponente
+ betreffen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="configFileURL" type="xsd:anyURI" use="optional"/>
+ <xsd:attribute name="sessionTimeOut" type="xsd:int" use="optional"/>
+ <xsd:attribute name="loginParameterResolverImpl" type="xsd:string" use="optional"/>
+ <xsd:attribute name="loginParameterResolverConfiguration" type="xsd:string" use="optional"/>
+ <xsd:attribute name="connectionBuilderImpl" type="xsd:string" use="optional"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ConnectionParameterServerAuthType">
+ <xsd:sequence>
+ <xsd:element name="AcceptedServerCertificates" type="xsd:anyURI" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>URL zu einem Verzeichnis, das akzeptierte Server-Zertifikate der
+ TLS-Verbindung enthält (keine CA-Zertifikate)</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="URL" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:complexType name="ConnectionParameterClientAuthType">
+ <xsd:complexContent>
+ <xsd:extension base="ConnectionParameterServerAuthType">
+ <xsd:sequence>
+ <xsd:element name="ClientKeyStore" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>URL zu einem KeyStore, der den privaten Schlüssel, der für
+ die TLS-Client-Authentisierung verwendetwird, enthält</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:anyURI">
+ <xsd:attribute name="password" type="xsd:string" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:element name="TrustProfileID" type="xsd:string"/>
+ <xsd:simpleType name="ChainingModeType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="chaining"/>
+ <xsd:enumeration value="pkix"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="BKUSelectionType">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="HTMLComplete"/>
+ <xsd:enumeration value="HTMLSelect"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+</xsd:schema>
diff --git a/common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.3.xsd b/common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.3.xsd
new file mode 100644
index 000000000..66c6e1832
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.3.xsd
@@ -0,0 +1,424 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) by Rudolf Schamberger (Stabsstelle IKT-Strategie) (Bundesrechenzentrum GmbH) -->
+<xsd:schema targetNamespace="http://www.buergerkarte.at/namespaces/moaconfig#" xmlns="http://www.buergerkarte.at/namespaces/moaconfig#" xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:sl10="http://www.buergerkarte.at/namespaces/securitylayer/20020225#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.1.1">
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
+ <xsd:import namespace="http://www.buergerkarte.at/namespaces/securitylayer/20020225#" schemaLocation="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20020831/core/Core.20020225.xsd"/>
+ <xsd:import namespace="http://reference.e-government.gv.at/namespace/persondata/20020228#" schemaLocation="PersonData_20_en_moaWID.xsd"/>
+ <xsd:element name="Configuration">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="LoginType" type="LoginType" default="stateful"/>
+ <xsd:element name="Binding" minOccurs="0">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="full"/>
+ <xsd:enumeration value="userName"/>
+ <xsd:enumeration value="none"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:choice>
+ <xsd:element ref="ParamAuth"/>
+ <xsd:element ref="BasicAuth"/>
+ <xsd:element ref="HeaderAuth"/>
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:simpleType name="LoginType">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="stateless"/>
+ <xsd:enumeration value="stateful"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:element name="ParamAuth">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Parameter" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Parameter">
+ <xsd:complexType>
+ <xsd:attribute name="Name" type="xsd:token" use="required"/>
+ <xsd:attribute name="Value" type="MOAAuthDataType" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="BasicAuth">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="UserID" type="MOAAuthDataType"/>
+ <xsd:element name="Password" type="MOAAuthDataType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="HeaderAuth">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Header" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Header">
+ <xsd:complexType>
+ <xsd:attribute name="Name" type="xsd:token" use="required"/>
+ <xsd:attribute name="Value" type="MOAAuthDataType" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:simpleType name="MOAAuthDataType">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="MOAGivenName"/>
+ <xsd:enumeration value="MOAFamilyName"/>
+ <xsd:enumeration value="MOADateOfBirth"/>
+ <xsd:enumeration value="MOABPK"/>
+ <xsd:enumeration value="MOAWBPK"/>
+ <xsd:enumeration value="MOAPublicAuthority"/>
+ <xsd:enumeration value="MOABKZ"/>
+ <xsd:enumeration value="MOAQualifiedCertificate"/>
+ <xsd:enumeration value="MOAStammzahl"/>
+ <xsd:enumeration value="MOAIdentificationValueType"/>
+ <xsd:enumeration value="MOAIPAddress"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="MOAKeyBoxSelector">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="SecureSignatureKeypair"/>
+ <xsd:enumeration value="CertifiedKeypair"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <!--Konfiguration für Authentisierungs- und Proxy-Komponente und Online-Applikation-->
+ <xsd:element name="MOA-IDConfiguration">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="AuthComponent" type="AuthComponentType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter der
+ Authentisierungs-Komponente</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="ProxyComponent" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Konfigurationsparameter der
+ Proxy-Komponente</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="AuthComponent">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Kommunikation zw.
+ Proxykomponente und Authenttisierungskomponente</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die SOAP-Verbindung von der
+ Proxy-Komponente zur Auth-Komponente (vgl.
+ AuthComponent/MOA-SP/ConnectionParameter)</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="OnlineApplication" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die OA</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="OnlineApplicationType">
+ <xsd:attribute name="publicURLPrefix" type="xsd:anyURI" use="required"/>
+ <xsd:attribute name="keyBoxIdentifier" type="MOAKeyBoxSelector" use="optional" default="SecureSignatureKeypair"/>
+ <xsd:attribute name="type" use="optional" default="publicService">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:NMTOKEN">
+ <xsd:enumeration value="businessService"/>
+ <xsd:enumeration value="publicService"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ChainingModes" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>spezifiziert den Algorithmus ("pkix" oder "chaining") für die
+ Zertifikatspfadvalidierung</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="TrustAnchor">
+ <xsd:annotation>
+ <xsd:documentation>ein vom SystemDefaultMode abweichender ChiningMode kann
+ für jeden TrustAnchor gesetzt werden</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="dsig:X509IssuerSerialType">
+ <xsd:attribute name="mode" type="ChainingModeType" use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="systemDefaultMode" type="ChainingModeType" use="optional" default="pkix"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="TrustedCACertificates" type="xsd:anyURI" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>verweist auf ein Verzeichnis, das vertrauenswürdige CA
+ (Zwischen-CA, Wurzel-CA) Zertifikate enthält.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="GenericConfiguration" minOccurs="0" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:attribute name="name" use="required">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="DirectoryCertStoreParameters.RootDir"/>
+ <xsd:enumeration value="AuthenticationSession.TimeOut"/>
+ <xsd:enumeration value="AuthenticationData.TimeOut"/>
+ <xsd:enumeration value="TrustManager.RevocationChecking"/>
+ <xsd:enumeration value="FrontendServlets.EnableHTTPConnection"/>
+ <xsd:enumeration value="FrontendServlets.DataURLPrefix"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="value" type="xsd:string" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:complexType name="AuthComponentType">
+ <xsd:sequence>
+ <xsd:element name="BKUSelection" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterServerAuthType"/>
+ </xsd:sequence>
+ <xsd:attribute name="BKUSelectionAlternative" type="BKUSelectionType" use="optional" default="HTMLComplete"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Templates" type="TemplatesType" minOccurs="0" maxOccurs="1" />
+ <xsd:element name="SecurityLayer">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Kommunikation mit dem
+ Security-Layer</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="TransformsInfo" type="TransformsInfoType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="MOA-SP">
+ <xsd:annotation>
+ <xsd:documentation>enthält Konfiguratiosnparameter für die Kommunikation mit dem MOA
+ SP Modul</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die SOAP-Verbindung von der
+ AUTH-Komponente zu MOA-SP; das Attribut URL enthält den Endpunkt des Server;
+ wird das Schema "https" verwendet müssen die Kind-Elemente angegeben werden;
+ wird das Schema "http" verwendet dürfen keine Kind-Elemente angegeben
+ werden; wird das Element nicht verwendet dann wird MOA-SP über das API
+ aufgerufen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="VerifyIdentityLink">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Überprüfung der
+ Personenbindung</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="TrustProfileID"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="VerifyAuthBlock">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Überprüfung des
+ AUTH-Blocks</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="TrustProfileID"/>
+ <xsd:element name="VerifyTransformsInfoProfileID" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="IdentityLinkSigners">
+ <xsd:annotation>
+ <xsd:documentation>enthält Informationen über akzeptierte Signers des
+ IdentityLinks</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="X509SubjectName" type="xsd:string" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>akzeptierte Signer des IdentityLinks werden per
+ X509SubjectName (Kodierung nach RFC 2253) identifiziert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="TransformsInfoType">
+ <xsd:annotation>
+ <xsd:documentation>das Attribut filename verweist auf eine Datei mit globalem
+ Element TransformsInfo vom Typ sl10:TransformsInfo; diese TransformsInfo
+ werden in den CreateXMLSignatureRequest für die Signatur des AUTH-Blocks
+ inkludiert</xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="filename" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:complexType name="TemplatesType">
+ <xsd:sequence>
+ <xsd:element name="BKUSelectionTemplate" type="TemplateType" minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="Template" type="TemplateType" minOccurs="0" maxOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="TemplateType">
+ <xsd:annotation>
+ <xsd:documentation>das Attribut URL spezifiziert die Lage des Templates</xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="URL" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:complexType name="ProxyComponentType"/>
+ <xsd:complexType name="OnlineApplicationType">
+ <xsd:sequence>
+ <xsd:element name="AuthComponent" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter über die OA, die die
+ Authentisierungs-Komponente betreffen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <!--xsd:element name="IdentificationNumber" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="pr:AbstractSimpleIdentification"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element-->
+ <xsd:element name="IdentificationNumber" minOccurs="0">
+ <xsd:complexType>
+ <xsd:choice>
+ <xsd:element ref="pr:Firmenbuchnummer"/>
+ <xsd:element ref="pr:ZMRzahl"/>
+ <xsd:element ref="pr:Vereinsnummer"/>
+ <xsd:element ref="pr:ERJPZahl"/>
+ <xsd:element name="AnyNumber">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="Identifier" type="xsd:string" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Templates" type="TemplatesType" minOccurs="0" maxOccurs="1" />
+ <xsd:element name="TransformsInfo" type="TransformsInfoType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="slVersion" use="optional" default="1.1">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="1.1"/>
+ <xsd:enumeration value="1.2"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="provideStammzahl" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideAUTHBlock" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideIdentityLink" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideCertificate" type="xsd:boolean" use="optional" default="false"/>
+ <!--xsd:element ref="pr:AbstractSimpleIdentification" minOccurs="0" maxOccurs="1"/-->
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ProxyComponent" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter über die OA, die die Proxy-Komponente
+ betreffen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter über die OA, die die Proxy-Komponente
+ betreffen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="configFileURL" type="xsd:anyURI" use="optional"/>
+ <xsd:attribute name="sessionTimeOut" type="xsd:int" use="optional"/>
+ <xsd:attribute name="loginParameterResolverImpl" type="xsd:string" use="optional"/>
+ <xsd:attribute name="loginParameterResolverConfiguration" type="xsd:string" use="optional"/>
+ <xsd:attribute name="connectionBuilderImpl" type="xsd:string" use="optional"/>
+ </xsd:complexType>
+ </xsd:element>
+ <!--xsd:element ref="pr:CorporateBody" minOccurs="0" maxOccurs="1"/-->
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ConnectionParameterServerAuthType">
+ <xsd:sequence>
+ <xsd:element name="AcceptedServerCertificates" type="xsd:anyURI" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>URL zu einem Verzeichnis, das akzeptierte Server-Zertifikate der
+ TLS-Verbindung enthält (keine CA-Zertifikate)</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="URL" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:complexType name="ConnectionParameterClientAuthType">
+ <xsd:complexContent>
+ <xsd:extension base="ConnectionParameterServerAuthType">
+ <xsd:sequence>
+ <xsd:element name="ClientKeyStore" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>URL zu einem KeyStore, der den privaten Schlüssel, der für
+ die TLS-Client-Authentisierung verwendetwird, enthält</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:anyURI">
+ <xsd:attribute name="password" type="xsd:string" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:element name="TrustProfileID" type="xsd:string"/>
+ <xsd:simpleType name="ChainingModeType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="chaining"/>
+ <xsd:enumeration value="pkix"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="BKUSelectionType">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="HTMLComplete"/>
+ <xsd:enumeration value="HTMLSelect"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+</xsd:schema>
diff --git a/common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.4.2.xsd b/common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.4.2.xsd
new file mode 100644
index 000000000..360789834
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.4.2.xsd
@@ -0,0 +1,616 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns="http://www.buergerkarte.at/namespaces/moaconfig#" xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" targetNamespace="http://www.buergerkarte.at/namespaces/moaconfig#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.4.2">
+ <!-- es werden lokale Schemas referenziert für real aufgelöste Schemas bitte ersetzen: http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd -->
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd"/>
+ <xsd:import namespace="http://reference.e-government.gv.at/namespace/persondata/20020228#" schemaLocation="PersonData_20_en_moaWID.xsd"/>
+ <xsd:element name="Configuration">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="LoginType" type="LoginType" default="stateful"/>
+ <xsd:element name="Binding" minOccurs="0">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="full"/>
+ <xsd:enumeration value="userName"/>
+ <xsd:enumeration value="none"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:choice>
+ <xsd:element ref="ParamAuth"/>
+ <xsd:element ref="BasicAuth"/>
+ <xsd:element ref="HeaderAuth"/>
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:simpleType name="LoginType">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="stateless"/>
+ <xsd:enumeration value="stateful"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:element name="ParamAuth">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Parameter" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Parameter">
+ <xsd:complexType>
+ <xsd:attribute name="Name" type="xsd:token" use="required"/>
+ <xsd:attribute name="Value" type="MOAAuthDataType" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="BasicAuth">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="UserID" type="MOAAuthDataType"/>
+ <xsd:element name="Password" type="MOAAuthDataType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="HeaderAuth">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Header" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Header">
+ <xsd:complexType>
+ <xsd:attribute name="Name" type="xsd:token" use="required"/>
+ <xsd:attribute name="Value" type="MOAAuthDataType" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:simpleType name="MOAAuthDataType">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="MOAGivenName"/>
+ <xsd:enumeration value="MOAFamilyName"/>
+ <xsd:enumeration value="MOADateOfBirth"/>
+ <xsd:enumeration value="MOABPK"/>
+ <xsd:enumeration value="MOAWBPK"/>
+ <xsd:enumeration value="MOAPublicAuthority"/>
+ <xsd:enumeration value="MOABKZ"/>
+ <xsd:enumeration value="MOAQualifiedCertificate"/>
+ <xsd:enumeration value="MOAStammzahl"/>
+ <xsd:enumeration value="MOAIdentificationValueType"/>
+ <xsd:enumeration value="MOAIPAddress"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="MOAKeyBoxSelector">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="SecureSignatureKeypair"/>
+ <xsd:enumeration value="CertifiedKeypair"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <!--Konfiguration für Authentisierungs- und Proxy-Komponente und Online-Applikation-->
+ <xsd:element name="MOA-IDConfiguration">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="AuthComponent" type="AuthComponentType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter der Authentisierungs-Komponente</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="ProxyComponent" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Konfigurationsparameter der Proxy-Komponente</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="AuthComponent">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Kommunikation zw. Proxykomponente und Authenttisierungskomponente</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die SOAP-Verbindung von der Proxy-Komponente zur Auth-Komponente (vgl. AuthComponent/MOA-SP/ConnectionParameter)</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="OnlineApplication" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die OA</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="OnlineApplicationType">
+ <xsd:attribute name="publicURLPrefix" type="xsd:anyURI" use="required"/>
+ <xsd:attribute name="keyBoxIdentifier" type="MOAKeyBoxSelector" use="optional" default="SecureSignatureKeypair"/>
+ <xsd:attribute name="type" use="optional" default="publicService">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:NMTOKEN">
+ <xsd:enumeration value="businessService"/>
+ <xsd:enumeration value="publicService"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="calculateHPI" type="xsd:boolean" use="optional" default="false"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ChainingModes" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>spezifiziert den Algorithmus ("pkix" oder "chaining") für die Zertifikatspfadvalidierung</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="TrustAnchor">
+ <xsd:annotation>
+ <xsd:documentation>ein vom SystemDefaultMode abweichender ChiningMode kann für jeden TrustAnchor gesetzt werden</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="dsig:X509IssuerSerialType">
+ <xsd:attribute name="mode" type="ChainingModeType" use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="systemDefaultMode" type="ChainingModeType" use="optional" default="pkix"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="TrustedCACertificates" type="xsd:anyURI" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>verweist auf ein Verzeichnis, das vertrauenswürdige CA (Zwischen-CA, Wurzel-CA) Zertifikate enthält.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="GenericConfiguration" minOccurs="0" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:attribute name="name" use="required">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="DirectoryCertStoreParameters.RootDir"/>
+ <xsd:enumeration value="AuthenticationSession.TimeOut"/>
+ <xsd:enumeration value="AuthenticationData.TimeOut"/>
+ <xsd:enumeration value="TrustManager.RevocationChecking"/>
+ <xsd:enumeration value="FrontendServlets.EnableHTTPConnection"/>
+ <xsd:enumeration value="FrontendServlets.DataURLPrefix"/>
+ <xsd:enumeration value="AuthenticationServer.KeepAssertion"/>
+ <xsd:enumeration value="AuthenticationServer.WriteAssertionToFile"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="value" type="xsd:string" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:complexType name="AuthComponentType">
+ <xsd:sequence>
+ <xsd:element name="BKUSelection" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterServerAuthType"/>
+ </xsd:sequence>
+ <xsd:attribute name="BKUSelectionAlternative" type="BKUSelectionType" use="optional" default="HTMLComplete"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Templates" type="TemplatesType" minOccurs="0"/>
+ <xsd:element name="SecurityLayer">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Kommunikation mit dem Security-Layer</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="TransformsInfo" type="TransformsInfoType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="MOA-SP">
+ <xsd:annotation>
+ <xsd:documentation>enthält Konfiguratiosnparameter für die Kommunikation mit dem MOA SP Modul</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die SOAP-Verbindung von der AUTH-Komponente zu MOA-SP; das Attribut URL enthält den Endpunkt des Server; wird das Schema "https" verwendet müssen die Kind-Elemente angegeben werden; wird das Schema "http" verwendet dürfen keine Kind-Elemente angegeben werden; wird das Element nicht verwendet dann wird MOA-SP über das API aufgerufen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="VerifyIdentityLink">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Überprüfung der Personenbindung</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="TrustProfileID"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="VerifyAuthBlock">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Überprüfung des AUTH-Blocks</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="TrustProfileID"/>
+ <xsd:element name="VerifyTransformsInfoProfileID" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="IdentityLinkSigners" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Informationen über akzeptierte Signers des IdentityLinks</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="X509SubjectName" type="xsd:string" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>akzeptierte Signer des IdentityLinks werden per X509SubjectName (Kodierung nach RFC 2253) identifiziert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="VerifyInfoboxes" type="VerifyInfoboxesType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Defaultparameter für die Überprüfung weiterer Infoboxen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="TransformsInfoType">
+ <xsd:annotation>
+ <xsd:documentation>das Attribut filename verweist auf eine Datei mit globalem Element TransformsInfo vom Typ sl10:TransformsInfo; diese TransformsInfo werden in den CreateXMLSignatureRequest für die Signatur des AUTH-Blocks inkludiert</xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="filename" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:complexType name="TemplatesType">
+ <xsd:sequence>
+ <xsd:element name="BKUSelectionTemplate" type="TemplateType" minOccurs="0"/>
+ <xsd:element name="Template" type="TemplateType" minOccurs="0"/>
+ <xsd:element name="InputProcessorSignTemplate" type="TemplateType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="TemplateType">
+ <xsd:annotation>
+ <xsd:documentation>das Attribut URL spezifiziert die Lage des Templates</xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="URL" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:complexType name="VerifyInfoboxesType">
+ <xsd:annotation>
+ <xsd:documentation>Verifikation zusätzlicher Infoboxen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="DefaultTrustProfile" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Optionales DefaultTrustprofil für die Überprüfung aller weiteren Infoboxen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="TrustProfileID"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Infobox" type="InfoboxType" minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Parameter für Überprüfung weiterer Infoboxen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="InfoboxType">
+ <xsd:annotation>
+ <xsd:documentation>Parameter zur Überprüfung einzelner Infoboxen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="FriendlyName" type="xsd:string" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>optionalervName, der für Fehlermeldungen verwendet werden soll; z.B.: "Stellvertretungen" für "Mandates"; fehlt dieser Parameter, dann wird das Identifier-Attribut verwendet</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="TrustProfileID" type="xsd:string" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>TrustProfil, das für die Überprüfung der Infobox verwendet werden soll</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="ValidatorClass" type="xsd:string" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Validatorklasse, die für die Prüfung der Infobox verwendet werden soll; muss gesetzt werden, wenn Package- und Klassenname vom Default Package- und Klassennamen abweichen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="SchemaLocations" type="SchemaLocationType" minOccurs="0"/>
+ <xsd:element name="ApplicationSpecificParameters" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Infobox spezifische Parameter, die der jeweiligen Prüfapplikation übergeben werden</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="skip" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ParepSpecificParameters" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Infobox spezifische Parameter, die der Prüfapplikation für berufliche Parteienvertretung übergeben werden. Dies ist logisch Teil der ApplicationSpecificParameters, kann jedoch aufgrund der Strukturierung validierend geparst werden und dadurch wird eine funktionierende Konfiguration bei Programmstart garantiert.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="CompatibilityMode" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Legt fest ob Machtgeber und Machtnehmer in den Anmeldedaten ausgetauscht werden sollen. Lediglich die übermittelte Vollmacht gibt dann Aufschluss darüber, dass eine Vertretung vorliegt. Ziel dieses Schalters ist, dass bisherige Applikationen mit Vollmachten und beruflicher Parteienvertretung nachgerüstet werden können, ohne der Erfordernis Änderungen durchführen zu müssen.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element ref="EnableInfoboxValidator" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Falls Infoboxinhalte für die berufliche Parteienvertretung in der Vollmachten Infobox "mandates" abgelegt werden und Vertretung für berufliche Parteienvertreter aktiviert ist, so kann mit diesem Schalter die Vollmachtsprüfung für normale Vollmachten deaktiviert werden. Damit wird erreicht, dass mittels der Vollmachten Infobox ausschließlich berufliche Parteienvertretung aktiviert ist. Dieser Schalter ist nur für die Vollmachten Infobox "mandates" relevant.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="PartyRepresentation" type="PartyRepresentationType">
+ <xsd:annotation>
+ <xsd:documentation>Eigentlicher Konfigurationsteil für berufliche Parteienvertretung</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="Identifier" type="xsd:string" use="required"/>
+ <xsd:attribute name="required" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideStammzahl" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideIdentityLink" type="xsd:boolean" use="optional" default="false"/>
+ </xsd:complexType>
+ <xsd:complexType name="SchemaLocationType">
+ <xsd:annotation>
+ <xsd:documentation>Spezifiziert die Lage von XML Schemas</xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="Schema" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:attribute name="namespace" type="xsd:anyURI" use="required"/>
+ <xsd:attribute name="schemaLocation" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ProxyComponentType"/>
+ <xsd:complexType name="OnlineApplicationType">
+ <xsd:sequence>
+ <xsd:element name="AuthComponent" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter über die OA, die die Authentisierungs-Komponente betreffen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <!--xsd:element name="IdentificationNumber" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="pr:AbstractSimpleIdentification"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element-->
+ <xsd:element name="IdentificationNumber" minOccurs="0">
+ <xsd:complexType>
+ <xsd:choice>
+ <xsd:element ref="pr:Firmenbuchnummer"/>
+ <xsd:element ref="pr:ZMRzahl"/>
+ <xsd:element ref="pr:Vereinsnummer"/>
+ <xsd:element ref="pr:ERJPZahl"/>
+ <xsd:element name="AnyNumber">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="Identifier" type="xsd:string" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Templates" type="TemplatesType" minOccurs="0"/>
+ <xsd:element name="TransformsInfo" type="TransformsInfoType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="VerifyInfoboxes" type="VerifyInfoboxesType" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="slVersion" use="optional" default="1.1">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="1.1"/>
+ <xsd:enumeration value="1.2"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="provideStammzahl" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideAUTHBlock" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideIdentityLink" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideCertificate" type="xsd:boolean" use="optional" default="false"/>
+ <!--xsd:element ref="pr:AbstractSimpleIdentification" minOccurs="0" maxOccurs="1"/-->
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ProxyComponent" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter über die OA, die die Proxy-Komponente betreffen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter über die OA, die die Proxy-Komponente betreffen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="configFileURL" type="xsd:anyURI" use="optional"/>
+ <xsd:attribute name="sessionTimeOut" type="xsd:int" use="optional"/>
+ <xsd:attribute name="loginParameterResolverImpl" type="xsd:string" use="optional"/>
+ <xsd:attribute name="loginParameterResolverConfiguration" type="xsd:string" use="optional"/>
+ <xsd:attribute name="connectionBuilderImpl" type="xsd:string" use="optional"/>
+ </xsd:complexType>
+ </xsd:element>
+ <!--xsd:element ref="pr:CorporateBody" minOccurs="0" maxOccurs="1"/-->
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ConnectionParameterServerAuthType">
+ <xsd:sequence>
+ <xsd:element name="AcceptedServerCertificates" type="xsd:anyURI" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>URL zu einem Verzeichnis, das akzeptierte Server-Zertifikate der TLS-Verbindung enthält (keine CA-Zertifikate)</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="URL" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:complexType name="ConnectionParameterClientAuthType">
+ <xsd:complexContent>
+ <xsd:extension base="ConnectionParameterServerAuthType">
+ <xsd:sequence>
+ <xsd:element name="ClientKeyStore" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>URL zu einem KeyStore, der den privaten Schlüssel, der für die TLS-Client-Authentisierung verwendet wird, enthält</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:anyURI">
+ <xsd:attribute name="password" type="xsd:string" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:element name="TrustProfileID" type="xsd:string"/>
+ <xsd:simpleType name="ChainingModeType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="chaining"/>
+ <xsd:enumeration value="pkix"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="BKUSelectionType">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="HTMLComplete"/>
+ <xsd:enumeration value="HTMLSelect"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:element name="CompatibilityMode" default="false">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:element name="EnableInfoboxValidator" default="true">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:element name="AlwaysShowForm" default="false">
+ <xsd:annotation>
+ <xsd:documentation>Soll nicht nur bei leerer oder standardisierter Vollmacht mit unvollständigen Daten, sondern beispielsweise zu Kontrollzwecken das Eingabeformular immer angezeigt werden, wenn ein Einschreiten durch berufliche Parteienvertretung geschieht so kann dies mittels dieses Schalters veranlasst werden</xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:complexType name="InputProcessorType">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="template" type="xsd:anyURI" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>Das Attribut spezifiziert die Lage des Templates, welches der InputProcessor zur Darstellung des Eingabeformulars nutzen soll</xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ <xsd:complexType name="PartyRepresentationType">
+ <xsd:sequence>
+ <xsd:element name="InputProcessor" type="InputProcessorType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Default InputProcessor. Konfiguration eines vom Standardprozess abweichenden Verarbeitungsvorgangs bei der beruflichen Parteienvertretung. Der Wert dieses Elements ist der vollständige Klassenname des InputProzessors</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element ref="AlwaysShowForm" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Default Wert für Formularanzeige. Soll nicht nur bei leerer oder standardisierter Vollmacht mit unvollständigen Daten, sondern beispielsweise zu Kontrollzwecken das Eingabeformular zur vervollständigung der Vertretenendaten immer angezeigt werden, wenn ein Einschreiten durch berufliche Parteienvertretung geschieht so kann dies mittels dieses Schalters veranlasst werden</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Default Verbindungsparameter zum SZR-Gateway (für den EGIZ-Demonstrator im internen Netzwerk: https://129.27.142.5:8443/szr-gateway/services/MandateCreation)</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="PartyRepresentative" type="PartyRepresentativeType" minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Falls keine speziellen beruflichen ParteienvertreterInnen definiert sind (Element kommt nicht vor), werden ausschließlich standardisierte Vollmachten mit einer MandateID="*" akzeptiert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="PartyRepresentativeType">
+ <xsd:sequence>
+ <xsd:element name="InputProcessor" type="InputProcessorType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Konfiguration eines vom Standardprozess abweichenden Verarbeitungsvorgangs bei der beruflichen Parteienvertretung. Der Wert dieses Elements ist der vollständige Klassenname des InputProzessors</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element ref="AlwaysShowForm" minOccurs="0"/>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Optionale Verbindungsparameter zu speziellem (SZR-)Gateway</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="oid" use="required">
+ <xsd:annotation>
+ <xsd:documentation>OID der Parteienvertretung lt. "Object Identifier der öffentlichen Verwaltung" - Konvention, Empfehlung. Diese ID muss mit der MandateID der übermittelten standardisierten Vollmacht übereinstimmen. Eine Parteienvertretung für standardisierte Vollmachten mit der MandateID "*" muss nicht definiert werden und erlaubt eine allgemeine berufliche Parteienvertretung mit Standardtexten. In anderen Fällen ist eine erlaubte OID mitttels dieses Attributs zu definieren</xsd:documentation>
+ </xsd:annotation>
+ <!--xsd:simpleType>
+ <xsd:restriction/>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="1.2.40.0.10.3.1"/>
+ <xsd:enumeration value="1.2.40.0.10.3.2"/>
+ <xsd:enumeration value="1.2.40.0.10.3.3"/>
+ <xsd:enumeration value="1.2.40.0.10.3.10"/>
+ <xsd:enumeration value="1.2.40.0.10.3.10.IdentifiedVoiceChannel"/>
+ </xsd:restriction>
+ </xsd:simpleType-->
+ </xsd:attribute>
+ <xsd:attribute name="representPhysicalParty" use="optional" default="false">
+ <xsd:annotation>
+ <xsd:documentation>Legt fest, ob berufliche Parteienvertretung für natürliche Personen erlaubt ist</xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="representCorporateParty" use="optional" default="false">
+ <xsd:annotation>
+ <xsd:documentation>Legt fest, ob berufliche Parteienvertretung für juristische Personen erlaubt ist (welche z.B. ein Organwalter nicht vertreten darf und dieser Wert aus diesem Grund dort false sein muss)</xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="representationText" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>Beschreibender Text, der an Stelle des Standardtexts bei der Signatur der Anmeldedaten im Falle einer vorliegenden beruflichen Parteienvertretung zur Signatur vorgelegt wird</xsd:documentation>
+ </xsd:annotation>
+ <!--xsd:simpleType>
+ <xsd:restriction/>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="berufsmäßige(r) Parteienvertreter(in) mit Notariatseigenschaft"/>
+ <xsd:enumeration value="berufsmäßige(r) Parteienvertreter(in) mit Rechtsanwaltseigenschaft"/>
+ <xsd:enumeration value="berufsmäßige(r) Parteienvertreter(in) mit Ziviltechnikerinneneigenschaft)"/>
+ <xsd:enumeration value="Organwalter"/>
+ <xsd:enumeration value="Parteienvertreter(in) über einen identifizierten Sprachkanal"/>
+ </xsd:restriction>
+ </xsd:simpleType-->
+ </xsd:attribute>
+ </xsd:complexType>
+</xsd:schema>
diff --git a/common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.4.3.xsd b/common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.4.3.xsd
new file mode 100644
index 000000000..570bebd37
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.4.3.xsd
@@ -0,0 +1,612 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns="http://www.buergerkarte.at/namespaces/moaconfig#" xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" targetNamespace="http://www.buergerkarte.at/namespaces/moaconfig#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.4.3">
+ <!-- es werden lokale Schemas referenziert für real aufgelöste Schemas bitte ersetzen: http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd -->
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd"/>
+ <xsd:import namespace="http://reference.e-government.gv.at/namespace/persondata/20020228#" schemaLocation="PersonData_20_en_moaWID.xsd"/>
+ <xsd:element name="Configuration">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="LoginType" type="LoginType" default="stateful"/>
+ <xsd:element name="Binding" minOccurs="0">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="full"/>
+ <xsd:enumeration value="userName"/>
+ <xsd:enumeration value="none"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:choice>
+ <xsd:element ref="ParamAuth"/>
+ <xsd:element ref="BasicAuth"/>
+ <xsd:element ref="HeaderAuth"/>
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:simpleType name="LoginType">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="stateless"/>
+ <xsd:enumeration value="stateful"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:element name="ParamAuth">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Parameter" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Parameter">
+ <xsd:complexType>
+ <xsd:attribute name="Name" type="xsd:token" use="required"/>
+ <xsd:attribute name="Value" type="MOAAuthDataType" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="BasicAuth">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="UserID" type="MOAAuthDataType"/>
+ <xsd:element name="Password" type="MOAAuthDataType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="HeaderAuth">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Header" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Header">
+ <xsd:complexType>
+ <xsd:attribute name="Name" type="xsd:token" use="required"/>
+ <xsd:attribute name="Value" type="MOAAuthDataType" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:simpleType name="MOAAuthDataType">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="MOAGivenName"/>
+ <xsd:enumeration value="MOAFamilyName"/>
+ <xsd:enumeration value="MOADateOfBirth"/>
+ <xsd:enumeration value="MOABPK"/>
+ <xsd:enumeration value="MOAWBPK"/>
+ <xsd:enumeration value="MOAPublicAuthority"/>
+ <xsd:enumeration value="MOABKZ"/>
+ <xsd:enumeration value="MOAQualifiedCertificate"/>
+ <xsd:enumeration value="MOAStammzahl"/>
+ <xsd:enumeration value="MOAIdentificationValueType"/>
+ <xsd:enumeration value="MOAIPAddress"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="MOAKeyBoxSelector">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="SecureSignatureKeypair"/>
+ <xsd:enumeration value="CertifiedKeypair"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <!--Konfiguration für Authentisierungs- und Proxy-Komponente und Online-Applikation-->
+ <xsd:element name="MOA-IDConfiguration">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="AuthComponent" type="AuthComponentType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter der Authentisierungs-Komponente</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="ProxyComponent" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Konfigurationsparameter der Proxy-Komponente</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="AuthComponent">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Kommunikation zw. Proxykomponente und Authenttisierungskomponente</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die SOAP-Verbindung von der Proxy-Komponente zur Auth-Komponente (vgl. AuthComponent/MOA-SP/ConnectionParameter)</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="OnlineApplication" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die OA</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="OnlineApplicationType">
+ <xsd:attribute name="publicURLPrefix" type="xsd:anyURI" use="required"/>
+ <xsd:attribute name="keyBoxIdentifier" type="MOAKeyBoxSelector" use="optional" default="SecureSignatureKeypair"/>
+ <xsd:attribute name="type" use="optional" default="publicService">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:NMTOKEN">
+ <xsd:enumeration value="businessService"/>
+ <xsd:enumeration value="publicService"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="calculateHPI" type="xsd:boolean" use="optional" default="false"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ChainingModes" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>spezifiziert den Algorithmus ("pkix" oder "chaining") für die Zertifikatspfadvalidierung</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="TrustAnchor">
+ <xsd:annotation>
+ <xsd:documentation>ein vom SystemDefaultMode abweichender ChiningMode kann für jeden TrustAnchor gesetzt werden</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="dsig:X509IssuerSerialType">
+ <xsd:attribute name="mode" type="ChainingModeType" use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="systemDefaultMode" type="ChainingModeType" use="optional" default="pkix"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="TrustedCACertificates" type="xsd:anyURI" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>verweist auf ein Verzeichnis, das vertrauenswürdige CA (Zwischen-CA, Wurzel-CA) Zertifikate enthält.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="GenericConfiguration" minOccurs="0" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:attribute name="name" use="required">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="DirectoryCertStoreParameters.RootDir"/>
+ <xsd:enumeration value="AuthenticationSession.TimeOut"/>
+ <xsd:enumeration value="AuthenticationData.TimeOut"/>
+ <xsd:enumeration value="TrustManager.RevocationChecking"/>
+ <xsd:enumeration value="FrontendServlets.EnableHTTPConnection"/>
+ <xsd:enumeration value="FrontendServlets.DataURLPrefix"/>
+ <xsd:enumeration value="AuthenticationServer.KeepAssertion"/>
+ <xsd:enumeration value="AuthenticationServer.WriteAssertionToFile"/>
+ <xsd:enumeration value="AuthenticationServer.SourceID"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="value" type="xsd:string" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:complexType name="AuthComponentType">
+ <xsd:sequence>
+ <xsd:element name="BKUSelection" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterServerAuthType"/>
+ </xsd:sequence>
+ <xsd:attribute name="BKUSelectionAlternative" type="BKUSelectionType" use="optional" default="HTMLComplete"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Templates" type="TemplatesType" minOccurs="0"/>
+ <xsd:element name="SecurityLayer">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Kommunikation mit dem Security-Layer</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="TransformsInfo" type="TransformsInfoType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="MOA-SP">
+ <xsd:annotation>
+ <xsd:documentation>enthält Konfiguratiosnparameter für die Kommunikation mit dem MOA SP Modul</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die SOAP-Verbindung von der AUTH-Komponente zu MOA-SP; das Attribut URL enthält den Endpunkt des Server; wird das Schema "https" verwendet müssen die Kind-Elemente angegeben werden; wird das Schema "http" verwendet dürfen keine Kind-Elemente angegeben werden; wird das Element nicht verwendet dann wird MOA-SP über das API aufgerufen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="VerifyIdentityLink">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Überprüfung der Personenbindung</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="TrustProfileID"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="VerifyAuthBlock">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Überprüfung des AUTH-Blocks</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="TrustProfileID"/>
+ <xsd:element name="VerifyTransformsInfoProfileID" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="IdentityLinkSigners" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Informationen über akzeptierte Signers des IdentityLinks</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="X509SubjectName" type="xsd:string" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>akzeptierte Signer des IdentityLinks werden per X509SubjectName (Kodierung nach RFC 2253) identifiziert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="VerifyInfoboxes" type="VerifyInfoboxesType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Defaultparameter für die Überprüfung weiterer Infoboxen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="TransformsInfoType">
+ <xsd:annotation>
+ <xsd:documentation>das Attribut filename verweist auf eine Datei mit globalem Element TransformsInfo vom Typ sl10:TransformsInfo; diese TransformsInfo werden in den CreateXMLSignatureRequest für die Signatur des AUTH-Blocks inkludiert</xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="filename" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:complexType name="TemplatesType">
+ <xsd:sequence>
+ <xsd:element name="BKUSelectionTemplate" type="TemplateType" minOccurs="0"/>
+ <xsd:element name="Template" type="TemplateType" minOccurs="0"/>
+ <xsd:element name="InputProcessorSignTemplate" type="TemplateType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="TemplateType">
+ <xsd:annotation>
+ <xsd:documentation>das Attribut URL spezifiziert die Lage des Templates</xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="URL" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:complexType name="VerifyInfoboxesType">
+ <xsd:annotation>
+ <xsd:documentation>Verifikation zusätzlicher Infoboxen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="DefaultTrustProfile" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Optionales DefaultTrustprofil für die Überprüfung aller weiteren Infoboxen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="TrustProfileID"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Infobox" type="InfoboxType" minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Parameter für Überprüfung weiterer Infoboxen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="InfoboxType">
+ <xsd:annotation>
+ <xsd:documentation>Parameter zur Überprüfung einzelner Infoboxen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="FriendlyName" type="xsd:string" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>optionalervName, der für Fehlermeldungen verwendet werden soll; z.B.: "Stellvertretungen" für "Mandates"; fehlt dieser Parameter, dann wird das Identifier-Attribut verwendet</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="TrustProfileID" type="xsd:string" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>TrustProfil, das für die Überprüfung der Infobox verwendet werden soll</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="ValidatorClass" type="xsd:string" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Validatorklasse, die für die Prüfung der Infobox verwendet werden soll; muss gesetzt werden, wenn Package- und Klassenname vom Default Package- und Klassennamen abweichen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="SchemaLocations" type="SchemaLocationType" minOccurs="0"/>
+ <xsd:element name="ApplicationSpecificParameters" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Infobox spezifische Parameter, die der jeweiligen Prüfapplikation übergeben werden</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="skip" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ParepSpecificParameters" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Infobox spezifische Parameter, die der Prüfapplikation für berufliche Parteienvertretung übergeben werden. Dies ist logisch Teil der ApplicationSpecificParameters, kann jedoch aufgrund der Strukturierung validierend geparst werden und dadurch wird eine funktionierende Konfiguration bei Programmstart garantiert.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="EnableInfoboxValidator" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Falls Infoboxinhalte für die berufliche Parteienvertretung in der Vollmachten Infobox "mandates" abgelegt werden und Vertretung für berufliche Parteienvertreter aktiviert ist, so kann mit diesem Schalter die Vollmachtsprüfung für normale Vollmachten deaktiviert werden. Damit wird erreicht, dass mittels der Vollmachten Infobox ausschließlich berufliche Parteienvertretung aktiviert ist. Dieser Schalter ist nur für die Vollmachten Infobox "mandates" relevant.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="PartyRepresentation" type="PartyRepresentationType">
+ <xsd:annotation>
+ <xsd:documentation>Eigentlicher Konfigurationsteil für berufliche Parteienvertretung</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="Identifier" type="xsd:string" use="required"/>
+ <xsd:attribute name="required" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideStammzahl" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideIdentityLink" type="xsd:boolean" use="optional" default="false"/>
+ </xsd:complexType>
+ <xsd:complexType name="SchemaLocationType">
+ <xsd:annotation>
+ <xsd:documentation>Spezifiziert die Lage von XML Schemas</xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="Schema" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:attribute name="namespace" type="xsd:anyURI" use="required"/>
+ <xsd:attribute name="schemaLocation" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ProxyComponentType"/>
+ <xsd:complexType name="OnlineApplicationType">
+ <xsd:sequence>
+ <xsd:element name="AuthComponent" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter über die OA, die die Authentisierungs-Komponente betreffen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <!--xsd:element name="IdentificationNumber" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="pr:AbstractSimpleIdentification"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element-->
+ <xsd:element name="IdentificationNumber" minOccurs="0">
+ <xsd:complexType>
+ <xsd:choice>
+ <xsd:element ref="pr:Firmenbuchnummer"/>
+ <xsd:element ref="pr:ZMRzahl"/>
+ <xsd:element ref="pr:Vereinsnummer"/>
+ <xsd:element ref="pr:ERJPZahl"/>
+ <xsd:element name="AnyNumber">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="Identifier" type="xsd:string" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Templates" type="TemplatesType" minOccurs="0"/>
+ <xsd:element name="TransformsInfo" type="TransformsInfoType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="VerifyInfoboxes" type="VerifyInfoboxesType" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="slVersion" use="optional" default="1.1">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="1.1"/>
+ <xsd:enumeration value="1.2"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="provideStammzahl" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideAUTHBlock" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideIdentityLink" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideCertificate" type="xsd:boolean" use="optional" default="false"/>
+ <!--xsd:element ref="pr:AbstractSimpleIdentification" minOccurs="0" maxOccurs="1"/-->
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ProxyComponent" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter über die OA, die die Proxy-Komponente betreffen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter über die OA, die die Proxy-Komponente betreffen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="configFileURL" type="xsd:anyURI" use="optional"/>
+ <xsd:attribute name="sessionTimeOut" type="xsd:int" use="optional"/>
+ <xsd:attribute name="loginParameterResolverImpl" type="xsd:string" use="optional"/>
+ <xsd:attribute name="loginParameterResolverConfiguration" type="xsd:string" use="optional"/>
+ <xsd:attribute name="connectionBuilderImpl" type="xsd:string" use="optional"/>
+ </xsd:complexType>
+ </xsd:element>
+ <!--xsd:element ref="pr:CorporateBody" minOccurs="0" maxOccurs="1"/-->
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ConnectionParameterServerAuthType">
+ <xsd:sequence>
+ <xsd:element name="AcceptedServerCertificates" type="xsd:anyURI" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>URL zu einem Verzeichnis, das akzeptierte Server-Zertifikate der TLS-Verbindung enthält (keine CA-Zertifikate)</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="URL" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:complexType name="ConnectionParameterClientAuthType">
+ <xsd:complexContent>
+ <xsd:extension base="ConnectionParameterServerAuthType">
+ <xsd:sequence>
+ <xsd:element name="ClientKeyStore" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>URL zu einem KeyStore, der den privaten Schlüssel, der für die TLS-Client-Authentisierung verwendet wird, enthält</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:anyURI">
+ <xsd:attribute name="password" type="xsd:string" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:element name="TrustProfileID" type="xsd:string"/>
+ <xsd:simpleType name="ChainingModeType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="chaining"/>
+ <xsd:enumeration value="pkix"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="BKUSelectionType">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="HTMLComplete"/>
+ <xsd:enumeration value="HTMLSelect"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:element name="CompatibilityMode" default="false">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:element name="EnableInfoboxValidator" default="true">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:element name="AlwaysShowForm" default="false">
+ <xsd:annotation>
+ <xsd:documentation>Soll nicht nur bei leerer oder standardisierter Vollmacht mit unvollständigen Daten, sondern beispielsweise zu Kontrollzwecken das Eingabeformular immer angezeigt werden, wenn ein Einschreiten durch berufliche Parteienvertretung geschieht so kann dies mittels dieses Schalters veranlasst werden</xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:complexType name="InputProcessorType">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="template" type="xsd:anyURI" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>Das Attribut spezifiziert die Lage des Templates, welches der InputProcessor zur Darstellung des Eingabeformulars nutzen soll</xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ <xsd:complexType name="PartyRepresentationType">
+ <xsd:sequence>
+ <xsd:element name="InputProcessor" type="InputProcessorType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Default InputProcessor. Konfiguration eines vom Standardprozess abweichenden Verarbeitungsvorgangs bei der beruflichen Parteienvertretung. Der Wert dieses Elements ist der vollständige Klassenname des InputProzessors</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element ref="AlwaysShowForm" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Default Wert für Formularanzeige. Soll nicht nur bei leerer oder standardisierter Vollmacht mit unvollständigen Daten, sondern beispielsweise zu Kontrollzwecken das Eingabeformular zur vervollständigung der Vertretenendaten immer angezeigt werden, wenn ein Einschreiten durch berufliche Parteienvertretung geschieht so kann dies mittels dieses Schalters veranlasst werden</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Default Verbindungsparameter zum SZR-Gateway (für den EGIZ-Demonstrator im internen Netzwerk: https://129.27.142.5:8443/szr-gateway/services/MandateCreation)</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="PartyRepresentative" type="PartyRepresentativeType" minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Falls keine speziellen beruflichen ParteienvertreterInnen definiert sind (Element kommt nicht vor), werden ausschließlich standardisierte Vollmachten mit einer MandateID="*" akzeptiert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="PartyRepresentativeType">
+ <xsd:sequence>
+ <xsd:element name="InputProcessor" type="InputProcessorType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Konfiguration eines vom Standardprozess abweichenden Verarbeitungsvorgangs bei der beruflichen Parteienvertretung. Der Wert dieses Elements ist der vollständige Klassenname des InputProzessors</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element ref="AlwaysShowForm" minOccurs="0"/>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Optionale Verbindungsparameter zu speziellem (SZR-)Gateway</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="oid" use="required">
+ <xsd:annotation>
+ <xsd:documentation>OID der Parteienvertretung lt. "Object Identifier der öffentlichen Verwaltung" - Konvention, Empfehlung. Diese ID muss mit der MandateID der übermittelten standardisierten Vollmacht übereinstimmen. Eine Parteienvertretung für standardisierte Vollmachten mit der MandateID "*" muss nicht definiert werden und erlaubt eine allgemeine berufliche Parteienvertretung mit Standardtexten. In anderen Fällen ist eine erlaubte OID mitttels dieses Attributs zu definieren</xsd:documentation>
+ </xsd:annotation>
+ <!--xsd:simpleType>
+ <xsd:restriction/>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="1.2.40.0.10.3.1"/>
+ <xsd:enumeration value="1.2.40.0.10.3.2"/>
+ <xsd:enumeration value="1.2.40.0.10.3.3"/>
+ <xsd:enumeration value="1.2.40.0.10.3.10"/>
+ <xsd:enumeration value="1.2.40.0.10.3.10.IdentifiedVoiceChannel"/>
+ </xsd:restriction>
+ </xsd:simpleType-->
+ </xsd:attribute>
+ <xsd:attribute name="representPhysicalParty" use="optional" default="false">
+ <xsd:annotation>
+ <xsd:documentation>Legt fest, ob berufliche Parteienvertretung für natürliche Personen erlaubt ist</xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="representCorporateParty" use="optional" default="false">
+ <xsd:annotation>
+ <xsd:documentation>Legt fest, ob berufliche Parteienvertretung für juristische Personen erlaubt ist (welche z.B. ein Organwalter nicht vertreten darf und dieser Wert aus diesem Grund dort false sein muss)</xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="representationText" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>Beschreibender Text, der an Stelle des Standardtexts bei der Signatur der Anmeldedaten im Falle einer vorliegenden beruflichen Parteienvertretung zur Signatur vorgelegt wird</xsd:documentation>
+ </xsd:annotation>
+ <!--xsd:simpleType>
+ <xsd:restriction/>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="berufsmäßige(r) Parteienvertreter(in) mit Notariatseigenschaft"/>
+ <xsd:enumeration value="berufsmäßige(r) Parteienvertreter(in) mit Rechtsanwaltseigenschaft"/>
+ <xsd:enumeration value="berufsmäßige(r) Parteienvertreter(in) mit Ziviltechnikerinneneigenschaft)"/>
+ <xsd:enumeration value="Organwalter"/>
+ <xsd:enumeration value="Parteienvertreter(in) über einen identifizierten Sprachkanal"/>
+ </xsd:restriction>
+ </xsd:simpleType-->
+ </xsd:attribute>
+ </xsd:complexType>
+</xsd:schema>
diff --git a/common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.4.7.xsd b/common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.4.7.xsd
new file mode 100644
index 000000000..dffca2167
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.4.7.xsd
@@ -0,0 +1,625 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- edited with XMLSpy v2010 (http://www.altova.com) by ks (ks) -->
+<xsd:schema xmlns="http://www.buergerkarte.at/namespaces/moaconfig#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.buergerkarte.at/namespaces/moaconfig#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.4.3">
+ <!-- es werden lokale Schemas referenziert für real aufgelöste Schemas bitte ersetzen: http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd -->
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd"/>
+ <xsd:import namespace="http://reference.e-government.gv.at/namespace/persondata/20020228#" schemaLocation="PersonData_20_en_moaWID.xsd"/>
+ <xsd:element name="Configuration">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="LoginType" type="LoginType" default="stateful"/>
+ <xsd:element name="Binding" minOccurs="0">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="full"/>
+ <xsd:enumeration value="userName"/>
+ <xsd:enumeration value="none"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:choice>
+ <xsd:element ref="ParamAuth"/>
+ <xsd:element ref="BasicAuth"/>
+ <xsd:element ref="HeaderAuth"/>
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:simpleType name="LoginType">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="stateless"/>
+ <xsd:enumeration value="stateful"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:element name="ParamAuth">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Parameter" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Parameter">
+ <xsd:complexType>
+ <xsd:attribute name="Name" type="xsd:token" use="required"/>
+ <xsd:attribute name="Value" type="MOAAuthDataType" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="BasicAuth">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="UserID" type="MOAAuthDataType"/>
+ <xsd:element name="Password" type="MOAAuthDataType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="HeaderAuth">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Header" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Header">
+ <xsd:complexType>
+ <xsd:attribute name="Name" type="xsd:token" use="required"/>
+ <xsd:attribute name="Value" type="MOAAuthDataType" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:simpleType name="MOAAuthDataType">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="MOAGivenName"/>
+ <xsd:enumeration value="MOAFamilyName"/>
+ <xsd:enumeration value="MOADateOfBirth"/>
+ <xsd:enumeration value="MOABPK"/>
+ <xsd:enumeration value="MOAWBPK"/>
+ <xsd:enumeration value="MOAPublicAuthority"/>
+ <xsd:enumeration value="MOABKZ"/>
+ <xsd:enumeration value="MOAQualifiedCertificate"/>
+ <xsd:enumeration value="MOAStammzahl"/>
+ <xsd:enumeration value="MOAIdentificationValueType"/>
+ <xsd:enumeration value="MOAIPAddress"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="MOAKeyBoxSelector">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="SecureSignatureKeypair"/>
+ <xsd:enumeration value="CertifiedKeypair"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <!--Konfiguration für Authentisierungs- und Proxy-Komponente und Online-Applikation-->
+ <xsd:element name="MOA-IDConfiguration">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="AuthComponent" type="AuthComponentType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter der Authentisierungs-Komponente</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="ProxyComponent" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Konfigurationsparameter der Proxy-Komponente</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="AuthComponent">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Kommunikation zw. Proxykomponente und Authenttisierungskomponente</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die SOAP-Verbindung von der Proxy-Komponente zur Auth-Komponente (vgl. AuthComponent/MOA-SP/ConnectionParameter)</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="OnlineApplication" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die OA</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="OnlineApplicationType">
+ <xsd:attribute name="publicURLPrefix" type="xsd:anyURI" use="required"/>
+ <xsd:attribute name="keyBoxIdentifier" type="MOAKeyBoxSelector" use="optional" default="SecureSignatureKeypair"/>
+ <xsd:attribute name="type" use="optional" default="publicService">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:NMTOKEN">
+ <xsd:enumeration value="businessService"/>
+ <xsd:enumeration value="publicService"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="calculateHPI" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="friendlyName" type="xsd:string" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ChainingModes" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>spezifiziert den Algorithmus (&quot;pkix&quot; oder &quot;chaining&quot;) für die Zertifikatspfadvalidierung</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="TrustAnchor">
+ <xsd:annotation>
+ <xsd:documentation>ein vom SystemDefaultMode abweichender ChiningMode kann für jeden TrustAnchor gesetzt werden</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="dsig:X509IssuerSerialType">
+ <xsd:attribute name="mode" type="ChainingModeType" use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="systemDefaultMode" type="ChainingModeType" use="optional" default="pkix"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="TrustedCACertificates" type="xsd:anyURI" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>verweist auf ein Verzeichnis, das vertrauenswürdige CA (Zwischen-CA, Wurzel-CA) Zertifikate enthält.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="GenericConfiguration" minOccurs="0" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:attribute name="name" use="required">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="DirectoryCertStoreParameters.RootDir"/>
+ <xsd:enumeration value="AuthenticationSession.TimeOut"/>
+ <xsd:enumeration value="AuthenticationData.TimeOut"/>
+ <xsd:enumeration value="TrustManager.RevocationChecking"/>
+ <xsd:enumeration value="FrontendServlets.EnableHTTPConnection"/>
+ <xsd:enumeration value="FrontendServlets.DataURLPrefix"/>
+ <xsd:enumeration value="AuthenticationServer.KeepAssertion"/>
+ <xsd:enumeration value="AuthenticationServer.WriteAssertionToFile"/>
+ <xsd:enumeration value="AuthenticationServer.SourceID"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="value" type="xsd:string" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:complexType name="AuthComponentType">
+ <xsd:sequence>
+ <xsd:element name="BKUSelection" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterServerAuthType"/>
+ </xsd:sequence>
+ <xsd:attribute name="BKUSelectionAlternative" type="BKUSelectionType" use="optional" default="HTMLComplete"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Templates" type="TemplatesType" minOccurs="0"/>
+ <xsd:element name="SecurityLayer">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Kommunikation mit dem Security-Layer</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="TransformsInfo" type="TransformsInfoType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="MOA-SP">
+ <xsd:annotation>
+ <xsd:documentation>enthält Konfiguratiosnparameter für die Kommunikation mit dem MOA SP Modul</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die SOAP-Verbindung von der AUTH-Komponente zu MOA-SP; das Attribut URL enthält den Endpunkt des Server; wird das Schema &quot;https&quot; verwendet müssen die Kind-Elemente angegeben werden; wird das Schema &quot;http&quot; verwendet dürfen keine Kind-Elemente angegeben werden; wird das Element nicht verwendet dann wird MOA-SP über das API aufgerufen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="VerifyIdentityLink">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Überprüfung der Personenbindung</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="TrustProfileID"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="VerifyAuthBlock">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Überprüfung des AUTH-Blocks</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="TrustProfileID"/>
+ <xsd:element name="VerifyTransformsInfoProfileID" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="IdentityLinkSigners" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Informationen über akzeptierte Signers des IdentityLinks</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="X509SubjectName" type="xsd:string" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>akzeptierte Signer des IdentityLinks werden per X509SubjectName (Kodierung nach RFC 2253) identifiziert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="VerifyInfoboxes" type="VerifyInfoboxesType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Defaultparameter für die Überprüfung weiterer Infoboxen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="ForeignIdentities" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType">
+ <xsd:annotation>
+ <xsd:documentation>Default Verbindungsparameter zum SZR-Gateway (GetIdentityLink)</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="TransformsInfoType">
+ <xsd:annotation>
+ <xsd:documentation>das Attribut filename verweist auf eine Datei mit globalem Element TransformsInfo vom Typ sl10:TransformsInfo; diese TransformsInfo werden in den CreateXMLSignatureRequest für die Signatur des AUTH-Blocks inkludiert</xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="filename" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:complexType name="TemplatesType">
+ <xsd:sequence>
+ <xsd:element name="BKUSelectionTemplate" type="TemplateType" minOccurs="0"/>
+ <xsd:element name="Template" type="TemplateType" minOccurs="0"/>
+ <xsd:element name="InputProcessorSignTemplate" type="TemplateType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="TemplateType">
+ <xsd:annotation>
+ <xsd:documentation>das Attribut URL spezifiziert die Lage des Templates</xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="URL" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:complexType name="VerifyInfoboxesType">
+ <xsd:annotation>
+ <xsd:documentation>Verifikation zusätzlicher Infoboxen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="DefaultTrustProfile" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Optionales DefaultTrustprofil für die Überprüfung aller weiteren Infoboxen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="TrustProfileID"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Infobox" type="InfoboxType" minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Parameter für Überprüfung weiterer Infoboxen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="InfoboxType">
+ <xsd:annotation>
+ <xsd:documentation>Parameter zur Überprüfung einzelner Infoboxen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="FriendlyName" type="xsd:string" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>optionalervName, der für Fehlermeldungen verwendet werden soll; z.B.: &quot;Stellvertretungen&quot; für &quot;Mandates&quot;; fehlt dieser Parameter, dann wird das Identifier-Attribut verwendet</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="TrustProfileID" type="xsd:string" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>TrustProfil, das für die Überprüfung der Infobox verwendet werden soll</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="ValidatorClass" type="xsd:string" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Validatorklasse, die für die Prüfung der Infobox verwendet werden soll; muss gesetzt werden, wenn Package- und Klassenname vom Default Package- und Klassennamen abweichen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="SchemaLocations" type="SchemaLocationType" minOccurs="0"/>
+ <xsd:element name="ApplicationSpecificParameters" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Infobox spezifische Parameter, die der jeweiligen Prüfapplikation übergeben werden</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="skip" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ParepSpecificParameters" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Infobox spezifische Parameter, die der Prüfapplikation für berufliche Parteienvertretung übergeben werden. Dies ist logisch Teil der ApplicationSpecificParameters, kann jedoch aufgrund der Strukturierung validierend geparst werden und dadurch wird eine funktionierende Konfiguration bei Programmstart garantiert.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="EnableInfoboxValidator" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Falls Infoboxinhalte für die berufliche Parteienvertretung in der Vollmachten Infobox &quot;mandates&quot; abgelegt werden und Vertretung für berufliche Parteienvertreter aktiviert ist, so kann mit diesem Schalter die Vollmachtsprüfung für normale Vollmachten deaktiviert werden. Damit wird erreicht, dass mittels der Vollmachten Infobox ausschließlich berufliche Parteienvertretung aktiviert ist. Dieser Schalter ist nur für die Vollmachten Infobox &quot;mandates&quot; relevant.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="PartyRepresentation" type="PartyRepresentationType">
+ <xsd:annotation>
+ <xsd:documentation>Eigentlicher Konfigurationsteil für berufliche Parteienvertretung</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="Identifier" type="xsd:string" use="required"/>
+ <xsd:attribute name="required" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideStammzahl" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideIdentityLink" type="xsd:boolean" use="optional" default="false"/>
+ </xsd:complexType>
+ <xsd:complexType name="SchemaLocationType">
+ <xsd:annotation>
+ <xsd:documentation>Spezifiziert die Lage von XML Schemas</xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="Schema" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:attribute name="namespace" type="xsd:anyURI" use="required"/>
+ <xsd:attribute name="schemaLocation" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ProxyComponentType"/>
+ <xsd:complexType name="OnlineApplicationType">
+ <xsd:sequence>
+ <xsd:element name="AuthComponent" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter über die OA, die die Authentisierungs-Komponente betreffen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <!--xsd:element name="IdentificationNumber" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="pr:AbstractSimpleIdentification"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element-->
+ <xsd:element name="IdentificationNumber" minOccurs="0">
+ <xsd:complexType>
+ <xsd:choice>
+ <xsd:element ref="pr:Firmenbuchnummer"/>
+ <xsd:element ref="pr:ZMRzahl"/>
+ <xsd:element ref="pr:Vereinsnummer"/>
+ <xsd:element ref="pr:ERJPZahl"/>
+ <xsd:element name="AnyNumber">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="Identifier" type="xsd:string" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Templates" type="TemplatesType" minOccurs="0"/>
+ <xsd:element name="TransformsInfo" type="TransformsInfoType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="VerifyInfoboxes" type="VerifyInfoboxesType" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="slVersion" use="optional" default="1.1">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="1.1"/>
+ <xsd:enumeration value="1.2"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="provideStammzahl" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideAUTHBlock" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideIdentityLink" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideCertificate" type="xsd:boolean" use="optional" default="false"/>
+ <!--xsd:element ref="pr:AbstractSimpleIdentification" minOccurs="0" maxOccurs="1"/-->
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ProxyComponent" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter über die OA, die die Proxy-Komponente betreffen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter über die OA, die die Proxy-Komponente betreffen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="configFileURL" type="xsd:anyURI" use="optional"/>
+ <xsd:attribute name="sessionTimeOut" type="xsd:int" use="optional"/>
+ <xsd:attribute name="loginParameterResolverImpl" type="xsd:string" use="optional"/>
+ <xsd:attribute name="loginParameterResolverConfiguration" type="xsd:string" use="optional"/>
+ <xsd:attribute name="connectionBuilderImpl" type="xsd:string" use="optional"/>
+ </xsd:complexType>
+ </xsd:element>
+ <!--xsd:element ref="pr:CorporateBody" minOccurs="0" maxOccurs="1"/-->
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ConnectionParameterServerAuthType">
+ <xsd:sequence>
+ <xsd:element name="AcceptedServerCertificates" type="xsd:anyURI" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>URL zu einem Verzeichnis, das akzeptierte Server-Zertifikate der TLS-Verbindung enthält (keine CA-Zertifikate)</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="URL" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:complexType name="ConnectionParameterClientAuthType">
+ <xsd:complexContent>
+ <xsd:extension base="ConnectionParameterServerAuthType">
+ <xsd:sequence>
+ <xsd:element name="ClientKeyStore" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>URL zu einem KeyStore, der den privaten Schlüssel, der für die TLS-Client-Authentisierung verwendet wird, enthält</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:anyURI">
+ <xsd:attribute name="password" type="xsd:string" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:element name="TrustProfileID" type="xsd:string"/>
+ <xsd:simpleType name="ChainingModeType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="chaining"/>
+ <xsd:enumeration value="pkix"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="BKUSelectionType">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="HTMLComplete"/>
+ <xsd:enumeration value="HTMLSelect"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:element name="CompatibilityMode" default="false">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:element name="EnableInfoboxValidator" default="true">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:element name="AlwaysShowForm" default="false">
+ <xsd:annotation>
+ <xsd:documentation>Soll nicht nur bei leerer oder standardisierter Vollmacht mit unvollständigen Daten, sondern beispielsweise zu Kontrollzwecken das Eingabeformular immer angezeigt werden, wenn ein Einschreiten durch berufliche Parteienvertretung geschieht so kann dies mittels dieses Schalters veranlasst werden</xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:complexType name="InputProcessorType">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="template" type="xsd:anyURI" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>Das Attribut spezifiziert die Lage des Templates, welches der InputProcessor zur Darstellung des Eingabeformulars nutzen soll</xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ <xsd:complexType name="PartyRepresentationType">
+ <xsd:sequence>
+ <xsd:element name="InputProcessor" type="InputProcessorType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Default InputProcessor. Konfiguration eines vom Standardprozess abweichenden Verarbeitungsvorgangs bei der beruflichen Parteienvertretung. Der Wert dieses Elements ist der vollständige Klassenname des InputProzessors</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element ref="AlwaysShowForm" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Default Wert für Formularanzeige. Soll nicht nur bei leerer oder standardisierter Vollmacht mit unvollständigen Daten, sondern beispielsweise zu Kontrollzwecken das Eingabeformular zur vervollständigung der Vertretenendaten immer angezeigt werden, wenn ein Einschreiten durch berufliche Parteienvertretung geschieht so kann dies mittels dieses Schalters veranlasst werden</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Default Verbindungsparameter zum SZR-Gateway (für den EGIZ-Demonstrator im internen Netzwerk: https://129.27.142.5:8443/szr-gateway/services/MandateCreation)</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="PartyRepresentative" type="PartyRepresentativeType" minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Falls keine speziellen beruflichen ParteienvertreterInnen definiert sind (Element kommt nicht vor), werden ausschließlich standardisierte Vollmachten mit einer MandateID=&quot;*&quot; akzeptiert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="PartyRepresentativeType">
+ <xsd:sequence>
+ <xsd:element name="InputProcessor" type="InputProcessorType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Konfiguration eines vom Standardprozess abweichenden Verarbeitungsvorgangs bei der beruflichen Parteienvertretung. Der Wert dieses Elements ist der vollständige Klassenname des InputProzessors</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element ref="AlwaysShowForm" minOccurs="0"/>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Optionale Verbindungsparameter zu speziellem (SZR-)Gateway</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="oid" use="required">
+ <xsd:annotation>
+ <xsd:documentation>OID der Parteienvertretung lt. &quot;Object Identifier der öffentlichen Verwaltung&quot; - Konvention, Empfehlung. Diese ID muss mit der MandateID der übermittelten standardisierten Vollmacht übereinstimmen. Eine Parteienvertretung für standardisierte Vollmachten mit der MandateID &quot;*&quot; muss nicht definiert werden und erlaubt eine allgemeine berufliche Parteienvertretung mit Standardtexten. In anderen Fällen ist eine erlaubte OID mitttels dieses Attributs zu definieren</xsd:documentation>
+ </xsd:annotation>
+ <!--xsd:simpleType>
+ <xsd:restriction/>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="1.2.40.0.10.3.1"/>
+ <xsd:enumeration value="1.2.40.0.10.3.2"/>
+ <xsd:enumeration value="1.2.40.0.10.3.3"/>
+ <xsd:enumeration value="1.2.40.0.10.3.10"/>
+ <xsd:enumeration value="1.2.40.0.10.3.10.IdentifiedVoiceChannel"/>
+ </xsd:restriction>
+ </xsd:simpleType-->
+ </xsd:attribute>
+ <xsd:attribute name="representPhysicalParty" use="optional" default="false">
+ <xsd:annotation>
+ <xsd:documentation>Legt fest, ob berufliche Parteienvertretung für natürliche Personen erlaubt ist</xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="representCorporateParty" use="optional" default="false">
+ <xsd:annotation>
+ <xsd:documentation>Legt fest, ob berufliche Parteienvertretung für juristische Personen erlaubt ist (welche z.B. ein Organwalter nicht vertreten darf und dieser Wert aus diesem Grund dort false sein muss)</xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="representationText" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>Beschreibender Text, der an Stelle des Standardtexts bei der Signatur der Anmeldedaten im Falle einer vorliegenden beruflichen Parteienvertretung zur Signatur vorgelegt wird</xsd:documentation>
+ </xsd:annotation>
+ <!--xsd:simpleType>
+ <xsd:restriction/>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="berufsmäßige(r) Parteienvertreter(in) mit Notariatseigenschaft"/>
+ <xsd:enumeration value="berufsmäßige(r) Parteienvertreter(in) mit Rechtsanwaltseigenschaft"/>
+ <xsd:enumeration value="berufsmäßige(r) Parteienvertreter(in) mit Ziviltechnikerinneneigenschaft)"/>
+ <xsd:enumeration value="Organwalter"/>
+ <xsd:enumeration value="Parteienvertreter(in) über einen identifizierten Sprachkanal"/>
+ </xsd:restriction>
+ </xsd:simpleType-->
+ </xsd:attribute>
+ </xsd:complexType>
+</xsd:schema>
diff --git a/common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.4.xsd b/common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.4.xsd
new file mode 100644
index 000000000..66a9c0ed4
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.4.xsd
@@ -0,0 +1,505 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) by Rudolf Schamberger (Stabsstelle IKT-Strategie) (Bundesrechenzentrum GmbH) -->
+<xsd:schema xmlns="http://www.buergerkarte.at/namespaces/moaconfig#" xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" targetNamespace="http://www.buergerkarte.at/namespaces/moaconfig#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.1.1">
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
+ <xsd:import namespace="http://reference.e-government.gv.at/namespace/persondata/20020228#" schemaLocation="PersonData_20_en_moaWID.xsd"/>
+ <xsd:element name="Configuration">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="LoginType" type="LoginType" default="stateful"/>
+ <xsd:element name="Binding" minOccurs="0">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="full"/>
+ <xsd:enumeration value="userName"/>
+ <xsd:enumeration value="none"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:choice>
+ <xsd:element ref="ParamAuth"/>
+ <xsd:element ref="BasicAuth"/>
+ <xsd:element ref="HeaderAuth"/>
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:simpleType name="LoginType">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="stateless"/>
+ <xsd:enumeration value="stateful"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:element name="ParamAuth">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Parameter" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Parameter">
+ <xsd:complexType>
+ <xsd:attribute name="Name" type="xsd:token" use="required"/>
+ <xsd:attribute name="Value" type="MOAAuthDataType" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="BasicAuth">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="UserID" type="MOAAuthDataType"/>
+ <xsd:element name="Password" type="MOAAuthDataType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="HeaderAuth">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Header" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Header">
+ <xsd:complexType>
+ <xsd:attribute name="Name" type="xsd:token" use="required"/>
+ <xsd:attribute name="Value" type="MOAAuthDataType" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:simpleType name="MOAAuthDataType">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="MOAGivenName"/>
+ <xsd:enumeration value="MOAFamilyName"/>
+ <xsd:enumeration value="MOADateOfBirth"/>
+ <xsd:enumeration value="MOABPK"/>
+ <xsd:enumeration value="MOAWBPK"/>
+ <xsd:enumeration value="MOAPublicAuthority"/>
+ <xsd:enumeration value="MOABKZ"/>
+ <xsd:enumeration value="MOAQualifiedCertificate"/>
+ <xsd:enumeration value="MOAStammzahl"/>
+ <xsd:enumeration value="MOAIdentificationValueType"/>
+ <xsd:enumeration value="MOAIPAddress"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="MOAKeyBoxSelector">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="SecureSignatureKeypair"/>
+ <xsd:enumeration value="CertifiedKeypair"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <!--Konfiguration für Authentisierungs- und Proxy-Komponente und Online-Applikation-->
+ <xsd:element name="MOA-IDConfiguration">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="AuthComponent" type="AuthComponentType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter der
+ Authentisierungs-Komponente</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="ProxyComponent" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Konfigurationsparameter der
+ Proxy-Komponente</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="AuthComponent">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Kommunikation zw.
+ Proxykomponente und Authenttisierungskomponente</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die SOAP-Verbindung von der
+ Proxy-Komponente zur Auth-Komponente (vgl.
+ AuthComponent/MOA-SP/ConnectionParameter)</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="OnlineApplication" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die OA</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="OnlineApplicationType">
+ <xsd:attribute name="publicURLPrefix" type="xsd:anyURI" use="required"/>
+ <xsd:attribute name="keyBoxIdentifier" type="MOAKeyBoxSelector" use="optional" default="SecureSignatureKeypair"/>
+ <xsd:attribute name="type" use="optional" default="publicService">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:NMTOKEN">
+ <xsd:enumeration value="businessService"/>
+ <xsd:enumeration value="publicService"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="calculateHPI" type="xsd:boolean" use="optional" default="false"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ChainingModes" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>spezifiziert den Algorithmus ("pkix" oder "chaining") für die
+ Zertifikatspfadvalidierung</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="TrustAnchor">
+ <xsd:annotation>
+ <xsd:documentation>ein vom SystemDefaultMode abweichender ChiningMode kann
+ für jeden TrustAnchor gesetzt werden</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="dsig:X509IssuerSerialType">
+ <xsd:attribute name="mode" type="ChainingModeType" use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="systemDefaultMode" type="ChainingModeType" use="optional" default="pkix"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="TrustedCACertificates" type="xsd:anyURI" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>verweist auf ein Verzeichnis, das vertrauenswürdige CA
+ (Zwischen-CA, Wurzel-CA) Zertifikate enthält.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="GenericConfiguration" minOccurs="0" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:attribute name="name" use="required">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="DirectoryCertStoreParameters.RootDir"/>
+ <xsd:enumeration value="AuthenticationSession.TimeOut"/>
+ <xsd:enumeration value="AuthenticationData.TimeOut"/>
+ <xsd:enumeration value="TrustManager.RevocationChecking"/>
+ <xsd:enumeration value="FrontendServlets.EnableHTTPConnection"/>
+ <xsd:enumeration value="FrontendServlets.DataURLPrefix"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="value" type="xsd:string" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:complexType name="AuthComponentType">
+ <xsd:sequence>
+ <xsd:element name="BKUSelection" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterServerAuthType"/>
+ </xsd:sequence>
+ <xsd:attribute name="BKUSelectionAlternative" type="BKUSelectionType" use="optional" default="HTMLComplete"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Templates" type="TemplatesType" minOccurs="0"/>
+ <xsd:element name="SecurityLayer">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Kommunikation mit dem
+ Security-Layer</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="TransformsInfo" type="TransformsInfoType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="MOA-SP">
+ <xsd:annotation>
+ <xsd:documentation>enthält Konfiguratiosnparameter für die Kommunikation mit dem MOA
+ SP Modul</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die SOAP-Verbindung von der
+ AUTH-Komponente zu MOA-SP; das Attribut URL enthält den Endpunkt des Server;
+ wird das Schema "https" verwendet müssen die Kind-Elemente angegeben werden;
+ wird das Schema "http" verwendet dürfen keine Kind-Elemente angegeben
+ werden; wird das Element nicht verwendet dann wird MOA-SP über das API
+ aufgerufen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="VerifyIdentityLink">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Überprüfung der
+ Personenbindung</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="TrustProfileID"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="VerifyAuthBlock">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Überprüfung des
+ AUTH-Blocks</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="TrustProfileID"/>
+ <xsd:element name="VerifyTransformsInfoProfileID" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="IdentityLinkSigners" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Informationen über akzeptierte Signers des
+ IdentityLinks</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="X509SubjectName" type="xsd:string" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>akzeptierte Signer des IdentityLinks werden per
+ X509SubjectName (Kodierung nach RFC 2253) identifiziert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="VerifyInfoboxes" type="VerifyInfoboxesType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Defaultparameter für die Überprüfung weiterer Infoboxen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="TransformsInfoType">
+ <xsd:annotation>
+ <xsd:documentation>das Attribut filename verweist auf eine Datei mit globalem
+ Element TransformsInfo vom Typ sl10:TransformsInfo; diese TransformsInfo
+ werden in den CreateXMLSignatureRequest für die Signatur des AUTH-Blocks
+ inkludiert</xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="filename" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:complexType name="TemplatesType">
+ <xsd:sequence>
+ <xsd:element name="BKUSelectionTemplate" type="TemplateType" minOccurs="0"/>
+ <xsd:element name="Template" type="TemplateType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="TemplateType">
+ <xsd:annotation>
+ <xsd:documentation>das Attribut URL spezifiziert die Lage des Templates</xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="URL" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:complexType name="VerifyInfoboxesType">
+ <xsd:annotation>
+ <xsd:documentation>Verifikation zusätzlicher Infoboxen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="DefaultTrustProfile" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Optionales DefaultTrustprofil für die Überprüfung aller weiteren Infoboxen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="TrustProfileID"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Infobox" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Parameter für Überprüfung weiterer Infoboxen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="FriendlyName" type="xsd:string" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>optionalervName, der für Fehlermeldungen verwendet werden soll;
+ z.B.: "Stellvertretungen" für "Mandates"; fehlt dieser Parameter, dann wird
+ das Identifier-Attribut verwendet</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="TrustProfileID" type="xsd:string" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>TrustProfil, das für die Überprüfung der Infobox
+ verwendet werden soll</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="ValidatorClass" type="xsd:string" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Validatorklasse, die für die Prüfung der Infobox
+ verwendet werden soll; muss gesetzt werden, wenn Package- und Klassenname
+ vom Default Package- und Klassennamen abweichen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="SchemaLocations" type="SchemaLocationType" minOccurs="0"/>
+ <xsd:element name="ApplicationSpecificParameters" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Infobox spezifische Parameter, die der jeweiligen Prüfapplikation
+ übergeben werden</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="skip" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="Identifier" type="xsd:string" use="required"/>
+ <xsd:attribute name="required" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideStammzahl" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideIdentityLink" type="xsd:boolean" use="optional" default="false"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="SchemaLocationType">
+ <xsd:annotation>
+ <xsd:documentation>Spezifiziert die Lage von XML Schemas</xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="Schema" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:attribute name="namespace" type="xsd:anyURI" use="required"/>
+ <xsd:attribute name="schemaLocation" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ProxyComponentType"/>
+ <xsd:complexType name="OnlineApplicationType">
+ <xsd:sequence>
+ <xsd:element name="AuthComponent" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter über die OA, die die
+ Authentisierungs-Komponente betreffen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <!--xsd:element name="IdentificationNumber" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="pr:AbstractSimpleIdentification"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element-->
+ <xsd:element name="IdentificationNumber" minOccurs="0">
+ <xsd:complexType>
+ <xsd:choice>
+ <xsd:element ref="pr:Firmenbuchnummer"/>
+ <xsd:element ref="pr:ZMRzahl"/>
+ <xsd:element ref="pr:Vereinsnummer"/>
+ <xsd:element ref="pr:ERJPZahl"/>
+ <xsd:element name="AnyNumber">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="Identifier" type="xsd:string" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Templates" type="TemplatesType" minOccurs="0"/>
+ <xsd:element name="TransformsInfo" type="TransformsInfoType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="VerifyInfoboxes" type="VerifyInfoboxesType" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="slVersion" use="optional" default="1.1">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="1.1"/>
+ <xsd:enumeration value="1.2"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="provideStammzahl" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideAUTHBlock" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideIdentityLink" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideCertificate" type="xsd:boolean" use="optional" default="false"/>
+ <!--xsd:element ref="pr:AbstractSimpleIdentification" minOccurs="0" maxOccurs="1"/-->
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ProxyComponent" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter über die OA, die die Proxy-Komponente
+ betreffen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter über die OA, die die Proxy-Komponente
+ betreffen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="configFileURL" type="xsd:anyURI" use="optional"/>
+ <xsd:attribute name="sessionTimeOut" type="xsd:int" use="optional"/>
+ <xsd:attribute name="loginParameterResolverImpl" type="xsd:string" use="optional"/>
+ <xsd:attribute name="loginParameterResolverConfiguration" type="xsd:string" use="optional"/>
+ <xsd:attribute name="connectionBuilderImpl" type="xsd:string" use="optional"/>
+ </xsd:complexType>
+ </xsd:element>
+ <!--xsd:element ref="pr:CorporateBody" minOccurs="0" maxOccurs="1"/-->
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ConnectionParameterServerAuthType">
+ <xsd:sequence>
+ <xsd:element name="AcceptedServerCertificates" type="xsd:anyURI" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>URL zu einem Verzeichnis, das akzeptierte Server-Zertifikate der
+ TLS-Verbindung enthält (keine CA-Zertifikate)</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="URL" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:complexType name="ConnectionParameterClientAuthType">
+ <xsd:complexContent>
+ <xsd:extension base="ConnectionParameterServerAuthType">
+ <xsd:sequence>
+ <xsd:element name="ClientKeyStore" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>URL zu einem KeyStore, der den privaten Schlüssel, der für
+ die TLS-Client-Authentisierung verwendetwird, enthält</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:anyURI">
+ <xsd:attribute name="password" type="xsd:string" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:element name="TrustProfileID" type="xsd:string"/>
+ <xsd:simpleType name="ChainingModeType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="chaining"/>
+ <xsd:enumeration value="pkix"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="BKUSelectionType">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="HTMLComplete"/>
+ <xsd:enumeration value="HTMLSelect"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+</xsd:schema>
diff --git a/common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.5.0.xsd b/common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.5.0.xsd
new file mode 100644
index 000000000..2e4c33c03
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/MOA-ID-Configuration-1.5.0.xsd
@@ -0,0 +1,650 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- edited with XMLSpy v2006 sp2 U (http://www.altova.com) by Klaus Stranacher (Technische Universität Graz) -->
+<xsd:schema xmlns="http://www.buergerkarte.at/namespaces/moaconfig#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.buergerkarte.at/namespaces/moaconfig#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.4.3">
+ <!-- es werden lokale Schemas referenziert für real aufgelöste Schemas bitte ersetzen: http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd -->
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd"/>
+ <xsd:import namespace="http://reference.e-government.gv.at/namespace/persondata/20020228#" schemaLocation="PersonData_20_en_moaWID.xsd"/>
+ <xsd:element name="Configuration">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="LoginType" type="LoginType" default="stateful"/>
+ <xsd:element name="Binding" minOccurs="0">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="full"/>
+ <xsd:enumeration value="userName"/>
+ <xsd:enumeration value="none"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:choice>
+ <xsd:element ref="ParamAuth"/>
+ <xsd:element ref="BasicAuth"/>
+ <xsd:element ref="HeaderAuth"/>
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:simpleType name="LoginType">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="stateless"/>
+ <xsd:enumeration value="stateful"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:element name="ParamAuth">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Parameter" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Parameter">
+ <xsd:complexType>
+ <xsd:attribute name="Name" type="xsd:token" use="required"/>
+ <xsd:attribute name="Value" type="MOAAuthDataType" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="BasicAuth">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="UserID" type="MOAAuthDataType"/>
+ <xsd:element name="Password" type="MOAAuthDataType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="HeaderAuth">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Header" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Header">
+ <xsd:complexType>
+ <xsd:attribute name="Name" type="xsd:token" use="required"/>
+ <xsd:attribute name="Value" type="MOAAuthDataType" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:simpleType name="MOAAuthDataType">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="MOAGivenName"/>
+ <xsd:enumeration value="MOAFamilyName"/>
+ <xsd:enumeration value="MOADateOfBirth"/>
+ <xsd:enumeration value="MOABPK"/>
+ <xsd:enumeration value="MOAWBPK"/>
+ <xsd:enumeration value="MOAPublicAuthority"/>
+ <xsd:enumeration value="MOABKZ"/>
+ <xsd:enumeration value="MOAQualifiedCertificate"/>
+ <xsd:enumeration value="MOAStammzahl"/>
+ <xsd:enumeration value="MOAIdentificationValueType"/>
+ <xsd:enumeration value="MOAIPAddress"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="MOAKeyBoxSelector">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="SecureSignatureKeypair"/>
+ <xsd:enumeration value="CertifiedKeypair"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <!--Konfiguration für Authentisierungs- und Proxy-Komponente und Online-Applikation-->
+ <xsd:element name="MOA-IDConfiguration">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="AuthComponent" type="AuthComponentType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter der Authentisierungs-Komponente</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="ProxyComponent" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Konfigurationsparameter der Proxy-Komponente</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="AuthComponent">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Kommunikation zw. Proxykomponente und Authenttisierungskomponente</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die SOAP-Verbindung von der Proxy-Komponente zur Auth-Komponente (vgl. AuthComponent/MOA-SP/ConnectionParameter)</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="OnlineApplication" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die OA</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="OnlineApplicationType">
+ <xsd:attribute name="publicURLPrefix" type="xsd:anyURI" use="required"/>
+ <xsd:attribute name="keyBoxIdentifier" type="MOAKeyBoxSelector" use="optional" default="SecureSignatureKeypair"/>
+ <xsd:attribute name="type" use="optional" default="publicService">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:NMTOKEN">
+ <xsd:enumeration value="businessService"/>
+ <xsd:enumeration value="publicService"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="calculateHPI" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="friendlyName" type="xsd:string" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ChainingModes" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>spezifiziert den Algorithmus (&quot;pkix&quot; oder &quot;chaining&quot;) für die Zertifikatspfadvalidierung</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="TrustAnchor">
+ <xsd:annotation>
+ <xsd:documentation>ein vom SystemDefaultMode abweichender ChiningMode kann für jeden TrustAnchor gesetzt werden</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="dsig:X509IssuerSerialType">
+ <xsd:attribute name="mode" type="ChainingModeType" use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="systemDefaultMode" type="ChainingModeType" use="optional" default="pkix"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="TrustedCACertificates" type="xsd:anyURI" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>verweist auf ein Verzeichnis, das vertrauenswürdige CA (Zwischen-CA, Wurzel-CA) Zertifikate enthält.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="GenericConfiguration" minOccurs="0" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:attribute name="name" use="required">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="DirectoryCertStoreParameters.RootDir"/>
+ <xsd:enumeration value="AuthenticationSession.TimeOut"/>
+ <xsd:enumeration value="AuthenticationData.TimeOut"/>
+ <xsd:enumeration value="TrustManager.RevocationChecking"/>
+ <xsd:enumeration value="FrontendServlets.EnableHTTPConnection"/>
+ <xsd:enumeration value="FrontendServlets.DataURLPrefix"/>
+ <xsd:enumeration value="AuthenticationServer.KeepAssertion"/>
+ <xsd:enumeration value="AuthenticationServer.WriteAssertionToFile"/>
+ <xsd:enumeration value="AuthenticationServer.SourceID"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="value" type="xsd:string" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="TrustedBKUs" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="BKUURL" type="xsd:anyURI" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:complexType name="AuthComponentType">
+ <xsd:sequence>
+ <xsd:element name="BKUSelection" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterServerAuthType"/>
+ </xsd:sequence>
+ <xsd:attribute name="BKUSelectionAlternative" type="BKUSelectionType" use="optional" default="HTMLComplete"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Templates" type="TemplatesType" minOccurs="0"/>
+ <xsd:element name="SecurityLayer">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Kommunikation mit dem Security-Layer</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="TransformsInfo" type="TransformsInfoType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="MOA-SP">
+ <xsd:annotation>
+ <xsd:documentation>enthält Konfiguratiosnparameter für die Kommunikation mit dem MOA SP Modul</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die SOAP-Verbindung von der AUTH-Komponente zu MOA-SP; das Attribut URL enthält den Endpunkt des Server; wird das Schema &quot;https&quot; verwendet müssen die Kind-Elemente angegeben werden; wird das Schema &quot;http&quot; verwendet dürfen keine Kind-Elemente angegeben werden; wird das Element nicht verwendet dann wird MOA-SP über das API aufgerufen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="VerifyIdentityLink">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Überprüfung der Personenbindung</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="TrustProfileID"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="VerifyAuthBlock">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Überprüfung des AUTH-Blocks</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="TrustProfileID"/>
+ <xsd:element name="VerifyTransformsInfoProfileID" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="IdentityLinkSigners" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Informationen über akzeptierte Signers des IdentityLinks</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="X509SubjectName" type="xsd:string" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>akzeptierte Signer des IdentityLinks werden per X509SubjectName (Kodierung nach RFC 2253) identifiziert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="VerifyInfoboxes" type="VerifyInfoboxesType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Defaultparameter für die Überprüfung weiterer Infoboxen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="ForeignIdentities" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType">
+ <xsd:annotation>
+ <xsd:documentation>Verbindungsparameter zum SZR-Gateway (GetIdentityLink)</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="OnlineMandates" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType">
+ <xsd:annotation>
+ <xsd:documentation>Verbindungsparameter zum Online-Vollmachten-Service</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="TransformsInfoType">
+ <xsd:annotation>
+ <xsd:documentation>das Attribut filename verweist auf eine Datei mit globalem Element TransformsInfo vom Typ sl10:TransformsInfo; diese TransformsInfo werden in den CreateXMLSignatureRequest für die Signatur des AUTH-Blocks inkludiert</xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="filename" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:complexType name="TemplatesType">
+ <xsd:sequence>
+ <xsd:element name="BKUSelectionTemplate" type="TemplateType" minOccurs="0"/>
+ <xsd:element name="Template" type="TemplateType" minOccurs="0"/>
+ <xsd:element name="InputProcessorSignTemplate" type="TemplateType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="TemplateType">
+ <xsd:annotation>
+ <xsd:documentation>das Attribut URL spezifiziert die Lage des Templates</xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="URL" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:complexType name="VerifyInfoboxesType">
+ <xsd:annotation>
+ <xsd:documentation>Verifikation zusätzlicher Infoboxen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="DefaultTrustProfile" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Optionales DefaultTrustprofil für die Überprüfung aller weiteren Infoboxen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="TrustProfileID"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Infobox" type="InfoboxType" minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Parameter für Überprüfung weiterer Infoboxen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="InfoboxType">
+ <xsd:annotation>
+ <xsd:documentation>Parameter zur Überprüfung einzelner Infoboxen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="FriendlyName" type="xsd:string" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>optionalervName, der für Fehlermeldungen verwendet werden soll; z.B.: &quot;Stellvertretungen&quot; für &quot;Mandates&quot;; fehlt dieser Parameter, dann wird das Identifier-Attribut verwendet</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="TrustProfileID" type="xsd:string" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>TrustProfil, das für die Überprüfung der Infobox verwendet werden soll</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="ValidatorClass" type="xsd:string" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Validatorklasse, die für die Prüfung der Infobox verwendet werden soll; muss gesetzt werden, wenn Package- und Klassenname vom Default Package- und Klassennamen abweichen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="SchemaLocations" type="SchemaLocationType" minOccurs="0"/>
+ <xsd:element name="ApplicationSpecificParameters" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Infobox spezifische Parameter, die der jeweiligen Prüfapplikation übergeben werden</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="skip" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ParepSpecificParameters" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Infobox spezifische Parameter, die der Prüfapplikation für berufliche Parteienvertretung übergeben werden. Dies ist logisch Teil der ApplicationSpecificParameters, kann jedoch aufgrund der Strukturierung validierend geparst werden und dadurch wird eine funktionierende Konfiguration bei Programmstart garantiert.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="EnableInfoboxValidator" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Falls Infoboxinhalte für die berufliche Parteienvertretung in der Vollmachten Infobox &quot;mandates&quot; abgelegt werden und Vertretung für berufliche Parteienvertreter aktiviert ist, so kann mit diesem Schalter die Vollmachtsprüfung für normale Vollmachten deaktiviert werden. Damit wird erreicht, dass mittels der Vollmachten Infobox ausschließlich berufliche Parteienvertretung aktiviert ist. Dieser Schalter ist nur für die Vollmachten Infobox &quot;mandates&quot; relevant.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="PartyRepresentation" type="PartyRepresentationType">
+ <xsd:annotation>
+ <xsd:documentation>Eigentlicher Konfigurationsteil für berufliche Parteienvertretung</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="Identifier" type="xsd:string" use="required"/>
+ <xsd:attribute name="required" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideStammzahl" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideIdentityLink" type="xsd:boolean" use="optional" default="false"/>
+ </xsd:complexType>
+ <xsd:complexType name="SchemaLocationType">
+ <xsd:annotation>
+ <xsd:documentation>Spezifiziert die Lage von XML Schemas</xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="Schema" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:attribute name="namespace" type="xsd:anyURI" use="required"/>
+ <xsd:attribute name="schemaLocation" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ProxyComponentType"/>
+ <xsd:complexType name="OnlineApplicationType">
+ <xsd:sequence>
+ <xsd:element name="AuthComponent" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter über die OA, die die Authentisierungs-Komponente betreffen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <!--xsd:element name="IdentificationNumber" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="pr:AbstractSimpleIdentification"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element-->
+ <xsd:element name="IdentificationNumber" minOccurs="0">
+ <xsd:complexType>
+ <xsd:choice>
+ <xsd:element ref="pr:Firmenbuchnummer"/>
+ <xsd:element ref="pr:ZMRzahl"/>
+ <xsd:element ref="pr:Vereinsnummer"/>
+ <xsd:element ref="pr:ERJPZahl"/>
+ <xsd:element name="AnyNumber">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="Identifier" type="xsd:string" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Templates" type="TemplatesType" minOccurs="0"/>
+ <xsd:element name="TransformsInfo" type="TransformsInfoType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="VerifyInfoboxes" type="VerifyInfoboxesType" minOccurs="0"/>
+ <xsd:element name="Mandates" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="Profiles" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="slVersion" use="optional" default="1.1">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="1.1"/>
+ <xsd:enumeration value="1.2"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="provideStammzahl" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideAUTHBlock" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideIdentityLink" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideCertificate" type="xsd:boolean" use="optional" default="false"/>
+ <!--xsd:element ref="pr:AbstractSimpleIdentification" minOccurs="0" maxOccurs="1"/-->
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ProxyComponent" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter über die OA, die die Proxy-Komponente betreffen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter über die OA, die die Proxy-Komponente betreffen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="configFileURL" type="xsd:anyURI" use="optional"/>
+ <xsd:attribute name="sessionTimeOut" type="xsd:int" use="optional"/>
+ <xsd:attribute name="loginParameterResolverImpl" type="xsd:string" use="optional"/>
+ <xsd:attribute name="loginParameterResolverConfiguration" type="xsd:string" use="optional"/>
+ <xsd:attribute name="connectionBuilderImpl" type="xsd:string" use="optional"/>
+ </xsd:complexType>
+ </xsd:element>
+ <!--xsd:element ref="pr:CorporateBody" minOccurs="0" maxOccurs="1"/-->
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ConnectionParameterServerAuthType">
+ <xsd:sequence>
+ <xsd:element name="AcceptedServerCertificates" type="xsd:anyURI" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>URL zu einem Verzeichnis, das akzeptierte Server-Zertifikate der TLS-Verbindung enthält (keine CA-Zertifikate)</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="URL" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:complexType name="ConnectionParameterClientAuthType">
+ <xsd:complexContent>
+ <xsd:extension base="ConnectionParameterServerAuthType">
+ <xsd:sequence>
+ <xsd:element name="ClientKeyStore" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>URL zu einem KeyStore, der den privaten Schlüssel, der für die TLS-Client-Authentisierung verwendet wird, enthält</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:anyURI">
+ <xsd:attribute name="password" type="xsd:string" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:element name="TrustProfileID" type="xsd:string"/>
+ <xsd:simpleType name="ChainingModeType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="chaining"/>
+ <xsd:enumeration value="pkix"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="BKUSelectionType">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="HTMLComplete"/>
+ <xsd:enumeration value="HTMLSelect"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:element name="CompatibilityMode" default="false">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:element name="EnableInfoboxValidator" default="true">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:element name="AlwaysShowForm" default="false">
+ <xsd:annotation>
+ <xsd:documentation>Soll nicht nur bei leerer oder standardisierter Vollmacht mit unvollständigen Daten, sondern beispielsweise zu Kontrollzwecken das Eingabeformular immer angezeigt werden, wenn ein Einschreiten durch berufliche Parteienvertretung geschieht so kann dies mittels dieses Schalters veranlasst werden</xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:complexType name="InputProcessorType">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="template" type="xsd:anyURI" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>Das Attribut spezifiziert die Lage des Templates, welches der InputProcessor zur Darstellung des Eingabeformulars nutzen soll</xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ <xsd:complexType name="PartyRepresentationType">
+ <xsd:sequence>
+ <xsd:element name="InputProcessor" type="InputProcessorType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Default InputProcessor. Konfiguration eines vom Standardprozess abweichenden Verarbeitungsvorgangs bei der beruflichen Parteienvertretung. Der Wert dieses Elements ist der vollständige Klassenname des InputProzessors</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element ref="AlwaysShowForm" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Default Wert für Formularanzeige. Soll nicht nur bei leerer oder standardisierter Vollmacht mit unvollständigen Daten, sondern beispielsweise zu Kontrollzwecken das Eingabeformular zur vervollständigung der Vertretenendaten immer angezeigt werden, wenn ein Einschreiten durch berufliche Parteienvertretung geschieht so kann dies mittels dieses Schalters veranlasst werden</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Default Verbindungsparameter zum SZR-Gateway (für den EGIZ-Demonstrator im internen Netzwerk: https://129.27.142.5:8443/szr-gateway/services/MandateCreation)</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="PartyRepresentative" type="PartyRepresentativeType" minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Falls keine speziellen beruflichen ParteienvertreterInnen definiert sind (Element kommt nicht vor), werden ausschließlich standardisierte Vollmachten mit einer MandateID=&quot;*&quot; akzeptiert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="PartyRepresentativeType">
+ <xsd:sequence>
+ <xsd:element name="InputProcessor" type="InputProcessorType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Konfiguration eines vom Standardprozess abweichenden Verarbeitungsvorgangs bei der beruflichen Parteienvertretung. Der Wert dieses Elements ist der vollständige Klassenname des InputProzessors</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element ref="AlwaysShowForm" minOccurs="0"/>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Optionale Verbindungsparameter zu speziellem (SZR-)Gateway</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="oid" use="required">
+ <xsd:annotation>
+ <xsd:documentation>OID der Parteienvertretung lt. &quot;Object Identifier der öffentlichen Verwaltung&quot; - Konvention, Empfehlung. Diese ID muss mit der MandateID der übermittelten standardisierten Vollmacht übereinstimmen. Eine Parteienvertretung für standardisierte Vollmachten mit der MandateID &quot;*&quot; muss nicht definiert werden und erlaubt eine allgemeine berufliche Parteienvertretung mit Standardtexten. In anderen Fällen ist eine erlaubte OID mitttels dieses Attributs zu definieren</xsd:documentation>
+ </xsd:annotation>
+ <!--xsd:simpleType>
+ <xsd:restriction/>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="1.2.40.0.10.3.1"/>
+ <xsd:enumeration value="1.2.40.0.10.3.2"/>
+ <xsd:enumeration value="1.2.40.0.10.3.3"/>
+ <xsd:enumeration value="1.2.40.0.10.3.10"/>
+ <xsd:enumeration value="1.2.40.0.10.3.10.IdentifiedVoiceChannel"/>
+ </xsd:restriction>
+ </xsd:simpleType-->
+ </xsd:attribute>
+ <xsd:attribute name="representPhysicalParty" use="optional" default="false">
+ <xsd:annotation>
+ <xsd:documentation>Legt fest, ob berufliche Parteienvertretung für natürliche Personen erlaubt ist</xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="representCorporateParty" use="optional" default="false">
+ <xsd:annotation>
+ <xsd:documentation>Legt fest, ob berufliche Parteienvertretung für juristische Personen erlaubt ist (welche z.B. ein Organwalter nicht vertreten darf und dieser Wert aus diesem Grund dort false sein muss)</xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="representationText" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>Beschreibender Text, der an Stelle des Standardtexts bei der Signatur der Anmeldedaten im Falle einer vorliegenden beruflichen Parteienvertretung zur Signatur vorgelegt wird</xsd:documentation>
+ </xsd:annotation>
+ <!--xsd:simpleType>
+ <xsd:restriction/>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="berufsmäßige(r) Parteienvertreter(in) mit Notariatseigenschaft"/>
+ <xsd:enumeration value="berufsmäßige(r) Parteienvertreter(in) mit Rechtsanwaltseigenschaft"/>
+ <xsd:enumeration value="berufsmäßige(r) Parteienvertreter(in) mit Ziviltechnikerinneneigenschaft)"/>
+ <xsd:enumeration value="Organwalter"/>
+ <xsd:enumeration value="Parteienvertreter(in) über einen identifizierten Sprachkanal"/>
+ </xsd:restriction>
+ </xsd:simpleType-->
+ </xsd:attribute>
+ </xsd:complexType>
+</xsd:schema>
diff --git a/common/src/main/resources/resources/schemas/MOA-SPSS-1.3.xsd b/common/src/main/resources/resources/schemas/MOA-SPSS-1.3.xsd
new file mode 100644
index 000000000..756b51279
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/MOA-SPSS-1.3.xsd
@@ -0,0 +1,469 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ MOA SP/SS 1.3 Schema
+-->
+<xsd:schema targetNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#">
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+ <!--########## Create XML Signature ###-->
+ <!--### Create XML Signature Request ###-->
+ <xsd:element name="CreateXMLSignatureRequest">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="CreateXMLSignatureRequestType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:complexType name="CreateXMLSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="KeyIdentifier" type="KeyIdentifierType"/>
+ <xsd:element name="SingleSignatureInfo" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Ermöglichung der Stapelsignatur durch wiederholte Angabe dieses Elements</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="DataObjectInfo" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="DataObjectInfoType">
+ <xsd:attribute name="ChildOfManifest" type="xsd:boolean" use="optional" default="false"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="CreateSignatureInfo" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="CreateSignatureEnvironment" type="ContentOptionalRefType"/>
+ <xsd:choice>
+ <xsd:annotation>
+ <xsd:documentation>Auswahl: Entweder explizite Angabe des Signaturorts sowie ggf. sinnvoller Supplements im Zshg. mit der Signaturumgebung, oder Verweis auf ein benanntes Profil</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element ref="CreateSignatureEnvironmentProfile"/>
+ <xsd:element name="CreateSignatureEnvironmentProfileID" type="ProfileIdentifierType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="SecurityLayerConformity" type="xsd:boolean" use="optional" default="true"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Create XML Signature Response ###-->
+ <xsd:complexType name="CreateXMLSignatureResponseType">
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Kardinalität 1..oo erlaubt die Antwort auf eine Stapelsignatur-Anfrage</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element name="SignatureEnvironment">
+ <xsd:annotation>
+ <xsd:documentation>Resultat, falls die Signaturerstellung erfolgreich war</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="lax"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element ref="ErrorResponse"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:element name="CreateXMLSignatureResponse" type="CreateXMLSignatureResponseType"/>
+ <!--########## Verify CMS Signature ###-->
+ <!--### Verifiy CMS Signature Request ###-->
+ <xsd:element name="VerifyCMSSignatureRequest">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="VerifyCMSSignatureRequestType">
+ <xsd:attribute name="Signatories" type="SignatoriesType" use="optional" default="1"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:complexType name="VerifyCMSSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="DateTime" type="xsd:dateTime" minOccurs="0"/>
+ <xsd:element name="CMSSignature" type="xsd:base64Binary"/>
+ <xsd:element name="DataObject" type="CMSDataObjectOptionalMetaType" minOccurs="0"/>
+ <xsd:element name="TrustProfileID" type="xsd:token">
+ <xsd:annotation>
+ <xsd:documentation>mit diesem Profil wird eine Menge von vertrauenswürdigen Wurzelzertifikaten spezifiziert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Verify CMS Signature Response ###-->
+ <xsd:element name="VerifyCMSSignatureResponse" type="VerifyCMSSignatureResponseType"/>
+ <xsd:complexType name="VerifyCMSSignatureResponseType">
+ <xsd:sequence maxOccurs="unbounded">
+ <xsd:element name="SignerInfo" type="dsig:KeyInfoType">
+ <xsd:annotation>
+ <xsd:documentation>only ds:X509Data and RetrievalMethod is supported; QualifiedCertificate is included as X509Data/any;publicAuthority is included as X509Data/any</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="SignatureCheck" type="CheckResultType"/>
+ <xsd:element name="CertificateCheck" type="CheckResultType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--########## Verify XML Signature ###-->
+ <!--### Verify XML Signature Request ###-->
+ <xsd:element name="VerifyXMLSignatureRequest" type="VerifyXMLSignatureRequestType"/>
+ <xsd:complexType name="VerifyXMLSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="DateTime" type="xsd:dateTime" minOccurs="0"/>
+ <xsd:element name="VerifySignatureInfo">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="VerifySignatureEnvironment" type="ContentOptionalRefType"/>
+ <xsd:element name="VerifySignatureLocation" type="xsd:token"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element ref="SupplementProfile"/>
+ <xsd:element name="SupplementProfileID" type="xsd:string"/>
+ </xsd:choice>
+ <xsd:element name="SignatureManifestCheckParams" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ReferenceInfo" type="VerifyTransformsDataType" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Pro dsig:Reference-Element in der zu überprüfenden XML-Signatur muss hier ein ReferenceInfo-Element erscheinen. Die Reihenfolge der einzelnen ReferenceInfo Elemente entspricht jener der dsig:Reference Elemente in der XML-Signatur.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="ReturnReferenceInputData" type="xsd:boolean" use="optional" default="true"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ReturnHashInputData" minOccurs="0"/>
+ <xsd:element name="TrustProfileID" type="xsd:token">
+ <xsd:annotation>
+ <xsd:documentation>mit diesem Profil wird eine Menge von vertrauenswürdigen Wurzelzertifikaten spezifiziert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Verify XML Signature Response ###-->
+ <xsd:element name="VerifyXMLSignatureResponse" type="VerifyXMLSignatureResponseType"/>
+ <xsd:complexType name="VerifyXMLSignatureResponseType">
+ <xsd:sequence>
+ <xsd:element name="SignerInfo" type="dsig:KeyInfoType">
+ <xsd:annotation>
+ <xsd:documentation>only ds:X509Data and ds:RetrievalMethod is supported; QualifiedCertificate is included as X509Data/any; PublicAuthority is included as X509Data/any</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="HashInputData" type="InputDataType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="ReferenceInputData" type="InputDataType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="SignatureCheck" type="ReferencesCheckResultType"/>
+ <xsd:element name="SignatureManifestCheck" type="ReferencesCheckResultType" minOccurs="0"/>
+ <xsd:element name="XMLDSIGManifestCheck" type="ManifestRefsCheckResultType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="CertificateCheck" type="CheckResultType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:simpleType name="ProfileIdentifierType">
+ <xsd:restriction base="xsd:token"/>
+ </xsd:simpleType>
+ <xsd:complexType name="InputDataType">
+ <xsd:complexContent>
+ <xsd:extension base="ContentExLocRefBaseType">
+ <xsd:attribute name="PartOf" use="optional" default="SignedInfo">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="SignedInfo"/>
+ <xsd:enumeration value="XMLDSIGManifest"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="ReferringSigReference" type="xsd:nonNegativeInteger" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="MetaInfoType">
+ <xsd:sequence>
+ <xsd:element name="MimeType" type="MimeTypeType"/>
+ <xsd:element name="Description" type="xsd:anyURI" minOccurs="0"/>
+ <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="FinalDataMetaInfoType">
+ <xsd:complexContent>
+ <xsd:extension base="MetaInfoType">
+ <xsd:sequence>
+ <xsd:element name="Type" type="xsd:anyURI" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="DataObjectInfoType">
+ <xsd:sequence>
+ <xsd:element name="DataObject">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="ContentOptionalRefType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:choice>
+ <xsd:annotation>
+ <xsd:documentation>Auswahl: Entweder explizite Angabe EINER Transformationskette inklusive ggf. sinnvoller Supplements oder Verweis auf ein benanntes Profil</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element ref="CreateTransformsInfoProfile"/>
+ <xsd:element name="CreateTransformsInfoProfileID" type="ProfileIdentifierType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ <xsd:attribute name="Structure" use="required">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="detached"/>
+ <xsd:enumeration value="enveloping"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ </xsd:complexType>
+ <xsd:complexType name="TransformsInfoType">
+ <xsd:sequence>
+ <xsd:element ref="dsig:Transforms" minOccurs="0"/>
+ <xsd:element name="FinalDataMetaInfo" type="FinalDataMetaInfoType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="XMLDataObjectAssociationType">
+ <xsd:sequence>
+ <xsd:element name="MetaInfo" type="MetaInfoType" minOccurs="0"/>
+ <xsd:element name="Content" type="ContentRequiredRefType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CMSDataObjectOptionalMetaType">
+ <xsd:sequence>
+ <xsd:element name="MetaInfo" type="MetaInfoType" minOccurs="0"/>
+ <xsd:element name="Content" type="CMSContentBaseType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CMSContentBaseType">
+ <xsd:complexContent>
+ <xsd:restriction base="ContentOptionalRefType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ </xsd:choice>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="AnyChildrenType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ReferencesCheckResultType">
+ <xsd:complexContent>
+ <xsd:restriction base="CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="ReferencesCheckResultInfoType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ReferencesCheckResultInfoType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:restriction base="AnyChildrenType">
+ <xsd:sequence>
+ <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="FailedReference" type="xsd:positiveInteger" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ManifestRefsCheckResultType">
+ <xsd:complexContent>
+ <xsd:restriction base="CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="ManifestRefsCheckResultInfoType"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ManifestRefsCheckResultInfoType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:restriction base="AnyChildrenType">
+ <xsd:sequence>
+ <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="FailedReference" type="xsd:positiveInteger" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="ReferringSigReference" type="xsd:positiveInteger"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <!--########## Error Response ###-->
+ <xsd:element name="ErrorResponse" type="ErrorResponseType">
+ <xsd:annotation>
+ <xsd:documentation>Resultat, falls die Signaturerstellung gescheitert ist</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:complexType name="ErrorResponseType">
+ <xsd:sequence>
+ <xsd:element name="ErrorCode" type="xsd:integer"/>
+ <xsd:element name="Info" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--########## Auxiliary Types ###-->
+ <xsd:simpleType name="KeyIdentifierType">
+ <xsd:restriction base="xsd:string"/>
+ </xsd:simpleType>
+ <xsd:simpleType name="KeyStorageType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="Software"/>
+ <xsd:enumeration value="Hardware"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="MimeTypeType">
+ <xsd:restriction base="xsd:token"/>
+ </xsd:simpleType>
+ <xsd:complexType name="AnyChildrenType" mixed="true">
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="XMLContentType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:extension base="AnyChildrenType">
+ <xsd:attribute ref="xml:space" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ContentBaseType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ <xsd:element name="LocRefContent" type="xsd:anyURI"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:complexType name="ContentExLocRefBaseType">
+ <xsd:complexContent>
+ <xsd:restriction base="ContentBaseType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ </xsd:choice>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ContentOptionalRefType">
+ <xsd:complexContent>
+ <xsd:extension base="ContentBaseType">
+ <xsd:attribute name="Reference" type="xsd:anyURI" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ContentRequiredRefType">
+ <xsd:complexContent>
+ <xsd:restriction base="ContentOptionalRefType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ <xsd:element name="LocRefContent" type="xsd:anyURI"/>
+ </xsd:choice>
+ <xsd:attribute name="Reference" type="xsd:anyURI" use="required"/>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="VerifyTransformsDataType">
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Ein oder mehrere Transformationswege können von der Applikation an MOA mitgeteilt werden. Die zu prüfende Signatur hat zumindest einem dieser Transformationswege zu entsprechen. Die Angabe kann explizit oder als Profilbezeichner erfolgen.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element ref="VerifyTransformsInfoProfile"/>
+ <xsd:element name="VerifyTransformsInfoProfileID" type="xsd:string">
+ <xsd:annotation>
+ <xsd:documentation>Profilbezeichner für einen Transformationsweg</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:element name="QualifiedCertificate"/>
+ <xsd:element name="PublicAuthority" type="PublicAuthorityType"/>
+ <xsd:complexType name="PublicAuthorityType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:string" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:simpleType name="SignatoriesType">
+ <xsd:union memberTypes="AllSignatoriesType">
+ <xsd:simpleType>
+ <xsd:list itemType="xsd:positiveInteger"/>
+ </xsd:simpleType>
+ </xsd:union>
+ </xsd:simpleType>
+ <xsd:simpleType name="AllSignatoriesType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="all"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:complexType name="CreateSignatureLocationType">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:token">
+ <xsd:attribute name="Index" type="xsd:integer" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ <xsd:complexType name="TransformParameterType">
+ <xsd:choice minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Die Angabe des Transformationsparameters (explizit oder als Hashwert) kann unterlassen werden, wenn die Applikation von der Unveränderlichkeit des Inhalts der in "Transformationsparamter", Attribut "URI" angegebenen URI ausgehen kann.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element name="Base64Content" type="xsd:base64Binary">
+ <xsd:annotation>
+ <xsd:documentation>Der Transformationsparameter explizit angegeben.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="Hash">
+ <xsd:annotation>
+ <xsd:documentation>Der Hashwert des Transformationsparameters.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="dsig:DigestMethod"/>
+ <xsd:element ref="dsig:DigestValue"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ <xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:element name="CreateSignatureEnvironmentProfile">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="CreateSignatureLocation" type="CreateSignatureLocationType"/>
+ <xsd:element name="Supplement" type="XMLDataObjectAssociationType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="VerifyTransformsInfoProfile">
+ <xsd:annotation>
+ <xsd:documentation>Explizite Angabe des Transformationswegs</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="dsig:Transforms" minOccurs="0"/>
+ <xsd:element name="TransformParameter" type="TransformParameterType" minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Alle impliziten Transformationsparameter, die zum Durchlaufen der oben angeführten Transformationskette bekannt sein müssen, müssen hier angeführt werden. Das Attribut "URI" bezeichnet den Transformationsparameter in exakt jener Weise, wie er in der zu überprüfenden Signatur gebraucht wird.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Supplement" type="XMLDataObjectAssociationType"/>
+ <xsd:element name="SupplementProfile" type="XMLDataObjectAssociationType"/>
+ <xsd:element name="CreateTransformsInfoProfile">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="CreateTransformsInfo" type="TransformsInfoType"/>
+ <xsd:element ref="Supplement" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+</xsd:schema>
diff --git a/common/src/main/resources/resources/schemas/MOA-SPSS-1.4.7.xsd b/common/src/main/resources/resources/schemas/MOA-SPSS-1.4.7.xsd
new file mode 100644
index 000000000..653bec578
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/MOA-SPSS-1.4.7.xsd
@@ -0,0 +1,470 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- edited with XMLSPY v2004 rel. 4 U (http://www.xmlspy.com) by Klaus Stranacher (ORiON) -->
+<!--
+ MOA SP/SS 1.3 Schema
+-->
+<xsd:schema targetNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#">
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+ <!--########## Create XML Signature ###-->
+ <!--### Create XML Signature Request ###-->
+ <xsd:element name="CreateXMLSignatureRequest">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="CreateXMLSignatureRequestType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:complexType name="CreateXMLSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="KeyIdentifier" type="KeyIdentifierType"/>
+ <xsd:element name="SingleSignatureInfo" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Ermöglichung der Stapelsignatur durch wiederholte Angabe dieses Elements</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="DataObjectInfo" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="DataObjectInfoType">
+ <xsd:attribute name="ChildOfManifest" type="xsd:boolean" use="optional" default="false"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="CreateSignatureInfo" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="CreateSignatureEnvironment" type="ContentOptionalRefType"/>
+ <xsd:choice>
+ <xsd:annotation>
+ <xsd:documentation>Auswahl: Entweder explizite Angabe des Signaturorts sowie ggf. sinnvoller Supplements im Zshg. mit der Signaturumgebung, oder Verweis auf ein benanntes Profil</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element ref="CreateSignatureEnvironmentProfile"/>
+ <xsd:element name="CreateSignatureEnvironmentProfileID" type="ProfileIdentifierType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="SecurityLayerConformity" type="xsd:boolean" use="optional" default="true"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Create XML Signature Response ###-->
+ <xsd:complexType name="CreateXMLSignatureResponseType">
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Kardinalität 1..oo erlaubt die Antwort auf eine Stapelsignatur-Anfrage</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element name="SignatureEnvironment">
+ <xsd:annotation>
+ <xsd:documentation>Resultat, falls die Signaturerstellung erfolgreich war</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="lax"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element ref="ErrorResponse"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:element name="CreateXMLSignatureResponse" type="CreateXMLSignatureResponseType"/>
+ <!--########## Verify CMS Signature ###-->
+ <!--### Verifiy CMS Signature Request ###-->
+ <xsd:element name="VerifyCMSSignatureRequest">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="VerifyCMSSignatureRequestType">
+ <xsd:attribute name="Signatories" type="SignatoriesType" use="optional" default="1"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:complexType name="VerifyCMSSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="DateTime" type="xsd:dateTime" minOccurs="0"/>
+ <xsd:element name="CMSSignature" type="xsd:base64Binary"/>
+ <xsd:element name="DataObject" type="CMSDataObjectOptionalMetaType" minOccurs="0"/>
+ <xsd:element name="TrustProfileID" type="xsd:token">
+ <xsd:annotation>
+ <xsd:documentation>mit diesem Profil wird eine Menge von vertrauenswürdigen Wurzelzertifikaten spezifiziert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Verify CMS Signature Response ###-->
+ <xsd:element name="VerifyCMSSignatureResponse" type="VerifyCMSSignatureResponseType"/>
+ <xsd:complexType name="VerifyCMSSignatureResponseType">
+ <xsd:sequence maxOccurs="unbounded">
+ <xsd:element name="SignerInfo" type="dsig:KeyInfoType">
+ <xsd:annotation>
+ <xsd:documentation>only ds:X509Data and RetrievalMethod is supported; QualifiedCertificate is included as X509Data/any;publicAuthority is included as X509Data/any</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="SignatureCheck" type="CheckResultType"/>
+ <xsd:element name="CertificateCheck" type="CheckResultType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--########## Verify XML Signature ###-->
+ <!--### Verify XML Signature Request ###-->
+ <xsd:element name="VerifyXMLSignatureRequest" type="VerifyXMLSignatureRequestType"/>
+ <xsd:complexType name="VerifyXMLSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="DateTime" type="xsd:dateTime" minOccurs="0"/>
+ <xsd:element name="VerifySignatureInfo">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="VerifySignatureEnvironment" type="ContentOptionalRefType"/>
+ <xsd:element name="VerifySignatureLocation" type="xsd:token"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element ref="SupplementProfile"/>
+ <xsd:element name="SupplementProfileID" type="xsd:string"/>
+ </xsd:choice>
+ <xsd:element name="SignatureManifestCheckParams" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ReferenceInfo" type="VerifyTransformsDataType" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Pro dsig:Reference-Element in der zu überprüfenden XML-Signatur muss hier ein ReferenceInfo-Element erscheinen. Die Reihenfolge der einzelnen ReferenceInfo Elemente entspricht jener der dsig:Reference Elemente in der XML-Signatur.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="ReturnReferenceInputData" type="xsd:boolean" use="optional" default="true"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ReturnHashInputData" minOccurs="0"/>
+ <xsd:element name="TrustProfileID" type="xsd:token">
+ <xsd:annotation>
+ <xsd:documentation>mit diesem Profil wird eine Menge von vertrauenswürdigen Wurzelzertifikaten spezifiziert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Verify XML Signature Response ###-->
+ <xsd:element name="VerifyXMLSignatureResponse" type="VerifyXMLSignatureResponseType"/>
+ <xsd:complexType name="VerifyXMLSignatureResponseType">
+ <xsd:sequence>
+ <xsd:element name="SignerInfo" type="dsig:KeyInfoType">
+ <xsd:annotation>
+ <xsd:documentation>only ds:X509Data and ds:RetrievalMethod is supported; QualifiedCertificate is included as X509Data/any; PublicAuthority is included as X509Data/any</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="HashInputData" type="InputDataType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="ReferenceInputData" type="InputDataType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="SignatureCheck" type="ReferencesCheckResultType"/>
+ <xsd:element name="SignatureManifestCheck" type="ReferencesCheckResultType" minOccurs="0"/>
+ <xsd:element name="XMLDSIGManifestCheck" type="ManifestRefsCheckResultType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="CertificateCheck" type="CheckResultType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:simpleType name="ProfileIdentifierType">
+ <xsd:restriction base="xsd:token"/>
+ </xsd:simpleType>
+ <xsd:complexType name="InputDataType">
+ <xsd:complexContent>
+ <xsd:extension base="ContentExLocRefBaseType">
+ <xsd:attribute name="PartOf" use="optional" default="SignedInfo">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="SignedInfo"/>
+ <xsd:enumeration value="XMLDSIGManifest"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="ReferringSigReference" type="xsd:nonNegativeInteger" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="MetaInfoType">
+ <xsd:sequence>
+ <xsd:element name="MimeType" type="MimeTypeType"/>
+ <xsd:element name="Description" type="xsd:anyURI" minOccurs="0"/>
+ <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="FinalDataMetaInfoType">
+ <xsd:complexContent>
+ <xsd:extension base="MetaInfoType">
+ <xsd:sequence>
+ <xsd:element name="Type" type="xsd:anyURI" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="DataObjectInfoType">
+ <xsd:sequence>
+ <xsd:element name="DataObject">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="ContentOptionalRefType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:choice>
+ <xsd:annotation>
+ <xsd:documentation>Auswahl: Entweder explizite Angabe EINER Transformationskette inklusive ggf. sinnvoller Supplements oder Verweis auf ein benanntes Profil</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element ref="CreateTransformsInfoProfile"/>
+ <xsd:element name="CreateTransformsInfoProfileID" type="ProfileIdentifierType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ <xsd:attribute name="Structure" use="required">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="detached"/>
+ <xsd:enumeration value="enveloping"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ </xsd:complexType>
+ <xsd:complexType name="TransformsInfoType">
+ <xsd:sequence>
+ <xsd:element ref="dsig:Transforms" minOccurs="0"/>
+ <xsd:element name="FinalDataMetaInfo" type="FinalDataMetaInfoType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="XMLDataObjectAssociationType">
+ <xsd:sequence>
+ <xsd:element name="MetaInfo" type="MetaInfoType" minOccurs="0"/>
+ <xsd:element name="Content" type="ContentRequiredRefType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CMSDataObjectOptionalMetaType">
+ <xsd:sequence>
+ <xsd:element name="MetaInfo" type="MetaInfoType" minOccurs="0"/>
+ <xsd:element name="Content" type="CMSContentBaseType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CMSContentBaseType">
+ <xsd:complexContent>
+ <xsd:restriction base="ContentOptionalRefType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ </xsd:choice>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="AnyChildrenType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ReferencesCheckResultType">
+ <xsd:complexContent>
+ <xsd:restriction base="CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="ReferencesCheckResultInfoType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ReferencesCheckResultInfoType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:restriction base="AnyChildrenType">
+ <xsd:sequence>
+ <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="FailedReference" type="xsd:positiveInteger" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ManifestRefsCheckResultType">
+ <xsd:complexContent>
+ <xsd:restriction base="CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="ManifestRefsCheckResultInfoType"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ManifestRefsCheckResultInfoType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:restriction base="AnyChildrenType">
+ <xsd:sequence>
+ <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="FailedReference" type="xsd:positiveInteger" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="ReferringSigReference" type="xsd:positiveInteger"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <!--########## Error Response ###-->
+ <xsd:element name="ErrorResponse" type="ErrorResponseType">
+ <xsd:annotation>
+ <xsd:documentation>Resultat, falls die Signaturerstellung gescheitert ist</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:complexType name="ErrorResponseType">
+ <xsd:sequence>
+ <xsd:element name="ErrorCode" type="xsd:integer"/>
+ <xsd:element name="Info" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--########## Auxiliary Types ###-->
+ <xsd:simpleType name="KeyIdentifierType">
+ <xsd:restriction base="xsd:string"/>
+ </xsd:simpleType>
+ <xsd:simpleType name="KeyStorageType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="Software"/>
+ <xsd:enumeration value="Hardware"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="MimeTypeType">
+ <xsd:restriction base="xsd:token"/>
+ </xsd:simpleType>
+ <xsd:complexType name="AnyChildrenType" mixed="true">
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="XMLContentType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:extension base="AnyChildrenType">
+ <xsd:attribute ref="xml:space" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ContentBaseType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ <xsd:element name="LocRefContent" type="xsd:anyURI"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:complexType name="ContentExLocRefBaseType">
+ <xsd:complexContent>
+ <xsd:restriction base="ContentBaseType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ </xsd:choice>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ContentOptionalRefType">
+ <xsd:complexContent>
+ <xsd:extension base="ContentBaseType">
+ <xsd:attribute name="Reference" type="xsd:anyURI" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ContentRequiredRefType">
+ <xsd:complexContent>
+ <xsd:restriction base="ContentOptionalRefType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ <xsd:element name="LocRefContent" type="xsd:anyURI"/>
+ </xsd:choice>
+ <xsd:attribute name="Reference" type="xsd:anyURI" use="required"/>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="VerifyTransformsDataType">
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Ein oder mehrere Transformationswege können von der Applikation an MOA mitgeteilt werden. Die zu prüfende Signatur hat zumindest einem dieser Transformationswege zu entsprechen. Die Angabe kann explizit oder als Profilbezeichner erfolgen.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element ref="VerifyTransformsInfoProfile"/>
+ <xsd:element name="VerifyTransformsInfoProfileID" type="xsd:string">
+ <xsd:annotation>
+ <xsd:documentation>Profilbezeichner für einen Transformationsweg</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:element name="QualifiedCertificate"/>
+ <xsd:element name="PublicAuthority" type="PublicAuthorityType"/>
+ <xsd:complexType name="PublicAuthorityType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:string" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:simpleType name="SignatoriesType">
+ <xsd:union memberTypes="AllSignatoriesType">
+ <xsd:simpleType>
+ <xsd:list itemType="xsd:positiveInteger"/>
+ </xsd:simpleType>
+ </xsd:union>
+ </xsd:simpleType>
+ <xsd:simpleType name="AllSignatoriesType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="all"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:complexType name="CreateSignatureLocationType">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:token">
+ <xsd:attribute name="Index" type="xsd:integer" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ <xsd:complexType name="TransformParameterType">
+ <xsd:choice minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Die Angabe des Transformationsparameters (explizit oder als Hashwert) kann unterlassen werden, wenn die Applikation von der Unveränderlichkeit des Inhalts der in "Transformationsparamter", Attribut "URI" angegebenen URI ausgehen kann.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element name="Base64Content" type="xsd:base64Binary">
+ <xsd:annotation>
+ <xsd:documentation>Der Transformationsparameter explizit angegeben.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="Hash">
+ <xsd:annotation>
+ <xsd:documentation>Der Hashwert des Transformationsparameters.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="dsig:DigestMethod"/>
+ <xsd:element ref="dsig:DigestValue"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ <xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:element name="CreateSignatureEnvironmentProfile">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="CreateSignatureLocation" type="CreateSignatureLocationType"/>
+ <xsd:element name="Supplement" type="XMLDataObjectAssociationType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="VerifyTransformsInfoProfile">
+ <xsd:annotation>
+ <xsd:documentation>Explizite Angabe des Transformationswegs</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="dsig:Transforms" minOccurs="0"/>
+ <xsd:element name="TransformParameter" type="TransformParameterType" minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Alle impliziten Transformationsparameter, die zum Durchlaufen der oben angeführten Transformationskette bekannt sein müssen, müssen hier angeführt werden. Das Attribut "URI" bezeichnet den Transformationsparameter in exakt jener Weise, wie er in der zu überprüfenden Signatur gebraucht wird.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Supplement" type="XMLDataObjectAssociationType"/>
+ <xsd:element name="SupplementProfile" type="XMLDataObjectAssociationType"/>
+ <xsd:element name="CreateTransformsInfoProfile">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="CreateTransformsInfo" type="TransformsInfoType"/>
+ <xsd:element ref="Supplement" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+</xsd:schema>
diff --git a/common/src/main/resources/resources/schemas/MOA-SPSS-config-1.3.xsd b/common/src/main/resources/resources/schemas/MOA-SPSS-config-1.3.xsd
new file mode 100644
index 000000000..8ab3d62aa
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/MOA-SPSS-config-1.3.xsd
@@ -0,0 +1,253 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ MOA SP/SS 1.3 Configuration Schema
+-->
+<xs:schema targetNamespace="http://reference.e-government.gv.at/namespace/moaconfig/20021122#" elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:config="http://reference.e-government.gv.at/namespace/moaconfig/20021122#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
+ <xs:element name="MOAConfiguration">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Common" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="HardwareCryptoModule" minOccurs="0" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Name" type="xs:string"/>
+ <xs:element name="SlotId" type="xs:string" minOccurs="0"/>
+ <xs:element name="UserPIN" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="SignatureCreation" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="KeyModules">
+ <xs:complexType>
+ <xs:choice maxOccurs="unbounded">
+ <xs:element name="HardwareKeyModule">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Id" type="xs:token"/>
+ <xs:element name="Name" type="xs:string"/>
+ <xs:element name="SlotId" type="xs:string" minOccurs="0"/>
+ <xs:element name="UserPIN" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="SoftwareKeyModule">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Id" type="xs:token"/>
+ <xs:element name="FileName" type="xs:string"/>
+ <xs:element name="Password" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="KeyGroup" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Id" type="xs:token"/>
+ <xs:sequence maxOccurs="unbounded">
+ <xs:element name="Key">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="KeyModuleId" type="xs:token"/>
+ <xs:element name="KeyCertIssuerSerial" type="dsig:X509IssuerSerialType"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="KeyGroupMapping" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="CustomerId" type="dsig:X509IssuerSerialType" minOccurs="0"/>
+ <xs:element name="KeyGroupId" type="xs:token" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="XMLDSig">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="CanonicalizationAlgorithm" type="xs:anyURI" minOccurs="0"/>
+ <xs:element name="DigestMethodAlgorithm" type="xs:anyURI" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="CreateTransformsInfoProfile" type="config:ProfileType" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="CreateSignatureEnvironmentProfile" type="config:ProfileType" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="SignatureVerification" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="CertificateValidation">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="PathConstruction">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="AutoAddCertificates" type="xs:boolean"/>
+ <xs:element name="UseAuthorityInformationAccess" type="xs:boolean"/>
+ <xs:element name="CertificateStore">
+ <xs:complexType>
+ <xs:choice>
+ <xs:element name="DirectoryStore">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Location" type="xs:token"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="PathValidation">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="ChainingMode">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="DefaultMode" type="config:ChainingModeType"/>
+ <xs:element name="TrustAnchor" minOccurs="0" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Identification" type="dsig:X509IssuerSerialType"/>
+ <xs:element name="Mode" type="config:ChainingModeType"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="TrustProfile" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Id" type="xs:token"/>
+ <xs:element name="TrustAnchorsLocation" type="xs:anyURI"/>
+ <xs:element name="SignerCertsLocation" type="xs:anyURI" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="RevocationChecking">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="EnableChecking" type="xs:boolean"/>
+ <xs:element name="MaxRevocationAge" type="xs:integer"/>
+ <xs:element name="ServiceOrder" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence minOccurs="2" maxOccurs="2">
+ <xs:element name="Service">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="OCSP"/>
+ <xs:enumeration value="CRL"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="Archiving">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="EnableArchiving" type="xs:boolean"/>
+ <xs:element name="ArchiveDuration" type="xs:nonNegativeInteger" minOccurs="0"/>
+ <xs:element name="Archive" minOccurs="0">
+ <xs:complexType>
+ <xs:choice>
+ <xs:element name="DatabaseArchive">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="JDBCURL" type="xs:anyURI"/>
+ <xs:element name="JDBCDriverClassName" type="xs:token"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="DistributionPoint" minOccurs="0" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="CAIssuerDN" type="xs:token"/>
+ <xs:choice maxOccurs="unbounded">
+ <xs:element name="CRLDP">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Location" type="xs:anyURI"/>
+ <xs:element name="ReasonCode" minOccurs="0" maxOccurs="unbounded">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="unused"/>
+ <xs:enumeration value="keyCompromise"/>
+ <xs:enumeration value="cACompromise"/>
+ <xs:enumeration value="affiliationChanged"/>
+ <xs:enumeration value="superseded"/>
+ <xs:enumeration value="cessationOfOperation"/>
+ <xs:enumeration value="certificateHold"/>
+ <xs:enumeration value="privilegeWithdrawn"/>
+ <xs:enumeration value="aACompromise"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="OCSPDP">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Location" type="xs:anyURI"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="VerifyTransformsInfoProfile" type="config:ProfileType" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="SupplementProfile" type="config:ProfileType" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:simpleType name="ChainingModeType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="chaining"/>
+ <xs:enumeration value="pkix"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:complexType name="ProfileType">
+ <xs:sequence>
+ <xs:element name="Id" type="xs:token"/>
+ <xs:element name="Location" type="xs:anyURI"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
diff --git a/common/src/main/resources/resources/schemas/MOA-SPSS-config-1.4.3.xsd b/common/src/main/resources/resources/schemas/MOA-SPSS-config-1.4.3.xsd
new file mode 100644
index 000000000..2b2f1d689
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/MOA-SPSS-config-1.4.3.xsd
@@ -0,0 +1,312 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ MOA SP/SS 1.4.3 Configuration Schema
+-->
+<xs:schema targetNamespace="http://reference.e-government.gv.at/namespace/moaconfig/20021122#" elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:config="http://reference.e-government.gv.at/namespace/moaconfig/20021122#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
+ <xs:element name="MOAConfiguration">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Common" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="HardwareCryptoModule" minOccurs="0" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Name" type="xs:string"/>
+ <xs:element name="SlotId" type="xs:string" minOccurs="0"/>
+ <xs:element name="UserPIN" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="SignatureCreation" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="KeyModules">
+ <xs:complexType>
+ <xs:choice maxOccurs="unbounded">
+ <xs:element name="HardwareKeyModule">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Id" type="xs:token"/>
+ <xs:element name="Name" type="xs:string"/>
+ <xs:element name="SlotId" type="xs:string" minOccurs="0"/>
+ <xs:element name="UserPIN" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="SoftwareKeyModule">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Id" type="xs:token"/>
+ <xs:element name="FileName" type="xs:string"/>
+ <xs:element name="Password" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="KeyGroup" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Id" type="xs:token"/>
+ <xs:sequence maxOccurs="unbounded">
+ <xs:element name="Key">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="KeyModuleId" type="xs:token"/>
+ <xs:element name="KeyCertIssuerSerial" type="dsig:X509IssuerSerialType"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="KeyGroupMapping" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="CustomerId" type="dsig:X509IssuerSerialType" minOccurs="0"/>
+ <xs:element name="KeyGroupId" type="xs:token" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="XMLDSig">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="CanonicalizationAlgorithm" type="xs:anyURI" minOccurs="0"/>
+ <xs:element name="DigestMethodAlgorithm" type="xs:anyURI" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="CreateTransformsInfoProfile" type="config:ProfileType" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="CreateSignatureEnvironmentProfile" type="config:ProfileType" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="SignatureVerification" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="CertificateValidation">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="PathConstruction">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element
+ name="AutoAddCertificates" type="xs:boolean" />
+ <xs:element
+ name="UseAuthorityInformationAccess"
+ type="xs:boolean" />
+ <xs:element
+ name="CertificateStore">
+ <xs:complexType>
+ <xs:choice>
+ <xs:element
+ name="DirectoryStore">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element
+ name="Location" type="xs:token" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="PathValidation">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element
+ name="ChainingMode">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element
+ name="DefaultMode"
+ type="config:ChainingModeType" />
+ <xs:element
+ name="TrustAnchor" minOccurs="0"
+ maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element
+ name="Identification"
+ type="dsig:X509IssuerSerialType" />
+ <xs:element
+ name="Mode" type="config:ChainingModeType" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="TrustProfile"
+ maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element
+ name="Id" type="xs:token" />
+ <xs:element
+ name="TrustAnchorsLocation" type="xs:anyURI" />
+ <xs:element
+ name="SignerCertsLocation" type="xs:anyURI"
+ minOccurs="0" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="RevocationChecking">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element
+ name="EnableChecking" type="xs:boolean" />
+ <xs:element
+ name="MaxRevocationAge" type="xs:integer" />
+ <xs:element name="ServiceOrder"
+ minOccurs="0">
+ <xs:complexType>
+ <xs:sequence
+ minOccurs="2" maxOccurs="2">
+ <xs:element
+ name="Service">
+ <xs:simpleType>
+ <xs:restriction
+ base="xs:token">
+ <xs:enumeration
+ value="OCSP" />
+ <xs:enumeration
+ value="CRL" />
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="Archiving">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element
+ name="EnableArchiving" type="xs:boolean" />
+ <xs:element
+ name="ArchiveDuration"
+ type="xs:nonNegativeInteger" minOccurs="0" />
+ <xs:element
+ name="Archive" minOccurs="0">
+ <xs:complexType>
+ <xs:choice>
+ <xs:element
+ name="DatabaseArchive">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element
+ name="JDBCURL" type="xs:anyURI" />
+ <xs:element
+ name="JDBCDriverClassName" type="xs:token" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element
+ name="DistributionPoint" minOccurs="0"
+ maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element
+ name="CAIssuerDN" type="xs:token" />
+ <xs:choice
+ maxOccurs="unbounded">
+ <xs:element
+ name="CRLDP">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element
+ name="Location" type="xs:anyURI" />
+ <xs:element
+ name="ReasonCode" minOccurs="0"
+ maxOccurs="unbounded">
+ <xs:simpleType>
+ <xs:restriction
+ base="xs:token">
+ <xs:enumeration
+ value="unused" />
+ <xs:enumeration
+ value="keyCompromise" />
+ <xs:enumeration
+ value="cACompromise" />
+ <xs:enumeration
+ value="affiliationChanged" />
+ <xs:enumeration
+ value="superseded" />
+ <xs:enumeration
+ value="cessationOfOperation" />
+ <xs:enumeration
+ value="certificateHold" />
+ <xs:enumeration
+ value="privilegeWithdrawn" />
+ <xs:enumeration
+ value="aACompromise" />
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element
+ name="OCSPDP">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element
+ name="Location" type="xs:anyURI" />
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="VerifyTransformsInfoProfile"
+ type="config:ProfileType" minOccurs="0"
+ maxOccurs="unbounded" />
+ <xs:element name="SupplementProfile"
+ type="config:ProfileType" minOccurs="0"
+ maxOccurs="unbounded" />
+ <xs:element name="PermitFileURIs" type="xs:boolean" minOccurs="0" maxOccurs="1" default="false"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:simpleType name="ChainingModeType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="chaining"/>
+ <xs:enumeration value="pkix"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:complexType name="ProfileType">
+ <xs:sequence>
+ <xs:element name="Id" type="xs:token"/>
+ <xs:element name="Location" type="xs:anyURI"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
diff --git a/common/src/main/resources/resources/schemas/MOA-SPSS-config-1.4.5.xsd b/common/src/main/resources/resources/schemas/MOA-SPSS-config-1.4.5.xsd
new file mode 100644
index 000000000..8da3a72b0
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/MOA-SPSS-config-1.4.5.xsd
@@ -0,0 +1,268 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ MOA SP/SS 1.4.5 Configuration Schema
+-->
+<xs:schema targetNamespace="http://reference.e-government.gv.at/namespace/moaconfig/20021122#" elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:config="http://reference.e-government.gv.at/namespace/moaconfig/20021122#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
+ <xs:element name="MOAConfiguration">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Common" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="HardwareCryptoModule" minOccurs="0" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Name" type="xs:string"/>
+ <xs:element name="SlotId" type="xs:string" minOccurs="0"/>
+ <xs:element name="UserPIN" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="SignatureCreation" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="KeyModules">
+ <xs:complexType>
+ <xs:choice maxOccurs="unbounded">
+ <xs:element name="HardwareKeyModule">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Id" type="xs:token"/>
+ <xs:element name="Name" type="xs:string"/>
+ <xs:element name="SlotId" type="xs:string" minOccurs="0"/>
+ <xs:element name="UserPIN" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="SoftwareKeyModule">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Id" type="xs:token"/>
+ <xs:element name="FileName" type="xs:string"/>
+ <xs:element name="Password" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="KeyGroup" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Id" type="xs:token"/>
+ <xs:sequence maxOccurs="unbounded">
+ <xs:element name="Key">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="KeyModuleId" type="xs:token"/>
+ <xs:element name="KeyCertIssuerSerial" type="dsig:X509IssuerSerialType"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="KeyGroupMapping" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="CustomerId" type="dsig:X509IssuerSerialType" minOccurs="0"/>
+ <xs:element name="KeyGroupId" type="xs:token" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="XMLDSig">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="CanonicalizationAlgorithm" type="xs:anyURI" minOccurs="0"/>
+ <xs:element name="DigestMethodAlgorithm" type="xs:anyURI" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="CreateTransformsInfoProfile" type="config:ProfileType" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="CreateSignatureEnvironmentProfile" type="config:ProfileType" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="SignatureVerification" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="CertificateValidation">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="PathConstruction">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="AutoAddCertificates" type="xs:boolean"/>
+ <xs:element name="UseAuthorityInformationAccess" type="xs:boolean"/>
+ <xs:element name="CertificateStore">
+ <xs:complexType>
+ <xs:choice>
+ <xs:element name="DirectoryStore">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Location" type="xs:token"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="PathValidation">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="ChainingMode">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="DefaultMode" type="config:ChainingModeType"/>
+ <xs:element name="TrustAnchor" minOccurs="0" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Identification" type="dsig:X509IssuerSerialType"/>
+ <xs:element name="Mode" type="config:ChainingModeType"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="TrustProfile" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Id" type="xs:token"/>
+ <xs:element name="TrustAnchorsLocation" type="xs:anyURI"/>
+ <xs:element name="SignerCertsLocation" type="xs:anyURI" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="RevocationChecking">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="EnableChecking" type="xs:boolean"/>
+ <xs:element name="MaxRevocationAge" type="xs:integer"/>
+ <xs:element name="ServiceOrder" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence minOccurs="1" maxOccurs="2">
+ <xs:element name="Service">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="OCSP"/>
+ <xs:enumeration value="CRL"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="Archiving">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="EnableArchiving" type="xs:boolean"/>
+ <xs:element name="ArchiveDuration" type="xs:nonNegativeInteger" minOccurs="0"/>
+ <xs:element name="Archive" minOccurs="0">
+ <xs:complexType>
+ <xs:choice>
+ <xs:element name="DatabaseArchive">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="JDBCURL" type="xs:anyURI"/>
+ <xs:element name="JDBCDriverClassName" type="xs:token"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="DistributionPoint" minOccurs="0" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="CAIssuerDN" type="xs:token"/>
+ <xs:choice maxOccurs="unbounded">
+ <xs:element name="CRLDP">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Location" type="xs:anyURI"/>
+ <xs:element name="ReasonCode" minOccurs="0" maxOccurs="unbounded">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="unused"/>
+ <xs:enumeration value="keyCompromise"/>
+ <xs:enumeration value="cACompromise"/>
+ <xs:enumeration value="affiliationChanged"/>
+ <xs:enumeration value="superseded"/>
+ <xs:enumeration value="cessationOfOperation"/>
+ <xs:enumeration value="certificateHold"/>
+ <xs:enumeration value="privilegeWithdrawn"/>
+ <xs:enumeration value="aACompromise"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="OCSPDP">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Location" type="xs:anyURI"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="CrlRetentionIntervals" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence maxOccurs="unbounded">
+ <xs:element name="CA">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="X509IssuerName" type="xs:string"/>
+ <xs:element name="Interval" type="xs:integer"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="VerifyTransformsInfoProfile" type="config:ProfileType" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="SupplementProfile" type="config:ProfileType" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="PermitFileURIs" type="xs:boolean" default="false" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:simpleType name="ChainingModeType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="chaining"/>
+ <xs:enumeration value="pkix"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:complexType name="ProfileType">
+ <xs:sequence>
+ <xs:element name="Id" type="xs:token"/>
+ <xs:element name="Location" type="xs:anyURI"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
diff --git a/common/src/main/resources/resources/schemas/MOA-SPSS-config-1.4.7.xsd b/common/src/main/resources/resources/schemas/MOA-SPSS-config-1.4.7.xsd
new file mode 100644
index 000000000..4808f3cb7
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/MOA-SPSS-config-1.4.7.xsd
@@ -0,0 +1,268 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ MOA SP/SS 1.4.7 Configuration Schema
+-->
+<xs:schema targetNamespace="http://reference.e-government.gv.at/namespace/moaconfig/20021122#" elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:config="http://reference.e-government.gv.at/namespace/moaconfig/20021122#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
+ <xs:element name="MOAConfiguration">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Common" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="HardwareCryptoModule" minOccurs="0" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Name" type="xs:string"/>
+ <xs:element name="SlotId" type="xs:string" minOccurs="0"/>
+ <xs:element name="UserPIN" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="SignatureCreation" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="KeyModules">
+ <xs:complexType>
+ <xs:choice maxOccurs="unbounded">
+ <xs:element name="HardwareKeyModule">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Id" type="xs:token"/>
+ <xs:element name="Name" type="xs:string"/>
+ <xs:element name="SlotId" type="xs:string" minOccurs="0"/>
+ <xs:element name="UserPIN" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="SoftwareKeyModule">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Id" type="xs:token"/>
+ <xs:element name="FileName" type="xs:string"/>
+ <xs:element name="Password" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="KeyGroup" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Id" type="xs:token"/>
+ <xs:sequence maxOccurs="unbounded">
+ <xs:element name="Key">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="KeyModuleId" type="xs:token"/>
+ <xs:element name="KeyCertIssuerSerial" type="dsig:X509IssuerSerialType"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="KeyGroupMapping" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="CustomerId" type="dsig:X509IssuerSerialType" minOccurs="0"/>
+ <xs:element name="KeyGroupId" type="xs:token" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="XMLDSig">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="CanonicalizationAlgorithm" type="xs:anyURI" minOccurs="0"/>
+ <xs:element name="DigestMethodAlgorithm" type="xs:anyURI" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="CreateTransformsInfoProfile" type="config:ProfileType" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="CreateSignatureEnvironmentProfile" type="config:ProfileType" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="SignatureVerification" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="CertificateValidation">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="PathConstruction">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="AutoAddCertificates" type="xs:boolean"/>
+ <xs:element name="UseAuthorityInformationAccess" type="xs:boolean"/>
+ <xs:element name="CertificateStore">
+ <xs:complexType>
+ <xs:choice>
+ <xs:element name="DirectoryStore">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Location" type="xs:token"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="PathValidation">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="ChainingMode">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="DefaultMode" type="config:ChainingModeType"/>
+ <xs:element name="TrustAnchor" minOccurs="0" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Identification" type="dsig:X509IssuerSerialType"/>
+ <xs:element name="Mode" type="config:ChainingModeType"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="TrustProfile" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Id" type="xs:token"/>
+ <xs:element name="TrustAnchorsLocation" type="xs:anyURI"/>
+ <xs:element name="SignerCertsLocation" type="xs:anyURI" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="RevocationChecking">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="EnableChecking" type="xs:boolean"/>
+ <xs:element name="MaxRevocationAge" type="xs:integer"/>
+ <xs:element name="ServiceOrder" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence minOccurs="1" maxOccurs="2">
+ <xs:element name="Service">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="OCSP"/>
+ <xs:enumeration value="CRL"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="Archiving">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="EnableArchiving" type="xs:boolean"/>
+ <xs:element name="ArchiveDuration" type="xs:nonNegativeInteger" minOccurs="0"/>
+ <xs:element name="Archive" minOccurs="0">
+ <xs:complexType>
+ <xs:choice>
+ <xs:element name="DatabaseArchive">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="JDBCURL" type="xs:anyURI"/>
+ <xs:element name="JDBCDriverClassName" type="xs:token"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="DistributionPoint" minOccurs="0" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="CAIssuerDN" type="xs:token"/>
+ <xs:choice maxOccurs="unbounded">
+ <xs:element name="CRLDP">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Location" type="xs:anyURI"/>
+ <xs:element name="ReasonCode" minOccurs="0" maxOccurs="unbounded">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="unused"/>
+ <xs:enumeration value="keyCompromise"/>
+ <xs:enumeration value="cACompromise"/>
+ <xs:enumeration value="affiliationChanged"/>
+ <xs:enumeration value="superseded"/>
+ <xs:enumeration value="cessationOfOperation"/>
+ <xs:enumeration value="certificateHold"/>
+ <xs:enumeration value="privilegeWithdrawn"/>
+ <xs:enumeration value="aACompromise"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="OCSPDP">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Location" type="xs:anyURI"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="CrlRetentionIntervals" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence maxOccurs="unbounded">
+ <xs:element name="CA">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="X509IssuerName" type="xs:string"/>
+ <xs:element name="Interval" type="xs:integer"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="VerifyTransformsInfoProfile" type="config:ProfileType" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="SupplementProfile" type="config:ProfileType" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="PermitFileURIs" type="xs:boolean" default="false" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:simpleType name="ChainingModeType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="chaining"/>
+ <xs:enumeration value="pkix"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:complexType name="ProfileType">
+ <xs:sequence>
+ <xs:element name="Id" type="xs:token"/>
+ <xs:element name="Location" type="xs:anyURI"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
diff --git a/common/src/main/resources/resources/schemas/MOAIdentities.xsd b/common/src/main/resources/resources/schemas/MOAIdentities.xsd
new file mode 100644
index 000000000..de9d9d4e4
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/MOAIdentities.xsd
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) by Rudolf Schamberger (Stabsstelle IKT-Strategie) (Bundesrechenzentrum GmbH) -->
+<xs:schema targetNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#/xmllpr20030814" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://reference.e-government.gv.at/namespace/moa/20020822#/xmllpr20030814" elementFormDefault="qualified" attributeFormDefault="unqualified">
+ <xs:element name="MOAIdentities">
+ <xs:annotation>
+ <xs:documentation>MOAIdentities provides a mapping from identities to parameters used in the XMLLoginParameterResolver of MOA-ID</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:sequence maxOccurs="unbounded">
+ <xs:element name="Mapping">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Identity">
+ <xs:complexType>
+ <xs:choice>
+ <xs:element name="NamedIdentity" type="tns:NamedIdentityType"/>
+ <xs:element name="bPKIdentity" type="tns:bPKIdentitiyType"/>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="Parameters" type="tns:ParametersType"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:complexType name="bPKIdentitiyType">
+ <xs:simpleContent>
+ <xs:extension base="xs:boolean">
+ <xs:attribute name="bPK" type="xs:string" use="required"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:complexType name="NamedIdentityType">
+ <xs:simpleContent>
+ <xs:extension base="xs:boolean">
+ <xs:attribute name="SurName" type="xs:string" use="required"/>
+ <xs:attribute name="GivenName" type="xs:string" use="required"/>
+ <xs:attribute name="BirthDate" type="xs:string" use="optional"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:complexType name="ParametersType">
+ <xs:attribute name="UN" type="xs:string" use="optional"/>
+ <xs:attribute name="PW" type="xs:string" use="optional"/>
+ <xs:attribute name="Param1" type="xs:string" use="optional"/>
+ <xs:attribute name="Param2" type="xs:string" use="optional"/>
+ <xs:attribute name="Param3" type="xs:string" use="optional"/>
+ </xs:complexType>
+</xs:schema>
diff --git a/common/src/main/resources/resources/schemas/PersonData.xsd b/common/src/main/resources/resources/schemas/PersonData.xsd
new file mode 100644
index 000000000..0e3bc6b3b
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/PersonData.xsd
@@ -0,0 +1,426 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!-- edited with XML Spy v4.1 U (http://www.xmlspy.com) by Peter Reichstädter (CIO) -->
+<!--Generisches Schema zum Speichern und Austauschen von Personendaten
+ (c) 2001-2002 Chief Information Office Austria, Stabsstelle IKT-Strategie des Bundes, BMÖLS
+ Kontakt: Peter Reichstädter (peter.reichstaedter@cio.gv.at), Arno Hollosi (arno.hollosi@cio.gv.at)
+ Die freie Verwendung dieses Schemas in Applikationen (behördenintern, kommerziell, privat) ist erlaubt und erwünscht.
+-->
+<xs:schema targetNamespace="http://reference.e-government.gv.at/namespace/persondata/20020228#" xmlns="http://reference.e-government.gv.at/namespace/persondata/20020228#" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0.0">
+ <xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="W3C-XMLDSig.xsd"/>
+ <!-- ### include definitions from hr-xml schemas ###-->
+ <xs:include schemaLocation="PersonName-1_2.xsd"/>
+ <xs:include schemaLocation="PostalAddress-1_2.xsd"/>
+ <xs:include schemaLocation="TelcomNumber-1_0.xsd"/>
+ <!-- ### type definition of Unique Identifier Entities ### -->
+ <xs:complexType name="IdentificationType">
+ <xs:annotation>
+ <xs:documentation>unique identifier</xs:documentation>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="Value">
+ <xs:annotation>
+ <xs:documentation>actual value of the identifier.</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="Id" type="xs:ID" use="optional"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="Type" type="xs:anyURI">
+ <xs:annotation>
+ <xs:documentation>type of value (eg 'ZMR', 'SV-Nummer', 'Martrikelnummer', database identification, ...)</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Authority" type="xs:anyURI" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>authority, which is reponsible for generation of the identifier (eg university in case of 'MatrikelNummer')</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>any additional properties</xs:documentation>
+ </xs:annotation>
+ </xs:any>
+ </xs:sequence>
+ <xs:attribute name="Id" type="xs:ID" use="optional"/>
+ <xs:anyAttribute namespace="##other"/>
+ </xs:complexType>
+ <!-- ### base type for person data ### -->
+ <xs:element name="Person" type="AbstractPersonType">
+ <xs:annotation>
+ <xs:documentation>element of person type</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:complexType name="AbstractPersonType" abstract="true">
+ <xs:annotation>
+ <xs:documentation>main structure of person data</xs:documentation>
+ </xs:annotation>
+ <xs:sequence minOccurs="0">
+ <xs:element name="Identification" type="IdentificationType" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>unique identification entities</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="Id" type="xs:ID" use="optional"/>
+ <xs:anyAttribute namespace="##other"/>
+ </xs:complexType>
+ <!-- ### physical person and corporate body ### -->
+ <xs:element name="PhysicalPerson" type="PhysicalPersonType">
+ <xs:annotation>
+ <xs:documentation>element of physical person type</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:complexType name="PhysicalPersonType">
+ <xs:annotation>
+ <xs:documentation>physical person</xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="AbstractPersonType">
+ <xs:sequence minOccurs="0">
+ <xs:element name="Name" type="PersonNameType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>data related to the person's name</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="AlternativeName" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>Former name, Artist name, changes of Given name ...</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="PersonNameType">
+ <xs:attribute name="Type" type="AlternativeNameTypeType"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="MaritalStatus" type="MaritalStatusType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>status of a person in the cycle of life</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Sex" type="SexType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>gender</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="DateOfBirth" type="DateOfBirthType" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>date of birth</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="PlaceOfBirth" type="xs:token" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>place of birth</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="CountryOfBirth" type="xs:token" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>country of birth</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Nationality" type="xs:token" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>nationality of Person (Staatsbürgerschaft)</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Confession" type="xs:token" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>confession (religion) of Person</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="relatedPerson" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>relatives (parents, ...)</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="TypeOfRelation" type="RelationType" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>type of the relationship</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="Person"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>any additional properties</xs:documentation>
+ </xs:annotation>
+ </xs:any>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:element name="CorporateBody" type="CorporateBodyType">
+ <xs:annotation>
+ <xs:documentation>element of corporate body type</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:complexType name="CorporateBodyType">
+ <xs:annotation>
+ <xs:documentation>juridical person, organisation</xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="AbstractPersonType">
+ <xs:sequence minOccurs="0">
+ <xs:element name="Type" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>category (eg organisation, function, sector, ...)</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="FullName" type="xs:token" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>name of corporate body (whole name)</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="AlternativeName" type="xs:token" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>alternative names of corporate body (abbreviations, short name, synonyms, ...)</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="LegalForm" type="xs:anyURI" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>type of company (eg AG, OHG, ...)</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Organisation" type="xs:token" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>part of an organisation, see also X.500 ou (eg departement, section, branch, ...) </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>any additional properties</xs:documentation>
+ </xs:annotation>
+ </xs:any>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <!-- ### signed structure of a person ### -->
+ <xs:element name="PersonData" type="PersonDataType">
+ <xs:annotation>
+ <xs:documentation>element of signed person datastructure type</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:complexType name="PersonDataType">
+ <xs:annotation>
+ <xs:documentation>signed person datastructure. The first Identification elements (from the base type) denote the record as such (e.g. database key for this record) - not to be mistaken for identifiers of the person or of an address (they have their own Identification elements).</xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="AbstractPersonType">
+ <xs:sequence>
+ <xs:element ref="Person"/>
+ <xs:element ref="Address" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element ref="dsig:Signature" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>one or more electronic signatures applied on fields above</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="AdditionalData" minOccurs="0">
+ <xs:complexType mixed="true">
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
+ <xs:any namespace="##any" processContents="lax">
+ <xs:annotation>
+ <xs:documentation>any additional properties</xs:documentation>
+ </xs:annotation>
+ </xs:any>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <!-- ### auxiliary types ### -->
+ <xs:simpleType name="SexType">
+ <xs:annotation>
+ <xs:documentation>simple type for sex (gender) of person</xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="male"/>
+ <xs:enumeration value="female"/>
+ <xs:enumeration value="unknown"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="DateOfBirthType">
+ <xs:annotation>
+ <xs:documentation>simple type for dates (union), which may omit day and/or month</xs:documentation>
+ </xs:annotation>
+ <xs:union memberTypes="xs:date xs:gYearMonth xs:gYear"/>
+ </xs:simpleType>
+ <xs:simpleType name="MaritalStatusType">
+ <xs:annotation>
+ <xs:documentation>simple type for marital status of a person</xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="single"/>
+ <xs:enumeration value="married"/>
+ <xs:enumeration value="divorced"/>
+ <xs:enumeration value="widowed"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="xStringPatternExtensionType">
+ <xs:annotation>
+ <xs:documentation>pattern type for enlargement of type definitions</xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:string">
+ <xs:pattern value="x:\S.*"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="DefinedRelationType">
+ <xs:annotation>
+ <xs:documentation>known relations (family + functional)</xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="family:Parent"/>
+ <xs:enumeration value="family:Child"/>
+ <xs:enumeration value="family:Sibling"/>
+ <xs:enumeration value="family:Grandparent"/>
+ <xs:enumeration value="family:Grandchild"/>
+ <xs:enumeration value="family:Spouse"/>
+ <xs:enumeration value="function:LegalGuardian"/>
+ <xs:enumeration value="function:IsGuardedBy"/>
+ <xs:enumeration value="function:Cohabitant"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="RelationType">
+ <xs:annotation>
+ <xs:documentation>known + any other relation</xs:documentation>
+ </xs:annotation>
+ <xs:union memberTypes="xStringPatternExtensionType DefinedRelationType"/>
+ </xs:simpleType>
+ <xs:simpleType name="DefinedAlternativeNameTypeType">
+ <xs:annotation>
+ <xs:documentation>known types of alternative names</xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="ArtistName"/>
+ <xs:enumeration value="NickName"/>
+ <xs:enumeration value="FormerName"/>
+ <xs:enumeration value="Alias"/>
+ <xs:enumeration value="MaidenName"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="AlternativeNameTypeType">
+ <xs:annotation>
+ <xs:documentation>known + any other alternative name types</xs:documentation>
+ </xs:annotation>
+ <xs:union memberTypes="xStringPatternExtensionType DefinedAlternativeNameTypeType"/>
+ </xs:simpleType>
+ <!-- ### adress data for various types of communications ### -->
+ <xs:element name="Address" type="AbstractAddressType">
+ <xs:annotation>
+ <xs:documentation>element of address type</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:complexType name="AbstractAddressType" abstract="true">
+ <xs:annotation>
+ <xs:documentation>main structure of address data</xs:documentation>
+ </xs:annotation>
+ <xs:sequence minOccurs="0">
+ <xs:element name="Identification" type="IdentificationType" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>unique identification entities</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="Id" type="xs:ID" use="optional"/>
+ <xs:anyAttribute namespace="##other"/>
+ </xs:complexType>
+ <xs:element name="TypedPostalAddress" type="TypedPostalAddressType">
+ <xs:annotation>
+ <xs:documentation>element of postal address type</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:complexType name="TypedPostalAddressType">
+ <xs:annotation>
+ <xs:documentation>postal address</xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="AbstractAddressType">
+ <xs:sequence minOccurs="0">
+ <xs:element name="Type" type="xs:anyURI" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>type of address - category (eg 'Wohnsitz', 'Zentrale', ...)</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="PostalAddress"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>any additional properties</xs:documentation>
+ </xs:annotation>
+ </xs:any>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:element name="TelephoneAddress" type="TelephoneAddressType">
+ <xs:annotation>
+ <xs:documentation>element of telephone address type</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:complexType name="TelephoneAddressType">
+ <xs:annotation>
+ <xs:documentation>phone numbers</xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="AbstractAddressType">
+ <xs:sequence minOccurs="0">
+ <xs:element name="Type" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>type of phononumber - category (eg 'Festnetz', 'Mobile', 'fax', ...)</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Number" type="TelcomNumberType">
+ <xs:annotation>
+ <xs:documentation>phonenumber</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>any additional properties</xs:documentation>
+ </xs:annotation>
+ </xs:any>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:element name="InternetAddress" type="InternetAddressType">
+ <xs:annotation>
+ <xs:documentation>element of internet address type</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:complexType name="InternetAddressType">
+ <xs:annotation>
+ <xs:documentation>internet based communication</xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="AbstractAddressType">
+ <xs:sequence minOccurs="0">
+ <xs:element ref="dsig:KeyInfo" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>certificate for secure communication</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Address" type="xs:anyURI">
+ <xs:annotation>
+ <xs:documentation>email-Address, Web, FTP, LDAP, ...</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>any additional properties</xs:documentation>
+ </xs:annotation>
+ </xs:any>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+</xs:schema>
diff --git a/common/src/main/resources/resources/schemas/PersonData_20_en_moaWID.xsd b/common/src/main/resources/resources/schemas/PersonData_20_en_moaWID.xsd
new file mode 100644
index 000000000..cf8f796db
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/PersonData_20_en_moaWID.xsd
@@ -0,0 +1,1229 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!-- edited with XMLSPY v2004 rel. 3 U (http://www.xmlspy.com) by Larissa Naber (Bundeskanzleramt) -->
+<!-- edited with XML Spy v4.1 U (http://www.xmlspy.com) by Peter Reichstädter (CIO) -->
+<!--Generisches Schema zum Speichern und Austauschen von Personendaten
+ (c) 2001-2002 Chief Information Office Austria, Stabsstelle IKT-Strategie des Bundes, BMÖLS
+ Kontakt: Peter Reichstädter (peter.reichstaedter@cio.gv.at), Arno Hollosi (arno.hollosi@cio.gv.at)
+ Die freie Verwendung dieses Schemas in Applikationen (behördenintern, kommerziell, privat) ist erlaubt und erwünscht.
+-->
+<?xml-stylesheet type="text/xsl" href="getelementnames.xslt"?>
+<xs:schema targetNamespace="http://reference.e-government.gv.at/namespace/persondata/20020228#" xmlns="http://reference.e-government.gv.at/namespace/persondata/20020228#" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0.0">
+ <xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd"/>
+ <xs:annotation>
+ <xs:documentation>This version of person deploys only global elements. All types derived from abstract types have been replaced by substitution groups</xs:documentation>
+ </xs:annotation>
+ <!-- ### signed structure of a person ### -->
+ <xs:element name="AbstractPersonData" type="AbstractPersonType">
+ <xs:annotation>
+ <xs:documentation>dummy abstract Peson Data element needed for bi-lingual schema (substitution groups)</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="PersonData" type="PersonDataType" substitutionGroup="AbstractPersonData">
+ <xs:annotation>
+ <xs:documentation>element of signed person datastructure type</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="CompactPersonData">
+ <xs:annotation>
+ <xs:documentation>element of signed person datastructure type</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:choice>
+ <xs:element ref="CompactPhysicalPerson"/>
+ <xs:element ref="CompactCorporateBody"/>
+ </xs:choice>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="InternetAddress"/>
+ <xs:element ref="TelephoneAddress"/>
+ <xs:element ref="CompactPostalAddress"/>
+ </xs:choice>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <!-- ### base type for person data ### -->
+ <xs:element name="Person" type="AbstractPersonType">
+ <xs:annotation>
+ <xs:documentation>element of person type, essential abstract, subsitute PhysicalPerson or CorporateBody instead or use with xsi:type="..."</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <!-- ### physical person and corporate body ### -->
+ <xs:element name="PhysicalPerson" type="PhysicalPersonType" substitutionGroup="Person">
+ <xs:annotation>
+ <xs:documentation>element of physical person type, dreived from Person (abstract)</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="CompactPhysicalPerson" type="CompactPhysicalPersonType" substitutionGroup="Person">
+ <xs:annotation>
+ <xs:documentation>element of physical person type, dreived from Person (abstract)</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="CorporateBody" type="CorporateBodyType" substitutionGroup="Person">
+ <xs:annotation>
+ <xs:documentation>element of corporate body type, derived from Person</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="CompactCorporateBody" type="CompactCorporateBodyType" substitutionGroup="Person">
+ <xs:annotation>
+ <xs:documentation>element of corporate body type, derived from Person</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <!--### complex child elements of person, also available as standalone ###-->
+ <xs:element name="Name" type="PersonNameType">
+ <xs:annotation>
+ <xs:documentation>data related to the person's name</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="CompactName" type="CompactPersonNameType">
+ <xs:annotation>
+ <xs:documentation>data related to the person's name</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="AlternativeName">
+ <xs:annotation>
+ <xs:documentation>Former name, Artist name, changes of Given name ..., compare AlternativName</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="PersonNameType">
+ <xs:attribute name="Type" type="AlternativeNameTypeType"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="relatedPerson">
+ <xs:annotation>
+ <xs:documentation>relatives (parents, ...), compare Verwandter</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="TypeOfRelation" type="RelationType" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>type of the relationship, compare Verwandschftsgrad</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="PhysicalPerson"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <!-- ### adress data for various types of communications ### -->
+ <xs:element name="Address" type="AbstractAddressType">
+ <xs:annotation>
+ <xs:documentation>element of address type, essentially abstract. Use InternetAddress, TelephoneAddress, PostalAddress, TypedPostalAddress instead, or use Address with xsi:type Attribute</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="PostalAddress" type="PostalAddressType" substitutionGroup="Address">
+ <xs:annotation>
+ <xs:documentation>Postal or ZMR Address, compare PostAdresse</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="CompactPostalAddress" type="CompactPostalAddressType" substitutionGroup="Address">
+ <xs:annotation>
+ <xs:documentation>Postal or ZMR Address, compare PostAdresse</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="TypedPostalAddress" type="TypedPostalAddressType" substitutionGroup="Address">
+ <xs:annotation>
+ <xs:documentation>Typed Postal or ZMR Address, compare TypisiertePostAdresse</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="InternetAddress" type="InternetAddressType" substitutionGroup="Address">
+ <xs:annotation>
+ <xs:documentation>InternetAdress such as e-mail or website, compare InternetAdresse</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="TelephoneAddress" type="TelephoneAddressType" substitutionGroup="Address">
+ <xs:annotation>
+ <xs:documentation>Typed TelephoneAddress, compare TelefonAdresse</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="BankConnection" type="BankConnectionType">
+ <xs:annotation>
+ <xs:documentation>National or international bank connection, compare Bankverbindung</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <!-- ### Identification elements ###-->
+ <xs:element name="AbstractSimpleIdentification" type="AbstractSimpleIdentificationType">
+ <xs:annotation>
+ <xs:documentation>possibility to include common austrian primary keys in human readable way, english translation not available</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="ZMRzahl" substitutionGroup="AbstractSimpleIdentification">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="AbstractSimpleIdentificationType">
+ <xs:attribute name="Identifier" type="xs:string" fixed="ZMR"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="Stammzahl" type="AbstractSimpleIdentificationType" substitutionGroup="AbstractSimpleIdentification"/>
+ <xs:element name="Firmenbuchnummer" substitutionGroup="AbstractSimpleIdentification">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="AbstractSimpleIdentificationType">
+ <xs:attribute name="Identifier" type="xs:string" fixed="FN"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="ERJPZahl" substitutionGroup="AbstractSimpleIdentification">
+ <xs:annotation>
+ <xs:documentation>Ergänzungsregister für nicht-natürliche Personen (CorporateBody)</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="AbstractSimpleIdentificationType">
+ <xs:attribute name="Identifier" type="xs:string" fixed="ERJ"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="Vereinsnummer" substitutionGroup="AbstractSimpleIdentification">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="AbstractSimpleIdentificationType">
+ <xs:attribute name="Identifier" type="xs:string" fixed="VR"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="Sozialversicherungsnummer" type="AbstractSimpleIdentificationType" substitutionGroup="AbstractSimpleIdentification"/>
+ <xs:element name="Steuernummer" type="AbstractSimpleIdentificationType" substitutionGroup="AbstractSimpleIdentification"/>
+ <xs:element name="Matrikelnummer" type="AbstractSimpleIdentificationType" substitutionGroup="AbstractSimpleIdentification"/>
+ <!-- ### additional telecom elements - not used internally - german translation not available ###-->
+ <xs:element name="Telephone" type="TelcomNumberType"/>
+ <xs:element name="Mobile" type="MobileTelcomNumberType"/>
+ <xs:element name="Fax" type="TelcomNumberType"/>
+ <xs:element name="Pager" type="TelcomNumberType"/>
+ <xs:element name="TTYTDD" type="TelcomNumberType">
+ <xs:annotation>
+ <xs:documentation>teletyper or telephone for the hearing impaired</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <!--### elements of simple type ####-->
+ <xs:element name="MaritalStatus" type="MaritalStatusType">
+ <xs:annotation>
+ <xs:documentation>status of a person in the cycle of life, compare Familienstand</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Sex" type="SexType">
+ <xs:annotation>
+ <xs:documentation>gender, comapre Geschlecht</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="DateOfBirth" type="DateOfBirthType">
+ <xs:annotation>
+ <xs:documentation>date of birth, compare Geburtsdatum</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="DateOfDeath" type="DateOfDeathType">
+ <xs:annotation>
+ <xs:documentation>date of death, compare Sterbedatum</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="PlaceOfBirth" type="xs:token">
+ <xs:annotation>
+ <xs:documentation>place of birth, compare Geburtsort</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="CountryOfBirth" type="xs:token">
+ <xs:annotation>
+ <xs:documentation>country of birth, compare Geburtsland</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="StateOfBirth" type="xs:token">
+ <xs:annotation>
+ <xs:documentation>state of birth, comapre Geburtsbundesland</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Nationality" type="NationalityType">
+ <xs:annotation>
+ <xs:documentation>nationality of Person, compare Staatsangehoerigkeit. attention! New Fomrat is complex, string value accepted for compatibility only</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Confession" type="xs:token">
+ <xs:annotation>
+ <xs:documentation>confession (religion) of Person - xs:token? gibt es wirklich keine Staaten mit Leerzeichen im Namen?</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Occupation" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>occupation, compare Beruf</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <!--### complex telephone types ###-->
+ <xs:element name="InternationalCountryCode" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>compare InternationalerLaendercode</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="NationalNumber" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>compare NationalNummer</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="AreaCityCode" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>compare Vorwahl</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="SubscriberNumber" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>compare Anschlussnummer</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="FormattedNumber" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>Complete number, ready formated - e.g. +43 1 5131345 4664 compare FormatierteNummer</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Extension" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>compare Klappe</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Identification" type ="IdentificationType">
+ <xs:annotation>
+ <xs:documentation>unique identifier</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <!--### complex types ###-->
+ <xs:complexType name="PersonDataType">
+ <xs:annotation>
+ <xs:documentation>signed person datastructure. The first Identification elements (from the base type) denote the record as such (e.g. database key for this record) - not to be mistaken for identifiers of the person or of an address (they have their own Identification elements).</xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="AbstractPersonType">
+ <xs:sequence>
+ <xs:element ref="Person"/>
+ <xs:element ref="Address" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element ref="dsig:Signature" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>one or more electronic signatures applied on fields above</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="AdditionalData" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>container for your Information needs. Contained Elements must reside in a different Namespace</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
+ <xs:any namespace="##any" processContents="lax">
+ <xs:annotation>
+ <xs:documentation>any additional properties</xs:documentation>
+ </xs:annotation>
+ </xs:any>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="CompactPersonDataType">
+ <xs:annotation>
+ <xs:documentation>signed person datastructure. The first Identification elements (from the base type) denote the record as such (e.g. database key for this record) - not to be mistaken for identifiers of the person or of an address (they have their own Identification elements).</xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="AbstractPersonType">
+ <xs:sequence>
+ <xs:element ref="Person"/>
+ <xs:element ref="Address" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element ref="dsig:Signature" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>one or more electronic signatures applied on fields above</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="AdditionalData" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>container for your Information needs. Contained Elements must reside in a different Namespace</xs:documentation>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
+ <xs:any namespace="##any" processContents="lax">
+ <xs:annotation>
+ <xs:documentation>any additional properties</xs:documentation>
+ </xs:annotation>
+ </xs:any>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="AbstractSimpleIdentificationType">
+ <xs:simpleContent>
+ <xs:extension base="xs:string"/>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:complexType name="IdentificationType">
+ <xs:annotation>
+ <xs:documentation>unique identifier</xs:documentation>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="Value">
+ <xs:annotation>
+ <xs:documentation>actual value of the identifier.</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="Id" type="xs:ID" use="optional"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="Type" type="xs:anyURI">
+ <xs:annotation>
+ <xs:documentation>type of value (eg 'ZMR', 'SV-Nummer', 'Martrikelnummer', database identification, ...)</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Authority" type="xs:anyURI" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>authority, which is reponsible for generation of the identifier (eg university in case of 'MatrikelNummer')</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>any additional properties</xs:documentation>
+ </xs:annotation>
+ </xs:any>
+ </xs:sequence>
+ <xs:attribute name="Id" type="xs:ID" use="optional"/>
+ <xs:anyAttribute namespace="##other"/>
+ </xs:complexType>
+ <xs:complexType name="AbstractPersonType">
+ <xs:annotation>
+ <xs:documentation>main structure of person data</xs:documentation>
+ </xs:annotation>
+ <xs:choice minOccurs="0">
+ <xs:element ref="Identification" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>unique identification entities</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="AbstractSimpleIdentification" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:choice>
+ <xs:attribute name="Id" type="xs:ID" use="optional"/>
+ <xs:anyAttribute namespace="##other"/>
+ </xs:complexType>
+ <xs:complexType name="PhysicalPersonType">
+ <xs:annotation>
+ <xs:documentation>physical person, compare NatuerlichePersonTyp</xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="AbstractPersonType">
+ <xs:sequence minOccurs="0">
+ <xs:element ref="Name" minOccurs="0"/>
+ <xs:element ref="AlternativeName" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element ref="MaritalStatus" minOccurs="0"/>
+ <xs:element ref="Sex" minOccurs="0"/>
+ <xs:element ref="DateOfBirth" minOccurs="0"/>
+ <xs:element ref="PlaceOfBirth" minOccurs="0"/>
+ <xs:element ref="StateOfBirth" minOccurs="0"/>
+ <xs:element ref="CountryOfBirth" minOccurs="0"/>
+ <xs:element ref="DateOfDeath" minOccurs="0"/>
+ <xs:element ref="Nationality" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element ref="Confession" minOccurs="0"/>
+ <xs:element ref="Occupation" minOccurs="0"/>
+ <xs:element ref="relatedPerson" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element ref="BankConnection" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>any additional properties</xs:documentation>
+ </xs:annotation>
+ </xs:any>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="CompactPhysicalPersonType">
+ <xs:annotation>
+ <xs:documentation>physical person, compare NatuerlichePersonTyp</xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="AbstractPersonType">
+ <xs:sequence minOccurs="0">
+ <xs:element ref="CompactName"/>
+ <xs:element ref="MaritalStatus" minOccurs="0"/>
+ <xs:element ref="Sex" minOccurs="0"/>
+ <xs:element ref="DateOfBirth" minOccurs="0"/>
+ <xs:element ref="PlaceOfBirth" minOccurs="0"/>
+ <xs:element ref="Nationality" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>any additional properties</xs:documentation>
+ </xs:annotation>
+ </xs:any>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="CorporateBodyType">
+ <xs:annotation>
+ <xs:documentation>juridical person, organisation, compare NichtNatuerlichePersonTyp</xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="AbstractPersonType">
+ <xs:sequence minOccurs="0">
+ <xs:element name="Type" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>URI pointing to a predefined Class of CorporateBodies, compare Typ</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="FullName" type="xs:token" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>name of corporate body (whole name), compare VollerName</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="AlternativeName" type="xs:token" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>alternative names of corporate body (abbreviations, short name, synonyms, ...), comapre AlternativName</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="LegalForm" type="xs:anyURI" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>type of company (eg AG, OHG, ...), URI pointing to predefined LegalForm, compare Rechtsform</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Organization" type="xs:token" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>part of an organisation, see also X.500 ou (eg departement, section, branch, ...) , compare Organisation</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="BankConnection" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>any additional properties</xs:documentation>
+ </xs:annotation>
+ </xs:any>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="CompactCorporateBodyType">
+ <xs:annotation>
+ <xs:documentation>juridical person, organisation, compare NichtNatuerlichePersonTyp</xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="AbstractPersonType">
+ <xs:sequence minOccurs="0">
+ <xs:element name="Type" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>URI pointing to a predefined Class of CorporateBodies, compare Typ</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="FullName" type="xs:token">
+ <xs:annotation>
+ <xs:documentation>name of corporate body (whole name), compare VollerName</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="LegalForm" type="xs:anyURI" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>type of company (eg AG, OHG, ...), URI pointing to predefined LegalForm, compare Rechtsform</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Organization" type="xs:token" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>part of an organisation, see also X.500 ou (eg departement, section, branch, ...) , compare Organisation</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>any additional properties</xs:documentation>
+ </xs:annotation>
+ </xs:any>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="PersonNameType">
+ <xs:annotation>
+ <xs:documentation>container for parts of a name, comapre PersonenNameTyp</xs:documentation>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="FormattedName" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>Complete Name (including Affixes) of the Person, especially useful for names from different cultural environments</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="type" default="presentation">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="presentation"/>
+ <xs:enumeration value="legal"/>
+ <xs:enumeration value="sortOrder"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="LegalName" type="xs:string" minOccurs="0"/>
+ <xs:element name="GivenName" type="xs:string" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>Every given name should be contained inside a GivenName Tag. If that is not possible due to dabase contraints, ... putting several given names inside one GivenName Element is acceptable</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="PreferredGivenName" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>A Person in possesion of more than one GivenName frequently preferrs the use of a Name other than the first GivenName</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="MiddleName" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>MiddleNames are not commonly found in central Europe. The field is mainly for compatibility reasons</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="FamilyName" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>Every family name should be contained inside a FamilyName Tag. If that is not possible due to dabase contraints, ... putting several family names inside one FamilyName Element is acceptable</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="primary" default="undefined">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="true"/>
+ <xs:enumeration value="false"/>
+ <xs:enumeration value="undefined"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="prefix" type="xs:string"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="Affix" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>Inlcudes all Information that is not exactly a name: academic or aristocratic titles, ... the new position attribute can contain a suffx or prefix value</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="type" use="optional">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="academicGrade"/>
+ <xs:enumeration value="aristocraticPrefix"/>
+ <xs:enumeration value="aristocraticTitle"/>
+ <xs:enumeration value="familyNamePrefix"/>
+ <xs:enumeration value="familyNameSuffix"/>
+ <xs:enumeration value="formOfAddress"/>
+ <xs:enumeration value="generation"/>
+ <xs:enumeration value="qualification"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="position" use="optional">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="prefix"/>
+ <xs:enumeration value="suffix"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="CompactPersonNameType">
+ <xs:annotation>
+ <xs:documentation>container for parts of a name, comapre PersonenNameTyp</xs:documentation>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="GivenName" type="xs:string" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>Every given name should be contained inside a GivenName Tag. If that is not possible due to dabase contraints, ... putting several given names inside one GivenName Element is acceptable</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="FamilyName" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>Every family name should be contained inside a FamilyName Tag. If that is not possible due to dabase contraints, ... putting several family names inside one FamilyName Element is acceptable</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="primary" default="undefined">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="true"/>
+ <xs:enumeration value="false"/>
+ <xs:enumeration value="undefined"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="prefix" type="xs:string"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="Affix" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>Inlcudes all Information that is not exactly a name: academic or aristocratic titles, ... the new position attribute can contain a suffx or prefix value</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="type" use="optional">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="academicGrade"/>
+ <xs:enumeration value="aristocraticPrefix"/>
+ <xs:enumeration value="aristocraticTitle"/>
+ <xs:enumeration value="familyNamePrefix"/>
+ <xs:enumeration value="familyNameSuffix"/>
+ <xs:enumeration value="formOfAddress"/>
+ <xs:enumeration value="generation"/>
+ <xs:enumeration value="qualification"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="position" use="optional">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="prefix"/>
+ <xs:enumeration value="suffix"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="NationalityType" mixed="true">
+ <xs:annotation>
+ <xs:documentation>comapre, StaatsangehoerigkeitTyp</xs:documentation>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="ISOCode3" minOccurs="0">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:length value="3"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:element>
+ <xs:element name="CountryNameDE" type="xs:string" minOccurs="0"/>
+ <xs:element name="CountryNameEN" type="xs:string" minOccurs="0"/>
+ <xs:element name="CountryNameFR" type="xs:string" minOccurs="0"/>
+ <xs:any namespace="##other" processContents="lax"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="BankConnectionType">
+ <xs:annotation>
+ <xs:documentation>compare BankverbindungTyp</xs:documentation>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="Holder" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>Account holder, compare Inhaber</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="BankName" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>compare BankName</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:choice>
+ <xs:element name="NationalBankConnection">
+ <xs:annotation>
+ <xs:documentation>compare NationaleBankverbindung</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="AccountNumber" type="xs:integer">
+ <xs:annotation>
+ <xs:documentation>compare Kontonummer</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="BankCode" type="xs:integer">
+ <xs:annotation>
+ <xs:documentation>compare BLZ</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="InternationalBankConnection">
+ <xs:annotation>
+ <xs:documentation>compare InternationaleBankverbindung</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="IBAN" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>compare IBAN</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="BIC" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>comapre BIC</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:complexType name="AbstractAddressType">
+ <xs:annotation>
+ <xs:documentation>main structure of address data</xs:documentation>
+ </xs:annotation>
+ <xs:sequence minOccurs="0">
+ <xs:element ref="Identification" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>unique identification entities</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="Id" type="xs:ID" use="optional"/>
+ <xs:anyAttribute namespace="##other"/>
+ </xs:complexType>
+ <xs:complexType name="TypedPostalAddressType">
+ <xs:annotation>
+ <xs:documentation>postal address with type information, compare TypisiertePostAdresseTyp</xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="AbstractAddressType">
+ <xs:sequence minOccurs="0">
+ <xs:element name="Type" type="xs:anyURI" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>type of address - category (eg 'Wohnsitz', 'Zentrale', ...)</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="PostalAddress"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>any additional properties</xs:documentation>
+ </xs:annotation>
+ </xs:any>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="PostalAddressType">
+ <xs:annotation>
+ <xs:documentation>compare PostAdresseTyp</xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="AbstractAddressType">
+ <xs:sequence>
+ <xs:element name="CountryCode" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>Code for the country, use ISO or internatinal Postalstandard, compare Staatscode</xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:pattern value="[A-Z]{2}"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:element>
+ <xs:element name="CountryName" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>Name of the country, use ISO Name, or international Postal Standard, compare Staatsname</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="PostalCode" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>ZIP, compare Postleitzahl</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Region" type="xs:string" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>compare Region</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="State" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>compare Bundesland</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Municipality" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>compare Gemeinde</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="MunicipalityNumber" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>compare Gemeindekennzahl</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Hamlet" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>ZMR use, compare Ortschaft</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="HamletBilingual" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>ZMR use, comapre OrtschaftZweisprachig</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="DeliveryAddress" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="AddressLine" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="StreetName" type="xs:string" minOccurs="0"/>
+ <xs:element name="BuildingNumber" type="xs:string" minOccurs="0"/>
+ <xs:element name="Unit" type="xs:string" minOccurs="0"/>
+ <xs:element name="DoorNumber" type="xs:string" minOccurs="0"/>
+ <xs:element name="PostOfficeBox" type="xs:string" minOccurs="0"/>
+ <xs:element name="LivingQuality" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>zmr use only</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="DropOffPoint" type="xs:boolean" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>zmr use only</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="AreaNumber" type="xs:string" minOccurs="0"/>
+ <xs:element name="AddressRegisterEntry" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>Addressregister database keys used to identify Addresses</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="AddressCode" type="string7"/>
+ <xs:element name="SubCode" type="string3" minOccurs="0"/>
+ <xs:element name="ObjectNumber" type="string7" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="Recipient" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>If Addressis used outside of PersonData a recipient can be specified</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="PersonName" type="PersonNameType" minOccurs="0"/>
+ <xs:element name="AdditionalText" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="Organization" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>rather OrganizationUnit e.G Sales Departement</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="OrganizationName" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>e.g. Smith Ltd</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="type" default="undefined">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="postOfficeBoxAddress"/>
+ <xs:enumeration value="streetAddress"/>
+ <xs:enumeration value="militaryAddress"/>
+ <xs:enumeration value="undefined"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="CompactPostalAddressType">
+ <xs:annotation>
+ <xs:documentation>compare PostAdresseTyp</xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="AbstractAddressType">
+ <xs:sequence>
+ <xs:element name="CountryCode" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>Code for the country, use ISO or internatinal Postalstandard, compare Staatscode</xs:documentation>
+ </xs:annotation>
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:pattern value="[A-Z]{2}"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:element>
+ <xs:element name="CountryName" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>Name of the country, use ISO Name, or international Postal Standard, compare Staatsname</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="PostalCode" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>ZIP, compare Postleitzahl</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Municipality" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>compare Gemeinde</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="DeliveryAddress">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="StreetName" type="xs:string">
+ <xs:annotation>
+ <xs:documentation>if streetname not available use name of Ortschaft</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="BuildingNumber" type="xs:string"/>
+ <xs:element name="Unit" type="xs:string" minOccurs="0"/>
+ <xs:element name="DoorNumber" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="type" default="undefined">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="postOfficeBoxAddress"/>
+ <xs:enumeration value="streetAddress"/>
+ <xs:enumeration value="militaryAddress"/>
+ <xs:enumeration value="undefined"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="InternetAddressType">
+ <xs:annotation>
+ <xs:documentation>e.g. e-mail, webiste, compare InternetAdresseTyp</xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="AbstractAddressType">
+ <xs:sequence minOccurs="0">
+ <xs:element ref="dsig:KeyInfo" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>certificate for secure communication</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Address" type="xs:anyURI">
+ <xs:annotation>
+ <xs:documentation>URI: email-Address, Web, FTP, LDAP, ..., comapre Adress</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>any additional properties</xs:documentation>
+ </xs:annotation>
+ </xs:any>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="TelephoneAddressType">
+ <xs:annotation>
+ <xs:documentation>phone numbers, conmpare TelephoneAdresseTyp</xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="AbstractAddressType">
+ <xs:sequence minOccurs="0">
+ <xs:element name="Type" type="xs:anyURI" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>type of phononumber - category (eg 'Festnetz', 'Mobile', 'fax', ...)</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="Number" type="TelcomNumberType">
+ <xs:annotation>
+ <xs:documentation>phonenumber</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>any additional properties</xs:documentation>
+ </xs:annotation>
+ </xs:any>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="MobileTelcomNumberType">
+ <xs:annotation>
+ <xs:documentation>like TelephoneAddresseType but with additional smsEnabled attribute</xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="TelcomNumberType">
+ <xs:attribute name="smsEnabled" type="xs:boolean" use="optional"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ <xs:complexType name="TelcomNumberType">
+ <xs:annotation>
+ <xs:documentation>formated number or set of telephone number parts</xs:documentation>
+ </xs:annotation>
+ <xs:choice>
+ <xs:element ref="FormattedNumber"/>
+ <xs:group ref="TelcomNumberGroup"/>
+ </xs:choice>
+ </xs:complexType>
+ <xs:group name="TelcomNumberGroup">
+ <xs:annotation>
+ <xs:documentation>set of telephone number parts</xs:documentation>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="InternationalCountryCode" minOccurs="0"/>
+ <xs:element ref="NationalNumber" minOccurs="0"/>
+ <xs:element ref="AreaCityCode" minOccurs="0"/>
+ <xs:element ref="SubscriberNumber"/>
+ <xs:element ref="Extension" minOccurs="0"/>
+ </xs:sequence>
+ </xs:group>
+ <!-- ### auxiliary types ### -->
+ <xs:simpleType name="SexType">
+ <xs:annotation>
+ <xs:documentation>simple type for sex (gender) of person</xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="male"/>
+ <xs:enumeration value="female"/>
+ <xs:enumeration value="unknown"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="DateOfBirthType">
+ <xs:annotation>
+ <xs:documentation>simple type for dates (union), which may omit day and/or month</xs:documentation>
+ </xs:annotation>
+ <xs:union memberTypes="xs:date xs:gYearMonth xs:gYear"/>
+ </xs:simpleType>
+ <xs:simpleType name="DateOfDeathType">
+ <xs:annotation>
+ <xs:documentation>simple type for dates (union), which may omit day and/or month</xs:documentation>
+ </xs:annotation>
+ <xs:union memberTypes="xs:date xs:gYearMonth xs:gYear"/>
+ </xs:simpleType>
+ <xs:simpleType name="MaritalStatusType">
+ <xs:annotation>
+ <xs:documentation>simple type for marital status of a person</xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="single"/>
+ <xs:enumeration value="married"/>
+ <xs:enumeration value="divorced"/>
+ <xs:enumeration value="widowed"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="xStringPatternExtensionType">
+ <xs:annotation>
+ <xs:documentation>pattern type for enlargement of type definitions. Contents as follows
+x:sometext or 12345 or _ or other symbols
+</xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:string">
+ <xs:pattern value="x:\S.*"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="DefinedRelationType">
+ <xs:annotation>
+ <xs:documentation>known relations (family + functional)</xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="family:Parent"/>
+ <xs:enumeration value="family:Child"/>
+ <xs:enumeration value="family:Sibling"/>
+ <xs:enumeration value="family:Grandparent"/>
+ <xs:enumeration value="family:Grandchild"/>
+ <xs:enumeration value="family:Spouse"/>
+ <xs:enumeration value="function:LegalGuardian"/>
+ <xs:enumeration value="function:IsGuardedBy"/>
+ <xs:enumeration value="function:Cohabitant"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="RelationType">
+ <xs:annotation>
+ <xs:documentation>known + any other relation</xs:documentation>
+ </xs:annotation>
+ <xs:union memberTypes="xStringPatternExtensionType DefinedRelationType"/>
+ </xs:simpleType>
+ <xs:simpleType name="DefinedAlternativeNameTypeType">
+ <xs:annotation>
+ <xs:documentation>known types of alternative names</xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="ArtistName"/>
+ <xs:enumeration value="NickName"/>
+ <xs:enumeration value="FormerName"/>
+ <xs:enumeration value="Alias"/>
+ <xs:enumeration value="MaidenName"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="AlternativeNameTypeType">
+ <xs:annotation>
+ <xs:documentation>known + any other alternative name types</xs:documentation>
+ </xs:annotation>
+ <xs:union memberTypes="xStringPatternExtensionType DefinedAlternativeNameTypeType"/>
+ </xs:simpleType>
+ <!-- ### additional data types for ZMR address #### -->
+ <xs:simpleType name="FederalStateType">
+ <xs:annotation>
+ <xs:documentation>zmr use only</xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Wien"/>
+ <xs:enumeration value="Niederösterreich"/>
+ <xs:enumeration value="Burgenland"/>
+ <xs:enumeration value="Oberösterreich"/>
+ <xs:enumeration value="Steiermark"/>
+ <xs:enumeration value="Salzburg"/>
+ <xs:enumeration value="Kärnten"/>
+ <xs:enumeration value="Tirol"/>
+ <xs:enumeration value="Vorarlberg"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <!-- ### strings of defined maximum lenght for use with ZMR address ###-->
+ <xs:simpleType name="string3">
+ <xs:restriction base="xs:string">
+ <xs:maxLength value="3"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="string4">
+ <xs:restriction base="xs:string">
+ <xs:maxLength value="4"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="string7">
+ <xs:restriction base="xs:string">
+ <xs:maxLength value="7"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="string20">
+ <xs:restriction base="xs:string">
+ <xs:maxLength value="20"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="string30">
+ <xs:restriction base="xs:string">
+ <xs:maxLength value="30"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="string50">
+ <xs:restriction base="xs:string">
+ <xs:maxLength value="50"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="string100">
+ <xs:restriction base="xs:string">
+ <xs:maxLength value="100"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name="integer5">
+ <xs:restriction base="xs:integer">
+ <xs:minInclusive value="10000"/>
+ <xs:maxInclusive value="99999"/>
+ </xs:restriction>
+ </xs:simpleType>
+</xs:schema>
diff --git a/common/src/main/resources/resources/schemas/PersonName-1_2.xsd b/common/src/main/resources/resources/schemas/PersonName-1_2.xsd
new file mode 100644
index 000000000..347ed3d7f
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/PersonName-1_2.xsd
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- CHANGES from original HR-XML schema for use with PersonData.xsd:
+ * elementFormDefault set to "qualified" -->
+<!--
+"Copyright The HR-XML Consortium. All Rights Reserved. http://www.hr-xml.org"
+Name: PersonName-1_2.xsd, Second Edition
+Status: Recommendation
+Date this version: 2001-12-17
+Date last version: 2001-09-05
+Purpose: Defines the schema for PersonName
+Author(s): Paul Kiel, Kim Bartkus, CPO Workgroup
+
+Note: This Second Edition corrects an inconsistency between the schema in this xsd file and the schema in the pdf documentation. The documentation is correct. This schema was changed in syntax only, not functionality. When adding attributes to elements, "xsd:restriction" was used. This Second Edition correctly changes it to "xsd:extension".
+
+This HR-XML Consortium Work (including specifications, documents,
+software, and related items) is provided by the copyright holders
+under the following license. By obtaining, using and/or copying
+this work, you (the licensee) agree that you have read, understood,
+and will comply with the following terms and conditions.
+
+Permission to use, copy, modify, or redistribute this Work and
+its documentation, with or without modification, for any purpose
+and without fee or royalty is hereby granted, provided that you
+include the following on ALL copies of the software and
+documentation or portions thereof, including modifications,
+that you make:
+
+1. This notice: "Copyright The HR-XML Consortium. All Rights
+ Reserved. http://www.hr-xml.org"
+2. Notice of any changes or modifications to the The HR-XML
+ Consortium files.
+
+THIS WORK, INCLUDING SPECIFICATIONS, DOCUMENTS, SOFTWARE, OR OTHER
+RELATED ITEMS, IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO
+REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
+NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY
+PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION
+WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS
+OR OTHER RIGHTS.
+
+COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT,
+SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE
+SOFTWARE OR DOCUMENTATION.
+
+TITLE TO COPYRIGHT IN THIS WORK AND ANY ASSOCIATED DOCUMENTATION
+WILL AT ALL TIMES REMAIN WITH COPYRIGHT HOLDERS.
+-->
+<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
+ <xsd:complexType name="PersonNameType">
+ <xsd:sequence>
+ <xsd:element name="FormattedName" minOccurs="0" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="type" default="presentation">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="presentation"/>
+ <xsd:enumeration value="legal"/>
+ <xsd:enumeration value="sortOrder"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="LegalName" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="GivenName" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="PreferredGivenName" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="MiddleName" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="FamilyName" minOccurs="0" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="primary" default="undefined">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="true"/>
+ <xsd:enumeration value="false"/>
+ <xsd:enumeration value="undefined"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="prefix" type="xsd:string"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Affix" minOccurs="0" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="type" use="required">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="academicGrade"/>
+ <xsd:enumeration value="aristocraticPrefix"/>
+ <xsd:enumeration value="aristocraticTitle"/>
+ <xsd:enumeration value="familyNamePrefix"/>
+ <xsd:enumeration value="familyNameSuffix"/>
+ <xsd:enumeration value="formOfAddress"/>
+ <xsd:enumeration value="generation"/>
+ <xsd:enumeration value="qualification"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:element name="PersonName" type="PersonNameType"/>
+</xsd:schema>
diff --git a/common/src/main/resources/resources/schemas/PostalAddress-1_2.xsd b/common/src/main/resources/resources/schemas/PostalAddress-1_2.xsd
new file mode 100644
index 000000000..b3d89abbb
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/PostalAddress-1_2.xsd
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- CHANGES from original HR-XML schema for use with PersonData.xsd:
+ * elementFormDefault set to "qualified"
+ * CountryCode set to minOccurs="0" -->
+<!--
+"Copyright The HR-XML Consortium. All Rights Reserved. http://www.hr-xml.org"
+Name: PostalAddress-1_2.xsd
+Status: Recommendation
+Date this version: 2001-08-20
+Date last version: 2001-07-20
+Purpose: Defines the schema for Postal Address
+Author(s): Paul Kiel, Kim Bartkus, CPO Workgroup
+
+This HR-XML Consortium Work (including specifications, documents,
+software, and related items) is provided by the copyright holders
+under the following license. By obtaining, using and/or copying
+this work, you (the licensee) agree that you have read, understood,
+and will comply with the following terms and conditions.
+
+Permission to use, copy, modify, or redistribute this Work and
+its documentation, with or without modification, for any purpose
+and without fee or royalty is hereby granted, provided that you
+include the following on ALL copies of the software and
+documentation or portions thereof, including modifications,
+that you make:
+
+1. This notice: "Copyright The HR-XML Consortium. All Rights
+ Reserved. http://www.hr-xml.org"
+2. Notice of any changes or modifications to the The HR-XML
+ Consortium files.
+
+THIS WORK, INCLUDING SPECIFICATIONS, DOCUMENTS, SOFTWARE, OR OTHER
+RELATED ITEMS, IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO
+REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
+NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY
+PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION
+WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS
+OR OTHER RIGHTS.
+
+COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT,
+SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE
+SOFTWARE OR DOCUMENTATION.
+
+TITLE TO COPYRIGHT IN THIS WORK AND ANY ASSOCIATED DOCUMENTATION
+WILL AT ALL TIMES REMAIN WITH COPYRIGHT HOLDERS.
+-->
+<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
+ <xsd:include schemaLocation="PersonName-1_2.xsd"/>
+ <xsd:complexType name="PostalAddressType">
+ <xsd:sequence>
+ <xsd:element name="CountryCode" minOccurs="0">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:pattern value="[A-Z]{2}"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:element name="PostalCode" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="Region" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="Municipality" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="DeliveryAddress" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="AddressLine" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="StreetName" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="BuildingNumber" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="Unit" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="PostOfficeBox" type="xsd:string" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Recipient" minOccurs="0" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="PersonName" type="PersonNameType" minOccurs="0"/>
+ <xsd:element name="AdditionalText" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="Organization" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="OrganizationName" type="xsd:string" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="type" default="undefined">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="postOfficeBoxAddress"/>
+ <xsd:enumeration value="streetAddress"/>
+ <xsd:enumeration value="militaryAddress"/>
+ <xsd:enumeration value="undefined"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ </xsd:complexType>
+ <xsd:element name="PostalAddress" type="PostalAddressType"/>
+</xsd:schema>
diff --git a/common/src/main/resources/resources/schemas/TelcomNumber-1_0.xsd b/common/src/main/resources/resources/schemas/TelcomNumber-1_0.xsd
new file mode 100644
index 000000000..f89702aeb
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/TelcomNumber-1_0.xsd
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- CHANGES from original HR-XML schema for use with PersonData.xsd:
+ * elementFormDefault set to "qualified" -->
+<!--
+"Copyright The HR-XML Consortium. All Rights Reserved. http://www.hr-xml.org"
+Name: TelcomNumber-1_0.xsd
+Status:Recommendation
+Date this version: 2002-01-31
+Date last version: 2001-12-20
+Purpose: Schema for Telecommunications data.
+Author(s): Don Simonson, Robert Half Int'l., CPO Workgroup
+
+This HR-XML Consortium Work (including specifications, documents,
+software, and related items) is provided by the copyright holders
+under the following license. By obtaining, using and/or copying
+this work, you (the licensee) agree that you have read, understood,
+and will comply with the following terms and conditions.
+
+Permission to use, copy, modify, or redistribute this Work and
+its documentation, with or without modification, for any purpose
+and without fee or royalty is hereby granted, provided that you
+include the following on ALL copies of the software and
+documentation or portions thereof, including modifications,
+that you make:
+
+1. This notice: "Copyright The HR-XML Consortium. All Rights
+ Reserved. http://www.hr-xml.org"
+2. Notice of any changes or modifications to the The HR-XML
+ Consortium files.
+
+THIS WORK, INCLUDING SPECIFICATIONS, DOCUMENTS, SOFTWARE, OR OTHER
+RELATED ITEMS, IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO
+REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
+NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY
+PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION
+WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS
+OR OTHER RIGHTS.
+
+COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT,
+SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE
+SOFTWARE OR DOCUMENTATION.
+
+TITLE TO COPYRIGHT IN THIS WORK AND ANY ASSOCIATED DOCUMENTATION
+WILL AT ALL TIMES REMAIN WITH COPYRIGHT HOLDERS.
+-->
+<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
+ <xsd:group name="TelcomNumberGroup">
+ <xsd:sequence>
+ <xsd:element ref="InternationalCountryCode" minOccurs="0"/>
+ <xsd:element ref="NationalNumber" minOccurs="0"/>
+ <xsd:element ref="AreaCityCode" minOccurs="0"/>
+ <xsd:element ref="SubscriberNumber"/>
+ <xsd:element ref="Extension" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:group>
+ <xsd:element name="FormattedNumber" type="xsd:string"/>
+ <xsd:element name="InternationalCountryCode" type="xsd:string"/>
+ <xsd:element name="NationalNumber" type="xsd:string"/>
+ <xsd:element name="AreaCityCode" type="xsd:string"/>
+ <xsd:element name="SubscriberNumber" type="xsd:string"/>
+ <xsd:complexType name="TelcomNumberType">
+ <xsd:choice>
+ <xsd:element ref="FormattedNumber"/>
+ <xsd:group ref="TelcomNumberGroup"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:element name="Extension" type="xsd:string"/>
+ <xsd:element name="Telephone" type="TelcomNumberType"/>
+ <xsd:element name="Mobile" type="MobileTelcomNumberType"/>
+ <xsd:element name="Fax" type="TelcomNumberType"/>
+ <xsd:element name="Pager" type="TelcomNumberType"/>
+ <xsd:element name="TTYTDD" type="TelcomNumberType"/>
+ <xsd:complexType name="MobileTelcomNumberType">
+ <xsd:complexContent>
+ <xsd:extension base="TelcomNumberType">
+ <xsd:attribute name="smsEnabled" type="xsd:boolean" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="TelcomNumberListType">
+ <xsd:sequence>
+ <xsd:element ref="Telephone" minOccurs="0"/>
+ <xsd:element ref="Mobile" minOccurs="0"/>
+ <xsd:element ref="Fax" minOccurs="0"/>
+ <xsd:element ref="Pager" minOccurs="0"/>
+ <xsd:element ref="TTYTDD" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+</xsd:schema>
diff --git a/common/src/main/resources/resources/schemas/XAdES-1.1.1.xsd b/common/src/main/resources/resources/schemas/XAdES-1.1.1.xsd
new file mode 100644
index 000000000..718061048
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/XAdES-1.1.1.xsd
@@ -0,0 +1,545 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema targetNamespace="http://uri.etsi.org/01903/v1.1.1#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://uri.etsi.org/01903/v1.1.1#"
+xmlns:ds="http://www.w3.org/2000/09/xmldsig#" elementFormDefault="qualified">
+
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd"/>
+
+<!-- Start auxiliary types definitions: AnyType, ObjectIdentifierType,
+EncapsulatedPKIDataType and TimestampType-->
+
+<!-- Start AnyType -->
+
+ <xsd:element name="Any" type="AnyType"/>
+ <xsd:complexType name="AnyType" mixed="true">
+ <xsd:sequence>
+ <xsd:any namespace="##any"/>
+ </xsd:sequence>
+ <xsd:anyAttribute namespace="##any"/>
+ </xsd:complexType>
+
+<!-- End AnyType -->
+
+<!-- Start ObjectIdentifierType-->
+
+ <xsd:element name="ObjectIdentifier" type="ObjectIdentifierType"/>
+ <xsd:complexType name="ObjectIdentifierType">
+ <xsd:sequence>
+ <xsd:element name="Identifier" type="IdentifierType"/>
+ <xsd:element name="Description" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="DocumentationReferences" type="DocumentationReferencesType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="IdentifierType">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:anyURI">
+ <xsd:attribute name="Qualifier" type="QualifierType" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ <xsd:simpleType name="QualifierType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="OIDAsURI"/>
+ <xsd:enumeration value="OIDAsURN"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:complexType name="DocumentationReferencesType">
+ <xsd:sequence maxOccurs="unbounded">
+ <xsd:element name="DocumentationReference" type="xsd:anyURI"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+<!-- End ObjectIdentifierType-->
+
+<!-- Start EncapsulatedPKIDataType-->
+
+ <xsd:element name="EncapsulatedPKIData" type="EncapsulatedPKIDataType"/>
+ <xsd:complexType name="EncapsulatedPKIDataType">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:base64Binary">
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- End EncapsulatedPKIDataType -->
+
+<!-- Start TimeStampType -->
+
+ <xsd:element name="TimeStamp" type="TimeStampType"/>
+ <xsd:complexType name="TimeStampType">
+ <xsd:sequence>
+ <xsd:element name="HashDataInfo" type="HashDataInfoType" maxOccurs="unbounded"/>
+ <xsd:choice>
+ <xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>
+ <xsd:element name="XMLTimeStamp" type="AnyType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="HashDataInfoType">
+ <xsd:sequence>
+ <xsd:element name="Transforms" type="ds:TransformsType" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="uri" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+
+<!-- End TimeStampType -->
+
+<!-- End auxiliary types definitions-->
+
+<!-- Start container types -->
+
+<!-- Start QualifyingProperties -->
+
+ <xsd:element name="QualifyingProperties" type="QualifyingPropertiesType"/>
+
+ <xsd:complexType name="QualifyingPropertiesType">
+ <xsd:sequence>
+ <xsd:element name="SignedProperties" type="SignedPropertiesType" minOccurs="0"/>
+ <xsd:element name="UnsignedProperties" type="UnsignedPropertiesType" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="Target" type="xsd:anyURI" use="required"/>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+ </xsd:complexType>
+
+<!-- End QualifyingProperties -->
+
+<!-- Start SignedProperties-->
+
+ <xsd:element name="SignedProperties" type="SignedPropertiesType"/>
+
+ <xsd:complexType name="SignedPropertiesType">
+ <xsd:sequence>
+ <xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType"/>
+ <xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+ </xsd:complexType>
+
+<!-- End SignedProperties-->
+
+<!-- Start UnsignedProperties-->
+
+<xsd:element name="UnsignedProperties" type="UnsignedPropertiesType" />
+
+ <xsd:complexType name="UnsignedPropertiesType">
+ <xsd:sequence>
+ <xsd:element name="UnsignedSignatureProperties"
+ type="UnsignedSignaturePropertiesType" minOccurs="0"/>
+ <xsd:element name="UnsignedDataObjectProperties"
+ type="UnsignedDataObjectPropertiesType" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+ </xsd:complexType>
+
+<!-- End UnsignedProperties-->
+
+<!-- Start SignedSignatureProperties-->
+
+<xsd:element name="SignedSignatureProperties"
+ type="SignedSignaturePropertiesType" />
+
+<xsd:complexType name="SignedSignaturePropertiesType">
+ <xsd:sequence>
+ <xsd:element name="SigningTime" type="xsd:dateTime"/>
+ <xsd:element name="SigningCertificate" type="CertIDListType"/>
+ <xsd:element name="SignaturePolicyIdentifier"
+ type="SignaturePolicyIdentifierType"/>
+ <xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType"
+ minOccurs="0"/>
+ <xsd:element name="SignerRole" type="SignerRoleType" minOccurs="0"/>
+ </xsd:sequence>
+</xsd:complexType>
+
+<!-- End SignedSignatureProperties-->
+
+
+<!-- Start SignedDataObjectProperties-->
+
+<xsd:element name="SignedDataObjectProperties"
+ type="SignedDataObjectPropertiesType"/>
+
+<xsd:complexType name="SignedDataObjectPropertiesType">
+ <xsd:sequence>
+ <xsd:element name="DataObjectFormat" type="DataObjectFormatType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="CommitmentTypeIndication"
+ type="CommitmentTypeIndicationType" minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="AllDataObjectsTimeStamp" type="TimeStampType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="IndividualDataObjectsTimeStamp" type="TimeStampType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+</xsd:complexType>
+
+<!-- End SignedDataObjectProperties-->
+
+
+<!-- Start UnsignedSignatureProperties-->
+
+<xsd:element name="UnsignedSignatureProperties"
+ type="UnsignedSignaturePropertiesType"/>
+
+<xsd:complexType name="UnsignedSignaturePropertiesType">
+ <xsd:sequence>
+ <xsd:element name="CounterSignature" type="CounterSignatureType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="SignatureTimeStamp" type="TimeStampType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="CompleteCertificateRefs"
+ type="CompleteCertificateRefsType" minOccurs="0"/>
+ <xsd:element name="CompleteRevocationRefs"
+ type="CompleteRevocationRefsType" minOccurs="0"/>
+ <xsd:choice>
+ <xsd:element name="SigAndRefsTimeStamp" type="TimeStampType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="RefsOnlyTimeStamp" type="TimeStampType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ <xsd:element name="CertificateValues" type="CertificateValuesType"
+ minOccurs="0"/>
+ <xsd:element name="RevocationValues" type="RevocationValuesType"
+ minOccurs="0"/>
+ <xsd:element name="ArchiveTimeStamp" type="TimeStampType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+<!-- End UnsignedSignatureProperties-->
+
+
+<!-- Start UnsignedDataObjectProperties-->
+
+<xsd:element name="UnsignedDataObjectProperties"
+ type="UnsignedDataObjectPropertiesType" />
+
+<xsd:complexType name="UnsignedDataObjectPropertiesType">
+ <xsd:sequence>
+ <xsd:element name="UnsignedDataObjectProperty" type="AnyType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+</xsd:complexType>
+
+<!-- End UnsignedDataObjectProperties-->
+
+<!-- Start QualifyingPropertiesReference-->
+
+<xsd:element name="QualifyingPropertiesReference"
+ type="QualifyingPropertiesReferenceType"/>
+
+<xsd:complexType name="QualifyingPropertiesReferenceType">
+ <xsd:sequence>
+ <xsd:element name="Transforms" type="ds:TransformsType" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+</xsd:complexType>
+
+<!-- End QualifyingPropertiesReference-->
+
+<!-- End container types -->
+
+
+<!-- Start SigningTime element -->
+ <xsd:element name="SigningTime" type="xsd:dateTime"/>
+
+<!-- End SigningTime element -->
+
+<!-- Start SigningCertificate -->
+ <xsd:element name="SigningCertificate" type="CertIDListType"/>
+ <xsd:complexType name="CertIDListType">
+ <xsd:sequence>
+ <xsd:element name="Cert" type="CertIDType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CertIDType">
+ <xsd:sequence>
+ <xsd:element name="CertDigest" type="DigestAlgAndValueType"/>
+ <xsd:element name="IssuerSerial" type="ds:X509IssuerSerialType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="DigestAlgAndValueType">
+ <xsd:sequence>
+ <xsd:element name="DigestMethod" type="ds:DigestMethodType"/>
+ <xsd:element name="DigestValue" type="ds:DigestValueType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+<!-- End SigningCertificate -->
+
+<!-- Start SignaturePolicyIdentifier -->
+
+ <xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType"/>
+ <xsd:complexType name="SignaturePolicyIdentifierType">
+ <xsd:choice>
+ <xsd:element name="SignaturePolicyId" type="SignaturePolicyIdType"/>
+ <xsd:element name="SignaturePolicyImplied"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:complexType name="SignaturePolicyIdType">
+ <xsd:sequence>
+ <xsd:element name="SigPolicyId" type="ObjectIdentifierType"/>
+ <xsd:element ref="ds:Transforms" minOccurs="0"/>
+ <xsd:element name="SigPolicyHash" type="DigestAlgAndValueType"/>
+ <xsd:element name="SigPolicyQualifiers" type="SigPolicyQualifiersListType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="SigPolicyQualifiersListType">
+ <xsd:sequence>
+ <xsd:element name="SigPolicyQualifier" type="AnyType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:element name="SPURI" type="xsd:anyURI"/>
+ <xsd:element name="SPUserNotice" type="SPUserNoticeType"/>
+ <xsd:complexType name="SPUserNoticeType">
+ <xsd:sequence>
+ <xsd:element name="NoticeRef" type="NoticeReferenceType" minOccurs="0"/>
+ <xsd:element name="ExplicitText" type="xsd:string" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="NoticeReferenceType">
+ <xsd:sequence>
+ <xsd:element name="Organization" type="xsd:string"/>
+ <xsd:element name="NoticeNumbers" type="IntegerListType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="IntegerListType">
+ <xsd:sequence>
+ <xsd:element name="int" type="xsd:integer" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+<!-- End SignaturePolicyIdentifier -->
+
+
+<!-- Start CounterSignature -->
+ <xsd:element name="CounterSignature" type="CounterSignatureType"/>
+ <xsd:complexType name="CounterSignatureType">
+ <xsd:sequence>
+ <xsd:element ref="ds:Signature"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+<!-- End CounterSignature -->
+
+<!-- Start DataObjectFormat -->
+
+ <xsd:element name="DataObjectFormat" type="DataObjectFormatType"/>
+ <xsd:complexType name="DataObjectFormatType">
+ <xsd:sequence>
+ <xsd:element name="Description" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="ObjectIdentifier" type="ObjectIdentifierType" minOccurs="0"/>
+ <xsd:element name="MimeType" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="Encoding" type="xsd:anyURI" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="ObjectReference" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+
+<!-- End DataObjectFormat -->
+
+<!-- Start CommitmentTypeIndication -->
+
+ <xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType"/>
+ <xsd:complexType name="CommitmentTypeIndicationType">
+ <xsd:sequence>
+ <xsd:element name="CommitmentTypeId" type="ObjectIdentifierType"/>
+ <xsd:choice>
+ <xsd:element name="ObjectReference" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="AllSignedDataObjects"/>
+ </xsd:choice>
+ <xsd:element name="CommitmentTypeQualifiers" type="CommitmentTypeQualifiersListType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CommitmentTypeQualifiersListType">
+ <xsd:sequence>
+ <xsd:element name="CommitmentTypeQualifier" type="AnyType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+<!-- End CommitmentTypeIndication -->
+
+<!-- Start SignatureProductionPlace -->
+
+ <xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType"/>
+ <xsd:complexType name="SignatureProductionPlaceType">
+ <xsd:sequence>
+ <xsd:element name="City" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="StateOrProvince" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="PostalCode" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="CountryName" type="xsd:string" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+<!-- End SignatureProductionPlace -->
+
+<!-- Start SignerRole -->
+
+<xsd:element name="SignerRole" type="SignerRoleType"/>
+<xsd:complexType name="SignerRoleType">
+ <xsd:sequence>
+ <xsd:element name="ClaimedRoles" type="ClaimedRolesListType"
+ minOccurs="0"/>
+ <xsd:element name="CertifiedRoles" type="CertifiedRolesListType"
+ minOccurs="0"/>
+ </xsd:sequence>
+</xsd:complexType>
+
+<xsd:complexType name="ClaimedRolesListType">
+ <xsd:sequence>
+ <xsd:element name="ClaimedRole" type="AnyType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+</xsd:complexType>
+
+<xsd:complexType name="CertifiedRolesListType">
+ <xsd:sequence>
+ <xsd:element name="CertifiedRole" type="EncapsulatedPKIDataType"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+</xsd:complexType>
+
+<!-- End SignerRole -->
+
+
+ <xsd:element name="AllDataObjectsTimeStamp" type="TimeStampType"/>
+
+ <xsd:element name="IndividualDataObjectsTimeStamp" type="TimeStampType"/>
+
+ <xsd:element name="SignatureTimeStamp" type="TimeStampType"/>
+
+<!-- Start CompleteCertificateRefs -->
+
+<xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType"/>
+
+<xsd:complexType name="CompleteCertificateRefsType">
+ <xsd:sequence>
+ <xsd:element name="CertRefs" type="CertIDListType" />
+ </xsd:sequence>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+</xsd:complexType>
+
+<!-- End CompleteCertificateRefs -->
+
+
+<!-- Start CompleteRevocationRefs-->
+
+<xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType"/>
+
+<xsd:complexType name="CompleteRevocationRefsType">
+ <xsd:sequence>
+ <xsd:element name="CRLRefs" type="CRLRefsType" minOccurs="0"/>
+ <xsd:element name="OCSPRefs" type="OCSPRefsType" minOccurs="0"/>
+ <xsd:element name="OtherRefs" type="OtherCertStatusRefsType" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+</xsd:complexType>
+
+<xsd:complexType name="CRLRefsType">
+ <xsd:sequence>
+ <xsd:element name="CRLRef" type="CRLRefType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+</xsd:complexType>
+
+<xsd:complexType name="CRLRefType">
+ <xsd:sequence>
+ <xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType"/>
+ <xsd:element name="CRLIdentifier" type="CRLIdentifierType" minOccurs="0"/>
+ </xsd:sequence>
+</xsd:complexType>
+
+<xsd:complexType name="CRLIdentifierType">
+ <xsd:sequence>
+ <xsd:element name="Issuer" type="xsd:string"/>
+ <xsd:element name="IssueTime" type="xsd:dateTime" />
+ <xsd:element name="Number" type="xsd:integer" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
+</xsd:complexType>
+
+<xsd:complexType name="OCSPRefsType">
+ <xsd:sequence>
+ <xsd:element name="OCSPRef" type="OCSPRefType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+</xsd:complexType>
+
+<xsd:complexType name="OCSPRefType">
+ <xsd:sequence>
+ <xsd:element name="OCSPIdentifier" type="OCSPIdentifierType"/>
+ <xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType"
+ minOccurs="0"/>
+ </xsd:sequence>
+</xsd:complexType>
+
+<xsd:complexType name="OCSPIdentifierType">
+ <xsd:sequence>
+ <xsd:element name="ResponderID" type="xsd:string"/>
+ <xsd:element name="ProducedAt" type="xsd:dateTime"/>
+ </xsd:sequence>
+ <xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
+</xsd:complexType>
+
+<xsd:complexType name="OtherCertStatusRefsType">
+ <xsd:sequence>
+ <xsd:element name="OtherRef" type="AnyType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+</xsd:complexType>
+
+<!-- End CompleteRevocationRefs-->
+
+
+<xsd:element name="SigAndRefsTimeStamp" type="TimeStampType"/>
+
+<xsd:element name="RefsOnlyTimeStamp" type="TimeStampType"/>
+
+<!-- Start CertificateValues -->
+
+<xsd:element name="CertificateValues" type="CertificateValuesType"/>
+
+<xsd:complexType name="CertificateValuesType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="EncapsulatedX509Certificate" type="EncapsulatedPKIDataType"/>
+ <xsd:element name="OtherCertificate" type="AnyType"/>
+ </xsd:choice>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+</xsd:complexType>
+
+<!-- End CertificateValues -->
+
+<!-- Start RevocationValues-->
+
+<xsd:element name="RevocationValues" type="RevocationValuesType"/>
+
+<xsd:complexType name="RevocationValuesType">
+ <xsd:sequence>
+ <xsd:element name="CRLValues" type="CRLValuesType" minOccurs="0"/>
+ <xsd:element name="OCSPValues" type="OCSPValuesType" minOccurs="0"/>
+ <xsd:element name="OtherValues" type="OtherCertStatusValuesType" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+</xsd:complexType>
+
+<xsd:complexType name="CRLValuesType">
+ <xsd:sequence>
+ <xsd:element name="EncapsulatedCRLValue" type="EncapsulatedPKIDataType"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+</xsd:complexType>
+
+<xsd:complexType name="OCSPValuesType">
+ <xsd:sequence>
+ <xsd:element name="EncapsulatedOCSPValue"
+ type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+</xsd:complexType>
+<xsd:complexType name="OtherCertStatusValuesType">
+ <xsd:sequence>
+ <xsd:element name="OtherValue" type="AnyType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+</xsd:complexType>
+
+<!-- End RevocationValues-->
+
+<xsd:element name="ArchiveTimeStamp" type="TimeStampType"/>
+
+
+</xsd:schema>
diff --git a/common/src/main/resources/resources/schemas/XAdES-1.2.2.xsd b/common/src/main/resources/resources/schemas/XAdES-1.2.2.xsd
new file mode 100644
index 000000000..80ccf1289
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/XAdES-1.2.2.xsd
@@ -0,0 +1,551 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema targetNamespace="http://uri.etsi.org/01903/v1.2.2#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://uri.etsi.org/01903/v1.2.2#"
+xmlns:ds="http://www.w3.org/2000/09/xmldsig#" elementFormDefault="qualified">
+
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd"/>
+
+<!-- Start auxiliary types definitions: AnyType, ObjectIdentifierType,
+EncapsulatedPKIDataType and TimestampType-->
+
+<!-- Start AnyType -->
+
+ <xsd:element name="Any" type="AnyType"/>
+ <xsd:complexType name="AnyType" mixed="true">
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:any namespace="##any" processContents="lax"/>
+ </xsd:sequence>
+ <xsd:anyAttribute namespace="##any"/>
+ </xsd:complexType>
+
+<!-- End AnyType -->
+
+<!-- Start ObjectIdentifierType-->
+
+ <xsd:element name="ObjectIdentifier" type="ObjectIdentifierType"/>
+ <xsd:complexType name="ObjectIdentifierType">
+ <xsd:sequence>
+ <xsd:element name="Identifier" type="IdentifierType"/>
+ <xsd:element name="Description" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="DocumentationReferences" type="DocumentationReferencesType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="IdentifierType">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:anyURI">
+ <xsd:attribute name="Qualifier" type="QualifierType" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ <xsd:simpleType name="QualifierType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="OIDAsURI"/>
+ <xsd:enumeration value="OIDAsURN"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:complexType name="DocumentationReferencesType">
+ <xsd:sequence maxOccurs="unbounded">
+ <xsd:element name="DocumentationReference" type="xsd:anyURI"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+<!-- End ObjectIdentifierType-->
+
+<!-- Start EncapsulatedPKIDataType-->
+
+ <xsd:element name="EncapsulatedPKIData" type="EncapsulatedPKIDataType"/>
+ <xsd:complexType name="EncapsulatedPKIDataType">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:base64Binary">
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+<!-- End EncapsulatedPKIDataType -->
+
+<!-- Start TimeStampType -->
+
+ <xsd:element name="TimeStamp" type="TimeStampType"/>
+ <xsd:complexType name="TimeStampType">
+ <xsd:sequence>
+ <xsd:element name="Include" type="IncludeType" maxOccurs="unbounded"/>
+ <xsd:element ref="ds:CanonicalizationMethod" minOccurs="0"/>
+ <xsd:choice>
+ <xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>
+ <xsd:element name="XMLTimeStamp" type="AnyType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="IncludeType">
+ <xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
+ <xsd:attribute name="referencedData" type="xsd:boolean" use="optional"/>
+ </xsd:complexType>
+
+<!-- End TimeStampType -->
+
+<!-- End auxiliary types definitions-->
+
+<!-- Start container types -->
+
+<!-- Start QualifyingProperties -->
+
+ <xsd:element name="QualifyingProperties" type="QualifyingPropertiesType"/>
+
+ <xsd:complexType name="QualifyingPropertiesType">
+ <xsd:sequence>
+ <xsd:element name="SignedProperties" type="SignedPropertiesType" minOccurs="0"/>
+ <xsd:element name="UnsignedProperties" type="UnsignedPropertiesType" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="Target" type="xsd:anyURI" use="required"/>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+ </xsd:complexType>
+
+<!-- End QualifyingProperties -->
+
+<!-- Start SignedProperties-->
+
+ <xsd:element name="SignedProperties" type="SignedPropertiesType"/>
+
+ <xsd:complexType name="SignedPropertiesType">
+ <xsd:sequence>
+ <xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType"/>
+ <xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+ </xsd:complexType>
+
+<!-- End SignedProperties-->
+
+<!-- Start UnsignedProperties-->
+
+<xsd:element name="UnsignedProperties" type="UnsignedPropertiesType" />
+
+ <xsd:complexType name="UnsignedPropertiesType">
+ <xsd:sequence>
+ <xsd:element name="UnsignedSignatureProperties"
+ type="UnsignedSignaturePropertiesType" minOccurs="0"/>
+ <xsd:element name="UnsignedDataObjectProperties"
+ type="UnsignedDataObjectPropertiesType" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+ </xsd:complexType>
+
+<!-- End UnsignedProperties-->
+
+<!-- Start SignedSignatureProperties-->
+
+<xsd:element name="SignedSignatureProperties"
+ type="SignedSignaturePropertiesType" />
+
+<xsd:complexType name="SignedSignaturePropertiesType">
+ <xsd:sequence>
+ <xsd:element name="SigningTime" type="xsd:dateTime" minOccurs="0"/>
+ <xsd:element name="SigningCertificate" type="CertIDListType" minOccurs="0"/>
+ <xsd:element name="SignaturePolicyIdentifier"
+type="SignaturePolicyIdentifierType" minOccurs="0"/>
+ <xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType"
+ minOccurs="0"/>
+ <xsd:element name="SignerRole" type="SignerRoleType" minOccurs="0"/>
+ </xsd:sequence>
+</xsd:complexType>
+
+<!-- End SignedSignatureProperties-->
+
+
+<!-- Start SignedDataObjectProperties-->
+
+<xsd:element name="SignedDataObjectProperties"
+ type="SignedDataObjectPropertiesType"/>
+
+<xsd:complexType name="SignedDataObjectPropertiesType">
+ <xsd:sequence>
+ <xsd:element name="DataObjectFormat" type="DataObjectFormatType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="CommitmentTypeIndication"
+ type="CommitmentTypeIndicationType" minOccurs="0"
+ maxOccurs="unbounded"/>
+ <xsd:element name="AllDataObjectsTimeStamp" type="TimeStampType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="IndividualDataObjectsTimeStamp" type="TimeStampType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+</xsd:complexType>
+
+<!-- End SignedDataObjectProperties-->
+
+
+<!-- Start UnsignedSignatureProperties-->
+
+<xsd:element name="UnsignedSignatureProperties"
+ type="UnsignedSignaturePropertiesType"/>
+
+<xsd:complexType name="UnsignedSignaturePropertiesType">
+ <xsd:sequence>
+ <xsd:element name="CounterSignature" type="CounterSignatureType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="SignatureTimeStamp" type="TimeStampType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="CompleteCertificateRefs"
+ type="CompleteCertificateRefsType" minOccurs="0"/>
+ <xsd:element name="CompleteRevocationRefs"
+ type="CompleteRevocationRefsType" minOccurs="0"/>
+ <xsd:element name="AttributeCertificateRefs"
+ type="CompleteCertificateRefsType" minOccurs="0"/>
+ <xsd:element name="AttributeRevocationRefs"
+ type="CompleteRevocationRefsType" minOccurs="0"/>
+ <xsd:choice>
+ <xsd:element name="SigAndRefsTimeStamp" type="TimeStampType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="RefsOnlyTimeStamp" type="TimeStampType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:choice>
+ <xsd:element name="CertificateValues"
+ type="CertificateValuesType" minOccurs="0"/>
+ <xsd:element name="RevocationValues" type="RevocationValuesType"
+ minOccurs="0"/>
+ <xsd:element name="ArchiveTimeStamp" type="TimeStampType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+
+<!-- End UnsignedSignatureProperties-->
+
+
+<!-- Start UnsignedDataObjectProperties-->
+
+<xsd:element name="UnsignedDataObjectProperties"
+ type="UnsignedDataObjectPropertiesType" />
+
+<xsd:complexType name="UnsignedDataObjectPropertiesType">
+ <xsd:sequence>
+ <xsd:element name="UnsignedDataObjectProperty" type="AnyType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+</xsd:complexType>
+
+<!-- End UnsignedDataObjectProperties-->
+
+<!-- Start QualifyingPropertiesReference-->
+
+<xsd:element name="QualifyingPropertiesReference"
+ type="QualifyingPropertiesReferenceType"/>
+
+<xsd:complexType name="QualifyingPropertiesReferenceType">
+ <xsd:sequence>
+ <xsd:element ref="ds:Transforms" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+</xsd:complexType>
+
+<!-- End QualifyingPropertiesReference-->
+
+<!-- End container types -->
+
+
+<!-- Start SigningTime element -->
+ <xsd:element name="SigningTime" type="xsd:dateTime"/>
+
+<!-- End SigningTime element -->
+
+<!-- Start SigningCertificate -->
+ <xsd:element name="SigningCertificate" type="CertIDListType"/>
+ <xsd:complexType name="CertIDListType">
+ <xsd:sequence>
+ <xsd:element name="Cert" type="CertIDType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CertIDType">
+ <xsd:sequence>
+ <xsd:element name="CertDigest" type="DigestAlgAndValueType"/>
+ <xsd:element name="IssuerSerial" type="ds:X509IssuerSerialType"/>
+ </xsd:sequence>
+ <xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
+ </xsd:complexType>
+ <xsd:complexType name="DigestAlgAndValueType">
+ <xsd:sequence>
+ <xsd:element ref="ds:DigestMethod"/>
+ <xsd:element ref="ds:DigestValue"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+<!-- End SigningCertificate -->
+
+<!-- Start SignaturePolicyIdentifier -->
+
+ <xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType"/>
+ <xsd:complexType name="SignaturePolicyIdentifierType">
+ <xsd:choice>
+ <xsd:element name="SignaturePolicyId" type="SignaturePolicyIdType"/>
+ <xsd:element name="SignaturePolicyImplied"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:complexType name="SignaturePolicyIdType">
+ <xsd:sequence>
+ <xsd:element name="SigPolicyId" type="ObjectIdentifierType"/>
+ <xsd:element ref="ds:Transforms" minOccurs="0"/>
+ <xsd:element name="SigPolicyHash" type="DigestAlgAndValueType"/>
+ <xsd:element name="SigPolicyQualifiers" type="SigPolicyQualifiersListType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="SigPolicyQualifiersListType">
+ <xsd:sequence>
+ <xsd:element name="SigPolicyQualifier" type="AnyType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:element name="SPURI" type="xsd:anyURI"/>
+ <xsd:element name="SPUserNotice" type="SPUserNoticeType"/>
+ <xsd:complexType name="SPUserNoticeType">
+ <xsd:sequence>
+ <xsd:element name="NoticeRef" type="NoticeReferenceType" minOccurs="0"/>
+ <xsd:element name="ExplicitText" type="xsd:string" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="NoticeReferenceType">
+ <xsd:sequence>
+ <xsd:element name="Organization" type="xsd:string"/>
+ <xsd:element name="NoticeNumbers" type="IntegerListType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="IntegerListType">
+ <xsd:sequence>
+ <xsd:element name="int" type="xsd:integer" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+<!-- End SignaturePolicyIdentifier -->
+
+
+<!-- Start CounterSignature -->
+ <xsd:element name="CounterSignature" type="CounterSignatureType"/>
+ <xsd:complexType name="CounterSignatureType">
+ <xsd:sequence>
+ <xsd:element ref="ds:Signature"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+<!-- End CounterSignature -->
+
+<!-- Start DataObjectFormat -->
+
+ <xsd:element name="DataObjectFormat" type="DataObjectFormatType"/>
+ <xsd:complexType name="DataObjectFormatType">
+ <xsd:sequence>
+ <xsd:element name="Description" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="ObjectIdentifier" type="ObjectIdentifierType" minOccurs="0"/>
+ <xsd:element name="MimeType" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="Encoding" type="xsd:anyURI" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="ObjectReference" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+
+<!-- End DataObjectFormat -->
+
+<!-- Start CommitmentTypeIndication -->
+
+ <xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType"/>
+ <xsd:complexType name="CommitmentTypeIndicationType">
+ <xsd:sequence>
+ <xsd:element name="CommitmentTypeId" type="ObjectIdentifierType"/>
+ <xsd:choice>
+ <xsd:element name="ObjectReference" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="AllSignedDataObjects"/>
+ </xsd:choice>
+ <xsd:element name="CommitmentTypeQualifiers" type="CommitmentTypeQualifiersListType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CommitmentTypeQualifiersListType">
+ <xsd:sequence>
+ <xsd:element name="CommitmentTypeQualifier" type="AnyType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+<!-- End CommitmentTypeIndication -->
+
+<!-- Start SignatureProductionPlace -->
+
+ <xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType"/>
+ <xsd:complexType name="SignatureProductionPlaceType">
+ <xsd:sequence>
+ <xsd:element name="City" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="StateOrProvince" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="PostalCode" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="CountryName" type="xsd:string" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+<!-- End SignatureProductionPlace -->
+
+<!-- Start SignerRole -->
+
+<xsd:element name="SignerRole" type="SignerRoleType"/>
+<xsd:complexType name="SignerRoleType">
+ <xsd:sequence>
+ <xsd:element name="ClaimedRoles" type="ClaimedRolesListType"
+ minOccurs="0"/>
+ <xsd:element name="CertifiedRoles" type="CertifiedRolesListType"
+ minOccurs="0"/>
+ </xsd:sequence>
+</xsd:complexType>
+
+<xsd:complexType name="ClaimedRolesListType">
+ <xsd:sequence>
+ <xsd:element name="ClaimedRole" type="AnyType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+</xsd:complexType>
+
+<xsd:complexType name="CertifiedRolesListType">
+ <xsd:sequence>
+ <xsd:element name="CertifiedRole" type="EncapsulatedPKIDataType"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+</xsd:complexType>
+
+<!-- End SignerRole -->
+
+
+ <xsd:element name="AllDataObjectsTimeStamp" type="TimeStampType"/>
+
+ <xsd:element name="IndividualDataObjectsTimeStamp" type="TimeStampType"/>
+
+ <xsd:element name="SignatureTimeStamp" type="TimeStampType"/>
+
+<!-- Start CompleteCertificateRefs -->
+
+<xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType"/>
+
+<xsd:complexType name="CompleteCertificateRefsType">
+ <xsd:sequence>
+ <xsd:element name="CertRefs" type="CertIDListType" />
+ </xsd:sequence>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+</xsd:complexType>
+
+<!-- End CompleteCertificateRefs -->
+
+
+<!-- Start CompleteRevocationRefs-->
+
+<xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType"/>
+
+<xsd:complexType name="CompleteRevocationRefsType">
+ <xsd:sequence>
+ <xsd:element name="CRLRefs" type="CRLRefsType" minOccurs="0"/>
+ <xsd:element name="OCSPRefs" type="OCSPRefsType" minOccurs="0"/>
+ <xsd:element name="OtherRefs" type="OtherCertStatusRefsType" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+</xsd:complexType>
+
+<xsd:complexType name="CRLRefsType">
+ <xsd:sequence>
+ <xsd:element name="CRLRef" type="CRLRefType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+</xsd:complexType>
+
+<xsd:complexType name="CRLRefType">
+ <xsd:sequence>
+ <xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType"/>
+ <xsd:element name="CRLIdentifier" type="CRLIdentifierType" minOccurs="0"/>
+ </xsd:sequence>
+</xsd:complexType>
+
+<xsd:complexType name="CRLIdentifierType">
+ <xsd:sequence>
+ <xsd:element name="Issuer" type="xsd:string"/>
+ <xsd:element name="IssueTime" type="xsd:dateTime" />
+ <xsd:element name="Number" type="xsd:integer" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
+</xsd:complexType>
+
+<xsd:complexType name="OCSPRefsType">
+ <xsd:sequence>
+ <xsd:element name="OCSPRef" type="OCSPRefType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+</xsd:complexType>
+
+<xsd:complexType name="OCSPRefType">
+ <xsd:sequence>
+ <xsd:element name="OCSPIdentifier" type="OCSPIdentifierType"/>
+ <xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType"
+ minOccurs="0"/>
+ </xsd:sequence>
+</xsd:complexType>
+
+<xsd:complexType name="OCSPIdentifierType">
+ <xsd:sequence>
+ <xsd:element name="ResponderID" type="xsd:string"/>
+ <xsd:element name="ProducedAt" type="xsd:dateTime"/>
+ </xsd:sequence>
+ <xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
+</xsd:complexType>
+
+<xsd:complexType name="OtherCertStatusRefsType">
+ <xsd:sequence>
+ <xsd:element name="OtherRef" type="AnyType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+</xsd:complexType>
+
+<!-- End CompleteRevocationRefs-->
+
+
+<xsd:element name="SigAndRefsTimeStamp" type="TimeStampType"/>
+
+<xsd:element name="RefsOnlyTimeStamp" type="TimeStampType"/>
+
+<!-- Start CertificateValues -->
+
+<xsd:element name="CertificateValues" type="CertificateValuesType"/>
+
+<xsd:complexType name="CertificateValuesType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="EncapsulatedX509Certificate" type="EncapsulatedPKIDataType"/>
+ <xsd:element name="OtherCertificate" type="AnyType"/>
+ </xsd:choice>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+</xsd:complexType>
+
+<!-- End CertificateValues -->
+
+<!-- Start RevocationValues-->
+
+<xsd:element name="RevocationValues" type="RevocationValuesType"/>
+
+<xsd:complexType name="RevocationValuesType">
+ <xsd:sequence>
+ <xsd:element name="CRLValues" type="CRLValuesType" minOccurs="0"/>
+ <xsd:element name="OCSPValues" type="OCSPValuesType" minOccurs="0"/>
+ <xsd:element name="OtherValues" type="OtherCertStatusValuesType" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+</xsd:complexType>
+
+<xsd:complexType name="CRLValuesType">
+ <xsd:sequence>
+ <xsd:element name="EncapsulatedCRLValue" type="EncapsulatedPKIDataType"
+ maxOccurs="unbounded"/>
+ </xsd:sequence>
+</xsd:complexType>
+
+<xsd:complexType name="OCSPValuesType">
+ <xsd:sequence>
+ <xsd:element name="EncapsulatedOCSPValue"
+ type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+</xsd:complexType>
+<xsd:complexType name="OtherCertStatusValuesType">
+ <xsd:sequence>
+ <xsd:element name="OtherValue" type="AnyType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+</xsd:complexType>
+
+<!-- End RevocationValues-->
+
+<xsd:element name="ArchiveTimeStamp" type="TimeStampType"/>
+
+
+</xsd:schema>
diff --git a/common/src/main/resources/resources/schemas/XAdES-1.3.2.xsd b/common/src/main/resources/resources/schemas/XAdES-1.3.2.xsd
new file mode 100644
index 000000000..d0ce075de
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/XAdES-1.3.2.xsd
@@ -0,0 +1,466 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema targetNamespace="http://uri.etsi.org/01903/v1.3.2#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://uri.etsi.org/01903/v1.3.2#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" elementFormDefault="qualified">
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd"/>
+ <!-- Start auxiliary types definitions: AnyType, ObjectIdentifierType,
+EncapsulatedPKIDataType and containers for time-stamp tokens -->
+ <!-- Start AnyType -->
+ <xsd:element name="Any" type="AnyType"/>
+ <xsd:complexType name="AnyType" mixed="true">
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:any namespace="##any" processContents="lax"/>
+ </xsd:sequence>
+ <xsd:anyAttribute namespace="##any"/>
+ </xsd:complexType>
+ <!-- End AnyType -->
+ <!-- Start ObjectIdentifierType-->
+ <xsd:element name="ObjectIdentifier" type="ObjectIdentifierType"/>
+ <xsd:complexType name="ObjectIdentifierType">
+ <xsd:sequence>
+ <xsd:element name="Identifier" type="IdentifierType"/>
+ <xsd:element name="Description" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="DocumentationReferences" type="DocumentationReferencesType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="IdentifierType">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:anyURI">
+ <xsd:attribute name="Qualifier" type="QualifierType" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ <xsd:simpleType name="QualifierType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="OIDAsURI"/>
+ <xsd:enumeration value="OIDAsURN"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:complexType name="DocumentationReferencesType">
+ <xsd:sequence maxOccurs="unbounded">
+ <xsd:element name="DocumentationReference" type="xsd:anyURI"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!-- End ObjectIdentifierType-->
+ <!-- Start EncapsulatedPKIDataType-->
+ <xsd:element name="EncapsulatedPKIData" type="EncapsulatedPKIDataType"/>
+ <xsd:complexType name="EncapsulatedPKIDataType">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:base64Binary">
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+ <xsd:attribute name="Encoding" type="xsd:anyURI" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ <!-- End EncapsulatedPKIDataType -->
+ <!-- Start time-stamp containers types -->
+ <!-- Start GenericTimeStampType -->
+ <xsd:element name="Include" type="IncludeType"/>
+ <xsd:complexType name="IncludeType">
+ <xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
+ <xsd:attribute name="referencedData" type="xsd:boolean" use="optional"/>
+ </xsd:complexType>
+ <xsd:element name="ReferenceInfo" type="ReferenceInfoType"/>
+ <xsd:complexType name="ReferenceInfoType">
+ <xsd:sequence>
+ <xsd:element ref="ds:DigestMethod"/>
+ <xsd:element ref="ds:DigestValue"/>
+ </xsd:sequence>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+ <xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
+ </xsd:complexType>
+ <xsd:complexType name="GenericTimeStampType" abstract="true">
+ <xsd:sequence>
+ <xsd:choice minOccurs="0">
+ <xsd:element ref="Include" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="ReferenceInfo" maxOccurs="unbounded"/>
+ </xsd:choice>
+ <xsd:element ref="ds:CanonicalizationMethod" minOccurs="0"/>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>
+ <xsd:element name="XMLTimeStamp" type="AnyType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+ </xsd:complexType>
+ <!-- End GenericTimeStampType -->
+ <!-- Start XAdESTimeStampType -->
+ <xsd:element name="XAdESTimeStamp" type="XAdESTimeStampType"/>
+ <xsd:complexType name="XAdESTimeStampType">
+ <xsd:complexContent>
+ <xsd:restriction base="GenericTimeStampType">
+ <xsd:sequence>
+ <xsd:element ref="Include" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element ref="ds:CanonicalizationMethod" minOccurs="0"/>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>
+ <xsd:element name="XMLTimeStamp" type="AnyType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <!-- End XAdESTimeStampType -->
+ <!-- Start OtherTimeStampType -->
+ <xsd:element name="OtherTimeStamp" type="OtherTimeStampType"/>
+ <xsd:complexType name="OtherTimeStampType">
+ <xsd:complexContent>
+ <xsd:restriction base="GenericTimeStampType">
+ <xsd:sequence>
+ <xsd:element ref="ReferenceInfo" maxOccurs="unbounded"/>
+ <xsd:element ref="ds:CanonicalizationMethod" minOccurs="0"/>
+ <xsd:choice>
+ <xsd:element name="EncapsulatedTimeStamp" type="EncapsulatedPKIDataType"/>
+ <xsd:element name="XMLTimeStamp" type="AnyType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <!-- End OtherTimeStampType -->
+ <!-- End time-stamp containers types -->
+ <!-- End auxiliary types definitions-->
+ <!-- Start container types -->
+ <!-- Start QualifyingProperties -->
+ <xsd:element name="QualifyingProperties" type="QualifyingPropertiesType"/>
+ <xsd:complexType name="QualifyingPropertiesType">
+ <xsd:sequence>
+ <xsd:element name="SignedProperties" type="SignedPropertiesType" minOccurs="0"/>
+ <xsd:element name="UnsignedProperties" type="UnsignedPropertiesType" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="Target" type="xsd:anyURI" use="required"/>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+ </xsd:complexType>
+ <!-- End QualifyingProperties -->
+ <!-- Start SignedProperties-->
+ <xsd:element name="SignedProperties" type="SignedPropertiesType"/>
+ <xsd:complexType name="SignedPropertiesType">
+ <xsd:sequence>
+ <xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType" minOccurs="0"/>
+ <xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+ </xsd:complexType>
+ <!-- End SignedProperties-->
+ <!-- Start UnsignedProperties-->
+ <xsd:element name="UnsignedProperties" type="UnsignedPropertiesType"/>
+ <xsd:complexType name="UnsignedPropertiesType">
+ <xsd:sequence>
+ <xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType" minOccurs="0"/>
+ <xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+ </xsd:complexType>
+ <!-- End UnsignedProperties-->
+ <!-- Start SignedSignatureProperties-->
+ <xsd:element name="SignedSignatureProperties" type="SignedSignaturePropertiesType"/>
+ <xsd:complexType name="SignedSignaturePropertiesType">
+ <xsd:sequence>
+ <xsd:element name="SigningTime" type="xsd:dateTime" minOccurs="0"/>
+ <xsd:element name="SigningCertificate" type="CertIDListType" minOccurs="0"/>
+ <xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType" minOccurs="0"/>
+ <xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType" minOccurs="0"/>
+ <xsd:element name="SignerRole" type="SignerRoleType" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+ </xsd:complexType>
+ <!-- End SignedSignatureProperties-->
+ <!-- Start SignedDataObjectProperties-->
+ <xsd:element name="SignedDataObjectProperties" type="SignedDataObjectPropertiesType"/>
+ <xsd:complexType name="SignedDataObjectPropertiesType">
+ <xsd:sequence>
+ <xsd:element name="DataObjectFormat" type="DataObjectFormatType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="AllDataObjectsTimeStamp" type="XAdESTimeStampType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="IndividualDataObjectsTimeStamp" type="XAdESTimeStampType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+ </xsd:complexType>
+ <!-- End SignedDataObjectProperties-->
+ <!-- Start UnsignedSignatureProperties-->
+ <xsd:element name="UnsignedSignatureProperties" type="UnsignedSignaturePropertiesType"/>
+ <xsd:complexType name="UnsignedSignaturePropertiesType">
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="CounterSignature" type="CounterSignatureType"/>
+ <xsd:element name="SignatureTimeStamp" type="XAdESTimeStampType"/>
+ <xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType"/>
+ <xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType"/>
+ <xsd:element name="AttributeCertificateRefs" type="CompleteCertificateRefsType"/>
+ <xsd:element name="AttributeRevocationRefs" type="CompleteRevocationRefsType"/>
+ <xsd:element name="SigAndRefsTimeStamp" type="XAdESTimeStampType"/>
+ <xsd:element name="RefsOnlyTimeStamp" type="XAdESTimeStampType"/>
+ <xsd:element name="CertificateValues" type="CertificateValuesType"/>
+ <xsd:element name="RevocationValues" type="RevocationValuesType"/>
+ <xsd:element name="AttrAuthoritiesCertValues" type="CertificateValuesType"/>
+ <xsd:element name="AttributeRevocationValues" type="RevocationValuesType"/>
+ <xsd:element name="ArchiveTimeStamp" type="XAdESTimeStampType"/>
+ <xsd:any namespace="##other"/>
+ </xsd:choice>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+ </xsd:complexType>
+ <!-- End UnsignedSignatureProperties-->
+ <!-- Start UnsignedDataObjectProperties-->
+ <xsd:element name="UnsignedDataObjectProperties" type="UnsignedDataObjectPropertiesType"/>
+ <xsd:complexType name="UnsignedDataObjectPropertiesType">
+ <xsd:sequence>
+ <xsd:element name="UnsignedDataObjectProperty" type="AnyType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+ </xsd:complexType>
+ <!-- End UnsignedDataObjectProperties-->
+ <!-- Start QualifyingPropertiesReference-->
+ <xsd:element name="QualifyingPropertiesReference" type="QualifyingPropertiesReferenceType"/>
+ <xsd:complexType name="QualifyingPropertiesReferenceType">
+ <xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+ </xsd:complexType>
+ <!-- End QualifyingPropertiesReference-->
+ <!-- End container types -->
+ <!-- Start SigningTime element -->
+ <xsd:element name="SigningTime" type="xsd:dateTime"/>
+ <!-- End SigningTime element -->
+ <!-- Start SigningCertificate -->
+ <xsd:element name="SigningCertificate" type="CertIDListType"/>
+ <xsd:complexType name="CertIDListType">
+ <xsd:sequence>
+ <xsd:element name="Cert" type="CertIDType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CertIDType">
+ <xsd:sequence>
+ <xsd:element name="CertDigest" type="DigestAlgAndValueType"/>
+ <xsd:element name="IssuerSerial" type="ds:X509IssuerSerialType"/>
+ </xsd:sequence>
+ <xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
+ </xsd:complexType>
+ <xsd:complexType name="DigestAlgAndValueType">
+ <xsd:sequence>
+ <xsd:element ref="ds:DigestMethod"/>
+ <xsd:element ref="ds:DigestValue"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!-- End SigningCertificate -->
+ <!-- Start SignaturePolicyIdentifier -->
+ <xsd:element name="SignaturePolicyIdentifier" type="SignaturePolicyIdentifierType"/>
+ <xsd:complexType name="SignaturePolicyIdentifierType">
+ <xsd:choice>
+ <xsd:element name="SignaturePolicyId" type="SignaturePolicyIdType"/>
+ <xsd:element name="SignaturePolicyImplied"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:complexType name="SignaturePolicyIdType">
+ <xsd:sequence>
+ <xsd:element name="SigPolicyId" type="ObjectIdentifierType"/>
+ <xsd:element ref="ds:Transforms" minOccurs="0"/>
+ <xsd:element name="SigPolicyHash" type="DigestAlgAndValueType"/>
+ <xsd:element name="SigPolicyQualifiers" type="SigPolicyQualifiersListType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="SigPolicyQualifiersListType">
+ <xsd:sequence>
+ <xsd:element name="SigPolicyQualifier" type="AnyType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:element name="SPURI" type="xsd:anyURI"/>
+ <xsd:element name="SPUserNotice" type="SPUserNoticeType"/>
+ <xsd:complexType name="SPUserNoticeType">
+ <xsd:sequence>
+ <xsd:element name="NoticeRef" type="NoticeReferenceType" minOccurs="0"/>
+ <xsd:element name="ExplicitText" type="xsd:string" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="NoticeReferenceType">
+ <xsd:sequence>
+ <xsd:element name="Organization" type="xsd:string"/>
+ <xsd:element name="NoticeNumbers" type="IntegerListType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="IntegerListType">
+ <xsd:sequence>
+ <xsd:element name="int" type="xsd:integer" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!-- End SignaturePolicyIdentifier -->
+ <!-- Start CounterSignature -->
+ <xsd:element name="CounterSignature" type="CounterSignatureType"/>
+ <xsd:complexType name="CounterSignatureType">
+ <xsd:sequence>
+ <xsd:element ref="ds:Signature"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!-- End CounterSignature -->
+ <!-- Start DataObjectFormat -->
+ <xsd:element name="DataObjectFormat" type="DataObjectFormatType"/>
+ <xsd:complexType name="DataObjectFormatType">
+ <xsd:sequence>
+ <xsd:element name="Description" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="ObjectIdentifier" type="ObjectIdentifierType" minOccurs="0"/>
+ <xsd:element name="MimeType" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="Encoding" type="xsd:anyURI" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="ObjectReference" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <!-- End DataObjectFormat -->
+ <!-- Start CommitmentTypeIndication -->
+ <xsd:element name="CommitmentTypeIndication" type="CommitmentTypeIndicationType"/>
+ <xsd:complexType name="CommitmentTypeIndicationType">
+ <xsd:sequence>
+ <xsd:element name="CommitmentTypeId" type="ObjectIdentifierType"/>
+ <xsd:choice>
+ <xsd:element name="ObjectReference" type="xsd:anyURI" maxOccurs="unbounded"/>
+ <xsd:element name="AllSignedDataObjects"/>
+ </xsd:choice>
+ <xsd:element name="CommitmentTypeQualifiers" type="CommitmentTypeQualifiersListType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CommitmentTypeQualifiersListType">
+ <xsd:sequence>
+ <xsd:element name="CommitmentTypeQualifier" type="AnyType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!-- End CommitmentTypeIndication -->
+ <!-- Start SignatureProductionPlace -->
+ <xsd:element name="SignatureProductionPlace" type="SignatureProductionPlaceType"/>
+ <xsd:complexType name="SignatureProductionPlaceType">
+ <xsd:sequence>
+ <xsd:element name="City" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="StateOrProvince" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="PostalCode" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="CountryName" type="xsd:string" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!-- End SignatureProductionPlace -->
+ <!-- Start SignerRole -->
+ <xsd:element name="SignerRole" type="SignerRoleType"/>
+ <xsd:complexType name="SignerRoleType">
+ <xsd:sequence>
+ <xsd:element name="ClaimedRoles" type="ClaimedRolesListType" minOccurs="0"/>
+ <xsd:element name="CertifiedRoles" type="CertifiedRolesListType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ClaimedRolesListType">
+ <xsd:sequence>
+ <xsd:element name="ClaimedRole" type="AnyType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CertifiedRolesListType">
+ <xsd:sequence>
+ <xsd:element name="CertifiedRole" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!-- End SignerRole -->
+ <xsd:element name="AllDataObjectsTimeStamp" type="XAdESTimeStampType"/>
+ <xsd:element name="IndividualDataObjectsTimeStamp" type="XAdESTimeStampType"/>
+ <xsd:element name="SignatureTimeStamp" type="XAdESTimeStampType"/>
+ <!-- Start CompleteCertificateRefs -->
+ <xsd:element name="CompleteCertificateRefs" type="CompleteCertificateRefsType"/>
+ <xsd:complexType name="CompleteCertificateRefsType">
+ <xsd:sequence>
+ <xsd:element name="CertRefs" type="CertIDListType"/>
+ </xsd:sequence>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+ </xsd:complexType>
+ <!-- End CompleteCertificateRefs -->
+ <!-- Start CompleteRevocationRefs-->
+ <xsd:element name="CompleteRevocationRefs" type="CompleteRevocationRefsType"/>
+ <xsd:complexType name="CompleteRevocationRefsType">
+ <xsd:sequence>
+ <xsd:element name="CRLRefs" type="CRLRefsType" minOccurs="0"/>
+ <xsd:element name="OCSPRefs" type="OCSPRefsType" minOccurs="0"/>
+ <xsd:element name="OtherRefs" type="OtherCertStatusRefsType" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+ </xsd:complexType>
+ <xsd:complexType name="CRLRefsType">
+ <xsd:sequence>
+ <xsd:element name="CRLRef" type="CRLRefType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CRLRefType">
+ <xsd:sequence>
+ <xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType"/>
+ <xsd:element name="CRLIdentifier" type="CRLIdentifierType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CRLIdentifierType">
+ <xsd:sequence>
+ <xsd:element name="Issuer" type="xsd:string"/>
+ <xsd:element name="IssueTime" type="xsd:dateTime"/>
+ <xsd:element name="Number" type="xsd:integer" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
+ </xsd:complexType>
+ <xsd:complexType name="OCSPRefsType">
+ <xsd:sequence>
+ <xsd:element name="OCSPRef" type="OCSPRefType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="OCSPRefType">
+ <xsd:sequence>
+ <xsd:element name="OCSPIdentifier" type="OCSPIdentifierType"/>
+ <xsd:element name="DigestAlgAndValue" type="DigestAlgAndValueType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ResponderIDType">
+ <xsd:choice>
+ <xsd:element name="ByName" type="xsd:string"/>
+ <xsd:element name="ByKey" type="xsd:base64Binary"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:complexType name="OCSPIdentifierType">
+ <xsd:sequence>
+ <xsd:element name="ResponderID" type="ResponderIDType"/>
+ <xsd:element name="ProducedAt" type="xsd:dateTime"/>
+ </xsd:sequence>
+ <xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
+ </xsd:complexType>
+ <xsd:complexType name="OtherCertStatusRefsType">
+ <xsd:sequence>
+ <xsd:element name="OtherRef" type="AnyType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!-- End CompleteRevocationRefs-->
+ <xsd:element name="AttributeCertificateRefs" type="CompleteCertificateRefsType"/>
+ <xsd:element name="AttributeRevocationRefs" type="CompleteRevocationRefsType"/>
+ <xsd:element name="SigAndRefsTimeStamp" type="XAdESTimeStampType"/>
+ <xsd:element name="RefsOnlyTimeStamp" type="XAdESTimeStampType"/>
+ <!-- Start CertificateValues -->
+ <xsd:element name="CertificateValues" type="CertificateValuesType"/>
+ <xsd:complexType name="CertificateValuesType">
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="EncapsulatedX509Certificate" type="EncapsulatedPKIDataType"/>
+ <xsd:element name="OtherCertificate" type="AnyType"/>
+ </xsd:choice>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+ </xsd:complexType>
+ <!-- End CertificateValues -->
+ <!-- Start RevocationValues-->
+ <xsd:element name="RevocationValues" type="RevocationValuesType"/>
+ <xsd:complexType name="RevocationValuesType">
+ <xsd:sequence>
+ <xsd:element name="CRLValues" type="CRLValuesType" minOccurs="0"/>
+ <xsd:element name="OCSPValues" type="OCSPValuesType" minOccurs="0"/>
+ <xsd:element name="OtherValues" type="OtherCertStatusValuesType" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+ </xsd:complexType>
+ <xsd:complexType name="CRLValuesType">
+ <xsd:sequence>
+ <xsd:element name="EncapsulatedCRLValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="OCSPValuesType">
+ <xsd:sequence>
+ <xsd:element name="EncapsulatedOCSPValue" type="EncapsulatedPKIDataType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="OtherCertStatusValuesType">
+ <xsd:sequence>
+ <xsd:element name="OtherValue" type="AnyType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!-- End RevocationValues-->
+ <xsd:element name="AttrAuthoritiesCertValues" type="CertificateValuesType"/>
+ <xsd:element name="AttributeRevocationValues" type="RevocationValuesType"/>
+ <xsd:element name="ArchiveTimeStamp" type="XAdESTimeStampType"/>
+</xsd:schema>
diff --git a/common/src/main/resources/resources/schemas/XAdES-1.4.1.xsd b/common/src/main/resources/resources/schemas/XAdES-1.4.1.xsd
new file mode 100644
index 000000000..383fcbdec
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/XAdES-1.4.1.xsd
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema targetNamespace="http://uri.etsi.org/01903/v1.4.1#" xmlns="http://uri.etsi.org/01903/v1.4.1#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" elementFormDefault="qualified">
+ <xsd:import namespace="http://uri.etsi.org/01903/v1.3.2#" schemaLocation="XAdES-1.3.2.xsd"/>
+ <!-- Start CertificateValues -->
+ <xsd:element name="TimeStampValidationData" type="ValidationDataType"/>
+ <xsd:complexType name="ValidationDataType">
+ <xsd:sequence>
+ <xsd:element ref="xades:CertificateValues" minOccurs="0" />
+ <xsd:element ref="xades:RevocationValues" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="Id" type="xsd:ID" use="optional"/>
+ <xsd:attribute name="UR" type="xsd:anyURI" use="optional"/>
+ </xsd:complexType>
+ <xsd:element name="ArchiveTimeStampV2" type="xades:XAdESTimeStampType"/>
+</xsd:schema>
diff --git a/common/src/main/resources/resources/schemas/XMLSchema-instance.xsd b/common/src/main/resources/resources/schemas/XMLSchema-instance.xsd
new file mode 100644
index 000000000..f47577b8a
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/XMLSchema-instance.xsd
@@ -0,0 +1,37 @@
+<?xml version='1.0'?>
+<!DOCTYPE xs:schema SYSTEM "XMLSchema.dtd" [
+<!ELEMENT p ANY>
+<!ELEMENT a ANY>
+<!ATTLIST a href CDATA #IMPLIED>
+<!ELEMENT hr ANY>
+<!ELEMENT h1 ANY>
+<!ELEMENT br ANY>
+]>
+<xs:schema targetNamespace="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns="http://www.w3.org/1999/xhtml">
+ <xs:annotation>
+ <xs:documentation>
+ <h1>XML Schema instance namespace</h1>
+ <p>See <a href="http://www.w3.org/TR/xmlschema-1/">the XML Schema
+ Recommendation</a> for an introduction</p>
+
+
+ <hr />
+ $Date: 2001/03/16 20:25:57 $<br />
+ $Id: XMLSchema-instance.xsd,v 1.4 2001/03/16 20:25:57 ht Exp $
+ </xs:documentation>
+ </xs:annotation>
+ <xs:annotation>
+ <xs:documentation><p>This schema should never be used as such:
+ <a href="http://www.w3.org/TR/xmlschema-1/#no-xsi">the XML
+ Schema Recommendation</a> forbids the declaration of
+ attributes in this namespace</p>
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:attribute name="nil"/>
+ <xs:attribute name="type"/>
+ <xs:attribute name="schemaLocation"/>
+ <xs:attribute name="noNamespaceSchemaLocation"/>
+</xs:schema>
diff --git a/common/src/main/resources/resources/schemas/XMLSchema.dtd b/common/src/main/resources/resources/schemas/XMLSchema.dtd
new file mode 100644
index 000000000..e8e8f7625
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/XMLSchema.dtd
@@ -0,0 +1,402 @@
+<!-- DTD for XML Schemas: Part 1: Structures
+ Public Identifier: "-//W3C//DTD XMLSCHEMA 200102//EN"
+ Official Location: http://www.w3.org/2001/XMLSchema.dtd -->
+<!-- $Id: XMLSchema.dtd,v 1.31 2001/10/24 15:50:16 ht Exp $ -->
+<!-- Note this DTD is NOT normative, or even definitive. --> <!--d-->
+<!-- prose copy in the structures REC is the definitive version --> <!--d-->
+<!-- (which shouldn't differ from this one except for this --> <!--d-->
+<!-- comment and entity expansions, but just in case) --> <!--d-->
+<!-- With the exception of cases with multiple namespace
+ prefixes for the XML Schema namespace, any XML document which is
+ not valid per this DTD given redefinitions in its internal subset of the
+ 'p' and 's' parameter entities below appropriate to its namespace
+ declaration of the XML Schema namespace is almost certainly not
+ a valid schema. -->
+
+<!-- The simpleType element and its constituent parts
+ are defined in XML Schema: Part 2: Datatypes -->
+<!ENTITY % xs-datatypes PUBLIC 'datatypes' 'datatypes.dtd' >
+
+<!ENTITY % p 'xs:'> <!-- can be overriden in the internal subset of a
+ schema document to establish a different
+ namespace prefix -->
+<!ENTITY % s ':xs'> <!-- if %p is defined (e.g. as foo:) then you must
+ also define %s as the suffix for the appropriate
+ namespace declaration (e.g. :foo) -->
+<!ENTITY % nds 'xmlns%s;'>
+
+<!-- Define all the element names, with optional prefix -->
+<!ENTITY % schema "%p;schema">
+<!ENTITY % complexType "%p;complexType">
+<!ENTITY % complexContent "%p;complexContent">
+<!ENTITY % simpleContent "%p;simpleContent">
+<!ENTITY % extension "%p;extension">
+<!ENTITY % element "%p;element">
+<!ENTITY % unique "%p;unique">
+<!ENTITY % key "%p;key">
+<!ENTITY % keyref "%p;keyref">
+<!ENTITY % selector "%p;selector">
+<!ENTITY % field "%p;field">
+<!ENTITY % group "%p;group">
+<!ENTITY % all "%p;all">
+<!ENTITY % choice "%p;choice">
+<!ENTITY % sequence "%p;sequence">
+<!ENTITY % any "%p;any">
+<!ENTITY % anyAttribute "%p;anyAttribute">
+<!ENTITY % attribute "%p;attribute">
+<!ENTITY % attributeGroup "%p;attributeGroup">
+<!ENTITY % include "%p;include">
+<!ENTITY % import "%p;import">
+<!ENTITY % redefine "%p;redefine">
+<!ENTITY % notation "%p;notation">
+
+<!-- annotation elements -->
+<!ENTITY % annotation "%p;annotation">
+<!ENTITY % appinfo "%p;appinfo">
+<!ENTITY % documentation "%p;documentation">
+
+<!-- Customisation entities for the ATTLIST of each element type.
+ Define one of these if your schema takes advantage of the
+ anyAttribute='##other' in the schema for schemas -->
+
+<!ENTITY % schemaAttrs ''>
+<!ENTITY % complexTypeAttrs ''>
+<!ENTITY % complexContentAttrs ''>
+<!ENTITY % simpleContentAttrs ''>
+<!ENTITY % extensionAttrs ''>
+<!ENTITY % elementAttrs ''>
+<!ENTITY % groupAttrs ''>
+<!ENTITY % allAttrs ''>
+<!ENTITY % choiceAttrs ''>
+<!ENTITY % sequenceAttrs ''>
+<!ENTITY % anyAttrs ''>
+<!ENTITY % anyAttributeAttrs ''>
+<!ENTITY % attributeAttrs ''>
+<!ENTITY % attributeGroupAttrs ''>
+<!ENTITY % uniqueAttrs ''>
+<!ENTITY % keyAttrs ''>
+<!ENTITY % keyrefAttrs ''>
+<!ENTITY % selectorAttrs ''>
+<!ENTITY % fieldAttrs ''>
+<!ENTITY % includeAttrs ''>
+<!ENTITY % importAttrs ''>
+<!ENTITY % redefineAttrs ''>
+<!ENTITY % notationAttrs ''>
+<!ENTITY % annotationAttrs ''>
+<!ENTITY % appinfoAttrs ''>
+<!ENTITY % documentationAttrs ''>
+
+<!ENTITY % complexDerivationSet "CDATA">
+ <!-- #all or space-separated list drawn from derivationChoice -->
+<!ENTITY % blockSet "CDATA">
+ <!-- #all or space-separated list drawn from
+ derivationChoice + 'substitution' -->
+
+<!ENTITY % mgs '%all; | %choice; | %sequence;'>
+<!ENTITY % cs '%choice; | %sequence;'>
+<!ENTITY % formValues '(qualified|unqualified)'>
+
+
+<!ENTITY % attrDecls '((%attribute;| %attributeGroup;)*,(%anyAttribute;)?)'>
+
+<!ENTITY % particleAndAttrs '((%mgs; | %group;)?, %attrDecls;)'>
+
+<!-- This is used in part2 -->
+<!ENTITY % restriction1 '((%mgs; | %group;)?)'>
+
+%xs-datatypes;
+
+<!-- the duplication below is to produce an unambiguous content model
+ which allows annotation everywhere -->
+<!ELEMENT %schema; ((%include; | %import; | %redefine; | %annotation;)*,
+ ((%simpleType; | %complexType;
+ | %element; | %attribute;
+ | %attributeGroup; | %group;
+ | %notation; ),
+ (%annotation;)*)* )>
+<!ATTLIST %schema;
+ targetNamespace %URIref; #IMPLIED
+ version CDATA #IMPLIED
+ %nds; %URIref; #FIXED 'http://www.w3.org/2001/XMLSchema'
+ xmlns CDATA #IMPLIED
+ finalDefault %complexDerivationSet; ''
+ blockDefault %blockSet; ''
+ id ID #IMPLIED
+ elementFormDefault %formValues; 'unqualified'
+ attributeFormDefault %formValues; 'unqualified'
+ xml:lang CDATA #IMPLIED
+ %schemaAttrs;>
+<!-- Note the xmlns declaration is NOT in the Schema for Schemas,
+ because at the Infoset level where schemas operate,
+ xmlns(:prefix) is NOT an attribute! -->
+<!-- The declaration of xmlns is a convenience for schema authors -->
+
+<!-- The id attribute here and below is for use in external references
+ from non-schemas using simple fragment identifiers.
+ It is NOT used for schema-to-schema reference, internal or
+ external. -->
+
+<!-- a type is a named content type specification which allows attribute
+ declarations-->
+<!-- -->
+
+<!ELEMENT %complexType; ((%annotation;)?,
+ (%simpleContent;|%complexContent;|
+ %particleAndAttrs;))>
+
+<!ATTLIST %complexType;
+ name %NCName; #IMPLIED
+ id ID #IMPLIED
+ abstract %boolean; #IMPLIED
+ final %complexDerivationSet; #IMPLIED
+ block %complexDerivationSet; #IMPLIED
+ mixed (true|false) 'false'
+ %complexTypeAttrs;>
+
+<!-- particleAndAttrs is shorthand for a root type -->
+<!-- mixed is disallowed if simpleContent, overriden if complexContent
+ has one too. -->
+
+<!-- If anyAttribute appears in one or more referenced attributeGroups
+ and/or explicitly, the intersection of the permissions is used -->
+
+<!ELEMENT %complexContent; ((%annotation;)?, (%restriction;|%extension;))>
+<!ATTLIST %complexContent;
+ mixed (true|false) #IMPLIED
+ id ID #IMPLIED
+ %complexContentAttrs;>
+
+<!-- restriction should use the branch defined above, not the simple
+ one from part2; extension should use the full model -->
+
+<!ELEMENT %simpleContent; ((%annotation;)?, (%restriction;|%extension;))>
+<!ATTLIST %simpleContent;
+ id ID #IMPLIED
+ %simpleContentAttrs;>
+
+<!-- restriction should use the simple branch from part2, not the
+ one defined above; extension should have no particle -->
+
+<!ELEMENT %extension; ((%annotation;)?, (%particleAndAttrs;))>
+<!ATTLIST %extension;
+ base %QName; #REQUIRED
+ id ID #IMPLIED
+ %extensionAttrs;>
+
+<!-- an element is declared by either:
+ a name and a type (either nested or referenced via the type attribute)
+ or a ref to an existing element declaration -->
+
+<!ELEMENT %element; ((%annotation;)?, (%complexType;| %simpleType;)?,
+ (%unique; | %key; | %keyref;)*)>
+<!-- simpleType or complexType only if no type|ref attribute -->
+<!-- ref not allowed at top level -->
+<!ATTLIST %element;
+ name %NCName; #IMPLIED
+ id ID #IMPLIED
+ ref %QName; #IMPLIED
+ type %QName; #IMPLIED
+ minOccurs %nonNegativeInteger; #IMPLIED
+ maxOccurs CDATA #IMPLIED
+ nillable %boolean; #IMPLIED
+ substitutionGroup %QName; #IMPLIED
+ abstract %boolean; #IMPLIED
+ final %complexDerivationSet; #IMPLIED
+ block %blockSet; #IMPLIED
+ default CDATA #IMPLIED
+ fixed CDATA #IMPLIED
+ form %formValues; #IMPLIED
+ %elementAttrs;>
+<!-- type and ref are mutually exclusive.
+ name and ref are mutually exclusive, one is required -->
+<!-- In the absence of type AND ref, type defaults to type of
+ substitutionGroup, if any, else the ur-type, i.e. unconstrained -->
+<!-- default and fixed are mutually exclusive -->
+
+<!ELEMENT %group; ((%annotation;)?,(%mgs;)?)>
+<!ATTLIST %group;
+ name %NCName; #IMPLIED
+ ref %QName; #IMPLIED
+ minOccurs %nonNegativeInteger; #IMPLIED
+ maxOccurs CDATA #IMPLIED
+ id ID #IMPLIED
+ %groupAttrs;>
+
+<!ELEMENT %all; ((%annotation;)?, (%element;)*)>
+<!ATTLIST %all;
+ minOccurs (1) #IMPLIED
+ maxOccurs (1) #IMPLIED
+ id ID #IMPLIED
+ %allAttrs;>
+
+<!ELEMENT %choice; ((%annotation;)?, (%element;| %group;| %cs; | %any;)*)>
+<!ATTLIST %choice;
+ minOccurs %nonNegativeInteger; #IMPLIED
+ maxOccurs CDATA #IMPLIED
+ id ID #IMPLIED
+ %choiceAttrs;>
+
+<!ELEMENT %sequence; ((%annotation;)?, (%element;| %group;| %cs; | %any;)*)>
+<!ATTLIST %sequence;
+ minOccurs %nonNegativeInteger; #IMPLIED
+ maxOccurs CDATA #IMPLIED
+ id ID #IMPLIED
+ %sequenceAttrs;>
+
+<!-- an anonymous grouping in a model, or
+ a top-level named group definition, or a reference to same -->
+
+<!-- Note that if order is 'all', group is not allowed inside.
+ If order is 'all' THIS group must be alone (or referenced alone) at
+ the top level of a content model -->
+<!-- If order is 'all', minOccurs==maxOccurs==1 on element/any inside -->
+<!-- Should allow minOccurs=0 inside order='all' . . . -->
+
+<!ELEMENT %any; (%annotation;)?>
+<!ATTLIST %any;
+ namespace CDATA '##any'
+ processContents (skip|lax|strict) 'strict'
+ minOccurs %nonNegativeInteger; '1'
+ maxOccurs CDATA '1'
+ id ID #IMPLIED
+ %anyAttrs;>
+
+<!-- namespace is interpreted as follows:
+ ##any - - any non-conflicting WFXML at all
+
+ ##other - - any non-conflicting WFXML from namespace other
+ than targetNamespace
+
+ ##local - - any unqualified non-conflicting WFXML/attribute
+ one or - - any non-conflicting WFXML from
+ more URI the listed namespaces
+ references
+
+ ##targetNamespace ##local may appear in the above list,
+ with the obvious meaning -->
+
+<!ELEMENT %anyAttribute; (%annotation;)?>
+<!ATTLIST %anyAttribute;
+ namespace CDATA '##any'
+ processContents (skip|lax|strict) 'strict'
+ id ID #IMPLIED
+ %anyAttributeAttrs;>
+<!-- namespace is interpreted as for 'any' above -->
+
+<!-- simpleType only if no type|ref attribute -->
+<!-- ref not allowed at top level, name iff at top level -->
+<!ELEMENT %attribute; ((%annotation;)?, (%simpleType;)?)>
+<!ATTLIST %attribute;
+ name %NCName; #IMPLIED
+ id ID #IMPLIED
+ ref %QName; #IMPLIED
+ type %QName; #IMPLIED
+ use (prohibited|optional|required) #IMPLIED
+ default CDATA #IMPLIED
+ fixed CDATA #IMPLIED
+ form %formValues; #IMPLIED
+ %attributeAttrs;>
+<!-- type and ref are mutually exclusive.
+ name and ref are mutually exclusive, one is required -->
+<!-- default for use is optional when nested, none otherwise -->
+<!-- default and fixed are mutually exclusive -->
+<!-- type attr and simpleType content are mutually exclusive -->
+
+<!-- an attributeGroup is a named collection of attribute decls, or a
+ reference thereto -->
+<!ELEMENT %attributeGroup; ((%annotation;)?,
+ (%attribute; | %attributeGroup;)*,
+ (%anyAttribute;)?) >
+<!ATTLIST %attributeGroup;
+ name %NCName; #IMPLIED
+ id ID #IMPLIED
+ ref %QName; #IMPLIED
+ %attributeGroupAttrs;>
+
+<!-- ref iff no content, no name. ref iff not top level -->
+
+<!-- better reference mechanisms -->
+<!ELEMENT %unique; ((%annotation;)?, %selector;, (%field;)+)>
+<!ATTLIST %unique;
+ name %NCName; #REQUIRED
+ id ID #IMPLIED
+ %uniqueAttrs;>
+
+<!ELEMENT %key; ((%annotation;)?, %selector;, (%field;)+)>
+<!ATTLIST %key;
+ name %NCName; #REQUIRED
+ id ID #IMPLIED
+ %keyAttrs;>
+
+<!ELEMENT %keyref; ((%annotation;)?, %selector;, (%field;)+)>
+<!ATTLIST %keyref;
+ name %NCName; #REQUIRED
+ refer %QName; #REQUIRED
+ id ID #IMPLIED
+ %keyrefAttrs;>
+
+<!ELEMENT %selector; ((%annotation;)?)>
+<!ATTLIST %selector;
+ xpath %XPathExpr; #REQUIRED
+ id ID #IMPLIED
+ %selectorAttrs;>
+<!ELEMENT %field; ((%annotation;)?)>
+<!ATTLIST %field;
+ xpath %XPathExpr; #REQUIRED
+ id ID #IMPLIED
+ %fieldAttrs;>
+
+<!-- Schema combination mechanisms -->
+<!ELEMENT %include; (%annotation;)?>
+<!ATTLIST %include;
+ schemaLocation %URIref; #REQUIRED
+ id ID #IMPLIED
+ %includeAttrs;>
+
+<!ELEMENT %import; (%annotation;)?>
+<!ATTLIST %import;
+ namespace %URIref; #IMPLIED
+ schemaLocation %URIref; #IMPLIED
+ id ID #IMPLIED
+ %importAttrs;>
+
+<!ELEMENT %redefine; (%annotation; | %simpleType; | %complexType; |
+ %attributeGroup; | %group;)*>
+<!ATTLIST %redefine;
+ schemaLocation %URIref; #REQUIRED
+ id ID #IMPLIED
+ %redefineAttrs;>
+
+<!ELEMENT %notation; (%annotation;)?>
+<!ATTLIST %notation;
+ name %NCName; #REQUIRED
+ id ID #IMPLIED
+ public CDATA #REQUIRED
+ system %URIref; #IMPLIED
+ %notationAttrs;>
+
+<!-- Annotation is either application information or documentation -->
+<!-- By having these here they are available for datatypes as well
+ as all the structures elements -->
+
+<!ELEMENT %annotation; (%appinfo; | %documentation;)*>
+<!ATTLIST %annotation; %annotationAttrs;>
+
+<!-- User must define annotation elements in internal subset for this
+ to work -->
+<!ELEMENT %appinfo; ANY> <!-- too restrictive -->
+<!ATTLIST %appinfo;
+ source %URIref; #IMPLIED
+ id ID #IMPLIED
+ %appinfoAttrs;>
+<!ELEMENT %documentation; ANY> <!-- too restrictive -->
+<!ATTLIST %documentation;
+ source %URIref; #IMPLIED
+ id ID #IMPLIED
+ xml:lang CDATA #IMPLIED
+ %documentationAttrs;>
+
+<!NOTATION XMLSchemaStructures PUBLIC
+ 'structures' 'http://www.w3.org/2001/XMLSchema.xsd' >
+<!NOTATION XML PUBLIC
+ 'REC-xml-1998-0210' 'http://www.w3.org/TR/1998/REC-xml-19980210' >
diff --git a/common/src/main/resources/resources/schemas/cs-sstc-schema-assertion-01.xsd b/common/src/main/resources/resources/schemas/cs-sstc-schema-assertion-01.xsd
new file mode 100644
index 000000000..8bc5af147
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/cs-sstc-schema-assertion-01.xsd
@@ -0,0 +1,194 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- edited with XML Spy v3.5 NT (http://www.xmlspy.com) by Phill Hallam-Baker (VeriSign Inc.) -->
+<schema targetNamespace="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified">
+ <import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
+ <annotation>
+ <documentation>
+ Document identifier: cs-sstc-schema-assertion-01
+ Location: http://www.oasis-open.org/committees/security/docs/
+ </documentation>
+ </annotation>
+ <simpleType name="IDType">
+ <restriction base="string"/>
+ </simpleType>
+ <simpleType name="IDReferenceType">
+ <restriction base="string"/>
+ </simpleType>
+ <simpleType name="DecisionType">
+ <restriction base="string">
+ <enumeration value="Permit"/>
+ <enumeration value="Deny"/>
+ <enumeration value="Indeterminate"/>
+ </restriction>
+ </simpleType>
+ <element name="AssertionIDReference" type="saml:IDReferenceType"/>
+ <element name="Assertion" type="saml:AssertionType"/>
+ <complexType name="AssertionType">
+ <sequence>
+ <element ref="saml:Conditions" minOccurs="0"/>
+ <element ref="saml:Advice" minOccurs="0"/>
+ <choice maxOccurs="unbounded">
+ <element ref="saml:Statement"/>
+ <element ref="saml:SubjectStatement"/>
+ <element ref="saml:AuthenticationStatement"/>
+ <element ref="saml:AuthorizationDecisionStatement"/>
+ <element ref="saml:AttributeStatement"/>
+ </choice>
+ <element ref="ds:Signature" minOccurs="0"/>
+ </sequence>
+ <attribute name="MajorVersion" type="integer" use="required"/>
+ <attribute name="MinorVersion" type="integer" use="required"/>
+ <attribute name="AssertionID" type="saml:IDType" use="required"/>
+ <attribute name="Issuer" type="string" use="required"/>
+ <attribute name="IssueInstant" type="dateTime" use="required"/>
+ </complexType>
+ <element name="Conditions" type="saml:ConditionsType"/>
+ <complexType name="ConditionsType">
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element ref="saml:AudienceRestrictionCondition"/>
+ <element ref="saml:Condition"/>
+ </choice>
+ <attribute name="NotBefore" type="dateTime" use="optional"/>
+ <attribute name="NotOnOrAfter" type="dateTime" use="optional"/>
+ </complexType>
+ <element name="Condition" type="saml:ConditionAbstractType"/>
+ <complexType name="ConditionAbstractType" abstract="true"/>
+ <element name="AudienceRestrictionCondition" type="saml:AudienceRestrictionConditionType"/>
+ <complexType name="AudienceRestrictionConditionType">
+ <complexContent>
+ <extension base="saml:ConditionAbstractType">
+ <sequence>
+ <element ref="saml:Audience" maxOccurs="unbounded"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="Audience" type="anyURI"/>
+ <element name="Advice" type="saml:AdviceType"/>
+ <complexType name="AdviceType">
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element ref="saml:AssertionIDReference"/>
+ <element ref="saml:Assertion"/>
+ <any namespace="##other" processContents="lax"/>
+ </choice>
+ </complexType>
+ <element name="Statement" type="saml:StatementAbstractType"/>
+ <complexType name="StatementAbstractType" abstract="true"/>
+ <element name="SubjectStatement" type="saml:SubjectStatementAbstractType"/>
+ <complexType name="SubjectStatementAbstractType" abstract="true">
+ <complexContent>
+ <extension base="saml:StatementAbstractType">
+ <sequence>
+ <element ref="saml:Subject"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="Subject" type="saml:SubjectType"/>
+ <complexType name="SubjectType">
+ <choice>
+ <sequence>
+ <element ref="saml:NameIdentifier"/>
+ <element ref="saml:SubjectConfirmation" minOccurs="0"/>
+ </sequence>
+ <element ref="saml:SubjectConfirmation"/>
+ </choice>
+ </complexType>
+ <element name="NameIdentifier" type="saml:NameIdentifierType"/>
+ <complexType name="NameIdentifierType">
+ <simpleContent>
+ <extension base="string">
+ <attribute name="NameQualifier" type="string" use="optional"/>
+ <attribute name="Format" type="anyURI" use="optional"/>
+ </extension>
+ </simpleContent>
+ </complexType>
+ <element name="SubjectConfirmation" type="saml:SubjectConfirmationType"/>
+ <complexType name="SubjectConfirmationType">
+ <sequence>
+ <element ref="saml:ConfirmationMethod" maxOccurs="unbounded"/>
+ <element ref="saml:SubjectConfirmationData" minOccurs="0"/>
+ <element ref="ds:KeyInfo" minOccurs="0"/>
+ </sequence>
+ </complexType>
+ <element name="SubjectConfirmationData" type="anyType"/>
+ <element name="ConfirmationMethod" type="anyURI"/>
+ <element name="AuthenticationStatement" type="saml:AuthenticationStatementType"/>
+ <complexType name="AuthenticationStatementType">
+ <complexContent>
+ <extension base="saml:SubjectStatementAbstractType">
+ <sequence>
+ <element ref="saml:SubjectLocality" minOccurs="0"/>
+ <element ref="saml:AuthorityBinding" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="AuthenticationMethod" type="anyURI" use="required"/>
+ <attribute name="AuthenticationInstant" type="dateTime" use="required"/>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="SubjectLocality" type="saml:SubjectLocalityType"/>
+ <complexType name="SubjectLocalityType">
+ <attribute name="IPAddress" type="string" use="optional"/>
+ <attribute name="DNSAddress" type="string" use="optional"/>
+ </complexType>
+ <element name="AuthorityBinding" type="saml:AuthorityBindingType"/>
+ <complexType name="AuthorityBindingType">
+ <attribute name="AuthorityKind" type="QName" use="required"/>
+ <attribute name="Location" type="anyURI" use="required"/>
+ <attribute name="Binding" type="anyURI" use="required"/>
+ </complexType>
+ <element name="AuthorizationDecisionStatement" type="saml:AuthorizationDecisionStatementType"/>
+ <complexType name="AuthorizationDecisionStatementType">
+ <complexContent>
+ <extension base="saml:SubjectStatementAbstractType">
+ <sequence>
+ <element ref="saml:Action" maxOccurs="unbounded"/>
+ <element ref="saml:Evidence" minOccurs="0"/>
+ </sequence>
+ <attribute name="Resource" type="anyURI" use="required"/>
+ <attribute name="Decision" type="saml:DecisionType" use="required"/>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="Action" type="saml:ActionType"/>
+ <complexType name="ActionType">
+ <simpleContent>
+ <extension base="string">
+ <attribute name="Namespace" type="anyURI"/>
+ </extension>
+ </simpleContent>
+ </complexType>
+ <element name="Evidence" type="saml:EvidenceType"/>
+ <complexType name="EvidenceType">
+ <choice maxOccurs="unbounded">
+ <element ref="saml:AssertionIDReference"/>
+ <element ref="saml:Assertion"/>
+ </choice>
+ </complexType>
+ <element name="AttributeStatement" type="saml:AttributeStatementType"/>
+ <complexType name="AttributeStatementType">
+ <complexContent>
+ <extension base="saml:SubjectStatementAbstractType">
+ <sequence>
+ <element ref="saml:Attribute" maxOccurs="unbounded"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="AttributeDesignator" type="saml:AttributeDesignatorType"/>
+ <complexType name="AttributeDesignatorType">
+ <attribute name="AttributeName" type="string" use="required"/>
+ <attribute name="AttributeNamespace" type="anyURI" use="required"/>
+ </complexType>
+ <element name="Attribute" type="saml:AttributeType"/>
+ <complexType name="AttributeType">
+ <complexContent>
+ <extension base="saml:AttributeDesignatorType">
+ <sequence>
+ <element ref="saml:AttributeValue" maxOccurs="unbounded"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="AttributeValue" type="anyType"/>
+</schema>
diff --git a/common/src/main/resources/resources/schemas/cs-sstc-schema-protocol-01.xsd b/common/src/main/resources/resources/schemas/cs-sstc-schema-protocol-01.xsd
new file mode 100644
index 000000000..ecad05b0f
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/cs-sstc-schema-protocol-01.xsd
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- edited with XML Spy v4.2 U (http://www.xmlspy.com) by Phillip Hallam-Baker (Phillip Hallam-Baker) -->
+<schema targetNamespace="urn:oasis:names:tc:SAML:1.0:protocol" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified">
+ <import namespace="urn:oasis:names:tc:SAML:1.0:assertion" schemaLocation="cs-sstc-schema-assertion-01.xsd"/>
+ <import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
+ <annotation>
+ <documentation>
+ Document identifier: cs-sstc-schema-protocol-01
+ Location: http://www.oasis-open.org/committees/security/docs/
+ </documentation>
+ </annotation>
+ <complexType name="RequestAbstractType" abstract="true">
+ <sequence>
+ <element ref="samlp:RespondWith" minOccurs="0" maxOccurs="unbounded"/>
+ <element ref="ds:Signature" minOccurs="0"/>
+ </sequence>
+ <attribute name="RequestID" type="saml:IDType" use="required"/>
+ <attribute name="MajorVersion" type="integer" use="required"/>
+ <attribute name="MinorVersion" type="integer" use="required"/>
+ <attribute name="IssueInstant" type="dateTime" use="required"/>
+ </complexType>
+ <element name="RespondWith" type="QName"/>
+ <element name="Request" type="samlp:RequestType"/>
+ <complexType name="RequestType">
+ <complexContent>
+ <extension base="samlp:RequestAbstractType">
+ <choice>
+ <element ref="samlp:Query"/>
+ <element ref="samlp:SubjectQuery"/>
+ <element ref="samlp:AuthenticationQuery"/>
+ <element ref="samlp:AttributeQuery"/>
+ <element ref="samlp:AuthorizationDecisionQuery"/>
+ <element ref="saml:AssertionIDReference" maxOccurs="unbounded"/>
+ <element ref="samlp:AssertionArtifact" maxOccurs="unbounded"/>
+ </choice>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="AssertionArtifact" type="string"/>
+ <element name="Query" type="samlp:QueryAbstractType"/>
+ <complexType name="QueryAbstractType" abstract="true"/>
+ <element name="SubjectQuery" type="samlp:SubjectQueryAbstractType"/>
+ <complexType name="SubjectQueryAbstractType" abstract="true">
+ <complexContent>
+ <extension base="samlp:QueryAbstractType">
+ <sequence>
+ <element ref="saml:Subject"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="AuthenticationQuery" type="samlp:AuthenticationQueryType"/>
+ <complexType name="AuthenticationQueryType">
+ <complexContent>
+ <extension base="samlp:SubjectQueryAbstractType">
+ <attribute name="AuthenticationMethod" type="anyURI"/>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="AttributeQuery" type="samlp:AttributeQueryType"/>
+ <complexType name="AttributeQueryType">
+ <complexContent>
+ <extension base="samlp:SubjectQueryAbstractType">
+ <sequence>
+ <element ref="saml:AttributeDesignator" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="Resource" type="anyURI" use="optional"/>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="AuthorizationDecisionQuery" type="samlp:AuthorizationDecisionQueryType"/>
+ <complexType name="AuthorizationDecisionQueryType">
+ <complexContent>
+ <extension base="samlp:SubjectQueryAbstractType">
+ <sequence>
+ <element ref="saml:Action" maxOccurs="unbounded"/>
+ <element ref="saml:Evidence" minOccurs="0" maxOccurs="1"/>
+ </sequence>
+ <attribute name="Resource" type="anyURI" use="required"/>
+ </extension>
+ </complexContent>
+ </complexType>
+ <complexType name="ResponseAbstractType" abstract="true">
+ <sequence>
+ <element ref="ds:Signature" minOccurs="0"/>
+ </sequence>
+ <attribute name="ResponseID" type="saml:IDType" use="required"/>
+ <attribute name="InResponseTo" type="saml:IDReferenceType" use="optional"/>
+ <attribute name="MajorVersion" type="integer" use="required"/>
+ <attribute name="MinorVersion" type="integer" use="required"/>
+ <attribute name="IssueInstant" type="dateTime" use="required"/>
+ <attribute name="Recipient" type="anyURI" use="optional"/>
+ </complexType>
+ <element name="Response" type="samlp:ResponseType"/>
+ <complexType name="ResponseType">
+ <complexContent>
+ <extension base="samlp:ResponseAbstractType">
+ <sequence>
+ <element ref="samlp:Status"/>
+ <element ref="saml:Assertion" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="Status" type="samlp:StatusType"/>
+ <complexType name="StatusType">
+ <sequence>
+ <element ref="samlp:StatusCode"/>
+ <element ref="samlp:StatusMessage" minOccurs="0" maxOccurs="1"/>
+ <element ref="samlp:StatusDetail" minOccurs="0"/>
+ </sequence>
+ </complexType>
+ <element name="StatusCode" type="samlp:StatusCodeType"/>
+ <complexType name="StatusCodeType">
+ <sequence>
+ <element ref="samlp:StatusCode" minOccurs="0"/>
+ </sequence>
+ <attribute name="Value" type="QName" use="required"/>
+ </complexType>
+ <element name="StatusMessage" type="string"/>
+ <element name="StatusDetail" type="samlp:StatusDetailType"/>
+ <complexType name="StatusDetailType">
+ <sequence>
+ <any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+</schema>
diff --git a/common/src/main/resources/resources/schemas/datatypes.dtd b/common/src/main/resources/resources/schemas/datatypes.dtd
new file mode 100644
index 000000000..8e48553be
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/datatypes.dtd
@@ -0,0 +1,203 @@
+<!--
+ DTD for XML Schemas: Part 2: Datatypes
+ $Id: datatypes.dtd,v 1.23 2001/03/16 17:36:30 ht Exp $
+ Note this DTD is NOT normative, or even definitive. - - the
+ prose copy in the datatypes REC is the definitive version
+ (which shouldn't differ from this one except for this comment
+ and entity expansions, but just in case)
+ -->
+
+<!--
+ This DTD cannot be used on its own, it is intended
+ only for incorporation in XMLSchema.dtd, q.v.
+ -->
+
+<!-- Define all the element names, with optional prefix -->
+<!ENTITY % simpleType "%p;simpleType">
+<!ENTITY % restriction "%p;restriction">
+<!ENTITY % list "%p;list">
+<!ENTITY % union "%p;union">
+<!ENTITY % maxExclusive "%p;maxExclusive">
+<!ENTITY % minExclusive "%p;minExclusive">
+<!ENTITY % maxInclusive "%p;maxInclusive">
+<!ENTITY % minInclusive "%p;minInclusive">
+<!ENTITY % totalDigits "%p;totalDigits">
+<!ENTITY % fractionDigits "%p;fractionDigits">
+<!ENTITY % length "%p;length">
+<!ENTITY % minLength "%p;minLength">
+<!ENTITY % maxLength "%p;maxLength">
+<!ENTITY % enumeration "%p;enumeration">
+<!ENTITY % whiteSpace "%p;whiteSpace">
+<!ENTITY % pattern "%p;pattern">
+
+<!--
+ Customisation entities for the ATTLIST of each element
+ type. Define one of these if your schema takes advantage
+ of the anyAttribute='##other' in the schema for schemas
+ -->
+
+<!ENTITY % simpleTypeAttrs "">
+<!ENTITY % restrictionAttrs "">
+<!ENTITY % listAttrs "">
+<!ENTITY % unionAttrs "">
+<!ENTITY % maxExclusiveAttrs "">
+<!ENTITY % minExclusiveAttrs "">
+<!ENTITY % maxInclusiveAttrs "">
+<!ENTITY % minInclusiveAttrs "">
+<!ENTITY % totalDigitsAttrs "">
+<!ENTITY % fractionDigitsAttrs "">
+<!ENTITY % lengthAttrs "">
+<!ENTITY % minLengthAttrs "">
+<!ENTITY % maxLengthAttrs "">
+<!ENTITY % enumerationAttrs "">
+<!ENTITY % whiteSpaceAttrs "">
+<!ENTITY % patternAttrs "">
+
+<!-- Define some entities for informative use as attribute
+ types -->
+<!ENTITY % URIref "CDATA">
+<!ENTITY % XPathExpr "CDATA">
+<!ENTITY % QName "NMTOKEN">
+<!ENTITY % QNames "NMTOKENS">
+<!ENTITY % NCName "NMTOKEN">
+<!ENTITY % nonNegativeInteger "NMTOKEN">
+<!ENTITY % boolean "(true|false)">
+<!ENTITY % simpleDerivationSet "CDATA">
+<!--
+ #all or space-separated list drawn from derivationChoice
+ -->
+
+<!--
+ Note that the use of 'facet' below is less restrictive
+ than is really intended: There should in fact be no
+ more than one of each of minInclusive, minExclusive,
+ maxInclusive, maxExclusive, totalDigits, fractionDigits,
+ length, maxLength, minLength within datatype,
+ and the min- and max- variants of Inclusive and Exclusive
+ are mutually exclusive. On the other hand, pattern and
+ enumeration may repeat.
+ -->
+<!ENTITY % minBound "(%minInclusive; | %minExclusive;)">
+<!ENTITY % maxBound "(%maxInclusive; | %maxExclusive;)">
+<!ENTITY % bounds "%minBound; | %maxBound;">
+<!ENTITY % numeric "%totalDigits; | %fractionDigits;">
+<!ENTITY % ordered "%bounds; | %numeric;">
+<!ENTITY % unordered
+ "%pattern; | %enumeration; | %whiteSpace; | %length; |
+ %maxLength; | %minLength;">
+<!ENTITY % facet "%ordered; | %unordered;">
+<!ENTITY % facetAttr
+ "value CDATA #REQUIRED
+ id ID #IMPLIED">
+<!ENTITY % fixedAttr "fixed %boolean; #IMPLIED">
+<!ENTITY % facetModel "(%annotation;)?">
+<!ELEMENT %simpleType;
+ ((%annotation;)?, (%restriction; | %list; | %union;))>
+<!ATTLIST %simpleType;
+ name %NCName; #IMPLIED
+ final %simpleDerivationSet; #IMPLIED
+ id ID #IMPLIED
+ %simpleTypeAttrs;>
+<!-- name is required at top level -->
+<!ELEMENT %restriction; ((%annotation;)?,
+ (%restriction1; |
+ ((%simpleType;)?,(%facet;)*)),
+ (%attrDecls;))>
+<!ATTLIST %restriction;
+ base %QName; #IMPLIED
+ id ID #IMPLIED
+ %restrictionAttrs;>
+<!--
+ base and simpleType child are mutually exclusive,
+ one is required.
+
+ restriction is shared between simpleType and
+ simpleContent and complexContent (in XMLSchema.xsd).
+ restriction1 is for the latter cases, when this
+ is restricting a complex type, as is attrDecls.
+ -->
+<!ELEMENT %list; ((%annotation;)?,(%simpleType;)?)>
+<!ATTLIST %list;
+ itemType %QName; #IMPLIED
+ id ID #IMPLIED
+ %listAttrs;>
+<!--
+ itemType and simpleType child are mutually exclusive,
+ one is required
+ -->
+<!ELEMENT %union; ((%annotation;)?,(%simpleType;)*)>
+<!ATTLIST %union;
+ id ID #IMPLIED
+ memberTypes %QNames; #IMPLIED
+ %unionAttrs;>
+<!--
+ At least one item in memberTypes or one simpleType
+ child is required
+ -->
+
+<!ELEMENT %maxExclusive; %facetModel;>
+<!ATTLIST %maxExclusive;
+ %facetAttr;
+ %fixedAttr;
+ %maxExclusiveAttrs;>
+<!ELEMENT %minExclusive; %facetModel;>
+<!ATTLIST %minExclusive;
+ %facetAttr;
+ %fixedAttr;
+ %minExclusiveAttrs;>
+
+<!ELEMENT %maxInclusive; %facetModel;>
+<!ATTLIST %maxInclusive;
+ %facetAttr;
+ %fixedAttr;
+ %maxInclusiveAttrs;>
+<!ELEMENT %minInclusive; %facetModel;>
+<!ATTLIST %minInclusive;
+ %facetAttr;
+ %fixedAttr;
+ %minInclusiveAttrs;>
+
+<!ELEMENT %totalDigits; %facetModel;>
+<!ATTLIST %totalDigits;
+ %facetAttr;
+ %fixedAttr;
+ %totalDigitsAttrs;>
+<!ELEMENT %fractionDigits; %facetModel;>
+<!ATTLIST %fractionDigits;
+ %facetAttr;
+ %fixedAttr;
+ %fractionDigitsAttrs;>
+
+<!ELEMENT %length; %facetModel;>
+<!ATTLIST %length;
+ %facetAttr;
+ %fixedAttr;
+ %lengthAttrs;>
+<!ELEMENT %minLength; %facetModel;>
+<!ATTLIST %minLength;
+ %facetAttr;
+ %fixedAttr;
+ %minLengthAttrs;>
+<!ELEMENT %maxLength; %facetModel;>
+<!ATTLIST %maxLength;
+ %facetAttr;
+ %fixedAttr;
+ %maxLengthAttrs;>
+
+<!-- This one can be repeated -->
+<!ELEMENT %enumeration; %facetModel;>
+<!ATTLIST %enumeration;
+ %facetAttr;
+ %enumerationAttrs;>
+
+<!ELEMENT %whiteSpace; %facetModel;>
+<!ATTLIST %whiteSpace;
+ %facetAttr;
+ %fixedAttr;
+ %whiteSpaceAttrs;>
+
+<!-- This one can be repeated -->
+<!ELEMENT %pattern; %facetModel;>
+<!ATTLIST %pattern;
+ %facetAttr;
+ %patternAttrs;>
diff --git a/common/src/main/resources/resources/schemas/exclusive-canonicalization.xsd b/common/src/main/resources/resources/schemas/exclusive-canonicalization.xsd
new file mode 100644
index 000000000..d4a2d82ec
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/exclusive-canonicalization.xsd
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- commented out for compatibility with Xerces 2.0.2
+<!DOCTYPE schema
+ PUBLIC "-//W3C//DTD XMLSchema 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd"
+ [
+ <!ATTLIST schema
+ xmlns:ec CDATA #FIXED 'http://www.w3.org/2001/10/xml-exc-c14n#'>
+ <!ENTITY ec 'http://www.w3.org/2001/10/xml-exc-c14n#'>
+ <!ENTITY % p ''>
+ <!ENTITY % s ''>
+ ]>
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"
+ targetNamespace="http://www.w3.org/2001/10/xml-exc-c14n#"
+ version="0.1" elementFormDefault="qualified">
+ <element name="InclusiveNamespaces"
+ type="ec:InclusiveNamespaces"/>
+ <complexType name="InclusiveNamespaces">
+ <attribute name="PrefixList" type="string"/>
+ </complexType>
+</schema> \ No newline at end of file
diff --git a/common/src/main/resources/resources/schemas/xml.xsd b/common/src/main/resources/resources/schemas/xml.xsd
new file mode 100644
index 000000000..79dbc02ba
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/xml.xsd
@@ -0,0 +1,83 @@
+<?xml version='1.0'?>
+<!-- documented out for compatibility with Xerces-2.0.2
+<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" >
+-->
+<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en">
+
+ <xs:annotation>
+ <xs:documentation>
+ See http://www.w3.org/XML/1998/namespace.html and
+ http://www.w3.org/TR/REC-xml for information about this namespace.
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:annotation>
+ <xs:documentation>This schema defines attributes and an attribute group
+ suitable for use by
+ schemas wishing to allow xml:base, xml:lang or xml:space attributes
+ on elements they define.
+
+ To enable this, such a schema must import this schema
+ for the XML namespace, e.g. as follows:
+ &lt;schema . . .>
+ . . .
+ &lt;import namespace="http://www.w3.org/XML/1998/namespace"
+ schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
+
+ Subsequently, qualified reference to any of the attributes
+ or the group defined below will have the desired effect, e.g.
+
+ &lt;type . . .>
+ . . .
+ &lt;attributeGroup ref="xml:specialAttrs"/>
+
+ will define a type which will schema-validate an instance
+ element with any of those attributes</xs:documentation>
+ </xs:annotation>
+
+ <xs:annotation>
+ <xs:documentation>In keeping with the XML Schema WG's standard versioning
+ policy, this schema document will persist at
+ http://www.w3.org/2001/03/xml.xsd.
+ At the date of issue it can also be found at
+ http://www.w3.org/2001/xml.xsd.
+ The schema document at that URI may however change in the future,
+ in order to remain compatible with the latest version of XML Schema
+ itself. In other words, if the XML Schema namespace changes, the version
+ of this document at
+ http://www.w3.org/2001/xml.xsd will change
+ accordingly; the version at
+ http://www.w3.org/2001/03/xml.xsd will not change.
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:attribute name="lang" type="xs:language">
+ <xs:annotation>
+ <xs:documentation>In due course, we should install the relevant ISO 2- and 3-letter
+ codes as the enumerated possible values . . .</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attribute name="space" default="preserve">
+ <xs:simpleType>
+ <xs:restriction base="xs:NCName">
+ <xs:enumeration value="default"/>
+ <xs:enumeration value="preserve"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+
+ <xs:attribute name="base" type="xs:anyURI">
+ <xs:annotation>
+ <xs:documentation>See http://www.w3.org/TR/xmlbase/ for
+ information about this attribute.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+
+ <xs:attributeGroup name="specialAttrs">
+ <xs:attribute ref="xml:base"/>
+ <xs:attribute ref="xml:lang"/>
+ <xs:attribute ref="xml:space"/>
+ </xs:attributeGroup>
+
+</xs:schema>
diff --git a/common/src/main/resources/resources/schemas/xmldsig-core-schema.xsd b/common/src/main/resources/resources/schemas/xmldsig-core-schema.xsd
new file mode 100644
index 000000000..a7e302373
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/xmldsig-core-schema.xsd
@@ -0,0 +1,264 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- documented out for compatibility with Xerces-2.0.2
+<!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSchema 200102//EN" "XMLSchema.dtd" [
+ <!ATTLIST schema
+ xmlns:ds CDATA #FIXED "http://www.w3.org/2000/09/xmldsig#"
+>
+ <!ENTITY dsig 'http://www.w3.org/2000/09/xmldsig#'>
+ <!ENTITY % p ''>
+ <!ENTITY % s ''>
+]>
+-->
+<!-- Schema for XML Signatures
+ http://www.w3.org/2000/09/xmldsig#
+ $Revision: 1.1 $ on $Date: 2003/03/11 10:10:34 $ by $Author: peck $
+
+ Copyright 2001 The Internet Society and W3C (Massachusetts Institute
+ of Technology, Institut National de Recherche en Informatique et en
+ Automatique, Keio University). All Rights Reserved.
+ http://www.w3.org/Consortium/Legal/
+
+ This document is governed by the W3C Software License [1] as described
+ in the FAQ [2].
+
+ [1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
+ [2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD
+-->
+<schema targetNamespace="http://www.w3.org/2000/09/xmldsig#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" version="0.1">
+ <!-- Basic Types Defined for Signatures -->
+ <simpleType name="CryptoBinary">
+ <restriction base="base64Binary"/>
+ </simpleType>
+ <!-- Start Signature -->
+ <element name="Signature" type="ds:SignatureType"/>
+ <complexType name="SignatureType">
+ <sequence>
+ <element ref="ds:SignedInfo"/>
+ <element ref="ds:SignatureValue"/>
+ <element ref="ds:KeyInfo" minOccurs="0"/>
+ <element ref="ds:Object" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="Id" type="ID" use="optional"/>
+ </complexType>
+ <element name="SignatureValue" type="ds:SignatureValueType"/>
+ <complexType name="SignatureValueType">
+ <simpleContent>
+ <extension base="base64Binary">
+ <attribute name="Id" type="ID" use="optional"/>
+ </extension>
+ </simpleContent>
+ </complexType>
+ <!-- Start SignedInfo -->
+ <element name="SignedInfo" type="ds:SignedInfoType"/>
+ <complexType name="SignedInfoType">
+ <sequence>
+ <element ref="ds:CanonicalizationMethod"/>
+ <element ref="ds:SignatureMethod"/>
+ <element ref="ds:Reference" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="Id" type="ID" use="optional"/>
+ </complexType>
+ <element name="CanonicalizationMethod" type="ds:CanonicalizationMethodType"/>
+ <complexType name="CanonicalizationMethodType" mixed="true">
+ <sequence>
+ <any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
+ <!-- (0,unbounded) elements from (1,1) namespace -->
+ </sequence>
+ <attribute name="Algorithm" type="anyURI" use="required"/>
+ </complexType>
+ <element name="SignatureMethod" type="ds:SignatureMethodType"/>
+ <complexType name="SignatureMethodType" mixed="true">
+ <sequence>
+ <element name="HMACOutputLength" type="ds:HMACOutputLengthType" minOccurs="0"/>
+ <any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
+ <!-- (0,unbounded) elements from (1,1) external namespace -->
+ </sequence>
+ <attribute name="Algorithm" type="anyURI" use="required"/>
+ </complexType>
+ <!-- Start Reference -->
+ <element name="Reference" type="ds:ReferenceType"/>
+ <complexType name="ReferenceType">
+ <sequence>
+ <element ref="ds:Transforms" minOccurs="0"/>
+ <element ref="ds:DigestMethod"/>
+ <element ref="ds:DigestValue"/>
+ </sequence>
+ <attribute name="Id" type="ID" use="optional"/>
+ <attribute name="URI" type="anyURI" use="optional"/>
+ <attribute name="Type" type="anyURI" use="optional"/>
+ </complexType>
+ <element name="Transforms" type="ds:TransformsType"/>
+ <complexType name="TransformsType">
+ <sequence>
+ <element ref="ds:Transform" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ <element name="Transform" type="ds:TransformType"/>
+ <complexType name="TransformType" mixed="true">
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <any namespace="##other" processContents="lax"/>
+ <element name="XPath" type="string"/>
+ <!-- (1,1) elements from (0,unbounded) namespaces -->
+ </choice>
+ <attribute name="Algorithm" type="anyURI" use="required"/>
+ </complexType>
+ <!-- End Reference -->
+ <element name="DigestMethod" type="ds:DigestMethodType"/>
+ <complexType name="DigestMethodType" mixed="true">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="Algorithm" type="anyURI" use="required"/>
+ </complexType>
+ <element name="DigestValue" type="ds:DigestValueType"/>
+ <simpleType name="DigestValueType">
+ <restriction base="base64Binary"/>
+ </simpleType>
+ <!-- End SignedInfo -->
+ <!-- Start KeyInfo -->
+ <element name="KeyInfo" type="ds:KeyInfoType"/>
+ <complexType name="KeyInfoType" mixed="true">
+ <choice maxOccurs="unbounded">
+ <element ref="ds:KeyName"/>
+ <element ref="ds:KeyValue"/>
+ <element ref="ds:RetrievalMethod"/>
+ <element ref="ds:X509Data"/>
+ <element ref="ds:PGPData"/>
+ <element ref="ds:SPKIData"/>
+ <element ref="ds:MgmtData"/>
+ <any namespace="##other" processContents="lax"/>
+ <!-- (1,1) elements from (0,unbounded) namespaces -->
+ </choice>
+ <attribute name="Id" type="ID" use="optional"/>
+ </complexType>
+ <element name="KeyName" type="string"/>
+ <element name="MgmtData" type="string"/>
+ <element name="KeyValue" type="ds:KeyValueType"/>
+ <complexType name="KeyValueType" mixed="true">
+ <choice>
+ <element ref="ds:DSAKeyValue"/>
+ <element ref="ds:RSAKeyValue"/>
+ <any namespace="##other" processContents="lax"/>
+ </choice>
+ </complexType>
+ <element name="RetrievalMethod" type="ds:RetrievalMethodType"/>
+ <complexType name="RetrievalMethodType">
+ <sequence>
+ <element ref="ds:Transforms" minOccurs="0"/>
+ </sequence>
+ <attribute name="URI" type="anyURI"/>
+ <attribute name="Type" type="anyURI" use="optional"/>
+ </complexType>
+ <!-- Start X509Data -->
+ <element name="X509Data" type="ds:X509DataType"/>
+ <complexType name="X509DataType">
+ <sequence maxOccurs="unbounded">
+ <choice>
+ <element name="X509IssuerSerial" type="ds:X509IssuerSerialType"/>
+ <element name="X509SKI" type="base64Binary"/>
+ <element name="X509SubjectName" type="string"/>
+ <element name="X509Certificate" type="base64Binary"/>
+ <element name="X509CRL" type="base64Binary"/>
+ <any namespace="##other" processContents="lax"/>
+ </choice>
+ </sequence>
+ </complexType>
+ <complexType name="X509IssuerSerialType">
+ <sequence>
+ <element name="X509IssuerName" type="string"/>
+ <element name="X509SerialNumber" type="integer"/>
+ </sequence>
+ </complexType>
+ <!-- End X509Data -->
+ <!-- Begin PGPData -->
+ <element name="PGPData" type="ds:PGPDataType"/>
+ <complexType name="PGPDataType">
+ <choice>
+ <sequence>
+ <element name="PGPKeyID" type="base64Binary"/>
+ <element name="PGPKeyPacket" type="base64Binary" minOccurs="0"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <sequence>
+ <element name="PGPKeyPacket" type="base64Binary"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </choice>
+ </complexType>
+ <!-- End PGPData -->
+ <!-- Begin SPKIData -->
+ <element name="SPKIData" type="ds:SPKIDataType"/>
+ <complexType name="SPKIDataType">
+ <sequence maxOccurs="unbounded">
+ <element name="SPKISexp" type="base64Binary"/>
+ <any namespace="##other" processContents="lax" minOccurs="0"/>
+ </sequence>
+ </complexType>
+ <!-- End SPKIData -->
+ <!-- End KeyInfo -->
+ <!-- Start Object (Manifest, SignatureProperty) -->
+ <element name="Object" type="ds:ObjectType"/>
+ <complexType name="ObjectType" mixed="true">
+ <sequence minOccurs="0" maxOccurs="unbounded">
+ <any namespace="##any" processContents="lax"/>
+ </sequence>
+ <attribute name="Id" type="ID" use="optional"/>
+ <attribute name="MimeType" type="string" use="optional"/>
+ <attribute name="Encoding" type="anyURI" use="optional"/>
+ <!-- add a grep facet -->
+ </complexType>
+ <element name="Manifest" type="ds:ManifestType"/>
+ <complexType name="ManifestType">
+ <sequence>
+ <element ref="ds:Reference" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="Id" type="ID" use="optional"/>
+ </complexType>
+ <element name="SignatureProperties" type="ds:SignaturePropertiesType"/>
+ <complexType name="SignaturePropertiesType">
+ <sequence>
+ <element ref="ds:SignatureProperty" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="Id" type="ID" use="optional"/>
+ </complexType>
+ <element name="SignatureProperty" type="ds:SignaturePropertyType"/>
+ <complexType name="SignaturePropertyType" mixed="true">
+ <choice maxOccurs="unbounded">
+ <any namespace="##other" processContents="lax"/>
+ <!-- (1,1) elements from (1,unbounded) namespaces -->
+ </choice>
+ <attribute name="Target" type="anyURI" use="required"/>
+ <attribute name="Id" type="ID" use="optional"/>
+ </complexType>
+ <!-- End Object (Manifest, SignatureProperty) -->
+ <!-- Start Algorithm Parameters -->
+ <simpleType name="HMACOutputLengthType">
+ <restriction base="integer"/>
+ </simpleType>
+ <!-- Start KeyValue Element-types -->
+ <element name="DSAKeyValue" type="ds:DSAKeyValueType"/>
+ <complexType name="DSAKeyValueType">
+ <sequence>
+ <sequence minOccurs="0">
+ <element name="P" type="ds:CryptoBinary"/>
+ <element name="Q" type="ds:CryptoBinary"/>
+ </sequence>
+ <element name="G" type="ds:CryptoBinary" minOccurs="0"/>
+ <element name="Y" type="ds:CryptoBinary"/>
+ <element name="J" type="ds:CryptoBinary" minOccurs="0"/>
+ <sequence minOccurs="0">
+ <element name="Seed" type="ds:CryptoBinary"/>
+ <element name="PgenCounter" type="ds:CryptoBinary"/>
+ </sequence>
+ </sequence>
+ </complexType>
+ <element name="RSAKeyValue" type="ds:RSAKeyValueType"/>
+ <complexType name="RSAKeyValueType">
+ <sequence>
+ <element name="Modulus" type="ds:CryptoBinary"/>
+ <element name="Exponent" type="ds:CryptoBinary"/>
+ </sequence>
+ </complexType>
+ <!-- End KeyValue Element-types -->
+ <!-- End Signature -->
+</schema>
diff --git a/common/src/main/resources/resources/schemas/xmldsig-filter2.xsd b/common/src/main/resources/resources/schemas/xmldsig-filter2.xsd
new file mode 100644
index 000000000..330eafd19
--- /dev/null
+++ b/common/src/main/resources/resources/schemas/xmldsig-filter2.xsd
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- documented out for compatibility with Xerces-2.0.2
+ <!DOCTYPE schema
+ PUBLIC "-//W3C//DTD XMLSchema 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd"
+ [
+ <!ATTLIST schema
+ xmlns:xf CDATA #FIXED 'http://www.w3.org/2002/06/xmldsig-filter2'>
+ <!ENTITY xf 'http://www.w3.org/2002/06/xmldsig-filter2'>
+ <!ENTITY % p ''>
+ <!ENTITY % s ''>
+ ]>
+-->
+
+ <schema xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:xf="http://www.w3.org/2002/06/xmldsig-filter2"
+ targetNamespace="http://www.w3.org/2002/06/xmldsig-filter2"
+ version="0.1" elementFormDefault="qualified">
+
+ <element name="XPath"
+ type="xf:XPathType"/>
+
+ <complexType name="XPathType">
+ <simpleContent>
+ <extension base="string">
+ <attribute name="Filter">
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="intersect"/>
+ <enumeration value="subtract"/>
+ <enumeration value="union"/>
+ </restriction>
+ </simpleType>
+ </attribute>
+ </extension>
+ </simpleContent>
+ </complexType>
+
+ </schema> \ No newline at end of file
diff --git a/common/src/test/java/test/at/gv/egovernment/moa/AllTests.java b/common/src/test/java/test/at/gv/egovernment/moa/AllTests.java
new file mode 100644
index 000000000..0e703b1bb
--- /dev/null
+++ b/common/src/test/java/test/at/gv/egovernment/moa/AllTests.java
@@ -0,0 +1,53 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa;
+
+import test.at.gv.egovernment.moa.util.DOMUtilsTest;
+import test.at.gv.egovernment.moa.util.DateTimeUtilsTest;
+import test.at.gv.egovernment.moa.util.KeyStoreUtilsTest;
+import test.at.gv.egovernment.moa.util.SSLUtilsTest;
+import test.at.gv.egovernment.moa.util.XPathUtilsTest;
+
+import junit.awtui.TestRunner;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author patrick
+ * @version $Id$
+ */
+public class AllTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite();
+
+ suite.addTestSuite(DOMUtilsTest.class);
+ suite.addTestSuite(DateTimeUtilsTest.class);
+ suite.addTestSuite(XPathUtilsTest.class);
+ suite.addTestSuite(KeyStoreUtilsTest.class);
+ suite.addTestSuite(SSLUtilsTest.class);
+
+ return suite;
+ }
+
+ public static void main(String[] args) {
+ try {
+ TestRunner.run(AllTests.class);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/common/src/test/java/test/at/gv/egovernment/moa/MOATestCase.java b/common/src/test/java/test/at/gv/egovernment/moa/MOATestCase.java
new file mode 100644
index 000000000..42e5e0230
--- /dev/null
+++ b/common/src/test/java/test/at/gv/egovernment/moa/MOATestCase.java
@@ -0,0 +1,90 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa;
+
+import java.io.FileInputStream;
+import java.io.StringReader;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.w3c.dom.Document;
+
+import org.xml.sax.InputSource;
+
+import junit.framework.TestCase;
+
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+
+/**
+ * Base class for MOA test cases.
+ *
+ * Provides some utility functions.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class MOATestCase extends TestCase {
+
+ protected static final String TESTDATA_ROOT = "data/test/";
+
+ /**
+ * Constructor for MOATestCase.
+ * @param arg0
+ */
+ public MOATestCase(String name) {
+ super(name);
+ }
+
+ /**
+ * Parse an XML file non-validating.
+ */
+ public static Document parseXml(String fileName) throws Exception {
+ return DOMUtils.parseDocument(
+ new FileInputStream(fileName),
+ false,
+ null,
+ null);
+ }
+
+ /**
+ * Parse an XML validating with a given file name.
+ *
+ * Uses the local schema resources.
+ */
+ public static Document parseXmlValidating(String fileName) throws Exception {
+ return DOMUtils.parseDocument(
+ new FileInputStream(fileName),
+ true,
+ Constants.ALL_SCHEMA_LOCATIONS,
+ null);
+ }
+
+ /**
+ * Parse an XML from a String.
+ */
+ public static Document parseXmlString(String xml) throws Exception {
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder builder;
+
+ factory.setNamespaceAware(true);
+ builder = factory.newDocumentBuilder();
+
+ return builder.parse(new InputSource(new StringReader(xml)));
+ }
+
+}
diff --git a/common/src/test/java/test/at/gv/egovernment/moa/util/DOMUtilsTest.java b/common/src/test/java/test/at/gv/egovernment/moa/util/DOMUtilsTest.java
new file mode 100644
index 000000000..8e301e41c
--- /dev/null
+++ b/common/src/test/java/test/at/gv/egovernment/moa/util/DOMUtilsTest.java
@@ -0,0 +1,152 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.util;
+import java.io.FileInputStream;
+import java.util.Map;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+import test.at.gv.egovernment.moa.*;
+
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+
+/**
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class DOMUtilsTest extends MOATestCase {
+ private static final String TESTDATA_BASE = TESTDATA_ROOT + "xml/";
+ private static boolean grammarsInitialized = false;
+
+ /**
+ * Constructor for DOMUtilsTest.
+ * @param name
+ */
+ public DOMUtilsTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ if (!grammarsInitialized) {
+ // preparse XML schema
+ DOMUtils.addSchemaToPool(
+ getClass().getResourceAsStream(Constants.XML_SCHEMA_LOCATION),
+ Constants.XML_NS_URI);
+ // preparse XMLDsig Filter2 schema
+ DOMUtils.addSchemaToPool(
+ getClass().getResourceAsStream(Constants.DSIG_FILTER2_SCHEMA_LOCATION),
+ Constants.DSIG_FILTER2_NS_URI);
+ // preparse XMLDsig schema
+ DOMUtils.addSchemaToPool(
+ getClass().getResourceAsStream(Constants.DSIG_SCHEMA_LOCATION),
+ Constants.DSIG_NS_URI);
+ // preparse MOA schema
+ DOMUtils.addSchemaToPool(
+ getClass().getResourceAsStream(Constants.MOA_SCHEMA_LOCATION),
+ Constants.MOA_NS_URI);
+ grammarsInitialized = true;
+ }
+ }
+
+ private Document parse(String fileName) throws Exception {
+ return DOMUtils.parseDocument(
+ new FileInputStream(fileName),
+ true,
+ Constants.ALL_SCHEMA_LOCATIONS,
+ null);
+ }
+
+ public void testParseCreateXMLSignature() throws Exception {
+ parse(TESTDATA_BASE + "CreateXMLSignature/TestGeneratorCX2.005.Req.xml");
+ parse(TESTDATA_BASE + "CreateXMLSignature/Req000.xml");
+ parse(TESTDATA_BASE + "CreateXMLSignature/Req001.xml");
+ parse(TESTDATA_BASE + "CreateXMLSignature/Req002.xml");
+ parse(TESTDATA_BASE + "CreateXMLSignature/Req004.xml");
+ }
+
+ public void testParseVerifyCMSSignature() throws Exception {
+ parse(TESTDATA_BASE + "VerifyCMSSignature/Req000.xml");
+ }
+
+ public void testParseVerifyXMLSignature() throws Exception {
+ parse(TESTDATA_BASE + "VerifyXMLSignature/Req000.xml");
+ parse(TESTDATA_BASE + "VerifyXMLSignature/Req001.xml");
+ parse(TESTDATA_BASE + "VerifyXMLSignature/Req002.xml");
+ parse(TESTDATA_BASE + "VerifyXMLSignature/TestGeneratorVX.002.Req.xml");
+ //parse(TESTDATA_BASE + "VerifyXMLSignature/TestGeneratorVX.006.Req.xml");
+ parse(TESTDATA_BASE + "VerifyXMLSignature/VerifySAMLRequest.xml");
+ }
+
+ public void testParseInfobox() throws Exception {
+ parse(TESTDATA_BASE + "Infobox/InfoboxReadResponseMOA4.xml");
+ parse(TESTDATA_BASE + "Infobox/InfoboxReadResponse.xml");
+ }
+
+
+ private Document parsePlain(String fileName) throws Exception {
+ return DOMUtils.parseDocument(
+ new FileInputStream(fileName),
+ false,
+ null,
+ null);
+ }
+
+ public void testValidateCreateXMLSignature() throws Exception {
+ Document doc;
+ boolean valid;
+
+ // test a valid request
+ doc = parsePlain(TESTDATA_BASE + "CreateXMLSignature/Req000.xml");
+ valid =
+ DOMUtils.validateElement(
+ doc.getDocumentElement(),
+ Constants.ALL_SCHEMA_LOCATIONS,
+ null);
+ assertTrue(valid);
+
+ // test an invalid request
+ doc = parsePlain(TESTDATA_BASE + "CreateXMLSignature/invalid.xml");
+ try {
+ valid =
+ DOMUtils.validateElement(
+ doc.getDocumentElement(),
+ Constants.ALL_SCHEMA_LOCATIONS,
+ null);
+ fail();
+ } catch (Exception e) {
+ }
+ }
+
+ public void testGetNamespaceDeclarations() throws Exception {
+ Document doc;
+ NodeList nl;
+ Element elem;
+ Map nsDecls;
+
+ doc = parse(TESTDATA_BASE + "VerifyXMLSignature/Req002.xml");
+ nl = doc.getElementsByTagNameNS(Constants.DSIG_NS_URI, "Reference");
+ elem = (Element) nl.item(0);
+ nsDecls = DOMUtils.getNamespaceDeclarations(elem);
+
+ assertEquals(2, nsDecls.size());
+ assertEquals(Constants.DSIG_NS_URI, nsDecls.get("dsig"));
+ assertEquals(Constants.MOA_NS_URI, nsDecls.get(""));
+ }
+
+}
diff --git a/common/src/test/java/test/at/gv/egovernment/moa/util/DateTimeUtilsTest.java b/common/src/test/java/test/at/gv/egovernment/moa/util/DateTimeUtilsTest.java
new file mode 100644
index 000000000..0b0f3fcf8
--- /dev/null
+++ b/common/src/test/java/test/at/gv/egovernment/moa/util/DateTimeUtilsTest.java
@@ -0,0 +1,119 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.util;
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.TimeZone;
+
+import junit.framework.TestCase;
+
+import at.gv.egovernment.moa.util.DateTimeUtils;
+
+/**
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class DateTimeUtilsTest extends TestCase {
+
+ /**
+ * Constructor for DateTimeUtilsTest.
+ * @param arg0
+ */
+ public DateTimeUtilsTest(String arg0) {
+ super(arg0);
+ }
+
+ public void testParseDateTimeValid() throws Exception {
+ Date date;
+ DateFormat format = SimpleDateFormat.getDateTimeInstance();
+ String dateStr;
+
+ format.setTimeZone(TimeZone.getTimeZone("GMT"));
+ date = DateTimeUtils.parseDateTime("+1971-12-12T06:30:15");
+ date.setTime(date.getTime() + TimeZone.getDefault().getRawOffset());
+ dateStr = format.format(date);
+ assertEquals("12.12.1971 06:30:15", dateStr);
+
+ date = DateTimeUtils.parseDateTime("2000-01-01T23:59:59.012Z");
+ dateStr = format.format(date);
+ assertEquals("01.01.2000 23:59:59", dateStr);
+
+ date = DateTimeUtils.parseDateTime("2003-05-20T12:17:30-05:00");
+ dateStr = format.format(date);
+ assertEquals("20.05.2003 17:17:30", dateStr);
+
+
+ date = DateTimeUtils.parseDateTime("2002-02-02T02:02:02.33+04:30");
+ dateStr = format.format(date);
+ assertEquals("01.02.2002 21:32:02", dateStr);
+ }
+
+ public void testParseDateTimeInvalid() {
+ try {
+ DateTimeUtils.parseDateTime("+1971-12-12T6:30:15");
+ fail();
+ } catch (ParseException e) {
+ }
+
+ try {
+ DateTimeUtils.parseDateTime("2000-01-0123:59:59.999999Z");
+ fail();
+ } catch (ParseException e) {
+ }
+
+ try {
+ DateTimeUtils.parseDateTime("2003-05-20T12:17:3005:00");
+ fail();
+ } catch (ParseException e) {
+ }
+
+ try {
+ DateTimeUtils.parseDateTime(" 2002-02-02T02:02:02.33+04:00");
+ fail();
+ } catch (ParseException e) {
+ }
+
+ }
+
+ public void testBuildDateTimeGMTMinus3() {
+ String should = "2002-01-01T01:01:01-03:00";
+ doTestBuildDateTime(2002, 1, 1, 1, 1, 1, "GMT-03:00", should);
+ }
+ public void testBuildDateTimeMEZSommerzeit() {
+ String should = "2002-07-31T23:59:59+02:00";
+ doTestBuildDateTime(2002, 7, 31, 23, 59, 59, "GMT+01:00", should);
+ }
+ public void testBuildDateTimeGMT() {
+ String should = "2002-01-01T01:01:01";
+ doTestBuildDateTime(2002, 1, 1, 1, 1, 1, "GMT+00:00", should);
+ }
+ private void doTestBuildDateTime(
+ int year, int month, int day,
+ int hour, int min, int sec,
+ String timeZone, String dateTimeShould) {
+
+ Calendar cal = new GregorianCalendar(TimeZone.getTimeZone(timeZone));
+ cal.set(year,month, day, hour, min, sec);
+ cal.set(Calendar.MILLISECOND, 0);
+ String dateTimeBuilt = DateTimeUtils.buildDateTime(cal);
+ assertEquals(dateTimeShould, dateTimeBuilt);
+ }
+
+}
diff --git a/common/src/test/java/test/at/gv/egovernment/moa/util/KeyStoreUtilsTest.java b/common/src/test/java/test/at/gv/egovernment/moa/util/KeyStoreUtilsTest.java
new file mode 100644
index 000000000..8a4b17368
--- /dev/null
+++ b/common/src/test/java/test/at/gv/egovernment/moa/util/KeyStoreUtilsTest.java
@@ -0,0 +1,105 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.util;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.math.BigInteger;
+import java.security.KeyStore;
+import java.security.Security;
+import java.security.cert.X509Certificate;
+import java.util.Enumeration;
+
+import at.gv.egovernment.moa.util.KeyStoreUtils;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class KeyStoreUtilsTest extends TestCase {
+ private String tmpDir = "tmp/KeyStoreUtilsTest";
+ private String tmpDirURL = "file:" + tmpDir;
+
+ public KeyStoreUtilsTest(String arg0) {
+ super(arg0);
+ }
+
+ protected void setUp() throws Exception {
+ Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
+ new File(tmpDir).mkdirs();
+ }
+ protected void tearDown() throws Exception {
+ new File(tmpDir).delete();
+ }
+ public void testCreateKeyStoreJKS() throws Exception {
+ String[] certFilenames = new String[] {
+ "data/test/security/server-certs/baltimore.cer"
+ };
+ KeyStore ks = KeyStoreUtils.createKeyStore("jks", certFilenames);
+ assertEquals(1, ks.size());
+ X509Certificate cert = (X509Certificate)ks.getCertificate("0");
+ assertEquals(3424, cert.getSerialNumber().intValue());
+ }
+ public void testCreateKeyStorePKCS12() throws Exception {
+ String[] certFilenames = new String[] {
+ "data/test/security/server-certs/baltimore.cer"
+ };
+ KeyStore ks = KeyStoreUtils.createKeyStore("pkcs12", certFilenames);
+ assertEquals(1, ks.size());
+ X509Certificate cert = (X509Certificate)ks.getCertificate("0");
+ assertEquals(3424, cert.getSerialNumber().intValue());
+ }
+ public void testCreateKeyStoreFromCertificateDirectory() throws Exception {
+ // copy certificate files to a temporary directory,
+ // omitting the "CVS" directory in the source directory
+ copyCertificates("data/test/security/server-certs", tmpDir);
+ KeyStore ks = KeyStoreUtils.createKeyStoreFromCertificateDirectory("jks", tmpDirURL);
+ assertEquals(2, ks.size());
+ X509Certificate cert0 = (X509Certificate)ks.getCertificate("0");
+ X509Certificate cert1 = (X509Certificate)ks.getCertificate("1");
+ assertTrue(3424 == cert0.getSerialNumber().intValue() || 3424 == cert1.getSerialNumber().intValue());
+ }
+ private void copyCertificates(String from, String to) throws IOException {
+ String[] fromList = new File(from).list();
+ for (int i = 0; i < fromList.length; i++) {
+ File fromFile = new File(from + File.separator + fromList[i]);
+ if (fromFile.isFile()) {
+ String toFile = to + "/" + fromList[i];
+ FileInputStream in = new FileInputStream(fromFile);
+ FileOutputStream out = new FileOutputStream(toFile);
+ for (int ch = in.read(); ch >= 0; ch = in.read())
+ out.write(ch);
+ out.close();
+ in.close();
+ }
+ }
+
+ }
+ public void testLoadKeyStore() throws Exception {
+ String keyStoreURL = "file:data/test/security/client-certs/sicher-demo(buergerkarte).p12";
+ KeyStore ks = KeyStoreUtils.loadKeyStore("pkcs12", keyStoreURL, "buergerkarte");
+ assertEquals(1, ks.size());
+ Enumeration aliases = ks.aliases();
+ String alias = (String)aliases.nextElement();
+ X509Certificate cert = (X509Certificate)ks.getCertificate(alias);
+ assertEquals(new BigInteger("1044289238331").intValue(), cert.getSerialNumber().intValue());
+ }
+
+}
diff --git a/common/src/test/java/test/at/gv/egovernment/moa/util/SSLUtilsTest.java b/common/src/test/java/test/at/gv/egovernment/moa/util/SSLUtilsTest.java
new file mode 100644
index 000000000..e44d4ff7c
--- /dev/null
+++ b/common/src/test/java/test/at/gv/egovernment/moa/util/SSLUtilsTest.java
@@ -0,0 +1,175 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.util;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.net.URL;
+import java.security.KeyStore;
+import java.security.Security;
+
+import javax.net.ssl.SSLException;
+import javax.net.ssl.SSLSocketFactory;
+
+import com.sun.net.ssl.HostnameVerifier;
+import com.sun.net.ssl.HttpsURLConnection;
+
+import at.gv.egovernment.moa.util.KeyStoreUtils;
+import at.gv.egovernment.moa.util.SSLUtils;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class SSLUtilsTest extends TestCase {
+
+ public SSLUtilsTest(String arg0) {
+ super(arg0);
+ }
+
+
+ protected void setUp() throws Exception {
+ //System.setProperty("javax.net.debug", "all");
+ Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
+ System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
+ System.setProperty("https.cipherSuites", "SSL_DHE_DSS_WITH_DES_CBC_SHA,SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA,SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA,SSL_RSA_WITH_DES_CBC_SHA,SSL_RSA_WITH_3DES_EDE_CBC_SHA,SSL_RSA_EXPORT_WITH_RC4_40_MD5");
+ }
+
+ public void testGetSSLSocketFactoryBaltimoreOK() throws Exception {
+ doTestGetSSLSocketFactory(
+ "GET",
+ "https://www.baltimore.com/",
+ false,
+ "file:data/test/security/cacerts+gt_cybertrust_root",
+ "changeit",
+ true);
+ }
+ public void testGetSSLSocketFactoryBaltimoreNOK() throws Exception {
+ doTestGetSSLSocketFactory(
+ "GET",
+ "https://www.baltimore.com/",
+ false,
+ "file:data/test/security/cacerts",
+ "changeit",
+ false);
+ }
+ public void testGetSSLSocketFactoryVerisignOK() throws Exception {
+ doTestGetSSLSocketFactory(
+ "GET",
+ "https://www.verisign.com/",
+ false,
+ "file:data/test/security/cacerts",
+ "changeit",
+ true);
+ }
+ public void testGetSSLSocketFactoryVerisignNoTruststoreOK() throws Exception {
+ doTestGetSSLSocketFactory(
+ "GET",
+ "https://www.verisign.com/",
+ false,
+ null,
+ null,
+ true);
+ }
+ public void testGetSSLSocketFactoryLocalhostOK() throws Exception {
+ String urlString = "https://localhost:8443/moa-id-auth/index.jsp";
+ doTestGetSSLSocketFactory(
+ "GET",
+ urlString,
+ true,
+ "file:data/test/security/server.keystore.tomcat",
+ "changeit",
+ true);
+ }
+ public void testGetSSLSocketFactoryLocalhostNOK() throws Exception {
+ String urlString = "https://localhost:8443/moa-id-auth/index.jsp";
+ doTestGetSSLSocketFactory(
+ "GET",
+ urlString,
+ true,
+ null,
+ null,
+ false);
+ }
+
+ public void doTestGetSSLSocketFactory(
+ String requestMethod,
+ String urlString,
+ boolean useHostnameVerifierHack,
+ String truststoreurl,
+ String trustpassword,
+ boolean shouldOk
+ ) throws Exception {
+
+ doTestGetSSLSocketFactory(
+ requestMethod, urlString, useHostnameVerifierHack, truststoreurl, trustpassword, null, null, null, shouldOk);
+ }
+ public void doTestGetSSLSocketFactory(
+ String requestMethod,
+ String urlString,
+ boolean useHostnameVerifierHack,
+ String truststoreurl,
+ String trustpassword,
+ String keystoretype,
+ String keystoreurl,
+ String keypassword,
+ boolean shouldOk
+ ) throws Exception {
+
+ KeyStore truststore = null;
+ if (truststoreurl != null)
+ truststore = KeyStoreUtils.loadKeyStore("jks", truststoreurl, trustpassword);
+ SSLSocketFactory sf = SSLUtils.getSSLSocketFactory(
+ truststore, keystoretype, keystoreurl, keypassword);
+ System.out.println(requestMethod + " " + urlString);
+
+ URL url = new URL(urlString);
+ HttpsURLConnection conn = (HttpsURLConnection)url.openConnection();
+ conn.setRequestMethod(requestMethod);
+ conn.setDoInput(true);
+ conn.setDoOutput(true);
+ conn.setUseCaches(false);
+ conn.setAllowUserInteraction(false);
+ conn.setSSLSocketFactory(sf);
+ if (useHostnameVerifierHack)
+ conn.setHostnameVerifier(new HostnameVerifierHack());
+ try {
+ conn.connect();
+ assertTrue(shouldOk);
+ assertEquals(200, conn.getResponseCode());
+ conn.disconnect();
+ }
+ catch (SSLException ex) {
+ assertFalse(shouldOk);
+ }
+ }
+ private byte[] readTruststore(String filename) throws IOException {
+ if (filename == null)
+ return null;
+ FileInputStream in = new FileInputStream(filename);
+ byte[] buffer = new byte[in.available()];
+ in.read(buffer);
+ in.close();
+ return buffer;
+ }
+ private class HostnameVerifierHack implements HostnameVerifier {
+ public boolean verify(String arg0, String arg1) {
+ return true;
+ }
+ }
+}
diff --git a/common/src/test/java/test/at/gv/egovernment/moa/util/URLDecoderTest.java b/common/src/test/java/test/at/gv/egovernment/moa/util/URLDecoderTest.java
new file mode 100644
index 000000000..ee7444f11
--- /dev/null
+++ b/common/src/test/java/test/at/gv/egovernment/moa/util/URLDecoderTest.java
@@ -0,0 +1,44 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.util;
+
+import java.net.URLEncoder;
+
+import at.gv.egovernment.moa.util.FileUtils;
+import at.gv.egovernment.moa.util.URLDecoder;
+
+import junit.framework.TestCase;
+
+/*
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class URLDecoderTest extends TestCase {
+
+ public void test() throws Exception {
+ String s = "immerZUA0129<>%==$$%&/()@?{()=} \\\"äöüÄÖÜ?§";
+ String senc = URLEncoder.encode(s);
+ String sdec = URLDecoder.decode(senc, "ISO-8859-1");
+ assertEquals(s, sdec);
+ }
+ public void testUTF8() throws Exception {
+ String s = new String(FileUtils.readFile("data/test/xml/CreateXMLSignature/CreateXMLSignatureResponse.xml"));
+ String senc = URLEncoder.encode(s);
+ String sdec = URLDecoder.decode(senc, "UTF-8");
+ String sutf8 = FileUtils.readFile("data/test/xml/CreateXMLSignature/CreateXMLSignatureResponse.xml", "UTF-8");
+ assertEquals(sutf8, sdec);
+ }
+}
diff --git a/common/src/test/java/test/at/gv/egovernment/moa/util/URLEncoderTest.java b/common/src/test/java/test/at/gv/egovernment/moa/util/URLEncoderTest.java
new file mode 100644
index 000000000..f5fbf4537
--- /dev/null
+++ b/common/src/test/java/test/at/gv/egovernment/moa/util/URLEncoderTest.java
@@ -0,0 +1,58 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.util;
+
+import at.gv.egovernment.moa.util.FileUtils;
+import at.gv.egovernment.moa.util.URLDecoder;
+import at.gv.egovernment.moa.util.URLEncoder;
+import junit.framework.TestCase;
+
+/*
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class URLEncoderTest extends TestCase {
+
+ public void testUnchangedString() throws Exception {
+ String s = "AZaz0123456789.-*_";
+ String senc = URLEncoder.encode(s, "UTF-8");
+ assertEquals(s, senc);
+ }
+ public void testAumlUTF8() throws Exception {
+ String s = "ä";
+ String senc = URLEncoder.encode(s, "UTF-8");
+ assertEquals("%C3%A4", senc);
+ }
+ public void testEncodeDecode() throws Exception {
+ String s = "AZaz09.-*_ <>%=$%&/()@?{}[]\\\"'äöüÄÖÜߧ";
+ String senc = URLEncoder.encode(s, "UTF-8");
+ String sdec = URLDecoder.decode(senc, "UTF-8");
+ assertEquals(s, sdec);
+ }
+ public void testCertInfo() throws Exception {
+ String s = new String(FileUtils.readFile("data/test/xml/VerifyXMLSignature/CertInfoVerifyXMLSignatureRequest.xml", "UTF-8"));
+ String senc = URLEncoder.encode(s, "UTF-8");
+ String sdec = URLDecoder.decode(senc, "UTF-8");
+ assertEquals(s, sdec);
+ }
+ /*public void testJDK14() throws Exception {
+ String s = new String(FileUtils.readFile("data/test/xml/VerifyXMLSignature/CertInfoVerifyXMLSignatureRequest.xml", "UTF-8"));
+ String senc = URLEncoder.encode(s, "UTF-8");
+ String senc14 = java.net.URLEncoder.encode(s, "UTF-8");
+ assertEquals(senc, senc14);
+ }*/
+
+}
diff --git a/common/src/test/java/test/at/gv/egovernment/moa/util/XMLGrammarBuilderTest.java b/common/src/test/java/test/at/gv/egovernment/moa/util/XMLGrammarBuilderTest.java
new file mode 100644
index 000000000..598948543
--- /dev/null
+++ b/common/src/test/java/test/at/gv/egovernment/moa/util/XMLGrammarBuilderTest.java
@@ -0,0 +1,114 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.util;
+import java.io.FileInputStream;
+import java.io.InputStream;
+
+import org.apache.xerces.parsers.DOMParser;
+import org.apache.xerces.parsers.XMLGrammarPreparser;
+import org.apache.xerces.util.SymbolTable;
+import org.apache.xerces.util.XMLGrammarPoolImpl;
+import org.apache.xerces.xni.grammars.Grammar;
+import org.apache.xerces.xni.grammars.XMLGrammarDescription;
+import org.apache.xerces.xni.parser.XMLInputSource;
+import org.xml.sax.InputSource;
+
+import test.at.gv.egovernment.moa.MOATestCase;
+
+import at.gv.egovernment.moa.util.Constants;
+
+
+/**
+ * Experimentation with Xerces grammar caching.
+ *
+ * Used the Xerces sample 'XMLGrammarBuilder' as a starting point.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XMLGrammarBuilderTest extends MOATestCase {
+
+ private static final String GRAMMAR_POOL =
+ org.apache.xerces.impl.Constants.XERCES_PROPERTY_PREFIX
+ + org.apache.xerces.impl.Constants.XMLGRAMMAR_POOL_PROPERTY;
+
+ protected static final String NAMESPACES_FEATURE_ID =
+ "http://xml.org/sax/features/namespaces";
+ protected static final String VALIDATION_FEATURE_ID =
+ "http://xml.org/sax/features/validation";
+ protected static final String SCHEMA_VALIDATION_FEATURE_ID =
+ "http://apache.org/xml/features/validation/schema";
+ protected static final String SCHEMA_FULL_CHECKING_FEATURE_ID =
+ "http://apache.org/xml/features/validation/schema-full-checking";
+
+ private static final int BIG_PRIME = 2039;
+ private SymbolTable symbolTable;
+ private XMLGrammarPoolImpl grammarPool;
+
+ /**
+ * Constructor for XMLGrammarBuilderTest.
+ * @param name
+ */
+ public XMLGrammarBuilderTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ XMLGrammarPreparser preparser;
+
+ // set up symbol table and grammar pool
+ symbolTable = new SymbolTable(BIG_PRIME);
+ grammarPool = new XMLGrammarPoolImpl();
+ preparser = new XMLGrammarPreparser(symbolTable);
+ preparser.registerPreparser(XMLGrammarDescription.XML_SCHEMA, null);
+ preparser.setProperty(GRAMMAR_POOL, grammarPool);
+ preparser.setFeature(NAMESPACES_FEATURE_ID, true);
+ preparser.setFeature(VALIDATION_FEATURE_ID, true);
+ // now we can still do schema features just in case,
+ // so long as it's our configuraiton......
+ preparser.setFeature(SCHEMA_VALIDATION_FEATURE_ID, true);
+ preparseSchemaResource(
+ preparser,
+ Constants.DSIG_SCHEMA_LOCATION,
+ "/resources/schemas/xmldsig-core-schema.xsd");
+ }
+
+ private static Grammar preparseSchemaResource(
+ XMLGrammarPreparser preparser,
+ String systemId,
+ String resource)
+ throws Exception {
+
+ InputStream is = XMLGrammarBuilderTest.class.getResourceAsStream(resource);
+ return preparser.preparseGrammar(
+ XMLGrammarDescription.XML_SCHEMA,
+ new XMLInputSource(null, systemId, null, is, null));
+ }
+
+ public void testParseValidating() throws Exception {
+ DOMParser parser = new DOMParser(symbolTable, grammarPool);
+
+ parser.setFeature(NAMESPACES_FEATURE_ID, true);
+ parser.setFeature(VALIDATION_FEATURE_ID, true);
+ parser.setFeature(SCHEMA_VALIDATION_FEATURE_ID, true);
+
+ parser.parse(
+ new InputSource(
+ new FileInputStream(TESTDATA_ROOT + "xml/dsigTransform/base64.xml")));
+ parser.getDocument();
+ }
+
+}
diff --git a/common/src/test/java/test/at/gv/egovernment/moa/util/XPathUtilsTest.java b/common/src/test/java/test/at/gv/egovernment/moa/util/XPathUtilsTest.java
new file mode 100644
index 000000000..dcd107f1a
--- /dev/null
+++ b/common/src/test/java/test/at/gv/egovernment/moa/util/XPathUtilsTest.java
@@ -0,0 +1,66 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.util;
+import org.w3c.dom.Document;
+import org.w3c.dom.NodeList;
+
+import test.at.gv.egovernment.moa.MOATestCase;
+
+import at.gv.egovernment.moa.util.XPathUtils;
+
+
+/**
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XPathUtilsTest extends MOATestCase {
+
+ private Document doc1;
+
+ /**
+ * Constructor for XPathUtilsTest.
+ * @param name
+ */
+ public XPathUtilsTest(String name) {
+ super(name);
+ }
+
+ /**
+ * @see TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUp();
+ doc1 =
+ parseXml(TESTDATA_ROOT + "xml/VerifyXMLSignature/Req000.xml");
+ }
+
+ public void testSelectNodeList() throws Exception {
+ NodeList nodes;
+
+ nodes =
+ XPathUtils.selectNodeList(
+ doc1.getDocumentElement(),
+ doc1.getDocumentElement(),
+ "/VerifyXMLSignatureRequest");
+ assertEquals(1, nodes.getLength());
+ nodes =
+ XPathUtils.selectNodeList(
+ doc1.getDocumentElement(),
+ "//dsig:Signature");
+ assertEquals(1, nodes.getLength());
+ }
+
+}
diff --git a/component-pkcs11libs.xml b/component-pkcs11libs.xml
new file mode 100644
index 000000000..8edd4793f
--- /dev/null
+++ b/component-pkcs11libs.xml
@@ -0,0 +1,39 @@
+<component>
+ <dependencySets>
+ <dependencySet>
+ <includes>
+ <include>iaik.prod:iaik_Pkcs11Wrapper:dll:win32</include>
+ </includes>
+ <outputDirectory>/pkcs11/win32</outputDirectory>
+ <outputFileNameMapping>pkcs11wrapper.${extension}</outputFileNameMapping>
+ </dependencySet>
+ <dependencySet>
+ <includes>
+ <include>iaik.prod:iaik_Pkcs11Wrapper:so:linux</include>
+ </includes>
+ <outputDirectory>/pkcs11/linux</outputDirectory>
+ <outputFileNameMapping>libpkcs11wrapper.${extension}</outputFileNameMapping>
+ </dependencySet>
+ <dependencySet>
+ <includes>
+ <include>iaik.prod:iaik_Pkcs11Wrapper:so:solaris_sparc</include>
+ </includes>
+ <outputDirectory>/pkcs11/solaris_sparc</outputDirectory>
+ <outputFileNameMapping>libpkcs11wrapper.${extension}</outputFileNameMapping>
+ </dependencySet>
+ <dependencySet>
+ <includes>
+ <include>iaik.prod:iaik_Pkcs11Wrapper:so:solaris_sparcv9</include>
+ </includes>
+ <outputDirectory>/pkcs11/solaris_sparcv9</outputDirectory>
+ <outputFileNameMapping>libpkcs11wrapper.${extension}</outputFileNameMapping>
+ </dependencySet>
+ <dependencySet>
+ <includes>
+ <include>iaik.prod:iaik_Pkcs11Wrapper:dll:win64</include>
+ </includes>
+ <outputDirectory>/pkcs11/win64</outputDirectory>
+ <outputFileNameMapping>pkcs11wrapper.${extension}</outputFileNameMapping>
+ </dependencySet>
+ </dependencySets>
+</component> \ No newline at end of file
diff --git a/id/.classpath b/id/.classpath
new file mode 100644
index 000000000..f93d181b5
--- /dev/null
+++ b/id/.classpath
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/id/.project b/id/.project
new file mode 100644
index 000000000..c38db9298
--- /dev/null
+++ b/id/.project
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>id</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
diff --git a/id/.settings/org.eclipse.jdt.core.prefs b/id/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..77407eaa0
--- /dev/null
+++ b/id/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,5 @@
+#Tue Jul 07 16:07:14 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.source=1.4
diff --git a/id/.settings/org.maven.ide.eclipse.prefs b/id/.settings/org.maven.ide.eclipse.prefs
new file mode 100644
index 000000000..7622cdfff
--- /dev/null
+++ b/id/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,9 @@
+#Tue Jul 07 16:06:55 CEST 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
diff --git a/id/assembly-auth.xml b/id/assembly-auth.xml
new file mode 100644
index 000000000..e971d701a
--- /dev/null
+++ b/id/assembly-auth.xml
@@ -0,0 +1,121 @@
+<assembly>
+ <id>id-auth-${project.version}</id>
+
+ <formats>
+ <format>dir</format>
+ <format>zip</format>
+ <format>tar.gz</format>
+ </formats>
+
+ <baseDirectory>moa-id-auth-${project.version}</baseDirectory>
+
+ <fileSets>
+ <fileSet>
+ <directory>${basedir}/id/server/data/deploy</directory>
+ <outputDirectory>/</outputDirectory>
+ <excludes>
+ <!-- <exclude>**/conf/moa-id/oa/**</exclude>-->
+ <exclude>**/conf/Catalina/**</exclude>
+ </excludes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/spss/handbook/conf/moa-spss/certstore</directory>
+ <outputDirectory>/conf/moa-id/certs/certstore</outputDirectory>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/spss/handbook/conf/moa-spss/certstore</directory>
+ <outputDirectory>/conf/moa-spss/certstore</outputDirectory>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/id/server/doc</directory>
+ <outputDirectory>/doc</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/id</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>history.txt</include>
+ <include>readme_${project.version}.txt</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>LICENSE-2.0.txt</include>
+ <include>NOTICE.txt</include>
+ <include>IAIK-LICENSE.txt</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+
+ <moduleSets>
+ <moduleSet>
+ <includes>
+ <include>MOA.id.server:moa-id-auth</include>
+ </includes>
+ <binaries>
+ <includeDependencies>false</includeDependencies>
+ <outputDirectory>/</outputDirectory>
+ <outputFileNameMapping>${artifactId}.${extension}</outputFileNameMapping>
+ <dependencySets>
+ <dependencySet>
+ <includes>
+ <include>xalan-bin-dist:xalan</include>
+ <include>xerces:xercesImpl</include>
+ <include>xalan-bin-dist:xml-apis</include>
+ <include>xalan-bin-dist:serializer</include>
+ </includes>
+ <outputDirectory>/endorsed</outputDirectory>
+ <outputFileNameMapping>${artifactId}.${extension}</outputFileNameMapping>
+ </dependencySet>
+ <dependencySet>
+ <includes>
+ <include>iaik.prod:iaik_ecc</include>
+ <include>iaik.prod:iaik_jce_full</include>
+ <include>iaik.prod:iaik_Pkcs11Provider</include>
+ <include>iaik.prod:iaik_Pkcs11Wrapper:jar</include>
+ </includes>
+ <outputDirectory>/ext</outputDirectory>
+ <outputFileNameMapping>${artifactId}.${extension}</outputFileNameMapping>
+ </dependencySet>
+ </dependencySets>
+ <unpack>false</unpack>
+ </binaries>
+ </moduleSet>
+ <moduleSet>
+ <includes>
+ <include>MOA.id.server:moa-id-lib</include>
+ </includes>
+ <binaries>
+ <attachmentClassifier>javadoc</attachmentClassifier>
+ <includeDependencies>false</includeDependencies>
+ <outputFileNameMapping>api-doc</outputFileNameMapping>
+ <outputDirectory>/doc</outputDirectory>
+ <unpack>true</unpack>
+ </binaries>
+ </moduleSet>
+ <moduleSet>
+ <includes>
+ <include>MOA.id:moa-id-templates</include>
+ </includes>
+ <binaries>
+ <includeDependencies>false</includeDependencies>
+ <outputFileNameMapping>moaid-templates.war</outputFileNameMapping>
+ <outputDirectory>/templates</outputDirectory>
+ <unpack>false</unpack>
+ </binaries>
+ </moduleSet>
+ </moduleSets>
+
+ <componentDescriptors>
+ <componentDescriptor>component-pkcs11libs.xml</componentDescriptor>
+ </componentDescriptors>
+
+</assembly>
diff --git a/id/assembly-proxy.xml b/id/assembly-proxy.xml
new file mode 100644
index 000000000..0f7af5491
--- /dev/null
+++ b/id/assembly-proxy.xml
@@ -0,0 +1,118 @@
+<assembly>
+ <id>id-proxy-${project.version}</id>
+
+ <formats>
+ <format>dir</format>
+ <format>zip</format>
+ <format>tar.gz</format>
+ </formats>
+
+ <baseDirectory>moa-id-proxy-${project.version}</baseDirectory>
+
+ <fileSets>
+ <fileSet>
+ <directory>${basedir}/id/server/data/deploy</directory>
+ <outputDirectory>/</outputDirectory>
+ <excludes>
+ <exclude>**/conf/moa-spss/**</exclude>
+ <exclude>**/conf/moa-id/transforms/**</exclude>
+ </excludes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/id/server/doc</directory>
+ <outputDirectory>/doc</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/id</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>history.txt</include>
+ <include>readme_${project.version}.txt</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>LICENSE-2.0.txt</include>
+ <include>NOTICE.txt</include>
+ <include>IAIK-LICENSE.txt</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+
+ <moduleSets>
+ <moduleSet>
+ <includes>
+ <include>MOA.id.server:moa-id-proxy</include>
+ </includes>
+ <binaries>
+ <includeDependencies>true</includeDependencies>
+ <outputDirectory>/</outputDirectory>
+ <outputFileNameMapping>${artifactId}.${extension}</outputFileNameMapping>
+ <dependencySets>
+ <dependencySet>
+ <includes>
+ <include>xalan-bin-dist:xalan</include>
+ <include>xerces:xercesImpl</include>
+ <include>xalan-bin-dist:xml-apis</include>
+ <include>xalan-bin-dist:serializer</include>
+ </includes>
+ <outputDirectory>/endorsed</outputDirectory>
+ <outputFileNameMapping>${artifactId}.${extension}</outputFileNameMapping>
+ </dependencySet>
+ <dependencySet>
+ <includes>
+ <include>iaik.prod:iaik_ecc</include>
+ <include>iaik.prod:iaik_jce_full</include>
+ <include>iaik.prod:iaik_Pkcs11Provider</include>
+ <include>iaik.prod:iaik_Pkcs11Wrapper:jar</include>
+ </includes>
+ <outputDirectory>/ext</outputDirectory>
+ <outputFileNameMapping>${artifactId}.${extension}</outputFileNameMapping>
+ </dependencySet>
+ </dependencySets>
+ <unpack>false</unpack>
+ </binaries>
+ </moduleSet>
+ <moduleSet>
+ <includes>
+ <include>MOA:moa-id-oa</include>
+ </includes>
+ <binaries>
+ <includeDependencies>true</includeDependencies>
+ <outputDirectory>/</outputDirectory>
+ <outputFileNameMapping>oa.${extension}</outputFileNameMapping>
+ <unpack>false</unpack>
+ </binaries>
+ </moduleSet>
+ <moduleSet>
+ <includes>
+ <include>MOA.id.server:moa-id-lib</include>
+ </includes>
+ <binaries>
+ <attachmentClassifier>javadoc</attachmentClassifier>
+ <includeDependencies>false</includeDependencies>
+ <outputFileNameMapping>api-doc</outputFileNameMapping>
+ <outputDirectory>/doc</outputDirectory>
+ <unpack>true</unpack>
+ </binaries>
+ </moduleSet>
+ <moduleSet>
+ <includes>
+ <include>MOA.id:moa-id-templates</include>
+ </includes>
+ <binaries>
+ <includeDependencies>false</includeDependencies>
+ <outputFileNameMapping>moaid-templates.war</outputFileNameMapping>
+ <outputDirectory>/templates</outputDirectory>
+ <unpack>false</unpack>
+ </binaries>
+ </moduleSet>
+ </moduleSets>
+
+ <componentDescriptors>
+ <componentDescriptor>component-pkcs11libs.xml</componentDescriptor>
+ </componentDescriptors>
+
+</assembly>
diff --git a/id/history.txt b/id/history.txt
new file mode 100644
index 000000000..4aa774480
--- /dev/null
+++ b/id/history.txt
@@ -0,0 +1,586 @@
+Dieses Dokument zeigt die Veränderungen und Erweiterungen
+von MOA-ID auf.
+
+History MOA-ID:
+
+=====
+
+Version MOA-ID 1.5.0: Änderungen seit Version MOA-ID 1.4.8:
+
+- Fixed Bug #552 (http://egovlabs.gv.at/tracker/index.php?func=detail&aid=552&group_id=6&atid=105)
+- Fixed Bug #551 (http://egovlabs.gv.at/tracker/index.php?func=detail&aid=551&group_id=6&atid=105)
+- Fixed Bug #550 (http://egovlabs.gv.at/tracker/index.php?func=detail&aid=550&group_id=6&atid=105)
+- IAIK Libraries aktualisiert:
+ iaik-moa: Version 1.29
+ iaik_jce_full: Version 4.0_MOA
+ iaik_cms: Version 4.1_MOA
+- Update Parameterüberprüfung
+- Einbindung von Online-Vollmachten
+- Update MOA-Template zur Bürgerkartenauswahl
+- Update Transformationen (für Online-Vollmachten)
+- Änderung der Konfiguration für:
+ - Angabe einer Liste von vertrauenswürdigen BKUs (aufgrund Parameterprüfung)
+ - Online-Vollmachten
+
+=====
+
+Version MOA-ID 1.4.8: Änderungen seit Version MOA-ID 1.4.7:
+
+- Fixed Bug #546 (https://egovlabs.gv.at/tracker/index.php?func=detail&aid=546&group_id=6&atid=105)
+- IAIK Libraries aktualisiert:
+ iaik-moa: Version 1.28
+
+=====
+
+Version MOA-ID 1.4.7: Änderungen seit Version MOA-ID 1.4.6:
+
+- Anbindung an Stammzahlenregister-Gateway um ausländische Bürger zu integrieren (ERnP-Eintragung
+ gemäß E-Government Gesetz §6(5))
+- Neuer Anmeldetext mit neuen Transformationen
+- Striktere Parameterüberprüfung
+- Fixed Bug #485 (https://egovlabs.gv.at/tracker/index.php?func=detail&aid=485&group_id=6&atid=105)
+- Fixed Bug #540 (https://egovlabs.gv.at/tracker/index.php?func=detail&aid=540&group_id=6&atid=105)
+- IAIK Libraries aktualisiert:
+ iaik-moa: Version 1.27
+
+=====
+Version MOA-ID 1.4.6: Änderungen seit Version MOA-ID 1.4.5:
+
+Fixes:
+- Fixed Bug #468 (https://egovlabs.gv.at/tracker/index.php?func=detail&aid=468&group_id=6&atid=105)
+
+=====
+Version MOA-ID 1.4.5: Änderungen seit Version MOA-ID 1.4.4:
+
+Fixes:
+- Fixed Bug #335 (https://egovlabs.gv.at/tracker/index.php?func=detail&aid=335&group_id=6&atid=105)
+
+- IAIK Libraries aktualisiert:
+ iaik-moa: Version 1.26
+ iaik-ecc: Version 2.19
+ iaik-jce: Version 3.18_MOA
+ iaikPkcs11Provider: Version 1.2.6
+ iaikPkcs11Wrapper: Version 1.2.17
+
+- Neue Errorpages
+- Keine Ausgabe der Stammzahl im Log-Level Debug (war zuvor für Testkarten möglich)
+
+=====
+Version MOA-ID 1.4.4: Änderungen seit Version MOA-ID 1.4.3:
+
+Verbesserungen/Erweiterungen:
+- Bei der beruflichen Parteienvertretung wurde das Stammzahlenregister in den
+ Beispielkonfigurationen vorkonfiguriert.
+
+- MOA-ID erlaubt ab sofort Load-Balancing. Dies wird durch die Konfigurations-
+ möglichkeit der Source-ID für das SAML-Artifact gewährleistet. Das Border-
+ Gateway kann dann anhand dieser Kennung an den zuständigen Server zur Abholung
+ der SAML-Assertion weiterleiten. Über den Konfigurationsparameter
+ <GenericConfiguration name="AuthenticationServer.SourceID" value="Cluster-A"/>
+ kann die authURL bei der Kodierung des SAML-Artifakts durch eine fix
+ definierte URI (z.B. "Cluster-A") ersetzt werden.
+
+Fixes:
+- In der Kommunikation mit dem Stammzahlenregistergateway die beim Einsatz der
+ beruflichen Parteienvertretung notwendig ist, verlangt das Service ein
+ adaptiertes Anfrageformat. MOA-ID wurde im Zuge dessen auf dieses Anfrage-
+ format umgestellt (Version SZR-GW-0.0.2.xsd).
+
+- Fixed Bug #333 (http://egovlabs.gv.at/tracker/index.php?func=detail&aid=333&group_id=6&atid=105)
+
+- Fixed Bug #332 (http://egovlabs.gv.at/tracker/index.php?func=detail&aid=332&group_id=6&atid=105)
+
+- IAIK Libraries aktualisiert:
+ iaik-moa: Version 1.24
+ iaik-ixsil: Version 1.2.2.4
+
+=====
+Version MOA-ID 1.4.3-1 (Bugfix Release): Änderungen seit Version MOA-ID 1.4.3:
+
+Verbesserungen/Erweiterungen:
+- keine
+
+Fixes:
+- Falsche Schemabenennung in Constants.java des common-Projekts wurde korrigiert.
+
+=====
+Version MOA-ID 1.4.3: Änderungen seit Version MOA-ID 1.4.2:
+
+Verbesserungen/Erweiterungen:
+- Anzeigetransformationen arbeiten nun auch mit BDC hotSign 2.0 zusammen.
+
+Fixes:
+- Nicht abgeholte Authentisierungsdaten werden jetzt in periodischen Zeitab-
+ ständen von einem Session Cleaner vom Speicher genommen. Damit wird
+ verhindert, dass der Heap durch unabgeholte Authentisierungsdaten bzw.
+ abgebrochene Anmeldesessions überläuft.
+
+- Der auskommentierte Konfigurationsschalter <CompatibilityMode> in den
+ Beispielkonfigurationen war innerhalb des Konfigurationsteiles für die
+ berufliche Parteienvertreung angeführt, dieser befindet sich jetzt unter
+ ApplicationSpecificParameters (zuvor ParepSpecificParameters).
+ Konfigurationen, die diesen Schalter im Bereich ParepSpecificParameters
+ gesetzt hatten, können deshalb nicht mehr geladen werden. Bitte verschieben
+ Sie in diesen Fällen das Element <CompatibilityMode> nach
+ ApplicationSpecificParameters.
+
+- Um einen Einsatz einer losgelösten, eigenständigen MOA-SP/SS Installation
+ zu ermöglichen, wird wieder Axis 1.1 eingesetzt. Damit wird ein Verschieben
+ von Namespaces verhindert.
+
+- IAIK Libraries aktualisiert:
+ Versionsnummern:
+ iaik-cms: Version 4.01_MOA
+ aik-moa: Version 1.23
+ iaik-ecc: Version 2.16
+
+=====
+Version MOA-ID 1.4.2: Änderungen seit Version MOA-ID 1.4.2 beta2:
+
+- Das Tag <BKU> in Templates wird jetzt gemäß dem aufrufenden Protokollschema
+ gesetzt. Damit ist im Falle von SSL/TLS Verbindungen, durchgängige
+ Konnektivität mit dem gleichen Protokoll gewährleistet
+
+- IAIK Libraries aktualisiert:
+ Versionsnummern:
+ iaik-jce: Version 3.16_MOA
+ iaik-cms: Version 4.0_MOA
+
+=====
+Version MOA-ID 1.4.2 beta2: Änderungen seit Version MOA-ID 1.4.2 beta1:
+
+Verbesserungen/Erweiterungen:
+- Vollmachtsprüfung in MOA-ID integriert
+
+- MOA-ID kann Vollmachten in einem Kompatibilitätsmodus dazu benutzen
+ Vetreterdaten durch die des Vertretenen zu ersetzen. Somit können in diesem
+ Modus Applikationen Vollmachten benutzen ohne modifiziert werden zu müssen
+
+- Integration berufliche Parteienvertretung gemäß §5 Abs.3 E-GovG. Vertretung
+ durch berufliche Parteienvertreter kann durch Einsatz eines Infobox
+ Validators (Validatorklasse ParepValidator) durchgeführt werden.
+
+- Neue A-Trust Testzertifikate für Tespersonenbindungen in die Testprofile
+ aufgenommen.
+
+- Infobox Validatoren können über das Servlet InputProcessor Daten nachfordern
+ und Formulare für den Datenfluss zur Verfügung stellen. Die Klasse die die
+ Realisierung des Form Input Prozessors enthält, wird in der Passage für die
+ Infobox-Validatoren der MOA-ID Konfiguration angegeben.
+
+Fixes:
+- Bei Widerrufsprüfung mittels OCSP wurde der Signaturzeitpunkt bisher nicht
+ berücksichtigt, was bei einer Signaturprüfung einer Signatur mit abgelaufenem
+ Zertifikat fälschlicherweise zu dem Zertifikatsstatus "widerrufen" führte.
+ Der Signaturzeitpunkt wird bei OCSP-Widerrufsprüfung nun korrekt verwendet.
+
+=====
+Version MOA-ID 1.4.2 beta1: Änderungen seit Version MOA-ID 1.4.1:
+
+Verbesserungen/Erweiterungen:
+- Das Lesen von Streams wurde beschleunigt
+
+=====
+Version MOA-ID 1.4.1: Änderungen seit Version MOA-ID 1.4.0:
+
+- Es wurden neue Testzertifikate ausgestellt, da die bisherigen abgelaufen sind
+ (siehe id/server/doc/MOA-Testzertifikate.pdf).
+
+- Zum Testen von MOA-ID für Personen ohne Bürgerkarte, wurde die
+ Bürgerkartenumgebung SeLaN (XSeLaN) angepasst und mit neuen Zertifikaten
+ versehen. Sie ist unter https://demo.a-sit.at/buergerkarte/security_kapsel/
+ resources/XSeLaN-1.0.6-withjre.zip mit einer kompletten Java Runtime Umgebung
+ bzw. unter https://demo.a-sit.at/buergerkarte/security_kapsel/resources/
+ XSeLaN-1.0.6-nojre.zip ohne Runtime Umgebung beziehbar.
+
+- Die Projektstruktur wurde eimem Maven Build-Prozess unterlegt. Der Sourcocde
+ ab dieser Version unter http://egovlabs.gv.at/scm/?group_id=6 verfügbar.
+
+=====
+Version MOA-ID 1.4.0: Änderungen seit Version MOA-ID 1.3.3:
+
+Verbesserungen/Erweiterungen:
+- Über konfigurierte Validatoren können mittels des Formularparameters
+ PushInfobox zusätzlich übergebene Infoboxen geprüft werden (siehe
+ MOA_ID_1.4_20070802.pdf).
+
+- Transformationen werden nun strenger überprüft: Im Rahmen der Verifikation des
+ signierten Auth-Blocks (Anmeldedaten) werden die Transformationen nun strenger
+ überprüft. Es muss ein geeignetes Profil zur Verifikation existieren, das die
+ zur Anzeige verwendeten Transformationen enthält. Als Beispiel seien die mit
+ MOA-ID ausgelieferten vorkonfigurierten Transformationen angeführt: die bei
+ der Signaturerstellung verwendeten Transformationen befinden sich im
+ Verzeichnis conf\moa-id\transforms\, die entsprechenden Prüfprofile im
+ Verzeichnis conf\moa-spss\profiles\. Zu jeder bei der Signaturerzeugung
+ verwendeten Transformationskette muss es ein entsprechendes
+ Verifikationsprofil geben. Beispielsweise gehört das Prüfprofil
+ conf\moa-spss\profiles\MOAIDTransformAuthBlock.xml zu der in der Datei
+ conf\moa-id\transforms\TransformsInfoAuthBlock.xml definierten
+ Transformationskette. Im Rahmen der Signaturverifikation überprüft MOA, ob die
+ in der Signatur verwendeten Transformationen mit mindestens einem Prüfprofil
+ übereinstimmen. Das heißt, dass die verwendete Transformationskette in
+ Reihenfolge und Inhalt exakt mit den im entsprechenden Prüfprofil definierten
+ Transformationen übereinstimmen muss. Nimmt man zum Vergleich in den beiden
+ oben angeführten Beispieldateien jeweils die Kinder des <dsig:Transforms>-
+ Elementes, also die Transformationen, so kann festgehalten werden, dass diese
+ identisch sind. Sollten nun eigene (von den Default-Transformationen
+ abweichende) Transformationen verwenden, so muss beachtet werden, dass auch
+ das entsprechende Prüfprofil angepasst werden muss (so dies nicht ohnehin
+ schon getan wurde). Wie bereits erwähnt, wird ab Release 1.4.0 die Prüfung der
+ Transformationsketten verschärft. Was zuvor in einem Log-Eintrag mündete, wenn
+ ein passendes Prüfprofil nicht gefunden werden konnte, resultiert jetzt in
+ einem Abbruch des Anmeldevorgangs mit folgender Fehlermeldung:
+ "Transformationskette in der Signatur stimmt mit keiner Transformationskette
+ aus dem Prüfprofil überein." Es sollten daher nach Installation von
+ MOA-ID 1.4.0 Probeanmeldungen durchgeführt und die Profile ggf. solange
+ angepasst werden, bis ein Anmeldevorgang erfolgreich verlaufen ist.
+
+- IAIK Libraries aktualisiert:
+ Versionsnummern:
+ iaik-jce: Version 3.142_MOA
+ iaik-cms: Version 3.2
+ iaikPkcs11Provider: Version 1.2.4
+ iaikPkcs11Wrapper: Version 1.2.16
+ ixsil: Version IXSIL-1.2.2.3
+ ecc: Version v2.15
+ iaik-moa: Version 1.20
+
+- Neue Mindestanforderung an Java: Version 1.4.0 (1.3.* wird nicht mehr
+ unterstützt)
+
+- Axis Libraries aktualisiert (auf Version 1.4)
+
+- Für Betriebssysteme, die Case-sensitive Verzeichnisnamen auswerten: Das
+ Verzeichnis conf\moa-spss\trustprofiles wurde aus Gründen der Konsistenz zu
+ MOA-SPSS zu conf\moa-spss\trustProfiles umbenannt.
+
+=====
+Version MOA-ID 1.3.3: Änderungen seit Version MOA-ID 1.3.2:
+
+Verbesserungen/Erweiterungen:
+- Unterstützung der Parameterübertragung mittels multipart/form-data in den
+ Servlets VerifyIdentityLinkServlet (Entgegenname der Personenbindung von der
+ BKU) und VerifyAuthBlockServlet (Entgegenname des signierten AuthBlocks von
+ der BKU). Diese Form der Parameterübertragung wurde von Security Layer
+ Version 1.2 verpflichtend eingeführt. Damit funktioniert MOA-ID nun auch mit
+ Security Layer Requests der Version 1.2, eine Voraussetzung für die
+ Verwendung von MOA ID im Bereich der Privatwirtschaft (wbPK als eindeutiges
+ Personenkennzeichen).
+
+- Die Templates für den sogenannten AuthBlock, also jenes Dokument, das im Zuge
+ der Anmeldung vom Bürger/Kunden elektronisch signiert wird, wurden erweitert,
+ dass sowohl aktuelle BKU (strenge Prüfung im Viewer, Anzeigeformat SLXHTML)
+ als auch ältere BKU (z.B. hot:Sign Version 1.3 mit einem propriätären
+ HTML-Dialekt als Anzeigeformat) unterstützt werden.
+
+Fixes:
+- Parsen der Personenbindung aus dem an das VerifyIdentityLinkServlet gesendeten
+ InfoboxReadResponse funktioniert nun auch, wenn der InfoboxReadResponse ein
+ anderes als die in den MOA-Konstanten vordefiniertes NS-Präfix verwendet.
+
+=====
+Version MOA-ID 1.3.2: Änderungen seit Version MOA-ID 1.3.1:
+
+Verbesserungen/Erweiterungen:
+- In der URL an die Servlets SelectBKU bzw. StartAuthentication kann der URL-
+ Parameter Target nun alternativ zur bisher möglichen Form des Bereichskürzels
+ laut E-Gov BerAbgrVO (z.B. BW für Bauen und Wohnen) auch in der Variante
+ inklusive Präfix (z.B. urn:publicid:gv.at:cdid+BW für Bauen und Wohnen)
+ angegeben werden.
+
+=====
+Version MOA-ID 1.3.1: Änderungen seit Version MOA-ID 1.3.1D01:
+
+Verbesserungen/Erweiterungen:
+- Templates zur Gestaltung der Seiten "Auswahl der Bürgerkartenumgebung"
+ und "Anmeldung mit Bürgerkarte" können nun auch über die
+ MOA-ID-Konfigurationsdatei geladen werden.
+
+- IAIK-MOA: CRL wird nun auch akzeptiert, wenn im CLRSigner-Zertifikat KeyUsage
+ crlSign-Bit nicht gesetzt ist, allerdings nur wenn das Zertifikat
+ ein Trust-Anchor ist.
+
+- IAIK-MOA: Eine indirekte CRL wird nun auch akzeptiert, wenn die
+ "IssuingDistributionPoint"-Extension fehlt.
+
+Fixes:
+- Logging: commons-logging-1.0.4-Libraries (unterstützt auch Tomcat 5*)
+- bPK Berechnung (bPK wurde bisher falsch berechnet)
+- ist eine Online-Applikation so konfiguriert, dass die Stammzahl
+ nicht an die nachfolgende Applikation weitergegeben werden darf
+ (Parameter "provideStammzahl" hat den Wert "false"), so wird die
+ Stammzahl zwar aus den Anmeldedaten ausgeblendet, nicht aber aus
+ der Personenbindung (wenn Parameter "provideIdentityLink" auf
+ den Wert "true" gesetzt ist. Ab Version 1.3.1 wird die Stammzahl
+ auch aus der Personenbindung entfernt, wenn die Option
+ "provideStammzahl" aud "false" gesetzt ist.
+- Die Transformationen selektieren bei der Jahreszahl des Geburtsdatums
+ nur die letzen beiden Stellen für die Anzeige im Trusted Viewer.
+ Ab Verison 1.3.1 wird die volle Jahreszahl (alle vier Stellen) angezeigt.
+- Überprüfung, ob Geburtsdatum und Name aus dem signierten Login-Request
+ mit den entsprechenden Daten aus der Personenbindung übereinstimmen.
+
+- neue IAIK-JCE-Library: version 3.14
+
+=====
+Version MOA-ID 1.3.1D01: Änderungen seit Version MOA-ID 1.3.0:
+
+Verbesserungen/Erweiterungen:
+- Produktversion wird zur Wiedererkennbarkeit in Manifest.mf der .war Dateien eingetragen
+
+- IAIK-MOA: CRL wird nun auch akzeptiert, wenn im CLRSigner-Zertifikat KeyUsage crlSign-Bit nicht gesetzt ist,
+ allerdings nur wenn das Zertifikat ein Trust-Anchor ist.
+
+- IAIK-MOA: Eine indirekte CRL wird nun auch akzeptiert, wenn die "IssuingDistributionPoint"-Extension fehlt
+
+Fixes:
+- Logging: commons-logging-1.0.4-Libraries (unterstützt auch Tomcat 5*)
+
+=====
+Version MOA-ID 1.3.0: Änderungen seit Version MOA-ID 1.3.0d01:
+
+Verbesserungen/Erweiterungen:
+- Update der Proxykompnente auf MOA-ID Modus (wbPK)
+
+- Transformationen können nun auch je Onlineapplikation gesetzt werden
+
+- Update PKI auf OCSP (für E-CARD)
+
+- Update der Zertifikatsspeicher und Trustprofile
+
+- IAIK Libraries wieder nur Vollversion
+ Versionsnummern:
+ iaik-jce: Version 3.13_3.13_NONEwithRSA (MOA-ID kann nun auch mit JDK1.5 verwendet werden)
+ iaik-cms: Version 3.2
+ iaikPkcs11Provider: Version 1.1.9
+ iaikPkcs11Wrapper: Version 1.2.14
+ ixsil: Version IXSIL-1_2_2
+ ecc: Version 2.0
+
+=====
+Version MOA-ID 1.3.0d01: Änderungen seit Version MOA-ID 1.2d10:
+
+- Update der Authentisierungskomponente auf MOA-WID Modus (wbPK).
+- Fixes
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=
+
+=====
+Version MOA-ID 1.2.0d10: Änderungen seit Version MOA-ID 1.2d09:
+
+- Aufspalten der IAIK-Libraries in zwei Verzeichnisse, die jeweils
+ die entsprechenden Voll- bzw. die Evaluierungsversionen enthalten.
+ Versionsnummern:
+ iaik-jce: Version 3.13
+ iaik-cms: Version 3.2
+ iaikPkcs11Provider: Version 1.1.9
+ iaikPkcs11Wrapper: Version 1.2.14
+ ixsil: Version IXSIL-1_2_1_improvedC14N
+ ecc: Version 2.0
+
+- Anpassen der build.xml-Datei an diese Struktur.
+
+=====
+Version MOA-ID 1.2.0d10: Änderungen seit Version MOA-ID 1.2d09:
+
+- Aufspalten der IAIK-Libraries in zwei Verzeichnisse, die jeweils
+ die entsprechenden Voll- bzw. die Evaluierungsversionen enthalten.
+ Versionsnummern:
+ iaik-jce: Version 3.13
+ iaik-cms: Version 3.2
+ iaikPkcs11Provider: Version 1.1.9
+ iaikPkcs11Wrapper: Version 1.2.14
+ ixsil: Version IXSIL-1_2_1_improvedC14N
+ ecc: Version 2.0
+
+- Anpassen der build.xml-Datei an diese Struktur.
+
+=====
+Version MOA-ID 1.2.0d12: Änderungen seit Version MOA-ID 1.2d09:
+
+Verbesserungen/Erweiterungen:
+- Proxy ermöglicht nun auch Anmeldungen an WebDAV (RFC 2518) Anwendungen
+
+- Der MOA-ID-PROXY ermöglicht nun bei Basic Authentication auch eine
+ etwas gelockertere Vorgangsweise bei der Anmeldung an einen Online-
+ Applikation: So ist es jetzt zusätzlich zur fixen Vorgabe von Benutzernamen
+ und Passwort möglich das Passwort im Browser eingeben zu lassen oder
+ sogar eine freie Zuordnung zum Benutzer zu erlauben (Vorteil: es
+ entfällt die sonst notwendige Wartung der Identities, bzw. das
+ Mitziehen von durch die Benutzer hervogerufenen Passwortänderungen).
+ Die Vorgangsweise ist konfigurierbar.
+
+Fixes:
+- Es gab Umstände, bei denen der MOA-ID-PROXY Cookies verwarf.
+ Dieses Problem ist nun behoben
+
+- Ergänzung des ausgelieferten certstores um wichtige Zertifikate.
+
+=====
+Version MOA-ID 1.2.0d09: Änderungen seit Version MOA-ID 1.2d08:
+
+- Austausch der Bibliothek iaik-moa-full.jar
+ (ECDSA Signature Encoding)
+
+- Ergänzung des ausgelieferten certstores um wichtige Zertifikate.
+
+=====
+Version MOA-ID 1.2.0d08: Änderungen seit Version MOA-ID 1.2d07:
+
+- Anpassung des nun in der Personenbindung korrekt verwendeten
+ECDSA Namespaces von http://www.w3.org/2004/01/xmldsig-more#
+(zwischenzeitlich verwendeter NS) auf
+http://www.w3.org/2001/04/xmldsig-more# (gemäß Draft)
+
+- Update auf die API Version 1.2.0D04 von MOA-SPSS
+=====
+
+Version MOA-ID 1.2.0d07: Änderungen seit Version MOA-ID 1.2d06:
+
+- Erweiterung um ECC Funktionalität, so dass ECC Karten
+ (wie z.B. MAESTRO Karten) mit funktionieren
+
+- Upgrade des Parsers und der XSLT Transform Engine: Die Version
+ baut nun auf Xerces in der Version xerces-j-2.4.0 und Xalan
+ in der Version xalan-j-2.5.1 auf.
+
+=====
+Version MOA-ID 1.2.0d06: Änderungen seit Version MOA-ID 1.2d05:
+
+- Automatische Erkennung des Encodings der BKU Auswahldaten.
+ Eine Unabhängigkeit von locale und default encoding Einstellungen
+ des JDK wurde damit bei der Darstellung der Daten der Auswahlseite
+ erreicht.
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=175
+
+=====
+Version MOA-ID 1.2.0d05: Änderungen seit Version MOA-ID 1.2d04:
+
+Verbesserungen/Erweiterungen:
+
+- Vorlagen für Templates zur Anpassung des Erscheinungsbilds von
+ MOA-ID wurden hinzugefügt.
+
+- Kompabilität mit aktueller HotSign Version 1.2SR4rev3 wurde erreicht.
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=140
+
+- Upgrade auf neue Loging Bibliothek log4j 1.2.8
+
+- Update der Dokumentation
+
+- Tests mit aktueller Tomcat-Version jakarta-tomcat-4.1.30.zip (Windows)
+ sowie jakarta-tomcat-4.1.30-LE-jdk14.zip (Linux) wurden durchgeführt.
+
+=====
+Version MOA-ID 1.2.0d04: Änderungen seit Version MOA-ID 1.2d03:
+
+Verbesserungen/Erweiterungen:
+
+- Neue stimmige und übersichtlichere Konfigurationen wurden
+ erstellt. Trustprofile und certstore für neue Testbürgerkarten
+ a.sign test government und SeLaNext wurden hinzugefügt.
+
+
+Fixes:
+- StackOverflowError bei a.sign test government Karten behoben
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=131
+
+
+Version MOA-ID 1.2.0d3: Änderungen seit Version MOA-ID 1.1.1:
+
+Verbesserungen/Erweiterungen:
+- Umstellung von vPK auf bPK; von ZMR auf Stammzahl.
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=70
+- Anpassbare JSP Errorpage und Messagepage für Proxy und Auth
+ Damit die Formatierungen der Benutzermeldungen an die Kundenwünsche
+ und das CI der Kunden angepasst werden können, wird JSP
+ Technologie verwendet.
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=100
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=102
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=103
+
+- Ausgabe der gen. Ursache falls eine Signaturprüfung fehlschlägt.
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=101
+
+- Umschaltung CertifiedKeypair / SecureSignatureKeypair
+ Durch die Angabe des Attributs ‚keyBoxIdentifier’ im Element
+ OnlineApplication eine Auswahl des Schlüsselpaars erfolgen.
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=105
+- Anpassbare JSP Errorpage für MOA-ID Proxy und MOA-ID Auth
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=70
+
+- Erweiterung des AuthBlocks (SAMLAssertion) um Geburtsdatum
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=114
+
+- Ergänzung der mitgelieferten Konfiguration
+ (certstore, trustprofiles auch für Testbürgerkarten)
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=120 
+Fixes:
+- Daten die aus MOA-ID-PROXY an eine OA mittels der
+ Authentisierungsvariante ParamAuth weitergegeben werden,
+ müssen URL-Encoded übermittelt werden.
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=104
+
+- Meldung: Fehlerhafter Wert für "DirectoryCertStoreParamet...
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=110
+
+=====
+
+Version MOA-ID 1.1.1: Änderungen seit Version MOA-ID 1.1:
+
+- Fehlermeldungen werden nun im Internet-Explorer unabhängig von dessen
+ Einstellungen bzgl. Fehlermeldungshandling ("Kurze HTTP Fehlermeldungen
+ anzeigen") korrekt dargestellt.
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=26
+
+- Angabe eine speziellen DATA-URL Präfix ist nun möglich (sinnvoll wenn
+ ein Webserver vorgeschaltet werden soll)
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=63
+
+- Verbesserung der Dokumentation in vielen Details
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=24
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=25
+
+- Ergänzung/Korrektur des WSDL-Files von MOA-ID
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=38
+
+- Die ausgelieferte Default Konfiguration wurde verbessert.
+ ~ Padangaben werden nun relativ zum Konfigurationsfile MOA-ID
+ ausgewertet.
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=49
+ ~ Default Certstore wurde um eine Reihe von Zertifikaten ergänzt.
+ ~ Zwei verschiedene Signaturprüfprofile (für Personenbindung und
+ Authentisierungsdaten) werden nun verwendet.
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=40
+
+- Die aktuelle Version der MOA-SP Bibliotheken (moa-spss-1.2d01) wurden
+ integriert.
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=62
+
+- Es ist nun per Konfiguration möglich HTTPS Verbindungen auf die
+ Frontend-Servlets zu erlauben.
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=48
+
+- Falsche Fehlermeldung beim Aufruf von VerifyIdentityLink wurde behoben.
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=50
+
+- Über die Angeabe des Attributs 'loginParameterResolverConfiguration' kann
+ dem LoginParameterResolver der PROXY Komponente eine
+ Initialisierungsparameter mitgegeben werden.
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=71
+
+- FAQ wurde ergänzt
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=69
+
+
+- Diverse Detailverbesserungen:
+ https://forge.cio.gv.at/bugzilla/query.cgi
+
+
+
+
+
+
+
diff --git a/id/oa/.classpath b/id/oa/.classpath
new file mode 100644
index 000000000..ed2412886
--- /dev/null
+++ b/id/oa/.classpath
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/id/oa/.project b/id/oa/.project
new file mode 100644
index 000000000..4624cabc7
--- /dev/null
+++ b/id/oa/.project
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>moa-id-oa</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ </natures>
+</projectDescription>
diff --git a/id/oa/.settings/.jsdtscope b/id/oa/.settings/.jsdtscope
new file mode 100644
index 000000000..f40dd98e2
--- /dev/null
+++ b/id/oa/.settings/.jsdtscope
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
diff --git a/id/oa/.settings/org.eclipse.jdt.core.prefs b/id/oa/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..fe7479929
--- /dev/null
+++ b/id/oa/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Tue Jul 07 16:07:19 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.source=1.3
diff --git a/id/oa/.settings/org.eclipse.wst.common.component b/id/oa/.settings/org.eclipse.wst.common.component
new file mode 100644
index 000000000..10e0ef1df
--- /dev/null
+++ b/id/oa/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="moa-id-oa">
+ <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
+ <property name="context-root" value="moa-id-oa"/>
+ <property name="java-output-path"/>
+ </wb-module>
+</project-modules>
diff --git a/id/oa/.settings/org.eclipse.wst.common.project.facet.core.xml b/id/oa/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 000000000..f30a1de6e
--- /dev/null
+++ b/id/oa/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <installed facet="jst.java" version="1.4"/>
+ <installed facet="jst.web" version="2.3"/>
+</faceted-project>
diff --git a/id/oa/.settings/org.eclipse.wst.jsdt.ui.superType.container b/id/oa/.settings/org.eclipse.wst.jsdt.ui.superType.container
new file mode 100644
index 000000000..3bd5d0a48
--- /dev/null
+++ b/id/oa/.settings/org.eclipse.wst.jsdt.ui.superType.container
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file
diff --git a/id/oa/.settings/org.eclipse.wst.jsdt.ui.superType.name b/id/oa/.settings/org.eclipse.wst.jsdt.ui.superType.name
new file mode 100644
index 000000000..05bd71b6e
--- /dev/null
+++ b/id/oa/.settings/org.eclipse.wst.jsdt.ui.superType.name
@@ -0,0 +1 @@
+Window \ No newline at end of file
diff --git a/id/oa/.settings/org.maven.ide.eclipse.prefs b/id/oa/.settings/org.maven.ide.eclipse.prefs
new file mode 100644
index 000000000..b6ca61b99
--- /dev/null
+++ b/id/oa/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,9 @@
+#Tue Jul 07 16:06:56 CEST 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
diff --git a/id/oa/pom.xml b/id/oa/pom.xml
new file mode 100644
index 000000000..c7fe67540
--- /dev/null
+++ b/id/oa/pom.xml
@@ -0,0 +1,18 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>MOA</groupId>
+ <artifactId>moa-id-oa</artifactId>
+ <packaging>war</packaging>
+ <version>1.0</version>
+ <name>MOA Sample OA</name>
+
+ <properties>
+ <repositoryPath>${basedir}/../../repository</repositoryPath>
+ </properties>
+
+ <build>
+ <finalName>oa</finalName>
+ </build>
+</project>
diff --git a/id/oa/src/main/webapp/META-INF/MANIFEST.MF b/id/oa/src/main/webapp/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..5e9495128
--- /dev/null
+++ b/id/oa/src/main/webapp/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
diff --git a/id/oa/src/main/webapp/WEB-INF/web.xml b/id/oa/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 000000000..13158fdaa
--- /dev/null
+++ b/id/oa/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>
+
+<web-app>
+ <display-name>Sample OA</display-name>
+ <description>MOA Sample OA</description>
+</web-app>
+
diff --git a/id/oa/src/main/webapp/auth.jsp b/id/oa/src/main/webapp/auth.jsp
new file mode 100644
index 000000000..0b563a83e
--- /dev/null
+++ b/id/oa/src/main/webapp/auth.jsp
@@ -0,0 +1,48 @@
+<html>
+<head>
+<title>MOA ID Auth Sample Login</title>
+</head>
+<body>
+<% /** assumes moa-id-auth and oa in the same servlet container,
+ and moa-id-proxy on a different fixed location */
+ String authUrlPath =
+ request.getScheme() + "://"
+ + request.getServerName() + ":" + request.getServerPort()
+ + "/moa-id-auth/";
+ String proxyUrlPath = "http://10.16.126.28:9080/moa-id-proxy/";
+ String oaUrlPath =
+ request.getScheme() + "://"
+ + request.getServerName() + ":" + request.getServerPort()
+ + "/oa/";
+ String params =
+ "Target=gb&" +
+ "OA=" + proxyUrlPath + "index.jsp";
+ String urlStartAuth =
+ authUrlPath +
+ "StartAuthentication?" +
+ params;
+ String templateParam =
+ "&Template=" + oaUrlPath + "AuthTemplate.jsp";
+ String urlStartAuthCustom =
+ urlStartAuth +
+ templateParam;
+ String urlSelectBKU =
+ authUrlPath +
+ "SelectBKU?" +
+ params;
+ String urlSelectBKUCustom =
+ urlSelectBKU +
+ templateParam +
+ "&BKUSelectionTemplate=" + oaUrlPath + "BKUSelectionTemplate.jsp";
+%>
+<a href="<%=urlStartAuth%>">Log in to sample application</a>
+<br>
+<a href="<%=urlStartAuthCustom%>">Log in to sample application using custom form</a>
+<br>
+<a href="<%=urlSelectBKU%>">Choose BKU (HTMLComplete or HTMLSelect) and log in</a>
+<br>
+<a href="<%=urlSelectBKUCustom%>">Choose BKU (HTMLSelect) using custom form and log in</a>
+<br>
+<a href="<%=authUrlPath+"StartAuthentication"%>">Wrong parameters example</a>
+</body>
+</html> \ No newline at end of file
diff --git a/id/oa/src/main/webapp/chooseBKU.jsp b/id/oa/src/main/webapp/chooseBKU.jsp
new file mode 100644
index 000000000..0135b6fdf
--- /dev/null
+++ b/id/oa/src/main/webapp/chooseBKU.jsp
@@ -0,0 +1,19 @@
+<html>
+<head>
+<title>BKU Auswahl</title>
+</head>
+<body>
+<h1>BKU Auswahl</h1>
+<p>
+<form method="post" action="<%=request.getParameter("returnURI")%>">
+<select name="bkuURI">
+ <option value="http://localhost:3495/http-security-layer-request" selected>Lokale B&uuml;rgerkarte</option>
+ <option value="https://provider1.at:3496/http-security-layer-request">Provider eins</option>
+ <option value="https://provider2.at:3496/http-security-layer-request">Provider zwei</option>
+ <option value="https://10.16.126.28:3496/http-security-layer-request">B&uuml;rgerkarte Arbeitsplatz Paul Ivancsics</option>
+</select>
+<input type="submit" value="Ausw&auml;hlen"/>
+</form>
+</p>
+</body>
+</html> \ No newline at end of file
diff --git a/id/oa/src/main/webapp/form.jsp b/id/oa/src/main/webapp/form.jsp
new file mode 100644
index 000000000..d439fa84d
--- /dev/null
+++ b/id/oa/src/main/webapp/form.jsp
@@ -0,0 +1,20 @@
+<%@ page import="java.util.*" %>
+<html>
+<head>
+<title>Sample Online Application</title>
+</head>
+<body>
+<h1>Sample Form</h1>
+<p>
+<form action="form.jsp">
+<% String param1 = request.getParameter("param1");
+ if (param1 == null) param1 = ""; %>
+Input some text:
+<input type="text" name="param1" size="10"/>
+<br>Previous text input: <%=param1%><br>
+<input type="submit" value="Send"/>
+</form>
+</p>
+<p><a href="index.jsp">Back</a></p>
+</body>
+</html> \ No newline at end of file
diff --git a/id/oa/src/main/webapp/getBKUSelectTag.jsp b/id/oa/src/main/webapp/getBKUSelectTag.jsp
new file mode 100644
index 000000000..028dbd348
--- /dev/null
+++ b/id/oa/src/main/webapp/getBKUSelectTag.jsp
@@ -0,0 +1,6 @@
+<select name="bkuURI">
+ <option value="http://localhost:3495/http-security-layer-request" selected>Lokale B&uuml;rgerkarte</option>
+ <option value="https://provider1.at:3496/http-security-layer-request">Provider eins</option>
+ <option value="https://provider2.at:3496/http-security-layer-request">Provider zwei</option>
+ <option value="https://10.16.126.28:3496/http-security-layer-request">B&uuml;rgerkarte Arbeitsplatz Paul Ivancsics</option>
+</select>
diff --git a/id/oa/src/main/webapp/index.jsp b/id/oa/src/main/webapp/index.jsp
new file mode 100644
index 000000000..35e49d743
--- /dev/null
+++ b/id/oa/src/main/webapp/index.jsp
@@ -0,0 +1,60 @@
+<%@ page import="java.util.*,javax.servlet.http.*,sun.misc.BASE64Decoder" %>
+<html>
+<head>
+<title>Sample Online Application</title>
+</head>
+<body>
+<h1>Sample Online Application</h1>
+
+<p>Request headers:
+<table border="1">
+ <%
+ /* collect parameters from request */
+ for (Enumeration headers = request.getHeaderNames(); headers.hasMoreElements(); ) {
+ String key = (String) headers.nextElement();
+ String value = request.getHeader(key); %>
+ <tr><td><%=key%></td><td><%=value%></td></tr>
+ <% } %>
+</table>
+</p>
+
+<% String query=request.getQueryString(); %>
+<p>QueryString: "<%=query%>"
+</p>
+
+<p>Request parameters:
+<table border="1">
+ <%
+ /* collect parameters from request */
+ for (Enumeration params = request.getParameterNames(); params.hasMoreElements(); ) {
+ String name = (String) params.nextElement();
+ String value = request.getParameter(name); %>
+ <tr><td><%=name%></td><td><%=value%></td></tr>
+ <% } %>
+</table>
+</p>
+
+<p>Cookies:
+<table border="1">
+ <%
+ /* collect attributes from request */
+ Cookie[] cookies = request.getCookies();
+ if (cookies != null) {
+ for (int i = 0; i < cookies.length; i++) {
+ Cookie cookie = cookies[i]; %>
+ <tr><td><%=cookie.getName()%></td><td><%=cookie.getValue()%></td></tr>
+ <% }
+ } %>
+</table>
+</p>
+
+<% String authHeader = request.getHeader("Authorization");
+ if (authHeader != null) {
+ authHeader = authHeader.substring(authHeader.indexOf(" ")+1);
+ String decAuthHeader = new String(new BASE64Decoder().decodeBuffer(authHeader));
+%>
+<p>Basic authentication credentials: <%=decAuthHeader%></p>
+<% } %>
+<p><a href="form.jsp">Form sample</a></p>
+</body>
+</html> \ No newline at end of file
diff --git a/id/oa/src/main/webapp/stateful_login.jsp b/id/oa/src/main/webapp/stateful_login.jsp
new file mode 100644
index 000000000..eaede507f
--- /dev/null
+++ b/id/oa/src/main/webapp/stateful_login.jsp
@@ -0,0 +1,29 @@
+<%@ page import="javax.servlet.http.*" %>
+<%
+ /* check request's remote IP address - must be moa-id-proxy's address */
+ String remoteIPAddress = request.getRemoteAddr();
+ if (! "127.0.0.1".equals(remoteIPAddress)) { /* Substitute "127.0.0.1" for moa-id-proxy's IP address */
+ response.setStatus(403);
+ return;
+ }
+
+ /* store authentication data in cookies */
+ String fn = request.getParameter("FamilyName");
+ String gn = request.getParameter("GivenName");
+ /* set cookie domain and cookie path ! */
+ String cookieDomain = ".test.test"; /* Set this to the common domain of moa-id-proxy and of the online application */
+ String cookiePath = request.getContextPath(); /* Set this to the context path of the online application */
+
+ Cookie cfn = new Cookie("familyname", fn);
+ cfn.setDomain(cookieDomain);
+ cfn.setPath(cookiePath);
+ response.addCookie(cfn);
+
+ Cookie cgn = new Cookie("givenname", gn);
+ cgn.setDomain(cookieDomain);
+ cgn.setPath(cookiePath);
+ response.addCookie(cgn);
+
+ /* redirect to online application's start page */
+ response.sendRedirect("http://oa.test.test:8080/oa/index.jsp"); /* Substitute for URL in online application */
+%>
diff --git a/id/pom.xml b/id/pom.xml
new file mode 100644
index 000000000..f36683b2b
--- /dev/null
+++ b/id/pom.xml
@@ -0,0 +1,26 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>MOA</groupId>
+ <artifactId>MOA</artifactId>
+ <version>1.5.0</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>MOA</groupId>
+ <artifactId>id</artifactId>
+ <packaging>pom</packaging>
+ <version>1.5.0</version>
+ <name>MOA ID</name>
+
+ <modules>
+ <module>oa</module>
+ <module>templates</module>
+ <module>server</module>
+ </modules>
+
+ <properties>
+ <repositoryPath>${basedir}/../repository</repositoryPath>
+ </properties>
+
+</project>
diff --git a/id/readme_1.3.1.txt b/id/readme_1.3.1.txt
new file mode 100644
index 000000000..2a789ece6
--- /dev/null
+++ b/id/readme_1.3.1.txt
@@ -0,0 +1,244 @@
+
+======================================================================
+ WICHTIGE INFORMATION
+======================================================================
+
+Wie Sie wahrscheinlich bereits den MOA-ID Webseiten
+(http://www.cio.gv.at/onlineservices/basicmodules/moa-id/,
+http://www.cio.gv.at/onlineservices/basicmodules/moa-id/download/)
+entnommen haben, wird in den bisherigen Versionen von MOA-ID das
+bereichsspezifische Personenkennzeichen (bPK) falsch berechnet.
+In der aktuellen Version (1.3.1) wird dieser Fehler behoben, sodass
+MOA-ID der nachfolgenden Applikation innerhalb der Anmeldedaten nunmehr
+das korrekte, spezifikationskonforme bPK übergibt. Bitte beachten Sie,
+dass Sie Ihre Applikation ggf. adaptieren müssen, indem Sie beispielsweise
+alle bisher vorliegenden (falsch berechneten) bPKs aus der Datenbank
+Ihrer Applikation entfernen, und bei künftigen Anmeldevorgängen sukzessive
+durch die neuen ersetzen.
+Anmerkung: Der Fehler betrifft nur das bPK - das wbPK (wirtschafts-
+bereichsspezifisches Personenkennzeichen) wird von der BKU korrekt
+berechnet.
+
+======================================================================
+ NEUE FEATURES
+======================================================================
+
+Templates zur Gestaltung der Seiten "Auswahl der
+Bürgerkartenumgebung" und "Anmeldung mit Bürgerkarte" können nun
+auch über die MOA-ID-Konfigurationsdatei geladen werden. Details
+dazu entnehmen Sie mit dem MOA-ID Installationshandbuch.
+
+======================================================================
+ ZERTIFIKATE
+======================================================================
+
+Dieser Release enthält neue A-TRUST und E-CARD-Zertifikate. Wie Sie
+Ihre bestehenden Speicher auf den aktuellen Stand bringen können, wird
+weiter unten beschrieben.
+
+======================================================================
+ Update einer bestehenden MOA-ID-Installation auf Version 1.3.1
+======================================================================
+
+Es gibt zwei Möglichkeiten (im Folgenden als "Update Variante A" und
+"Update Variante B" bezeichnet), das Update von MOA-ID auf Version
+1.3.1 durchzuführen. Update Variante A geht dabei den Weg über eine
+vorangestellte Neuinstallation, während Variante B direkt eine
+bestehende Installation aktualisiert.
+
+
+Folgende Begriffe werden im Folgenden verwendet:
+
+JAVA_HOME bezeichnet das Wurzelverzeichnis der JDK-Installation
+
+CATALINA_HOME bezeichnet das Wurzelverzeichnis der Tomcat-Installation
+
+MOA_ID_INST_AUTH bezeichnet das Verzeichnis, in das Sie die Datei
+moa-id-auth-1.3.1.zip entpackt haben.
+
+MOA_ID_INST_PROXY bezeichnet das Verzeichnis, in das Sie die Datei
+moa-id-proxy-1.3.1.zip entpackt haben.
+
+
+=================
+Update Variante A
+=================
+
+1.) Erstellen Sie eine Sicherungskopie des kompletten Tomcat-Verzeichnisses
+ Ihrer MOA-ID-Installation.
+
+2.) Erstellen Sie eine Sicherungskopie aller "iaik*.jar"-Dateien im Verzeichnis
+ JAVA_HOME\jre\lib\ext und löschen Sie diese Dateien danach.
+
+3.) Führen Sie eine Neuinstallation gemäß Handbuch durch.
+
+4.) Kopieren Sie etwaige Konfigurationsdateien, Transformationen oder
+ Trust-Profile, die Sie aus Ihrer alten Installation beibehalten möchten,
+ aus Ihrer Sicherungskopie in die entsprechenden Verzeichnisse der neuen
+ Installation.
+ Anmerkung: Falls Sie Ihre alten Trustprofile beibehalten wollen, gehen Sie wie
+ in Update Variante B, Punkt 12 b) vor, um Ihre alten Profile auf den
+ aktuellen Stand zu bringen.
+ Anmerkung (nur wenn Sie Ihre alten Transformationen weiterverwenden):
+ falls Sie diese Transformationen aus einer alten Original-MOA-Distribution
+ stammen, so sollten Sie die Stylesheet-Transformationen so anpassen, dass
+ beim Geburtsdatum alle vier Stellen (anstelle wie bisher nur die letzten zwei)
+ angezeigt werden. (Die Transformationen der aktuellen Distribution zeigen
+ alle vier Stellen an).
+ Anmerkung (bisherige Version älter als 1.3.0): falls Sie MOA im WID Modus
+ (wbPK, Applikationen aus der Privatwirtschaft) verwenden wollen, brauchen
+ Sie die Transformationen aus der Neuinstallation bzw. müssen Sie Ihre eigenen
+ Transformationen so updaten, dass das wbPK angezeigt wird.
+
+5.) Ersetzen Sie das Verzeichnis CATALINA_HOME\conf\moa-id\certs durch das
+ entsprechende Verzeichnis Ihrer Sicherungskopie.
+
+6.) Nur falls Sie bisher eine ältere Version als 1.3.0 verwendet haben und
+ Ihre alte MOA-SP Konfigurationsdatei weiterverwenden wollen:
+ Mit dem Wechsel auf Version 1.3.0 verwendet MOA SP ein neues Format für die
+ XML-Konfigurationsdatei. Sie müssen die Konfigurationsdatei für MOA-SP aus
+ Ihrer alten Installation (CATALINA_HOME\conf\moa-spss, z.B. Datei
+ "SampleMOASPSSConfiguration.xml") auf das neue Format konvertieren.
+ Laden Sie dazu Tool "MOA SP configMapper" herunter
+ (http://www.cio.gv.at/onlineservices/basicmodules/moa-id/download/), entpacken Sie
+ es und befolgen Sie die im readme-File enthaltenen Anweisungen.
+
+
+=================
+Update Variante B
+=================
+
+1.) Erstellen Sie eine Sicherungskopie des kompletten Tomcat-Verzeichnisses
+ Ihrer MOA-ID-Installation.
+
+2.) Entpacken Sie die Datei "moa-id-auth-1.3.0.zip" in das Verzeichnis MOA_ID_INST_AUTH.
+
+3.) Falls Sie MOA-ID-Proxy verwenden, entpacken Sie die Datei "moa-id-proxy-1.3.0.zip"
+ in das Verzeichnis MOA_ID_INST_PROXY.
+
+4.) Erstellen Sie eine Sicherungskopie aller "iaik*.jar"-Dateien im Verzeichnis
+ JAVA_HOME\jre\lib\ext und löschen Sie diese Dateien danach.
+
+5.) Falls Sie mit jdk1.3 oder niedriger arbeiten, kopieren Sie alle Dateien
+ aus dem Verzeichnis MOA_ID_INST_AUTH\ext13 in das Verzeichnis
+ JAVA_HOME\jre\lib\ext.
+ Falls Sie mit jdk1.4 oder höher arbeiten, kopieren Sie alle Dateien
+ aus dem Verzeichnis MOA_ID_INST_AUTH\ext14 in das Verzeichnis
+ JAVA_HOME\jre\lib\ext.
+
+6.) Kopieren Sie die Dateien aus dem Verzeichnis MOA_ID_INST_AUTH\endorsed
+ in das Verzeichnis CATALINA_HOME\common\endorsed. Überschreiben Sie dabei
+ etwaige gleichnamige Dateien.
+
+7.) Löschen Sie das Verzeichnis CATALINA_HOME\webapps\moa-id-auth.
+
+8.) Ersetzen Sie die Datei CATALINA_HOME\webapps\moa-id-auth.war durch die Datei
+ MOA_ID_INST_AUTH\moa-id-auth.war.
+
+9.) Falls Sie MOA-ID-Proxy verwenden, ersetzen Sie die Datei "moa-id-proxy.war"
+ Ihrer aktuellen Installation durch die Datei MOA_ID_INST_PROXY\moa-id-proxy.war.
+
+10.) Löschen Sie das Verzeichnis CATALINA_HOME\work.
+
+11.) Update der Transformationen. Es wird bei dieser Beschreibung davon
+ ausgegangen, dass Sie keine eigenen Transformationen definiert haben. Falls Sie
+ eigene Transformationen definiert haben, müssen Sie dafür Sorge tragen, dass Sie
+ die entsprechenden Dateien beibehalten. Falls Sie MOA im WID Modus (wbPK,
+ Applikationen aus der Privatwirtschaft) verwenden wollen, und Ihre bisherige
+ Installation älter als Version 1.3.0 ist, brauchen Sie die Transformationen aus der
+ Neuinstallation bzw. müssen Sie Ihre eigenen Transformationen so updaten, dass
+ das wbPK angezeigt wird. Falls Ihre eigenen Transformationen aus einer alten
+ MOA-Distribution stammen, so sollten Sie die Stylesheet-Transformationen so anpassen,
+ dass beim Geburtsdatum alle vier Stellen (statt wie bisher nur die letzten zwei)
+ angezeigt werden. (Die Transformationen der aktuellen Distribution zeigen
+ alle vier Stellen an).
+
+ Gehen Sie wie folgt vor, um die Transformationen auszutauschen:
+ a) Löschen Sie das Verzeichnis CATALINA_HOME\conf\moa-id\transforms.
+ b) Kopieren Sie das Verzeichnis MOA_ID_INST_AUTH\conf\moa-id\transforms
+ in das Verzeichnis CATALINA_HOME\conf\moa-id.
+ c) Löschen Sie das Verzeichnis CATALINA_HOME\conf\moa-spss\profiles.
+ d) Kopieren Sie das Verzeichnis MOA_ID_INST_AUTH\conf\moa-spss\profiles
+ in das Verzeichnis CATALINA_HOME\conf\moa-spss.
+
+12.) Update der Trust-Profile.
+ Wenn Sie Ihre alten Trust-Profile durch die neuen ersetzen wollen, dann gehen
+ Sie vor, wie in Punkt a). Wenn Sie Ihre eigenen Trust-Profile beibehalten wollen,
+ dann gehen Sie vor, wie in Punkt b).
+
+ a) Gehen Sie wie folgt vor, um die Trust-Profile auszutauschen:
+
+ 1) Löschen Sie das Verzeichnis CATALINA_HOME\conf\moa-spss\trustprofiles.
+ 2) Kopieren Sie das Verzeichnis MOA_ID_INST_AUTH\conf\moa-spss\trustprofiles
+ in das Verzeichnis CATALINA_HOME\conf\moa-spss.
+
+ b) Falls Sie Ihre alten Trust-Profile beibehalten wollen, gehen Sie wie folgt vor,
+ um die Profile auf den aktuellen Stand zu bringen:
+
+ 1) Falls vorhanden, löschen Sie die Datei "C=AT,O=Hauptverband oesterr. Sozialvers.,CN=CRL-Signer.der"
+ aus dem Verzeichnis
+ "CATALINA_HOME\conf\moa-spss\trustprofiles\MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten"
+
+ 2) Falls vorhanden, löschen Sie die Datei "C=AT,O=Hauptverband oesterr. Sozialvers.,CN=CRL-Signer.der"
+ aus dem Verzeichnis
+ "CATALINA_HOME\conf\moa-spss\trustprofiles\MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten"
+
+ 3) Falls Sie weitere "AuthentisierungsDaten"-Trustprofile definiert haben, löschen Sie die Datei
+ "C=AT,O=Hauptverband oesterr. Sozialvers.,CN=CRL-Signer.der" aus allen Profilen, in denen sie
+ enthalten ist.
+
+ 4) Falls vorhanden, löschen Sie die Datei "OCSP Responder 02-20051027-20101027.der"
+ aus dem Verzeichnis
+ "CATALINA_HOME\conf\moa-spss\trustprofiles\MOAIDBuergerkartePersonenbindungMitTestkarten"
+
+ 5) Falls vorhanden, löschen Sie die Datei "OCSP Responder 02-20051027-20101027.der"
+ aus dem Verzeichnis
+ "CATALINA_HOME\conf\moa-spss\trustprofiles\MOAIDBuergerkartePersonenbindungOhneTestkarten"
+
+ 6) Falls Sie weitere "Personenbindung"-Trustprofile definiert haben, löschen Sie die Datei
+ "OCSP Responder 02-20051027-20101027.der" aus allen Profilen, in denen sie
+ enthalten ist.
+
+ 7) Ergänzen Sie ihre Trustprofile durch alle Zertifikate aus den entsprechenden Profilen
+ im Verzeichnis MOA_ID_INST_AUTH\conf\moa-spss\trustprofiles, die nicht in Ihren
+ Profilen enthalten sind. Am einfachsten ist es, wenn Sie den Inhalt der einzelnen Profile
+ aus der Distribution (MOA_ID_INST_AUTH\conf\moa-spss\trustprofiles) in die entsprechenden
+ Profile Ihrer Installation (CATALINA_HOME\conf\moa-spss\trustprofiles) kopieren und
+ dabei die vorhandenen gleichnamigen Zertifikate überschreiben), also z.B:
+
+ Kopieren des Inhalts von
+ MOA_ID_INST_AUTH\conf\moa-spss\trustprofiles\MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten
+ nach
+ CATALINA_HOME\conf\moa-spss\trustprofiles\MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten
+ usw.
+
+
+13.) Update des Cert-Stores.
+ a) Kopieren Sie den Inhalt des Verzeichnisses MOA_ID_INST_AUTH\conf\moa-spss\certstore
+ in das Verzeichnis CATALINA_HOME\conf\moa-spss\certstore. Wenn Sie gefragt werden, ob Sie
+ vorhandene Dateien oder Unterverzeichnisse überschreiben sollen, dann bejahen sie das.
+
+ b) Falls vorhanden, löschen Sie die Datei "890A4C8282E95EBB398685D9501486EF213941B5" aus dem
+ Verzeichnis CATALINA_HOME\conf\moa-spss\certstore\10F17BDACD8DEAA1E8F23FBEAE7B3EC3D9773D1D.
+
+ c) Falls die Datei "E7340D1FB627D8917A9C0D23F21515C441BF1214" noch nicht im Verzeichnis
+ CATALINA_HOME\conf\moa-spss\certstore\10F17BDACD8DEAA1E8F23FBEAE7B3EC3D9773D1D
+ enthalten ist, dann kopieren Sie diese Datei aus dem Verzeichnis
+ MOA_ID_INST_AUTH\conf\moa-spss\certstore\10F17BDACD8DEAA1E8F23FBEAE7B3EC3D9773D1D
+ in das Verzeichnis
+ CATALINA_HOME\conf\moa-spss\certstore\10F17BDACD8DEAA1E8F23FBEAE7B3EC3D9773D1D.
+
+
+15.) Update der MOA-SP Konfigurationsdatei (nur falls Ihre bisherige Installation
+ älter als Version 1.3.0 ist).
+ Mit dem Wechsel auf Version 1.3.0 verwendet MOA SP ein neues Format für die
+ XML-Konfigurationsdatei. Sie müssen die Konfigurationsdatei für MOA-SP aus
+ Ihrer alten Installation (CATALINA_HOME\conf\moa-spss, z.B. Datei
+ "SampleMOASPSSConfiguration.xml") auf das neue Format konvertieren.
+ Laden Sie dazu Tool "MOA SP configMapper" herunter
+ (http://www.cio.gv.at/onlineservices/basicmodules/moa-id/download/), entpacken
+ Sie es und befolgen Sie die im readme-File enthaltenen Anweisungen.
+
+
+
+
diff --git a/id/readme_1.3.3.txt b/id/readme_1.3.3.txt
new file mode 100644
index 000000000..fdbf059d3
--- /dev/null
+++ b/id/readme_1.3.3.txt
@@ -0,0 +1,150 @@
+===============================================================================
+MOA ID Version 1.3.3 - Wichtige Informationen zur Installation
+===============================================================================
+
+-------------------------------------------------------------------------------
+A. Neuerungen/Änderungen
+-------------------------------------------------------------------------------
+
+MOA ID Version 1.3.3 bringt folgende Neuerungen:
+
+- Unterstützung der Parameterübertragung mittels multipart/form-data in den
+ Servlets VerifyIdentityLinkServlet (Entgegennahme der Personenbindung von der
+ BKU) und VerifyAuthBlockServlet (Entgegennahme des signierten AuthBlocks von
+ der BKU). Diese Form der Parameterübertragung wurde von Security Layer
+ Version 1.2 verpflichtend eingeführt. Damit funktioniert MOA-ID nun auch mit
+ Security Layer Requests der Version 1.2, was eine Voraussetzung für die
+ Verwendung von MOA ID im Bereich der Privatwirtschaft (wbPK als eindeutiges
+ Personenkennzeichen) ist.
+
+- Ab Version 2.6.x des trustDesk basic von IT Solution GmbH werden Inhalte im
+ Secure Viewer spezifikationsgemäß und damit strenger als bisher geprüft. Dies
+ machte es erforderlich Templates für den sogenannten AuthBlock, also jenes
+ Dokument, das im Zuge der Anmeldung vom Bürger/Kunden elektronisch signiert
+ wird anzupassen. Damit aus Kompatibilitätsgründen auch noch (zum Beispiel für
+ eine Übergangsfrist) Versionen < 2.6.x oder die Umsetzung von bdc (hot:Sign
+ Version 1.3) funktionieren, wurden die Musterkonfigurationen so erweitert,
+ dass sowohl aktuelle Bürgerkartenumgebungen als auch OPTIONAL ältere BKU
+ unterstützt werden.
+
+-------------------------------------------------------------------------------
+B. Gründe für ein Update
+-------------------------------------------------------------------------------
+
+Sie sollten Ihre bestehende, ältere Installation von MOA ID auf die Version
+1.3.3 aktualisieren, wenn einer der folgenden Punkte zutrifft:
+
+- Sie möchten Ihre Installation für Anwendungen im Bereich der Privatwirtschaft
+ verwenden (Verwendung des wirtschaftsbereichspezifischen Personenkennzeichens
+ wbpk) oder verwenden explizit multipart/form-data Parameterübertragung von
+ Security Layer Version 1.2.
+
+- Es sollen aktuelle Bürgerkartenumgebungen verwendet werden.
+
+- Sie möchten Ihre Installation mit Templates für den AuthBlock (also jenes
+ Dokument, das im Zuge der Anmeldung vom Bürger/Kunden elektronisch signiert
+ wird) betreiben, die sowohl von aktuellen als auch von älteren Bürgerkarten-
+ umgebungen (BKU) unterstützt werden.
+
+-------------------------------------------------------------------------------
+C. Durchführung des Updates
+-------------------------------------------------------------------------------
+
+...............................................................................
+C.1 Durchführung eines Updates von Version 1.3.1 oder 1.3.2
+...............................................................................
+
+1. Stoppen Sie den Tomcat, in dem Ihre bisherige Installation betrieben wird.
+ Fertigen Sie eine Sicherungskopie Ihrer kompletten Tomcat-Installation an.
+
+2. Entpacken Sie die Distribution von MOA ID Auth (moa-id-auth-1.3.3.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_AUTH_INST
+ bezeichnet.
+
+3. Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Auth
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/webapps,
+ wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-auth.war als
+ auch das komplette Verzeichnis moa-id-auth.
+
+4. Kopieren Sie die Datei MOA_ID_AUTH_INST/moa-id-auth.war nach
+ CATALINA_HOME_ID/webapps.
+
+5. Kopieren Sie die vier Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/transforms in das Verzeichnis transforms Ihres
+ Stammverzeichnisses für die MOA ID Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_ID/conf/moa-id; in weiterer Folge wird
+ davon ausgegangen).
+
+6. Kopieren Sie die vier Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-spss/profiles in das Verzeichnis profiles Ihres
+ Stammverzeichnisses für die MOA SPSS Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_SPSS/conf/moa-spss, wobei
+ CATALINA_HOME_SPSS für das Basisverzeichnis der Tomcat-Installation
+ für MOA SPSS steht; wenn Sie MOA SPSS nicht als eigenes Webservice
+ betreiben, sondern es von MOA ID über die API-Schnittstelle angesprochen
+ wird, lautet dieses Stammverzeichnis für gewöhnlich
+ CATALINA_HOME_ID/conf/moa-spss; in weiterer Folge wird von letzterer
+ Variante ausgegangen).
+
+7. Sollen zusätzliche Templates für ältere Bürgerkartenumgebungen aktiviert
+ werden, öffnen Sie die XML-Konfiguration von MOA ID (für gewöhnlich finden
+ Sie diese XML-Datei direkt im Stammverzeichnis für die MOA ID Konfiguration,
+ z.B. CATALINA_HOME_ID/conf/moa-id/SampleMOAIDConfiguration.xml); führen Sie
+ folgende Modifikationen an der XML-Konfiguration durch:
+
+ a. Ändern Sie die applikationsübergreifende Konfiguration der AuthBlock
+ Transformationen. Sie finden diese Konfiguration im XML-Element
+ /MOA-IDConfiguration/AuthComponent/SecurityLayer. Fügen Sie zusätzlich zum
+ bisherigen Inhalt dieses Elements (für gewöhnlich ein Element
+ TransformsInfo, dessen Attribut filname den Wert
+ transforms/TransformsInfoAuthBlockText.xml aufweist) ein Element
+ TransformsInfo an, dessen Attribut filename auf die Datei für ältere BKU
+ zeigt. Sie können auch auf die vordefinierten Elemente aus den
+ Musterkonfigurationen dieser Distribution (
+ MOA_ID_AUTH_INST/conf/moa-id/SampleMOAIDConfiguration.xml) zurückgreifen.
+
+ b. Fügen Sie Profilbezeichner für die Transformationsprofile in der
+ Konfiguration für MOA SP an. Sie finden diesen Bezeichner im XML-
+ Element /MOA-IDConfiguration/AuthComponent/MOA-SP/VerifyAuthBlock.
+ Hängen Sie ein Element VerifyTransformsInfoProfileID an, das für die Über-
+ prüfung der Transformation älterer BKU vorgesehen ist.
+ Siehe auch Inhalt des Elements VerifyAuthBlock aus der Musterkonfiguration
+ dieser Distribution (
+ MOA_ID_AUTH_INST/conf/moa-id/SampleMOAIDConfiguration.xml).
+
+ c. Ändern Sie gegebenenfalls die applikationsspezifische Konfiguration
+ der Authblock-Tranformationen. Führen Sie dazu die folgende Tätigkeit
+ für jedes XML-Element /MOA-IDConfiguration/OnlineApplicaton/AuthComponent
+ durch: Fügen Sie zusätzlich zu einem bestehenden Element TransformsInfo
+ ein Elemnet TransformsInfo an, das die Transformation für ältere BKU
+ enthält - gleich wie dies bereits in Schritt a. durchgeführt wurde (wenn
+ Sie dieses Element nicht vorfinden, oder es auskommentiert ist, muss
+ Schritt c. nicht durchgeführt werden).
+
+ Öffnen Sie die XML-Konfiguration von MOA SPSS (für gewöhnlich finden Sie
+ XML-Datei direkt im Stammverzeichnisses für die MOA SPSS Konfiguration, z.B.
+ CATALINA_HOME_ID/conf/moa-spss/SampleMOASPSSConfiguration.xml); führen Sie
+ folgende Modifikationen an der XML-Konfiguration durch:
+
+ a. Ändern Sie die konfigurierten Profile für die zulässigen Transformationen
+ über die signierten Daten. Sie finden diese Profile am Ende der XML-Konfi-
+ guration von MOA SPSS (Elemente des Namens
+ cfg:VerifyTransformsInfoProfile). Fügen Sie zusätzlich zu den vorkommenden
+ Elementen dieses Namens (für gewöhnlich zwei Elemente) zwei weitere
+ Elemente dieses Namens hinzu, die die Profile für die älteren Bürger-
+ kartenumgebungen aufnehmen - diese sind durch den Namensteil "_deprecated"
+ gekennzeichnet (siehe auch Musterkonfigurationen dieser Distribution
+ MOA_ID_AUTH_INST/conf/moa-spss/SampleMOASPSSConfiguration.xml).
+
+8. Starten Sie den Tomcat neu, achten Sie auf eventuelle Fehlermeldungen im
+ Logging von MOA ID beim Einlesen der erneuerten Konfiguration.
+
+...............................................................................
+C.2 Durchführung eines Updates von einer älteren Version
+...............................................................................
+
+Bitte führen Sie eine Neuinstallation von MOA ID laut Handbuch durch und passen
+Sie die mitgelieferte Musterkonfiguration entsprechend Ihren Bedürfnissen unter
+Zuhilfenahme Ihrer bisherigen Konfiguration an.
+
diff --git a/id/readme_1.4.0.txt b/id/readme_1.4.0.txt
new file mode 100644
index 000000000..464d95433
--- /dev/null
+++ b/id/readme_1.4.0.txt
@@ -0,0 +1,154 @@
+===============================================================================
+MOA ID Version 1.4.x - Wichtige Informationen zur Installation
+===============================================================================
+
+-------------------------------------------------------------------------------
+A. Neuerungen/Änderungen
+-------------------------------------------------------------------------------
+
+MOA ID Version 1.4.0 bringt folgende Neuerungen (siehe auch history.txt im
+gleichen Verzeichnis):
+
+- Über konfigurierte Validatoren können mittels des Formularparameters
+ PushInfobox zusätzlich übergebene Infoboxen geprüft werden.
+
+- Unterstützung der Parameterübertragung mittels multipart/form-data in den
+ Servlets VerifyIdentityLinkServlet (Entgegennahme der Personenbindung von der
+ BKU) und VerifyAuthBlockServlet (Entgegennahme des signierten AuthBlocks von
+ der BKU). Diese Form der Parameterübertragung wurde von Security Layer
+ Version 1.2 verpflichtend eingeführt. Damit funktioniert MOA-ID nun auch mit
+ Security Layer Requests der Version 1.2, was eine Voraussetzung für die
+ Verwendung von MOA ID im Bereich der Privatwirtschaft (wbPK als eindeutiges
+ Personenkennzeichen) ist.
+
+- Ab Version 2.6.x des trustDesk basic von IT Solution GmbH werden Inhalte im
+ Secure Viewer spezifikationsgemäß und damit strenger als bisher geprüft. Dies
+ machte es erforderlich Templates für den sogenannten AuthBlock, also jenes
+ Dokument, das im Zuge der Anmeldung vom Bürger/Kunden elektronisch signiert
+ wird anzupassen. Damit aus Kompatibilitätsgründen auch noch (zum Beispiel für
+ eine Übergangsfrist) Versionen < 2.6.x oder die Umsetzung von bdc (hot:Sign
+ Version 1.3) funktionieren, wurden die Musterkonfigurationen so erweitert,
+ dass sowohl aktuelle Bürgerkartenumgebungen als auch OPTIONAL ältere BKU
+ unterstützt werden.
+
+-------------------------------------------------------------------------------
+B. Gründe für ein Update
+-------------------------------------------------------------------------------
+
+Sie sollten Ihre bestehende, ältere Installation von MOA ID auf die Version
+1.4.0 aktualisieren, wenn einer der folgenden Punkte zutrifft:
+
+- Sie möchten Ihre Installation für Anwendungen im Bereich der Privatwirtschaft
+ verwenden (Verwendung des wirtschaftsbereichspezifischen Personenkennzeichens
+ wbpk) oder verwenden explizit multipart/form-data Parameterübertragung von
+ Security Layer Version 1.2.
+
+- Es sollen aktuelle Bürgerkartenumgebungen verwendet werden.
+
+- Sie möchten Ihre Installation mit Templates für den AuthBlock (also jenes
+ Dokument, das im Zuge der Anmeldung vom Bürger/Kunden elektronisch signiert
+ wird) betreiben, die sowohl von aktuellen als auch von älteren Bürgerkarten-
+ umgebungen (BKU) unterstützt werden.
+
+-------------------------------------------------------------------------------
+C. Durchführung des Updates
+-------------------------------------------------------------------------------
+
+...............................................................................
+C.1 Durchführung eines Updates von Version 1.3.1, 1.3.2 oder 1.3.3
+...............................................................................
+
+1. Stoppen Sie den Tomcat, in dem Ihre bisherige Installation betrieben wird.
+ Fertigen Sie eine Sicherungskopie Ihrer kompletten Tomcat-Installation an.
+
+2. Entpacken Sie die Distribution von MOA ID Auth (moa-id-auth-1.4.0.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_AUTH_INST
+ bezeichnet.
+
+3. Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Auth
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/webapps,
+ wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-auth.war als
+ auch das komplette Verzeichnis moa-id-auth.
+
+4. Kopieren Sie die Datei MOA_ID_AUTH_INST/moa-id-auth.war nach
+ CATALINA_HOME_ID/webapps.
+
+5. Kopieren Sie die vier Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/transforms in das Verzeichnis transforms Ihres
+ Stammverzeichnisses für die MOA ID Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_ID/conf/moa-id; in weiterer Folge wird
+ davon ausgegangen).
+
+6. Kopieren Sie die vier Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-spss/profiles in das Verzeichnis profiles Ihres
+ Stammverzeichnisses für die MOA SPSS Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_SPSS/conf/moa-spss, wobei
+ CATALINA_HOME_SPSS für das Basisverzeichnis der Tomcat-Installation
+ für MOA SPSS steht; wenn Sie MOA SPSS nicht als eigenes Webservice
+ betreiben, sondern es von MOA ID über die API-Schnittstelle angesprochen
+ wird, lautet dieses Stammverzeichnis für gewöhnlich
+ CATALINA_HOME_ID/conf/moa-spss; in weiterer Folge wird von letzterer
+ Variante ausgegangen).
+
+7. Sollen zusätzliche Templates für ältere Bürgerkartenumgebungen aktiviert
+ werden, öffnen Sie die XML-Konfiguration von MOA ID (für gewöhnlich finden
+ Sie diese XML-Datei direkt im Stammverzeichnis für die MOA ID Konfiguration,
+ z.B. CATALINA_HOME_ID/conf/moa-id/SampleMOAIDConfiguration.xml); führen Sie
+ folgende Modifikationen an der XML-Konfiguration durch:
+
+ a. Ändern Sie die applikationsübergreifende Konfiguration der AuthBlock
+ Transformationen. Sie finden diese Konfiguration im XML-Element
+ /MOA-IDConfiguration/AuthComponent/SecurityLayer. Fügen Sie zusätzlich zum
+ bisherigen Inhalt dieses Elements (für gewöhnlich ein Element
+ TransformsInfo, dessen Attribut filname den Wert
+ transforms/TransformsInfoAuthBlockText.xml aufweist) ein Element
+ TransformsInfo an, dessen Attribut filename auf die Datei für ältere BKU
+ zeigt. Sie können auch auf die vordefinierten Elemente aus den
+ Musterkonfigurationen dieser Distribution (
+ MOA_ID_AUTH_INST/conf/moa-id/SampleMOAIDConfiguration.xml) zurückgreifen.
+
+ b. Fügen Sie Profilbezeichner für die Transformationsprofile in der
+ Konfiguration für MOA SP an. Sie finden diesen Bezeichner im XML-
+ Element /MOA-IDConfiguration/AuthComponent/MOA-SP/VerifyAuthBlock.
+ Hängen Sie ein Element VerifyTransformsInfoProfileID an, das für die Über-
+ prüfung der Transformation älterer BKU vorgesehen ist.
+ Siehe auch Inhalt des Elements VerifyAuthBlock aus der Musterkonfiguration
+ dieser Distribution (
+ MOA_ID_AUTH_INST/conf/moa-id/SampleMOAIDConfiguration.xml).
+
+ c. Ändern Sie gegebenenfalls die applikationsspezifische Konfiguration
+ der Authblock-Tranformationen. Führen Sie dazu die folgende Tätigkeit
+ für jedes XML-Element /MOA-IDConfiguration/OnlineApplicaton/AuthComponent
+ durch: Fügen Sie zusätzlich zu einem bestehenden Element TransformsInfo
+ ein Elemnet TransformsInfo an, das die Transformation für ältere BKU
+ enthält - gleich wie dies bereits in Schritt a. durchgeführt wurde (wenn
+ Sie dieses Element nicht vorfinden, oder es auskommentiert ist, muss
+ Schritt c. nicht durchgeführt werden).
+
+ Öffnen Sie die XML-Konfiguration von MOA SPSS (für gewöhnlich finden Sie
+ XML-Datei direkt im Stammverzeichnisses für die MOA SPSS Konfiguration, z.B.
+ CATALINA_HOME_ID/conf/moa-spss/SampleMOASPSSConfiguration.xml); führen Sie
+ folgende Modifikationen an der XML-Konfiguration durch:
+
+ a. Ändern Sie die konfigurierten Profile für die zulässigen Transformationen
+ über die signierten Daten. Sie finden diese Profile am Ende der XML-Konfi-
+ guration von MOA SPSS (Elemente des Namens
+ cfg:VerifyTransformsInfoProfile). Fügen Sie zusätzlich zu den vorkommenden
+ Elementen dieses Namens (für gewöhnlich zwei Elemente) zwei weitere
+ Elemente dieses Namens hinzu, die die Profile für die älteren Bürger-
+ kartenumgebungen aufnehmen - diese sind durch den Namensteil "_deprecated"
+ gekennzeichnet (siehe auch Musterkonfigurationen dieser Distribution
+ MOA_ID_AUTH_INST/conf/moa-spss/SampleMOASPSSConfiguration.xml).
+
+8. Starten Sie den Tomcat neu, achten Sie auf eventuelle Fehlermeldungen im
+ Logging von MOA ID beim Einlesen der erneuerten Konfiguration.
+
+...............................................................................
+C.2 Durchführung eines Updates von einer älteren Version
+...............................................................................
+
+Bitte führen Sie eine Neuinstallation von MOA ID laut Handbuch durch und passen
+Sie die mitgelieferte Musterkonfiguration entsprechend Ihren Bedürfnissen unter
+Zuhilfenahme Ihrer bisherigen Konfiguration an.
+
diff --git a/id/readme_1.4.1.txt b/id/readme_1.4.1.txt
new file mode 100644
index 000000000..1d1a23838
--- /dev/null
+++ b/id/readme_1.4.1.txt
@@ -0,0 +1,205 @@
+===============================================================================
+MOA ID Version 1.4.1 - Wichtige Informationen zur Installation
+===============================================================================
+
+-------------------------------------------------------------------------------
+A. Neuerungen/Änderungen
+-------------------------------------------------------------------------------
+
+MOA-ID 1.4.1 enthält gegenüber der unveröffentlichten Version MOA ID 1.4.0 keine
+Neuigkeiten oder größere Änderungen. Es wurde mit diesem Versionssprung die
+Projektstruktur angepasst und der Build-Prozess mittels Maven
+(http://maven.apache.org/) optimiert.
+Der Inhalt und Funktion dieser Distribution ist derselbe wie von Version 1.4.0.
+Anstatt eine Source Distribution beizulegen, ist ab MOA-ID Version 1.4.1 der
+Sourcecode mittels Versionskontrollsystem Subversion über die Open-Source
+Plattform http://egovlabs.gv.at/ zugänglich (
+http://egovlabs.gv.at/scm/?group_id=6).
+
+Mit MOA ID Version 1.4.0 wurden folgende Neuerungen eingeführt, die jetzt
+erstmals in der Veröffentlichung enthalten sind (siehe auch history.txt im
+gleichen Verzeichnis):
+
+- Über konfigurierte Validatoren können mittels des Formularparameters
+ PushInfobox zusätzlich übergebene Infoboxen geprüft werden.
+
+- Unterstützung der Parameterübertragung mittels multipart/form-data in den
+ Servlets VerifyIdentityLinkServlet (Entgegennahme der Personenbindung von der
+ BKU) und VerifyAuthBlockServlet (Entgegennahme des signierten AuthBlocks von
+ der BKU). Diese Form der Parameterübertragung wurde von Security Layer
+ Version 1.2 verpflichtend eingeführt. Damit funktioniert MOA-ID nun auch mit
+ Security Layer Requests der Version 1.2, was eine Voraussetzung für die
+ Verwendung von MOA ID im Bereich der Privatwirtschaft (wbPK als eindeutiges
+ Personenkennzeichen) ist.
+
+- Ab Version 2.6.x des trustDesk basic von IT Solution GmbH werden Inhalte im
+ Secure Viewer spezifikationsgemäß und damit strenger als bisher geprüft. Dies
+ machte es erforderlich Templates für den sogenannten AuthBlock, also jenes
+ Dokument, das im Zuge der Anmeldung vom Bürger/Kunden elektronisch signiert
+ wird anzupassen. Damit aus Kompatibilitätsgründen auch noch (zum Beispiel für
+ eine Übergangsfrist) Versionen < 2.6.x oder die Umsetzung von bdc (hot:Sign
+ Version 1.3) funktionieren, wurden die Musterkonfigurationen so erweitert,
+ dass sowohl aktuelle Bürgerkartenumgebungen als auch OPTIONAL ältere BKU
+ unterstützt werden.
+
+-------------------------------------------------------------------------------
+B. Durchführung eines Updates
+-------------------------------------------------------------------------------
+
+Es wird generell eine Neuinstallation lt. Handbuch empfohlen! Dennoch ist auch
+eine Aktualisierung bestehender Installationen möglich.
+
+...............................................................................
+B.1 Durchführung eines Updates von Version 1.3.1, 1.3.2 oder 1.3.3
+...............................................................................
+
+1. Stoppen Sie den Tomcat, in dem Ihre bisherige Installation betrieben wird.
+ Fertigen Sie eine Sicherungskopie Ihrer kompletten Tomcat-Installation an.
+
+2. Entpacken Sie die Distribution von MOA ID Auth (moa-id-auth-1.4.1.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_AUTH_INST
+ bezeichnet.
+
+3. Erstellen Sie eine Sicherungskopie aller "iaik*.jar"-Dateien im Verzeichnis
+ JAVA_HOME\jre\lib\ext und löschen Sie diese Dateien danach.
+
+4. Kopieren Sie alle Dateien aus dem Verzeichnis MOA_ID_INST_AUTH\ext in das
+ Verzeichnis JAVA_HOME\jre\lib\ext.
+
+5. Erstellen Sie eine Sicherungskopie aller Dateien im Verzeichnis
+ CATALINA_HOME\common\endorsed und löschen Sie die dort eventuell vorhandene
+ Dateien xmlParserAPIs.jar
+
+6. Kopieren Sie die Dateien aus dem Verzeichnis MOA_ID_INST_AUTH\endorsed
+ in das Verzeichnis CATALINA_HOME\common\endorsed. Überschreiben Sie dabei
+ etwaige gleichnamige Dateien.
+
+7. Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Auth
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/webapps,
+ wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-auth.war als
+ auch das komplette Verzeichnis moa-id-auth.
+
+8. Kopieren Sie die Datei MOA_ID_AUTH_INST/moa-id-auth.war nach
+ CATALINA_HOME_ID/webapps.
+
+9. Kopieren Sie die vier Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/transforms in das Verzeichnis transforms Ihres
+ Stammverzeichnisses für die MOA ID Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_ID/conf/moa-id; in weiterer Folge wird
+ davon ausgegangen).
+
+10.Kopieren Sie die vier Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-spss/profiles in das Verzeichnis profiles Ihres
+ Stammverzeichnisses für die MOA SPSS Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_SPSS/conf/moa-spss, wobei
+ CATALINA_HOME_SPSS für das Basisverzeichnis der Tomcat-Installation
+ für MOA SPSS steht; wenn Sie MOA SPSS nicht als eigenes Webservice
+ betreiben, sondern es von MOA ID über die API-Schnittstelle angesprochen
+ wird, lautet dieses Stammverzeichnis für gewöhnlich
+ CATALINA_HOME_ID/conf/moa-spss; in weiterer Folge wird von letzterer
+ Variante ausgegangen).
+
+11.Update des Cert-Stores.
+ Kopieren Sie den Inhalt des Verzeichnisses
+ MOA_ID_INST_AUTH\conf\moa-spss\certstore in das Verzeichnis
+ CATALINA_HOME\conf\moa-spss\certstore. Wenn Sie gefragt werden, ob Sie
+ vorhandene Dateien oder Unterverzeichnisse überschreiben sollen, dann
+ bejahen sie das.
+
+12.Sollen zusätzliche Templates für ältere Bürgerkartenumgebungen aktiviert
+ werden, öffnen Sie die XML-Konfiguration von MOA ID (für gewöhnlich finden
+ Sie diese XML-Datei direkt im Stammverzeichnis für die MOA ID Konfiguration,
+ z.B. CATALINA_HOME_ID/conf/moa-id/SampleMOAIDConfiguration.xml); führen Sie
+ folgende Modifikationen an der XML-Konfiguration durch:
+
+ a. Ändern Sie die applikationsübergreifende Konfiguration der AuthBlock
+ Transformationen. Sie finden diese Konfiguration im XML-Element
+ /MOA-IDConfiguration/AuthComponent/SecurityLayer. Fügen Sie zusätzlich zum
+ bisherigen Inhalt dieses Elements (für gewöhnlich ein Element
+ TransformsInfo, dessen Attribut filname den Wert
+ transforms/TransformsInfoAuthBlockText.xml aufweist) ein Element
+ TransformsInfo an, dessen Attribut filename auf die Datei für ältere BKU
+ zeigt. Sie können auch auf die vordefinierten Elemente aus den
+ Musterkonfigurationen dieser Distribution (
+ MOA_ID_AUTH_INST/conf/moa-id/SampleMOAIDConfiguration.xml) zurückgreifen.
+
+ b. Fügen Sie Profilbezeichner für die Transformationsprofile in der
+ Konfiguration für MOA SP an. Sie finden diesen Bezeichner im XML-
+ Element /MOA-IDConfiguration/AuthComponent/MOA-SP/VerifyAuthBlock.
+ Hängen Sie ein Element VerifyTransformsInfoProfileID an, das für die Über-
+ prüfung der Transformation älterer BKU vorgesehen ist.
+ Siehe auch Inhalt des Elements VerifyAuthBlock aus der Musterkonfiguration
+ dieser Distribution (
+ MOA_ID_AUTH_INST/conf/moa-id/SampleMOAIDConfiguration.xml).
+
+ c. Ändern Sie gegebenenfalls die applikationsspezifische Konfiguration
+ der Authblock-Tranformationen. Führen Sie dazu die folgende Tätigkeit
+ für jedes XML-Element /MOA-IDConfiguration/OnlineApplicaton/AuthComponent
+ durch: Fügen Sie zusätzlich zu einem bestehenden Element TransformsInfo
+ ein Elemnet TransformsInfo an, das die Transformation für ältere BKU
+ enthält - gleich wie dies bereits in Schritt a. durchgeführt wurde (wenn
+ Sie dieses Element nicht vorfinden, oder es auskommentiert ist, muss
+ Schritt c. nicht durchgeführt werden).
+
+ Öffnen Sie die XML-Konfiguration von MOA SPSS (für gewöhnlich finden Sie
+ XML-Datei direkt im Stammverzeichnisses für die MOA SPSS Konfiguration, z.B.
+ CATALINA_HOME_ID/conf/moa-spss/SampleMOASPSSConfiguration.xml); führen Sie
+ folgende Modifikationen an der XML-Konfiguration durch:
+
+ a. Ändern Sie die konfigurierten Profile für die zulässigen Transformationen
+ über die signierten Daten. Sie finden diese Profile am Ende der XML-Konfi-
+ guration von MOA SPSS (Elemente des Namens
+ cfg:VerifyTransformsInfoProfile). Fügen Sie zusätzlich zu den vorkommenden
+ Elementen dieses Namens (für gewöhnlich zwei Elemente) zwei weitere
+ Elemente dieses Namens hinzu, die die Profile für die älteren Bürger-
+ kartenumgebungen aufnehmen - diese sind durch den Namensteil "_deprecated"
+ gekennzeichnet (siehe auch Musterkonfigurationen dieser Distribution
+ MOA_ID_AUTH_INST/conf/moa-spss/SampleMOASPSSConfiguration.xml).
+
+13.Update der Trust-Profile. Achten sie bei Case-sensitiven Betriebssystemen auf
+ die Profilbezeichnungen. Aus trustprofiles wurde trustProfiles.
+ Wenn Sie Ihre alten Trust-Profile durch die neuen ersetzen wollen, dann gehen
+ Sie vor, wie in Punkt a). Wenn Sie Ihre eigenen Trust-Profile beibehalten
+ wollen, dann gehen Sie vor, wie in Punkt b).
+
+ a. Gehen Sie wie folgt vor, um die Trust-Profile auszutauschen:
+
+ 1) Löschen Sie das Verzeichnis CATALINA_HOME\conf\moa-spss\trustprofiles.
+ 2) Kopieren Sie das Verzeichnis
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles in das Verzeichnis
+ CATALINA_HOME\conf\moa-spss.
+
+ b. Falls Sie Ihre alten Trust-Profile beibehalten wollen, gehen Sie wie folgt
+ vor, um die Profile auf den aktuellen Stand zu bringen:
+
+ 1) Benennen Sie ein eventuell vorhandenes Verzeichnis trustprofiles in
+ trustProfiles um (vergessen Sie nicht, diese Änderung in Ihrer MOA-SP/SS
+ Konfigurationsdatei ebenfalls zu berücksichtigen und benennen Sie dort
+ alle gleichartigen Vorkommen von trustprofiles in trustProfiles um)
+
+ 2) Ergänzen Sie ihre Trustprofile durch alle Zertifikate aus den
+ entsprechenden Profilen im Verzeichnis
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles, die nicht in Ihren
+ Profilen enthalten sind. Am einfachsten ist es, wenn Sie den Inhalt der
+ einzelnen Profile aus der Distribution (
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles) in die entsprechenden
+ Profile Ihrer Installation (CATALINA_HOME\conf\moa-spss\trustProfiles)
+ kopieren und dabei die vorhandenen gleichnamigen Zertifikate
+ überschreiben), also z.B: Kopieren des Inhalts von
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles\
+ MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten nach
+ CATALINA_HOME\conf\moa-spss\trustProfiles\
+ MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten usw.
+
+14.Starten Sie den Tomcat neu, achten Sie auf eventuelle Fehlermeldungen im
+ Logging von MOA ID beim Einlesen der erneuerten Konfiguration.
+
+...............................................................................
+B.2 Durchführung eines Updates von einer älteren Version
+...............................................................................
+
+Bitte führen Sie eine Neuinstallation von MOA ID laut Handbuch durch und passen
+Sie die mitgelieferte Musterkonfiguration entsprechend Ihren Bedürfnissen unter
+Zuhilfenahme Ihrer bisherigen Konfiguration an.
+
diff --git a/id/readme_1.4.2.txt b/id/readme_1.4.2.txt
new file mode 100644
index 000000000..d08593f28
--- /dev/null
+++ b/id/readme_1.4.2.txt
@@ -0,0 +1,237 @@
+===============================================================================
+MOA ID Version 1.4.2 - Wichtige Informationen zur Installation
+===============================================================================
+
+-------------------------------------------------------------------------------
+A. Neuerungen/Änderungen
+-------------------------------------------------------------------------------
+
+Mit MOA ID Version 1.4.2 wurden folgende Neuerungen eingeführt, die jetzt
+erstmals in der Veröffentlichung enthalten sind (siehe auch history.txt im
+gleichen Verzeichnis):
+
+- Vollmachtsprüfung in MOA-ID integriert
+
+- MOA-ID kann Vollmachten in einem Kompatibilitätsmodus dazu benutzen
+ Vetreterdaten durch die des Vertretenen zu ersetzen. Somit können in diesem
+ Modus Applikationen Vollmachten benutzen ohne modifiziert werden zu müssen
+
+- Integration berufliche Parteienvertretung gemäß §5 Abs.3 E-GovG. Vertretung
+ durch berufliche Parteienvertreter kann durch Einsatz eines Infobox Validators
+ (Validatorklasse ParepValidator) durchgeführt werden.
+
+- Neue A-Trust Testzertifikate für Tespersonenbindungen in die Testprofile
+ aufgenommen.
+
+- Infobox Validatoren können über das Servlet InputProcessor Daten nachfordern
+ und Formulare für den Datenfluss zur Verfügung stellen. Die Klasse die die
+ Realisierung des Form Input Prozessors enthält, wird in der Passage für die
+ Infobox-Validatoren der MOA-ID Konfiguration angegeben.
+
+-------------------------------------------------------------------------------
+B. Durchführung eines Updates
+-------------------------------------------------------------------------------
+
+Es wird generell eine Neuinstallation lt. Handbuch empfohlen! Dennoch ist auch
+eine Aktualisierung bestehender Installationen möglich.
+
+...............................................................................
+B.1 Durchführung eines Updates von Version 1.4.1 (oder 1.4.2 beta 1)
+...............................................................................
+
+1. Stoppen Sie den Tomcat, in dem Ihre bisherige Installation betrieben wird.
+ Fertigen Sie eine Sicherungskopie Ihrer kompletten Tomcat-Installation an.
+
+2. Entpacken Sie die Distribution von MOA ID Auth (moa-id-auth-1.4.2.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_AUTH_INST
+ bezeichnet.
+
+3. Erstellen Sie eine Sicherungskopie aller "iaik*.jar"-Dateien im Verzeichnis
+ JAVA_HOME\jre\lib\ext und löschen Sie diese Dateien danach.
+
+4. Kopieren Sie alle Dateien aus dem Verzeichnis MOA_ID_INST_AUTH\ext in das
+ Verzeichnis JAVA_HOME\jre\lib\ext.
+
+5. Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Auth
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/webapps,
+ wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-auth.war als
+ auch das komplette Verzeichnis moa-id-auth.
+
+6. Kopieren Sie die Datei MOA_ID_AUTH_INST/moa-id-auth.war nach
+ CATALINA_HOME_ID/webapps.
+
+7. Kopieren Sie die vier Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/transforms in das Verzeichnis transforms Ihres
+ Stammverzeichnisses für die MOA ID Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_ID/conf/moa-id; in weiterer Folge wird
+ davon ausgegangen).
+
+8. Kopieren Sie die vier Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-spss/profiles in das Verzeichnis profiles Ihres
+ Stammverzeichnisses für die MOA SPSS Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_SPSS/conf/moa-spss, wobei
+ CATALINA_HOME_SPSS für das Basisverzeichnis der Tomcat-Installation
+ für MOA SPSS steht; wenn Sie MOA SPSS nicht als eigenes Webservice
+ betreiben, sondern es von MOA ID über die API-Schnittstelle angesprochen
+ wird, lautet dieses Stammverzeichnis für gewöhnlich
+ CATALINA_HOME_ID/conf/moa-spss; in weiterer Folge wird von letzterer
+ Variante ausgegangen).
+
+9. Starten Sie den Tomcat neu, achten Sie auf eventuelle Fehlermeldungen im
+ Logging von MOA ID beim Einlesen der erneuerten Konfiguration.
+
+...............................................................................
+B.2 Durchführung eines Updates von Version 1.3.1, 1.3.2 oder 1.3.3
+...............................................................................
+
+1. Stoppen Sie den Tomcat, in dem Ihre bisherige Installation betrieben wird.
+ Fertigen Sie eine Sicherungskopie Ihrer kompletten Tomcat-Installation an.
+
+2. Entpacken Sie die Distribution von MOA ID Auth (moa-id-auth-1.4.2.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_AUTH_INST
+ bezeichnet.
+
+3. Erstellen Sie eine Sicherungskopie aller "iaik*.jar"-Dateien im Verzeichnis
+ JAVA_HOME\jre\lib\ext und löschen Sie diese Dateien danach.
+
+4. Kopieren Sie alle Dateien aus dem Verzeichnis MOA_ID_INST_AUTH\ext in das
+ Verzeichnis JAVA_HOME\jre\lib\ext.
+
+5. Erstellen Sie eine Sicherungskopie aller Dateien im Verzeichnis
+ CATALINA_HOME\common\endorsed und löschen Sie die dort eventuell vorhandene
+ Dateien xmlParserAPIs.jar
+
+6. Kopieren Sie die Dateien aus dem Verzeichnis MOA_ID_INST_AUTH\endorsed
+ in das Verzeichnis CATALINA_HOME\common\endorsed. Überschreiben Sie dabei
+ etwaige gleichnamige Dateien.
+
+7. Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Auth
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/webapps,
+ wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-auth.war als
+ auch das komplette Verzeichnis moa-id-auth.
+
+8. Kopieren Sie die Datei MOA_ID_AUTH_INST/moa-id-auth.war nach
+ CATALINA_HOME_ID/webapps.
+
+9. Kopieren Sie die vier Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/transforms in das Verzeichnis transforms Ihres
+ Stammverzeichnisses für die MOA ID Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_ID/conf/moa-id; in weiterer Folge wird
+ davon ausgegangen).
+
+10.Kopieren Sie die vier Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-spss/profiles in das Verzeichnis profiles Ihres
+ Stammverzeichnisses für die MOA SPSS Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_SPSS/conf/moa-spss, wobei
+ CATALINA_HOME_SPSS für das Basisverzeichnis der Tomcat-Installation
+ für MOA SPSS steht; wenn Sie MOA SPSS nicht als eigenes Webservice
+ betreiben, sondern es von MOA ID über die API-Schnittstelle angesprochen
+ wird, lautet dieses Stammverzeichnis für gewöhnlich
+ CATALINA_HOME_ID/conf/moa-spss; in weiterer Folge wird von letzterer
+ Variante ausgegangen).
+
+11.Update des Cert-Stores.
+ Kopieren Sie den Inhalt des Verzeichnisses
+ MOA_ID_INST_AUTH\conf\moa-spss\certstore in das Verzeichnis
+ CATALINA_HOME\conf\moa-spss\certstore. Wenn Sie gefragt werden, ob Sie
+ vorhandene Dateien oder Unterverzeichnisse überschreiben sollen, dann
+ bejahen sie das.
+
+12.Sollen zusätzliche Templates für ältere Bürgerkartenumgebungen aktiviert
+ werden, öffnen Sie die XML-Konfiguration von MOA ID (für gewöhnlich finden
+ Sie diese XML-Datei direkt im Stammverzeichnis für die MOA ID Konfiguration,
+ z.B. CATALINA_HOME_ID/conf/moa-id/SampleMOAIDConfiguration.xml); führen Sie
+ folgende Modifikationen an der XML-Konfiguration durch:
+
+ a. Ändern Sie die applikationsübergreifende Konfiguration der AuthBlock
+ Transformationen. Sie finden diese Konfiguration im XML-Element
+ /MOA-IDConfiguration/AuthComponent/SecurityLayer. Fügen Sie zusätzlich zum
+ bisherigen Inhalt dieses Elements (für gewöhnlich ein Element
+ TransformsInfo, dessen Attribut filname den Wert
+ transforms/TransformsInfoAuthBlockText.xml aufweist) ein Element
+ TransformsInfo an, dessen Attribut filename auf die Datei für ältere BKU
+ zeigt. Sie können auch auf die vordefinierten Elemente aus den
+ Musterkonfigurationen dieser Distribution (
+ MOA_ID_AUTH_INST/conf/moa-id/SampleMOAIDConfiguration.xml) zurückgreifen.
+
+ b. Fügen Sie Profilbezeichner für die Transformationsprofile in der
+ Konfiguration für MOA SP an. Sie finden diesen Bezeichner im XML-
+ Element /MOA-IDConfiguration/AuthComponent/MOA-SP/VerifyAuthBlock.
+ Hängen Sie ein Element VerifyTransformsInfoProfileID an, das für die Über-
+ prüfung der Transformation älterer BKU vorgesehen ist.
+ Siehe auch Inhalt des Elements VerifyAuthBlock aus der Musterkonfiguration
+ dieser Distribution (
+ MOA_ID_AUTH_INST/conf/moa-id/SampleMOAIDConfiguration.xml).
+
+ c. Ändern Sie gegebenenfalls die applikationsspezifische Konfiguration
+ der Authblock-Tranformationen. Führen Sie dazu die folgende Tätigkeit
+ für jedes XML-Element /MOA-IDConfiguration/OnlineApplicaton/AuthComponent
+ durch: Fügen Sie zusätzlich zu einem bestehenden Element TransformsInfo
+ ein Elemnet TransformsInfo an, das die Transformation für ältere BKU
+ enthält - gleich wie dies bereits in Schritt a. durchgeführt wurde (wenn
+ Sie dieses Element nicht vorfinden, oder es auskommentiert ist, muss
+ Schritt c. nicht durchgeführt werden).
+
+ Öffnen Sie die XML-Konfiguration von MOA SPSS (für gewöhnlich finden Sie
+ XML-Datei direkt im Stammverzeichnisses für die MOA SPSS Konfiguration, z.B.
+ CATALINA_HOME_ID/conf/moa-spss/SampleMOASPSSConfiguration.xml); führen Sie
+ folgende Modifikationen an der XML-Konfiguration durch:
+
+ a. Ändern Sie die konfigurierten Profile für die zulässigen Transformationen
+ über die signierten Daten. Sie finden diese Profile am Ende der XML-Konfi-
+ guration von MOA SPSS (Elemente des Namens
+ cfg:VerifyTransformsInfoProfile). Fügen Sie zusätzlich zu den vorkommenden
+ Elementen dieses Namens (für gewöhnlich zwei Elemente) zwei weitere
+ Elemente dieses Namens hinzu, die die Profile für die älteren Bürger-
+ kartenumgebungen aufnehmen - diese sind durch den Namensteil "_deprecated"
+ gekennzeichnet (siehe auch Musterkonfigurationen dieser Distribution
+ MOA_ID_AUTH_INST/conf/moa-spss/SampleMOASPSSConfiguration.xml).
+
+13.Update der Trust-Profile. Achten sie bei Case-sensitiven Betriebssystemen auf
+ die Profilbezeichnungen. Aus trustprofiles wurde trustProfiles.
+ Wenn Sie Ihre alten Trust-Profile durch die neuen ersetzen wollen, dann gehen
+ Sie vor, wie in Punkt a). Wenn Sie Ihre eigenen Trust-Profile beibehalten
+ wollen, dann gehen Sie vor, wie in Punkt b).
+
+ a. Gehen Sie wie folgt vor, um die Trust-Profile auszutauschen:
+
+ 1) Löschen Sie das Verzeichnis CATALINA_HOME\conf\moa-spss\trustprofiles.
+ 2) Kopieren Sie das Verzeichnis
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles in das Verzeichnis
+ CATALINA_HOME\conf\moa-spss.
+
+ b. Falls Sie Ihre alten Trust-Profile beibehalten wollen, gehen Sie wie folgt
+ vor, um die Profile auf den aktuellen Stand zu bringen:
+
+ 1) Benennen Sie ein eventuell vorhandenes Verzeichnis trustprofiles in
+ trustProfiles um (vergessen Sie nicht, diese Änderung in Ihrer MOA-SP/SS
+ Konfigurationsdatei ebenfalls zu berücksichtigen und benennen Sie dort
+ alle gleichartigen Vorkommen von trustprofiles in trustProfiles um)
+
+ 2) Ergänzen Sie ihre Trustprofile durch alle Zertifikate aus den
+ entsprechenden Profilen im Verzeichnis
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles, die nicht in Ihren
+ Profilen enthalten sind. Am einfachsten ist es, wenn Sie den Inhalt der
+ einzelnen Profile aus der Distribution (
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles) in die entsprechenden
+ Profile Ihrer Installation (CATALINA_HOME\conf\moa-spss\trustProfiles)
+ kopieren und dabei die vorhandenen gleichnamigen Zertifikate
+ überschreiben), also z.B: Kopieren des Inhalts von
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles\
+ MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten nach
+ CATALINA_HOME\conf\moa-spss\trustProfiles\
+ MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten usw.
+
+14.Starten Sie den Tomcat neu, achten Sie auf eventuelle Fehlermeldungen im
+ Logging von MOA ID beim Einlesen der erneuerten Konfiguration.
+
+...............................................................................
+B.3 Durchführung eines Updates von einer älteren Version
+...............................................................................
+
+Bitte führen Sie eine Neuinstallation von MOA ID laut Handbuch durch und passen
+Sie die mitgelieferte Musterkonfiguration entsprechend Ihren Bedürfnissen unter
+Zuhilfenahme Ihrer bisherigen Konfiguration an.
+
diff --git a/id/readme_1.4.3-1.txt b/id/readme_1.4.3-1.txt
new file mode 100644
index 000000000..cf715ac78
--- /dev/null
+++ b/id/readme_1.4.3-1.txt
@@ -0,0 +1,224 @@
+===============================================================================
+MOA ID Version 1.4.3-1 - Wichtige Informationen zur Installation
+===============================================================================
+
+-------------------------------------------------------------------------------
+A. Neuerungen/Änderungen
+-------------------------------------------------------------------------------
+
+Mit MOA ID Version 1.4.3-1 wurden folgende Neuerungen eingeführt, die jetzt
+erstmals in der Veröffentlichung enthalten sind (siehe auch history.txt im
+gleichen Verzeichnis):
+
+- Fix von falscher Schemabenennung in Constants.java des common-Projekts.
+
+-------------------------------------------------------------------------------
+B. Durchführung eines Updates
+-------------------------------------------------------------------------------
+
+Es wird generell eine Neuinstallation lt. Handbuch empfohlen! Dennoch ist auch
+eine Aktualisierung bestehender Installationen möglich.
+
+...............................................................................
+B.1 Durchführung eines Updates von Version 1.4.1 oder 1.4.2 (incl. beta 1)
+...............................................................................
+
+1. Stoppen Sie den Tomcat, in dem Ihre bisherige Installation betrieben wird.
+ Fertigen Sie eine Sicherungskopie Ihrer kompletten Tomcat-Installation an.
+
+2. Entpacken Sie die Distribution von MOA ID Auth (moa-id-auth-1.4.3-1.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_AUTH_INST
+ bezeichnet.
+
+3. Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Auth
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/webapps,
+ wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-auth.war als
+ auch das komplette Verzeichnis moa-id-auth.
+
+4. Kopieren Sie die Datei MOA_ID_AUTH_INST/moa-id-auth.war nach
+ CATALINA_HOME_ID/webapps.
+
+5. Kopieren Sie die vier Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/transforms in das Verzeichnis transforms Ihres
+ Stammverzeichnisses für die MOA ID Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_ID/conf/moa-id; in weiterer Folge wird
+ davon ausgegangen).
+
+6. Kopieren Sie die vier Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-spss/profiles in das Verzeichnis profiles Ihres
+ Stammverzeichnisses für die MOA SPSS Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_SPSS/conf/moa-spss, wobei
+ CATALINA_HOME_SPSS für das Basisverzeichnis der Tomcat-Installation
+ für MOA SPSS steht; wenn Sie MOA SPSS nicht als eigenes Webservice
+ betreiben, sondern es von MOA ID über die API-Schnittstelle angesprochen
+ wird, lautet dieses Stammverzeichnis für gewöhnlich
+ CATALINA_HOME_ID/conf/moa-spss.
+
+7. Sichern Sie ihre MOA-ID Konfigurationsdatei. Kopieren Sie die
+ Beispielkonfigurationsdateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/SampleMOA*.xml nach
+ CATALINA_HOME_ID/conf/moa-id.
+ Verwenden Sie in Ihrer Installation bereits die Vollmachtenprüfung, so
+ verschieben Sie bitte in der MOA-ID Installationsdatei das Element
+ <CompatibilityMode> innerhalb des Konfigurationsteiles für die berufliche
+ Parteienvertreung (ParepSpecificParameters) unter das Element
+ ApplicationSpecificParameters.
+
+8. Starten Sie den Tomcat neu, achten Sie auf eventuelle Fehlermeldungen im
+ Logging von MOA ID beim Einlesen der erneuerten Konfiguration.
+
+...............................................................................
+B.2 Durchführung eines Updates von Version 1.3.1, 1.3.2 oder 1.3.3
+...............................................................................
+
+1. Stoppen Sie den Tomcat, in dem Ihre bisherige Installation betrieben wird.
+ Fertigen Sie eine Sicherungskopie Ihrer kompletten Tomcat-Installation an.
+
+2. Entpacken Sie die Distribution von MOA ID Auth (moa-id-auth-1.4.3-1.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_AUTH_INST
+ bezeichnet.
+
+3. Erstellen Sie eine Sicherungskopie aller "iaik*.jar"-Dateien im Verzeichnis
+ JAVA_HOME\jre\lib\ext und löschen Sie diese Dateien danach.
+
+4. Kopieren Sie alle Dateien aus dem Verzeichnis MOA_ID_INST_AUTH\ext in das
+ Verzeichnis JAVA_HOME\jre\lib\ext.
+
+5. Erstellen Sie eine Sicherungskopie aller Dateien im Verzeichnis
+ CATALINA_HOME\common\endorsed und löschen Sie die dort eventuell vorhandene
+ Dateien xmlParserAPIs.jar
+
+6. Kopieren Sie die Dateien aus dem Verzeichnis MOA_ID_INST_AUTH\endorsed
+ in das Verzeichnis CATALINA_HOME\common\endorsed. Überschreiben Sie dabei
+ etwaige gleichnamige Dateien.
+
+7. Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Auth
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/webapps,
+ wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-auth.war als
+ auch das komplette Verzeichnis moa-id-auth.
+
+8. Kopieren Sie die Datei MOA_ID_AUTH_INST/moa-id-auth.war nach
+ CATALINA_HOME_ID/webapps.
+
+9. Kopieren Sie die vier Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/transforms in das Verzeichnis transforms Ihres
+ Stammverzeichnisses für die MOA ID Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_ID/conf/moa-id; in weiterer Folge wird
+ davon ausgegangen).
+
+10.Kopieren Sie die vier Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-spss/profiles in das Verzeichnis profiles Ihres
+ Stammverzeichnisses für die MOA SPSS Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_SPSS/conf/moa-spss, wobei
+ CATALINA_HOME_SPSS für das Basisverzeichnis der Tomcat-Installation
+ für MOA SPSS steht; wenn Sie MOA SPSS nicht als eigenes Webservice
+ betreiben, sondern es von MOA ID über dmie API-Schnittstelle angesprochen
+ wird, lautet dieses Stammverzeichnis für gewöhnlich
+ CATALINA_HOME_ID/conf/moa-spss; in weiterer Folge wird von letzterer
+ Variante ausgegangen).
+
+11.Update des Cert-Stores.
+ Kopieren Sie den Inhalt des Verzeichnisses
+ MOA_ID_INST_AUTH\conf\moa-spss\certstore in das Verzeichnis
+ CATALINA_HOME\conf\moa-spss\certstore. Wenn Sie gefragt werden, ob Sie
+ vorhandene Dateien oder Unterverzeichnisse überschreiben sollen, dann
+ bejahen sie das.
+
+12.Sollen zusätzliche Templates für ältere Bürgerkartenumgebungen aktiviert
+ werden, öffnen Sie die XML-Konfiguration von MOA ID (für gewöhnlich finden
+ Sie diese XML-Datei direkt im Stammverzeichnis für die MOA ID Konfiguration,
+ z.B. CATALINA_HOME_ID/conf/moa-id/SampleMOAIDConfiguration.xml); führen Sie
+ folgende Modifikationen an der XML-Konfiguration durch:
+
+ a. Ändern Sie die applikationsübergreifende Konfiguration der AuthBlock
+ Transformationen. Sie finden diese Konfiguration im XML-Element
+ /MOA-IDConfiguration/AuthComponent/SecurityLayer. Fügen Sie zusätzlich zum
+ bisherigen Inhalt dieses Elements (für gewöhnlich ein Element
+ TransformsInfo, dessen Attribut filname den Wert
+ transforms/TransformsInfoAuthBlockText.xml aufweist) ein Element
+ TransformsInfo an, dessen Attribut filename auf die Datei für ältere BKU
+ zeigt. Sie können auch auf die vordefinierten Elemente aus den
+ Musterkonfigurationen dieser Distribution (
+ MOA_ID_AUTH_INST/conf/moa-id/SampleMOAIDConfiguration.xml) zurückgreifen.
+
+ b. Fügen Sie Profilbezeichner für die Transformationsprofile in der
+ Konfiguration für MOA SP an. Sie finden diesen Bezeichner im XML-
+ Element /MOA-IDConfiguration/AuthComponent/MOA-SP/VerifyAuthBlock.
+ Hängen Sie ein Element VerifyTransformsInfoProfileID an, das für die Über-
+ prüfung der Transformation älterer BKU vorgesehen ist.
+ Siehe auch Inhalt des Elements VerifyAuthBlock aus der Musterkonfiguration
+ dieser Distribution (
+ MOA_ID_AUTH_INST/conf/moa-id/SampleMOAIDConfiguration.xml).
+
+ c. Ändern Sie gegebenenfalls die applikationsspezifische Konfiguration
+ der Authblock-Tranformationen. Führen Sie dazu die folgende Tätigkeit
+ für jedes XML-Element /MOA-IDConfiguration/OnlineApplicaton/AuthComponent
+ durch: Fügen Sie zusätzlich zu einem bestehenden Element TransformsInfo
+ ein Elemnet TransformsInfo an, das die Transformation für ältere BKU
+ enthält - gleich wie dies bereits in Schritt a. durchgeführt wurde (wenn
+ Sie dieses Element nicht vorfinden, oder es auskommentiert ist, muss
+ Schritt c. nicht durchgeführt werden).
+
+ Öffnen Sie die XML-Konfiguration von MOA SPSS (für gewöhnlich finden Sie
+ XML-Datei direkt im Stammverzeichnisses für die MOA SPSS Konfiguration, z.B.
+ CATALINA_HOME_ID/conf/moa-spss/SampleMOASPSSConfiguration.xml); führen Sie
+ folgende Modifikationen an der XML-Konfiguration durch:
+
+ a. Ändern Sie die konfigurierten Profile für die zulässigen Transformationen
+ über die signierten Daten. Sie finden diese Profile am Ende der XML-Konfi-
+ guration von MOA SPSS (Elemente des Namens
+ cfg:VerifyTransformsInfoProfile). Fügen Sie zusätzlich zu den vorkommenden
+ Elementen dieses Namens (für gewöhnlich zwei Elemente) zwei weitere
+ Elemente dieses Namens hinzu, die die Profile für die älteren Bürger-
+ kartenumgebungen aufnehmen - diese sind durch den Namensteil "_deprecated"
+ gekennzeichnet (siehe auch Musterkonfigurationen dieser Distribution
+ MOA_ID_AUTH_INST/conf/moa-spss/SampleMOASPSSConfiguration.xml).
+
+13.Update der Trust-Profile. Achten sie bei Case-sensitiven Betriebssystemen auf
+ die Profilbezeichnungen. Aus trustprofiles wurde trustProfiles.
+ Wenn Sie Ihre alten Trust-Profile durch die neuen ersetzen wollen, dann gehen
+ Sie vor, wie in Punkt a). Wenn Sie Ihre eigenen Trust-Profile beibehalten
+ wollen, dann gehen Sie vor, wie in Punkt b).
+
+ a. Gehen Sie wie folgt vor, um die Trust-Profile auszutauschen:
+
+ 1) Löschen Sie das Verzeichnis CATALINA_HOME\conf\moa-spss\trustprofiles.
+ 2) Kopieren Sie das Verzeichnis
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles in das Verzeichnis
+ CATALINA_HOME\conf\moa-spss.
+
+ b. Falls Sie Ihre alten Trust-Profile beibehalten wollen, gehen Sie wie folgt
+ vor, um die Profile auf den aktuellen Stand zu bringen:
+
+ 1) Benennen Sie ein eventuell vorhandenes Verzeichnis trustprofiles in
+ trustProfiles um (vergessen Sie nicht, diese Änderung in Ihrer MOA-SP/SS
+ Konfigurationsdatei ebenfalls zu berücksichtigen und benennen Sie dort
+ alle gleichartigen Vorkommen von trustprofiles in trustProfiles um)
+
+ 2) Ergänzen Sie ihre Trustprofile durch alle Zertifikate aus den
+ entsprechenden Profilen im Verzeichnis
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles, die nicht in Ihren
+ Profilen enthalten sind. Am einfachsten ist es, wenn Sie den Inhalt der
+ einzelnen Profile aus der Distribution (
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles) in die entsprechenden
+ Profile Ihrer Installation (CATALINA_HOME\conf\moa-spss\trustProfiles)
+ kopieren und dabei die vorhandenen gleichnamigen Zertifikate
+ überschreiben), also z.B: Kopieren des Inhalts von
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles\
+ MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten nach
+ CATALINA_HOME\conf\moa-spss\trustProfiles\
+ MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten usw.
+
+14.Starten Sie den Tomcat neu, achten Sie auf eventuelle Fehlermeldungen im
+ Logging von MOA ID beim Einlesen der erneuerten Konfiguration.
+
+...............................................................................
+B.3 Durchführung eines Updates von einer älteren Version
+...............................................................................
+
+Bitte führen Sie eine Neuinstallation von MOA ID laut Handbuch durch und passen
+Sie die mitgelieferte Musterkonfiguration entsprechend Ihren Bedürfnissen unter
+Zuhilfenahme Ihrer bisherigen Konfiguration an.
+
diff --git a/id/readme_1.4.3.txt b/id/readme_1.4.3.txt
new file mode 100644
index 000000000..bb60d16dd
--- /dev/null
+++ b/id/readme_1.4.3.txt
@@ -0,0 +1,234 @@
+===============================================================================
+MOA ID Version 1.4.3 - Wichtige Informationen zur Installation
+===============================================================================
+
+-------------------------------------------------------------------------------
+A. Neuerungen/Änderungen
+-------------------------------------------------------------------------------
+
+Mit MOA ID Version 1.4.3 wurden folgende Neuerungen eingeführt, die jetzt
+erstmals in der Veröffentlichung enthalten sind (siehe auch history.txt im
+gleichen Verzeichnis):
+
+- Anzeigetransformationen arbeiten nun auch mit BDC hotSign 2.0 zusammen.
+
+- IAIK Libraries aktualisiert:
+ iaik-cms: Version 4.01_MOA
+ iaik-moa: Version 1.23
+ iaik-ecc: Version 2.16
+
+- MOA SP/SS 1.4.3 verwendet einen neuen Konfigurationsparameter PermitFileURIs,
+ welcher file-URIs erlaubt oder blockiert. Genauere Informationen befinden sich
+ im MOA SP/SS Handbook.
+ (http://moa-idspss.egovlabs.gv.at/moa-spss-1.4.3/doc/handbook/config/config.html).
+
+-------------------------------------------------------------------------------
+B. Durchführung eines Updates
+-------------------------------------------------------------------------------
+
+Es wird generell eine Neuinstallation lt. Handbuch empfohlen! Dennoch ist auch
+eine Aktualisierung bestehender Installationen möglich.
+
+...............................................................................
+B.1 Durchführung eines Updates von Version 1.4.1 oder 1.4.2 (incl. beta 1)
+...............................................................................
+
+1. Stoppen Sie den Tomcat, in dem Ihre bisherige Installation betrieben wird.
+ Fertigen Sie eine Sicherungskopie Ihrer kompletten Tomcat-Installation an.
+
+2. Entpacken Sie die Distribution von MOA ID Auth (moa-id-auth-1.4.3.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_AUTH_INST
+ bezeichnet.
+
+3. Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Auth
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/webapps,
+ wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-auth.war als
+ auch das komplette Verzeichnis moa-id-auth.
+
+4. Kopieren Sie die Datei MOA_ID_AUTH_INST/moa-id-auth.war nach
+ CATALINA_HOME_ID/webapps.
+
+5. Kopieren Sie die vier Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/transforms in das Verzeichnis transforms Ihres
+ Stammverzeichnisses für die MOA ID Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_ID/conf/moa-id; in weiterer Folge wird
+ davon ausgegangen).
+
+6. Kopieren Sie die vier Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-spss/profiles in das Verzeichnis profiles Ihres
+ Stammverzeichnisses für die MOA SPSS Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_SPSS/conf/moa-spss, wobei
+ CATALINA_HOME_SPSS für das Basisverzeichnis der Tomcat-Installation
+ für MOA SPSS steht; wenn Sie MOA SPSS nicht als eigenes Webservice
+ betreiben, sondern es von MOA ID über die API-Schnittstelle angesprochen
+ wird, lautet dieses Stammverzeichnis für gewöhnlich
+ CATALINA_HOME_ID/conf/moa-spss.
+
+7. Sichern Sie ihre MOA-ID Konfigurationsdatei. Kopieren Sie die
+ Beispielkonfigurationsdateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/SampleMOA*.xml nach
+ CATALINA_HOME_ID/conf/moa-id.
+ Verwenden Sie in Ihrer Installation bereits die Vollmachtenprüfung, so
+ verschieben Sie bitte in der MOA-ID Installationsdatei das Element
+ <CompatibilityMode> innerhalb des Konfigurationsteiles für die berufliche
+ Parteienvertreung (ParepSpecificParameters) unter das Element
+ ApplicationSpecificParameters.
+
+8. Starten Sie den Tomcat neu, achten Sie auf eventuelle Fehlermeldungen im
+ Logging von MOA ID beim Einlesen der erneuerten Konfiguration.
+
+...............................................................................
+B.2 Durchführung eines Updates von Version 1.3.1, 1.3.2 oder 1.3.3
+...............................................................................
+
+1. Stoppen Sie den Tomcat, in dem Ihre bisherige Installation betrieben wird.
+ Fertigen Sie eine Sicherungskopie Ihrer kompletten Tomcat-Installation an.
+
+2. Entpacken Sie die Distribution von MOA ID Auth (moa-id-auth-1.4.3.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_AUTH_INST
+ bezeichnet.
+
+3. Erstellen Sie eine Sicherungskopie aller "iaik*.jar"-Dateien im Verzeichnis
+ JAVA_HOME\jre\lib\ext und löschen Sie diese Dateien danach.
+
+4. Kopieren Sie alle Dateien aus dem Verzeichnis MOA_ID_INST_AUTH\ext in das
+ Verzeichnis JAVA_HOME\jre\lib\ext.
+
+5. Erstellen Sie eine Sicherungskopie aller Dateien im Verzeichnis
+ CATALINA_HOME\common\endorsed und löschen Sie die dort eventuell vorhandene
+ Dateien xmlParserAPIs.jar
+
+6. Kopieren Sie die Dateien aus dem Verzeichnis MOA_ID_INST_AUTH\endorsed
+ in das Verzeichnis CATALINA_HOME\common\endorsed. Überschreiben Sie dabei
+ etwaige gleichnamige Dateien.
+
+7. Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Auth
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/webapps,
+ wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-auth.war als
+ auch das komplette Verzeichnis moa-id-auth.
+
+8. Kopieren Sie die Datei MOA_ID_AUTH_INST/moa-id-auth.war nach
+ CATALINA_HOME_ID/webapps.
+
+9. Kopieren Sie die vier Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/transforms in das Verzeichnis transforms Ihres
+ Stammverzeichnisses für die MOA ID Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_ID/conf/moa-id; in weiterer Folge wird
+ davon ausgegangen).
+
+10.Kopieren Sie die vier Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-spss/profiles in das Verzeichnis profiles Ihres
+ Stammverzeichnisses für die MOA SPSS Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_SPSS/conf/moa-spss, wobei
+ CATALINA_HOME_SPSS für das Basisverzeichnis der Tomcat-Installation
+ für MOA SPSS steht; wenn Sie MOA SPSS nicht als eigenes Webservice
+ betreiben, sondern es von MOA ID über die API-Schnittstelle angesprochen
+ wird, lautet dieses Stammverzeichnis für gewöhnlich
+ CATALINA_HOME_ID/conf/moa-spss; in weiterer Folge wird von letzterer
+ Variante ausgegangen).
+
+11.Update des Cert-Stores.
+ Kopieren Sie den Inhalt des Verzeichnisses
+ MOA_ID_INST_AUTH\conf\moa-spss\certstore in das Verzeichnis
+ CATALINA_HOME\conf\moa-spss\certstore. Wenn Sie gefragt werden, ob Sie
+ vorhandene Dateien oder Unterverzeichnisse überschreiben sollen, dann
+ bejahen sie das.
+
+12.Sollen zusätzliche Templates für ältere Bürgerkartenumgebungen aktiviert
+ werden, öffnen Sie die XML-Konfiguration von MOA ID (für gewöhnlich finden
+ Sie diese XML-Datei direkt im Stammverzeichnis für die MOA ID Konfiguration,
+ z.B. CATALINA_HOME_ID/conf/moa-id/SampleMOAIDConfiguration.xml); führen Sie
+ folgende Modifikationen an der XML-Konfiguration durch:
+
+ a. Ändern Sie die applikationsübergreifende Konfiguration der AuthBlock
+ Transformationen. Sie finden diese Konfiguration im XML-Element
+ /MOA-IDConfiguration/AuthComponent/SecurityLayer. Fügen Sie zusätzlich zum
+ bisherigen Inhalt dieses Elements (für gewöhnlich ein Element
+ TransformsInfo, dessen Attribut filname den Wert
+ transforms/TransformsInfoAuthBlockText.xml aufweist) ein Element
+ TransformsInfo an, dessen Attribut filename auf die Datei für ältere BKU
+ zeigt. Sie können auch auf die vordefinierten Elemente aus den
+ Musterkonfigurationen dieser Distribution (
+ MOA_ID_AUTH_INST/conf/moa-id/SampleMOAIDConfiguration.xml) zurückgreifen.
+
+ b. Fügen Sie Profilbezeichner für die Transformationsprofile in der
+ Konfiguration für MOA SP an. Sie finden diesen Bezeichner im XML-
+ Element /MOA-IDConfiguration/AuthComponent/MOA-SP/VerifyAuthBlock.
+ Hängen Sie ein Element VerifyTransformsInfoProfileID an, das für die Über-
+ prüfung der Transformation älterer BKU vorgesehen ist.
+ Siehe auch Inhalt des Elements VerifyAuthBlock aus der Musterkonfiguration
+ dieser Distribution (
+ MOA_ID_AUTH_INST/conf/moa-id/SampleMOAIDConfiguration.xml).
+
+ c. Ändern Sie gegebenenfalls die applikationsspezifische Konfiguration
+ der Authblock-Tranformationen. Führen Sie dazu die folgende Tätigkeit
+ für jedes XML-Element /MOA-IDConfiguration/OnlineApplicaton/AuthComponent
+ durch: Fügen Sie zusätzlich zu einem bestehenden Element TransformsInfo
+ ein Elemnet TransformsInfo an, das die Transformation für ältere BKU
+ enthält - gleich wie dies bereits in Schritt a. durchgeführt wurde (wenn
+ Sie dieses Element nicht vorfinden, oder es auskommentiert ist, muss
+ Schritt c. nicht durchgeführt werden).
+
+ Öffnen Sie die XML-Konfiguration von MOA SPSS (für gewöhnlich finden Sie
+ XML-Datei direkt im Stammverzeichnisses für die MOA SPSS Konfiguration, z.B.
+ CATALINA_HOME_ID/conf/moa-spss/SampleMOASPSSConfiguration.xml); führen Sie
+ folgende Modifikationen an der XML-Konfiguration durch:
+
+ a. Ändern Sie die konfigurierten Profile für die zulässigen Transformationen
+ über die signierten Daten. Sie finden diese Profile am Ende der XML-Konfi-
+ guration von MOA SPSS (Elemente des Namens
+ cfg:VerifyTransformsInfoProfile). Fügen Sie zusätzlich zu den vorkommenden
+ Elementen dieses Namens (für gewöhnlich zwei Elemente) zwei weitere
+ Elemente dieses Namens hinzu, die die Profile für die älteren Bürger-
+ kartenumgebungen aufnehmen - diese sind durch den Namensteil "_deprecated"
+ gekennzeichnet (siehe auch Musterkonfigurationen dieser Distribution
+ MOA_ID_AUTH_INST/conf/moa-spss/SampleMOASPSSConfiguration.xml).
+
+13.Update der Trust-Profile. Achten sie bei Case-sensitiven Betriebssystemen auf
+ die Profilbezeichnungen. Aus trustprofiles wurde trustProfiles.
+ Wenn Sie Ihre alten Trust-Profile durch die neuen ersetzen wollen, dann gehen
+ Sie vor, wie in Punkt a). Wenn Sie Ihre eigenen Trust-Profile beibehalten
+ wollen, dann gehen Sie vor, wie in Punkt b).
+
+ a. Gehen Sie wie folgt vor, um die Trust-Profile auszutauschen:
+
+ 1) Löschen Sie das Verzeichnis CATALINA_HOME\conf\moa-spss\trustprofiles.
+ 2) Kopieren Sie das Verzeichnis
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles in das Verzeichnis
+ CATALINA_HOME\conf\moa-spss.
+
+ b. Falls Sie Ihre alten Trust-Profile beibehalten wollen, gehen Sie wie folgt
+ vor, um die Profile auf den aktuellen Stand zu bringen:
+
+ 1) Benennen Sie ein eventuell vorhandenes Verzeichnis trustprofiles in
+ trustProfiles um (vergessen Sie nicht, diese Änderung in Ihrer MOA-SP/SS
+ Konfigurationsdatei ebenfalls zu berücksichtigen und benennen Sie dort
+ alle gleichartigen Vorkommen von trustprofiles in trustProfiles um)
+
+ 2) Ergänzen Sie ihre Trustprofile durch alle Zertifikate aus den
+ entsprechenden Profilen im Verzeichnis
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles, die nicht in Ihren
+ Profilen enthalten sind. Am einfachsten ist es, wenn Sie den Inhalt der
+ einzelnen Profile aus der Distribution (
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles) in die entsprechenden
+ Profile Ihrer Installation (CATALINA_HOME\conf\moa-spss\trustProfiles)
+ kopieren und dabei die vorhandenen gleichnamigen Zertifikate
+ überschreiben), also z.B: Kopieren des Inhalts von
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles\
+ MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten nach
+ CATALINA_HOME\conf\moa-spss\trustProfiles\
+ MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten usw.
+
+14.Starten Sie den Tomcat neu, achten Sie auf eventuelle Fehlermeldungen im
+ Logging von MOA ID beim Einlesen der erneuerten Konfiguration.
+
+...............................................................................
+B.3 Durchführung eines Updates von einer älteren Version
+...............................................................................
+
+Bitte führen Sie eine Neuinstallation von MOA ID laut Handbuch durch und passen
+Sie die mitgelieferte Musterkonfiguration entsprechend Ihren Bedürfnissen unter
+Zuhilfenahme Ihrer bisherigen Konfiguration an.
+
diff --git a/id/readme_1.4.4.txt b/id/readme_1.4.4.txt
new file mode 100644
index 000000000..4ac757250
--- /dev/null
+++ b/id/readme_1.4.4.txt
@@ -0,0 +1,233 @@
+===============================================================================
+MOA ID Version 1.4.4 - Wichtige Informationen zur Installation
+===============================================================================
+
+-------------------------------------------------------------------------------
+A. Neuerungen/Änderungen
+-------------------------------------------------------------------------------
+
+Mit MOA ID Version 1.4.4 wurden folgende Neuerungen eingeführt, die jetzt
+erstmals in der Veröffentlichung enthalten sind (siehe auch history.txt im
+gleichen Verzeichnis):
+
+- Bei der beruflichen Parteienvertretung wurde das Stammzahlenregister in den
+ Beispielkonfigurationen vorkonfiguriert.
+
+- MOA-ID erlaubt ab sofort Load-Balancing. Dies wird durch die Konfigurations-
+ möglichkeit der Source-ID für das SAML-Artifact gewährleistet. Das Border-
+ Gateway kann dann anhand dieser Kennung an den zuständigen Server zur Abholung
+ der SAML-Assertion weiterleiten. Über den Konfigurationsparameter
+ <GenericConfiguration name="AuthenticationServer.SourceID" value="Cluster-A"/>
+ kann die authURL bei der Kodierung des SAML-Artifakts durch eine fix
+ definierte URI (z.B. "Cluster-A") ersetzt werden.
+
+-------------------------------------------------------------------------------
+B. Durchführung eines Updates
+-------------------------------------------------------------------------------
+
+Es wird generell eine Neuinstallation lt. Handbuch empfohlen! Dennoch ist auch
+eine Aktualisierung bestehender Installationen möglich.
+
+...............................................................................
+B.1 Durchführung eines Updates von Version 1.4.1 oder 1.4.2 (incl. beta 1)
+...............................................................................
+
+1. Stoppen Sie den Tomcat, in dem Ihre bisherige Installation betrieben wird.
+ Fertigen Sie eine Sicherungskopie Ihrer kompletten Tomcat-Installation an.
+
+2. Entpacken Sie die Distribution von MOA ID Auth (moa-id-auth-1.4.4.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_AUTH_INST
+ bezeichnet.
+
+3. Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Auth
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/webapps,
+ wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-auth.war als
+ auch das komplette Verzeichnis moa-id-auth.
+
+4. Kopieren Sie die Datei MOA_ID_AUTH_INST/moa-id-auth.war nach
+ CATALINA_HOME_ID/webapps.
+
+5. Kopieren Sie die vier Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/transforms in das Verzeichnis transforms Ihres
+ Stammverzeichnisses für die MOA ID Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_ID/conf/moa-id; in weiterer Folge wird
+ davon ausgegangen).
+
+6. Kopieren Sie die vier Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-spss/profiles in das Verzeichnis profiles Ihres
+ Stammverzeichnisses für die MOA SPSS Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_SPSS/conf/moa-spss, wobei
+ CATALINA_HOME_SPSS für das Basisverzeichnis der Tomcat-Installation
+ für MOA SPSS steht; wenn Sie MOA SPSS nicht als eigenes Webservice
+ betreiben, sondern es von MOA ID über die API-Schnittstelle angesprochen
+ wird, lautet dieses Stammverzeichnis für gewöhnlich
+ CATALINA_HOME_ID/conf/moa-spss.
+
+7. Sichern Sie ihre MOA-ID Konfigurationsdatei. Kopieren Sie die
+ Beispielkonfigurationsdateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/SampleMOA*.xml nach
+ CATALINA_HOME_ID/conf/moa-id.
+ Verwenden Sie in Ihrer Installation bereits die Vollmachtenprüfung, so
+ verschieben Sie bitte in der MOA-ID Installationsdatei das Element
+ <CompatibilityMode> innerhalb des Konfigurationsteiles für die berufliche
+ Parteienvertreung (ParepSpecificParameters) unter das Element
+ ApplicationSpecificParameters.
+
+8. Starten Sie den Tomcat neu, achten Sie auf eventuelle Fehlermeldungen im
+ Logging von MOA ID beim Einlesen der erneuerten Konfiguration.
+
+...............................................................................
+B.2 Durchführung eines Updates von Version 1.3.1, 1.3.2 oder 1.3.3
+...............................................................................
+
+1. Stoppen Sie den Tomcat, in dem Ihre bisherige Installation betrieben wird.
+ Fertigen Sie eine Sicherungskopie Ihrer kompletten Tomcat-Installation an.
+
+2. Entpacken Sie die Distribution von MOA ID Auth (moa-id-auth-1.4.4.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_AUTH_INST
+ bezeichnet.
+
+3. Erstellen Sie eine Sicherungskopie aller "iaik*.jar"-Dateien im Verzeichnis
+ JAVA_HOME\jre\lib\ext und löschen Sie diese Dateien danach.
+
+4. Kopieren Sie alle Dateien aus dem Verzeichnis MOA_ID_INST_AUTH\ext in das
+ Verzeichnis JAVA_HOME\jre\lib\ext.
+
+5. Erstellen Sie eine Sicherungskopie aller Dateien im Verzeichnis
+ CATALINA_HOME\common\endorsed und löschen Sie die dort eventuell vorhandene
+ Dateien xmlParserAPIs.jar
+
+6. Kopieren Sie die Dateien aus dem Verzeichnis MOA_ID_INST_AUTH\endorsed
+ in das Verzeichnis CATALINA_HOME\common\endorsed. Überschreiben Sie dabei
+ etwaige gleichnamige Dateien.
+
+7. Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Auth
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/webapps,
+ wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-auth.war als
+ auch das komplette Verzeichnis moa-id-auth.
+
+8. Kopieren Sie die Datei MOA_ID_AUTH_INST/moa-id-auth.war nach
+ CATALINA_HOME_ID/webapps.
+
+9. Kopieren Sie die vier Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/transforms in das Verzeichnis transforms Ihres
+ Stammverzeichnisses für die MOA ID Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_ID/conf/moa-id; in weiterer Folge wird
+ davon ausgegangen).
+
+10.Kopieren Sie die vier Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-spss/profiles in das Verzeichnis profiles Ihres
+ Stammverzeichnisses für die MOA SPSS Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_SPSS/conf/moa-spss, wobei
+ CATALINA_HOME_SPSS für das Basisverzeichnis der Tomcat-Installation
+ für MOA SPSS steht; wenn Sie MOA SPSS nicht als eigenes Webservice
+ betreiben, sondern es von MOA ID über dmie API-Schnittstelle angesprochen
+ wird, lautet dieses Stammverzeichnis für gewöhnlich
+ CATALINA_HOME_ID/conf/moa-spss; in weiterer Folge wird von letzterer
+ Variante ausgegangen).
+
+11.Update des Cert-Stores.
+ Kopieren Sie den Inhalt des Verzeichnisses
+ MOA_ID_INST_AUTH\conf\moa-spss\certstore in das Verzeichnis
+ CATALINA_HOME\conf\moa-spss\certstore. Wenn Sie gefragt werden, ob Sie
+ vorhandene Dateien oder Unterverzeichnisse überschreiben sollen, dann
+ bejahen sie das.
+
+12.Sollen zusätzliche Templates für ältere Bürgerkartenumgebungen aktiviert
+ werden, öffnen Sie die XML-Konfiguration von MOA ID (für gewöhnlich finden
+ Sie diese XML-Datei direkt im Stammverzeichnis für die MOA ID Konfiguration,
+ z.B. CATALINA_HOME_ID/conf/moa-id/SampleMOAIDConfiguration.xml); führen Sie
+ folgende Modifikationen an der XML-Konfiguration durch:
+
+ a. Ändern Sie die applikationsübergreifende Konfiguration der AuthBlock
+ Transformationen. Sie finden diese Konfiguration im XML-Element
+ /MOA-IDConfiguration/AuthComponent/SecurityLayer. Fügen Sie zusätzlich zum
+ bisherigen Inhalt dieses Elements (für gewöhnlich ein Element
+ TransformsInfo, dessen Attribut filname den Wert
+ transforms/TransformsInfoAuthBlockText.xml aufweist) ein Element
+ TransformsInfo an, dessen Attribut filename auf die Datei für ältere BKU
+ zeigt. Sie können auch auf die vordefinierten Elemente aus den
+ Musterkonfigurationen dieser Distribution (
+ MOA_ID_AUTH_INST/conf/moa-id/SampleMOAIDConfiguration.xml) zurückgreifen.
+
+ b. Fügen Sie Profilbezeichner für die Transformationsprofile in der
+ Konfiguration für MOA SP an. Sie finden diesen Bezeichner im XML-
+ Element /MOA-IDConfiguration/AuthComponent/MOA-SP/VerifyAuthBlock.
+ Hängen Sie ein Element VerifyTransformsInfoProfileID an, das für die Über-
+ prüfung der Transformation älterer BKU vorgesehen ist.
+ Siehe auch Inhalt des Elements VerifyAuthBlock aus der Musterkonfiguration
+ dieser Distribution (
+ MOA_ID_AUTH_INST/conf/moa-id/SampleMOAIDConfiguration.xml).
+
+ c. Ändern Sie gegebenenfalls die applikationsspezifische Konfiguration
+ der Authblock-Tranformationen. Führen Sie dazu die folgende Tätigkeit
+ für jedes XML-Element /MOA-IDConfiguration/OnlineApplicaton/AuthComponent
+ durch: Fügen Sie zusätzlich zu einem bestehenden Element TransformsInfo
+ ein Elemnet TransformsInfo an, das die Transformation für ältere BKU
+ enthält - gleich wie dies bereits in Schritt a. durchgeführt wurde (wenn
+ Sie dieses Element nicht vorfinden, oder es auskommentiert ist, muss
+ Schritt c. nicht durchgeführt werden).
+
+ Öffnen Sie die XML-Konfiguration von MOA SPSS (für gewöhnlich finden Sie
+ XML-Datei direkt im Stammverzeichnisses für die MOA SPSS Konfiguration, z.B.
+ CATALINA_HOME_ID/conf/moa-spss/SampleMOASPSSConfiguration.xml); führen Sie
+ folgende Modifikationen an der XML-Konfiguration durch:
+
+ a. Ändern Sie die konfigurierten Profile für die zulässigen Transformationen
+ über die signierten Daten. Sie finden diese Profile am Ende der XML-Konfi-
+ guration von MOA SPSS (Elemente des Namens
+ cfg:VerifyTransformsInfoProfile). Fügen Sie zusätzlich zu den vorkommenden
+ Elementen dieses Namens (für gewöhnlich zwei Elemente) zwei weitere
+ Elemente dieses Namens hinzu, die die Profile für die älteren Bürger-
+ kartenumgebungen aufnehmen - diese sind durch den Namensteil "_deprecated"
+ gekennzeichnet (siehe auch Musterkonfigurationen dieser Distribution
+ MOA_ID_AUTH_INST/conf/moa-spss/SampleMOASPSSConfiguration.xml).
+
+13.Update der Trust-Profile. Achten sie bei Case-sensitiven Betriebssystemen auf
+ die Profilbezeichnungen. Aus trustprofiles wurde trustProfiles.
+ Wenn Sie Ihre alten Trust-Profile durch die neuen ersetzen wollen, dann gehen
+ Sie vor, wie in Punkt a). Wenn Sie Ihre eigenen Trust-Profile beibehalten
+ wollen, dann gehen Sie vor, wie in Punkt b).
+
+ a. Gehen Sie wie folgt vor, um die Trust-Profile auszutauschen:
+
+ 1) Löschen Sie das Verzeichnis CATALINA_HOME\conf\moa-spss\trustprofiles.
+ 2) Kopieren Sie das Verzeichnis
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles in das Verzeichnis
+ CATALINA_HOME\conf\moa-spss.
+
+ b. Falls Sie Ihre alten Trust-Profile beibehalten wollen, gehen Sie wie folgt
+ vor, um die Profile auf den aktuellen Stand zu bringen:
+
+ 1) Benennen Sie ein eventuell vorhandenes Verzeichnis trustprofiles in
+ trustProfiles um (vergessen Sie nicht, diese Änderung in Ihrer MOA-SP/SS
+ Konfigurationsdatei ebenfalls zu berücksichtigen und benennen Sie dort
+ alle gleichartigen Vorkommen von trustprofiles in trustProfiles um)
+
+ 2) Ergänzen Sie ihre Trustprofile durch alle Zertifikate aus den
+ entsprechenden Profilen im Verzeichnis
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles, die nicht in Ihren
+ Profilen enthalten sind. Am einfachsten ist es, wenn Sie den Inhalt der
+ einzelnen Profile aus der Distribution (
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles) in die entsprechenden
+ Profile Ihrer Installation (CATALINA_HOME\conf\moa-spss\trustProfiles)
+ kopieren und dabei die vorhandenen gleichnamigen Zertifikate
+ überschreiben), also z.B: Kopieren des Inhalts von
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles\
+ MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten nach
+ CATALINA_HOME\conf\moa-spss\trustProfiles\
+ MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten usw.
+
+14.Starten Sie den Tomcat neu, achten Sie auf eventuelle Fehlermeldungen im
+ Logging von MOA ID beim Einlesen der erneuerten Konfiguration.
+
+...............................................................................
+B.3 Durchführung eines Updates von einer älteren Version
+...............................................................................
+
+Bitte führen Sie eine Neuinstallation von MOA ID laut Handbuch durch und passen
+Sie die mitgelieferte Musterkonfiguration entsprechend Ihren Bedürfnissen unter
+Zuhilfenahme Ihrer bisherigen Konfiguration an.
+
diff --git a/id/readme_1.4.5.txt b/id/readme_1.4.5.txt
new file mode 100644
index 000000000..f75bc2c01
--- /dev/null
+++ b/id/readme_1.4.5.txt
@@ -0,0 +1,254 @@
+===============================================================================
+MOA ID Version 1.4.5 - Wichtige Informationen zur Installation
+===============================================================================
+
+-------------------------------------------------------------------------------
+A. Neuerungen/Änderungen
+-------------------------------------------------------------------------------
+
+Mit MOA ID Version 1.4.5 wurden folgende Neuerungen eingeführt, die jetzt
+erstmals in der Veröffentlichung enthalten sind (siehe auch history.txt im
+gleichen Verzeichnis):
+
+- JSSE Abhängigkeit wurde entfernt (Fixed Bug #335)
+- Neue Errorpages
+- Keine Ausgabe der Stammzahl im Log-Level Debug (war zuvor für Testkarten möglich)
+-------------------------------------------------------------------------------
+B. Durchführung eines Updates
+-------------------------------------------------------------------------------
+
+Es wird generell eine Neuinstallation lt. Handbuch empfohlen! Dennoch ist auch
+eine Aktualisierung bestehender Installationen möglich.
+
+...............................................................................
+B.1 Durchführung eines Updates von Version 1.4.3 oder 1.4.4
+...............................................................................
+
+1. Stoppen Sie den Tomcat, in dem Ihre bisherige Installation betrieben wird.
+ Fertigen Sie eine Sicherungskopie Ihrer kompletten Tomcat-Installation an.
+
+2. Entpacken Sie die Distribution von MOA ID Auth (moa-id-auth-1.4.5.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_AUTH_INST
+ bezeichnet.
+
+3. Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Auth
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/webapps,
+ wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-auth.war als
+ auch das komplette Verzeichnis moa-id-auth.
+
+4. Kopieren Sie die Datei MOA_ID_AUTH_INST/moa-id-auth.war nach
+ CATALINA_HOME_ID/webapps.
+
+5. Erstellen Sie eine Sicherungskopie aller "iaik*.jar"-Dateien im Verzeichnis
+ JAVA_HOME\jre\lib\ext und löschen Sie diese Dateien danach.
+
+6. Kopieren Sie alle Dateien aus dem Verzeichnis MOA_ID_INST_AUTH\ext in das
+ Verzeichnis JAVA_HOME\jre\lib\ext.
+
+7. Starten Sie den Tomcat neu, achten Sie auf eventuelle Fehlermeldungen im
+ Logging von MOA ID beim Einlesen der erneuerten Konfiguration.
+
+...............................................................................
+B.2 Durchführung eines Updates von Version 1.4.1 oder 1.4.2 (incl. beta 1)
+...............................................................................
+
+1. Stoppen Sie den Tomcat, in dem Ihre bisherige Installation betrieben wird.
+ Fertigen Sie eine Sicherungskopie Ihrer kompletten Tomcat-Installation an.
+
+2. Entpacken Sie die Distribution von MOA ID Auth (moa-id-auth-1.4.5.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_AUTH_INST
+ bezeichnet.
+
+3. Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Auth
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/webapps,
+ wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-auth.war als
+ auch das komplette Verzeichnis moa-id-auth.
+
+4. Kopieren Sie die Datei MOA_ID_AUTH_INST/moa-id-auth.war nach
+ CATALINA_HOME_ID/webapps.
+
+5. Kopieren Sie die vier Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/transforms in das Verzeichnis transforms Ihres
+ Stammverzeichnisses für die MOA ID Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_ID/conf/moa-id; in weiterer Folge wird
+ davon ausgegangen).
+
+6. Kopieren Sie die vier Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-spss/profiles in das Verzeichnis profiles Ihres
+ Stammverzeichnisses für die MOA SPSS Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_SPSS/conf/moa-spss, wobei
+ CATALINA_HOME_SPSS für das Basisverzeichnis der Tomcat-Installation
+ für MOA SPSS steht; wenn Sie MOA SPSS nicht als eigenes Webservice
+ betreiben, sondern es von MOA ID über die API-Schnittstelle angesprochen
+ wird, lautet dieses Stammverzeichnis für gewöhnlich
+ CATALINA_HOME_ID/conf/moa-spss.
+
+7. Sichern Sie ihre MOA-ID Konfigurationsdatei. Kopieren Sie die
+ Beispielkonfigurationsdateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/SampleMOA*.xml nach
+ CATALINA_HOME_ID/conf/moa-id.
+ Verwenden Sie in Ihrer Installation bereits die Vollmachtenprüfung, so
+ verschieben Sie bitte in der MOA-ID Installationsdatei das Element
+ <CompatibilityMode> innerhalb des Konfigurationsteiles für die berufliche
+ Parteienvertreung (ParepSpecificParameters) unter das Element
+ ApplicationSpecificParameters.
+
+8. Starten Sie den Tomcat neu, achten Sie auf eventuelle Fehlermeldungen im
+ Logging von MOA ID beim Einlesen der erneuerten Konfiguration.
+
+...............................................................................
+B.3 Durchführung eines Updates von Version 1.3.1, 1.3.2 oder 1.3.3
+...............................................................................
+
+1. Stoppen Sie den Tomcat, in dem Ihre bisherige Installation betrieben wird.
+ Fertigen Sie eine Sicherungskopie Ihrer kompletten Tomcat-Installation an.
+
+2. Entpacken Sie die Distribution von MOA ID Auth (moa-id-auth-1.4.5.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_AUTH_INST
+ bezeichnet.
+
+3. Erstellen Sie eine Sicherungskopie aller "iaik*.jar"-Dateien im Verzeichnis
+ JAVA_HOME\jre\lib\ext und löschen Sie diese Dateien danach.
+
+4. Kopieren Sie alle Dateien aus dem Verzeichnis MOA_ID_INST_AUTH\ext in das
+ Verzeichnis JAVA_HOME\jre\lib\ext.
+
+5. Erstellen Sie eine Sicherungskopie aller Dateien im Verzeichnis
+ CATALINA_HOME\common\endorsed und löschen Sie die dort eventuell vorhandene
+ Dateien xmlParserAPIs.jar
+
+6. Kopieren Sie die Dateien aus dem Verzeichnis MOA_ID_INST_AUTH\endorsed
+ in das Verzeichnis CATALINA_HOME\common\endorsed. Überschreiben Sie dabei
+ etwaige gleichnamige Dateien.
+
+7. Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Auth
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/webapps,
+ wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-auth.war als
+ auch das komplette Verzeichnis moa-id-auth.
+
+8. Kopieren Sie die Datei MOA_ID_AUTH_INST/moa-id-auth.war nach
+ CATALINA_HOME_ID/webapps.
+
+9. Kopieren Sie die vier Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/transforms in das Verzeichnis transforms Ihres
+ Stammverzeichnisses für die MOA ID Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_ID/conf/moa-id; in weiterer Folge wird
+ davon ausgegangen).
+
+10.Kopieren Sie die vier Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-spss/profiles in das Verzeichnis profiles Ihres
+ Stammverzeichnisses für die MOA SPSS Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_SPSS/conf/moa-spss, wobei
+ CATALINA_HOME_SPSS für das Basisverzeichnis der Tomcat-Installation
+ für MOA SPSS steht; wenn Sie MOA SPSS nicht als eigenes Webservice
+ betreiben, sondern es von MOA ID über dmie API-Schnittstelle angesprochen
+ wird, lautet dieses Stammverzeichnis für gewöhnlich
+ CATALINA_HOME_ID/conf/moa-spss; in weiterer Folge wird von letzterer
+ Variante ausgegangen).
+
+11.Update des Cert-Stores.
+ Kopieren Sie den Inhalt des Verzeichnisses
+ MOA_ID_INST_AUTH\conf\moa-spss\certstore in das Verzeichnis
+ CATALINA_HOME\conf\moa-spss\certstore. Wenn Sie gefragt werden, ob Sie
+ vorhandene Dateien oder Unterverzeichnisse überschreiben sollen, dann
+ bejahen sie das.
+
+12.Sollen zusätzliche Templates für ältere Bürgerkartenumgebungen aktiviert
+ werden, öffnen Sie die XML-Konfiguration von MOA ID (für gewöhnlich finden
+ Sie diese XML-Datei direkt im Stammverzeichnis für die MOA ID Konfiguration,
+ z.B. CATALINA_HOME_ID/conf/moa-id/SampleMOAIDConfiguration.xml); führen Sie
+ folgende Modifikationen an der XML-Konfiguration durch:
+
+ a. Ändern Sie die applikationsübergreifende Konfiguration der AuthBlock
+ Transformationen. Sie finden diese Konfiguration im XML-Element
+ /MOA-IDConfiguration/AuthComponent/SecurityLayer. Fügen Sie zusätzlich zum
+ bisherigen Inhalt dieses Elements (für gewöhnlich ein Element
+ TransformsInfo, dessen Attribut filname den Wert
+ transforms/TransformsInfoAuthBlockText.xml aufweist) ein Element
+ TransformsInfo an, dessen Attribut filename auf die Datei für ältere BKU
+ zeigt. Sie können auch auf die vordefinierten Elemente aus den
+ Musterkonfigurationen dieser Distribution (
+ MOA_ID_AUTH_INST/conf/moa-id/SampleMOAIDConfiguration.xml) zurückgreifen.
+
+ b. Fügen Sie Profilbezeichner für die Transformationsprofile in der
+ Konfiguration für MOA SP an. Sie finden diesen Bezeichner im XML-
+ Element /MOA-IDConfiguration/AuthComponent/MOA-SP/VerifyAuthBlock.
+ Hängen Sie ein Element VerifyTransformsInfoProfileID an, das für die Über-
+ prüfung der Transformation älterer BKU vorgesehen ist.
+ Siehe auch Inhalt des Elements VerifyAuthBlock aus der Musterkonfiguration
+ dieser Distribution (
+ MOA_ID_AUTH_INST/conf/moa-id/SampleMOAIDConfiguration.xml).
+
+ c. Ändern Sie gegebenenfalls die applikationsspezifische Konfiguration
+ der Authblock-Tranformationen. Führen Sie dazu die folgende Tätigkeit
+ für jedes XML-Element /MOA-IDConfiguration/OnlineApplicaton/AuthComponent
+ durch: Fügen Sie zusätzlich zu einem bestehenden Element TransformsInfo
+ ein Elemnet TransformsInfo an, das die Transformation für ältere BKU
+ enthält - gleich wie dies bereits in Schritt a. durchgeführt wurde (wenn
+ Sie dieses Element nicht vorfinden, oder es auskommentiert ist, muss
+ Schritt c. nicht durchgeführt werden).
+
+ Öffnen Sie die XML-Konfiguration von MOA SPSS (für gewöhnlich finden Sie
+ XML-Datei direkt im Stammverzeichnisses für die MOA SPSS Konfiguration, z.B.
+ CATALINA_HOME_ID/conf/moa-spss/SampleMOASPSSConfiguration.xml); führen Sie
+ folgende Modifikationen an der XML-Konfiguration durch:
+
+ a. Ändern Sie die konfigurierten Profile für die zulässigen Transformationen
+ über die signierten Daten. Sie finden diese Profile am Ende der XML-Konfi-
+ guration von MOA SPSS (Elemente des Namens
+ cfg:VerifyTransformsInfoProfile). Fügen Sie zusätzlich zu den vorkommenden
+ Elementen dieses Namens (für gewöhnlich zwei Elemente) zwei weitere
+ Elemente dieses Namens hinzu, die die Profile für die älteren Bürger-
+ kartenumgebungen aufnehmen - diese sind durch den Namensteil "_deprecated"
+ gekennzeichnet (siehe auch Musterkonfigurationen dieser Distribution
+ MOA_ID_AUTH_INST/conf/moa-spss/SampleMOASPSSConfiguration.xml).
+
+13.Update der Trust-Profile. Achten sie bei Case-sensitiven Betriebssystemen auf
+ die Profilbezeichnungen. Aus trustprofiles wurde trustProfiles.
+ Wenn Sie Ihre alten Trust-Profile durch die neuen ersetzen wollen, dann gehen
+ Sie vor, wie in Punkt a). Wenn Sie Ihre eigenen Trust-Profile beibehalten
+ wollen, dann gehen Sie vor, wie in Punkt b).
+
+ a. Gehen Sie wie folgt vor, um die Trust-Profile auszutauschen:
+
+ 1) Löschen Sie das Verzeichnis CATALINA_HOME\conf\moa-spss\trustprofiles.
+ 2) Kopieren Sie das Verzeichnis
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles in das Verzeichnis
+ CATALINA_HOME\conf\moa-spss.
+
+ b. Falls Sie Ihre alten Trust-Profile beibehalten wollen, gehen Sie wie folgt
+ vor, um die Profile auf den aktuellen Stand zu bringen:
+
+ 1) Benennen Sie ein eventuell vorhandenes Verzeichnis trustprofiles in
+ trustProfiles um (vergessen Sie nicht, diese Änderung in Ihrer MOA-SP/SS
+ Konfigurationsdatei ebenfalls zu berücksichtigen und benennen Sie dort
+ alle gleichartigen Vorkommen von trustprofiles in trustProfiles um)
+
+ 2) Ergänzen Sie ihre Trustprofile durch alle Zertifikate aus den
+ entsprechenden Profilen im Verzeichnis
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles, die nicht in Ihren
+ Profilen enthalten sind. Am einfachsten ist es, wenn Sie den Inhalt der
+ einzelnen Profile aus der Distribution (
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles) in die entsprechenden
+ Profile Ihrer Installation (CATALINA_HOME\conf\moa-spss\trustProfiles)
+ kopieren und dabei die vorhandenen gleichnamigen Zertifikate
+ überschreiben), also z.B: Kopieren des Inhalts von
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles\
+ MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten nach
+ CATALINA_HOME\conf\moa-spss\trustProfiles\
+ MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten usw.
+
+14.Starten Sie den Tomcat neu, achten Sie auf eventuelle Fehlermeldungen im
+ Logging von MOA ID beim Einlesen der erneuerten Konfiguration.
+
+...............................................................................
+B.4 Durchführung eines Updates von einer älteren Version
+...............................................................................
+
+Bitte führen Sie eine Neuinstallation von MOA ID laut Handbuch durch und passen
+Sie die mitgelieferte Musterkonfiguration entsprechend Ihren Bedürfnissen unter
+Zuhilfenahme Ihrer bisherigen Konfiguration an.
+
diff --git a/id/readme_1.4.6.txt b/id/readme_1.4.6.txt
new file mode 100644
index 000000000..8460d3880
--- /dev/null
+++ b/id/readme_1.4.6.txt
@@ -0,0 +1,302 @@
+===============================================================================
+MOA ID Version 1.4.6 - Wichtige Informationen zur Installation
+===============================================================================
+
+-------------------------------------------------------------------------------
+A. Neuerungen/Änderungen
+-------------------------------------------------------------------------------
+
+Mit MOA ID Version 1.4.6 wurden folgende Neuerungen eingeführt, die jetzt
+erstmals in der Veröffentlichung enthalten sind (siehe auch history.txt im
+gleichen Verzeichnis):
+
+- Fixed Bug #468 (https://egovlabs.gv.at/tracker/index.php?func=detail&aid=468&group_id=6&atid=105)
+
+-------------------------------------------------------------------------------
+B. Durchführung eines Updates
+-------------------------------------------------------------------------------
+
+Es wird generell eine Neuinstallation lt. Handbuch empfohlen! Dennoch ist auch
+eine Aktualisierung bestehender Installationen möglich.
+
+...............................................................................
+B.1 Durchführung eines Updates von Version 1.4.5
+...............................................................................
+
+1. Stoppen Sie den Tomcat, in dem Ihre bisherige Installation betrieben wird.
+ Fertigen Sie eine Sicherungskopie Ihrer kompletten Tomcat-Installation an.
+
+2. Entpacken Sie die Distribution von MOA ID Auth (moa-id-auth-1.4.6.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_AUTH_INST
+ bezeichnet.
+ Für MOA ID Proxy:
+ Entpacken Sie die Distribution von MOA ID Proxy (moa-id-proxy-1.4.6.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_PROXY_INST
+ bezeichnet.
+
+3. Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Auth
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/webapps,
+ wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-auth.war als
+ auch das komplette Verzeichnis moa-id-auth.
+ Für MOA ID Proxy:
+ Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Proxy
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/webapps,
+ wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-proxy.war als
+ auch das komplette Verzeichnis moa-id-proxy.
+
+4. Kopieren Sie die Datei MOA_ID_AUTH_INST/moa-id-auth.war nach
+ CATALINA_HOME_ID/webapps.
+ Für MOA ID Proxy:
+ Kopieren Sie die Datei MOA_ID_PROXY_INST/moa-id-proxy.war nach
+ CATALINA_HOME_ID/webapps.
+
+5. Starten Sie den Tomcat neu, achten Sie auf eventuelle Fehlermeldungen im
+ Logging von MOA ID beim Einlesen der erneuerten Konfiguration.
+
+...............................................................................
+B.1 Durchführung eines Updates von Version 1.4.3 oder 1.4.4
+...............................................................................
+
+1. Stoppen Sie den Tomcat, in dem Ihre bisherige Installation betrieben wird.
+ Fertigen Sie eine Sicherungskopie Ihrer kompletten Tomcat-Installation an.
+
+2. Entpacken Sie die Distribution von MOA ID Auth (moa-id-auth-1.4.5.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_AUTH_INST
+ bezeichnet.
+ Für MOA ID Proxy:
+ Entpacken Sie die Distribution von MOA ID Proxy (moa-id-proxy-1.4.5.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_PROXY_INST
+ bezeichnet.
+
+3. Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Auth
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/webapps,
+ wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-auth.war als
+ auch das komplette Verzeichnis moa-id-auth.
+ Für MOA ID Proxy:
+ Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Proxy
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/webapps,
+ wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-proxy.war als
+ auch das komplette Verzeichnis moa-id-proxy.
+
+4. Kopieren Sie die Datei MOA_ID_AUTH_INST/moa-id-auth.war nach
+ CATALINA_HOME_ID/webapps.
+ Für MOA ID Proxy:
+ Kopieren Sie die Datei MOA_ID_PROXY_INST/moa-id-proxy.war nach
+ CATALINA_HOME_ID/webapps.
+
+5. Erstellen Sie eine Sicherungskopie aller "iaik*.jar"-Dateien im Verzeichnis
+ JAVA_HOME\jre\lib\ext und löschen Sie diese Dateien danach.
+
+6. Kopieren Sie alle Dateien aus dem Verzeichnis MOA_ID_INST_AUTH\ext in das
+ Verzeichnis JAVA_HOME\jre\lib\ext.
+
+7. Starten Sie den Tomcat neu, achten Sie auf eventuelle Fehlermeldungen im
+ Logging von MOA ID beim Einlesen der erneuerten Konfiguration.
+
+...............................................................................
+B.2 Durchführung eines Updates von Version 1.4.1 oder 1.4.2 (incl. beta 1)
+...............................................................................
+
+1. Stoppen Sie den Tomcat, in dem Ihre bisherige Installation betrieben wird.
+ Fertigen Sie eine Sicherungskopie Ihrer kompletten Tomcat-Installation an.
+
+2. Entpacken Sie die Distribution von MOA ID Auth (moa-id-auth-1.4.5.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_AUTH_INST
+ bezeichnet.
+
+3. Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Auth
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/webapps,
+ wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-auth.war als
+ auch das komplette Verzeichnis moa-id-auth.
+
+4. Kopieren Sie die Datei MOA_ID_AUTH_INST/moa-id-auth.war nach
+ CATALINA_HOME_ID/webapps.
+
+5. Kopieren Sie die vier Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/transforms in das Verzeichnis transforms Ihres
+ Stammverzeichnisses für die MOA ID Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_ID/conf/moa-id; in weiterer Folge wird
+ davon ausgegangen).
+
+6. Kopieren Sie die vier Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-spss/profiles in das Verzeichnis profiles Ihres
+ Stammverzeichnisses für die MOA SPSS Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_SPSS/conf/moa-spss, wobei
+ CATALINA_HOME_SPSS für das Basisverzeichnis der Tomcat-Installation
+ für MOA SPSS steht; wenn Sie MOA SPSS nicht als eigenes Webservice
+ betreiben, sondern es von MOA ID über die API-Schnittstelle angesprochen
+ wird, lautet dieses Stammverzeichnis für gewöhnlich
+ CATALINA_HOME_ID/conf/moa-spss.
+
+7. Sichern Sie ihre MOA-ID Konfigurationsdatei. Kopieren Sie die
+ Beispielkonfigurationsdateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/SampleMOA*.xml nach
+ CATALINA_HOME_ID/conf/moa-id.
+ Verwenden Sie in Ihrer Installation bereits die Vollmachtenprüfung, so
+ verschieben Sie bitte in der MOA-ID Installationsdatei das Element
+ <CompatibilityMode> innerhalb des Konfigurationsteiles für die berufliche
+ Parteienvertreung (ParepSpecificParameters) unter das Element
+ ApplicationSpecificParameters.
+
+8. Starten Sie den Tomcat neu, achten Sie auf eventuelle Fehlermeldungen im
+ Logging von MOA ID beim Einlesen der erneuerten Konfiguration.
+
+...............................................................................
+B.3 Durchführung eines Updates von Version 1.3.1, 1.3.2 oder 1.3.3
+...............................................................................
+
+1. Stoppen Sie den Tomcat, in dem Ihre bisherige Installation betrieben wird.
+ Fertigen Sie eine Sicherungskopie Ihrer kompletten Tomcat-Installation an.
+
+2. Entpacken Sie die Distribution von MOA ID Auth (moa-id-auth-1.4.5.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_AUTH_INST
+ bezeichnet.
+
+3. Erstellen Sie eine Sicherungskopie aller "iaik*.jar"-Dateien im Verzeichnis
+ JAVA_HOME\jre\lib\ext und löschen Sie diese Dateien danach.
+
+4. Kopieren Sie alle Dateien aus dem Verzeichnis MOA_ID_INST_AUTH\ext in das
+ Verzeichnis JAVA_HOME\jre\lib\ext.
+
+5. Erstellen Sie eine Sicherungskopie aller Dateien im Verzeichnis
+ CATALINA_HOME\common\endorsed und löschen Sie die dort eventuell vorhandene
+ Dateien xmlParserAPIs.jar
+
+6. Kopieren Sie die Dateien aus dem Verzeichnis MOA_ID_INST_AUTH\endorsed
+ in das Verzeichnis CATALINA_HOME\common\endorsed. Überschreiben Sie dabei
+ etwaige gleichnamige Dateien.
+
+7. Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Auth
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/webapps,
+ wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-auth.war als
+ auch das komplette Verzeichnis moa-id-auth.
+
+8. Kopieren Sie die Datei MOA_ID_AUTH_INST/moa-id-auth.war nach
+ CATALINA_HOME_ID/webapps.
+
+9. Kopieren Sie die vier Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/transforms in das Verzeichnis transforms Ihres
+ Stammverzeichnisses für die MOA ID Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_ID/conf/moa-id; in weiterer Folge wird
+ davon ausgegangen).
+
+10.Kopieren Sie die vier Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-spss/profiles in das Verzeichnis profiles Ihres
+ Stammverzeichnisses für die MOA SPSS Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_SPSS/conf/moa-spss, wobei
+ CATALINA_HOME_SPSS für das Basisverzeichnis der Tomcat-Installation
+ für MOA SPSS steht; wenn Sie MOA SPSS nicht als eigenes Webservice
+ betreiben, sondern es von MOA ID über dmie API-Schnittstelle angesprochen
+ wird, lautet dieses Stammverzeichnis für gewöhnlich
+ CATALINA_HOME_ID/conf/moa-spss; in weiterer Folge wird von letzterer
+ Variante ausgegangen).
+
+11.Update des Cert-Stores.
+ Kopieren Sie den Inhalt des Verzeichnisses
+ MOA_ID_INST_AUTH\conf\moa-spss\certstore in das Verzeichnis
+ CATALINA_HOME\conf\moa-spss\certstore. Wenn Sie gefragt werden, ob Sie
+ vorhandene Dateien oder Unterverzeichnisse überschreiben sollen, dann
+ bejahen sie das.
+
+12.Sollen zusätzliche Templates für ältere Bürgerkartenumgebungen aktiviert
+ werden, öffnen Sie die XML-Konfiguration von MOA ID (für gewöhnlich finden
+ Sie diese XML-Datei direkt im Stammverzeichnis für die MOA ID Konfiguration,
+ z.B. CATALINA_HOME_ID/conf/moa-id/SampleMOAIDConfiguration.xml); führen Sie
+ folgende Modifikationen an der XML-Konfiguration durch:
+
+ a. Ändern Sie die applikationsübergreifende Konfiguration der AuthBlock
+ Transformationen. Sie finden diese Konfiguration im XML-Element
+ /MOA-IDConfiguration/AuthComponent/SecurityLayer. Fügen Sie zusätzlich zum
+ bisherigen Inhalt dieses Elements (für gewöhnlich ein Element
+ TransformsInfo, dessen Attribut filname den Wert
+ transforms/TransformsInfoAuthBlockText.xml aufweist) ein Element
+ TransformsInfo an, dessen Attribut filename auf die Datei für ältere BKU
+ zeigt. Sie können auch auf die vordefinierten Elemente aus den
+ Musterkonfigurationen dieser Distribution (
+ MOA_ID_AUTH_INST/conf/moa-id/SampleMOAIDConfiguration.xml) zurückgreifen.
+
+ b. Fügen Sie Profilbezeichner für die Transformationsprofile in der
+ Konfiguration für MOA SP an. Sie finden diesen Bezeichner im XML-
+ Element /MOA-IDConfiguration/AuthComponent/MOA-SP/VerifyAuthBlock.
+ Hängen Sie ein Element VerifyTransformsInfoProfileID an, das für die Über-
+ prüfung der Transformation älterer BKU vorgesehen ist.
+ Siehe auch Inhalt des Elements VerifyAuthBlock aus der Musterkonfiguration
+ dieser Distribution (
+ MOA_ID_AUTH_INST/conf/moa-id/SampleMOAIDConfiguration.xml).
+
+ c. Ändern Sie gegebenenfalls die applikationsspezifische Konfiguration
+ der Authblock-Tranformationen. Führen Sie dazu die folgende Tätigkeit
+ für jedes XML-Element /MOA-IDConfiguration/OnlineApplicaton/AuthComponent
+ durch: Fügen Sie zusätzlich zu einem bestehenden Element TransformsInfo
+ ein Elemnet TransformsInfo an, das die Transformation für ältere BKU
+ enthält - gleich wie dies bereits in Schritt a. durchgeführt wurde (wenn
+ Sie dieses Element nicht vorfinden, oder es auskommentiert ist, muss
+ Schritt c. nicht durchgeführt werden).
+
+ Öffnen Sie die XML-Konfiguration von MOA SPSS (für gewöhnlich finden Sie
+ XML-Datei direkt im Stammverzeichnisses für die MOA SPSS Konfiguration, z.B.
+ CATALINA_HOME_ID/conf/moa-spss/SampleMOASPSSConfiguration.xml); führen Sie
+ folgende Modifikationen an der XML-Konfiguration durch:
+
+ a. Ändern Sie die konfigurierten Profile für die zulässigen Transformationen
+ über die signierten Daten. Sie finden diese Profile am Ende der XML-Konfi-
+ guration von MOA SPSS (Elemente des Namens
+ cfg:VerifyTransformsInfoProfile). Fügen Sie zusätzlich zu den vorkommenden
+ Elementen dieses Namens (für gewöhnlich zwei Elemente) zwei weitere
+ Elemente dieses Namens hinzu, die die Profile für die älteren Bürger-
+ kartenumgebungen aufnehmen - diese sind durch den Namensteil "_deprecated"
+ gekennzeichnet (siehe auch Musterkonfigurationen dieser Distribution
+ MOA_ID_AUTH_INST/conf/moa-spss/SampleMOASPSSConfiguration.xml).
+
+13.Update der Trust-Profile. Achten sie bei Case-sensitiven Betriebssystemen auf
+ die Profilbezeichnungen. Aus trustprofiles wurde trustProfiles.
+ Wenn Sie Ihre alten Trust-Profile durch die neuen ersetzen wollen, dann gehen
+ Sie vor, wie in Punkt a). Wenn Sie Ihre eigenen Trust-Profile beibehalten
+ wollen, dann gehen Sie vor, wie in Punkt b).
+
+ a. Gehen Sie wie folgt vor, um die Trust-Profile auszutauschen:
+
+ 1) Löschen Sie das Verzeichnis CATALINA_HOME\conf\moa-spss\trustprofiles.
+ 2) Kopieren Sie das Verzeichnis
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles in das Verzeichnis
+ CATALINA_HOME\conf\moa-spss.
+
+ b. Falls Sie Ihre alten Trust-Profile beibehalten wollen, gehen Sie wie folgt
+ vor, um die Profile auf den aktuellen Stand zu bringen:
+
+ 1) Benennen Sie ein eventuell vorhandenes Verzeichnis trustprofiles in
+ trustProfiles um (vergessen Sie nicht, diese Änderung in Ihrer MOA-SP/SS
+ Konfigurationsdatei ebenfalls zu berücksichtigen und benennen Sie dort
+ alle gleichartigen Vorkommen von trustprofiles in trustProfiles um)
+
+ 2) Ergänzen Sie ihre Trustprofile durch alle Zertifikate aus den
+ entsprechenden Profilen im Verzeichnis
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles, die nicht in Ihren
+ Profilen enthalten sind. Am einfachsten ist es, wenn Sie den Inhalt der
+ einzelnen Profile aus der Distribution (
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles) in die entsprechenden
+ Profile Ihrer Installation (CATALINA_HOME\conf\moa-spss\trustProfiles)
+ kopieren und dabei die vorhandenen gleichnamigen Zertifikate
+ überschreiben), also z.B: Kopieren des Inhalts von
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles\
+ MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten nach
+ CATALINA_HOME\conf\moa-spss\trustProfiles\
+ MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten usw.
+
+14.Starten Sie den Tomcat neu, achten Sie auf eventuelle Fehlermeldungen im
+ Logging von MOA ID beim Einlesen der erneuerten Konfiguration.
+
+...............................................................................
+B.4 Durchführung eines Updates von einer älteren Version
+...............................................................................
+
+Bitte führen Sie eine Neuinstallation von MOA ID laut Handbuch durch und passen
+Sie die mitgelieferte Musterkonfiguration entsprechend Ihren Bedürfnissen unter
+Zuhilfenahme Ihrer bisherigen Konfiguration an.
+
diff --git a/id/readme_1.4.7.txt b/id/readme_1.4.7.txt
new file mode 100644
index 000000000..7106d9b68
--- /dev/null
+++ b/id/readme_1.4.7.txt
@@ -0,0 +1,344 @@
+===============================================================================
+MOA ID Version 1.4.7 - Wichtige Informationen zur Installation
+===============================================================================
+
+-------------------------------------------------------------------------------
+A. Neuerungen/Änderungen
+-------------------------------------------------------------------------------
+
+Mit MOA ID Version 1.4.7 wurden folgende Neuerungen eingeführt, die jetzt
+erstmals in der Veröffentlichung enthalten sind (siehe auch history.txt im
+gleichen Verzeichnis):
+
+- Anbindung an Stammzahlenregister-Gateway um ausländische Bürger zu integrieren (ERnP-Eintragung
+ gemäß E-Government Gesetz §6(5))
+- Neuer Anmeldetext mit neuen Transformationen
+- Update Default-Konfigurationen (z.b. Trustprofile)
+- Striktere Parameterüberprüfung
+- Fixed Bug #485 (https://egovlabs.gv.at/tracker/index.php?func=detail&aid=485&group_id=6&atid=105)
+- Fixed Bug #540 (https://egovlabs.gv.at/tracker/index.php?func=detail&aid=540&group_id=6&atid=105)
+- IAIK Libraries aktualisiert:
+ iaik-moa: Version 1.27
+
+-------------------------------------------------------------------------------
+B. Durchführung eines Updates
+-------------------------------------------------------------------------------
+
+Es wird generell eine Neuinstallation lt. Handbuch empfohlen! Dennoch ist auch
+eine Aktualisierung bestehender Installationen möglich.
+
+...............................................................................
+B.1 Durchführung eines Updates von Version 1.4.3 oder 1.4.4 oder 1.4.5 oder
+ 1.4.6
+...............................................................................
+
+1. Stoppen Sie den Tomcat, in dem Ihre bisherige Installation betrieben wird.
+ Fertigen Sie eine Sicherungskopie Ihrer kompletten Tomcat-Installation an.
+
+2. Entpacken Sie die Distribution von MOA ID Auth (moa-id-auth-1.4.7.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_AUTH_INST
+ bezeichnet.
+ Für MOA ID Proxy:
+ Entpacken Sie die Distribution von MOA ID Proxy (moa-id-proxy-1.4.7.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_PROXY_INST
+ bezeichnet.
+
+3. Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Auth
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/webapps,
+ wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-auth.war als
+ auch das komplette Verzeichnis moa-id-auth.
+ Für MOA ID Proxy:
+ Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Proxy
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/
+ webappsProxy, wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-proxy.war als
+ auch das komplette Verzeichnis moa-id-proxy.
+
+4. Kopieren Sie die Datei MOA_ID_AUTH_INST/moa-id-auth.war nach
+ CATALINA_HOME_ID/webapps.
+ Für MOA ID Proxy:
+ Kopieren Sie die Datei MOA_ID_PROXY_INST/moa-id-proxy.war nach
+ CATALINA_HOME_ID/webappsProxy.
+
+5. Erstellen Sie eine Sicherungskopie aller "iaik*.jar"-Dateien im Verzeichnis
+ JAVA_HOME\jre\lib\ext und löschen Sie diese Dateien danach.
+
+6. Kopieren Sie alle Dateien aus dem Verzeichnis MOA_ID_INST_AUTH\ext in das
+ Verzeichnis JAVA_HOME\jre\lib\ext.
+
+7. Kopieren Sie die zwei Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/transforms in das Verzeichnis transforms Ihres
+ Stammverzeichnisses für die MOA ID Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_ID/conf/moa-id; in weiterer Folge
+ wird davon ausgegangen).
+ Weiters editieren Sie ihre MOA ID Konfiguration wie folgt:
+ * Im Element MOA-IDConfiguration/AuthComponent/SecurityLayer fügen
+ Sie eine der folgende Zeilen ein:
+ <TransformsInfo filename="transforms/TransformsInfoAuthBlockTable_EN.xml"/>
+ <TransformsInfo filename="transforms/TransformsInfoAuthBlockTable_DE.xml"/>
+ je nachdem ob sie einen englischen oder deutschen Text zur
+ Anzeige wünschen.
+ Alle weiteren TransformsInfo Elemente löschen Sie bitte.
+ * Im Element AuthComponent/MOA-SP/VerifyAuthBlock fügen Sie eine
+ der folgende Zeilen ein:
+ <VerifyTransformsInfoProfileID>MOAIDTransformAuthBlockTable_DE</VerifyTransformsInfoProfileID>
+ <VerifyTransformsInfoProfileID>MOAIDTransformAuthBlockTable_EN</VerifyTransformsInfoProfileID>
+ je nachdem ob Sie einen englischen oder deutschen Text zur
+ Anzeige ausgewählt haben.
+ Alle weiteren VerifyTransformsInfoProfileID Elemente löschen
+ Sie bitte.
+8. Kopieren Sie die zwei Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-spss/profiles in das Verzeichnis profiles Ihres
+ Stammverzeichnisses für die MOA SPSS Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_SPSS/conf/moa-spss, wobei
+ CATALINA_HOME_SPSS für das Basisverzeichnis der Tomcat-Installation
+ für MOA SPSS steht; wenn Sie MOA SPSS nicht als eigenes Webservice
+ betreiben, sondern es von MOA ID über die API-Schnittstelle angesprochen
+ wird, lautet dieses Stammverzeichnis für gewöhnlich
+ CATALINA_HOME_ID/conf/moa-spss.
+ Weiters editieren Sie ihre MOA SPSS Konfiguration wie folgt:
+ * Im Element MOAConfiguration/SignatureVerification fügen Sie folgende
+ Zeilen ein:
+ <cfg:VerifyTransformsInfoProfile>
+ <cfg:Id>MOAIDTransformAuthBlockTable_DE</cfg:Id>
+ <cfg:Location>profiles/MOAIDTransformAuthBlockTable_DE.xml</cfg:Location>
+ </cfg:VerifyTransformsInfoProfile>
+ <cfg:VerifyTransformsInfoProfile>
+ <cfg:Id>MOAIDTransformAuthBlockTable_EN</cfg:Id>
+ <cfg:Location>profiles/MOAIDTransformAuthBlockTable_EN.xml</cfg:Location>
+ </cfg:VerifyTransformsInfoProfile>
+
+9. Kopieren Sie die drei Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/certs/ca-certs in das Verzeichnis
+ certs/ca-certs Ihres Stammverzeichnisses für die MOA ID Konfiguration
+ (für gewöhnlich lautet dieses Stammverzeichnis CATALINA_HOME_ID/conf/moa-id;
+ in weiterer Folge wird davon ausgegangen).
+ Weiters editieren Sie ihre MOA ID Konfiguration wie folgt:
+ * Im Element MOA-IDConfiguration/AuthComponent fügend Sie als letztes
+ Kind-Element folgende Zeilen ein:
+ <ForeignIdentities>
+ <ConnectionParameter URL="https://gateway.stammzahlenregister.gv.at/services/IdentityLinkCreation">
+ <ClientKeyStore password="password">cert/clientcert.p12</ClientKeyStore>
+ </ConnectionParameter>
+ </ForeignIdentities>
+
+ Anmerkung: Im ClientKeyStore Element geben Sie den Client Keystore für
+ den Zugriff auf das Stammzahlenregister-Gateway an. Voraussetzung ist
+ ein A-Trust oder A-CERT Zertifikat mit Verwaltungseigenschaft. Wenn
+ ihr MOA-ID Zertifikat diese Voraussetzung erfüllt, können Sie dieses
+ hier angeben.
+
+10. Update des Cert-Stores.
+ Kopieren Sie den Inhalt des Verzeichnisses
+ MOA_ID_INST_AUTH\conf\moa-spss\certstore in das Verzeichnis
+ CATALINA_HOME\conf\moa-spss\certstore. Wenn Sie gefragt werden, ob Sie
+ vorhandene Dateien oder Unterverzeichnisse überschreiben sollen, dann
+ bejahen sie das.
+
+11. Update der Trust-Profile. Achten sie bei Case-sensitiven Betriebssystemen
+ auf die Profilbezeichnungen. Aus trustprofiles wurde trustProfiles.
+ Wenn Sie Ihre alten Trust-Profile durch die neuen ersetzen wollen, dann
+ gehen Sie vor, wie in Punkt a). Wenn Sie Ihre eigenen Trust-Profile
+ beibehalten wollen, dann gehen Sie vor, wie in Punkt b).
+
+ a. Gehen Sie wie folgt vor, um die Trust-Profile auszutauschen:
+
+ 1) Löschen Sie das Verzeichnis CATALINA_HOME\conf\moa-spss\trustprofiles.
+ 2) Kopieren Sie das Verzeichnis
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles in das Verzeichnis
+ CATALINA_HOME\conf\moa-spss.
+
+ b. Falls Sie Ihre alten Trust-Profile beibehalten wollen, gehen Sie wie
+ folgt vor, um die Profile auf den aktuellen Stand zu bringen:
+
+ 1) Benennen Sie ein eventuell vorhandenes Verzeichnis trustprofiles in
+ trustProfiles um (vergessen Sie nicht, diese Änderung in Ihrer
+ MOA-SP/SS Konfigurationsdatei ebenfalls zu berücksichtigen und
+ benennen Sie dort alle gleichartigen Vorkommen von trustprofiles
+ in trustProfiles um)
+
+ 2) Ergänzen Sie ihre Trustprofile durch alle Zertifikate aus den
+ entsprechenden Profilen im Verzeichnis
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles, die nicht in Ihren
+ Profilen enthalten sind. Am einfachsten ist es, wenn Sie den Inhalt
+ der einzelnen Profile aus der Distribution
+ (MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles) in die entsprechenden
+ Profile Ihrer Installation (CATALINA_HOME\conf\moa-spss\trustProfiles)
+ kopieren und dabei die vorhandenen gleichnamigen Zertifikate
+ überschreiben), also z.B: Kopieren des Inhalts von
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles\
+ MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten nach
+ CATALINA_HOME\conf\moa-spss\trustProfiles\
+ MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten usw.
+
+
+12. Starten Sie den Tomcat neu, achten Sie auf eventuelle Fehlermeldungen im
+ Logging von MOA ID beim Einlesen der erneuerten Konfiguration.
+
+...............................................................................
+B.2 Durchführung eines Updates von Version 1.4.1 oder 1.4.2 (incl. beta 1)
+...............................................................................
+
+1. Stoppen Sie den Tomcat, in dem Ihre bisherige Installation betrieben wird.
+ Fertigen Sie eine Sicherungskopie Ihrer kompletten Tomcat-Installation an.
+
+2. Entpacken Sie die Distribution von MOA ID Auth (moa-id-auth-1.4.7.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_AUTH_INST
+ bezeichnet.
+ Für MOA ID Proxy:
+ Entpacken Sie die Distribution von MOA ID Proxy (moa-id-proxy-1.4.7.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_PROXY_INST
+ bezeichnet.
+
+3. Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Auth
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/webapps,
+ wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-auth.war als
+ auch das komplette Verzeichnis moa-id-auth.
+ Für MOA ID Proxy:
+ Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Proxy
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/
+ webappsProxy, wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-proxy.war als
+ auch das komplette Verzeichnis moa-id-proxy.
+
+4. Kopieren Sie die Datei MOA_ID_AUTH_INST/moa-id-auth.war nach
+ CATALINA_HOME_ID/webapps.
+ Für MOA ID Proxy:
+ Kopieren Sie die Datei MOA_ID_PROXY_INST/moa-id-proxy.war nach
+ CATALINA_HOME_ID/webappsProxy.
+
+5. Erstellen Sie eine Sicherungskopie aller "iaik*.jar"-Dateien im Verzeichnis
+ JAVA_HOME\jre\lib\ext und löschen Sie diese Dateien danach.
+
+6. Kopieren Sie alle Dateien aus dem Verzeichnis MOA_ID_INST_AUTH\ext in das
+ Verzeichnis JAVA_HOME\jre\lib\ext.
+
+7. Kopieren Sie die zwei Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/transforms in das Verzeichnis transforms Ihres
+ Stammverzeichnisses für die MOA ID Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_ID/conf/moa-id; in weiterer Folge
+ wird davon ausgegangen).
+ Weiters editieren Sie ihre MOA ID Konfiguration wie folgt:
+ * Im Element MOA-IDConfiguration/AuthComponent/SecurityLayer fügen
+ Sie eine der folgende Zeilen ein:
+ <TransformsInfo filename="transforms/TransformsInfoAuthBlockTable_EN.xml"/>
+ <TransformsInfo filename="transforms/TransformsInfoAuthBlockTable_DE.xml"/>
+ je nachdem ob sie einen englischen oder deutschen Text zur
+ Anzeige wünschen.
+ Alle weiteren TransformsInfo Elemente löschen Sie bitte.
+ * Im Element AuthComponent/MOA-SP/VerifyAuthBlock fügen Sie eine
+ der folgende Zeilen ein:
+ <VerifyTransformsInfoProfileID>MOAIDTransformAuthBlockTable_DE</VerifyTransformsInfoProfileID>
+ <VerifyTransformsInfoProfileID>MOAIDTransformAuthBlockTable_EN</VerifyTransformsInfoProfileID>
+ je nachdem ob sie einen englischen oder deutschen Text zur
+ Anzeige ausgewählt haben.
+ Alle weiteren VerifyTransformsInfoProfileID Elemente löschen
+ Sie bitte.
+8. Kopieren Sie die zwei Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-spss/profiles in das Verzeichnis profiles Ihres
+ Stammverzeichnisses für die MOA SPSS Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_SPSS/conf/moa-spss, wobei
+ CATALINA_HOME_SPSS für das Basisverzeichnis der Tomcat-Installation
+ für MOA SPSS steht; wenn Sie MOA SPSS nicht als eigenes Webservice
+ betreiben, sondern es von MOA ID über die API-Schnittstelle angesprochen
+ wird, lautet dieses Stammverzeichnis für gewöhnlich
+ CATALINA_HOME_ID/conf/moa-spss.
+ Weiters editieren Sie ihre MOA SPSS Konfiguration wie folgt:
+ * Im Element MOAConfiguration/SignatureVerification fügen Sie folgende
+ Zeilen ein:
+ <cfg:VerifyTransformsInfoProfile>
+ <cfg:Id>MOAIDTransformAuthBlockTable_DE</cfg:Id>
+ <cfg:Location>profiles/MOAIDTransformAuthBlockTable_DE.xml</cfg:Location>
+ </cfg:VerifyTransformsInfoProfile>
+ <cfg:VerifyTransformsInfoProfile>
+ <cfg:Id>MOAIDTransformAuthBlockTable_EN</cfg:Id>
+ <cfg:Location>profiles/MOAIDTransformAuthBlockTable_EN.xml</cfg:Location>
+ </cfg:VerifyTransformsInfoProfile>
+
+9. Kopieren Sie die drei Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/certs/ca-certs in das Verzeichnis
+ certs/ca-certs Ihres Stammverzeichnisses für die MOA ID Konfiguration
+ (für gewöhnlich lautet dieses Stammverzeichnis CATALINA_HOME_ID/conf/moa-id;
+ in weiterer Folge wird davon ausgegangen).
+ Weiters editieren Sie ihre MOA ID Konfiguration wie folgt:
+ * Im Element MOA-IDConfiguration/AuthComponent fügend Sie als letztes
+ Kind-Element folgende Zeilen ein:
+ <ForeignIdentities>
+ <ConnectionParameter URL="https://gateway.stammzahlenregister.gv.at/services/IdentityLinkCreation">
+ <ClientKeyStore password="password">cert/clientcert.p12</ClientKeyStore>
+ </ConnectionParameter>
+ </ForeignIdentities>
+
+ Anmerkung: Im ClientKeyStore Element geben Sie den Client Keystore für
+ den Zugriff auf das Stammzahlenregister-Gateway an. Voraussetzung ist
+ ein A-Trust oder A-CERT Zertifikat mit Verwaltungseigenschaft. Wenn
+ ihr MOA-ID Zertifikat diese Voraussetzung erfüllt, können Sie dieses
+ hier angeben.
+
+10. Update des Cert-Stores.
+ Kopieren Sie den Inhalt des Verzeichnisses
+ MOA_ID_INST_AUTH\conf\moa-spss\certstore in das Verzeichnis
+ CATALINA_HOME\conf\moa-spss\certstore. Wenn Sie gefragt werden, ob Sie
+ vorhandene Dateien oder Unterverzeichnisse überschreiben sollen, dann
+ bejahen sie das.
+
+11. Update der Trust-Profile. Achten sie bei Case-sensitiven Betriebssystemen
+ auf die Profilbezeichnungen. Aus trustprofiles wurde trustProfiles.
+ Wenn Sie Ihre alten Trust-Profile durch die neuen ersetzen wollen, dann
+ gehen Sie vor, wie in Punkt a). Wenn Sie Ihre eigenen Trust-Profile
+ beibehalten wollen, dann gehen Sie vor, wie in Punkt b).
+
+ a. Gehen Sie wie folgt vor, um die Trust-Profile auszutauschen:
+
+ 1) Löschen Sie das Verzeichnis CATALINA_HOME\conf\moa-spss\trustprofiles.
+ 2) Kopieren Sie das Verzeichnis
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles in das Verzeichnis
+ CATALINA_HOME\conf\moa-spss.
+
+ b. Falls Sie Ihre alten Trust-Profile beibehalten wollen, gehen Sie wie
+ folgt vor, um die Profile auf den aktuellen Stand zu bringen:
+
+ 1) Benennen Sie ein eventuell vorhandenes Verzeichnis trustprofiles in
+ trustProfiles um (vergessen Sie nicht, diese Änderung in Ihrer
+ MOA-SP/SS Konfigurationsdatei ebenfalls zu berücksichtigen und
+ benennen Sie dort alle gleichartigen Vorkommen von trustprofiles
+ in trustProfiles um)
+
+ 2) Ergänzen Sie ihre Trustprofile durch alle Zertifikate aus den
+ entsprechenden Profilen im Verzeichnis
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles, die nicht in Ihren
+ Profilen enthalten sind. Am einfachsten ist es, wenn Sie den Inhalt
+ der einzelnen Profile aus der Distribution
+ (MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles) in die entsprechenden
+ Profile Ihrer Installation (CATALINA_HOME\conf\moa-spss\trustProfiles)
+ kopieren und dabei die vorhandenen gleichnamigen Zertifikate
+ überschreiben), also z.B: Kopieren des Inhalts von
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles\
+ MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten nach
+ CATALINA_HOME\conf\moa-spss\trustProfiles\
+ MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten usw.
+
+13. Sichern Sie ihre MOA-ID Konfigurationsdatei. Kopieren Sie die
+ Beispielkonfigurationsdateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/SampleMOA*.xml nach
+ CATALINA_HOME_ID/conf/moa-id.
+ Verwenden Sie in Ihrer Installation bereits die Vollmachtenprüfung, so
+ verschieben Sie bitte in der MOA-ID Installationsdatei das Element
+ <CompatibilityMode> innerhalb des Konfigurationsteiles für die berufliche
+ Parteienvertreung (ParepSpecificParameters) unter das Element
+ ApplicationSpecificParameters.
+
+
+14. Starten Sie den Tomcat neu, achten Sie auf eventuelle Fehlermeldungen im
+ Logging von MOA ID beim Einlesen der erneuerten Konfiguration.
+
+...............................................................................
+B.3 Durchführung eines Updates von einer älteren Version
+...............................................................................
+
+Bitte führen Sie eine Neuinstallation von MOA ID laut Handbuch durch und passen
+Sie die mitgelieferte Musterkonfiguration entsprechend Ihren Bedürfnissen unter
+Zuhilfenahme Ihrer bisherigen Konfiguration an.
+
diff --git a/id/readme_1.4.8.txt b/id/readme_1.4.8.txt
new file mode 100644
index 000000000..e7b309e7f
--- /dev/null
+++ b/id/readme_1.4.8.txt
@@ -0,0 +1,375 @@
+===============================================================================
+MOA ID Version 1.4.8 - Wichtige Informationen zur Installation
+===============================================================================
+
+-------------------------------------------------------------------------------
+A. Neuerungen/Änderungen
+-------------------------------------------------------------------------------
+
+Mit MOA ID Version 1.4.8 wurden folgende Neuerungen eingeführt, die jetzt
+erstmals in der Veröffentlichung enthalten sind (siehe auch history.txt im
+gleichen Verzeichnis):
+
+- Fixed Bug #546 (https://egovlabs.gv.at/tracker/index.php?func=detail&aid=546&group_id=6&atid=105)
+- IAIK Libraries aktualisiert:
+ iaik-moa: Version 1.28
+
+-------------------------------------------------------------------------------
+B. Durchführung eines Updates
+-------------------------------------------------------------------------------
+
+Es wird generell eine Neuinstallation lt. Handbuch empfohlen! Dennoch ist auch
+eine Aktualisierung bestehender Installationen möglich.
+
+...............................................................................
+B.1 Durchführung eines Updates von Version 1.4.7
+...............................................................................
+
+1. Stoppen Sie den Tomcat, in dem Ihre bisherige Installation betrieben wird.
+ Fertigen Sie eine Sicherungskopie Ihrer kompletten Tomcat-Installation an.
+
+2. Entpacken Sie die Distribution von MOA ID Auth (moa-id-auth-1.4.8.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_AUTH_INST
+ bezeichnet.
+ Für MOA ID Proxy:
+ Entpacken Sie die Distribution von MOA ID Proxy (moa-id-proxy-1.4.8.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_PROXY_INST
+ bezeichnet.
+
+3. Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Auth
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/webapps,
+ wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-auth.war als
+ auch das komplette Verzeichnis moa-id-auth.
+ Für MOA ID Proxy:
+ Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Proxy
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/
+ webappsProxy, wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-proxy.war als
+ auch das komplette Verzeichnis moa-id-proxy.
+
+4. Kopieren Sie die Datei MOA_ID_AUTH_INST/moa-id-auth.war nach
+ CATALINA_HOME_ID/webapps.
+ Für MOA ID Proxy:
+ Kopieren Sie die Datei MOA_ID_PROXY_INST/moa-id-proxy.war nach
+ CATALINA_HOME_ID/webappsProxy.
+
+5. Starten Sie den Tomcat neu, achten Sie auf eventuelle Fehlermeldungen im
+ Logging von MOA ID beim Einlesen der Konfiguration.
+
+
+...............................................................................
+B.2 Durchführung eines Updates von Version 1.4.3 oder 1.4.4 oder 1.4.5 oder
+ 1.4.6
+...............................................................................
+
+1. Stoppen Sie den Tomcat, in dem Ihre bisherige Installation betrieben wird.
+ Fertigen Sie eine Sicherungskopie Ihrer kompletten Tomcat-Installation an.
+
+2. Entpacken Sie die Distribution von MOA ID Auth (moa-id-auth-1.4.8.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_AUTH_INST
+ bezeichnet.
+ Für MOA ID Proxy:
+ Entpacken Sie die Distribution von MOA ID Proxy (moa-id-proxy-1.4.8.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_PROXY_INST
+ bezeichnet.
+
+3. Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Auth
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/webapps,
+ wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-auth.war als
+ auch das komplette Verzeichnis moa-id-auth.
+ Für MOA ID Proxy:
+ Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Proxy
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/
+ webappsProxy, wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-proxy.war als
+ auch das komplette Verzeichnis moa-id-proxy.
+
+4. Kopieren Sie die Datei MOA_ID_AUTH_INST/moa-id-auth.war nach
+ CATALINA_HOME_ID/webapps.
+ Für MOA ID Proxy:
+ Kopieren Sie die Datei MOA_ID_PROXY_INST/moa-id-proxy.war nach
+ CATALINA_HOME_ID/webappsProxy.
+
+5. Erstellen Sie eine Sicherungskopie aller "iaik*.jar"-Dateien im Verzeichnis
+ JAVA_HOME\jre\lib\ext und löschen Sie diese Dateien danach.
+
+6. Kopieren Sie alle Dateien aus dem Verzeichnis MOA_ID_INST_AUTH\ext in das
+ Verzeichnis JAVA_HOME\jre\lib\ext.
+
+7. Kopieren Sie die zwei Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/transforms in das Verzeichnis transforms Ihres
+ Stammverzeichnisses für die MOA ID Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_ID/conf/moa-id; in weiterer Folge
+ wird davon ausgegangen).
+ Weiters editieren Sie ihre MOA ID Konfiguration wie folgt:
+ * Im Element MOA-IDConfiguration/AuthComponent/SecurityLayer fügen
+ Sie eine der folgende Zeilen ein:
+ <TransformsInfo filename="transforms/TransformsInfoAuthBlockTable_EN.xml"/>
+ <TransformsInfo filename="transforms/TransformsInfoAuthBlockTable_DE.xml"/>
+ je nachdem ob sie einen englischen oder deutschen Text zur
+ Anzeige wünschen.
+ Alle weiteren TransformsInfo Elemente löschen Sie bitte.
+ * Im Element AuthComponent/MOA-SP/VerifyAuthBlock fügen Sie eine
+ der folgende Zeilen ein:
+ <VerifyTransformsInfoProfileID>MOAIDTransformAuthBlockTable_DE</VerifyTransformsInfoProfileID>
+ <VerifyTransformsInfoProfileID>MOAIDTransformAuthBlockTable_EN</VerifyTransformsInfoProfileID>
+ je nachdem ob Sie einen englischen oder deutschen Text zur
+ Anzeige ausgewählt haben.
+ Alle weiteren VerifyTransformsInfoProfileID Elemente löschen
+ Sie bitte.
+8. Kopieren Sie die zwei Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-spss/profiles in das Verzeichnis profiles Ihres
+ Stammverzeichnisses für die MOA SPSS Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_SPSS/conf/moa-spss, wobei
+ CATALINA_HOME_SPSS für das Basisverzeichnis der Tomcat-Installation
+ für MOA SPSS steht; wenn Sie MOA SPSS nicht als eigenes Webservice
+ betreiben, sondern es von MOA ID über die API-Schnittstelle angesprochen
+ wird, lautet dieses Stammverzeichnis für gewöhnlich
+ CATALINA_HOME_ID/conf/moa-spss.
+ Weiters editieren Sie ihre MOA SPSS Konfiguration wie folgt:
+ * Im Element MOAConfiguration/SignatureVerification fügen Sie folgende
+ Zeilen ein:
+ <cfg:VerifyTransformsInfoProfile>
+ <cfg:Id>MOAIDTransformAuthBlockTable_DE</cfg:Id>
+ <cfg:Location>profiles/MOAIDTransformAuthBlockTable_DE.xml</cfg:Location>
+ </cfg:VerifyTransformsInfoProfile>
+ <cfg:VerifyTransformsInfoProfile>
+ <cfg:Id>MOAIDTransformAuthBlockTable_EN</cfg:Id>
+ <cfg:Location>profiles/MOAIDTransformAuthBlockTable_EN.xml</cfg:Location>
+ </cfg:VerifyTransformsInfoProfile>
+
+9. Kopieren Sie die drei Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/certs/ca-certs in das Verzeichnis
+ certs/ca-certs Ihres Stammverzeichnisses für die MOA ID Konfiguration
+ (für gewöhnlich lautet dieses Stammverzeichnis CATALINA_HOME_ID/conf/moa-id;
+ in weiterer Folge wird davon ausgegangen).
+ Weiters editieren Sie ihre MOA ID Konfiguration wie folgt:
+ * Im Element MOA-IDConfiguration/AuthComponent fügend Sie als letztes
+ Kind-Element folgende Zeilen ein:
+ <ForeignIdentities>
+ <ConnectionParameter URL="https://gateway.stammzahlenregister.gv.at/services/IdentityLinkCreation">
+ <ClientKeyStore password="password">cert/clientcert.p12</ClientKeyStore>
+ </ConnectionParameter>
+ </ForeignIdentities>
+
+ Anmerkung: Im ClientKeyStore Element geben Sie den Client Keystore für
+ den Zugriff auf das Stammzahlenregister-Gateway an. Voraussetzung ist
+ ein A-Trust oder A-CERT Zertifikat mit Verwaltungseigenschaft. Wenn
+ ihr MOA-ID Zertifikat diese Voraussetzung erfüllt, können Sie dieses
+ hier angeben.
+
+10. Update des Cert-Stores.
+ Kopieren Sie den Inhalt des Verzeichnisses
+ MOA_ID_INST_AUTH\conf\moa-spss\certstore in das Verzeichnis
+ CATALINA_HOME\conf\moa-spss\certstore. Wenn Sie gefragt werden, ob Sie
+ vorhandene Dateien oder Unterverzeichnisse überschreiben sollen, dann
+ bejahen sie das.
+
+11. Update der Trust-Profile. Achten sie bei Case-sensitiven Betriebssystemen
+ auf die Profilbezeichnungen. Aus trustprofiles wurde trustProfiles.
+ Wenn Sie Ihre alten Trust-Profile durch die neuen ersetzen wollen, dann
+ gehen Sie vor, wie in Punkt a). Wenn Sie Ihre eigenen Trust-Profile
+ beibehalten wollen, dann gehen Sie vor, wie in Punkt b).
+
+ a. Gehen Sie wie folgt vor, um die Trust-Profile auszutauschen:
+
+ 1) Löschen Sie das Verzeichnis CATALINA_HOME\conf\moa-spss\trustprofiles.
+ 2) Kopieren Sie das Verzeichnis
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles in das Verzeichnis
+ CATALINA_HOME\conf\moa-spss.
+
+ b. Falls Sie Ihre alten Trust-Profile beibehalten wollen, gehen Sie wie
+ folgt vor, um die Profile auf den aktuellen Stand zu bringen:
+
+ 1) Benennen Sie ein eventuell vorhandenes Verzeichnis trustprofiles in
+ trustProfiles um (vergessen Sie nicht, diese Änderung in Ihrer
+ MOA-SP/SS Konfigurationsdatei ebenfalls zu berücksichtigen und
+ benennen Sie dort alle gleichartigen Vorkommen von trustprofiles
+ in trustProfiles um)
+
+ 2) Ergänzen Sie ihre Trustprofile durch alle Zertifikate aus den
+ entsprechenden Profilen im Verzeichnis
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles, die nicht in Ihren
+ Profilen enthalten sind. Am einfachsten ist es, wenn Sie den Inhalt
+ der einzelnen Profile aus der Distribution
+ (MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles) in die entsprechenden
+ Profile Ihrer Installation (CATALINA_HOME\conf\moa-spss\trustProfiles)
+ kopieren und dabei die vorhandenen gleichnamigen Zertifikate
+ überschreiben), also z.B: Kopieren des Inhalts von
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles\
+ MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten nach
+ CATALINA_HOME\conf\moa-spss\trustProfiles\
+ MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten usw.
+
+
+12. Starten Sie den Tomcat neu, achten Sie auf eventuelle Fehlermeldungen im
+ Logging von MOA ID beim Einlesen der erneuerten Konfiguration.
+
+...............................................................................
+B.3 Durchführung eines Updates von Version 1.4.1 oder 1.4.2 (incl. beta 1)
+...............................................................................
+
+1. Stoppen Sie den Tomcat, in dem Ihre bisherige Installation betrieben wird.
+ Fertigen Sie eine Sicherungskopie Ihrer kompletten Tomcat-Installation an.
+
+2. Entpacken Sie die Distribution von MOA ID Auth (moa-id-auth-1.4.8.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_AUTH_INST
+ bezeichnet.
+ Für MOA ID Proxy:
+ Entpacken Sie die Distribution von MOA ID Proxy (moa-id-proxy-1.4.8.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_PROXY_INST
+ bezeichnet.
+
+3. Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Auth
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/webapps,
+ wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-auth.war als
+ auch das komplette Verzeichnis moa-id-auth.
+ Für MOA ID Proxy:
+ Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Proxy
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/
+ webappsProxy, wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-proxy.war als
+ auch das komplette Verzeichnis moa-id-proxy.
+
+4. Kopieren Sie die Datei MOA_ID_AUTH_INST/moa-id-auth.war nach
+ CATALINA_HOME_ID/webapps.
+ Für MOA ID Proxy:
+ Kopieren Sie die Datei MOA_ID_PROXY_INST/moa-id-proxy.war nach
+ CATALINA_HOME_ID/webappsProxy.
+
+5. Erstellen Sie eine Sicherungskopie aller "iaik*.jar"-Dateien im Verzeichnis
+ JAVA_HOME\jre\lib\ext und löschen Sie diese Dateien danach.
+
+6. Kopieren Sie alle Dateien aus dem Verzeichnis MOA_ID_INST_AUTH\ext in das
+ Verzeichnis JAVA_HOME\jre\lib\ext.
+
+7. Kopieren Sie die zwei Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/transforms in das Verzeichnis transforms Ihres
+ Stammverzeichnisses für die MOA ID Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_ID/conf/moa-id; in weiterer Folge
+ wird davon ausgegangen).
+ Weiters editieren Sie ihre MOA ID Konfiguration wie folgt:
+ * Im Element MOA-IDConfiguration/AuthComponent/SecurityLayer fügen
+ Sie eine der folgende Zeilen ein:
+ <TransformsInfo filename="transforms/TransformsInfoAuthBlockTable_EN.xml"/>
+ <TransformsInfo filename="transforms/TransformsInfoAuthBlockTable_DE.xml"/>
+ je nachdem ob sie einen englischen oder deutschen Text zur
+ Anzeige wünschen.
+ Alle weiteren TransformsInfo Elemente löschen Sie bitte.
+ * Im Element AuthComponent/MOA-SP/VerifyAuthBlock fügen Sie eine
+ der folgende Zeilen ein:
+ <VerifyTransformsInfoProfileID>MOAIDTransformAuthBlockTable_DE</VerifyTransformsInfoProfileID>
+ <VerifyTransformsInfoProfileID>MOAIDTransformAuthBlockTable_EN</VerifyTransformsInfoProfileID>
+ je nachdem ob sie einen englischen oder deutschen Text zur
+ Anzeige ausgewählt haben.
+ Alle weiteren VerifyTransformsInfoProfileID Elemente löschen
+ Sie bitte.
+8. Kopieren Sie die zwei Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-spss/profiles in das Verzeichnis profiles Ihres
+ Stammverzeichnisses für die MOA SPSS Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_SPSS/conf/moa-spss, wobei
+ CATALINA_HOME_SPSS für das Basisverzeichnis der Tomcat-Installation
+ für MOA SPSS steht; wenn Sie MOA SPSS nicht als eigenes Webservice
+ betreiben, sondern es von MOA ID über die API-Schnittstelle angesprochen
+ wird, lautet dieses Stammverzeichnis für gewöhnlich
+ CATALINA_HOME_ID/conf/moa-spss.
+ Weiters editieren Sie ihre MOA SPSS Konfiguration wie folgt:
+ * Im Element MOAConfiguration/SignatureVerification fügen Sie folgende
+ Zeilen ein:
+ <cfg:VerifyTransformsInfoProfile>
+ <cfg:Id>MOAIDTransformAuthBlockTable_DE</cfg:Id>
+ <cfg:Location>profiles/MOAIDTransformAuthBlockTable_DE.xml</cfg:Location>
+ </cfg:VerifyTransformsInfoProfile>
+ <cfg:VerifyTransformsInfoProfile>
+ <cfg:Id>MOAIDTransformAuthBlockTable_EN</cfg:Id>
+ <cfg:Location>profiles/MOAIDTransformAuthBlockTable_EN.xml</cfg:Location>
+ </cfg:VerifyTransformsInfoProfile>
+
+9. Kopieren Sie die drei Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/certs/ca-certs in das Verzeichnis
+ certs/ca-certs Ihres Stammverzeichnisses für die MOA ID Konfiguration
+ (für gewöhnlich lautet dieses Stammverzeichnis CATALINA_HOME_ID/conf/moa-id;
+ in weiterer Folge wird davon ausgegangen).
+ Weiters editieren Sie ihre MOA ID Konfiguration wie folgt:
+ * Im Element MOA-IDConfiguration/AuthComponent fügend Sie als letztes
+ Kind-Element folgende Zeilen ein:
+ <ForeignIdentities>
+ <ConnectionParameter URL="https://gateway.stammzahlenregister.gv.at/services/IdentityLinkCreation">
+ <ClientKeyStore password="password">cert/clientcert.p12</ClientKeyStore>
+ </ConnectionParameter>
+ </ForeignIdentities>
+
+ Anmerkung: Im ClientKeyStore Element geben Sie den Client Keystore für
+ den Zugriff auf das Stammzahlenregister-Gateway an. Voraussetzung ist
+ ein A-Trust oder A-CERT Zertifikat mit Verwaltungseigenschaft. Wenn
+ ihr MOA-ID Zertifikat diese Voraussetzung erfüllt, können Sie dieses
+ hier angeben.
+
+10. Update des Cert-Stores.
+ Kopieren Sie den Inhalt des Verzeichnisses
+ MOA_ID_INST_AUTH\conf\moa-spss\certstore in das Verzeichnis
+ CATALINA_HOME\conf\moa-spss\certstore. Wenn Sie gefragt werden, ob Sie
+ vorhandene Dateien oder Unterverzeichnisse überschreiben sollen, dann
+ bejahen sie das.
+
+11. Update der Trust-Profile. Achten sie bei Case-sensitiven Betriebssystemen
+ auf die Profilbezeichnungen. Aus trustprofiles wurde trustProfiles.
+ Wenn Sie Ihre alten Trust-Profile durch die neuen ersetzen wollen, dann
+ gehen Sie vor, wie in Punkt a). Wenn Sie Ihre eigenen Trust-Profile
+ beibehalten wollen, dann gehen Sie vor, wie in Punkt b).
+
+ a. Gehen Sie wie folgt vor, um die Trust-Profile auszutauschen:
+
+ 1) Löschen Sie das Verzeichnis CATALINA_HOME\conf\moa-spss\trustprofiles.
+ 2) Kopieren Sie das Verzeichnis
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles in das Verzeichnis
+ CATALINA_HOME\conf\moa-spss.
+
+ b. Falls Sie Ihre alten Trust-Profile beibehalten wollen, gehen Sie wie
+ folgt vor, um die Profile auf den aktuellen Stand zu bringen:
+
+ 1) Benennen Sie ein eventuell vorhandenes Verzeichnis trustprofiles in
+ trustProfiles um (vergessen Sie nicht, diese Änderung in Ihrer
+ MOA-SP/SS Konfigurationsdatei ebenfalls zu berücksichtigen und
+ benennen Sie dort alle gleichartigen Vorkommen von trustprofiles
+ in trustProfiles um)
+
+ 2) Ergänzen Sie ihre Trustprofile durch alle Zertifikate aus den
+ entsprechenden Profilen im Verzeichnis
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles, die nicht in Ihren
+ Profilen enthalten sind. Am einfachsten ist es, wenn Sie den Inhalt
+ der einzelnen Profile aus der Distribution
+ (MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles) in die entsprechenden
+ Profile Ihrer Installation (CATALINA_HOME\conf\moa-spss\trustProfiles)
+ kopieren und dabei die vorhandenen gleichnamigen Zertifikate
+ überschreiben), also z.B: Kopieren des Inhalts von
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles\
+ MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten nach
+ CATALINA_HOME\conf\moa-spss\trustProfiles\
+ MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten usw.
+
+13. Sichern Sie ihre MOA-ID Konfigurationsdatei. Kopieren Sie die
+ Beispielkonfigurationsdateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/SampleMOA*.xml nach
+ CATALINA_HOME_ID/conf/moa-id.
+ Verwenden Sie in Ihrer Installation bereits die Vollmachtenprüfung, so
+ verschieben Sie bitte in der MOA-ID Installationsdatei das Element
+ <CompatibilityMode> innerhalb des Konfigurationsteiles für die berufliche
+ Parteienvertreung (ParepSpecificParameters) unter das Element
+ ApplicationSpecificParameters.
+
+
+14. Starten Sie den Tomcat neu, achten Sie auf eventuelle Fehlermeldungen im
+ Logging von MOA ID beim Einlesen der erneuerten Konfiguration.
+
+...............................................................................
+B.4 Durchführung eines Updates von einer älteren Version
+...............................................................................
+
+Bitte führen Sie eine Neuinstallation von MOA ID laut Handbuch durch und passen
+Sie die mitgelieferte Musterkonfiguration entsprechend Ihren Bedürfnissen unter
+Zuhilfenahme Ihrer bisherigen Konfiguration an.
+
diff --git a/id/readme_1.5.0.txt b/id/readme_1.5.0.txt
new file mode 100644
index 000000000..56a08cc0c
--- /dev/null
+++ b/id/readme_1.5.0.txt
@@ -0,0 +1,431 @@
+===============================================================================
+MOA ID Version 1.5.0 - Wichtige Informationen zur Installation
+===============================================================================
+
+-------------------------------------------------------------------------------
+A. Neuerungen/Änderungen
+-------------------------------------------------------------------------------
+
+Mit MOA ID Version 1.5.0 wurden folgende Neuerungen eingeführt, die jetzt
+erstmals in der Veröffentlichung enthalten sind (siehe auch history.txt im
+gleichen Verzeichnis):
+
+- Fixed Bug #552 (http://egovlabs.gv.at/tracker/index.php?func=detail&aid=552&group_id=6&atid=105)
+- Fixed Bug #551 (http://egovlabs.gv.at/tracker/index.php?func=detail&aid=551&group_id=6&atid=105)
+- Fixed Bug #550 (http://egovlabs.gv.at/tracker/index.php?func=detail&aid=550&group_id=6&atid=105)
+- IAIK Libraries aktualisiert:
+ iaik-moa: Version 1.29
+ iaik_jce_full: Version 4.0_MOA
+ iaik_cms: Version 4.1_MOA
+- Update Parameterüberprüfung
+- Einbindung von Online-Vollmachten
+- Update MOA-Template zur Bürgerkartenauswahl
+- Update Transformationen (für Online-Vollmachten)
+- Änderung der Konfiguration für:
+ - Angabe einer Liste von vertrauenswürdigen BKUs (aufgrund Parameterprüfung)
+ - Online-Vollmachten
+-------------------------------------------------------------------------------
+B. Durchführung eines Updates
+-------------------------------------------------------------------------------
+
+Es wird generell eine Neuinstallation lt. Handbuch empfohlen! Dennoch ist auch
+eine Aktualisierung bestehender Installationen möglich.
+
+...............................................................................
+B.1 Durchführung eines Updates von Version 1.4.8
+...............................................................................
+
+1. Stoppen Sie den Tomcat, in dem Ihre bisherige Installation betrieben wird.
+ Fertigen Sie eine Sicherungskopie Ihrer kompletten Tomcat-Installation an.
+
+2. Entpacken Sie die Distribution von MOA ID Auth (moa-id-auth-1.5.0.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_AUTH_INST
+ bezeichnet.
+ Für MOA ID Proxy:
+ Entpacken Sie die Distribution von MOA ID Proxy (moa-id-proxy-1.5.0.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_PROXY_INST
+ bezeichnet.
+
+3. Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Auth
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/webapps,
+ wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-auth.war als
+ auch das komplette Verzeichnis moa-id-auth.
+ Für MOA ID Proxy:
+ Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Proxy
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/
+ webappsProxy, wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-proxy.war als
+ auch das komplette Verzeichnis moa-id-proxy.
+
+4. Kopieren Sie die Datei MOA_ID_AUTH_INST/moa-id-auth.war nach
+ CATALINA_HOME_ID/webapps.
+ Für MOA ID Proxy:
+ Kopieren Sie die Datei MOA_ID_PROXY_INST/moa-id-proxy.war nach
+ CATALINA_HOME_ID/webappsProxy.
+
+5. Erstellen Sie eine Sicherungskopie aller "iaik*.jar"-Dateien im Verzeichnis
+ JAVA_HOME\jre\lib\ext und löschen Sie diese Dateien danach.
+
+6. Kopieren Sie alle Dateien aus dem Verzeichnis MOA_ID_INST_AUTH\ext in das
+ Verzeichnis JAVA_HOME\jre\lib\ext.
+
+7. Kopieren Sie die zwei Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/transforms in das Verzeichnis transforms Ihres
+ Stammverzeichnisses für die MOA ID Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_ID/conf/moa-id; in weiterer Folge
+ wird davon ausgegangen).
+
+8. Kopieren Sie die zwei Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-spss/profiles in das Verzeichnis profiles Ihres
+ Stammverzeichnisses für die MOA SPSS Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_SPSS/conf/moa-spss, wobei
+ CATALINA_HOME_SPSS für das Basisverzeichnis der Tomcat-Installation
+ für MOA SPSS steht; wenn Sie MOA SPSS nicht als eigenes Webservice
+ betreiben, sondern es von MOA ID über die API-Schnittstelle angesprochen
+ wird, lautet dieses Stammverzeichnis für gewöhnlich
+ CATALINA_HOME_ID/conf/moa-spss.
+
+9. Update der MOA-ID Konfiguration: Fügen sie als letztes Kindelement von
+ MOA-IDConfiguration folgendes ein:
+ <TrustedBKUs>
+ <BKUURL>https://www.handy-signatur.at/mobile/https-security-layer-request/default.aspx</BKUURL>
+ <BKUURL>https://www.a-trust.at/mobile/https-security-layer-request/default.aspx</BKUURL>
+ </TrustedBKUs>
+ Fügen Sie allfällige weitere URLs zu verwendeten BKUs hinzu (bspw. eine
+ Online-BKU)
+ Ab Version 1.5.0 überprüft MOA-ID den Parameter bkuURI ob diese URI in der
+ Konfiguration vorhanden ist. URIs für lokale BKUs müssen nicht
+ angegeben werden.
+
+10. Starten Sie den Tomcat neu, achten Sie auf eventuelle Fehlermeldungen im
+ Logging von MOA ID beim Einlesen der Konfiguration.
+
+
+...............................................................................
+B.2 Durchführung eines Updates von Version 1.4.3 oder 1.4.4 oder 1.4.5 oder
+ 1.4.6
+...............................................................................
+
+1. Stoppen Sie den Tomcat, in dem Ihre bisherige Installation betrieben wird.
+ Fertigen Sie eine Sicherungskopie Ihrer kompletten Tomcat-Installation an.
+
+2. Entpacken Sie die Distribution von MOA ID Auth (moa-id-auth-1.4.8.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_AUTH_INST
+ bezeichnet.
+ Für MOA ID Proxy:
+ Entpacken Sie die Distribution von MOA ID Proxy (moa-id-proxy-1.4.8.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_PROXY_INST
+ bezeichnet.
+
+3. Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Auth
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/webapps,
+ wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-auth.war als
+ auch das komplette Verzeichnis moa-id-auth.
+ Für MOA ID Proxy:
+ Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Proxy
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/
+ webappsProxy, wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-proxy.war als
+ auch das komplette Verzeichnis moa-id-proxy.
+
+4. Kopieren Sie die Datei MOA_ID_AUTH_INST/moa-id-auth.war nach
+ CATALINA_HOME_ID/webapps.
+ Für MOA ID Proxy:
+ Kopieren Sie die Datei MOA_ID_PROXY_INST/moa-id-proxy.war nach
+ CATALINA_HOME_ID/webappsProxy.
+
+5. Erstellen Sie eine Sicherungskopie aller "iaik*.jar"-Dateien im Verzeichnis
+ JAVA_HOME\jre\lib\ext und löschen Sie diese Dateien danach.
+
+6. Kopieren Sie alle Dateien aus dem Verzeichnis MOA_ID_INST_AUTH\ext in das
+ Verzeichnis JAVA_HOME\jre\lib\ext.
+
+7. Kopieren Sie die zwei Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/transforms in das Verzeichnis transforms Ihres
+ Stammverzeichnisses für die MOA ID Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_ID/conf/moa-id; in weiterer Folge
+ wird davon ausgegangen).
+ Weiters editieren Sie ihre MOA ID Konfiguration wie folgt:
+ * Im Element MOA-IDConfiguration/AuthComponent/SecurityLayer fügen
+ Sie eine der folgende Zeilen ein:
+ <TransformsInfo filename="transforms/TransformsInfoAuthBlockTable_EN.xml"/>
+ <TransformsInfo filename="transforms/TransformsInfoAuthBlockTable_DE.xml"/>
+ je nachdem ob sie einen englischen oder deutschen Text zur
+ Anzeige wünschen.
+ Alle weiteren TransformsInfo Elemente löschen Sie bitte.
+ * Im Element AuthComponent/MOA-SP/VerifyAuthBlock fügen Sie eine
+ der folgende Zeilen ein:
+ <VerifyTransformsInfoProfileID>MOAIDTransformAuthBlockTable_DE</VerifyTransformsInfoProfileID>
+ <VerifyTransformsInfoProfileID>MOAIDTransformAuthBlockTable_EN</VerifyTransformsInfoProfileID>
+ je nachdem ob Sie einen englischen oder deutschen Text zur
+ Anzeige ausgewählt haben.
+ Alle weiteren VerifyTransformsInfoProfileID Elemente löschen
+ Sie bitte.
+8. Kopieren Sie die zwei Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-spss/profiles in das Verzeichnis profiles Ihres
+ Stammverzeichnisses für die MOA SPSS Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_SPSS/conf/moa-spss, wobei
+ CATALINA_HOME_SPSS für das Basisverzeichnis der Tomcat-Installation
+ für MOA SPSS steht; wenn Sie MOA SPSS nicht als eigenes Webservice
+ betreiben, sondern es von MOA ID über die API-Schnittstelle angesprochen
+ wird, lautet dieses Stammverzeichnis für gewöhnlich
+ CATALINA_HOME_ID/conf/moa-spss.
+ Weiters editieren Sie ihre MOA SPSS Konfiguration wie folgt:
+ * Im Element MOAConfiguration/SignatureVerification fügen Sie folgende
+ Zeilen ein:
+ <cfg:VerifyTransformsInfoProfile>
+ <cfg:Id>MOAIDTransformAuthBlockTable_DE</cfg:Id>
+ <cfg:Location>profiles/MOAIDTransformAuthBlockTable_DE.xml</cfg:Location>
+ </cfg:VerifyTransformsInfoProfile>
+ <cfg:VerifyTransformsInfoProfile>
+ <cfg:Id>MOAIDTransformAuthBlockTable_EN</cfg:Id>
+ <cfg:Location>profiles/MOAIDTransformAuthBlockTable_EN.xml</cfg:Location>
+ </cfg:VerifyTransformsInfoProfile>
+
+9. Kopieren Sie die drei Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/certs/ca-certs in das Verzeichnis
+ certs/ca-certs Ihres Stammverzeichnisses für die MOA ID Konfiguration
+ (für gewöhnlich lautet dieses Stammverzeichnis CATALINA_HOME_ID/conf/moa-id;
+ in weiterer Folge wird davon ausgegangen).
+ Weiters editieren Sie ihre MOA ID Konfiguration wie folgt:
+ * Im Element MOA-IDConfiguration/AuthComponent fügend Sie als letztes
+ Kind-Element folgende Zeilen ein:
+ <ForeignIdentities>
+ <ConnectionParameter URL="https://gateway.stammzahlenregister.gv.at/services/IdentityLinkCreation">
+ <ClientKeyStore password="password">cert/clientcert.p12</ClientKeyStore>
+ </ConnectionParameter>
+ </ForeignIdentities>
+
+ Anmerkung: Im ClientKeyStore Element geben Sie den Client Keystore für
+ den Zugriff auf das Stammzahlenregister-Gateway an. Voraussetzung ist
+ ein A-Trust oder A-CERT Zertifikat mit Verwaltungseigenschaft. Wenn
+ ihr MOA-ID Zertifikat diese Voraussetzung erfüllt, können Sie dieses
+ hier angeben.
+
+10. Update des Cert-Stores.
+ Kopieren Sie den Inhalt des Verzeichnisses
+ MOA_ID_INST_AUTH\conf\moa-spss\certstore in das Verzeichnis
+ CATALINA_HOME\conf\moa-spss\certstore. Wenn Sie gefragt werden, ob Sie
+ vorhandene Dateien oder Unterverzeichnisse überschreiben sollen, dann
+ bejahen sie das.
+
+11. Update der Trust-Profile. Achten sie bei Case-sensitiven Betriebssystemen
+ auf die Profilbezeichnungen. Aus trustprofiles wurde trustProfiles.
+ Wenn Sie Ihre alten Trust-Profile durch die neuen ersetzen wollen, dann
+ gehen Sie vor, wie in Punkt a). Wenn Sie Ihre eigenen Trust-Profile
+ beibehalten wollen, dann gehen Sie vor, wie in Punkt b).
+
+ a. Gehen Sie wie folgt vor, um die Trust-Profile auszutauschen:
+
+ 1) Löschen Sie das Verzeichnis CATALINA_HOME\conf\moa-spss\trustprofiles.
+ 2) Kopieren Sie das Verzeichnis
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles in das Verzeichnis
+ CATALINA_HOME\conf\moa-spss.
+
+ b. Falls Sie Ihre alten Trust-Profile beibehalten wollen, gehen Sie wie
+ folgt vor, um die Profile auf den aktuellen Stand zu bringen:
+
+ 1) Benennen Sie ein eventuell vorhandenes Verzeichnis trustprofiles in
+ trustProfiles um (vergessen Sie nicht, diese Änderung in Ihrer
+ MOA-SP/SS Konfigurationsdatei ebenfalls zu berücksichtigen und
+ benennen Sie dort alle gleichartigen Vorkommen von trustprofiles
+ in trustProfiles um)
+
+ 2) Ergänzen Sie ihre Trustprofile durch alle Zertifikate aus den
+ entsprechenden Profilen im Verzeichnis
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles, die nicht in Ihren
+ Profilen enthalten sind. Am einfachsten ist es, wenn Sie den Inhalt
+ der einzelnen Profile aus der Distribution
+ (MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles) in die entsprechenden
+ Profile Ihrer Installation (CATALINA_HOME\conf\moa-spss\trustProfiles)
+ kopieren und dabei die vorhandenen gleichnamigen Zertifikate
+ überschreiben), also z.B: Kopieren des Inhalts von
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles\
+ MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten nach
+ CATALINA_HOME\conf\moa-spss\trustProfiles\
+ MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten usw.
+
+12. Update der MOA-ID Konfiguration: Fügen sie als letztes Kindelement von
+ MOA-IDConfiguration folgendes ein:
+ <TrustedBKUs>
+ <BKUURL>https://www.handy-signatur.at/mobile/https-security-layer-request/default.aspx</BKUURL>
+ <BKUURL>https://www.a-trust.at/mobile/https-security-layer-request/default.aspx</BKUURL>
+ </TrustedBKUs>
+ Fügen Sie allfällige weitere URLs zu verwendeten BKUs hinzu (bspw. eine
+ Online-BKU)
+ Ab Version 1.5.0 überprüft MOA-ID den Parameter bkuURI ob diese URI in der
+ Konfiguration vorhanden ist. URIs für lokale BKUs müssen nicht
+ angegeben werden.
+
+13. Starten Sie den Tomcat neu, achten Sie auf eventuelle Fehlermeldungen im
+ Logging von MOA ID beim Einlesen der erneuerten Konfiguration.
+
+...............................................................................
+B.3 Durchführung eines Updates von Version 1.4.1 oder 1.4.2 (incl. beta 1)
+...............................................................................
+
+1. Stoppen Sie den Tomcat, in dem Ihre bisherige Installation betrieben wird.
+ Fertigen Sie eine Sicherungskopie Ihrer kompletten Tomcat-Installation an.
+
+2. Entpacken Sie die Distribution von MOA ID Auth (moa-id-auth-1.4.8.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_AUTH_INST
+ bezeichnet.
+ Für MOA ID Proxy:
+ Entpacken Sie die Distribution von MOA ID Proxy (moa-id-proxy-1.4.8.zip) in
+ ein temporäres Verzeichnis, in weiterer Folge als MOA_ID_PROXY_INST
+ bezeichnet.
+
+3. Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Auth
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/webapps,
+ wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-auth.war als
+ auch das komplette Verzeichnis moa-id-auth.
+ Für MOA ID Proxy:
+ Wechseln Sie in jenes Verzeichnis, das die Webapplikation von MOA ID Proxy
+ beinhaltet (für gewöhnlich ist dieses Verzeichnis CATALINA_HOME_ID/
+ webappsProxy, wobei CATALINA_HOME_ID für das Basisverzeichnis der Tomcat-Installation
+ für MOA ID steht). Löschen Sie darin sowohl die Datei moa-id-proxy.war als
+ auch das komplette Verzeichnis moa-id-proxy.
+
+4. Kopieren Sie die Datei MOA_ID_AUTH_INST/moa-id-auth.war nach
+ CATALINA_HOME_ID/webapps.
+ Für MOA ID Proxy:
+ Kopieren Sie die Datei MOA_ID_PROXY_INST/moa-id-proxy.war nach
+ CATALINA_HOME_ID/webappsProxy.
+
+5. Erstellen Sie eine Sicherungskopie aller "iaik*.jar"-Dateien im Verzeichnis
+ JAVA_HOME\jre\lib\ext und löschen Sie diese Dateien danach.
+
+6. Kopieren Sie alle Dateien aus dem Verzeichnis MOA_ID_INST_AUTH\ext in das
+ Verzeichnis JAVA_HOME\jre\lib\ext.
+
+7. Kopieren Sie die zwei Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/transforms in das Verzeichnis transforms Ihres
+ Stammverzeichnisses für die MOA ID Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_ID/conf/moa-id; in weiterer Folge
+ wird davon ausgegangen).
+ Weiters editieren Sie ihre MOA ID Konfiguration wie folgt:
+ * Im Element MOA-IDConfiguration/AuthComponent/SecurityLayer fügen
+ Sie eine der folgende Zeilen ein:
+ <TransformsInfo filename="transforms/TransformsInfoAuthBlockTable_EN.xml"/>
+ <TransformsInfo filename="transforms/TransformsInfoAuthBlockTable_DE.xml"/>
+ je nachdem ob sie einen englischen oder deutschen Text zur
+ Anzeige wünschen.
+ Alle weiteren TransformsInfo Elemente löschen Sie bitte.
+ * Im Element AuthComponent/MOA-SP/VerifyAuthBlock fügen Sie eine
+ der folgende Zeilen ein:
+ <VerifyTransformsInfoProfileID>MOAIDTransformAuthBlockTable_DE</VerifyTransformsInfoProfileID>
+ <VerifyTransformsInfoProfileID>MOAIDTransformAuthBlockTable_EN</VerifyTransformsInfoProfileID>
+ je nachdem ob sie einen englischen oder deutschen Text zur
+ Anzeige ausgewählt haben.
+ Alle weiteren VerifyTransformsInfoProfileID Elemente löschen
+ Sie bitte.
+8. Kopieren Sie die zwei Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-spss/profiles in das Verzeichnis profiles Ihres
+ Stammverzeichnisses für die MOA SPSS Konfiguration (für gewöhnlich lautet
+ dieses Stammverzeichnis CATALINA_HOME_SPSS/conf/moa-spss, wobei
+ CATALINA_HOME_SPSS für das Basisverzeichnis der Tomcat-Installation
+ für MOA SPSS steht; wenn Sie MOA SPSS nicht als eigenes Webservice
+ betreiben, sondern es von MOA ID über die API-Schnittstelle angesprochen
+ wird, lautet dieses Stammverzeichnis für gewöhnlich
+ CATALINA_HOME_ID/conf/moa-spss.
+ Weiters editieren Sie ihre MOA SPSS Konfiguration wie folgt:
+ * Im Element MOAConfiguration/SignatureVerification fügen Sie folgende
+ Zeilen ein:
+ <cfg:VerifyTransformsInfoProfile>
+ <cfg:Id>MOAIDTransformAuthBlockTable_DE</cfg:Id>
+ <cfg:Location>profiles/MOAIDTransformAuthBlockTable_DE.xml</cfg:Location>
+ </cfg:VerifyTransformsInfoProfile>
+ <cfg:VerifyTransformsInfoProfile>
+ <cfg:Id>MOAIDTransformAuthBlockTable_EN</cfg:Id>
+ <cfg:Location>profiles/MOAIDTransformAuthBlockTable_EN.xml</cfg:Location>
+ </cfg:VerifyTransformsInfoProfile>
+
+9. Kopieren Sie die drei Dateien aus dem Verzeichnis
+ MOA_ID_AUTH_INST/conf/moa-id/certs/ca-certs in das Verzeichnis
+ certs/ca-certs Ihres Stammverzeichnisses für die MOA ID Konfiguration
+ (für gewöhnlich lautet dieses Stammverzeichnis CATALINA_HOME_ID/conf/moa-id;
+ in weiterer Folge wird davon ausgegangen).
+ Weiters editieren Sie ihre MOA ID Konfiguration wie folgt:
+ * Im Element MOA-IDConfiguration/AuthComponent fügend Sie als letztes
+ Kind-Element folgende Zeilen ein:
+ <ForeignIdentities>
+ <ConnectionParameter URL="https://gateway.stammzahlenregister.gv.at/services/IdentityLinkCreation">
+ <ClientKeyStore password="password">cert/clientcert.p12</ClientKeyStore>
+ </ConnectionParameter>
+ </ForeignIdentities>
+
+ Anmerkung: Im ClientKeyStore Element geben Sie den Client Keystore für
+ den Zugriff auf das Stammzahlenregister-Gateway an. Voraussetzung ist
+ ein A-Trust oder A-CERT Zertifikat mit Verwaltungseigenschaft. Wenn
+ ihr MOA-ID Zertifikat diese Voraussetzung erfüllt, können Sie dieses
+ hier angeben.
+
+10. Update des Cert-Stores.
+ Kopieren Sie den Inhalt des Verzeichnisses
+ MOA_ID_INST_AUTH\conf\moa-spss\certstore in das Verzeichnis
+ CATALINA_HOME\conf\moa-spss\certstore. Wenn Sie gefragt werden, ob Sie
+ vorhandene Dateien oder Unterverzeichnisse überschreiben sollen, dann
+ bejahen sie das.
+
+11. Update der Trust-Profile. Achten sie bei Case-sensitiven Betriebssystemen
+ auf die Profilbezeichnungen. Aus trustprofiles wurde trustProfiles.
+ Wenn Sie Ihre alten Trust-Profile durch die neuen ersetzen wollen, dann
+ gehen Sie vor, wie in Punkt a). Wenn Sie Ihre eigenen Trust-Profile
+ beibehalten wollen, dann gehen Sie vor, wie in Punkt b).
+
+ a. Gehen Sie wie folgt vor, um die Trust-Profile auszutauschen:
+
+ 1) Löschen Sie das Verzeichnis CATALINA_HOME\conf\moa-spss\trustprofiles.
+ 2) Kopieren Sie das Verzeichnis
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles in das Verzeichnis
+ CATALINA_HOME\conf\moa-spss.
+
+ b. Falls Sie Ihre alten Trust-Profile beibehalten wollen, gehen Sie wie
+ folgt vor, um die Profile auf den aktuellen Stand zu bringen:
+
+ 1) Benennen Sie ein eventuell vorhandenes Verzeichnis trustprofiles in
+ trustProfiles um (vergessen Sie nicht, diese Änderung in Ihrer
+ MOA-SP/SS Konfigurationsdatei ebenfalls zu berücksichtigen und
+ benennen Sie dort alle gleichartigen Vorkommen von trustprofiles
+ in trustProfiles um)
+
+ 2) Ergänzen Sie ihre Trustprofile durch alle Zertifikate aus den
+ entsprechenden Profilen im Verzeichnis
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles, die nicht in Ihren
+ Profilen enthalten sind. Am einfachsten ist es, wenn Sie den Inhalt
+ der einzelnen Profile aus der Distribution
+ (MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles) in die entsprechenden
+ Profile Ihrer Installation (CATALINA_HOME\conf\moa-spss\trustProfiles)
+ kopieren und dabei die vorhandenen gleichnamigen Zertifikate
+ überschreiben), also z.B: Kopieren des Inhalts von
+ MOA_ID_INST_AUTH\conf\moa-spss\trustProfiles\
+ MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten nach
+ CATALINA_HOME\conf\moa-spss\trustProfiles\
+ MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten usw.
+
+12. Update der MOA-ID Konfiguration: Fügen sie als letztes Kindelement von
+ MOA-IDConfiguration folgendes ein:
+ <TrustedBKUs>
+ <BKUURL>https://www.handy-signatur.at/mobile/https-security-layer-request/default.aspx</BKUURL>
+ <BKUURL>https://www.a-trust.at/mobile/https-security-layer-request/default.aspx</BKUURL>
+ </TrustedBKUs>
+ Fügen Sie allfällige weitere URLs zu verwendeten BKUs hinzu (bspw. eine
+ Online-BKU)
+ Ab Version 1.5.0 überprüft MOA-ID den Parameter bkuURI ob diese URI in der
+ Konfiguration vorhanden ist. URIs für lokale BKUs müssen nicht
+ angegeben werden.
+
+13. Starten Sie den Tomcat neu, achten Sie auf eventuelle Fehlermeldungen im
+ Logging von MOA ID beim Einlesen der erneuerten Konfiguration.
+
+...............................................................................
+B.4 Durchführung eines Updates von einer älteren Version
+...............................................................................
+
+Bitte führen Sie eine Neuinstallation von MOA ID laut Handbuch durch und passen
+Sie die mitgelieferte Musterkonfiguration entsprechend Ihren Bedürfnissen unter
+Zuhilfenahme Ihrer bisherigen Konfiguration an.
+
diff --git a/id/server/.classpath b/id/server/.classpath
new file mode 100644
index 000000000..f93d181b5
--- /dev/null
+++ b/id/server/.classpath
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/id/server/.project b/id/server/.project
new file mode 100644
index 000000000..4608c7645
--- /dev/null
+++ b/id/server/.project
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>moa-id</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
diff --git a/id/server/.settings/org.eclipse.jdt.core.prefs b/id/server/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..367041b1b
--- /dev/null
+++ b/id/server/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,5 @@
+#Tue Jul 07 16:07:16 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.source=1.4
diff --git a/id/server/.settings/org.maven.ide.eclipse.prefs b/id/server/.settings/org.maven.ide.eclipse.prefs
new file mode 100644
index 000000000..3f907cfa1
--- /dev/null
+++ b/id/server/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,9 @@
+#Tue Jul 07 16:06:59 CEST 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
diff --git a/id/server/auth/.classpath b/id/server/auth/.classpath
new file mode 100644
index 000000000..6acd7de03
--- /dev/null
+++ b/id/server/auth/.classpath
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v5.0"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/id/server/auth/.project b/id/server/auth/.project
new file mode 100644
index 000000000..46166c2f3
--- /dev/null
+++ b/id/server/auth/.project
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>moa-id-auth</name>
+ <comment></comment>
+ <projects>
+ <project>moa-common</project>
+ <project>moa-id-lib</project>
+ <project>moa-spss-lib</project>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>kr.javanese.devtools.m2wtp.wtpDepBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>kr.javanese.devtools.m2wtp.m2wtpNature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ </natures>
+</projectDescription>
diff --git a/id/server/auth/.settings/.jsdtscope b/id/server/auth/.settings/.jsdtscope
new file mode 100644
index 000000000..f40dd98e2
--- /dev/null
+++ b/id/server/auth/.settings/.jsdtscope
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
diff --git a/id/server/auth/.settings/org.eclipse.jdt.core.prefs b/id/server/auth/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..63fe7cb8a
--- /dev/null
+++ b/id/server/auth/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Fri Nov 16 13:12:23 CET 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.source=1.4
diff --git a/id/server/auth/.settings/org.eclipse.wst.common.component b/id/server/auth/.settings/org.eclipse.wst.common.component
new file mode 100644
index 000000000..b116cf610
--- /dev/null
+++ b/id/server/auth/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+<wb-module deploy-name="moa-id-auth">
+<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
+ <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
+ <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/moa-spss-lib/moa-spss-lib">
+ <dependency-type>uses</dependency-type>
+ </dependent-module>
+ <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/moa-common/moa-common">
+ <dependency-type>uses</dependency-type>
+ </dependent-module>
+ <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/moa-id-lib/moa-id-lib">
+ <dependency-type>uses</dependency-type>
+ </dependent-module>
+<property name="java-output-path" value="target/classes"/>
+ <property name="context-root" value="moa-id-auth"/>
+</wb-module>
+</project-modules>
diff --git a/id/server/auth/.settings/org.eclipse.wst.common.project.facet.core.xml b/id/server/auth/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 000000000..f30a1de6e
--- /dev/null
+++ b/id/server/auth/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <installed facet="jst.java" version="1.4"/>
+ <installed facet="jst.web" version="2.3"/>
+</faceted-project>
diff --git a/id/server/auth/.settings/org.eclipse.wst.jsdt.ui.superType.container b/id/server/auth/.settings/org.eclipse.wst.jsdt.ui.superType.container
new file mode 100644
index 000000000..3bd5d0a48
--- /dev/null
+++ b/id/server/auth/.settings/org.eclipse.wst.jsdt.ui.superType.container
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file
diff --git a/id/server/auth/.settings/org.eclipse.wst.jsdt.ui.superType.name b/id/server/auth/.settings/org.eclipse.wst.jsdt.ui.superType.name
new file mode 100644
index 000000000..05bd71b6e
--- /dev/null
+++ b/id/server/auth/.settings/org.eclipse.wst.jsdt.ui.superType.name
@@ -0,0 +1 @@
+Window \ No newline at end of file
diff --git a/id/server/auth/.settings/org.maven.ide.eclipse.prefs b/id/server/auth/.settings/org.maven.ide.eclipse.prefs
new file mode 100644
index 000000000..a45f64227
--- /dev/null
+++ b/id/server/auth/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,9 @@
+#Tue Jul 07 16:07:00 CEST 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
diff --git a/id/server/auth/pom.xml b/id/server/auth/pom.xml
new file mode 100644
index 000000000..67d2e1abd
--- /dev/null
+++ b/id/server/auth/pom.xml
@@ -0,0 +1,123 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>MOA.id</groupId>
+ <artifactId>moa-id</artifactId>
+ <version>1.5.0</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>MOA.id.server</groupId>
+ <artifactId>moa-id-auth</artifactId>
+ <packaging>war</packaging>
+ <version>1.5.0</version>
+ <name>MOA ID-Auth WebService</name>
+
+ <properties>
+ <repositoryPath>${basedir}/../../../repository</repositoryPath>
+ </properties>
+
+ <build>
+ <!--sourceDirectory>${basedir}/../idserverlib/src/main/java</sourceDirectory-->
+ <!--testSourceDirectory>${basedir}/../idserverlib/src/test/java</testSourceDirectory-->
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <archive>
+ <manifest>
+ <addDefaultSpecificationEntries>false</addDefaultSpecificationEntries>
+ <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+ </manifest>
+ <addMavenDescriptor>false</addMavenDescriptor>
+ </archive>
+
+ <!-- extract moa-id classes for debugging -->
+ <!--warSourceExcludes>WEB-INF/lib/moa-id-lib*.jar</warSourceExcludes-->
+ <webResources>
+ <resource>
+ <directory>${basedir}/src/main/wsdl</directory>
+ <targetPath>WEB-INF/classes/resources/wsdl</targetPath>
+ </resource>
+ <!--
+ <resource>
+ <directory>${basedir}/../idserverlib/target/classes</directory>
+ <targetPath>WEB-INF/classes</targetPath>
+ </resource>
+-->
+ </webResources>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <!-- we need Axis 1.1 here, 1.0 is included in SPSS -->
+ <dependency>
+ <groupId>axis</groupId>
+ <artifactId>axis</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>MOA.spss.server</groupId>
+ <artifactId>moa-spss-lib</artifactId>
+ <!--version>${project.version}</version-->
+ </dependency>
+ <dependency>
+ <groupId>MOA.id.server</groupId>
+ <artifactId>moa-id-lib</artifactId>
+ <!--version>${project.version}</version -->
+ </dependency>
+ <!-- transitive dependencies we don't want to include into the war -->
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_jce_full</artifactId>
+ <!-- should be in the ext directory of the jre -->
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_ecc</artifactId>
+ <!-- should be in the ext directory of the jre -->
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Provider</artifactId>
+ <!-- should be in the ext directory of the jre -->
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Wrapper</artifactId>
+ <!-- should be in the ext directory of the jre -->
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>xalan</artifactId>
+ <!-- should be provided by the container or jre -->
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <!-- should be provided by the container or jre -->
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>xml-apis</artifactId>
+ <!-- should be provided by the container or jre -->
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>serializer</artifactId>
+ <!-- should be provided by the container or jre -->
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/id/server/auth/src/main/resources/META-INF/services/org.apache.axis.components.net.SecureSocketFactory b/id/server/auth/src/main/resources/META-INF/services/org.apache.axis.components.net.SecureSocketFactory
new file mode 100644
index 000000000..c4547e804
--- /dev/null
+++ b/id/server/auth/src/main/resources/META-INF/services/org.apache.axis.components.net.SecureSocketFactory
@@ -0,0 +1 @@
+at.gv.egovernment.moa.id.util.AxisSecureSocketFactory
diff --git a/id/server/auth/src/main/webapp/BKAuswahl-MOA-Template-Howto.pdf b/id/server/auth/src/main/webapp/BKAuswahl-MOA-Template-Howto.pdf
new file mode 100644
index 000000000..dcf38c218
--- /dev/null
+++ b/id/server/auth/src/main/webapp/BKAuswahl-MOA-Template-Howto.pdf
Binary files differ
diff --git a/id/server/auth/src/main/webapp/META-INF/MANIFEST.MF b/id/server/auth/src/main/webapp/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..58630c02e
--- /dev/null
+++ b/id/server/auth/src/main/webapp/META-INF/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+
diff --git a/id/server/auth/src/main/webapp/WCAG-Pruefprotokoll.pdf b/id/server/auth/src/main/webapp/WCAG-Pruefprotokoll.pdf
new file mode 100644
index 000000000..3722c5d7e
--- /dev/null
+++ b/id/server/auth/src/main/webapp/WCAG-Pruefprotokoll.pdf
Binary files differ
diff --git a/id/server/auth/src/main/webapp/WEB-INF/server-config.wsdd b/id/server/auth/src/main/webapp/WEB-INF/server-config.wsdd
new file mode 100644
index 000000000..0f0eb49d1
--- /dev/null
+++ b/id/server/auth/src/main/webapp/WEB-INF/server-config.wsdd
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deployment name="defaultClientConfig"
+ xmlns="http://xml.apache.org/axis/wsdd/"
+ xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
+ xmlns:handler="http://xml.apache.org/axis/wsdd/providers/handler">
+
+ <handler name="URLMapper" type="java:org.apache.axis.handlers.http.URLMapper"/>
+ <handler name="MsgDispatcher" type="java:org.apache.axis.providers.java.MsgProvider"/>
+ <handler name="HTTPAuthHandler" type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
+
+ <service name="GetAuthenticationData" provider="java:MSG">
+ <namespace>urn:oasis:names:tc:SAML:1.0:protocol</namespace>
+ <parameter name="allowedMethods" value="Request"/>
+ <parameter name="className" value="at.gv.egovernment.moa.id.auth.servlet.GetAuthenticationDataService"/>
+ <wsdlFile>/resources/wsdl/MOA-ID-1.x.wsdl</wsdlFile>
+ <requestFlow>
+ </requestFlow>
+ <responseFlow>
+ </responseFlow>
+ </service>
+
+ <transport name="http">
+ <requestFlow>
+ <handler type="URLMapper"/>
+ <handler type="HTTPAuthHandler"/>
+ </requestFlow>
+ </transport>
+
+</deployment>
diff --git a/id/server/auth/src/main/webapp/WEB-INF/web.xml b/id/server/auth/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 000000000..ef75dff24
--- /dev/null
+++ b/id/server/auth/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>
+<web-app>
+ <display-name>MOA ID Auth</display-name>
+ <description>MOA ID Authentication Service</description>
+ <servlet>
+ <servlet-name>SelectBKU</servlet-name>
+ <display-name>SelectBKU</display-name>
+ <description>Select Bürgerkartenartenumgebung</description>
+ <servlet-class>at.gv.egovernment.moa.id.auth.servlet.SelectBKUServlet</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>StartAuthentication</servlet-name>
+ <display-name>StartAuthentication</display-name>
+ <description>Start authentication process</description>
+ <servlet-class>at.gv.egovernment.moa.id.auth.servlet.StartAuthenticationServlet</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet>
+ <servlet-name>VerifyIdentityLink</servlet-name>
+ <display-name>VerifyIdentityLink</display-name>
+ <description>Verify identity link coming from security layer</description>
+ <servlet-class>at.gv.egovernment.moa.id.auth.servlet.VerifyIdentityLinkServlet</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>VerifyCertificate</servlet-name>
+ <display-name>VerifyCertificate</display-name>
+ <description>Verify the certificate coming from security layer</description>
+ <servlet-class>at.gv.egovernment.moa.id.auth.servlet.VerifyCertificateServlet</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>GetMISSessionID</servlet-name>
+ <display-name>GetMISSessionID</display-name>
+ <description>Get the MIS session ID coming from security layer</description>
+ <servlet-class>at.gv.egovernment.moa.id.auth.servlet.GetMISSessionIDServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>GetForeignID</servlet-name>
+ <display-name>GetForeignID</display-name>
+ <description>Gets the foreign eID from security layer</description>
+ <servlet-class>at.gv.egovernment.moa.id.auth.servlet.GetForeignIDServlet</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>ProcessInput</servlet-name>
+ <display-name>ProcessInput</display-name>
+ <description>Process user input needed by infobox validators</description>
+ <servlet-class>at.gv.egovernment.moa.id.auth.servlet.ProcessValidatorInputServlet</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>VerifyAuthBlock</servlet-name>
+ <display-name>VerifyAuthBlock</display-name>
+ <description>Verify AUTH block coming from security layer</description>
+ <servlet-class>at.gv.egovernment.moa.id.auth.servlet.VerifyAuthenticationBlockServlet</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>ConfigurationUpdate</servlet-name>
+ <display-name>ConfigurationUpdate</display-name>
+ <description>Update MOA-ID Auth configuration from the configuration file</description>
+ <servlet-class>at.gv.egovernment.moa.id.auth.servlet.ConfigurationServlet</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>AxisServlet</servlet-name>
+ <display-name>Apache-Axis Servlet</display-name>
+ <servlet-class>org.apache.axis.transport.http.AxisServlet</servlet-class>
+ </servlet>
+
+ <!-- JSP servlet -->
+ <servlet>
+ <servlet-name>jspservlet</servlet-name>
+ <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
+ </servlet>
+
+ <!-- servlet mapping for jsp pages -->
+ <!-- errorpage.jsp (customizeable) -->
+ <servlet-mapping>
+ <servlet-name>jspservlet</servlet-name>
+ <url-pattern>/errorpage-auth.jsp</url-pattern>
+ </servlet-mapping>
+ <!-- message.jsp (customizeable) used for non error messages (e.g. ConfigurationUpdate) -->
+ <servlet-mapping>
+ <servlet-name>jspservlet</servlet-name>
+ <url-pattern>/message-auth.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>SelectBKU</servlet-name>
+ <url-pattern>/SelectBKU</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>StartAuthentication</servlet-name>
+ <url-pattern>/StartAuthentication</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>VerifyIdentityLink</servlet-name>
+ <url-pattern>/VerifyIdentityLink</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>VerifyCertificate</servlet-name>
+ <url-pattern>/VerifyCertificate</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>GetMISSessionID</servlet-name>
+ <url-pattern>/GetMISSessionID</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>GetForeignID</servlet-name>
+ <url-pattern>/GetForeignID</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>ProcessInput</servlet-name>
+ <url-pattern>/ProcessInput</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>VerifyAuthBlock</servlet-name>
+ <url-pattern>/VerifyAuthBlock</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>ConfigurationUpdate</servlet-name>
+ <url-pattern>/ConfigurationUpdate</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>AxisServlet</servlet-name>
+ <url-pattern>/services/*</url-pattern>
+ </servlet-mapping>
+ <session-config>
+ <session-timeout>30</session-timeout>
+ </session-config>
+ <error-page>
+ <error-code>500</error-code>
+ <location>/errorpage.jsp</location>
+ </error-page>
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>ConfigurationUpdate</web-resource-name>
+ <url-pattern>/ConfigurationUpdate</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>moa-admin</role-name>
+ </auth-constraint>
+ </security-constraint>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ <realm-name>UserDatabase</realm-name>
+ </login-config>
+ <security-role>
+ <description>
+ The role that is required to log in to the moa Application
+ </description>
+ <role-name>moa-admin</role-name>
+ </security-role>
+</web-app>
diff --git a/id/server/auth/src/main/webapp/css/index.css b/id/server/auth/src/main/webapp/css/index.css
new file mode 100644
index 000000000..28fea78e3
--- /dev/null
+++ b/id/server/auth/src/main/webapp/css/index.css
@@ -0,0 +1,235 @@
+@charset "utf-8";
+
+* {
+ margin:0;
+ padding:0;
+ border:0;
+}
+
+body {
+ margin:0;
+ padding:0;
+ color : #000;
+ background-color : #fff;
+ font-family : Verdana, Geneva, Arial, sans-serif;
+ font-size:76%;
+}
+
+/* skiplink */
+
+#skiplinks {
+ position:relative;
+}
+
+p#skiplinks a {
+
+ position: absolute;
+ top: -999em;
+ left: -999em;
+ height: 0;
+ width: 0;
+ overflow: hidden;
+}
+
+p#skiplinks a:focus,
+p#skiplinks a:hover,
+p#skiplinks a:active {
+ height: auto;
+ width:auto;
+ left: 0;
+ top: 0;
+ padding: 4px;
+ position: absolute;
+ overflow: visible;
+ text-decoration: none;
+ z-index: 100;
+}
+
+/*layout */
+
+#wrapper {
+ min-width:746px;
+ max-width:1258px;
+ padding: 0 10px;
+}
+
+#banner {
+ width:100%;
+ min-height:100px;
+ padding-top:20px;
+ position:relative;
+}
+
+#bannerleft {
+ float:left;
+}
+
+#bannerleft h1 {
+ font-size:2em;
+ padding-top:10px;
+}
+
+#bannerright {
+ float:right;
+}
+
+#main {
+ clear:both;
+ position:relative;
+}
+
+/* left */
+
+#leftcontent {
+ float:left;
+ width:220px;
+}
+
+h2#tabheader, h2#contentheader {
+ padding:2px;
+ font-size:1.1em;
+ color:#fff;
+ border-bottom:2px solid #fff;
+}
+
+#bkulogin {
+ overflow:hidden;
+ width:220px;
+}
+
+#bkukarte {
+ float:left;
+ background: url(../img/karte.gif) no-repeat top center;
+ padding: 90px 10px 10px 10px;
+ text-align:center;
+ width:40%;
+}
+
+#bkuhandy {
+ float:right;
+ background: url(../img/handy.gif) no-repeat top center;
+ padding: 90px 10px 10px 10px;
+ text-align:center;
+ width:40%;
+}
+
+#mandate{
+ text-align:center;
+ padding : 5px 5px 5px 5px;
+}
+
+
+button {
+ background: #efefef;
+ border:1px solid #000;
+ cursor: pointer;
+}
+
+#installJava, #BrowserNOK {
+ clear:both;
+ font-size:0.8em;
+ padding:4px;
+}
+
+#localBKU {
+ padding:4px;
+}
+
+#tab {
+ margin-top:2px;
+ padding:2px;
+ clear:both;
+}
+
+#leftcontent a {
+ text-decoration:none;
+ color: #000;
+ display:block;
+ padding:4px;
+}
+
+#leftcontent a:hover, #leftcontent a:focus, #leftcontent a:active {
+ text-decoration:underline;
+ color: #000;
+}
+
+#navlist {
+ margin-top:20px;
+}
+
+#navlist ul {
+ list-style: none;
+ margin-left: 0;
+}
+
+#navlist li {
+ border-bottom:1px solid #fff;
+}
+
+iframe {
+ width:220px;
+}
+
+/* right */
+
+#rightcontent {
+ float:right;
+ width:220px;
+}
+
+#centercontent {
+ width:auto;
+ margin: 0 230px;
+}
+
+/* center */
+
+#content {
+ padding:20px;
+}
+
+#content a {
+ text-decoration:underline;
+ color: #000;
+}
+
+#content a:hover, #content a:focus, #content a:active {
+ text-decoration:underline;
+ color: #000;
+}
+
+p {
+ margin-bottom:1em;
+}
+
+.lightblock{
+ text-align : left;
+ padding : 5px 5px 5px 5px;
+}
+
+
+#mandateLogin {
+ vertical-align: middle;
+}
+
+/* [OPTIONAL] Geben Sie hier die Farbe fuer den hellen Hintergrund an */
+.hell {
+ background-color : #DDDDDD;
+}
+
+/* [OPTIONAL] Geben Sie hier die Farbe fuer den dunklen Hintergrund an */
+.dunkel {
+ background-color: #A02D2D;
+}
+
+/* [OPTIONAL] Geben Sie hier die Farbe fuer Links an */
+#leftcontent a, #content a {
+ color: blue;
+}
+
+@media print {
+ #wrapper { width:100%;}
+ #banner {width:640px;}
+ #rightcontent {display: none;}
+ #centercontent {width:400px; margin-right:0;}
+}
diff --git a/id/server/auth/src/main/webapp/css/mandates.css b/id/server/auth/src/main/webapp/css/mandates.css
new file mode 100644
index 000000000..7b6e550f0
--- /dev/null
+++ b/id/server/auth/src/main/webapp/css/mandates.css
@@ -0,0 +1,57 @@
+/* CSS Document */
+
+.hleft {
+ float: left;
+ width: 50%;
+}
+
+.hright {
+ float: left;
+ width: 49%;
+}
+
+.htitle {
+ padding-top: 15px;
+ clear: both;
+}
+
+.leiste1 {
+ background-color: #FF0000;
+ color: #FFFFFF;
+ font-weight: bold;
+ width: 15%;
+ float: left;
+ clear: left;
+ height: 20px;
+ padding-top: 5px;
+ padding-bottom: 5px;
+ FONT-SIZE: 0.9em;
+}
+
+.leiste2 {
+ background-color: #CCCCCC;
+ color: #000000;
+ float: left;
+ height: 20px;
+ width: 33%;
+ padding-top: 5px;
+ padding-bottom: 5px;
+}
+
+a.info {
+ color: #000000;
+ text-decoration: underline;
+}
+
+
+.leiste3 {
+ background-color: #CCCCCC;
+ color: #000000;
+ height: 20px;
+ float: left;
+ width: 17%;
+ padding-top: 5px;
+ padding-bottom: 5px;
+ FONT-SIZE: 0.8em;
+
+}
diff --git a/id/server/auth/src/main/webapp/css/styles.css b/id/server/auth/src/main/webapp/css/styles.css
new file mode 100644
index 000000000..d91b993d1
--- /dev/null
+++ b/id/server/auth/src/main/webapp/css/styles.css
@@ -0,0 +1,741 @@
+/*
+|| Groesse der Seite auf A4 setzen
+|| Rand auf jeweils 10% der Seite setzen
+*/
+
+@page {
+ size: 21cm 29.7cm;
+ margin: 10%;
+}
+
+/*
+|| Font und Farben, die fuer das gesamte Dokument gueltig sind.
+*/
+
+body {
+ font-family: arial, helvetica, sans-serif;
+ background-color: white;
+ color: black;
+}
+
+/*
+|| Eingabefelder verwenden eine Monospace-Font (s. Laenderstyleguide 5.1)
+*/
+
+input, textarea, select {
+ font-family: monospace;
+}
+
+/*
+|| Schriftgroesse fuer Formulartitel
+*/
+
+h1 {
+ font-size: 1.3em;
+}
+
+/*
+|| Definitionen fuer die Kategorien (faerbiger Balken)
+*/
+
+h2 {
+ width: 98%;
+ background-color: #A02D2D;
+ color: white;
+ font-weight: bold;
+ font-size: 1em;
+ padding: 0.3em;
+ border-width: thin;
+ margin-bottom: 1em;
+}
+
+/*
+|| Subkategorie (zB Adresse innerhalb von Stammgewerbeberechtigung)
+*/
+
+h3 {
+ padding: 5px;
+ margin-bottom: 1px;
+ font-size: 0.8em;
+}
+
+/*
+|| Informationstext zu einer Kategorie
+*/
+
+h4 {
+ margin-bottom: 0.5em;
+ font-size: 0.8em;
+}
+
+fieldset {
+ border: none;
+}
+
+}
+
+legend {
+ display: none;
+}
+
+
+/*
+|| Informationstext im Info-Kaestchen
+*/
+
+.infotext {
+ padding: 0.8em;
+ float: left;
+ background-color: #EEEEEE;
+ color: black;
+ font-size: 0.8em;
+}
+
+/*
+|| Info-Link im Info-Kaestchen
+*/
+
+.infobutton {
+ float: left;
+ width: 2em;
+ background-color: red;
+ text-align: center;
+ font-size: 1.5em;
+ color: white;
+ font-weight: bold;
+ padding: 0.4em;
+ border-width: 0.25em;
+ border-style: outset;
+ border-style: -moz-bg-outset;
+}
+
+/*
+|| Info-Link soll weiss sein
+*/
+
+.infobutton a:link {
+ background-color: red;
+ color: white;
+ text-decoration: none;
+
+}
+
+/*
+|| Info-Link soll weiss sein, auch wenn Link schon einmal angeklickt wurde
+*/
+
+.infobutton a:visited {
+ background-color: red;
+ color: white;
+}
+
+/*
+|| Info-Link-Text soll weiss sein, auch wenn man mit der Maus drueberfaehrt
+*/
+
+.infobutton a:hover {
+ background-color: red;
+ color: white;
+}
+
+/*
+|| Begrenzung fuer das Info-Kaestchen
+*/
+
+.boundinginfobox {
+ width: 99%;
+ background-color: #EEEEEE;
+ color: black;
+ border-width: thin;
+}
+
+/*
+|| Begrenzung fuer Eingabefeldbereiche
+*/
+
+.boundingbox {
+ width: 99%;
+ background-color: #EEEEEE;
+ color: black;
+ border-width: thin;
+ margin-bottom: 1em;
+}
+
+/*
+|| Begrenzung, die Leittexte und Formulardaten im statischen Formular
+|| zusammenhaelt, sodass es bei einem Seitenumbruch beim Ausdruck
+|| nicht zu Verschiebungen kommt
+*/
+.printboundingbox {
+ width: 99%;
+}
+
+/*
+|| Bereich fuer die Leittexte
+*/
+
+.labelarea {
+ text-align: right;
+ width: 17%;
+ float: left;
+ padding: 5px;
+ font-size: 0.8em;
+ vertical-align: middle;
+}
+
+/*
+|| Bereich fuer sehr lange Leittexte
+*/
+
+.labelareawidened {
+ text-align: right;
+ width: 50%;
+ float: left;
+ padding: 5px;
+ font-size: 0.8em;
+ vertical-align: middle;
+}
+
+/*
+|| Leittextbereich ohne Angabe einer Breite (z.B. bei Stiege und Tuer; sonst generell (.labelarea) 17% der Gesamtbreite)
+*/
+
+.labelareanowidth {
+ float: left;
+ padding: 5px;
+ font-size: 0.8em;
+ vertical-align: middle;
+}
+
+/*
+|| Legendenbereich (Icons)
+*/
+
+.legendarea {
+ width: 30px;
+ text-align: left;
+ float: left;
+ padding-left: 4px;
+ padding-top: 5px;
+ vertical-align: middle;
+}
+
+/*
+|| Legendenbereich fuer den Stern (in Kombination mit einem Rufzeichen)
+*/
+
+.legendareastar {
+ width: 13px;
+ float: left;
+ padding-left: 4px;
+ padding-top: 5px;
+ vertical-align: middle;
+}
+
+/*
+|| Legendenbereich fuer das Info-Icon
+*/
+
+.legendareainfo {
+ width: 17px;
+ float: left;
+ padding-top: 5px;
+ vertical-align: middle;
+}
+
+/*
+|| Bereich fuer ein einzelnes Eingabefeld
+*/
+
+.inputfieldarea {
+ float: left;
+ padding: 4px;
+}
+
+/*
+|| Bereich fuer das erste Eingabefeld, wenn zwei in einer Zeile
+|| = Eingabefeldbereich, dessen Breite auf 26% begrenzt ist (.inputfieldarea hat keine Begrenzung)
+*/
+
+.inputfieldareafortwo {
+ width: 26%;
+ float: left;
+ padding: 4px;
+}
+
+
+/*
+|| e-Goverment Schriftzug im Logo
+*/
+
+.egovlogo {
+ text-align: center;
+ background-color: white;
+ color: #008B8B;
+ font-weight: bold;
+ font-style: italic;
+ font-size: 1.7em;
+}
+
+/*
+|| help.gv.at-Schriftzug im Logo
+*/
+
+.egovtext {
+ text-align: center;
+ background-color: white;
+ color: black;
+ font-weight: bold;
+ font-size: 1.2em;
+}
+
+/*
+|| Bereich fuer den Titel des Formulars links vom Logo
+*/
+
+.titlebox {
+ float: left;
+ width: 65%;
+ margin-bottom: 1em;
+}
+
+/*
+|| Bereich fuer das Logo
+*/
+
+.logobox {
+ float: right;
+ margin-bottom: 1em;
+}
+
+/*
+|| Allgemeiner Informationstext zu einem Formular (zwischen Formulartitel
+|| und Info-Kaestchen
+*/
+
+.introtext {
+ font-weight: bold;
+ margin-bottom: 1em;
+}
+
+/*
+|| Link "Zum Formularanfang"
+*/
+
+.formtop {
+ float: right;
+}
+
+/*
+|| Bereich fuer die Steuerungs-Buttons (Senden, Abbrechen, etc.)
+*/
+
+.buttonarea {
+ margin-top: 0.5em;
+ text-align: center;
+}
+
+/*
+|| Aussehen der Steuerungs-Buttons
+*/
+
+.button {
+ font-family: arial, helvetica, sans-serif;
+ font-size: 1em;
+}
+
+/*
+|| Formularkennung/Fusszeile des Formulars
+*/
+
+.formid {
+ float: left;
+ font-style: italic;
+ font-size: 0.8em;
+ background-color: #008B8B;
+ color: white;
+ padding: 0.5em;
+}
+
+/*
+|| Behoerdenanschrift
+*/
+
+.organizationaddress {
+ font-style: italic;
+ margin-top: 1em;
+ margin-bottom: 1em;
+}
+
+/*
+|| Behoerdenanschrift mit Logo
+*/
+
+.organizationaddresslogo {
+ font-style: italic;
+ margin-top: 1em;
+ margin-bottom: 1em;
+ float: left;
+}
+
+/*
+|| Beilagen-Tabelle
+*/
+
+.attachmenttable {
+ width: 99%;
+ background-color: #EEEEEE;
+ color: black;
+ border-width: thin;
+ border-collapse: collapse;
+ margin-bottom: 1em;
+}
+
+/*
+|| Spaltenueberschrift "lfd Nr"
+*/
+
+.attachmenttitlenumber {
+ border-bottom: thin solid black;
+ border-right: thin solid black;
+ padding: 0.3em;
+ font-size: 0.8em;
+}
+
+/*
+|| Spaltenueberschrift "Beilage"
+*/
+
+.attachmenttitlename {
+ border-bottom: thin solid black;
+ border-right: thin solid black;
+ padding: 0.5em;
+ text-align: left;
+ font-size: 0.8em;
+}
+
+
+/*
+|| Spaltenueberschriften "nachgereicht" und "angefuegt"
+*/
+
+.attachmenttitleselection {
+ padding: 0.3em;
+ text-align: center;
+ border-left: thin solid black;
+ border-bottom: thin solid black;
+ font-size: 0.8em;
+}
+
+/*
+|| Spaltenueberschrift "Datei"
+*/
+
+.attachmenttitlefile {
+ padding: 0.3em;
+ text-align: left;
+ border-bottom: thin solid black;
+ font-size: 0.8em;
+}
+
+/*
+|| Zellen der Spalte "lfd Nr"
+*/
+
+.attachmentnumber {
+ text-align: center;
+ border-left: thin solid #EEEEEE;
+ border-right: thin solid black;
+ padding: 0.3em;
+ font-size: 0.8em;
+}
+
+/*
+|| Zellen der Spalte "Beilage"
+*/
+
+.attachmentname {
+ text-align: left;
+ border-left: thin solid black;
+ border-right: thin solid black;
+ padding: 0.5em;
+ font-size: 0.8em;
+}
+
+/*
+|| Zellen der Spalte "Datei"
+*/
+
+.attachmentfile {
+ text-align: left;
+ border-right: thin solid #EEEEEE;
+ padding: 0.3em;
+}
+
+/*
+|| Zellen der Spalte "angefuegt"
+*/
+
+.attachmentselectiononline {
+ text-align: center;
+ padding: 0.3em;
+ border-left: solid black thin;
+}
+
+/*
+|| Zellen der Spalte "nachgereicht"
+*/
+
+.attachmentselectionpost {
+ text-align: center;
+ border-left: solid black thin;
+ padding: 0.3em;
+}
+
+/*
+|| unsichtbarer Bereich
+*/
+
+.hide {
+ visibility: hidden;
+ display: none;
+}
+
+/*
+|| sichtbarer Bereich
+*/
+
+.show {
+ visibility: visible;
+ display: block;
+}
+
+/*
+|| readonly-Felder
+*/
+
+.deactive {
+ background-color: #D3D3D3;
+ color: gray;
+}
+
+/*
+|| Fehlertexte (bei fehlerhaften Eingaben)
+*/
+
+.errortext {
+ color: red;
+ background-color: white;
+ font-size: 1em;
+ border: solid red 2px;
+ padding: 0.5em;
+ width: 97%;
+}
+
+.errortext a:visited , .errortext a:link, .errortext a:hover {
+ color: red;
+}
+
+/*
+|| simuliertes Readonly-Eingabefeld, das in Wirklichkeit
+|| Text mit einem Rahmen ist
+*/
+
+.readonlybutton {
+ width: 20em;
+ background-color: #D3D3D3;
+ color: gray;
+ border-color: gray;
+ border-width: thin;
+ border-style: inset;
+ font-family: monospace;
+}
+
+/*
+|| Vertikale Ausrichtung des Info-Icons im Beilagenbereich
+*/
+
+.imagevertalign {
+ vertical-align: middle;
+}
+
+/*
+|| Unterbindet Rahmen bei Bildern mit hinterlegtem Link
+*/
+
+a img {
+ border: none;
+}
+
+/*
+|| MOA-Ergebnis-Tabelle
+*/
+
+.MOA-SP-ergebnis-tabelle {
+ width: 100%;
+ border: thin solid black;
+ border-collapse: collapse;
+ margin-bottom: 1em;
+}
+
+/*
+|| MOA-Ergebnis-Tabellenemelemente
+*/
+
+.MOA-SP-ergebnis-zelle, .MOA-SP-ergebnis-header {
+ border: thin solid black;
+ text-align: left;
+ padding: 0.3em;
+ background-color: #EEEEEE;
+}
+
+/*
+|| MOA-Ergebnis-Tabelle Fehlermeldungen
+*/
+
+.moa-sp-error {
+ color: red;
+ font-weight: bold;
+}
+
+/*
+|| Signaturblock-Tabelle
+*/
+
+.sigblock-tabelle {
+ width: 100%;
+ border: thin solid black;
+ border-collapse: collapse;
+ margin-bottom: 1em;
+}
+
+/*
+|| Signaturblock-Tabellenelemente
+*/
+
+.sigblock-zelle, .sigblock-header {
+ border: thin solid black;
+ text-align: left;
+ padding: 0.3em;
+ background-color: #EEEEEE;
+}
+
+/*
+|| Formular mit mehreren Seiten, Angabe der aktuellen Seite
+*/
+
+.steps {
+ text-align: right;
+ font-weight: bold;
+ padding: 0.3em;
+ margin-right: 0.3em;
+ font-style: italic;
+}
+
+/*
+|| Bereich fuer Formularliste
+*/
+
+.labelareaform {
+ text-align: left;
+ width: 50%;
+ float: left;
+ padding: 5px;
+ font-size: 0.8em;
+ font-weight: bold;
+ vertical-align: middle;
+}
+
+/*
+|| Bereich fuer Bestellung und Details bei Formularbestellungen
+*/
+
+.labelareaorderdetail {
+ text-align: center;
+ width: 17%;
+ float: left;
+ padding: 5px;
+ font-size: 0.8em;
+ vertical-align: middle;
+ font-weight: bold;
+}
+
+/*
+|| Farbe der Verfahrens-Tabellenzeilen mit geradem Index
+*/
+
+.evenformrow {
+ background-color: #EEEEEE;
+}
+
+/*
+|| Farbe der Verfahrens-Tabellenzeilen mit ungeradem Index
+*/
+
+.oddformrow {
+ background-color: lightgrey;
+}
+
+/*
+|| Sicherheitsabfrage in der Verfahrensverwaltung
+*/
+
+.checktext {
+ color: red;
+ padding: 0.5em;
+ border: solid 2px red;
+ margin: 1em;
+}
+
+/*
+|| Buttons der Eingangsstelle
+*/
+
+.eingang_button {
+ line-height: 2em;
+ border-width: 2px;
+ border-color: grey;
+ padding: 4px;
+ background-color: lightgrey;
+ border-style: outset;
+ border-style: -moz-bg-outset;
+}
+
+/*
+|| Buttonlinks der Eingangsstelle
+*/
+
+.eingang_button_link {
+ color: black;
+ text-decoration: none;
+}
+
+/*
+|| Für den Farbenwechsel bei den Beilagen-Tabellen
+*/
+
+table.attachmenttable tr.s
+{
+ background-color: lightgrey;
+}
+
+/*
+|| Farbe der Titelzeile bei den Beilagen-Tabellen
+*/
+
+table.attachmenttable thead
+{
+ background-color: #aaaaaa;
+}
+
+/*
+|| Aktuell fokussiertes Eingabefeld visuell hervorheben (Styleguide Anforderung)
+*/
+
+input:focus, input.field:focus, select:focus, textarea:focus {
+ border: 2px solid black;
+}
+
+select:focus {
+ background-color: #FFFFFE;
+} \ No newline at end of file
diff --git a/id/server/auth/src/main/webapp/css/styles_opera.css b/id/server/auth/src/main/webapp/css/styles_opera.css
new file mode 100644
index 000000000..a2ea527bf
--- /dev/null
+++ b/id/server/auth/src/main/webapp/css/styles_opera.css
@@ -0,0 +1,11 @@
+/*
+|| In Opera funktioniert das Aus- und Einblenden von HTML-Bloecken
+|| mittels JavaScript-Zugriff auf DOM-Objekte nicht, daher muss
+|| die Definition der Klasse .hide in diesem Browser durch eine
+|| "sichtbare" Definition ueberlagert werden
+*/
+
+.hide {
+ visibility: visible;
+ display: block;
+} \ No newline at end of file
diff --git a/id/server/auth/src/main/webapp/errorpage-auth.jsp b/id/server/auth/src/main/webapp/errorpage-auth.jsp
new file mode 100644
index 000000000..07f3e7f69
--- /dev/null
+++ b/id/server/auth/src/main/webapp/errorpage-auth.jsp
@@ -0,0 +1,50 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<%@ page contentType="text/html; charset=UTF-8" %>
+<html>
+<head>
+<title>Ein Fehler ist aufgetreten</title>
+</head>
+<% Throwable exceptionThrown = (Throwable)request.getAttribute("ExceptionThrown");
+ String errorMessage = (String)request.getAttribute("ErrorMessage");
+ String wrongParameters = (String)request.getAttribute("WrongParameters");
+%>
+
+<body>
+<h1>Fehler bei der Anmeldung</h1>
+<p>Bei der Anmeldung ist ein Fehler aufgetreten.</p>
+
+<% if (errorMessage != null) { %>
+<p>
+<%= errorMessage%><br>
+</p>
+<% } %>
+<% if (exceptionThrown != null) { %>
+<p>
+<%= exceptionThrown.getMessage()%>
+</p>
+<% } %>
+<% if (wrongParameters != null) { %>
+<p>Die Angabe der Parameter ist unvollst&auml;ndig.<br></p>
+<b> <%= wrongParameters %> </b><br>
+<p>
+ Beispiele f&uuml;r korrekte Links zur MOA-ID Authentisierung sind:
+</p>
+<p>
+<tt>&lt;a href="https://&lt;MOA-URL&gt;/StartAuthentication?Target=&lt;Gesch&auml;ftsbereich&gt;&amp;OA=&lt;OA-URL&gt;&amp;Template=&lt;Template-URL&gt;&quot;&gt;</tt>
+</p>
+<p>
+<tt>&lt;a href="https://&lt;MOA-URL&gt;/SelectBKU?Target=&lt;Gesch&auml;ftsbereich&gt;&amp;OA=&lt;OA-URL&gt;&amp;Template=&lt;Template-URL&gt;&amp;BKUSelectionTemplate=&lt;BKU-Template-URL&gt;&quot;&gt;</tt>
+</p>
+<p>
+Im Falle einer Applikation aus dem privatwirtschaftlichen Bereich (type="businessService") entf&auml;llt die Angabe des <i>Target</i> Parameters:
+</p>
+<p>
+<tt>&lt;a href="https://&lt;MOA-URL&gt;/StartAuthentication?OA=&lt;OA-URL&gt;&amp;Template=&lt;Template-URL&gt;&quot;&gt;</tt>
+</p>
+<p>
+<tt>&lt;a href="https://&lt;MOA-URL&gt;/SelectBKU?OA=&lt;OA-URL&gt;&amp;Template=&lt;Template-URL&gt;&amp;BKUSelectionTemplate=&lt;BKU-Template-URL&gt;&quot;&gt;</tt>
+</p>
+<p>Die Angabe der Parameter <tt>&quot;Template&quot;</tt> und <tt>&quot;BKUSelectionTemplate&quot;</tt> ist optional.</p>
+<% } %>
+</body>
+</html> \ No newline at end of file
diff --git a/id/server/auth/src/main/webapp/iframeHandyBKU.html b/id/server/auth/src/main/webapp/iframeHandyBKU.html
new file mode 100644
index 000000000..f07b73265
--- /dev/null
+++ b/id/server/auth/src/main/webapp/iframeHandyBKU.html
@@ -0,0 +1,61 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="de">
+ <head>
+ <title>iFrame Handy BKU</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta http-equiv="CACHE-CONTROL" content="NO-CACHE">
+ <meta http-equiv="PRAGMA" content="NO-CACHE">
+ <script type="text/javascript">
+ // [MUSS] Geben Sie hier die URL zum Aufruf von MOA-ID an
+ // z.B.: https://yoururl.at/moa-id-auth/StartAuthentication?Target=IT&OA=https://youronlineapplication.at
+ var MOA_ID_STARTAUTHENTICATION = "[MOA_ID_STARTAUTHENTICATION]";
+
+ // [MUSS] Geben Sie hier die URL zum MOA-ID Template fuer die Handy Signatur an -->
+ <!-- z.B.: value="https://yoururl.at/moa-id-auth/template_handyBKU.html"-->
+ var URL_TO_HANDYSIGNATUR_TEMPLATE = "[URL_TO_HANDYSIGNATUR_TEMPLATE]";
+
+
+ window.onload=function() {
+
+ document.getElementById('moaidform').action = MOA_ID_STARTAUTHENTICATION;
+ document.getElementById('Template').value = URL_TO_HANDYSIGNATUR_TEMPLATE;
+
+ var useMandate = gup("useMandate");
+
+ if (useMandate == "true")
+ document.getElementById('useMandate').value = "true";
+ else
+ document.getElementById('useMandate').value = "false";
+
+
+ document.moaidform.submit();
+ return;
+ }
+
+ function gup(name) {
+ name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
+ var regexS = "[\\?&]"+name+"=([^&#]*)";
+ var regex = new RegExp( regexS );
+ var results = regex.exec( window.location.href );
+ if( results == null )
+ return "";
+ else
+ return results[1];
+ }
+
+ </script>
+ </head>
+ <body>
+
+ Bitte warten...
+
+ <FORM name="moaidform" method="post" id="moaidform">
+ <input type="hidden" name="Template" id="Template">
+ <input type="hidden" name="bkuURI" value="https://www.handy-signatur.at/mobile/https-security-layer-request/default.aspx">
+ <input type="hidden" name="useMandate" id="useMandate">
+ </FORM>
+
+
+ <hr>
+ </body>
+</html> \ No newline at end of file
diff --git a/id/server/auth/src/main/webapp/iframeOnlineBKU.html b/id/server/auth/src/main/webapp/iframeOnlineBKU.html
new file mode 100644
index 000000000..4873245be
--- /dev/null
+++ b/id/server/auth/src/main/webapp/iframeOnlineBKU.html
@@ -0,0 +1,61 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="de">
+ <head>
+ <title>iFrame Online BKU</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta http-equiv="CACHE-CONTROL" content="NO-CACHE">
+ <meta http-equiv="PRAGMA" content="NO-CACHE">
+ <script type="text/javascript">
+ // [MUSS] Geben Sie hier die URL zum Aufruf von MOA-ID an
+ // z.B.: https://yoururl.at/moa-id-auth/StartAuthentication?Target=IT&OA=https://youronlineapplication.at
+ var MOA_ID_STARTAUTHENTICATION = "[MOA_ID_STARTAUTHENTICATION]";
+
+ // [MUSS] Geben Sie hier die URL zum MOA-ID Template fuer die Online BKU an
+ // z.B.: "https://yoururl.at/moa-id-auth/template_onlineBKU.html"
+ var URL_TO_ONLINEBKU_TEMPLATE = "[URL_TO_ONLINEBKU_TEMPLATE]";
+
+ // [MUSS] Geben Sie hier die URL zur Online BKU an
+ // z.B.: value="https://yoururl.at/bkuonline/https-security-layer-request"
+ // Hinweis: Diese URL muss auch bei den vertrauenswürdigen BKUs in der MOA-ID Konfiguration angegeben werden (siehe Element MOA-IDConfiguration/TrustedBKUs/BKUURL)
+ var URL_TO_ONLINEBKU = "[URL_TO_ONLINEBKU]";
+
+ window.onload=function() {
+ document.getElementById('moaidform').action = MOA_ID_STARTAUTHENTICATION;
+ document.getElementById('Template').value = URL_TO_ONLINEBKU_TEMPLATE;
+ document.getElementById('bkuURI').value = URL_TO_ONLINEBKU;
+
+ var useMandate = gup("useMandate");
+
+ if (useMandate == "true")
+ document.getElementById('useMandate').value = "true";
+ else
+ document.getElementById('useMandate').value = "false";
+
+ document.moaidform.submit();
+ return;
+ }
+
+ function gup(name) {
+ name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
+ var regexS = "[\\?&]"+name+"=([^&#]*)";
+ var regex = new RegExp( regexS );
+ var results = regex.exec( window.location.href );
+ if( results == null )
+ return "";
+ else
+ return results[1];
+ }
+ </script>
+ </head>
+ <body>
+ Bitte warten...
+
+ <form method="POST" name="moaidform" id="moaidform">
+ <input type="hidden" name="Template" id="Template">
+ <input type="hidden" name="bkuURI" id="bkuURI">
+ <input type="hidden" name="useMandate" id="useMandate">
+ </form>
+
+ <hr>
+ </body>
+</html> \ No newline at end of file
diff --git a/id/server/auth/src/main/webapp/img/ecard_aktivieren.jpg b/id/server/auth/src/main/webapp/img/ecard_aktivieren.jpg
new file mode 100644
index 000000000..4b29a9786
--- /dev/null
+++ b/id/server/auth/src/main/webapp/img/ecard_aktivieren.jpg
Binary files differ
diff --git a/id/server/auth/src/main/webapp/img/egov_schrift.gif b/id/server/auth/src/main/webapp/img/egov_schrift.gif
new file mode 100644
index 000000000..aea64ef5e
--- /dev/null
+++ b/id/server/auth/src/main/webapp/img/egov_schrift.gif
Binary files differ
diff --git a/id/server/auth/src/main/webapp/img/handy.gif b/id/server/auth/src/main/webapp/img/handy.gif
new file mode 100644
index 000000000..088ec0957
--- /dev/null
+++ b/id/server/auth/src/main/webapp/img/handy.gif
Binary files differ
diff --git a/id/server/auth/src/main/webapp/img/info.gif b/id/server/auth/src/main/webapp/img/info.gif
new file mode 100644
index 000000000..f9e1bb00f
--- /dev/null
+++ b/id/server/auth/src/main/webapp/img/info.gif
Binary files differ
diff --git a/id/server/auth/src/main/webapp/img/karte.gif b/id/server/auth/src/main/webapp/img/karte.gif
new file mode 100644
index 000000000..1ec7afc2e
--- /dev/null
+++ b/id/server/auth/src/main/webapp/img/karte.gif
Binary files differ
diff --git a/id/server/auth/src/main/webapp/img/logo.jpg b/id/server/auth/src/main/webapp/img/logo.jpg
new file mode 100644
index 000000000..bafbccc84
--- /dev/null
+++ b/id/server/auth/src/main/webapp/img/logo.jpg
Binary files differ
diff --git a/id/server/auth/src/main/webapp/img/mobilsig_aktivieren.jpg b/id/server/auth/src/main/webapp/img/mobilsig_aktivieren.jpg
new file mode 100644
index 000000000..e72aeadfc
--- /dev/null
+++ b/id/server/auth/src/main/webapp/img/mobilsig_aktivieren.jpg
Binary files differ
diff --git a/id/server/auth/src/main/webapp/img/rufezeichen.gif b/id/server/auth/src/main/webapp/img/rufezeichen.gif
new file mode 100644
index 000000000..fbad8d758
--- /dev/null
+++ b/id/server/auth/src/main/webapp/img/rufezeichen.gif
Binary files differ
diff --git a/id/server/auth/src/main/webapp/img/stern.gif b/id/server/auth/src/main/webapp/img/stern.gif
new file mode 100644
index 000000000..77c53d1c3
--- /dev/null
+++ b/id/server/auth/src/main/webapp/img/stern.gif
Binary files differ
diff --git a/id/server/auth/src/main/webapp/index.html b/id/server/auth/src/main/webapp/index.html
new file mode 100644
index 000000000..62576b15e
--- /dev/null
+++ b/id/server/auth/src/main/webapp/index.html
@@ -0,0 +1,201 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="de">
+ <head>
+ <!-- [OPTIONAL] Aendern Sie hier den Titel der Seite -->
+ <title>
+ MOA-Template zur B&uuml;rgerkartenauswahl (Musterseite)
+ </title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <link rel="stylesheet" type="text/css" href="css/index.css">
+ <script type="text/javascript">
+ // [MUSS] Geben Sie hier die URL zum Aufruf von MOA-ID an
+ // z.B.: https://yoururl.at/moa-id-auth/StartAuthentication?Target=IT&OA=https://youronlineapplication.at
+ var MOA_ID_STARTAUTHENTICATION = "[MOA_ID_STARTAUTHENTICATION]";
+
+ // [MUSS] Geben Sie hier die URL zum MOA-ID Template fuer die lokale BKU an
+ // z.B.: https://yoururl.at/moa-id-auth/template_localBKU.html
+ var URL_TO_LOKALBKU_TEMPLATE = "[URL_TO_LOKALBKU_TEMPLATE]";
+
+
+ window.onload=function() {
+
+ document.getElementById("localBKU").style.display="none";
+ return;
+ }
+
+ function bkuOnlineClicked() {
+ <!-- [OPTIONAL] Um die lokale BKU auszublenden, ersetzen Sie in der folgenden Zeile "block" durch "none" -->
+ document.getElementById("localBKU").style.display="block";
+
+ document.getElementById("moaidform").action = MOA_ID_STARTAUTHENTICATION;
+ document.getElementById("Template").value = URL_TO_LOKALBKU_TEMPLATE;
+
+ document.getElementById("useMandate").value = "false";
+ var checkbox = document.getElementById("mandateCheckBox")
+ if (checkbox != null) {
+ if (document.getElementById("mandateCheckBox").checked) {
+ document.getElementById("useMandate").value = "true";
+ }
+ }
+
+ var el = document.getElementById("bkulogin");
+ var parent = el.parentNode;
+
+ var iFrameURL = "iframeOnlineBKU.html" + "?";
+ iFrameURL += "useMandate=" + document.getElementById("useMandate").value;
+
+ var iframe = document.createElement("iframe");
+ iframe.setAttribute("src", iFrameURL);
+ iframe.setAttribute("width", "220");
+ iframe.setAttribute("height", "165");
+ iframe.setAttribute("frameborder", "0");
+ iframe.setAttribute("scrolling", "no");
+ iframe.setAttribute("title", "Login");
+
+ parent.replaceChild(iframe, el);
+ }
+
+
+ function bkuHandyClicked() {
+ document.getElementById("localBKU").style.display="none";
+
+ document.getElementById("useMandate").value = "false";
+ var checkbox = document.getElementById("mandateCheckBox")
+ if (checkbox != null) {
+ if (document.getElementById("mandateCheckBox").checked) {
+ document.getElementById("useMandate").value = "true";
+ }
+ }
+
+ var el = document.getElementById("bkulogin");
+ var parent = el.parentNode;
+
+ var iFrameURL = "iframeHandyBKU.html" + "?";
+ iFrameURL += "useMandate=" + document.getElementById("useMandate").value;
+
+ var iframe = document.createElement("iframe");
+ iframe.setAttribute("src", iFrameURL);
+ iframe.setAttribute("width", "220");
+ iframe.setAttribute("height", "159");
+ iframe.setAttribute("frameborder", "0");
+ iframe.setAttribute("scrolling", "no");
+ iframe.setAttribute("title", "Login");
+
+ parent.replaceChild(iframe, el);
+ }
+ </script>
+ </head>
+ <body>
+ <div id="wrapper">
+ <p id="skiplinks">
+ <a href="#content">Zum Inhalt springen</a>
+ </p>
+ <div id="banner">
+ <!-- [OPTIONAL] Aendern Sie hier die Titelueberschrift der Seite) -->
+ <div id="bannerleft">
+ <h1>MOA-Template zur B&uuml;rgerkartenauswahl (Musterseite)</h1>
+ <!-- Meldung im Browser, wenn JavaScript nicht aktiviert -->
+ <noscript>
+ <p>
+ Bitte aktivieren Sie JavaScript.
+ </p>
+ </noscript>
+ </div>
+ <!-- [OPTIONAL] Aendern Sie hier das Logo der Seite (und Alternativtext fuer das Bild) -->
+ <div id="bannerright">
+ <img src="img/logo.jpg" alt="Logo">
+ </div>
+ </div>
+ <div id="main">
+ <div id="leftcontent">
+ <h2 id="tabheader" class="dunkel">
+ Login mit B&uuml;rgerkarte
+ </h2>
+ <div id="bkulogin" class="hell">
+ <!-- [OPTIONAL] Um die Online BKU auszublenden, kommentieren sie das folgende div (bkukarte) aus -->
+ <div id="bkukarte" class="hell">
+ <button name="bkuButton" type="button" onClick="bkuOnlineClicked();">KARTE</button>
+ </div>
+ <!-- [OPTIONAL] Um die Mobile BKU auszublenden, kommentieren sie das folgende div (bkukhandy) aus -->
+ <div id="bkuhandy" class="hell">
+ <button name="bkuButton" type="button" onClick="bkuHandyClicked();">HANDY</button>
+ </div>
+
+ <!-- [OPTIONAL] Um die Anmeldung mit Vollmachten auszublenden, kommentieren Sie das folgende div (mandate) aus -->
+ <div id="mandate">
+ <input type="checkbox" name="Mandate" style="vertical-align: middle; margin-right: 5px;" id="mandateCheckBox"><label>in Vertretung anmelden</label>
+ </div>
+ </div>
+
+
+
+ <div id="localBKU" style="display:none" class="hell">
+ <hr>
+ <!-- [MUSS] Geben Sie hier die URL zum Aufruf von MOA-ID an -->
+ <!-- z.B.: action="https://yoururl.at/moa-id-auth/StartAuthentication?Target=IT&OA=https://youronlineapplication.at"-->
+ <form method="post" id="moaidform">
+ <input type="hidden" name="show" value="false">
+ <!-- [MUSS] Geben Sie hier die URL zum MOA-ID Template fuer die lokale BKU an -->
+ <!-- z.B.: value="https://yoururl.at/moa-id-auth/template_localBKU.html"-->
+ <input type="hidden" name="Template" id="Template">
+ <input type="hidden" name="bkuURI" value="https://localhost:3496/https-security-layer-request">
+ <input type="hidden" name="useMandate" id="useMandate">
+ <input type="submit" size="400" value="Lokale BKU">
+ </form>
+ <p>
+ <small>Alternativ k&ouml;nnen Sie eine lokal installierte BKU verwenden.</small>
+ </p>
+ </div>
+
+ <div id="tab" class="hell">
+ <a href="info_bk.html" class="link_nav">Informationen zur B&uuml;rgerkarte</a>
+ </div>
+
+ <div id="navlist" class="hell">
+ <ul>
+ <li>
+ <a href="http://www.buergerkarte.at" target="_blank">B&uuml;rgerkarte.at</a> </li>
+ <li>
+ <a href="http://www.digitales.oesterreich.gv.at/" target="_blank">Digitales &Ouml;sterreich</a> </li>
+ <li>
+ <a href="http://www.a-sit.at/" target="_blank">A-SIT</a>
+ </li>
+ <li>
+ <a href="http://www.a-trust.at/" target="_blank">A-Trust</a>
+ </li>
+ <li>
+ <a href="http://www.egiz.gv.at/" target="_blank">EGIZ</a>
+ </li>
+ </ul>
+ </div>
+ </div>
+
+ <div id="rightcontent">
+ <p>
+ <a href="http://www.buergerkarte.at/de/aktivieren/online.html" target="_blank"><img src="img/ecard_aktivieren.jpg" border="0" alt="eCard online aktivieren" width="210"></a>
+ </p>
+ <p>
+ <a href="http://www.buergerkarte.at/de/aktivieren/mobil.html" target="_blank"><img src="img/mobilsig_aktivieren.jpg" border="0" alt="Mobile Signatur aktivieren" width="210"></a>
+ </p>
+ </div>
+
+ <div id="centercontent">
+
+ <h2 id="contentheader" class="dunkel">
+ Hinweise zum MOA-Template
+ </h2>
+
+ <div id="content" class="hell">
+ <p>
+ Eine Anleitung zur Nutzung des MOA-Template finden Sie hier: <a href="BKAuswahl-MOA-Template-Howto.pdf" target="_blank">BKAuswahl-MOA-Template-Howto.pdf (PDF, 190B)</a>.
+ So m&uuml;ssen vor einem Login noch die Parameter für den MOA-ID Aufruf angegeben werden.</p>
+ <p>
+ Diese Musterseite erf&uuml;llt die Richtlinie f&uuml;r barrierefreie Webinhalte 2.0 (WCAG 2.0 des W3C) Stufe AA. Das Pr&uuml;fprotokoll hierzu finden Sie hier: <a href="WCAG-Pruefprotokoll.pdf" target="_blank">Pruefprotokoll.pdf (PDF, 705kB)</a>.
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+ </body>
+</html> \ No newline at end of file
diff --git a/id/server/auth/src/main/webapp/info_bk.html b/id/server/auth/src/main/webapp/info_bk.html
new file mode 100644
index 000000000..8bfee57f2
--- /dev/null
+++ b/id/server/auth/src/main/webapp/info_bk.html
@@ -0,0 +1,96 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="de">
+ <head>
+ <title>Information</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <link rel="stylesheet" type="text/css" href="css/index.css">
+ </head>
+ <body>
+ <div id="wrapper">
+ <p id="skiplinks">
+ <a href="#content">Zum Inhalt springen</a>
+ </p>
+ <div id="banner">
+ <!-- [OPTIONAL] Aendern Sie hier die Titelueberschrift der Seite) -->
+ <div id="bannerleft">
+ <h1>Musterseite</h1>
+ <!-- Meldung im Browser, wenn JavaScript nicht aktiviert -->
+ <noscript>
+ <p>
+ Bitte aktivieren Sie JavaScript.
+ </p>
+ </noscript>
+ </div>
+ <!-- [OPTIONAL] Aendern Sie hier das Logo der Seite (und Alternativtext fuer das Bild) -->
+ <div id="bannerright">
+ <img src="img/logo.jpg" alt="Logo">
+ </div>
+ </div>
+ <div id="main">
+ <div id="centercontent">
+ <h2 id="contentheader" class="dunkel">
+ Informationen zur B&uuml;rgerkarte
+ </h2>
+ <div id="content" class="hell">
+ <p>
+ <B>Hinweis:</B>
+ F&uuml;r nat&uuml;rliche Personen ist beim Login mit B&uuml;rgerkarte keine Erstanmeldung erforderlich.
+ </p>
+ <p>
+ Um mit der B&uuml;rgerkarte einsteigen zu k&ouml;nnen, ben&ouml;tigen Sie:
+ </p>
+ <ul>
+ <li>
+ eine Chipkarte, die f&uuml;r die Verwendung als B&uuml;rgerkarte geeignet ist, wie zum Beispiel Ihre e-card, Bankomatkarte oder Signaturkarte von a-trust oder ein Mobiltelefon, das zur Nutzung als Handy BKU (B&uuml;rgerkartenumgebung) registriert ist.
+ </li>
+ <li>
+ einen Kartenleser mit den dazugeh&ouml;rigen Treibern
+ </li>
+ <li>
+ eine B&uuml;rgerkartensoftware (BKU)
+ </li>
+ </ul>
+ <p>
+ Als B&uuml;rgerkartensoftware stehen folgende drei Varianten zur Verf&uuml;gung:
+ </p>
+ <ul>
+ <li><i>Lokale BKU</i>: Diese Software wird lokal auf Ihrem Computer installiert. Die Software finden sie unter <a href="http://www.buergerkarte.at/de/voraussetzungen/software.html" target="_blank">http://www.buergerkarte.at/de/voraussetzungen/software.html</a>
+ </li>
+ <li><i>Online-BKU</i>: Mit der Online-BKU wird keine lokale B&uuml;rgerkartensoftware am PC ben&ouml;tigt. &Uuml;ber JAVA Technologien werden die ben&ouml;tigten Funktionen als Applet im Browser ausgef&uuml;hrt. Einzige Voraussetzung ist eine aktuelle JAVA Version (ab Java 6).
+ </li>
+ <li><i>Mobile BKU</i>: Mit der mobilen BKU k&ouml;nnen sie mittels ihres Mobiltelefons. Voraussetzung ist eine vorherige Registrierung. Mehr Informationen hierzu finden Sie auf <a href="http://www.a-trust.at/mobile/" target="_blank">http://www.a-trust.at/mobile/</a><br>
+ <b>Hinweis:</b><br>
+ Wenn das JAVA-Applet nicht funktioniert (bei einer &auml;lteren JAVA Version als Java 6 oder bei einem nicht unterst&uuml;tzten Browser), m&uuml;ssen Sie die lokale BKU installieren und dann &uuml;ber die Button &quot;Login mit B&uuml;rgerkarte&quot; und &quot;Lokale BKU&quot; einsteigen.
+ </li>
+ </ul>
+ <p>
+ <br>
+ <b>Informationen zur B&uuml;rgerkarte finden Sie hier:</b>
+ </p>
+ <ul>
+ <li>
+ <a href="http://www.digitales.oesterreich.gv.at" target="_blank">Digitales &Ouml;sterreich</a>: Informationen rund um E-Government
+ </li>
+ <li>
+ <a href="http://www.buergerkarte.at" target="_blank">B&uuml;rgerkarte</a>: Einfach verst&auml;ndliche Informationen zur B&uuml;rgerkarte
+ </li>
+ </ul>
+ <p>
+ <br>
+ <b>Hier bekommen Sie Ihre B&uuml;rgerkarte:</b>
+ </p>
+ <ul>
+ <li>
+ <a href="http://www.a-trust.at/" target="_blank">A-Trust</a>: Aktivieren der Bankomatkarte/e-card als B&uuml;rgerkarte oder Registrierung ihres Mobiltelefons als B&uuml;rgerkarte oder Ausstellung einer eigenen B&uuml;rgerkarte
+ </li>
+ </ul>
+ <p align="center">
+ <a href="javascript:history.back();" class="link_nav">zur&uuml;ck</a>
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+ </body>
+</html> \ No newline at end of file
diff --git a/id/server/auth/src/main/webapp/javascript/fa.js b/id/server/auth/src/main/webapp/javascript/fa.js
new file mode 100644
index 000000000..ffa4031b1
--- /dev/null
+++ b/id/server/auth/src/main/webapp/javascript/fa.js
@@ -0,0 +1,8 @@
+function deactivateApplicant( ) {
+ if ( document.formular.familienname.value != '' )
+ toggleActive( document.formular.familienname, 'deactive' );
+ if ( document.formular.vorname.value != '' )
+ toggleActive( document.formular.vorname, 'deactive' );
+ if ( document.formular.geburtsdatum.value != '' && document.formular.geburtsdatum.value != 'JJJJ-MM-TT' )
+ toggleActive( document.formular.geburtsdatum, 'deactive' );
+}
diff --git a/id/server/auth/src/main/webapp/javascript/formallg.js b/id/server/auth/src/main/webapp/javascript/formallg.js
new file mode 100644
index 000000000..65d7bbedf
--- /dev/null
+++ b/id/server/auth/src/main/webapp/javascript/formallg.js
@@ -0,0 +1,315 @@
+/*
+|| Die Funktion displayElement() macht ein verstecktes HTML-Element sichtbar.
+|| Das HTML-Element ist in aller Regel ein mit <div> ... </div> umspannter
+|| HTML-Abschnitt.
+||
+|| IN-Parameter: element_id ... ID des sichtbarzumachenden HTML-Elements
+||
+*/
+
+function displayElement( element_id ) {
+ if ( notNN4( ) )
+ {
+ var elementToDisplay = document.getElementById( element_id );
+ elementToDisplay.className = 'show';
+ }
+}
+
+
+
+/*
+|| Die Funktion hideElement() macht ein HTML-Element unsichtbar.
+|| Das HTML-Element ist in aller Regel ein mit <div> ... </div> umspannter
+|| HTML-Abschnitt.
+||
+|| IN-Parameter: element_id ... ID des zu versteckenden HTML-Elements
+||
+*/
+
+function hideElement( element_id ) {
+ if ( notNN4( ) )
+ {
+ var elementToHide = document.getElementById( element_id );
+ elementToHide.className = 'hide';
+ }
+}
+
+
+
+/*
+|| Die Funktion resetValue() setzt Radiobuttons, Dropdown-Menues und Checkboxes auf ihre
+|| Ausgangswerte (beim Laden des Formulars) zurueck.
+||
+|| IN-Parameter: element ... Radiobutton-, Dropdown- oder Checkbox-Element
+||
+*/
+
+function resetValue( element ) {
+ for ( var i = 0; i < element.length; i++ )
+ {
+ element[i].checked = element[i].defaultChecked;
+ element[i].selected = element[i].defaultSelected;
+ }
+}
+
+
+
+/*
+|| Die Funktion toggleDisplay() invertiert die Sichtbarkeit eines
+|| HTML-Elements.
+|| Das HTML-Element ist in aller Regel ein mit <div> ... </div> umspannter
+|| HTML-Abschnitt.
+||
+|| IN-Parameter: element_id ... ID des zu invertierenden HTML-Elements
+||
+*/
+
+function toggleDisplay( element_id ) {
+ if ( notNN4( ) )
+ {
+ var elementToToggle = document.getElementById( element_id );
+ var elementClass = elementToToggle.className;
+ if ( elementClass == 'hide' )
+ elementToToggle.className = "display";
+ else
+ elementToToggle.className = "hide";
+ }
+}
+
+/*
+|| Die Funktion toggleActive() setzt das Attribut 'readonly' eines
+|| HTML-Eingabeelements.
+||
+|| IN-Parameter: element ... HTML-Eingabeelement
+|| IN-Parameter: status ... entweder 'active' oder 'deactive'
+||
+*/
+
+function toggleActive( element, status ) {
+
+ if ( notNN4( ) )
+ {
+ var elementToToggle = document.getElementById( element.id );
+
+ if ( status == 'active' )
+ {
+ element.readOnly = false;
+ elementToToggle.className = "active";
+ }
+ else
+ {
+ element.readOnly = true;
+ elementToToggle.className = "deactive";
+ }
+ }
+}
+
+
+
+/*
+|| Die Funktion changeActivity() setzt das Attribut 'readonly' eines
+|| HTML-Eingabeelements in Abhaengigkeit des Uebergabeparameters 'value'.
+||
+|| IN-Parameter: value ... Wert eines HTML-Eingabelements
+|| IN-Parameter: element ... HTML-Eingabeelement
+||
+*/
+
+function changeActivity( value, element ) {
+ if ( value == null || value == '' )
+ toggleActive( element, 'active' );
+ else
+ toggleActive( element, 'deactive' );
+}
+
+
+
+/*
+|| Die Funktion pasteValueAndDeactivate() setzt den Wert eines HTML-Eingabeelements
+|| und setzt das Attribut 'readonly', je nachdem ob der uebergebene Wert ungleich
+|| dem Leerstring ist oder nicht.
+||
+|| IN-Parameter: value ... zu setzender Wert
+|| IN-Parameter: element ... HTML-Eingabeelement
+||
+*/
+
+function pasteValueAndDeactivate( value, element ) {
+ if ( notNN4( ) )
+ {
+ var elementToSet = document.getElementById( element.id );
+ elementToSet.value = value;
+ if ( value != null && value != '' )
+ {
+ element.readOnly = true;
+ elementToSet.className = "deactive";
+ }
+ else
+ {
+ element.readOnly = false;
+ elementToSet.className = "active";
+ }
+ }
+}
+
+
+
+/*
+|| Die Funktion popitup() oeffnet im Browser links oben ein Fenster
+|| mit bestimmten Eigenschaften (keine Statuszeile, kein Browsermenue, etc.).
+|| URL und Groesse des Fensters werden als Parameter uebergeben.
+||
+|| IN-Parameter: url ... in dem Fenster zu oeffnende URL
+|| IN-Parameter: win_width ... Breite des zu oeffnenden Fensters
+|| IN-Parameter: win_height ... Hoehe des zu oeffnenden Fensters
+||
+*/
+
+function popitup( url, win_width, win_height ) {
+ var features = "resizable, scrollbars=yes,status=no, menubar=no, toolbar=no, screenX=20, screenY=20, width=" + win_width + ", height=" + win_height;
+ newwindow=window.open( url, 'Info', features );
+ /* die folgende Anweisung verursacht im IE eine Zugriffsverletzung, daher auskommentiert! */
+ // newwindow.moveTo( 20, 20);
+ if ( window.focus )
+ newwindow.focus( );
+}
+
+
+
+/*
+|| Die Funktion initialize() deaktiviert das StyleSheet styles_opera.css (ausser fuer Opera).
+|| Ausserdem werden in Browsern, die JavaScript aktiviert haben, die Icon-Info-Links durch href-Werte ersetzt,
+|| die kein neues Browser-Fenster, sondern ein kleines Fenster oeffnen (s. Funktion javascriptWindows).
+|| Der Parameter url hat entweder den Wert http://www.help.gv.at/formulare/infotexte/ oder
+|| http://e-www.help.gv.at/linkdb/formulare/infotexte/, je nachdem in welcher Umgebung man sich befindet
+*/
+
+function initialize( url ) {
+ if ( notNN4( ) ) {
+ if (document.getElementsByTagName) {
+ if ( document.getElementsByTagName('link').length > 1 )
+ {
+ document.getElementsByTagName('link')[1].disabled = true;
+ javascriptWindows( url );
+ }
+ schattieren( );
+ }
+ }
+}
+
+
+/*
+|| Die Funktion javascriptWindows() ersetzt in den Formularen bei aktiviertem JavaScript
+|| die Links bei den Infobuttons durch window.open-Befehle, so dass diese Infotexte in
+|| einem kleinen Fenster im Browser links oben geoeffnet werden.
+|| Der Parameter url hat entweder den Wert http://www.help.gv.at/formulare/infotexte/ oder
+|| http://e-www.help.gv.at/linkdb/formulare/infotexte/, je nachdem in welcher Umgebung man sich befindet.
+*/
+
+function javascriptWindows( url ) {
+ var aElement,
+ href,
+ newHref,
+ lastIndex;
+ if ( notNN4( ) )
+ {
+ for ( var i = 0; i < document.getElementsByTagName( 'a' ).length; i++ )
+ {
+ aElement = document.getElementsByTagName( 'a' )[i];
+ href = aElement.href;
+ if ( href.indexOf( 'info_' ) != -1 )
+ {
+ lastIndex = href.lastIndexOf( '/' );
+ newHref = href.substring( lastIndex + 1 );
+ newHref = "javascript:popitup('" + url + newHref + "',660,500);";
+ aElement.setAttribute( 'href', newHref );
+ aElement.setAttribute( 'target', '_self' );
+ }
+ }
+ }
+}
+
+/*
+|| Die Funktion submitButton() erzeugt einen Submit-Button, der ein automatisches
+|| Abschicken verhindert, wenn der User in einem Eingabefeld die Return-Taste
+|| betaetigt.
+|| Wurde durch die Funktion generateButton() abgeloest.
+*/
+
+function submitButton( ) {
+ document.writeln('<input type="button" name="JavaScriptButton" value="Senden" class="button" ' +
+ 'onclick="document.formular.Senden.value=\'Senden\'; document.formular.submit()" ' +
+ 'onkeypress="document.formular.Senden.value=\'Senden\'; document.formular.submit()" />');
+}
+
+/*
+|| Die Funktion cancelButton() erzeugt einen Abbrechen-Button, der ein automatisches
+|| Abschicken verhindert, wenn der User in einem Eingabefeld die Return-Taste
+|| betaetigt.
+|| Wurde durch die Funktion generateButton() abgeloest.
+*/
+
+function cancelButton( ) {
+ document.writeln('<input type="button" name="JavaScriptButton" value="Abbrechen" class="button" ' +
+ 'onclick="document.formular.Senden.value=\'Abbrechen\'; document.formular.submit()" ' +
+ 'onkeypress="document.formular.Senden.value=\'Abbrechen\'; document.formular.submit()" />');
+}
+
+/*
+|| Die Funktion generateButton() erzeugt einen Button, der ein automatisches
+|| Abschicken verhindert, wenn der User in einem Eingabefeld die Return-Taste
+|| betaetigt. Die Art des Buttons wird durch den uebergebenen Wert bestimmt.
+|| Moegliche Werte: Senden, Abbrechen, Signieren, etc.
+*/
+
+function generateButton( kind ) {
+
+ document.write('<input type="button" name="JavaScriptButton" value="' + kind + '" class="button" ' +
+ 'onclick="' );
+ if ( kind == 'Druckversion' )
+ document.write( 'document.formular.target=\'_blank\' ;' );
+ else
+ document.write( 'document.formular.target=\'_self\' ; ' );
+ document.write( 'document.formular.Senden.value=\'' + kind + '\'; document.formular.submit()" ' +
+ 'onkeypress="' );
+ if ( kind == 'Druckversion' )
+ document.write( 'document.formular.target=\'_blank\'; ' );
+ else
+ document.write( 'document.formular.target=\'_self\';' );
+ document.writeln( 'document.formular.Senden.value=\'' + kind + '\'; document.formular.submit()" />');
+
+}
+
+/*
+|| Die Funktion NN4 testet, ob es sich bei dem Browser um einen Netscape
+|| Navigator der Version 4 handelt.
+*/
+
+function notNN4( ) {
+ return ( ! document.layers );
+}
+
+/*
+|| Die Funktion schattieren setzt in den Beilagen-Tabellen abwechselnd Farben
+|| Quelle: Andreas Borutta, http://borumat.de/html/tab-schattieren.php
+*/
+
+
+function schattieren () {
+var tabelle=document.getElementsByTagName("table");
+ for(i=0; i<=tabelle.length-1; i++) {
+ var klasse=tabelle[i].className;
+ var pos1=klasse.indexOf("attachmenttable");
+ if (pos1 > -1) {
+ pos1=klasse.indexOf("ab_");
+ if (pos1 > -1 ) var von=parseInt(klasse.substr(pos1+3,2));
+ else var von=3;
+ var pos2=klasse.indexOf("fuss_");
+ if (pos2 > -1 ) var fuss=parseInt(klasse.substr(pos2+5,2));
+ else var fuss=0;
+ var reihe=tabelle[i].getElementsByTagName("tr");
+ for (j=von -1; j<=reihe.length -fuss -1; j=j+2)
+ reihe[j].className="s";
+ } //endIf
+ } //endFor
+} //endFunc
diff --git a/id/server/auth/src/main/webapp/message-auth.jsp b/id/server/auth/src/main/webapp/message-auth.jsp
new file mode 100644
index 000000000..0c28c1ba7
--- /dev/null
+++ b/id/server/auth/src/main/webapp/message-auth.jsp
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<%@ page contentType="text/html; charset=UTF-8" %>
+<html>
+<head>
+<title>MOA-ID AUTH</title>
+</head>
+<% String message = (String)request.getAttribute("Message");
+%>
+
+<body>
+<h1>MOA-ID AUTH</h1>
+
+<% if (message != null) { %>
+<p>
+<%= message%><br>
+</p>
+<% } %>
+
+</body>
+</html> \ No newline at end of file
diff --git a/id/server/auth/src/main/webapp/template_handyBKU.html b/id/server/auth/src/main/webapp/template_handyBKU.html
new file mode 100644
index 000000000..6ccd295b2
--- /dev/null
+++ b/id/server/auth/src/main/webapp/template_handyBKU.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="de">
+ <head>
+ <title></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <script language="javascript" type="text/javascript">
+ function onAnmeldeSubmit() {
+ document.CustomizedForm.submit();
+ document.CustomizedForm.Senden.disabled=true;
+ }
+ </script>
+ </head>
+ <body onLoad="onAnmeldeSubmit()">
+ <form name="CustomizedForm" action="<BKU>" method="post" enctype="multipart/form-data<>">
+ <input class="button" type="hidden" value="Starte Authentisierung" name="Senden">
+ <input type="hidden" name="XMLRequest" value="<XMLRequest>">
+ <input type="hidden" name="DataURL" value="<DataURL>">
+ <input type="hidden" name="PushInfobox" value="<PushInfobox>">
+
+ <!-- Angabe der Parameter für die Handy-BKU -->
+ <input type="hidden" name="appletWidth" value="220">
+ <input type="hidden" name="appletHeight" value="159">
+
+ <!-- [OPTIONAL] Aendern Sie hier die Hintergrundfarbe der Handy-BKU -->
+ <input type="hidden" name="backgroundColor" value="#DDDDDD">
+
+ <input type="hidden" name="redirecttarget" value="_parent">
+ </form>
+
+ <form name="CustomizedInfoForm" action="<BKU>" method="post">
+ <input type="hidden" name="XMLRequest" value="<CertInfoXMLRequest>">
+ <input type="hidden" name="DataURL" value="<CertInfoDataURL>">
+ </form>
+ <form name="DummyForm" action="<BKU>" method="post">
+ </form>
+ </body>
+</html> \ No newline at end of file
diff --git a/id/server/auth/src/main/webapp/template_localBKU.html b/id/server/auth/src/main/webapp/template_localBKU.html
new file mode 100644
index 000000000..e07ba5d52
--- /dev/null
+++ b/id/server/auth/src/main/webapp/template_localBKU.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="de">
+ <head>
+ <title></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <script language="javascript" type="text/javascript">
+ function onAnmeldeSubmit() {
+ document.CustomizedForm.submit();
+ document.CustomizedForm.Senden.disabled=true;
+ }
+ </script>
+ </head>
+ <body onLoad="onAnmeldeSubmit()">
+ <form name="CustomizedForm" action="<BKU>" method="post" enctype="multipart/form-data<>">
+ <input class="button" type="submit" value="Starte Authentisierung" name="Senden">
+ <input type="hidden" name="XMLRequest" value="<XMLRequest>">
+ <input type="hidden" name="DataURL" value="<DataURL>">
+ <input type="hidden" name="PushInfobox" value="<PushInfobox>">
+ </form>
+
+ <form name="CustomizedInfoForm" action="<BKU>" method="post">
+ <input type="hidden" name="XMLRequest" value="<CertInfoXMLRequest>">
+ <input type="hidden" name="DataURL" value="<CertInfoDataURL>">
+ </form>
+
+ <form name="DummyForm" action="<BKU>" method="post">
+ </form>
+ </body>
+</html>
diff --git a/id/server/auth/src/main/webapp/template_onlineBKU.html b/id/server/auth/src/main/webapp/template_onlineBKU.html
new file mode 100644
index 000000000..1bb2ac236
--- /dev/null
+++ b/id/server/auth/src/main/webapp/template_onlineBKU.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="de">
+ <head>
+ <title></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <script language="javascript" type="text/javascript">
+ function onAnmeldeSubmit() {
+ document.CustomizedForm.submit();
+ document.CustomizedForm.Senden.disabled=true;
+ }
+ </script>
+ </head>
+ <body onLoad="onAnmeldeSubmit()">
+ <form name="CustomizedForm" action="<BKU>" method="post" enctype="multipart/form-data<>">
+ <input class="button" type="hidden" value="Starte Authentisierung" name="Senden">
+ <input type="hidden" name="XMLRequest" value="<XMLRequest>">
+ <input type="hidden" name="DataURL" value="<DataURL>">
+ <input type="hidden" name="PushInfobox" value="<PushInfobox>">
+
+ <!-- Angabe der Parameter fuer die Online-BKU -->
+ <input type="hidden" name="appletWidth" value="220">
+ <input type="hidden" name="appletHeight" value="140">
+
+ <!-- [OPTIONAL] Aendern Sie hier die Hintergrundfarbe der Online-BKU -->
+ <input type="hidden" name="appletBackgroundColor" value="#DDDDDD">
+ </form>
+
+ <form name="CustomizedInfoForm" action="<BKU>" method="post">
+ <input type="hidden" name="XMLRequest" value="<CertInfoXMLRequest>">
+ <input type="hidden" name="DataURL" value="<CertInfoDataURL>">
+ </form>
+ <form name="DummyForm" action="<BKU>" method="post">
+ </form>
+ </body>
+</html>
diff --git a/id/server/auth/src/main/wsdl/MOA-ID-1.0.wsdl b/id/server/auth/src/main/wsdl/MOA-ID-1.0.wsdl
new file mode 100644
index 000000000..5751b3e58
--- /dev/null
+++ b/id/server/auth/src/main/wsdl/MOA-ID-1.0.wsdl
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="MOA" targetNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" xmlns:moa="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/ http://schemas.xmlsoap.org/wsdl/">
+ <import namespace="http://reference.e-government.gv.at/namespace/moa/20020822#" location="MOA-20020812.xsd"/>
+ <message name="GetAuthenticationDataInput">
+ <part name="body" element="samlp:Request"/>
+ </message>
+ <message name="GetAuthenticationDataOutput">
+ <part name="body" element="samlp:Response"/>
+ </message>
+ <message name="MOAFault">
+ <part name="body" element="moa:ErrorResponse"/>
+ </message>
+ <portType name="IdentificationPortType">
+ <operation name="getAuthenticationData">
+ <input message="tns:GetAuthenticationDataInput"/>
+ <output message="tns:GetAuthenticationDataOutput"/>
+ <fault name="MOAFault" message="tns:MOAFault"/>
+ </operation>
+ </portType>
+ <binding name="IdentificationBinding" type="tns:IdentificationPortType" xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/soap/ http://schemas.xmlsoap.org/wsdl/soap/">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="getAuthenticationData">
+ <soap:operation soapAction="urn:GetAuthenticationDataAction"/>
+ <input>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </output>
+ <fault name="MOAFault">
+ <soap:fault name="MOAFault" use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </fault>
+ </operation>
+ </binding>
+ <service name="GetAuthenticationDataService">
+ <port name="IdentificationPort" binding="tns:IdentificationBinding">
+ <soap:address location="http://localhost/moa-id-auth/services/GetAuthenticationData"/>
+ </port>
+ </service>
+</definitions>
diff --git a/id/server/auth/src/main/wsdl/MOA-ID-1.x.wsdl b/id/server/auth/src/main/wsdl/MOA-ID-1.x.wsdl
new file mode 100644
index 000000000..5466a0b6f
--- /dev/null
+++ b/id/server/auth/src/main/wsdl/MOA-ID-1.x.wsdl
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="MOA" targetNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" xmlns:moa="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/ http://schemas.xmlsoap.org/wsdl/">
+ <import namespace="http://reference.e-government.gv.at/namespace/moa/20020822#" location="MOA-SPSS-1.2.xsd"/>
+ <message name="GetAuthenticationDataInput">
+ <part name="body" element="samlp:Request"/>
+ </message>
+ <message name="GetAuthenticationDataOutput">
+ <part name="body" element="samlp:Response"/>
+ </message>
+ <message name="MOAFault">
+ <part name="body" element="moa:ErrorResponse"/>
+ </message>
+ <portType name="IdentificationPortType">
+ <operation name="getAuthenticationData">
+ <input message="tns:GetAuthenticationDataInput"/>
+ <output message="tns:GetAuthenticationDataOutput"/>
+ <fault name="MOAFault" message="tns:MOAFault"/>
+ </operation>
+ </portType>
+ <binding name="IdentificationBinding" type="tns:IdentificationPortType" xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/soap/ http://schemas.xmlsoap.org/wsdl/soap/">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="getAuthenticationData">
+ <soap:operation soapAction="urn:GetAuthenticationDataAction"/>
+ <input>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </output>
+ <fault name="MOAFault">
+ <soap:fault name="MOAFault" use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </fault>
+ </operation>
+ </binding>
+ <service name="GetAuthenticationDataService">
+ <port name="IdentificationPort" binding="tns:IdentificationBinding">
+ <soap:address location="http://localhost/Identification"/>
+ </port>
+ </service>
+</definitions>
diff --git a/id/server/auth/src/main/wsdl/MOA-SPSS-1.2.xsd b/id/server/auth/src/main/wsdl/MOA-SPSS-1.2.xsd
new file mode 100644
index 000000000..d7a06d6e7
--- /dev/null
+++ b/id/server/auth/src/main/wsdl/MOA-SPSS-1.2.xsd
@@ -0,0 +1,454 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ MOA SP/SS 1.2 Schema
+-->
+<xsd:schema targetNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.2">
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+ <!--########## Create XML Signature ###-->
+ <!--### Create XML Signature Request ###-->
+ <xsd:element name="CreateXMLSignatureRequest">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="CreateXMLSignatureRequestType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:complexType name="CreateXMLSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="KeyIdentifier" type="KeyIdentifierType"/>
+ <xsd:element name="SingleSignatureInfo" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Ermöglichung der Stapelsignatur durch wiederholte Angabe dieses Elements</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="DataObjectInfo" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="DataObjectInfoType">
+ <xsd:attribute name="ChildOfManifest" type="xsd:boolean" use="optional" default="false"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="CreateSignatureInfo" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="CreateSignatureEnvironment" type="ContentOptionalRefType"/>
+ <xsd:choice>
+ <xsd:annotation>
+ <xsd:documentation>Auswahl: Entweder explizite Angabe des Signaturorts sowie ggf. sinnvoller Supplements im Zshg. mit der Signaturumgebung, oder Verweis auf ein benanntes Profil</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element ref="CreateSignatureEnvironmentProfile"/>
+ <xsd:element name="CreateSignatureEnvironmentProfileID" type="ProfileIdentifierType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="SecurityLayerConformity" type="xsd:boolean" use="optional" default="true"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Create XML Signature Response ###-->
+ <xsd:complexType name="CreateXMLSignatureResponseType">
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Kardinalität 1..oo erlaubt die Antwort auf eine Stapelsignatur-Anfrage</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element name="SignatureEnvironment">
+ <xsd:annotation>
+ <xsd:documentation>Resultat, falls die Signaturerstellung erfolgreich war</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="lax"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element ref="ErrorResponse"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:element name="CreateXMLSignatureResponse" type="CreateXMLSignatureResponseType"/>
+ <!--########## Verify CMS Signature ###-->
+ <!--### Verifiy CMS Signature Request ###-->
+ <xsd:element name="VerifyCMSSignatureRequest">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="VerifyCMSSignatureRequestType">
+ <xsd:attribute name="Signatories" type="SignatoriesType" use="optional" default="1"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:complexType name="VerifyCMSSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="DateTime" type="xsd:dateTime" minOccurs="0"/>
+ <xsd:element name="CMSSignature" type="xsd:base64Binary"/>
+ <xsd:element name="DataObject" type="CMSDataObjectOptionalMetaType" minOccurs="0"/>
+ <xsd:element name="TrustProfileID">
+ <xsd:annotation>
+ <xsd:documentation>mit diesem Profil wird eine Menge von vertrauenswürdigen Wurzelzertifikaten spezifiziert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Verify CMS Signature Response ###-->
+ <xsd:element name="VerifyCMSSignatureResponse" type="VerifyCMSSignatureResponseType"/>
+ <xsd:complexType name="VerifyCMSSignatureResponseType">
+ <xsd:sequence maxOccurs="unbounded">
+ <xsd:element name="SignerInfo" type="dsig:KeyInfoType">
+ <xsd:annotation>
+ <xsd:documentation>only ds:X509Data and RetrievalMethod is supported; QualifiedCertificate is included as X509Data/any;publicAuthority is included as X509Data/any</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="SignatureCheck" type="CheckResultType"/>
+ <xsd:element name="CertificateCheck" type="CheckResultType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--########## Verify XML Signature ###-->
+ <!--### Verify XML Signature Request ###-->
+ <xsd:element name="VerifyXMLSignatureRequest" type="VerifyXMLSignatureRequestType"/>
+ <xsd:complexType name="VerifyXMLSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="DateTime" type="xsd:dateTime" minOccurs="0"/>
+ <xsd:element name="VerifySignatureInfo">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="VerifySignatureEnvironment" type="ContentOptionalRefType"/>
+ <xsd:element name="VerifySignatureLocation" type="xsd:token"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element ref="SupplementProfile"/>
+ <xsd:element name="SupplementProfileID" type="xsd:string"/>
+ </xsd:choice>
+ <xsd:element name="SignatureManifestCheckParams" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ReferenceInfo" type="VerifyTransformsDataType" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Pro dsig:Reference-Element in der zu überprüfenden XML-Signatur muss hier ein ReferenceInfo-Element erscheinen. Die Reihenfolge der einzelnen ReferenceInfo Elemente entspricht jener der dsig:Reference Elemente in der XML-Signatur.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="ReturnReferenceInputData" type="xsd:boolean" use="optional" default="true"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ReturnHashInputData" minOccurs="0"/>
+ <xsd:element name="TrustProfileID">
+ <xsd:annotation>
+ <xsd:documentation>mit diesem Profil wird eine Menge von vertrauenswürdigen Wurzelzertifikaten spezifiziert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Verify XML Signature Response ###-->
+ <xsd:element name="VerifyXMLSignatureResponse" type="VerifyXMLSignatureResponseType"/>
+ <xsd:complexType name="VerifyXMLSignatureResponseType">
+ <xsd:sequence>
+ <xsd:element name="SignerInfo" type="dsig:KeyInfoType">
+ <xsd:annotation>
+ <xsd:documentation>only ds:X509Data and ds:RetrievalMethod is supported; QualifiedCertificate is included as X509Data/any; PublicAuthority is included as X509Data/any</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="HashInputData" type="ContentExLocRefBaseType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="ReferenceInputData" type="ContentExLocRefBaseType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="SignatureCheck" type="ReferencesCheckResultType"/>
+ <xsd:element name="SignatureManifestCheck" type="ReferencesCheckResultType" minOccurs="0"/>
+ <xsd:element name="XMLDSIGManifestCheck" type="ManifestRefsCheckResultType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="CertificateCheck" type="CheckResultType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:simpleType name="ProfileIdentifierType">
+ <xsd:restriction base="xsd:token"/>
+ </xsd:simpleType>
+ <xsd:complexType name="MetaInfoType">
+ <xsd:sequence>
+ <xsd:element name="MimeType" type="MimeTypeType"/>
+ <xsd:element name="Description" type="xsd:anyURI" minOccurs="0"/>
+ <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="FinalDataMetaInfoType">
+ <xsd:complexContent>
+ <xsd:extension base="MetaInfoType">
+ <xsd:sequence>
+ <xsd:element name="Type" type="xsd:anyURI" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="DataObjectInfoType">
+ <xsd:sequence>
+ <xsd:element name="DataObject">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="ContentOptionalRefType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:choice>
+ <xsd:annotation>
+ <xsd:documentation>Auswahl: Entweder explizite Angabe EINER Transformationskette inklusive ggf. sinnvoller Supplements oder Verweis auf ein benanntes Profil</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element ref="CreateTransformsInfoProfile"/>
+ <xsd:element name="CreateTransformsInfoProfileID" type="ProfileIdentifierType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ <xsd:attribute name="Structure" use="required">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="detached"/>
+ <xsd:enumeration value="enveloping"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ </xsd:complexType>
+ <xsd:complexType name="TransformsInfoType">
+ <xsd:sequence>
+ <xsd:element ref="dsig:Transforms" minOccurs="0"/>
+ <xsd:element name="FinalDataMetaInfo" type="FinalDataMetaInfoType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="XMLDataObjectAssociationType">
+ <xsd:sequence>
+ <xsd:element name="MetaInfo" type="MetaInfoType" minOccurs="0"/>
+ <xsd:element name="Content" type="ContentRequiredRefType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CMSDataObjectOptionalMetaType">
+ <xsd:sequence>
+ <xsd:element name="MetaInfo" type="MetaInfoType" minOccurs="0"/>
+ <xsd:element name="Content" type="CMSContentBaseType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CMSContentBaseType">
+ <xsd:complexContent>
+ <xsd:restriction base="ContentOptionalRefType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ </xsd:choice>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="AnyChildrenType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ReferencesCheckResultType">
+ <xsd:complexContent>
+ <xsd:restriction base="CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="ReferencesCheckResultInfoType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ReferencesCheckResultInfoType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:restriction base="AnyChildrenType">
+ <xsd:sequence>
+ <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="FailedReference" type="xsd:positiveInteger" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ManifestRefsCheckResultType">
+ <xsd:complexContent>
+ <xsd:restriction base="CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="ManifestRefsCheckResultInfoType"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ManifestRefsCheckResultInfoType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:restriction base="AnyChildrenType">
+ <xsd:sequence>
+ <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="FailedReference" type="xsd:positiveInteger" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="ReferringSigReference" type="xsd:positiveInteger"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <!--########## Error Response ###-->
+ <xsd:element name="ErrorResponse" type="ErrorResponseType">
+ <xsd:annotation>
+ <xsd:documentation>Resultat, falls die Signaturerstellung gescheitert ist</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:complexType name="ErrorResponseType">
+ <xsd:sequence>
+ <xsd:element name="ErrorCode" type="xsd:integer"/>
+ <xsd:element name="Info" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--########## Auxiliary Types ###-->
+ <xsd:simpleType name="KeyIdentifierType">
+ <xsd:restriction base="xsd:string"/>
+ </xsd:simpleType>
+ <xsd:simpleType name="KeyStorageType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="Software"/>
+ <xsd:enumeration value="Hardware"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="MimeTypeType">
+ <xsd:restriction base="xsd:token"/>
+ </xsd:simpleType>
+ <xsd:complexType name="AnyChildrenType" mixed="true">
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="XMLContentType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:extension base="AnyChildrenType">
+ <xsd:attribute ref="xml:space" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ContentBaseType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ <xsd:element name="LocRefContent" type="xsd:anyURI"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:complexType name="ContentExLocRefBaseType">
+ <xsd:complexContent>
+ <xsd:restriction base="ContentBaseType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ </xsd:choice>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ContentOptionalRefType">
+ <xsd:complexContent>
+ <xsd:extension base="ContentBaseType">
+ <xsd:attribute name="Reference" type="xsd:anyURI" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ContentRequiredRefType">
+ <xsd:complexContent>
+ <xsd:restriction base="ContentOptionalRefType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ <xsd:element name="LocRefContent" type="xsd:anyURI"/>
+ </xsd:choice>
+ <xsd:attribute name="Reference" type="xsd:anyURI" use="required"/>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="VerifyTransformsDataType">
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Ein oder mehrere Transformationswege können von der Applikation an MOA mitgeteilt werden. Die zu prüfende Signatur hat zumindest einem dieser Transformationswege zu entsprechen. Die Angabe kann explizit oder als Profilbezeichner erfolgen.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element ref="VerifyTransformsInfoProfile"/>
+ <xsd:element name="VerifyTransformsInfoProfileID" type="xsd:string">
+ <xsd:annotation>
+ <xsd:documentation>Profilbezeichner für einen Transformationsweg</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:element name="QualifiedCertificate"/>
+ <xsd:element name="PublicAuthority" type="PublicAuthorityType"/>
+ <xsd:complexType name="PublicAuthorityType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:string" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:simpleType name="SignatoriesType">
+ <xsd:union memberTypes="AllSignatoriesType">
+ <xsd:simpleType>
+ <xsd:list itemType="xsd:positiveInteger"/>
+ </xsd:simpleType>
+ </xsd:union>
+ </xsd:simpleType>
+ <xsd:simpleType name="AllSignatoriesType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="all"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:complexType name="CreateSignatureLocationType">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:token">
+ <xsd:attribute name="Index" type="xsd:nonNegativeInteger" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ <xsd:complexType name="TransformParameterType">
+ <xsd:choice minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Die Angabe des Transformationsparameters (explizit oder als Hashwert) kann unterlassen werden, wenn die Applikation von der Unveränderlichkeit des Inhalts der in "Transformationsparamter", Attribut "URI" angegebenen URI ausgehen kann.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element name="Base64Content" type="xsd:base64Binary">
+ <xsd:annotation>
+ <xsd:documentation>Der Transformationsparameter explizit angegeben.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="Hash">
+ <xsd:annotation>
+ <xsd:documentation>Der Hashwert des Transformationsparameters.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="dsig:DigestMethod"/>
+ <xsd:element ref="dsig:DigestValue"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ <xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:element name="CreateSignatureEnvironmentProfile">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="CreateSignatureLocation" type="CreateSignatureLocationType"/>
+ <xsd:element name="Supplement" type="XMLDataObjectAssociationType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="VerifyTransformsInfoProfile">
+ <xsd:annotation>
+ <xsd:documentation>Explizite Angabe des Transformationswegs</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="dsig:Transforms" minOccurs="0"/>
+ <xsd:element name="TransformParameter" type="TransformParameterType" minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Alle impliziten Transformationsparameter, die zum Durchlaufen der oben angeführten Transformationskette bekannt sein müssen, müssen hier angeführt werden. Das Attribut "URI" bezeichnet den Transformationsparameter in exakt jener Weise, wie er in der zu überprüfenden Signatur gebraucht wird.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Supplement" type="XMLDataObjectAssociationType"/>
+ <xsd:element name="SupplementProfile" type="XMLDataObjectAssociationType"/>
+ <xsd:element name="CreateTransformsInfoProfile">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="CreateTransformsInfo" type="TransformsInfoType"/>
+ <xsd:element ref="Supplement" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+</xsd:schema>
diff --git a/id/server/component-idlibs.xml b/id/server/component-idlibs.xml
new file mode 100644
index 000000000..8edd4793f
--- /dev/null
+++ b/id/server/component-idlibs.xml
@@ -0,0 +1,39 @@
+<component>
+ <dependencySets>
+ <dependencySet>
+ <includes>
+ <include>iaik.prod:iaik_Pkcs11Wrapper:dll:win32</include>
+ </includes>
+ <outputDirectory>/pkcs11/win32</outputDirectory>
+ <outputFileNameMapping>pkcs11wrapper.${extension}</outputFileNameMapping>
+ </dependencySet>
+ <dependencySet>
+ <includes>
+ <include>iaik.prod:iaik_Pkcs11Wrapper:so:linux</include>
+ </includes>
+ <outputDirectory>/pkcs11/linux</outputDirectory>
+ <outputFileNameMapping>libpkcs11wrapper.${extension}</outputFileNameMapping>
+ </dependencySet>
+ <dependencySet>
+ <includes>
+ <include>iaik.prod:iaik_Pkcs11Wrapper:so:solaris_sparc</include>
+ </includes>
+ <outputDirectory>/pkcs11/solaris_sparc</outputDirectory>
+ <outputFileNameMapping>libpkcs11wrapper.${extension}</outputFileNameMapping>
+ </dependencySet>
+ <dependencySet>
+ <includes>
+ <include>iaik.prod:iaik_Pkcs11Wrapper:so:solaris_sparcv9</include>
+ </includes>
+ <outputDirectory>/pkcs11/solaris_sparcv9</outputDirectory>
+ <outputFileNameMapping>libpkcs11wrapper.${extension}</outputFileNameMapping>
+ </dependencySet>
+ <dependencySet>
+ <includes>
+ <include>iaik.prod:iaik_Pkcs11Wrapper:dll:win64</include>
+ </includes>
+ <outputDirectory>/pkcs11/win64</outputDirectory>
+ <outputFileNameMapping>pkcs11wrapper.${extension}</outputFileNameMapping>
+ </dependencySet>
+ </dependencySets>
+</component> \ No newline at end of file
diff --git a/id/server/data/deploy/conf/Catalina/localhost/proxy.xml b/id/server/data/deploy/conf/Catalina/localhost/proxy.xml
new file mode 100644
index 000000000..eef60b953
--- /dev/null
+++ b/id/server/data/deploy/conf/Catalina/localhost/proxy.xml
@@ -0,0 +1,25 @@
+<!--
+
+ Context configuration file for the MOA-Proxy App
+
+ aus einer Tomcat 4.x.xx server.xml Datei:
+ <Context path="" docBase="../moa-id-proxy.war" debug="0"/>
+
+-->
+<Context path="" docBase="${catalina.base}/webappsProxy/moa-id-proxy.war" privileged="true"
+
+ antiResourceLocking="false" antiJARLocking="false">
+
+<!--
+<ResourceLink name="users" global="UserDatabase"
+ type="org.apache.catalina.UserDatabase"/>
+-->
+
+ <!-- Uncomment this Valve to limit access to the Admin app to localhost
+ for obvious security reasons. Allow may be a comma-separated list of
+ hosts (or even regular expressions).
+ <Valve className="org.apache.catalina.valves.RemoteAddrValve"
+ allow="127.0.0.1"/>
+ -->
+
+</Context>
diff --git a/id/server/data/deploy/conf/moa-id/MOAIdentities.xsd b/id/server/data/deploy/conf/moa-id/MOAIdentities.xsd
new file mode 100644
index 000000000..91c7a6cc0
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-id/MOAIdentities.xsd
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) by Rudolf Schamberger (Stabsstelle IKT-Strategie) (Bundesrechenzentrum GmbH) -->
+<xs:schema targetNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#/xmllpr20030814" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://reference.e-government.gv.at/namespace/moa/20020822#/xmllpr20030814" elementFormDefault="qualified" attributeFormDefault="unqualified">
+ <xs:element name="MOAIdentities">
+ <xs:annotation>
+ <xs:documentation>MOAIdentities provides a mapping from identities to parameters used in the XMLLoginParameterResolver of MOA-ID</xs:documentation>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:sequence maxOccurs="unbounded">
+ <xs:element name="Mapping">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Identity">
+ <xs:complexType>
+ <xs:choice>
+ <xs:element name="NamedIdentity" type="tns:NamedIdentityType"/>
+ <xs:element name="bPKIdentity" type="tns:bPKIdentitiyType"/>
+ <xs:element name="wbPKIdentity" type="tns:wbPKIdentitiyType"/>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="Parameters" type="tns:ParametersType"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:complexType name="wbPKIdentitiyType">
+ <xs:simpleContent>
+ <xs:extension base="xs:boolean">
+ <xs:attribute name="wbPK" type="xs:string" use="required"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:complexType name="bPKIdentitiyType">
+ <xs:simpleContent>
+ <xs:extension base="xs:boolean">
+ <xs:attribute name="bPK" type="xs:string" use="required"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:complexType name="NamedIdentityType">
+ <xs:simpleContent>
+ <xs:extension base="xs:boolean">
+ <xs:attribute name="SurName" type="xs:string" use="required"/>
+ <xs:attribute name="GivenName" type="xs:string" use="required"/>
+ <xs:attribute name="BirthDate" type="xs:string" use="optional"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ <xs:complexType name="ParametersType">
+ <xs:attribute name="UN" type="xs:string" use="optional"/>
+ <xs:attribute name="PW" type="xs:string" use="optional"/>
+ <xs:attribute name="Param1" type="xs:string" use="optional"/>
+ <xs:attribute name="Param2" type="xs:string" use="optional"/>
+ <xs:attribute name="Param3" type="xs:string" use="optional"/>
+ </xs:complexType>
+</xs:schema>
diff --git a/id/server/data/deploy/conf/moa-id/SampleIdentities.xml b/id/server/data/deploy/conf/moa-id/SampleIdentities.xml
new file mode 100644
index 000000000..abda0bf64
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-id/SampleIdentities.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Beispielkonfiguration für den Einsatz der MOA-ID Proxy-Komponenten unter Einsatz eines speziellen XMLLoginParameterResolver
+ Damit kann unter Einsatz des XMLLoginParameterResolverPlainData (s.u.) eine Einschränkung von Benutzer für OA erfolgen. -->
+<!-- Beispiel für ein Element ProxyComponent in der MOA-ID Konfigurationsdatei welches den XMLLoginParameterResolverPlainData
+ mit der Benutzerdatei Identities.xml verwendet um sich über Basic Authentication (401) an einer Webseite anzumeldne -->
+
+
+<!--
+ <ProxyComponent configFileURL="oa/SampleOAConfiguration.xml" sessionTimeOut="600"
+ loginParameterResolverImpl="at.gv.egovernment.moa.id.proxy.XMLLoginParameterResolverPlainData"
+ loginParameterResolverConfiguration="Identities.xml">
+ <ConnectionParameter URL="http://www.digitales.oesterreich.gv.at/">
+ </ConnectionParameter>
+ </ProxyComponent>
+-->
+<MOAIdentities xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#/xmllpr20030814" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://reference.e-government.gv.at/namespace/moa/20020822#/xmllpr20030814 MOAIdentities.xsd">
+ <!-- Eintrag aller Benutzer mit Berechtigung -->
+ <!-- Die Daten müssen in der Schreibweise wie in der Personenbindung (= Schreibweise des ZMRs) eingegeben werden -->
+
+ <!-- Benutzerin Kunz -->
+ <Mapping>
+ <Identity>
+ <NamedIdentity SurName="Kunz" GivenName="Karin Stella" BirthDate="1900-01-01">1</NamedIdentity>
+ </Identity>
+ <Parameters UN="KunzKS" PW="geheim"/>
+ </Mapping>
+ <!-- Benutzer Mustermann -->
+ <Mapping>
+ <Identity>
+ <NamedIdentity SurName="Mustermann-Fall" GivenName="Max Moriz" BirthDate="1900-01-01">1</NamedIdentity>
+ </Identity>
+ <Parameters UN="MustMM" PW="höchst?Geheim"/>
+ </Mapping>
+</MOAIdentities>
diff --git a/id/server/data/deploy/conf/moa-id/SampleMOAIDConfiguration.xml b/id/server/data/deploy/conf/moa-id/SampleMOAIDConfiguration.xml
new file mode 100644
index 000000000..b74956473
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-id/SampleMOAIDConfiguration.xml
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Beispielkonfiguration fuer MOA-ID ohne Proxy mit Unterstuetzung fuer A-Trust und Handy-Signatur -->
+<MOA-IDConfiguration xmlns="http://www.buergerkarte.at/namespaces/moaconfig#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:sl10="http://www.buergerkarte.at/namespaces/securitylayer/20020225#" xmlns:sl11="http://www.buergerkarte.at/namespaces/securitylayer/20020831#">
+ <!-- Konfiguration fuer MOA-ID-AUTH -->
+ <AuthComponent>
+ <!-- URL und akzeptierte TLS-Server-Zertifikate des verwendeten BKU-Auswahl Service -->
+ <BKUSelection BKUSelectionAlternative="HTMLSelect">
+ <ConnectionParameter URL="http://auswahl.buergerkarte.at/htmlcode">
+ <!-- <AcceptedServerCertificates>certs/server-certs</AcceptedServerCertificates> -->
+ </ConnectionParameter>
+ </BKUSelection>
+ <!-->Globale Templates zum Anpassen der Seiten &quot;Auswahl der B&uuml;rgerkartenumgebung&quot; und
+ &quot;Anmeldung mit B&uuml;rgerkarte&quot; sowie des Signaturformulars nach der Abarbeitung der Infobox-Validatoren <-->
+ <Templates>
+ <!--BKUSelectionTemplate URL="sampleTemplates/SampleBKUSelectionTemplate.html"/-->
+ <!--Template URL="sampleTemplates/SampleTemplate.html"/-->
+ <!--InputProcessorSignTemplate URL="sampleTemplates/SampleInputProcessorSignTemplate.html"/-->
+ </Templates>
+ <!-- Transformationen fuer die Anzeige des AUTH-Block im Secure Viewer -->
+ <SecurityLayer>
+ <!-- Wählen Sie hier den deutschen oder englischen Auswahltext -->
+ <TransformsInfo filename="transforms/TransformsInfoAuthBlockTable_DE.xml"/>
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlockTable_EN.xml"/>-->
+ </SecurityLayer>
+ <MOA-SP>
+ <!-- URL und akzeptierte TLS-Server-Zertifikate des MOA-SP Web Service, falls MOA-SP ueber Web Service angesprochen wird.
+ Wenn MOA-SP direkt ueber API aufgerufen werden soll, so wird das Element auskommentiert -->
+ <!-- ConnectionParameter URL="http://moa.gv.at/moa-spss-test/services/SignatureVerification"/ -->
+ <!-- ConnectionParameter URL="http://localhost:8080/moa-spss/services/SignatureVerification"/ -->
+ <!-- <AcceptedServerCertificates>certs/server-certs</AcceptedServerCertificates> -->
+ <!-- <ClientKeyStore password="Keystore Pass">file_to_clientkeystore</ClientKeyStore> -->
+ <!-- </ConnectionParameter> -->
+ <!-- TrustProfile fuer den IdentityLink der Buergerkarte (muss in MOA-SP konfiguriert sein) -->
+ <VerifyIdentityLink>
+ <TrustProfileID>MOAIDBuergerkartePersonenbindung</TrustProfileID>
+ </VerifyIdentityLink>
+ <!-- TrustProfile fuer die Signatur des Benutzers mit der Buergerkarte (muss in MOA-SP konfiguriert sein) -->
+ <VerifyAuthBlock>
+ <TrustProfileID>MOAIDBuergerkarteAuthentisierungsDaten</TrustProfileID>
+ <!-- VerifyTransformsInfoProfile mit den Transformationen fuer die Anzeige der Anmeldedaten im Secure Viewer (muss in MOA-SP konfiguriert sein) -->
+ <!-- Wählen Sie hier entsprechende der Sprachauswahl im Element <SecurityLayer><TransformsInfo> das deutsche oder englische Profil -->
+ <!--<VerifyTransformsInfoProfileID>MOAIDTransformAuthBlockTable_DE</VerifyTransformsInfoProfileID>-->
+ <VerifyTransformsInfoProfileID>MOAIDTransformAuthBlockTable_EN</VerifyTransformsInfoProfileID>
+ </VerifyAuthBlock>
+ </MOA-SP>
+ <!-- Einstellungen für den Zugriff auf das Stammzahlenregister-Gateway - für ausländische Personen -->
+ <ForeignIdentities>
+ <!-- Echtsystem (Eintragung ins ERnP nur mit Echtkarten gemäß E-Government Gleichwertigkeits Verordnung) -->
+ <ConnectionParameter URL="https://gateway.stammzahlenregister.gv.at/services/IdentityLinkCreation">
+ <!-- Testsystem (Eintragung ins ERnP - auch für Testkarten) -->
+ <!--<ConnectionParameter URL="https://gateway.stammzahlenregister.gv.at:8443/services/IdentityLinkCreation">-->
+
+ <!-- Geben Sie hier ihren Client Keystore für den Zugriff auf das Stammzahlenregister-Gateway an -->
+ <!-- Voraussetzung: A-Trust oder A-CERT Zertifikat mit Verwaltungseigenschaft oder Dienstleistereigenschaft. -->
+ <!-- Wenn ihr MOA-ID Zertifikat diese Voraussetzung erfüllt, können Sie dieses hier angeben. -->
+ <ClientKeyStore password="password">cert/clientcert.p12</ClientKeyStore>
+ </ConnectionParameter>
+ </ForeignIdentities>
+
+ <!-- Einstellungen für den Zugriff auf das Online-Vollmachten Service -->
+ <!-- <OnlineMandates> -->
+ <!-- Echtsystem -->
+ <!-- <ConnectionParameter URL="https://vollmachten.stammzahlenregister.gv.at/mis/MandateIssueRequest">-->
+ <!-- Testsystem -->
+ <!-- <ConnectionParameter URL="https://vollmachten.stammzahlenregister.gv.at/mis-test/MandateIssueRequest">-->
+ <!-- Geben Sie hier ihren Client Keystore für den Zugriff auf das Online-Vollmachten System an -->
+ <!-- Voraussetzung: A-Trust oder A-CERT Zertifikat mit Verwaltungseigenschaft oder Dienstleistereigenschaft. -->
+ <!-- Wenn ihr MOA-ID Zertifikat diese Voraussetzung erfüllt, können Sie dieses hier angeben. -->
+ <!-- <ClientKeyStore password="password">certs/clientcert.p12</ClientKeyStore> -->
+ <!-- </ConnectionParameter> -->
+ <!-- Hinweis: Um den Online-Vollmachten Modus für eine Online Applikation zu aktivieren, müssen Sie das Vollmachten Profil angeben -->
+ <!-- (siehe Element OnlineMandates unter MOA-IDConfiguration/AuthComponent/OnlineMandates)-->
+ <!-- </OnlineMandates> -->
+
+
+ </AuthComponent>
+ <!-- Eintragung fuer jede Online-Applikation -->
+ <!-- publicURLPrefix referenziert hier keine richtige Online Applikation; muss angepasst werden -->
+ <OnlineApplication publicURLPrefix="https://localhost:8443/" friendlyName="Online Applikation 1">
+ <!-- fuer MOA-ID-AUTH -->
+ <AuthComponent slVersion="1.2">
+ <!-->Lokale Templates zum Anpassen der Seiten &quot;Auswahl der B&uuml;rgerkartenumgebung&quot; und
+ &quot;Anmeldung mit B&uuml;rgerkarte&quot; sowie des Signaturformulars nach der Abarbeitung der Infobox-Validatoren
+ nur f&uuml;r diese Online Applikation<-->
+ <Templates>
+ <!--BKUSelectionTemplate URL="sampleTemplates/SampleBKUSelectionTemplate.html"/-->
+ <!--Template URL="sampleTemplates/SampleTemplate.html"/-->
+ <!--InputProcessorSignTemplate URL="sampleTemplates/SampleInputProcessorSignTemplate.html"/-->
+ </Templates>
+ <!-- Falls aktiviert, werden diese Transformationen anstatt der Default-Transformationen verwendet -->
+ <!-- TransformInfo in Textform, bevorzugte Variante im xhtml-Format -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlockText.xml"/> -->
+ <!-- TransformInfo in Textform, alternative Variante fuer aeltere BKU -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlockText_deprecated.xml"/> -->
+ <!-- TransformInfo in Tabellenform, bevorzugte Variante im xhtml-Format -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlock.xml"/> -->
+ <!-- TransformInfo in Tabellenform, alternative Variante fuer aeltere BKU -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlock_deprecated.xml"/> -->
+
+ <!-- Aktivieren von Vollmachten fuer diese Online-Applikation-->
+ <!-- Hinweis: Hierzu muss auch die Verbindung zum Online-Vollmachten Service konfigurieren -->
+ <!-- (siehe OnlineApplication/AuthComponent/Mandates)-->
+ <!--<Mandates>-->
+ <!-- Liste der Vollmachten-Identifikatoren, die festlegen mit welchen Vollmachtstypen man sich bei der Online-Applikation anmelden kann-->
+<!-- <Profiles>Zustellung,Prokura,PostvollmachtAufBasisProkura,WKOVollmachtAufBasisProkura,ZVR,ZVRMitPostvollmacht,ERsB,ErsBMitPostvollmacht,PostvollmachtBilateral,GeneralvollmachtBilateral,WKOVollmachtBilateral</Profiles>-->
+<!-- </Mandates>-->
+ </AuthComponent>
+ </OnlineApplication>
+ <!-- ChainingModes fuer die Zertifikatspfadueberpruefung der TLS-Zertifikate -->
+ <ChainingModes systemDefaultMode="pkix">
+ </ChainingModes>
+ <!-- fuer MOA-ID-AUTH: CA-Zertifikat des Servers MOA-SP, falls dieses Service ueber HTTPS angesprochen wird
+ zusaeztlich: CA-Zertifikat aller Online-Applikationen, die ueber HTTPS angesprochen werden -->
+ <TrustedCACertificates>certs/ca-certs</TrustedCACertificates>
+ <!-- Cache-Verzeichnis fuer-Zertifikate -->
+ <!-- Hinweis: wenn TC in linux oder unix betrieben wird vollstaendigen pfad fuer DirectoryCertStoreParameters.RootDir verwenden -->
+ <GenericConfiguration name="DirectoryCertStoreParameters.RootDir" value="certs/certstore"/>
+ <!-- Time-Out fuer die Anmeldung von Beginn bis zum Anlegen der Anmeldedaten, in Sekunden -->
+ <GenericConfiguration name="AuthenticationSession.TimeOut" value="600"/>
+ <!-- Time-Out fuer die Anmeldung vom Anlegen bis zum Abholen der Anmeldedaten, in Sekunden -->
+ <GenericConfiguration name="AuthenticationData.TimeOut" value="120"/>
+ <!-- Alternatives Data URL prefix (falls Webserver vorgeschaltet wird) -->
+ <!--GenericConfiguration name="FrontendServlets.DataURLPrefix" value="https://<your_webserver>/moa-id-auth/"/ -->
+ <!-- HTTP Verbindung auf Frontend Servlets zulassen / verbieten (falls Webserver vorgeschaltet wird) -->
+ <!-- GenericConfiguration name="FrontendServlets.EnableHTTPConnection" value="true"/ -->
+ <!-- URL Liste der vertrauenwürdigen Bürgekartenumgebungen -->
+ <TrustedBKUs>
+ <BKUURL>https://www.handy-signatur.at/mobile/https-security-layer-request/default.aspx</BKUURL>
+ <BKUURL>https://www.a-trust.at/mobile/https-security-layer-request/default.aspx</BKUURL>
+ </TrustedBKUs>
+</MOA-IDConfiguration>
diff --git a/id/server/data/deploy/conf/moa-id/SampleMOAIDConfigurationProxy.xml b/id/server/data/deploy/conf/moa-id/SampleMOAIDConfigurationProxy.xml
new file mode 100644
index 000000000..b2a1a3453
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-id/SampleMOAIDConfigurationProxy.xml
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Beispielkonfiguration fuer MOA-ID mit Unterstuetzung fuer A-Trust und Handy-Signatur -->
+<MOA-IDConfiguration xmlns="http://www.buergerkarte.at/namespaces/moaconfig#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:sl10="http://www.buergerkarte.at/namespaces/securitylayer/20020225#" xmlns:sl11="http://www.buergerkarte.at/namespaces/securitylayer/20020831#">
+ <!-- Konfiguration fuer MOA-ID-AUTH -->
+ <AuthComponent>
+ <!-- URL und akzeptierte TLS-Server-Zertifikate des verwendeten BKU-Auswahl Service -->
+ <BKUSelection BKUSelectionAlternative="HTMLSelect">
+ <ConnectionParameter URL="http://auswahl.buergerkarte.at/htmlcode">
+ <!-- <AcceptedServerCertificates>certs/server-certs</AcceptedServerCertificates> -->
+ </ConnectionParameter>
+ </BKUSelection>
+ <!-->Globale Templates zum Anpassen der Seiten &quot;Auswahl der B&uuml;rgerkartenumgebung&quot; und
+ &quot;Anmeldung mit B&uuml;rgerkarte&quot; sowie des Signaturformulars nach der Abarbeitung der Infobox-Validatoren <-->
+ <Templates>
+ <!--BKUSelectionTemplate URL="sampleTemplates/SampleBKUSelectionTemplate.html"/-->
+ <!--Template URL="sampleTemplates/SampleTemplate.html"/-->
+ <!--InputProcessorSignTemplate URL="sampleTemplates/SampleInputProcessorSignTemplate.html"/-->
+ </Templates>
+ <!-- Transformationen fuer die Anzeige des AUTH-Block im Secure Viewer -->
+ <SecurityLayer>
+ <!-- Wählen Sie hier den deutschen oder englischen Auswahltext -->
+ <TransformsInfo filename="transforms/TransformsInfoAuthBlockTable_DE.xml"/>
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlockTable_EN.xml"/>-->
+ </SecurityLayer>
+ <MOA-SP>
+ <!-- URL und akzeptierte TLS-Server-Zertifikate des MOA-SP Web Service, falls MOA-SP ueber Web Service angesprochen wird.
+ Wenn MOA-SP direkt ueber API aufgerufen werden soll, so wird das Element auskommentiert -->
+ <!-- ConnectionParameter URL="http://moa.gv.at/moa-spss-test/services/SignatureVerification"/ -->
+ <!-- ConnectionParameter URL="http://localhost:8080/moa-spss/services/SignatureVerification"/ -->
+ <!-- <AcceptedServerCertificates>certs/server-certs</AcceptedServerCertificates> -->
+ <!-- <ClientKeyStore password="Keystore Pass">file_to_clientkeystore</ClientKeyStore> -->
+ <!-- </ConnectionParameter> -->
+ <!-- TrustProfile fuer den IdentityLink der Buergerkarte (muss in MOA-SP konfiguriert sein) -->
+ <VerifyIdentityLink>
+ <TrustProfileID>MOAIDBuergerkartePersonenbindung</TrustProfileID>
+ </VerifyIdentityLink>
+ <!-- TrustProfile fuer die Signatur des Benutzers mit der Buergerkarte (muss in MOA-SP konfiguriert sein) -->
+ <VerifyAuthBlock>
+ <TrustProfileID>MOAIDBuergerkarteAuthentisierungsDaten</TrustProfileID>
+ <!-- VerifyTransformsInfoProfile mit den Transformationen fuer die Anzeige der Anmeldedaten im Secure Viewer (muss in MOA-SP konfiguriert sein) -->
+ <!-- Wählen Sie hier entsprechende der Sprachauswahl im Element <SecurityLayer><TransformsInfo> das deutsche oder englische Profil -->
+ <VerifyTransformsInfoProfileID>MOAIDTransformAuthBlockTable_DE</VerifyTransformsInfoProfileID>
+ <!-- <VerifyTransformsInfoProfileID>MOAIDTransformAuthBlockTable_EN</VerifyTransformsInfoProfileID>-->
+ </VerifyAuthBlock>
+ </MOA-SP>
+
+<!-- Einstellungen für den Zugriff auf das Stammzahlenregister-Gateway - für ausländische Personen -->
+ <ForeignIdentities>
+ <!-- Echtsystem (Eintragung ins ERnP nur mit Echtkarten gemäß E-Government Gleichwertigkeits Verordnung) -->
+ <ConnectionParameter URL="https://gateway.stammzahlenregister.gv.at/services/IdentityLinkCreation">
+ <!-- Testsystem (Eintragung ins ERnP - auch für Testkarten) -->
+ <!--<ConnectionParameter URL="https://gateway.stammzahlenregister.gv.at:8443/services/IdentityLinkCreation">-->
+
+ <!-- Geben Sie hier ihren Client Keystore für den Zugriff auf das Stammzahlenregister-Gateway an -->
+ <!-- Voraussetzung: A-Trust oder A-CERT Zertifikat mit Verwaltungseigenschaft oder Dienstleistereigenschaft. -->
+ <!-- Wenn ihr MOA-ID Zertifikat diese Voraussetzung erfüllt, können Sie dieses hier angeben. -->
+ <ClientKeyStore password="password">cert/clientcert.p12</ClientKeyStore>
+ </ConnectionParameter>
+ </ForeignIdentities>
+
+ <!-- Einstellungen für den Zugriff auf das Online-Vollmachten Service -->
+ <!-- <OnlineMandates> -->
+ <!-- Echtsystem -->
+ <!-- <ConnectionParameter URL="https://vollmachten.stammzahlenregister.gv.at/mis/MandateIssueRequest">-->
+ <!-- Testsystem -->
+ <!-- <ConnectionParameter URL="https://vollmachten.stammzahlenregister.gv.at/mis-test/MandateIssueRequest">-->
+ <!-- Geben Sie hier ihren Client Keystore für den Zugriff auf das Online-Vollmachten System an -->
+ <!-- Voraussetzung: A-Trust oder A-CERT Zertifikat mit Verwaltungseigenschaft oder Dienstleistereigenschaft. -->
+ <!-- Wenn ihr MOA-ID Zertifikat diese Voraussetzung erfüllt, können Sie dieses hier angeben. -->
+ <!-- <ClientKeyStore password="password">certs/clientcert.p12</ClientKeyStore> -->
+ <!-- </ConnectionParameter> -->
+ <!-- Hinweis: Um den Online-Vollmachten Modus für eine Online Applikation zu aktivieren, müssen Sie das Vollmachten Profil angeben -->
+ <!-- (siehe Element OnlineMandates unter MOA-IDConfiguration/AuthComponent/OnlineMandates)-->
+ <!-- </OnlineMandates> -->
+
+ </AuthComponent>
+ <!-- Konfiguration fuer MOA-ID-PROXY -->
+ <ProxyComponent>
+ <!-- URL und akzeptierte TLS-Server-Zertifikate des MOA-ID-AUTH Web Service -->
+ <AuthComponent>
+ <ConnectionParameter URL="http://localhost:8080/moa-id-auth/services/GetAuthenticationData">
+ <!-- <AcceptedServerCertificates>certs/server-certs</AcceptedServerCertificates> -->
+ <!-- <ClientKeyStore password="Keystore Pass">file_to_clientkeystore</ClientKeyStore> -->
+ </ConnectionParameter>
+ </AuthComponent>
+ </ProxyComponent>
+ <!-- Eintragung fuer jede Online-Applikation -->
+ <!-- Demo Online-Applikation: Zugriff auf www.digitales.oesterreich.gv.at ueber MOA-ID-PROXY -->
+ <OnlineApplication publicURLPrefix="https://localhost:8443/" friendlyName="Online Applikation 1">
+ <!-- fuer MOA-ID-AUTH -->
+ <AuthComponent slVersion="1.2">
+ <!-->Lokale Templates zum Anpassen der Seiten &quot;Auswahl der B&uuml;rgerkartenumgebung&quot; und
+ &quot;Anmeldung mit B&uuml;rgerkarte&quot; sowie des Signaturformulars nach der Abarbeitung der Infobox-Validatoren
+ nur f&uuml;r diese Online Applikation<-->
+ <Templates>
+ <!--BKUSelectionTemplate URL="sampleTemplates/SampleBKUSelectionTemplate.html"/-->
+ <!--Template URL="sampleTemplates/SampleTemplate.html"/-->
+ <!--InputProcessorSignTemplate URL="sampleTemplates/SampleInputProcessorSignTemplate.html"/-->
+ </Templates>
+ <!-- Falls aktiviert, werden diese Transformationen anstatt der Default-Transformationen verwendet -->
+ <!-- TransformInfo in Textform, bevorzugte Variante im xhtml-Format -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlockText.xml"/> -->
+ <!-- TransformInfo in Textform, alternative Variante fuer aeltere BKU -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlockText_deprecated.xml"/> -->
+ <!-- TransformInfo in Tabellenform, bevorzugte Variante im xhtml-Format -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlock.xml"/> -->
+ <!-- TransformInfo in Tabellenform, alternative Variante fuer aeltere BKU -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlock_deprecated.xml"/> -->
+ <!-- Aktivieren von Vollmachten fuer diese Online-Applikation-->
+ <!-- Hinweis: Hierzu muss auch die Verbindung zum Online-Vollmachten Service konfigurieren -->
+ <!-- (siehe OnlineApplication/AuthComponent/Mandates)-->
+ <!--<Mandates>-->
+ <!-- Liste der Vollmachten-Identifikatoren, die festlegen mit welchen Vollmachtstypen man sich bei der Online-Applikation anmelden kann-->
+<!-- <Profiles>Zustellung,Prokura,PostvollmachtAufBasisProkura,WKOVollmachtAufBasisProkura,ZVR,ZVRMitPostvollmacht,ERsB,ErsBMitPostvollmacht,PostvollmachtBilateral,GeneralvollmachtBilateral,WKOVollmachtBilateral</Profiles>-->
+<!-- </Mandates>-->
+ </AuthComponent>
+ <!-- fuer MOA-ID-PROXY -->
+ <ProxyComponent configFileURL="oa/SampleOAConfiguration.xml" sessionTimeOut="600">
+ <!-- <ProxyComponent configFileURL="oa/SampleOAConfiguration.xml" sessionTimeOut="600" loginParameterResolverImpl="at.gv.egovernment.moa.id.proxy.DefaultLoginParameterResolver" loginParameterResolverConfiguration="" connectionBuilderImpl="at.gv.egovernment.moa.id.proxy.DefaultConnectionBuilder"> -->
+ <!-- URL und akzeptierte TLS-Server-Zertifikate der Online-Applikation -->
+ <ConnectionParameter URL="http://www.digitales.oesterreich.gv.at/">
+ <!-- <AcceptedServerCertificates>certs/server-certs</AcceptedServerCertificates> -->
+ <!-- <ClientKeyStore password="Keystore Pass">file_to_clientkeystore</ClientKeyStore> -->
+ </ConnectionParameter>
+ </ProxyComponent>
+ </OnlineApplication>
+ <!-- ChainingModes fuer die Zertifikatspfadueberpruefung der TLS-Zertifikate -->
+ <ChainingModes systemDefaultMode="pkix">
+ </ChainingModes>
+ <!-- fuer MOA-ID-AUTH: CA-Zertifikat des Servers MOA-SP, falls dieses Service ueber HTTPS angesprochen wird
+ fuer MOA-ID-PROXY: CA-Zertifikat des Servers MOA-ID-AUTH, falls dieses Service ueber HTTPS angesprochen wird
+ zusaeztlich: CA-Zertifikat aller Online-Applikationen, die ueber HTTPS angesprochen werden -->
+ <TrustedCACertificates>certs/ca-certs</TrustedCACertificates>
+ <!-- Cache-Verzeichnis fuer-Zertifikate -->
+ <!-- Hinweis: wenn TC in linux oder unix betrieben wird vollstaendigen pfad fuer DirectoryCertStoreParameters.RootDir verwenden -->
+ <GenericConfiguration name="DirectoryCertStoreParameters.RootDir" value="certs/certstore"/>
+ <!-- Time-Out fuer die Anmeldung von Beginn bis zum Anlegen der Anmeldedaten, in Sekunden -->
+ <GenericConfiguration name="AuthenticationSession.TimeOut" value="600"/>
+ <!-- Time-Out fuer die Anmeldung vom Anlegen bis zum Abholen der Anmeldedaten, in Sekunden -->
+ <GenericConfiguration name="AuthenticationData.TimeOut" value="120"/>
+ <!-- Alternatives Data URL prefix (falls Webserver vorgeschaltet wird) -->
+ <!--GenericConfiguration name="FrontendServlets.DataURLPrefix" value="https://<your_webserver>/moa-id-auth/"/ -->
+ <!-- HTTP Verbindung auf Frontend Servlets zulassen / verbieten (falls Webserver vorgeschaltet wird) -->
+ <!-- GenericConfiguration name="FrontendServlets.EnableHTTPConnection" value="true"/ -->
+ <!-- URL Liste der vertrauenwürdigen Bürgekartenumgebungen -->
+ <TrustedBKUs>
+ <BKUURL>https://www.handy-signatur.at/mobile/https-security-layer-request/default.aspx</BKUURL>
+ <BKUURL>https://www.a-trust.at/mobile/https-security-layer-request/default.aspx</BKUURL>
+ </TrustedBKUs>
+
+</MOA-IDConfiguration>
diff --git a/id/server/data/deploy/conf/moa-id/SampleMOAIDConfiguration_withTestBKs.xml b/id/server/data/deploy/conf/moa-id/SampleMOAIDConfiguration_withTestBKs.xml
new file mode 100644
index 000000000..35b8e19d1
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-id/SampleMOAIDConfiguration_withTestBKs.xml
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Beispielkonfiguration fuer MOA-ID ohne Proxy mit Unterstuetzung fuer A-Trust und Handy-Signatur, sowie die Testbuergerkarten a.sign test government und SeLaNext -->
+<MOA-IDConfiguration xmlns="http://www.buergerkarte.at/namespaces/moaconfig#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:sl10="http://www.buergerkarte.at/namespaces/securitylayer/20020225#" xmlns:sl11="http://www.buergerkarte.at/namespaces/securitylayer/20020831#">
+ <!-- Konfiguration fuer MOA-ID-AUTH -->
+ <AuthComponent>
+ <!-- URL und akzeptierte TLS-Server-Zertifikate des verwendeten BKU-Auswahl Service -->
+ <BKUSelection BKUSelectionAlternative="HTMLSelect">
+ <ConnectionParameter URL="http://auswahl.buergerkarte.at/htmlcode">
+ <!-- <AcceptedServerCertificates>certs/server-certs</AcceptedServerCertificates> -->
+ </ConnectionParameter>
+ </BKUSelection>
+ <!-->Globale Templates zum Anpassen der Seiten &quot;Auswahl der B&uuml;rgerkartenumgebung&quot; und
+ &quot;Anmeldung mit B&uuml;rgerkarte&quot; sowie des Signaturformulars nach der Abarbeitung der Infobox-Validatoren <-->
+ <Templates>
+ <!--BKUSelectionTemplate URL="sampleTemplates/SampleBKUSelectionTemplate.html"/-->
+ <!--Template URL="sampleTemplates/SampleTemplate.html"/-->
+ <!--InputProcessorSignTemplate URL="sampleTemplates/SampleInputProcessorSignTemplate.html"/-->
+ </Templates>
+ <!-- Transformationen fuer die Anzeige des AUTH-Block im Secure Viewer -->
+ <SecurityLayer>
+ <!-- Wählen Sie hier den deutschen oder englischen Auswahltext -->
+ <TransformsInfo filename="transforms/TransformsInfoAuthBlockTable_DE.xml"/>
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlockTable_EN.xml"/>-->
+ </SecurityLayer>
+ <MOA-SP>
+ <!-- URL und akzeptierte TLS-Server-Zertifikate des MOA-SP Web Service, falls MOA-SP ueber Web Service angesprochen wird.
+ Wenn MOA-SP direkt ueber API aufgerufen werden soll, so wird das Element auskommentiert -->
+ <!-- <ConnectionParameter URL="http://localhost:8080/moa-spss/services/SignatureVerification"> -->
+ <!-- <AcceptedServerCertificates>certs/server-certs</AcceptedServerCertificates> -->
+ <!-- <ClientKeyStore password="Keystore Pass">file_to_clientkeystore</ClientKeyStore> -->
+ <!-- </ConnectionParameter> -->
+ <!-- TrustProfile fuer den IdentityLink der Buergerkarte (muss in MOA-SP konfiguriert sein) -->
+ <VerifyIdentityLink>
+ <!-- Testkarten (a.sign test government sowie Security Kapsel Neu/SeLaNext ab Version 1.0.3 wird unterstuezt) -->
+ <TrustProfileID>MOAIDBuergerkartePersonenbindungMitTestkarten</TrustProfileID>
+ </VerifyIdentityLink>
+ <!-- TrustProfile fuer die Signatur des Benutzers mit der Buergerkarte (muss in MOA-SP konfiguriert sein) -->
+ <VerifyAuthBlock>
+ <!-- Testkarten (a.sign test government sowie Security Kapsel Neu/SeLaNext ab Version 1.0.3 wird unterstuetzt) -->
+ <TrustProfileID>MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten</TrustProfileID>
+ <!-- VerifyTransformsInfoProfile mit den Transformationen fuer die Anzeige der Anmeldedaten im Secure Viewer (muss in MOA-SP konfiguriert sein) -->
+ <!-- Wählen Sie hier entsprechende der Sprachauswahl im Element <SecurityLayer><TransformsInfo> das deutsche oder englische Profil -->
+ <VerifyTransformsInfoProfileID>MOAIDTransformAuthBlockTable_DE</VerifyTransformsInfoProfileID>
+ <!-- <VerifyTransformsInfoProfileID>MOAIDTransformAuthBlockTable_EN</VerifyTransformsInfoProfileID>-->
+ </VerifyAuthBlock>
+ </MOA-SP>
+ <!-- Einstellungen für den Zugriff auf das Stammzahlenregister-Gateway - für ausländische Personen -->
+ <ForeignIdentities>
+ <!-- Echtsystem (Eintragung ins ERnP nur mit Echtkarten gemäß E-Government Gleichwertigkeits Verordnung) -->
+ <ConnectionParameter URL="https://gateway.stammzahlenregister.gv.at/services/IdentityLinkCreation">
+ <!-- Testsystem (Eintragung ins ERnP - auch für Testkarten) -->
+ <!--<ConnectionParameter URL="https://gateway.stammzahlenregister.gv.at:8443/services/IdentityLinkCreation">-->
+
+ <!-- Geben Sie hier ihren Client Keystore für den Zugriff auf das Stammzahlenregister-Gateway an -->
+ <!-- Voraussetzung: A-Trust bzw. A-CERT Zertifikat mit Verwaltungseigenschaft. Wenn ihr MOA-ID Zertifikat -->
+ <!-- diese Voraussetzung erfüllt, können Sie dieses hier angeben. -->
+ <ClientKeyStore password="password">cert/clientcert.p12</ClientKeyStore>
+ </ConnectionParameter>
+ </ForeignIdentities>
+
+ <!-- Einstellungen für den Zugriff auf das Online-Vollmachten Service -->
+ <!-- <OnlineMandates> -->
+ <!-- Echtsystem -->
+ <!-- <ConnectionParameter URL="https://vollmachten.stammzahlenregister.gv.at/mis/MandateIssueRequest">-->
+ <!-- Testsystem -->
+ <!-- <ConnectionParameter URL="https://vollmachten.stammzahlenregister.gv.at/mis-test/MandateIssueRequest">-->
+ <!-- Geben Sie hier ihren Client Keystore für den Zugriff auf das Online-Vollmachten System an -->
+ <!-- Voraussetzung: A-Trust oder A-CERT Zertifikat mit Verwaltungseigenschaft oder Dienstleistereigenschaft. -->
+ <!-- Wenn ihr MOA-ID Zertifikat diese Voraussetzung erfüllt, können Sie dieses hier angeben. -->
+ <!-- <ClientKeyStore password="password">certs/clientcert.p12</ClientKeyStore> -->
+ <!-- </ConnectionParameter> -->
+ <!-- Hinweis: Um den Online-Vollmachten Modus für eine Online Applikation zu aktivieren, müssen Sie das Vollmachten Profil angeben -->
+ <!-- (siehe Element OnlineMandates unter MOA-IDConfiguration/AuthComponent/OnlineMandates)-->
+ <!-- </OnlineMandates> -->
+
+ </AuthComponent>
+ <!-- Eintragung fuer jede Online-Applikation -->
+ <!-- publicURLPrefix referenziert hier keine richtige Online Applikation; muss angepasst werden -->
+ <OnlineApplication publicURLPrefix="https://localhost:8443/" friendlyName="Online Applikation 1">
+ <!-- fuer MOA-ID-AUTH -->
+ <AuthComponent slVersion="1.2">
+ <!-->Lokale Templates zum Anpassen der Seiten &quot;Auswahl der B&uuml;rgerkartenumgebung&quot; und
+ &quot;Anmeldung mit B&uuml;rgerkarte&quot; sowie des Signaturformulars nach der Abarbeitung der Infobox-Validatoren
+ nur f&uuml;r diese Online Applikation<-->
+ <Templates>
+ <!--BKUSelectionTemplate URL="sampleTemplates/SampleBKUSelectionTemplate.html"/-->
+ <!--Template URL="sampleTemplates/SampleTemplate.html"/-->
+ <!--InputProcessorSignTemplate URL="sampleTemplates/SampleInputProcessorSignTemplate.html"/-->
+ </Templates>
+ <!-- Falls aktiviert, werden diese Transformationen anstatt der Default-Transformationen verwendet -->
+ <!-- TransformInfo in Textform, bevorzugte Variante im xhtml-Format -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlockText.xml"/> -->
+ <!-- TransformInfo in Textform, alternative Variante fuer aeltere BKU -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlockText_deprecated.xml"/> -->
+ <!-- TransformInfo in Tabellenform, bevorzugte Variante im xhtml-Format -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlock.xml"/> -->
+ <!-- TransformInfo in Tabellenform, alternative Variante fuer aeltere BKU -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlock_deprecated.xml"/> -->
+ <!-- Aktivieren von Vollmachten fuer diese Online-Applikation-->
+ <!-- Hinweis: Hierzu muss auch die Verbindung zum Online-Vollmachten Service konfigurieren -->
+ <!-- (siehe OnlineApplication/AuthComponent/Mandates)-->
+ <!-- <Mandates> -->
+ <!-- Liste der Vollmachten-Identifikatoren, die festlegt mit welchen Vollmachtstyp man sich bei der Online-Applikation anmelden kann-->
+ <!--<Profiles>Zustellung,Prokura,PostvollmachtAufBasisProkura,WKOVollmachtAufBasisProkura,ZVR,ZVRMitPostvollmacht,ERsB,ErsBMitPostvollmacht,PostvollmachtBilateral,GeneralvollmachtBilateral,WKOVollmachtBilateral</Profiles>-->
+ <!--</Mandates> -->
+ </AuthComponent>
+ </OnlineApplication>
+ <!-- ChainingModes fuer die Zertifikatspfadueberpruefung der TLS-Zertifikate -->
+ <ChainingModes systemDefaultMode="pkix">
+ </ChainingModes>
+ <!-- fuer MOA-ID-AUTH: CA-Zertifikat des Servers MOA-SP, falls dieses Service ueber HTTPS angesprochen wird
+ zusaeztlich: CA-Zertifikat aller Online-Applikationen, die ueber HTTPS angesprochen werden -->
+ <TrustedCACertificates>certs/ca-certs</TrustedCACertificates>
+ <!-- Cache-Verzeichnis fuer-Zertifikate -->
+ <!-- Hinweis: wenn TC in linux oder unix betrieben wird vollstaendigen pfad fuer DirectoryCertStoreParameters.RootDir verwenden -->
+ <GenericConfiguration name="DirectoryCertStoreParameters.RootDir" value="certs/certstore"/>
+ <!-- Time-Out fuer die Anmeldung von Beginn bis zum Anlegen der Anmeldedaten, in Sekunden -->
+ <GenericConfiguration name="AuthenticationSession.TimeOut" value="600"/>
+ <!-- Time-Out fuer die Anmeldung vom Anlegen bis zum Abholen der Anmeldedaten, in Sekunden -->
+ <GenericConfiguration name="AuthenticationData.TimeOut" value="120"/>
+ <!-- Alternatives Data URL prefix (falls Webserver vorgeschaltet wird) -->
+ <!--GenericConfiguration name="FrontendServlets.DataURLPrefix" value="https://<your_webserver>/moa-id-auth/"/ -->
+ <!-- HTTP Verbindung auf Frontend Servlets zulassen / verbieten (falls Webserver vorgeschaltet wird) -->
+ <!-- GenericConfiguration name="FrontendServlets.EnableHTTPConnection" value="true"/ -->
+ <!-- Vertrauenswürdige Bürgerkartenumgebungen -->
+ <TrustedBKUs>
+ <BKUURL>https://www.handy-signatur.at/mobile/https-security-layer-request/default.aspx</BKUURL>
+ <BKUURL>https://www.a-trust.at/mobile/https-security-layer-request/default.aspx</BKUURL>
+ </TrustedBKUs>
+</MOA-IDConfiguration>
diff --git a/id/server/data/deploy/conf/moa-id/SampleMOAIDConfiguration_withTestBKsProxy.xml b/id/server/data/deploy/conf/moa-id/SampleMOAIDConfiguration_withTestBKsProxy.xml
new file mode 100644
index 000000000..4aa6d773b
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-id/SampleMOAIDConfiguration_withTestBKsProxy.xml
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Beispielkonfiguration fuer MOA-ID mit Unterstuetzung fuer A-Trust und Handy-Signatur, sowie die Testbuergerkarten a.sign test government und SeLaNext -->
+<MOA-IDConfiguration xmlns="http://www.buergerkarte.at/namespaces/moaconfig#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:sl10="http://www.buergerkarte.at/namespaces/securitylayer/20020225#" xmlns:sl11="http://www.buergerkarte.at/namespaces/securitylayer/20020831#">
+ <!-- Konfiguration fuer MOA-ID-AUTH -->
+ <AuthComponent>
+ <!-- URL und akzeptierte TLS-Server-Zertifikate des verwendeten BKU-Auswahl Service -->
+ <BKUSelection BKUSelectionAlternative="HTMLSelect">
+ <ConnectionParameter URL="http://auswahl.buergerkarte.at/htmlcode">
+ <!-- <AcceptedServerCertificates>certs/server-certs</AcceptedServerCertificates> -->
+ </ConnectionParameter>
+ </BKUSelection>
+ <!-->Globale Templates zum Anpassen der Seiten &quot;Auswahl der B&uuml;rgerkartenumgebung&quot; und
+ &quot;Anmeldung mit B&uuml;rgerkarte&quot; sowie des Signaturformulars nach der Abarbeitung der Infobox-Validatoren <-->
+ <Templates>
+ <!--BKUSelectionTemplate URL="sampleTemplates/SampleBKUSelectionTemplate.html"/-->
+ <!--Template URL="sampleTemplates/SampleTemplate.html"/-->
+ <!--InputProcessorSignTemplate URL="sampleTemplates/SampleInputProcessorSignTemplate.html"/-->
+ </Templates>
+ <!-- Transformationen fuer die Anzeige des AUTH-Block im Secure Viewer -->
+ <SecurityLayer>
+ <!-- Wählen Sie hier den deutschen oder englischen Auswahltext -->
+ <TransformsInfo filename="transforms/TransformsInfoAuthBlockTable_DE.xml"/>
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlockTable_EN.xml"/>-->
+ </SecurityLayer>
+ <MOA-SP>
+ <!-- URL und akzeptierte TLS-Server-Zertifikate des MOA-SP Web Service, falls MOA-SP ueber Web Service angesprochen wird.
+ Wenn MOA-SP direkt ueber API aufgerufen werden soll, so wird das Element auskommentiert -->
+ <!-- <ConnectionParameter URL="http://localhost:8080/moa-spss/services/SignatureVerification"> -->
+ <!-- <AcceptedServerCertificates>certs/server-certs</AcceptedServerCertificates> -->
+ <!-- <ClientKeyStore password="Keystore Pass">file_to_clientkeystore</ClientKeyStore> -->
+ <!-- </ConnectionParameter> -->
+ <!-- TrustProfile fuer den IdentityLink der Buergerkarte (muss in MOA-SP konfiguriert sein) -->
+ <VerifyIdentityLink>
+ <!-- Testkarten (a.sign test government sowie Security Kapsel Neu/SeLaNext ab Version 1.0.3 wird unterstuezt) -->
+ <TrustProfileID>MOAIDBuergerkartePersonenbindungMitTestkarten</TrustProfileID>
+ </VerifyIdentityLink>
+ <!-- TrustProfile fuer die Signatur des Benutzers mit der Buergerkarte (muss in MOA-SP konfiguriert sein) -->
+ <VerifyAuthBlock>
+ <!-- Testkarten (a.sign test government sowie Security Kapsel Neu/SeLaNext ab Version 1.0.3 wird unterstuetzt) -->
+ <TrustProfileID>MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten</TrustProfileID>
+ <!-- VerifyTransformsInfoProfile mit den Transformationen fuer die Anzeige der Anmeldedaten im Secure Viewer (muss in MOA-SP konfiguriert sein) -->
+ <!-- Wählen Sie hier entsprechende der Sprachauswahl im Element <SecurityLayer><TransformsInfo> das deutsche oder englische Profil -->
+ <VerifyTransformsInfoProfileID>MOAIDTransformAuthBlockTable_DE</VerifyTransformsInfoProfileID>
+ <!-- <VerifyTransformsInfoProfileID>MOAIDTransformAuthBlockTable_EN</VerifyTransformsInfoProfileID>-->
+ </VerifyAuthBlock>
+ </MOA-SP>
+ <!-- Einstellungen für den Zugriff auf das Stammzahlenregister-Gateway - für ausländische Personen -->
+ <ForeignIdentities>
+ <!-- Echtsystem (Eintragung ins ERnP nur mit Echtkarten gemäß E-Government Gleichwertigkeits Verordnung) -->
+ <ConnectionParameter URL="https://gateway.stammzahlenregister.gv.at/services/IdentityLinkCreation">
+ <!-- Testsystem (Eintragung ins ERnP - auch für Testkarten) -->
+ <!--<ConnectionParameter URL="https://gateway.stammzahlenregister.gv.at:8443/services/IdentityLinkCreation">-->
+
+ <!-- Geben Sie hier ihren Client Keystore für den Zugriff auf das Stammzahlenregister-Gateway an -->
+ <!-- Voraussetzung: A-Trust oder A-CERT Zertifikat mit Verwaltungseigenschaft oder Dienstleistereigenschaft. -->
+ <!-- Wenn ihr MOA-ID Zertifikat diese Voraussetzung erfüllt, können Sie dieses hier angeben. -->
+ <ClientKeyStore password="password">cert/clientcert.p12</ClientKeyStore>
+ </ConnectionParameter>
+ </ForeignIdentities>
+
+ <!-- Einstellungen für den Zugriff auf das Online-Vollmachten Service -->
+ <!-- <OnlineMandates> -->
+ <!-- Echtsystem -->
+ <!-- <ConnectionParameter URL="https://vollmachten.stammzahlenregister.gv.at/mis/MandateIssueRequest">-->
+ <!-- Testsystem -->
+ <!-- <ConnectionParameter URL="https://vollmachten.stammzahlenregister.gv.at/mis-test/MandateIssueRequest">-->
+ <!-- Geben Sie hier ihren Client Keystore für den Zugriff auf das Online-Vollmachten System an -->
+ <!-- Voraussetzung: A-Trust oder A-CERT Zertifikat mit Verwaltungseigenschaft oder Dienstleistereigenschaft. -->
+ <!-- Wenn ihr MOA-ID Zertifikat diese Voraussetzung erfüllt, können Sie dieses hier angeben. -->
+ <!-- <ClientKeyStore password="password">certs/clientcert.p12</ClientKeyStore> -->
+ <!-- </ConnectionParameter> -->
+ <!-- Hinweis: Um den Online-Vollmachten Modus für eine Online Applikation zu aktivieren, müssen Sie das Vollmachten Profil angeben -->
+ <!-- (siehe Element OnlineMandates unter MOA-IDConfiguration/AuthComponent/OnlineMandates)-->
+ <!-- </OnlineMandates> -->
+
+
+ </AuthComponent>
+ <!-- Konfiguration fuer MOA-ID-PROXY -->
+ <ProxyComponent>
+ <!-- URL und akzeptierte TLS-Server-Zertifikate des MOA-ID-AUTH Web Service -->
+ <AuthComponent>
+ <ConnectionParameter URL="http://localhost:8080/moa-id-auth/services/GetAuthenticationData">
+ <!-- <AcceptedServerCertificates>certs/server-certs</AcceptedServerCertificates> -->
+ <!-- <ClientKeyStore password="Keystore Pass">file_to_clientkeystore</ClientKeyStore> -->
+ </ConnectionParameter>
+ </AuthComponent>
+ </ProxyComponent>
+ <!-- Eintragung fuer jede Online-Applikation -->
+ <!-- Demo Online-Applikation: Zugriff auf www.digitales.oesterreich.gv.at ueber MOA-ID-PROXY -->
+ <OnlineApplication publicURLPrefix="https://localhost:8443/" friendlyName="Online Applikation 1">
+ <!-- fuer MOA-ID-AUTH -->
+ <AuthComponent slVersion="1.2">
+ <!-->Lokale Templates zum Anpassen der Seiten &quot;Auswahl der B&uuml;rgerkartenumgebung&quot; und
+ &quot;Anmeldung mit B&uuml;rgerkarte&quot; sowie des Signaturformulars nach der Abarbeitung der Infobox-Validatoren
+ nur f&uuml;r diese Online Applikation<-->
+ <Templates>
+ <!--BKUSelectionTemplate URL="sampleTemplates/SampleBKUSelectionTemplate.html"/-->
+ <!--Template URL="sampleTemplates/SampleTemplate.html"/-->
+ <!--InputProcessorSignTemplate URL="sampleTemplates/SampleInputProcessorSignTemplate.html"/-->
+ </Templates>
+ <!-- Falls aktiviert, werden diese Transformationen anstatt der Default-Transformationen verwendet -->
+ <!-- TransformInfo in Textform, bevorzugte Variante im xhtml-Format -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlockText.xml"/> -->
+ <!-- TransformInfo in Textform, alternative Variante fuer aeltere BKU -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlockText_deprecated.xml"/> -->
+ <!-- TransformInfo in Tabellenform, bevorzugte Variante im xhtml-Format -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlock.xml"/> -->
+ <!-- TransformInfo in Tabellenform, alternative Variante fuer aeltere BKU -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlock_deprecated.xml"/> -->
+ <!-- Aktivieren von Vollmachten fuer diese Online-Applikation-->
+ <!-- Hinweis: Hierzu muss auch die Verbindung zum Online-Vollmachten Service konfigurieren -->
+ <!-- (siehe OnlineApplication/AuthComponent/Mandates)-->
+ <!--<Mandates>-->
+ <!-- Liste der Vollmachten-Identifikatoren, die festlegen mit welchen Vollmachtstypen man sich bei der Online-Applikation anmelden kann-->
+<!-- <Profiles>Zustellung,Prokura,PostvollmachtAufBasisProkura,WKOVollmachtAufBasisProkura,ZVR,ZVRMitPostvollmacht,ERsB,ErsBMitPostvollmacht,PostvollmachtBilateral,GeneralvollmachtBilateral,WKOVollmachtBilateral</Profiles>-->
+<!-- </Mandates>-->
+ </AuthComponent>
+ <!-- fuer MOA-ID-PROXY -->
+ <ProxyComponent configFileURL="oa/SampleOAConfiguration.xml" sessionTimeOut="600">
+ <!-- <ProxyComponent configFileURL="oa/SampleOAConfiguration.xml" sessionTimeOut="600" loginParameterResolverImpl="at.gv.egovernment.moa.id.proxy.DefaultLoginParameterResolver" loginParameterResolverConfiguration="" connectionBuilderImpl="at.gv.egovernment.moa.id.proxy.DefaultConnectionBuilder"> -->
+ <!-- URL und akzeptierte TLS-Server-Zertifikate der Online-Applikation -->
+ <ConnectionParameter URL="http://www.digitales.oesterreich.gv.at/">
+ <!-- <AcceptedServerCertificates>certs/server-certs</AcceptedServerCertificates> -->
+ <!-- <ClientKeyStore password="Keystore Pass">file_to_clientkeystore</ClientKeyStore> -->
+ </ConnectionParameter>
+ </ProxyComponent>
+ </OnlineApplication>
+ <!-- ChainingModes fuer die Zertifikatspfadueberpruefung der TLS-Zertifikate -->
+ <ChainingModes systemDefaultMode="pkix">
+ </ChainingModes>
+ <!-- fuer MOA-ID-AUTH: CA-Zertifikat des Servers MOA-SP, falls dieses Service ueber HTTPS angesprochen wird
+ fuer MOA-ID-PROXY: CA-Zertifikat des Servers MOA-ID-AUTH, falls dieses Service ueber HTTPS angesprochen wird
+ zusaeztlich: CA-Zertifikat aller Online-Applikationen, die ueber HTTPS angesprochen werden -->
+ <TrustedCACertificates>certs/ca-certs</TrustedCACertificates>
+ <!-- Cache-Verzeichnis fuer-Zertifikate -->
+ <!-- Hinweis: wenn TC in linux oder unix betrieben wird vollstaendigen pfad fuer DirectoryCertStoreParameters.RootDir verwenden -->
+ <GenericConfiguration name="DirectoryCertStoreParameters.RootDir" value="certs/certstore"/>
+ <!-- Time-Out fuer die Anmeldung von Beginn bis zum Anlegen der Anmeldedaten, in Sekunden -->
+ <GenericConfiguration name="AuthenticationSession.TimeOut" value="600"/>
+ <!-- Time-Out fuer die Anmeldung vom Anlegen bis zum Abholen der Anmeldedaten, in Sekunden -->
+ <GenericConfiguration name="AuthenticationData.TimeOut" value="120"/>
+ <!-- Alternatives Data URL prefix (falls Webserver vorgeschaltet wird) -->
+ <!--GenericConfiguration name="FrontendServlets.DataURLPrefix" value="https://<your_webserver>/moa-id-auth/"/ -->
+ <!-- HTTP Verbindung auf Frontend Servlets zulassen / verbieten (falls Webserver vorgeschaltet wird) -->
+ <!-- GenericConfiguration name="FrontendServlets.EnableHTTPConnection" value="true"/ -->
+ <!-- URL Liste der vertrauenwürdigen Bürgekartenumgebungen -->
+ <TrustedBKUs>
+ <BKUURL>https://www.handy-signatur.at/mobile/https-security-layer-request/default.aspx</BKUURL>
+ <BKUURL>https://www.a-trust.at/mobile/https-security-layer-request/default.aspx</BKUURL>
+ </TrustedBKUs>
+</MOA-IDConfiguration>
diff --git a/id/server/data/deploy/conf/moa-id/SampleMOAWIDConfiguration.xml b/id/server/data/deploy/conf/moa-id/SampleMOAWIDConfiguration.xml
new file mode 100644
index 000000000..3d062900d
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-id/SampleMOAWIDConfiguration.xml
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Beispielkonfiguration fuer MOA-WID ohne Proxy mit Unterstuetzung fuer A-Trust und Handy-Signatur -->
+<MOA-IDConfiguration xmlns="http://www.buergerkarte.at/namespaces/moaconfig#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
+ <!-- Konfiguration fuer MOA-ID-AUTH -->
+ <AuthComponent>
+ <!-- URL und akzeptierte TLS-Server-Zertifikate des verwendeten BKU-Auswahl Service -->
+ <BKUSelection BKUSelectionAlternative="HTMLSelect">
+ <ConnectionParameter URL="http://auswahl.buergerkarte.at/htmlcode">
+ <!-- <AcceptedServerCertificates>certs/server-certs</AcceptedServerCertificates> -->
+ </ConnectionParameter>
+ </BKUSelection>
+ <!-->Globale Templates zum Anpassen der Seiten &quot;Auswahl der B&uuml;rgerkartenumgebung&quot; und
+ &quot;Anmeldung mit B&uuml;rgerkarte&quot; sowie des Signaturformulars nach der Abarbeitung der Infobox-Validatoren <-->
+ <Templates>
+ <!--BKUSelectionTemplate URL="sampleTemplates/SampleBKUSelectionTemplate.html"/-->
+ <!--Template URL="sampleTemplates/SampleTemplate.html"/-->
+ <!--InputProcessorSignTemplate URL="sampleTemplates/SampleInputProcessorSignTemplate.html"/-->
+ </Templates>
+ <!-- Transformationen fuer die Anzeige des AUTH-Block im Secure Viewer -->
+ <SecurityLayer>
+ <!-- Wählen Sie hier den deutschen oder englischen Auswahltext -->
+ <TransformsInfo filename="transforms/TransformsInfoAuthBlockTable_DE.xml"/>
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlockTable_EN.xml"/>-->
+ </SecurityLayer>
+ <MOA-SP>
+ <!-- URL und akzeptierte TLS-Server-Zertifikate des MOA-SP Web Service, falls MOA-SP ueber Web Service angesprochen wird.
+ Wenn MOA-SP direkt ueber API aufgerufen werden soll, so wird das Element auskommentiert -->
+ <!-- ConnectionParameter URL="http://moa.gv.at/moa-spss-test/services/SignatureVerification"/ -->
+ <!-- ConnectionParameter URL="http://localhost:8080/moa-spss/services/SignatureVerification"/ -->
+ <!-- <AcceptedServerCertificates>certs/server-certs</AcceptedServerCertificates> -->
+ <!-- <ClientKeyStore password="Keystore Pass">file_to_clientkeystore</ClientKeyStore> -->
+ <!-- </ConnectionParameter> -->
+ <!-- TrustProfile fuer den IdentityLink der Buergerkarte (muss in MOA-SP konfiguriert sein) -->
+ <VerifyIdentityLink>
+ <TrustProfileID>MOAIDBuergerkartePersonenbindung</TrustProfileID>
+ </VerifyIdentityLink>
+ <!-- TrustProfile fuer die Signatur des Benutzers mit der Buergerkarte (muss in MOA-SP konfiguriert sein) -->
+ <VerifyAuthBlock>
+ <TrustProfileID>MOAIDBuergerkarteAuthentisierungsDaten</TrustProfileID>
+ <!-- VerifyTransformsInfoProfile mit den Transformationen fuer die Anzeige der Anmeldedaten im Secure Viewer (muss in MOA-SP konfiguriert sein) -->
+ <!-- Wählen Sie hier entsprechende der Sprachauswahl im Element <SecurityLayer><TransformsInfo> das deutsche oder englische Profil -->
+ <VerifyTransformsInfoProfileID>MOAIDTransformAuthBlockTable_DE</VerifyTransformsInfoProfileID>
+ <!-- <VerifyTransformsInfoProfileID>MOAIDTransformAuthBlockTable_EN</VerifyTransformsInfoProfileID>-->
+ </VerifyAuthBlock>
+ </MOA-SP>
+<!-- Einstellungen für den Zugriff auf das Stammzahlenregister-Gateway - für ausländische Personen -->
+ <ForeignIdentities>
+ <!-- Echtsystem (Eintragung ins ERnP nur mit Echtkarten gemäß E-Government Gleichwertigkeits Verordnung) -->
+ <ConnectionParameter URL="https://gateway.stammzahlenregister.gv.at/services/IdentityLinkCreation">
+ <!-- Testsystem (Eintragung ins ERnP - auch für Testkarten) -->
+ <!--<ConnectionParameter URL="https://gateway.stammzahlenregister.gv.at:8443/services/IdentityLinkCreation">-->
+
+ <!-- Geben Sie hier ihren Client Keystore für den Zugriff auf das Stammzahlenregister-Gateway an -->
+ <!-- Voraussetzung: A-Trust oder A-CERT Zertifikat mit Verwaltungseigenschaft oder Dienstleistereigenschaft. -->
+ <!-- Wenn ihr MOA-ID Zertifikat diese Voraussetzung erfüllt, können Sie dieses hier angeben. -->
+ <ClientKeyStore password="password">cert/clientcert.p12</ClientKeyStore>
+ </ConnectionParameter>
+ </ForeignIdentities>
+
+ </AuthComponent>
+ <!-- Eintragung fuer jede Online-Applikation -->
+ <!-- publicURLPrefix referenziert hier keine richtige Online Applikation; muss angepasst werden -->
+ <OnlineApplication type="businessService" publicURLPrefix="https://localhost:8443/" friendlyName="Online Applikation 1">
+ <!-- fuer MOA-ID-AUTH WID Modus -->
+ <AuthComponent slVersion="1.2" provideStammzahl="true" provideAUTHBlock="true" provideIdentityLink="false" provideCertificate="true">
+ <!-- Spezifikation der Stammzahl des Wirtschaftsunternehmens -->
+ <IdentificationNumber>
+ <!-- Beispiel Firmenbuchnummer -->
+ <pr:Firmenbuchnummer xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#">468924i</pr:Firmenbuchnummer>
+ </IdentificationNumber>
+ <!-->Lokale Templates zum Anpassen der Seiten &quot;Auswahl der B&uuml;rgerkartenumgebung&quot; und
+ &quot;Anmeldung mit B&uuml;rgerkarte&quot; sowie des Signaturformulars nach der Abarbeitung der Infobox-Validatoren
+ nur f&uuml;r diese Online Applikation<-->
+ <Templates>
+ <!--BKUSelectionTemplate URL="sampleTemplates/SampleBKUSelectionTemplate.html"/-->
+ <!--Template URL="sampleTemplates/SampleTemplate.html"/-->
+ <!--InputProcessorSignTemplate URL="sampleTemplates/SampleInputProcessorSignTemplate.html"/-->
+ </Templates>
+ <!-- Falls aktiviert, werden diese Transformationen anstatt der Default-Transformationen verwendet -->
+ <!-- TransformInfo in Textform, bevorzugte Variante im xhtml-Format -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlockText.xml"/> -->
+ <!-- TransformInfo in Textform, alternative Variante fuer aeltere BKU -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlockText_deprecated.xml"/> -->
+ <!-- TransformInfo in Tabellenform, bevorzugte Variante im xhtml-Format -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlock.xml"/> -->
+ <!-- TransformInfo in Tabellenform, alternative Variante fuer aeltere BKU -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlock_deprecated.xml"/> -->
+ </AuthComponent>
+ </OnlineApplication>
+ <!-- ChainingModes fuer die Zertifikatspfadueberpruefung der TLS-Zertifikate -->
+ <ChainingModes systemDefaultMode="pkix">
+ </ChainingModes>
+ <!-- fuer MOA-ID-AUTH: CA-Zertifikat des Servers MOA-SP, falls dieses Service ueber HTTPS angesprochen wird
+ zusaeztlich: CA-Zertifikat aller Online-Applikationen, die ueber HTTPS angesprochen werden -->
+ <TrustedCACertificates>certs/ca-certs</TrustedCACertificates>
+ <!-- Cache-Verzeichnis fuer-Zertifikate -->
+ <!-- Hinweis: wenn TC in linux oder unix betrieben wird vollstaendigen pfad fuer DirectoryCertStoreParameters.RootDir verwenden -->
+ <GenericConfiguration name="DirectoryCertStoreParameters.RootDir" value="certs/certstore"/>
+ <!-- Time-Out fuer die Anmeldung von Beginn bis zum Anlegen der Anmeldedaten, in Sekunden -->
+ <GenericConfiguration name="AuthenticationSession.TimeOut" value="600"/>
+ <!-- Time-Out fuer die Anmeldung vom Anlegen bis zum Abholen der Anmeldedaten, in Sekunden -->
+ <GenericConfiguration name="AuthenticationData.TimeOut" value="120"/>
+ <!-- Alternatives Data URL prefix (falls Webserver vorgeschaltet wird) -->
+ <!--GenericConfiguration name="FrontendServlets.DataURLPrefix" value="https://<your_webserver>/moa-id-auth/"/ -->
+ <!-- HTTP Verbindung auf Frontend Servlets zulassen / verbieten (falls Webserver vorgeschaltet wird) -->
+ <!-- GenericConfiguration name="FrontendServlets.EnableHTTPConnection" value="true"/ -->
+ <!-- URL Liste der vertrauenwürdigen Bürgekartenumgebungen -->
+ <TrustedBKUs>
+ <BKUURL>https://www.handy-signatur.at/mobile/https-security-layer-request/default.aspx</BKUURL>
+ <BKUURL>https://www.a-trust.at/mobile/https-security-layer-request/default.aspx</BKUURL>
+ </TrustedBKUs>
+
+</MOA-IDConfiguration>
diff --git a/id/server/data/deploy/conf/moa-id/SampleMOAWIDConfigurationProxy.xml b/id/server/data/deploy/conf/moa-id/SampleMOAWIDConfigurationProxy.xml
new file mode 100644
index 000000000..c8c88c22d
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-id/SampleMOAWIDConfigurationProxy.xml
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Beispielkonfiguration fuer MOA-WID mit Unterstuetzung fuer A-Trust und Handy-Signatur -->
+<MOA-IDConfiguration xmlns="http://www.buergerkarte.at/namespaces/moaconfig#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
+ <!-- Konfiguration fuer MOA-ID-AUTH -->
+ <AuthComponent>
+ <!-- URL und akzeptierte TLS-Server-Zertifikate des verwendeten BKU-Auswahl Service -->
+ <BKUSelection BKUSelectionAlternative="HTMLSelect">
+ <ConnectionParameter URL="http://auswahl.buergerkarte.at/htmlcode">
+ <!-- <AcceptedServerCertificates>certs/server-certs</AcceptedServerCertificates> -->
+ </ConnectionParameter>
+ </BKUSelection>
+ <!-->Globale Templates zum Anpassen der Seiten &quot;Auswahl der B&uuml;rgerkartenumgebung&quot; und
+ &quot;Anmeldung mit B&uuml;rgerkarte&quot; sowie des Signaturformulars nach der Abarbeitung der Infobox-Validatoren <-->
+ <Templates>
+ <!--BKUSelectionTemplate URL="sampleTemplates/SampleBKUSelectionTemplate.html"/-->
+ <!--Template URL="sampleTemplates/SampleTemplate.html"/-->
+ <!--InputProcessorSignTemplate URL="sampleTemplates/SampleInputProcessorSignTemplate.html"/-->
+ </Templates>
+ <!-- Transformationen fuer die Anzeige des AUTH-Block im Secure Viewer -->
+ <SecurityLayer>
+ <!-- Wählen Sie hier den deutschen oder englischen Auswahltext -->
+ <TransformsInfo filename="transforms/TransformsInfoAuthBlockTable_DE.xml"/>
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlockTable_EN.xml"/>-->
+ </SecurityLayer>
+ <MOA-SP>
+ <!-- URL und akzeptierte TLS-Server-Zertifikate des MOA-SP Web Service, falls MOA-SP ueber Web Service angesprochen wird.
+ Wenn MOA-SP direkt ueber API aufgerufen werden soll, so wird das Element auskommentiert -->
+ <!-- ConnectionParameter URL="http://moa.gv.at/moa-spss-test/services/SignatureVerification"/ -->
+ <!-- ConnectionParameter URL="http://localhost:8080/moa-spss/services/SignatureVerification"/ -->
+ <!-- <AcceptedServerCertificates>certs/server-certs</AcceptedServerCertificates> -->
+ <!-- <ClientKeyStore password="Keystore Pass">file_to_clientkeystore</ClientKeyStore> -->
+ <!-- </ConnectionParameter> -->
+ <!-- TrustProfile fuer den IdentityLink der Buergerkarte (muss in MOA-SP konfiguriert sein) -->
+ <VerifyIdentityLink>
+ <TrustProfileID>MOAIDBuergerkartePersonenbindung</TrustProfileID>
+ </VerifyIdentityLink>
+ <!-- TrustProfile fuer die Signatur des Benutzers mit der Buergerkarte (muss in MOA-SP konfiguriert sein) -->
+ <VerifyAuthBlock>
+ <TrustProfileID>MOAIDBuergerkarteAuthentisierungsDaten</TrustProfileID>
+ <!-- VerifyTransformsInfoProfile mit den Transformationen fuer die Anzeige der Anmeldedaten im Secure Viewer (muss in MOA-SP konfiguriert sein) -->
+ <!-- Wählen Sie hier entsprechende der Sprachauswahl im Element <SecurityLayer><TransformsInfo> das deutsche oder englische Profil -->
+ <VerifyTransformsInfoProfileID>MOAIDTransformAuthBlockTable_DE</VerifyTransformsInfoProfileID>
+ <!-- <VerifyTransformsInfoProfileID>MOAIDTransformAuthBlockTable_EN</VerifyTransformsInfoProfileID>-->
+ </VerifyAuthBlock>
+ </MOA-SP>
+ <!-- Einstellungen für den Zugriff auf das Stammzahlenregister-Gateway - für ausländische Personen -->
+ <ForeignIdentities>
+ <!-- Echtsystem (Eintragung ins ERnP nur mit Echtkarten gemäß E-Government Gleichwertigkeits Verordnung) -->
+ <ConnectionParameter URL="https://gateway.stammzahlenregister.gv.at/services/IdentityLinkCreation">
+ <!-- Testsystem (Eintragung ins ERnP - auch für Testkarten) -->
+ <!--<ConnectionParameter URL="https://gateway.stammzahlenregister.gv.at:8443/services/IdentityLinkCreation">-->
+
+ <!-- Geben Sie hier ihren Client Keystore für den Zugriff auf das Stammzahlenregister-Gateway an -->
+ <!-- Voraussetzung: A-Trust Zertifikat mit Verwaltungseigenschaft. Wenn ihr MOA-ID Zertifikat -->
+ <!-- diese Voraussetzung erfüllt, können Sie dieses hier angeben. -->
+ <ClientKeyStore password="password">cert/clientcert.p12</ClientKeyStore>
+ </ConnectionParameter>
+ </ForeignIdentities>
+ </AuthComponent>
+ <!-- Konfiguration fuer MOA-ID-PROXY -->
+ <ProxyComponent>
+ <!-- URL und akzeptierte TLS-Server-Zertifikate des MOA-ID-AUTH Web Service -->
+ <AuthComponent>
+ <ConnectionParameter URL="http://localhost:8080/moa-id-auth/services/GetAuthenticationData">
+ <!-- <AcceptedServerCertificates>certs/server-certs</AcceptedServerCertificates> -->
+ <!-- <ClientKeyStore password="Keystore Pass">file_to_clientkeystore</ClientKeyStore> -->
+ </ConnectionParameter>
+ </AuthComponent>
+ </ProxyComponent>
+ <!-- Eintragung fuer jede Online-Applikation -->
+ <!-- Demo Online-Applikation fuer MOA-WID: Zugriff auf www.digitales.oesterreich.gv.at ueber MOA-ID-PROXY -->
+ <OnlineApplication type="businessService" publicURLPrefix="https://localhost:8443/" friendlyName="Online Applikation 1">
+ <!-- fuer MOA-ID-AUTH WID Modus -->
+ <AuthComponent slVersion="1.2" provideStammzahl="true" provideAUTHBlock="true" provideIdentityLink="false" provideCertificate="true">
+ <!-- Spezifikation der Stammzahl des Wirtschaftsunternehmens -->
+ <IdentificationNumber>
+ <!-- Beispiel Firmenbuchnummer -->
+ <pr:Firmenbuchnummer xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#">468924i</pr:Firmenbuchnummer>
+ </IdentificationNumber>
+ <!-->Lokale Templates zum Anpassen der Seiten &quot;Auswahl der B&uuml;rgerkartenumgebung&quot; und
+ &quot;Anmeldung mit B&uuml;rgerkarte&quot; sowie des Signaturformulars nach der Abarbeitung der Infobox-Validatoren
+ nur f&uuml;r diese Online Applikation<-->
+ <Templates>
+ <!--BKUSelectionTemplate URL="sampleTemplates/SampleBKUSelectionTemplate.html"/-->
+ <!--Template URL="sampleTemplates/SampleTemplate.html"/-->
+ <!--InputProcessorSignTemplate URL="sampleTemplates/SampleInputProcessorSignTemplate.html"/-->
+ </Templates>
+ <!-- Falls aktiviert, werden diese Transformationen anstatt der Default-Transformationen verwendet -->
+ <!-- TransformInfo in Textform, bevorzugte Variante im xhtml-Format -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlockText.xml"/> -->
+ <!-- TransformInfo in Textform, alternative Variante fuer aeltere BKU -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlockText_deprecated.xml"/> -->
+ <!-- TransformInfo in Tabellenform, bevorzugte Variante im xhtml-Format -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlock.xml"/> -->
+ <!-- TransformInfo in Tabellenform, alternative Variante fuer aeltere BKU -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlock_deprecated.xml"/> -->
+ </AuthComponent>
+ <!-- fuer MOA-ID-PROXY -->
+ <ProxyComponent configFileURL="oa/SampleOAConfiguration.xml" sessionTimeOut="600">
+ <!-- <ProxyComponent configFileURL="oa/SampleOAConfiguration.xml" sessionTimeOut="600" loginParameterResolverImpl="at.gv.egovernment.moa.id.proxy.DefaultLoginParameterResolver" loginParameterResolverConfiguration="" connectionBuilderImpl="at.gv.egovernment.moa.id.proxy.DefaultConnectionBuilder"> -->
+ <!-- URL und akzeptierte TLS-Server-Zertifikate der Online-Applikation -->
+ <ConnectionParameter URL="http://www.digitales.oesterreich.gv.at/">
+ <!-- <AcceptedServerCertificates>certs/server-certs</AcceptedServerCertificates> -->
+ <!-- <ClientKeyStore password="Keystore Pass">file_to_clientkeystore</ClientKeyStore> -->
+ </ConnectionParameter>
+ </ProxyComponent>
+ </OnlineApplication>
+ <!-- ChainingModes fuer die Zertifikatspfadueberpruefung der TLS-Zertifikate -->
+ <ChainingModes systemDefaultMode="pkix">
+ </ChainingModes>
+ <!-- fuer MOA-ID-AUTH: CA-Zertifikat des Servers MOA-SP, falls dieses Service ueber HTTPS angesprochen wird
+ fuer MOA-ID-PROXY: CA-Zertifikat des Servers MOA-ID-AUTH, falls dieses Service ueber HTTPS angesprochen wird
+ zusaeztlich: CA-Zertifikat aller Online-Applikationen, die ueber HTTPS angesprochen werden -->
+ <TrustedCACertificates>certs/ca-certs</TrustedCACertificates>
+ <!-- Cache-Verzeichnis fuer-Zertifikate -->
+ <!-- Hinweis: wenn TC in linux oder unix betrieben wird vollstaendigen pfad fuer DirectoryCertStoreParameters.RootDir verwenden -->
+ <GenericConfiguration name="DirectoryCertStoreParameters.RootDir" value="certs/certstore"/>
+ <!-- Time-Out fuer die Anmeldung von Beginn bis zum Anlegen der Anmeldedaten, in Sekunden -->
+ <GenericConfiguration name="AuthenticationSession.TimeOut" value="600"/>
+ <!-- Time-Out fuer die Anmeldung vom Anlegen bis zum Abholen der Anmeldedaten, in Sekunden -->
+ <GenericConfiguration name="AuthenticationData.TimeOut" value="120"/>
+ <!-- Alternatives Data URL prefix (falls Webserver vorgeschaltet wird) -->
+ <!--GenericConfiguration name="FrontendServlets.DataURLPrefix" value="https://<your_webserver>/moa-id-auth/"/ -->
+ <!-- HTTP Verbindung auf Frontend Servlets zulassen / verbieten (falls Webserver vorgeschaltet wird) -->
+ <!-- GenericConfiguration name="FrontendServlets.EnableHTTPConnection" value="true"/ -->
+ <!-- URL Liste der vertrauenwürdigen Bürgekartenumgebungen -->
+ <TrustedBKUs>
+ <BKUURL>https://www.handy-signatur.at/mobile/https-security-layer-request/default.aspx</BKUURL>
+ <BKUURL>https://www.a-trust.at/mobile/https-security-layer-request/default.aspx</BKUURL>
+ </TrustedBKUs>
+</MOA-IDConfiguration>
diff --git a/id/server/data/deploy/conf/moa-id/SampleMOAWIDConfiguration_withTestBKs.xml b/id/server/data/deploy/conf/moa-id/SampleMOAWIDConfiguration_withTestBKs.xml
new file mode 100644
index 000000000..225270f5b
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-id/SampleMOAWIDConfiguration_withTestBKs.xml
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Beispielkonfiguration fuer MOA-WID ohne Proxy mit Unterstuetzung fuer A-Trust und Handy-Signatur, sowie die Testbuergerkarten a.sign test government und SeLaNext -->
+<MOA-IDConfiguration xmlns="http://www.buergerkarte.at/namespaces/moaconfig#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:sl10="http://www.buergerkarte.at/namespaces/securitylayer/20020225#" xmlns:sl11="http://www.buergerkarte.at/namespaces/securitylayer/20020831#">
+ <!-- Konfiguration fuer MOA-ID-AUTH -->
+ <AuthComponent>
+ <!-- URL und akzeptierte TLS-Server-Zertifikate des verwendeten BKU-Auswahl Service -->
+ <BKUSelection BKUSelectionAlternative="HTMLSelect">
+ <ConnectionParameter URL="http://auswahl.buergerkarte.at/htmlcode">
+ <!-- <AcceptedServerCertificates>certs/server-certs</AcceptedServerCertificates> -->
+ </ConnectionParameter>
+ </BKUSelection>
+ <!-->Globale Templates zum Anpassen der Seiten &quot;Auswahl der B&uuml;rgerkartenumgebung&quot; und
+ &quot;Anmeldung mit B&uuml;rgerkarte&quot; sowie des Signaturformulars nach der Abarbeitung der Infobox-Validatoren <-->
+ <Templates>
+ <!--BKUSelectionTemplate URL="sampleTemplates/SampleBKUSelectionTemplate.html"/-->
+ <!--Template URL="sampleTemplates/SampleTemplate.html"/-->
+ <!--InputProcessorSignTemplate URL="sampleTemplates/SampleInputProcessorSignTemplate.html"/-->
+ </Templates>
+ <!-- Transformationen fuer die Anzeige des AUTH-Block im Secure Viewer -->
+ <SecurityLayer>
+ <!-- Wählen Sie hier den deutschen oder englischen Auswahltext -->
+ <TransformsInfo filename="transforms/TransformsInfoAuthBlockTable_DE.xml"/>
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlockTable_EN.xml"/>-->
+ </SecurityLayer>
+ <MOA-SP>
+ <!-- URL und akzeptierte TLS-Server-Zertifikate des MOA-SP Web Service, falls MOA-SP ueber Web Service angesprochen wird.
+ Wenn MOA-SP direkt ueber API aufgerufen werden soll, so wird das Element auskommentiert -->
+ <!-- <ConnectionParameter URL="http://localhost:8080/moa-spss/services/SignatureVerification"> -->
+ <!-- <AcceptedServerCertificates>certs/server-certs</AcceptedServerCertificates> -->
+ <!-- <ClientKeyStore password="Keystore Pass">file_to_clientkeystore</ClientKeyStore> -->
+ <!-- </ConnectionParameter> -->
+ <!-- TrustProfile fuer den IdentityLink der Buergerkarte (muss in MOA-SP konfiguriert sein) -->
+ <VerifyIdentityLink>
+ <!-- Testkarten (a.sign test government sowie Security Kapsel Neu/SeLaNext ab Version 1.0.3 wird unterstuezt) -->
+ <TrustProfileID>MOAIDBuergerkartePersonenbindungMitTestkarten</TrustProfileID>
+ </VerifyIdentityLink>
+ <!-- TrustProfile fuer die Signatur des Benutzers mit der Buergerkarte (muss in MOA-SP konfiguriert sein) -->
+ <VerifyAuthBlock>
+ <!-- Testkarten (a.sign test government sowie Security Kapsel Neu/SeLaNext ab Version 1.0.3 wird unterstuetzt) -->
+ <TrustProfileID>MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten</TrustProfileID>
+ <!-- VerifyTransformsInfoProfile mit den Transformationen fuer die Anzeige der Anmeldedaten im Secure Viewer (muss in MOA-SP konfiguriert sein) -->
+ <!-- Wählen Sie hier entsprechende der Sprachauswahl im Element <SecurityLayer><TransformsInfo> das deutsche oder englische Profil -->
+ <VerifyTransformsInfoProfileID>MOAIDTransformAuthBlockTable_DE</VerifyTransformsInfoProfileID>
+ <!-- <VerifyTransformsInfoProfileID>MOAIDTransformAuthBlockTable_EN</VerifyTransformsInfoProfileID>-->
+ </VerifyAuthBlock>
+ </MOA-SP>
+ <!-- Gueltige Signatoren des IdentityLinks, der von der Buergerkarte gelesen wird -->
+ <!-- IdentityLinkSigners-->
+ <!-- Testkarten (a.sign test government sowie Security Kapsel Neu/SeLaNext ab Version 1.0.3 wird unterstuetzt) -->
+ <!--X509SubjectName>CN=Test Signaturdienst Personenbindung,OU=IKT-Stabsstelle des Bundes,O=Bundeskanzleramt,C=AT</X509SubjectName-->
+ <!--/IdentityLinkSigners-->
+ <!-- Einstellungen für den Zugriff auf das Stammzahlenregister-Gateway - für ausländische Personen -->
+ <ForeignIdentities>
+ <!-- Echtsystem (Eintragung ins ERnP nur mit Echtkarten gemäß E-Government Gleichwertigkeits Verordnung) -->
+ <ConnectionParameter URL="https://gateway.stammzahlenregister.gv.at/services/IdentityLinkCreation">
+ <!-- Testsystem (Eintragung ins ERnP - auch für Testkarten) -->
+ <!--<ConnectionParameter URL="https://gateway.stammzahlenregister.gv.at:8443/services/IdentityLinkCreation">-->
+
+ <!-- Geben Sie hier ihren Client Keystore für den Zugriff auf das Stammzahlenregister-Gateway an -->
+ <!-- Voraussetzung: A-Trust Zertifikat mit Verwaltungseigenschaft. Wenn ihr MOA-ID Zertifikat -->
+ <!-- diese Voraussetzung erfüllt, können Sie dieses hier angeben. -->
+ <ClientKeyStore password="password">cert/clientcert.p12</ClientKeyStore>
+ </ConnectionParameter>
+ </ForeignIdentities>
+ </AuthComponent>
+ <!-- Eintragung fuer jede Online-Applikation -->
+ <!-- publicURLPrefix referenziert hier keine richtige Online Applikation; muss angepasst werden -->
+ <OnlineApplication type="businessService" publicURLPrefix="https://localhost:8443/" friendlyName="Online Applikation 1">
+ <!-- fuer MOA-ID-AUTH WID Modus -->
+ <AuthComponent slVersion="1.2" provideStammzahl="true" provideAUTHBlock="true" provideIdentityLink="false" provideCertificate="true">
+ <!-- Spezifikation der Stammzahl des Wirtschaftsunternehmens -->
+ <IdentificationNumber>
+ <!-- Beispiel Firmenbuchnummer -->
+ <pr:Firmenbuchnummer xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#">468924i</pr:Firmenbuchnummer>
+ </IdentificationNumber>
+ <!-->Lokale Templates zum Anpassen der Seiten &quot;Auswahl der B&uuml;rgerkartenumgebung&quot; und
+ &quot;Anmeldung mit B&uuml;rgerkarte&quot; sowie des Signaturformulars nach der Abarbeitung der Infobox-Validatoren
+ nur f&uuml;r diese Online Applikation<-->
+ <Templates>
+ <!--BKUSelectionTemplate URL="sampleTemplates/SampleBKUSelectionTemplate.html"/-->
+ <!--Template URL="sampleTemplates/SampleTemplate.html"/-->
+ <!--InputProcessorSignTemplate URL="sampleTemplates/SampleInputProcessorSignTemplate.html"/-->
+ </Templates>
+ <!-- Falls aktiviert, werden diese Transformationen anstatt der Default-Transformationen verwendet -->
+ <!-- TransformInfo in Textform, bevorzugte Variante im xhtml-Format -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlockText.xml"/> -->
+ <!-- TransformInfo in Textform, alternative Variante fuer aeltere BKU -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlockText_deprecated.xml"/> -->
+ <!-- TransformInfo in Tabellenform, bevorzugte Variante im xhtml-Format -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlock.xml"/> -->
+ <!-- TransformInfo in Tabellenform, alternative Variante fuer aeltere BKU -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlock_deprecated.xml"/> -->
+ </AuthComponent>
+ </OnlineApplication>
+ <!-- ChainingModes fuer die Zertifikatspfadueberpruefung der TLS-Zertifikate -->
+ <ChainingModes systemDefaultMode="pkix">
+ </ChainingModes>
+ <!-- fuer MOA-ID-AUTH: CA-Zertifikat des Servers MOA-SP, falls dieses Service ueber HTTPS angesprochen wird
+ zusaeztlich: CA-Zertifikat aller Online-Applikationen, die ueber HTTPS angesprochen werden -->
+ <TrustedCACertificates>certs/ca-certs</TrustedCACertificates>
+ <!-- Cache-Verzeichnis fuer-Zertifikate -->
+ <!-- Hinweis: wenn TC in linux oder unix betrieben wird vollstaendigen pfad fuer DirectoryCertStoreParameters.RootDir verwenden -->
+ <GenericConfiguration name="DirectoryCertStoreParameters.RootDir" value="certs/certstore"/>
+ <!-- Time-Out fuer die Anmeldung von Beginn bis zum Anlegen der Anmeldedaten, in Sekunden -->
+ <GenericConfiguration name="AuthenticationSession.TimeOut" value="600"/>
+ <!-- Time-Out fuer die Anmeldung vom Anlegen bis zum Abholen der Anmeldedaten, in Sekunden -->
+ <GenericConfiguration name="AuthenticationData.TimeOut" value="120"/>
+ <!-- Alternatives Data URL prefix (falls Webserver vorgeschaltet wird) -->
+ <!--GenericConfiguration name="FrontendServlets.DataURLPrefix" value="https://<your_webserver>/moa-id-auth/"/ -->
+ <!-- HTTP Verbindung auf Frontend Servlets zulassen / verbieten (falls Webserver vorgeschaltet wird) -->
+ <!-- GenericConfiguration name="FrontendServlets.EnableHTTPConnection" value="true"/ -->
+ <!-- URL Liste der vertrauenwürdigen Bürgekartenumgebungen -->
+ <TrustedBKUs>
+ <BKUURL>https://www.handy-signatur.at/mobile/https-security-layer-request/default.aspx</BKUURL>
+ <BKUURL>https://www.a-trust.at/mobile/https-security-layer-request/default.aspx</BKUURL>
+ </TrustedBKUs>
+</MOA-IDConfiguration>
diff --git a/id/server/data/deploy/conf/moa-id/SampleMOAWIDConfiguration_withTestBKsProxy.xml b/id/server/data/deploy/conf/moa-id/SampleMOAWIDConfiguration_withTestBKsProxy.xml
new file mode 100644
index 000000000..4f2a5977c
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-id/SampleMOAWIDConfiguration_withTestBKsProxy.xml
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Beispielkonfiguration fuer MOA-WID mit Unterstuetzung fuer A-Trust und Handy-Signatur, sowie die Testbuergerkarten a.sign test government und SeLaNext -->
+<MOA-IDConfiguration xmlns="http://www.buergerkarte.at/namespaces/moaconfig#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:sl10="http://www.buergerkarte.at/namespaces/securitylayer/20020225#" xmlns:sl11="http://www.buergerkarte.at/namespaces/securitylayer/20020831#">
+ <!-- Konfiguration fuer MOA-ID-AUTH -->
+ <AuthComponent>
+ <!-- URL und akzeptierte TLS-Server-Zertifikate des verwendeten BKU-Auswahl Service -->
+ <BKUSelection BKUSelectionAlternative="HTMLSelect">
+ <ConnectionParameter URL="http://auswahl.buergerkarte.at/htmlcode">
+ <!-- <AcceptedServerCertificates>certs/server-certs</AcceptedServerCertificates> -->
+ </ConnectionParameter>
+ </BKUSelection>
+ <!-->Globale Templates zum Anpassen der Seiten &quot;Auswahl der B&uuml;rgerkartenumgebung&quot; und
+ &quot;Anmeldung mit B&uuml;rgerkarte&quot; sowie des Signaturformulars nach der Abarbeitung der Infobox-Validatoren <-->
+ <Templates>
+ <!--BKUSelectionTemplate URL="sampleTemplates/SampleBKUSelectionTemplate.html"/-->
+ <!--Template URL="sampleTemplates/SampleTemplate.html"/-->
+ <!--InputProcessorSignTemplate URL="sampleTemplates/SampleInputProcessorSignTemplate.html"/-->
+ </Templates>
+ <!-- Transformationen fuer die Anzeige des AUTH-Block im Secure Viewer -->
+ <SecurityLayer>
+ <!-- Wählen Sie hier den deutschen oder englischen Auswahltext -->
+ <TransformsInfo filename="transforms/TransformsInfoAuthBlockTable_DE.xml"/>
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlockTable_EN.xml"/>-->
+ </SecurityLayer>
+ <MOA-SP>
+ <!-- URL und akzeptierte TLS-Server-Zertifikate des MOA-SP Web Service, falls MOA-SP ueber Web Service angesprochen wird.
+ Wenn MOA-SP direkt ueber API aufgerufen werden soll, so wird das Element auskommentiert -->
+ <!-- <ConnectionParameter URL="http://localhost:8080/moa-spss/services/SignatureVerification"> -->
+ <!-- <AcceptedServerCertificates>certs/server-certs</AcceptedServerCertificates> -->
+ <!-- <ClientKeyStore password="Keystore Pass">file_to_clientkeystore</ClientKeyStore> -->
+ <!-- </ConnectionParameter> -->
+ <!-- TrustProfile fuer den IdentityLink der Buergerkarte (muss in MOA-SP konfiguriert sein) -->
+ <VerifyIdentityLink>
+ <!-- Testkarten (a.sign test government sowie Security Kapsel Neu/SeLaNext ab Version 1.0.3 wird unterstuezt) -->
+ <TrustProfileID>MOAIDBuergerkartePersonenbindungMitTestkarten</TrustProfileID>
+ </VerifyIdentityLink>
+ <!-- TrustProfile fuer die Signatur des Benutzers mit der Buergerkarte (muss in MOA-SP konfiguriert sein) -->
+ <VerifyAuthBlock>
+ <!-- Testkarten (a.sign test government sowie Security Kapsel Neu/SeLaNext ab Version 1.0.3 wird unterstuetzt) -->
+ <TrustProfileID>MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten</TrustProfileID>
+ <!-- VerifyTransformsInfoProfile mit den Transformationen fuer die Anzeige der Anmeldedaten im Secure Viewer (muss in MOA-SP konfiguriert sein) -->
+ <!-- Wählen Sie hier entsprechende der Sprachauswahl im Element <SecurityLayer><TransformsInfo> das deutsche oder englische Profil -->
+ <VerifyTransformsInfoProfileID>MOAIDTransformAuthBlockTable_DE</VerifyTransformsInfoProfileID>
+ <!-- <VerifyTransformsInfoProfileID>MOAIDTransformAuthBlockTable_EN</VerifyTransformsInfoProfileID>-->
+ </VerifyAuthBlock>
+ </MOA-SP>
+ <!-- Einstellungen für den Zugriff auf das Stammzahlenregister-Gateway - für ausländische Personen -->
+ <ForeignIdentities>
+ <!-- Echtsystem (Eintragung ins ERnP nur mit Echtkarten gemäß E-Government Gleichwertigkeits Verordnung) -->
+ <ConnectionParameter URL="https://gateway.stammzahlenregister.gv.at/services/IdentityLinkCreation">
+ <!-- Testsystem (Eintragung ins ERnP - auch für Testkarten) -->
+ <!--<ConnectionParameter URL="https://gateway.stammzahlenregister.gv.at:8443/services/IdentityLinkCreation">-->
+
+ <!-- Geben Sie hier ihren Client Keystore für den Zugriff auf das Stammzahlenregister-Gateway an -->
+ <!-- Voraussetzung: A-Trust Zertifikat mit Verwaltungseigenschaft. Wenn ihr MOA-ID Zertifikat -->
+ <!-- diese Voraussetzung erfüllt, können Sie dieses hier angeben. -->
+ <ClientKeyStore password="password">cert/clientcert.p12</ClientKeyStore>
+ </ConnectionParameter>
+ </ForeignIdentities>
+ </AuthComponent>
+ <!-- Konfiguration fuer MOA-ID-PROXY -->
+ <ProxyComponent>
+ <!-- URL und akzeptierte TLS-Server-Zertifikate des MOA-ID-AUTH Web Service -->
+ <AuthComponent>
+ <ConnectionParameter URL="http://localhost:8080/moa-id-auth/services/GetAuthenticationData">
+ <!-- <AcceptedServerCertificates>certs/server-certs</AcceptedServerCertificates> -->
+ <!-- <ClientKeyStore password="Keystore Pass">file_to_clientkeystore</ClientKeyStore> -->
+ </ConnectionParameter>
+ </AuthComponent>
+ </ProxyComponent>
+ <!-- Eintragung fuer jede Online-Applikation -->
+ <!-- Demo Online-Applikation fuer MOA-WID: Zugriff auf www.digitales.oesterreich.gv.at ueber MOA-ID-PROXY -->
+ <OnlineApplication type="businessService" publicURLPrefix="https://localhost:8443/" friendlyName="Online Applikation 1">
+ <!-- fuer MOA-ID-AUTH WID Modus -->
+ <AuthComponent slVersion="1.2" provideStammzahl="true" provideAUTHBlock="true" provideIdentityLink="false" provideCertificate="true">
+ <!-- Spezifikation der Stammzahl des Wirtschaftsunternehmens -->
+ <IdentificationNumber>
+ <!-- Beispiel Firmenbuchnummer -->
+ <pr:Firmenbuchnummer xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#">468924i</pr:Firmenbuchnummer>
+ </IdentificationNumber>
+ <!-->Lokale Templates zum Anpassen der Seiten &quot;Auswahl der B&uuml;rgerkartenumgebung&quot; und
+ &quot;Anmeldung mit B&uuml;rgerkarte&quot; sowie des Signaturformulars nach der Abarbeitung der Infobox-Validatoren
+ nur f&uuml;r diese Online Applikation<-->
+ <Templates>
+ <!--BKUSelectionTemplate URL="sampleTemplates/SampleBKUSelectionTemplate.html"/-->
+ <!--Template URL="sampleTemplates/SampleTemplate.html"/-->
+ <!--InputProcessorSignTemplate URL="sampleTemplates/SampleInputProcessorSignTemplate.html"/-->
+ </Templates>
+ <!-- Falls aktiviert, werden diese Transformationen anstatt der Default-Transformationen verwendet -->
+ <!-- TransformInfo in Textform, bevorzugte Variante im xhtml-Format -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlockText.xml"/> -->
+ <!-- TransformInfo in Textform, alternative Variante fuer aeltere BKU -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlockText_deprecated.xml"/> -->
+ <!-- TransformInfo in Tabellenform, bevorzugte Variante im xhtml-Format -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlock.xml"/> -->
+ <!-- TransformInfo in Tabellenform, alternative Variante fuer aeltere BKU -->
+ <!-- <TransformsInfo filename="transforms/TransformsInfoAuthBlock_deprecated.xml"/> -->
+ </AuthComponent>
+ <!-- fuer MOA-ID-PROXY -->
+ <ProxyComponent configFileURL="oa/SampleOAConfiguration.xml" sessionTimeOut="600">
+ <!-- <ProxyComponent configFileURL="oa/SampleOAConfiguration.xml" sessionTimeOut="600" loginParameterResolverImpl="at.gv.egovernment.moa.id.proxy.DefaultLoginParameterResolver" loginParameterResolverConfiguration="" connectionBuilderImpl="at.gv.egovernment.moa.id.proxy.DefaultConnectionBuilder"> -->
+ <!-- URL und akzeptierte TLS-Server-Zertifikate der Online-Applikation -->
+ <ConnectionParameter URL="http://www.digitales.oesterreich.gv.at/">
+ <!-- <AcceptedServerCertificates>certs/server-certs</AcceptedServerCertificates> -->
+ <!-- <ClientKeyStore password="Keystore Pass">file_to_clientkeystore</ClientKeyStore> -->
+ </ConnectionParameter>
+ </ProxyComponent>
+ </OnlineApplication>
+ <!-- ChainingModes fuer die Zertifikatspfadueberpruefung der TLS-Zertifikate -->
+ <ChainingModes systemDefaultMode="pkix">
+ </ChainingModes>
+ <!-- fuer MOA-ID-AUTH: CA-Zertifikat des Servers MOA-SP, falls dieses Service ueber HTTPS angesprochen wird
+ fuer MOA-ID-PROXY: CA-Zertifikat des Servers MOA-ID-AUTH, falls dieses Service ueber HTTPS angesprochen wird
+ zusaeztlich: CA-Zertifikat aller Online-Applikationen, die ueber HTTPS angesprochen werden -->
+ <TrustedCACertificates>certs/ca-certs</TrustedCACertificates>
+ <!-- Cache-Verzeichnis fuer-Zertifikate -->
+ <!-- Hinweis: wenn TC in linux oder unix betrieben wird vollstaendigen pfad fuer DirectoryCertStoreParameters.RootDir verwenden -->
+ <GenericConfiguration name="DirectoryCertStoreParameters.RootDir" value="certs/certstore"/>
+ <!-- Time-Out fuer die Anmeldung von Beginn bis zum Anlegen der Anmeldedaten, in Sekunden -->
+ <GenericConfiguration name="AuthenticationSession.TimeOut" value="600"/>
+ <!-- Time-Out fuer die Anmeldung vom Anlegen bis zum Abholen der Anmeldedaten, in Sekunden -->
+ <GenericConfiguration name="AuthenticationData.TimeOut" value="120"/>
+ <!-- Alternatives Data URL prefix (falls Webserver vorgeschaltet wird) -->
+ <!--GenericConfiguration name="FrontendServlets.DataURLPrefix" value="https://<your_webserver>/moa-id-auth/"/ -->
+ <!-- HTTP Verbindung auf Frontend Servlets zulassen / verbieten (falls Webserver vorgeschaltet wird) -->
+ <!-- GenericConfiguration name="FrontendServlets.EnableHTTPConnection" value="true"/ -->
+ <!-- URL Liste der vertrauenwürdigen Bürgekartenumgebungen -->
+ <TrustedBKUs>
+ <BKUURL>https://www.handy-signatur.at/mobile/https-security-layer-request/default.aspx</BKUURL>
+ <BKUURL>https://www.a-trust.at/mobile/https-security-layer-request/default.aspx</BKUURL>
+ </TrustedBKUs>
+</MOA-IDConfiguration>
diff --git a/id/server/data/deploy/conf/moa-id/certs/ca-certs/A-Trust-nQual-03.cer b/id/server/data/deploy/conf/moa-id/certs/ca-certs/A-Trust-nQual-03.cer
new file mode 100644
index 000000000..33e776369
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-id/certs/ca-certs/A-Trust-nQual-03.cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-id/certs/ca-certs/a-sign-SSL-03.cer b/id/server/data/deploy/conf/moa-id/certs/ca-certs/a-sign-SSL-03.cer
new file mode 100644
index 000000000..a699436ca
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-id/certs/ca-certs/a-sign-SSL-03.cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-id/certs/ca-certs/gateway.stammzahlenregister.gv.at.cer b/id/server/data/deploy/conf/moa-id/certs/ca-certs/gateway.stammzahlenregister.gv.at.cer
new file mode 100644
index 000000000..ff90e35f5
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-id/certs/ca-certs/gateway.stammzahlenregister.gv.at.cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-id/log4j.properties b/id/server/data/deploy/conf/moa-id/log4j.properties
new file mode 100644
index 000000000..0f31f4891
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-id/log4j.properties
@@ -0,0 +1,25 @@
+# commons-logging setup
+org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.Log4jFactory
+
+# define log4j root loggers
+log4j.rootLogger=info, stdout, R
+log4j.logger.moa=info
+log4j.logger.moa.spss.server=info
+log4j.logger.iaik.server=info
+log4j.logger.moa.id.auth=info
+log4j.logger.moa.id.proxy=info
+
+# configure the stdout appender
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+#log4j.appender.stdout.layout.ConversionPattern=%5p | %d{dd HH:mm:ss,SSS} | %20c | %10t | %m%n
+log4j.appender.stdout.layout.ConversionPattern=%5p | %d{dd HH:mm:ss,SSS} | %20.20c | %10t | %m%n
+
+# configure the rolling file appender (R)
+log4j.appender.R=org.apache.log4j.RollingFileAppender
+log4j.appender.R.File=${catalina.base}/logs/moa-id.log
+log4j.appender.R.MaxFileSize=10000KB
+log4j.appender.R.MaxBackupIndex=1
+log4j.appender.R.layout=org.apache.log4j.PatternLayout
+log4j.appender.R.layout.ConversionPattern=%5p | %d{dd HH:mm:ss,SSS} | %t | %m%n
+
diff --git a/id/server/data/deploy/conf/moa-id/oa/BasicOAConfiguration.xml b/id/server/data/deploy/conf/moa-id/oa/BasicOAConfiguration.xml
new file mode 100644
index 000000000..fc99cea79
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-id/oa/BasicOAConfiguration.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Demokonfiguration fuer eine Online Applikation (OA) welche 401 Basic Authentication zur Uebergabe der Parameter verwendet -->
+<Configuration xmlns="http://www.buergerkarte.at/namespaces/moaconfig#" xmlns:sl10="http://www.buergerkarte.at/namespaces/securitylayer/20020225#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <LoginType>stateless</LoginType>
+ <BasicAuth>
+ <UserID>MOAFamilyName</UserID>
+ <Password>MOAGivenName</Password>
+ </BasicAuth>
+</Configuration>
diff --git a/id/server/data/deploy/conf/moa-id/oa/HeaderOAConfiguration.xml b/id/server/data/deploy/conf/moa-id/oa/HeaderOAConfiguration.xml
new file mode 100644
index 000000000..4d34c3646
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-id/oa/HeaderOAConfiguration.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Demokonfiguration fuer eine Online Applikation (OA) welche Header Authentication zur Uebergabe der Parameter verwendet -->
+<Configuration xmlns="http://www.buergerkarte.at/namespaces/moaconfig#" xmlns:sl10="http://www.buergerkarte.at/namespaces/securitylayer/20020225#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <LoginType>stateless</LoginType>
+ <HeaderAuth>
+ <!-- zusaetzlicher Header GivenName -->
+ <Header Name="X-MOAParameterGivenName" Value="MOAGivenName"></Header>
+ <Header Name="X-MOAParameterFamilyName" Value="MOAFamilyName"></Header>
+ </HeaderAuth>
+</Configuration>
diff --git a/id/server/data/deploy/conf/moa-id/oa/ParamOAConfiguration.xml b/id/server/data/deploy/conf/moa-id/oa/ParamOAConfiguration.xml
new file mode 100644
index 000000000..979faca95
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-id/oa/ParamOAConfiguration.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Demokonfiguration fuer eine Online Applikation (OA) welche Parameter Authentication verwendet -->
+<Configuration xmlns="http://www.buergerkarte.at/namespaces/moaconfig#" xmlns:sl10="http://www.buergerkarte.at/namespaces/securitylayer/20020225#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <LoginType>stateless</LoginType>
+ <ParamAuth>
+ <!-- URL Parameter GivenName und FamilyName -->
+ <Parameter Name="GivenName" Value="MOAGivenName"></Parameter>
+ <Parameter Name="FamilyName" Value="MOAFamilyName"></Parameter>
+ </ParamAuth>
+</Configuration>
diff --git a/id/server/data/deploy/conf/moa-id/oa/SampleOAConfiguration.xml b/id/server/data/deploy/conf/moa-id/oa/SampleOAConfiguration.xml
new file mode 100644
index 000000000..edbfe7aa5
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-id/oa/SampleOAConfiguration.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Demokonfiguration fuer Online Applikation (OA) welche 401 Basic Authentication zur Uebergabe der Parameter verwendet -->
+<Configuration xmlns="http://www.buergerkarte.at/namespaces/moaconfig#" xmlns:sl10="http://www.buergerkarte.at/namespaces/securitylayer/20020225#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <LoginType>stateless</LoginType>
+ <BasicAuth>
+ <UserID>MOAFamilyName</UserID>
+ <Password>MOAGivenName</Password>
+ </BasicAuth>
+</Configuration>
diff --git a/id/server/data/deploy/conf/moa-id/oa/SamplewbPKOAConfiguration.xml b/id/server/data/deploy/conf/moa-id/oa/SamplewbPKOAConfiguration.xml
new file mode 100644
index 000000000..2cff3bd67
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-id/oa/SamplewbPKOAConfiguration.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Demokonfiguration fuer eine Online Applikation (OA) welche 401 Basic Authentication zur Uebergabe der Parameter verwendet -->
+<Configuration xmlns="http://www.buergerkarte.at/namespaces/moaconfig#" xmlns:sl10="http://www.buergerkarte.at/namespaces/securitylayer/20020225#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <LoginType>stateless</LoginType>
+ <BasicAuth>
+ <UserID>MOAWBPK</UserID>
+ <Password>MOAGivenName</Password>
+ </BasicAuth>
+</Configuration>
diff --git a/id/server/data/deploy/conf/moa-id/sampleTemplates/LIESMICH_TEMPLATES.txt b/id/server/data/deploy/conf/moa-id/sampleTemplates/LIESMICH_TEMPLATES.txt
new file mode 100644
index 000000000..04029dc80
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-id/sampleTemplates/LIESMICH_TEMPLATES.txt
@@ -0,0 +1,26 @@
+TEMPLATES:
+==========
+Zweck:
+------
+Mithilfe von Templates können Sie beispielsweise das Aussehen der Seiten
+"Auswahl der Bürgerkartenumgebung" sowie "Anmeldung mit Bürgerkarte"
+anpassen. Damit können Sie zusätzliche Hintergrundinformationen (Wozu
+dient die Anmeldung, etc.) zu diesen Seiten hinzufügen und das Layout an
+Ihre sonstigen Anwendungen anpassen.
+
+Wenn Sie in den Beispielkonfigurationsdateien die Elmente
+"AuthComponent/Templates" oder "OnlineApplication/AuthComponent/Templates"
+aktivieren, dann werden die in diesem Verzeichnis enthaltenen Beispieltemplates
+geladen. Es sind dies sehr einfache Templates, die nur das Laden über die
+Konfigurationsdatei demonstrieren sollen. (Das Laden der Templates über
+die Konfigurationsdatei steht erst ab Version 1.3.1 zur Verfügung).
+Etwas aufwendigere Templates (mit CSS) finden Sie als eigene Webapplikation im
+Verzeichnis "/auth/templates" der entpackten Distribution.
+
+Die Datei ParepInputProcessorSignTemplate.html dient als Template für die
+Formulare der beruflichen Parteienvertretung, welche bereits die Styleguide für
+das österreichische E-Government erfüllen sollen.
+
+Nähere Informationen zu den Templates finden Sie im MOA-ID-Konfigurationshandbuch.
+
+
diff --git a/id/server/data/deploy/conf/moa-id/sampleTemplates/ParepInputProcessorSignTemplate.html b/id/server/data/deploy/conf/moa-id/sampleTemplates/ParepInputProcessorSignTemplate.html
new file mode 100644
index 000000000..99bc057ad
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-id/sampleTemplates/ParepInputProcessorSignTemplate.html
@@ -0,0 +1,61 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+<BASE href="<BASE_href>">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Berufliche Parteieinvertretung</title>
+<link href="css/styles.css" type="text/css" rel="stylesheet">
+<link href="css/styles_opera.css" type="text/css" rel="stylesheet">
+<link href="css/mandates.css" type="text/css" rel="stylesheet">
+ <script language="javascript" type="text/javascript">
+ //<!--
+ function autoSubmit() {
+ document.VerifyAuthBlockForm.submitButton.disabled=true;
+ document.VerifyAuthBlockForm.submit();
+ } //-->
+ </script>
+<script src="formallg.js" type="text/javascript"></script>
+<script src="fa.js" type="text/javascript"></script>
+</head>
+<body onLoad="autoSubmit()">
+
+
+<div class="hleft">
+<!--Stammzahlenregisterbehörde--><br />
+<!--Ballhausplatz 2--><br />
+<!--1014 Wien-->
+</div>
+<div class="hright" align="right"><!--img src="img/szr-logo.jpg" width="400" height="56" /--></div>
+<div class="htitle" align="left">
+ <h1>Berufliche Parteienvertretung</h1>
+</div>
+<div class="leiste1" align="center">
+Bitte beachten Sie
+</div>
+<div class="leiste2" align="center">
+</div>
+<div class="leiste3">
+<img alt=" Dieses Feld muss ausgefüllt sein!" src="img/stern.gif" width="10" height="16" />&nbsp; Feld muss ausgef&uuml;llt sein
+</div>
+<div class="leiste3">
+<img alt=" Hilfe zum Ausfüllen " src="img/info.gif" width="10" height="16" />&nbsp; Ausf&uuml;llhilfe
+</div>
+<div class="leiste3">
+<img alt=" Angabe bitte ergänzen oder richtig stellen! " src="img/rufezeichen.gif" width="10" height="16" />&nbsp; Fehlerhinweis</div>
+<div style="clear: both">&nbsp;</div>
+
+<h2>Berufliche Parteienvertretung einer nat&uuml;rlichen/juristischen Person
+</h2>
+<div class="boundingbox">
+ <br/><br/>
+ <form name="VerifyAuthBlockForm" action="<BKU>" method="post" enctype="application/x-www-form-urlencoded">
+ <input type="hidden" name="XMLRequest" value="<XMLRequest>"/>
+ <input type="hidden" name="DataURL" value="<DataURL>"/>
+ <input type="hidden" name="PushInfobox" value="<PushInfobox>"/>
+ &nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" value="Signieren der Anmeldedaten" id="submitButton"/>
+ </form>
+ <br/>
+</div>
+</body>
+</html>
diff --git a/id/server/data/deploy/conf/moa-id/sampleTemplates/SampleBKUSelectionTemplate.html b/id/server/data/deploy/conf/moa-id/sampleTemplates/SampleBKUSelectionTemplate.html
new file mode 100644
index 000000000..2f2ea6552
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-id/sampleTemplates/SampleBKUSelectionTemplate.html
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>MOA ID - Auswahl der B&uuuml;rgerkartenumgebung</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta name="Author" content="Max Mustermann">
+ <meta name="keywords" content="MOA-ID">
+</head>
+
+<body>
+
+<h1 align="center">Auswahl der B&uuml;rgerkartenumgebung</h1>
+
+<p></p>
+<p>Sie haben sich f&uuml;r Anmeldung mit Ihrer B&uuml;rgerkarte entschieden. Da es verschiedene Formen der B&uuml;rgerkarte gibt, m&uuml;ssen Sie nun w&auml;hlen, welche Sie bei der Anmeldung verwenden wollen.</p>
+<h3>Auswahl der B&uuml;rgerkarte</h3>
+<form name="CustomizedForm" method="post" action="<StartAuth>">
+ <BKUSelect>
+ <input type="submit" value="Ausw&auml;hlen"/>
+</form>
+<br/>
+<p></p>
+
+ <input type="hidden" value="Weitere Info"/>
+</form>
+
+<h4>Hinweise: </h4>
+<ul>
+ <li>
+ <p>Bei der Anmeldung mit einer <a href="http://www.a-trust.at/info.asp?node=337" target="_blank">A-Trust B&uuml;rgerkarte</a> oder Ihrer
+ <a href="http://www.chipkarte.at/esvapps/page/page.jsp?p_pageid=110&p_menuid=62182&p_id=2" target="_blank">E-CARD</a> ben&ouml;tigen Sie
+ eine funktionsf&auml;hige <a href="http://www.buergerkarte.at/" target="_blank">B&uuml;rgerkartensoftware</a> sowie einen passenden Kartenleser.</p>
+ </li>
+ <li>
+ <p>Bei der Anmeldung mit der <a href="http://www.a1.net/signatur" target="_blank">A1-Signatur</a> &uuml;ber Ihr Handy wird keine B&uuml;rgerkartensoftware und
+ kein Kartenleser ben&ouml;tigt.</p>
+ </li>
+</ul>
+
+<p align="right">&nbsp; </p>
+
+
+</body>
+</html>
diff --git a/id/server/data/deploy/conf/moa-id/sampleTemplates/SampleInputProcessorSignTemplate.html b/id/server/data/deploy/conf/moa-id/sampleTemplates/SampleInputProcessorSignTemplate.html
new file mode 100644
index 000000000..9c8e67a20
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-id/sampleTemplates/SampleInputProcessorSignTemplate.html
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>MOA ID - Identifizierter Zugang mit B&uuml;rgerkarte</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta name="Author" content="Max Mustermann">
+ <meta name="keywords" content="MOA-ID">
+ <script language="javascript" type="text/javascript">
+ //<!--
+ function autoSubmit() {
+ document.VerifyAuthBlockForm.submitButton.disabled=true;
+ document.VerifyAuthBlockForm.submit();
+ } //-->
+ </script>
+</head>
+
+<body onLoad="autoSubmit()">
+<h1 align="center">Sicherer Zugang zur Online-Anwendung mit B&uuml;rgerkarte</h1>
+<p></p>
+
+Der identifizierte Zugang erfolgt &uuml;ber die Module f&uuml;r Online Applikationen (MOA) unter Verwendung einer B&uuml;rgerkarte und deren Signaturfunktion.
+
+<p></p>
+<p>Sie werden in ku&uuml;rze zur Signatur der Anmeldedaten aufgefordert. Wenn sie diese
+signieren, so werden sie zur Online-Anwendung weitergeleitet und angemeldet.</p>
+
+<form name="VerifyAuthBlockForm" action="<BKU>" method="post" enctype="application/x-www-form-urlencoded">
+ <div align="center">
+ <input type="hidden" name="XMLRequest" value="<XMLRequest>"/>
+ <input type="hidden" name="DataURL" value="<DataURL>"/>
+ <input type="hidden" name="PushInfobox" value="<PushInfobox>"/>
+ <input type="submit" value="Signieren der Anmeldedaten" id="submitButton"/>
+ </div>
+</form>
+
+<p align="right">&nbsp; </p>
+
+</body>
+</html>
diff --git a/id/server/data/deploy/conf/moa-id/sampleTemplates/SampleTemplate.html b/id/server/data/deploy/conf/moa-id/sampleTemplates/SampleTemplate.html
new file mode 100644
index 000000000..83a6639e6
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-id/sampleTemplates/SampleTemplate.html
@@ -0,0 +1,56 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>MOA ID - Identifizierter Zugang mit B&uuml;rgerkarte</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta name="Author" content="Max Mustermann">
+ <meta name="keywords" content="MOA-ID">
+</head>
+
+<body>
+
+<h1 align="center">Sicherer Zugang zur Online-Anwendung mit B&uuml;rgerkarte</h1>
+
+<p></p>
+
+Der identifizierte Zugang erfolgt &uuml;ber die Module f&uuml;r Online Applikationen (MOA) unter Verwendung einer B&uuml;rgerkarte und deren Signaturfunktion.
+
+<p></p>
+<p>Wenn Sie in Folge die Schaltfl&auml;che "Anmeldung mit B&uuml;rgerkarte"
+aktivieren, so werden Sie zur Signatur der Anmeldedaten aufgefordert. Wenn Sie diese
+signieren, so werden Sie zur Online-Anwendung weitergeleitet und angemeldet.</p>
+
+
+<form name="CustomizedForm" action="<BKU>" method="post">
+ <div align="center">
+ <input type="hidden"
+ name="XMLRequest"
+ value="<XMLRequest>"/>
+ <input type="hidden"
+ name="DataURL"
+ value="<DataURL>"/>
+ <input type="hidden"
+ name="PushInfobox"
+ value="<PushInfobox>"/>
+ <input type="submit" value="Anmeldung mit B&uuml;rgerkarte" name="submit"/>
+ </div>
+</form>
+<form name="CustomizedInfoForm"
+ action="<BKU>"
+ method="post">
+ <input type="hidden"
+ name="XMLRequest"
+ value="<CertInfoXMLRequest>"/>
+ <input type="hidden"
+ name="DataURL"
+ value="<CertInfoDataURL>"/>
+
+
+<br/>
+<p></p>
+
+ <input type="hidden" value="Weitere Info"/>
+</form>
+
+</body>
+</html>
diff --git a/id/server/data/deploy/conf/moa-id/transforms/TransformsInfoAuthBlockTable_DE.xml b/id/server/data/deploy/conf/moa-id/transforms/TransformsInfoAuthBlockTable_DE.xml
new file mode 100644
index 000000000..7fae15b7c
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-id/transforms/TransformsInfoAuthBlockTable_DE.xml
@@ -0,0 +1,176 @@
+<sl10:TransformsInfo>
+ <dsig:Transforms xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
+ <dsig:Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116">
+ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#" exclude-result-prefixes="pr saml">
+ <xsl:output method="xml" xml:space="default"/>
+ <xsl:template match="/" xmlns="http://www.w3.org/1999/xhtml">
+ <html>
+ <head>
+ <title>Signatur der Anmeldedaten</title>
+ <style type="text/css" media="screen">
+ .normalstyle { font-size: medium; }
+ .italicstyle { font-size: medium; font-style: italic; }
+ .titlestyle{ text-decoration:underline; font-weight:bold; font-family: Verdana; font-size: medium; }
+ .h4style{ font-size: large; font-family: Verdana; }
+ </style>
+ </head>
+ <body>
+ <h4 class="h4style">Anmeldedaten:</h4>
+ <p class="titlestyle">Daten zur Person</p>
+ <table class="parameters">
+ <xsl:if test="normalize-space(//@Issuer)">
+ <tr>
+ <td class="italicstyle">Name:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//@Issuer"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="string(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue)">
+ <tr>
+ <td class="italicstyle">Geburtsdatum:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,9,2)"/>
+ <xsl:text>.</xsl:text>
+ <xsl:value-of select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,6,2)"/>
+ <xsl:text>.</xsl:text>
+ <xsl:value-of select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,1,4)"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='OIDTextualDescription']">
+ <tr>
+ <td class="italicstyle">Rolle:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='OIDTextualDescription']/saml:AttributeValue"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='MandatorName']">
+ <tr>
+ <td class="italicstyle">Vollmacht:</td>
+ <td class="normalstyle">
+ <xsl:text>Ich bin weiters ermächtigt als </xsl:text>
+ <xsl:value-of select="//saml:Attribute[@AttributeName='RepresentationType']/saml:AttributeValue/text()"/>
+ <xsl:text> von </xsl:text>
+ <xsl:value-of select="//saml:Attribute[@AttributeName='MandatorName']/saml:AttributeValue/text()"/>
+ <xsl:if test="//saml:Attribute[@AttributeName='MandatorDateOfBirth']">
+ <xsl:text>, geboren am </xsl:text>
+ <xsl:value-of select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,9,2)"/>
+ <xsl:text>.</xsl:text>
+ <xsl:value-of select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,6,2)"/>
+ <xsl:text>.</xsl:text>
+ <xsl:value-of select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,1,4)"/>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='MandatorDomainIdentifier']">
+ <xsl:text>, </xsl:text>
+ <xsl:value-of select="//saml:Attribute[@AttributeName='MandatorDomainIdentifier']/saml:AttributeValue/text()"/>
+ </xsl:if>
+ <xsl:text>, in deren Auftrag zu handeln.</xsl:text>
+ </td>
+ </tr>
+ </xsl:if>
+ </table>
+ <p class="titlestyle">Daten zur Anwendung</p>
+ <table class="parameters">
+ <tr>
+ <td class="italicstyle">Name:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='oaFriendlyName']/saml:AttributeValue"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="italicstyle">Staat:</td>
+ <td class="normalstyle">Österreich</td>
+ </tr>
+ </table>
+ <p class="titlestyle">Technische Parameter</p>
+ <table class="parameters">
+ <tr>
+ <td class="italicstyle">URL:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='OA']/saml:AttributeValue"/>
+ </td>
+ </tr>
+ <xsl:if test="//saml:Attribute[@AttributeName='Geschaeftsbereich']">
+ <tr>
+ <td class="italicstyle">Bereich:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='Geschaeftsbereich']/saml:AttributeValue"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='IdentityLinkDomainIdentifierType']">
+ <tr>
+ <td class="italicstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='IdentityLinkDomainIdentifierType']"/>:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='wbPK']/saml:AttributeValue/pr:Identification/pr:Type"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='bPK'] or //saml:Attribute[@AttributeName='wbPK']">
+ <tr>
+ <td class="italicstyle">Identifikator:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='bPK']/saml:AttributeValue/pr:Identification/pr:Value"/>
+ <xsl:value-of select="//saml:Attribute[@AttributeName='wbPK']/saml:AttributeValue/pr:Identification/pr:Value"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='MandatorWbpk']">
+ <tr>
+ <td class="italicstyle">Identifikator des Vollmachtgebers:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='MandatorWbpk']/saml:AttributeValue/text()"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='OIDTextualDescription']">
+ <tr>
+ <td class="italicstyle">OID:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='OID']/saml:AttributeValue"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='HPI']">
+ <tr>
+ <td class="italicstyle">HPI:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='HPI']/saml:AttributeValue"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <tr>
+ <td class="italicstyle">Datum:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="substring(//@IssueInstant,9,2)"/>
+ <xsl:text>.</xsl:text>
+ <xsl:value-of select="substring(//@IssueInstant,6,2)"/>
+ <xsl:text>.</xsl:text>
+ <xsl:value-of select="substring(//@IssueInstant,1,4)"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="italicstyle">Uhrzeit:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="substring(//@IssueInstant,12,2)"/>
+ <xsl:text>:</xsl:text>
+ <xsl:value-of select="substring(//@IssueInstant,15,2)"/>
+ <xsl:text>:</xsl:text>
+ <xsl:value-of select="substring(//@IssueInstant,18,2)"/>
+ </td>
+ </tr>
+ </table>
+ </body>
+ </html>
+ </xsl:template>
+ </xsl:stylesheet>
+ </dsig:Transform>
+ <dsig:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
+ </dsig:Transforms>
+ <sl10:FinalDataMetaInfo>
+ <sl10:MimeType>application/xhtml+xml</sl10:MimeType>
+ </sl10:FinalDataMetaInfo>
+</sl10:TransformsInfo>
diff --git a/id/server/data/deploy/conf/moa-id/transforms/TransformsInfoAuthBlockTable_EN.xml b/id/server/data/deploy/conf/moa-id/transforms/TransformsInfoAuthBlockTable_EN.xml
new file mode 100644
index 000000000..17691ca8d
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-id/transforms/TransformsInfoAuthBlockTable_EN.xml
@@ -0,0 +1,176 @@
+<sl10:TransformsInfo>
+ <dsig:Transforms xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
+ <dsig:Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116">
+ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#" exclude-result-prefixes="pr saml">
+ <xsl:output method="xml" xml:space="default"/>
+ <xsl:template match="/" xmlns="http://www.w3.org/1999/xhtml">
+ <html>
+ <head>
+ <title>Signing the authentication data</title>
+ <style type="text/css" media="screen">
+ .normalstyle { font-size: medium; }
+ .italicstyle { font-size: medium; font-style: italic; }
+ .titlestyle{ text-decoration:underline; font-weight:bold; font-family: Verdana; font-size: medium; }
+ .h4style{ font-size: large; font-family: Verdana; }
+ </style>
+ </head>
+ <body>
+ <h4 class="h4style">Authentication Data:</h4>
+ <p class="titlestyle">Personal Data</p>
+ <table class="parameters">
+ <xsl:if test="normalize-space(//@Issuer)">
+ <tr>
+ <td class="italicstyle">Name:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//@Issuer"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="string(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue)">
+ <tr>
+ <td class="italicstyle">Date of Birth:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,9,2)"/>
+ <xsl:text>.</xsl:text>
+ <xsl:value-of select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,6,2)"/>
+ <xsl:text>.</xsl:text>
+ <xsl:value-of select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,1,4)"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='OIDTextualDescription']">
+ <tr>
+ <td class="italicstyle">Role:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='OIDTextualDescription']/saml:AttributeValue"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='MandatorName']">
+ <tr>
+ <td class="italicstyle">Mandate:</td>
+ <td class="normalstyle">
+ <xsl:text>I am also authorized as </xsl:text>
+ <xsl:value-of select="//saml:Attribute[@AttributeName='RepresentationType']/saml:AttributeValue/text()"/>
+ <xsl:text> of </xsl:text>
+ <xsl:value-of select="//saml:Attribute[@AttributeName='MandatorName']/saml:AttributeValue/text()"/>
+ <xsl:if test="//saml:Attribute[@AttributeName='MandatorDateOfBirth']">
+ <xsl:text>, born on </xsl:text>
+ <xsl:value-of select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,9,2)"/>
+ <xsl:text>.</xsl:text>
+ <xsl:value-of select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,6,2)"/>
+ <xsl:text>.</xsl:text>
+ <xsl:value-of select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,1,4)"/>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='MandatorDomainIdentifier']">
+ <xsl:text>, </xsl:text>
+ <xsl:value-of select="//saml:Attribute[@AttributeName='MandatorDomainIdentifier']/saml:AttributeValue/text()"/>
+ </xsl:if>
+ <xsl:text>, to act on their behalf.</xsl:text>
+ </td>
+ </tr>
+ </xsl:if>
+ </table>
+ <p class="titlestyle">Application Data</p>
+ <table class="parameters">
+ <tr>
+ <td class="italicstyle">Name:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='oaFriendlyName']/saml:AttributeValue"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="italicstyle">Country:</td>
+ <td class="normalstyle">Austria</td>
+ </tr>
+ </table>
+ <p class="titlestyle">Technical Parameters</p>
+ <table class="parameters">
+ <tr>
+ <td class="italicstyle">URL:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='OA']/saml:AttributeValue"/>
+ </td>
+ </tr>
+ <xsl:if test="//saml:Attribute[@AttributeName='Geschaeftsbereich']">
+ <tr>
+ <td class="italicstyle">Sector:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='Geschaeftsbereich']/saml:AttributeValue"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='IdentityLinkDomainIdentifierType']">
+ <tr>
+ <td class="italicstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='IdentityLinkDomainIdentifierType']"/>:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='wbPK']/saml:AttributeValue/pr:Identification/pr:Type"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='bPK'] or //saml:Attribute[@AttributeName='wbPK']">
+ <tr>
+ <td class="italicstyle">Identifier:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='bPK']/saml:AttributeValue/pr:Identification/pr:Value"/>
+ <xsl:value-of select="//saml:Attribute[@AttributeName='wbPK']/saml:AttributeValue/pr:Identification/pr:Value"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='MandatorWbpk']">
+ <tr>
+ <td class="italicstyle">Identifier of the principal:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='MandatorWbpk']/saml:AttributeValue/text()"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='OIDTextualDescription']">
+ <tr>
+ <td class="italicstyle">OID:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='OID']/saml:AttributeValue"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='HPI']">
+ <tr>
+ <td class="italicstyle">HPI:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='HPI']/saml:AttributeValue"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <tr>
+ <td class="italicstyle">Date:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="substring(//@IssueInstant,9,2)"/>
+ <xsl:text>.</xsl:text>
+ <xsl:value-of select="substring(//@IssueInstant,6,2)"/>
+ <xsl:text>.</xsl:text>
+ <xsl:value-of select="substring(//@IssueInstant,1,4)"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="italicstyle">Time:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="substring(//@IssueInstant,12,2)"/>
+ <xsl:text>:</xsl:text>
+ <xsl:value-of select="substring(//@IssueInstant,15,2)"/>
+ <xsl:text>:</xsl:text>
+ <xsl:value-of select="substring(//@IssueInstant,18,2)"/>
+ </td>
+ </tr>
+ </table>
+ </body>
+ </html>
+ </xsl:template>
+ </xsl:stylesheet>
+ </dsig:Transform>
+ <dsig:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
+ </dsig:Transforms>
+ <sl10:FinalDataMetaInfo>
+ <sl10:MimeType>application/xhtml+xml</sl10:MimeType>
+ </sl10:FinalDataMetaInfo>
+</sl10:TransformsInfo>
diff --git a/id/server/data/deploy/conf/moa-spss/SampleMOASPSSConfiguration.xml b/id/server/data/deploy/conf/moa-spss/SampleMOASPSSConfiguration.xml
new file mode 100644
index 000000000..dbf7cab1c
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/SampleMOASPSSConfiguration.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--MOA SPSS 1.3 Configuration File created by MOA SPSS Configuration Mapper-->
+<cfg:MOAConfiguration xmlns:cfg="http://reference.e-government.gv.at/namespace/moaconfig/20021122#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
+ <cfg:SignatureVerification>
+ <cfg:CertificateValidation>
+ <cfg:PathConstruction>
+ <cfg:AutoAddCertificates>true</cfg:AutoAddCertificates>
+ <cfg:UseAuthorityInformationAccess>true</cfg:UseAuthorityInformationAccess>
+ <cfg:CertificateStore>
+ <cfg:DirectoryStore>
+ <cfg:Location>certstore</cfg:Location>
+ </cfg:DirectoryStore>
+ </cfg:CertificateStore>
+ </cfg:PathConstruction>
+ <cfg:PathValidation>
+ <cfg:ChainingMode>
+ <cfg:DefaultMode>pkix</cfg:DefaultMode>
+ <cfg:TrustAnchor>
+ <cfg:Identification>
+ <dsig:X509IssuerName>CN=A-Trust-nQual-0,OU=A-Trust-nQual-0,O=A-Trust,C=AT</dsig:X509IssuerName>
+ <dsig:X509SerialNumber>536</dsig:X509SerialNumber>
+ </cfg:Identification>
+ <cfg:Mode>chaining</cfg:Mode>
+ </cfg:TrustAnchor>
+ </cfg:ChainingMode>
+ <cfg:TrustProfile>
+ <cfg:Id>MOAIDBuergerkartePersonenbindung</cfg:Id>
+ <cfg:TrustAnchorsLocation>trustProfiles/MOAIDBuergerkartePersonenbindungOhneTestkarten</cfg:TrustAnchorsLocation>
+ </cfg:TrustProfile>
+ <cfg:TrustProfile>
+ <cfg:Id>MOAIDBuergerkarteAuthentisierungsDaten</cfg:Id>
+ <cfg:TrustAnchorsLocation>trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten</cfg:TrustAnchorsLocation>
+ </cfg:TrustProfile>
+ <cfg:TrustProfile>
+ <cfg:Id>MOAIDBuergerkartePersonenbindungMitTestkarten</cfg:Id>
+ <cfg:TrustAnchorsLocation>trustProfiles/MOAIDBuergerkartePersonenbindungMitTestkarten</cfg:TrustAnchorsLocation>
+ </cfg:TrustProfile>
+ <cfg:TrustProfile>
+ <cfg:Id>MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten</cfg:Id>
+ <cfg:TrustAnchorsLocation>trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten</cfg:TrustAnchorsLocation>
+ </cfg:TrustProfile>
+ </cfg:PathValidation>
+ <cfg:RevocationChecking>
+ <cfg:EnableChecking>true</cfg:EnableChecking>
+ <cfg:MaxRevocationAge>0</cfg:MaxRevocationAge>
+ <cfg:ServiceOrder>
+ <cfg:Service>CRL</cfg:Service>
+ <cfg:Service>OCSP</cfg:Service>
+ </cfg:ServiceOrder>
+ <cfg:Archiving>
+ <cfg:EnableArchiving>false</cfg:EnableArchiving>
+ <cfg:ArchiveDuration>365</cfg:ArchiveDuration>
+ <cfg:Archive>
+ <cfg:DatabaseArchive>
+ <cfg:JDBCURL>jdbc:url</cfg:JDBCURL>
+ <cfg:JDBCDriverClassName>fully.qualified.classname</cfg:JDBCDriverClassName>
+ </cfg:DatabaseArchive>
+ </cfg:Archive>
+ </cfg:Archiving>
+ </cfg:RevocationChecking>
+ </cfg:CertificateValidation>
+ <cfg:VerifyTransformsInfoProfile>
+ <cfg:Id>MOAIDTransformAuthBlockTable_DE</cfg:Id>
+ <cfg:Location>profiles/MOAIDTransformAuthBlockTable_DE.xml</cfg:Location>
+ </cfg:VerifyTransformsInfoProfile>
+ <cfg:VerifyTransformsInfoProfile>
+ <cfg:Id>MOAIDTransformAuthBlockTable_EN</cfg:Id>
+ <cfg:Location>profiles/MOAIDTransformAuthBlockTable_EN.xml</cfg:Location>
+ </cfg:VerifyTransformsInfoProfile>
+ </cfg:SignatureVerification>
+</cfg:MOAConfiguration>
diff --git a/id/server/data/deploy/conf/moa-spss/profiles/MOAIDTransformAuthBlockTable_DE.xml b/id/server/data/deploy/conf/moa-spss/profiles/MOAIDTransformAuthBlockTable_DE.xml
new file mode 100644
index 000000000..24b0bfc38
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/profiles/MOAIDTransformAuthBlockTable_DE.xml
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VerifyTransformsInfoProfile xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#">
+ <dsig:Transforms xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
+ <dsig:Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116">
+ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#" exclude-result-prefixes="pr saml">
+ <xsl:output method="xml" xml:space="default"/>
+ <xsl:template match="/" xmlns="http://www.w3.org/1999/xhtml">
+ <html>
+ <head>
+ <title>Signatur der Anmeldedaten</title>
+ <style type="text/css" media="screen">
+ .normalstyle { font-size: medium; }
+ .italicstyle { font-size: medium; font-style: italic; }
+ .titlestyle{ text-decoration:underline; font-weight:bold; font-family: Verdana; font-size: medium; }
+ .h4style{ font-size: large; font-family: Verdana; }
+ </style>
+ </head>
+ <body>
+ <h4 class="h4style">Anmeldedaten:</h4>
+ <p class="titlestyle">Daten zur Person</p>
+ <table class="parameters">
+ <xsl:if test="normalize-space(//@Issuer)">
+ <tr>
+ <td class="italicstyle">Name:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//@Issuer"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="string(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue)">
+ <tr>
+ <td class="italicstyle">Geburtsdatum:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,9,2)"/>
+ <xsl:text>.</xsl:text>
+ <xsl:value-of select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,6,2)"/>
+ <xsl:text>.</xsl:text>
+ <xsl:value-of select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,1,4)"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='OIDTextualDescription']">
+ <tr>
+ <td class="italicstyle">Rolle:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='OIDTextualDescription']/saml:AttributeValue"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='MandatorName']">
+ <tr>
+ <td class="italicstyle">Vollmacht:</td>
+ <td class="normalstyle">
+ <xsl:text>Ich bin weiters ermächtigt als </xsl:text>
+ <xsl:value-of select="//saml:Attribute[@AttributeName='RepresentationType']/saml:AttributeValue/text()"/>
+ <xsl:text> von </xsl:text>
+ <xsl:value-of select="//saml:Attribute[@AttributeName='MandatorName']/saml:AttributeValue/text()"/>
+ <xsl:if test="//saml:Attribute[@AttributeName='MandatorDateOfBirth']">
+ <xsl:text>, geboren am </xsl:text>
+ <xsl:value-of select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,9,2)"/>
+ <xsl:text>.</xsl:text>
+ <xsl:value-of select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,6,2)"/>
+ <xsl:text>.</xsl:text>
+ <xsl:value-of select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,1,4)"/>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='MandatorDomainIdentifier']">
+ <xsl:text>, </xsl:text>
+ <xsl:value-of select="//saml:Attribute[@AttributeName='MandatorDomainIdentifier']/saml:AttributeValue/text()"/>
+ </xsl:if>
+ <xsl:text>, in deren Auftrag zu handeln.</xsl:text>
+ </td>
+ </tr>
+ </xsl:if>
+ </table>
+ <p class="titlestyle">Daten zur Anwendung</p>
+ <table class="parameters">
+ <tr>
+ <td class="italicstyle">Name:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='oaFriendlyName']/saml:AttributeValue"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="italicstyle">Staat:</td>
+ <td class="normalstyle">Österreich</td>
+ </tr>
+ </table>
+ <p class="titlestyle">Technische Parameter</p>
+ <table class="parameters">
+ <tr>
+ <td class="italicstyle">URL:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='OA']/saml:AttributeValue"/>
+ </td>
+ </tr>
+ <xsl:if test="//saml:Attribute[@AttributeName='Geschaeftsbereich']">
+ <tr>
+ <td class="italicstyle">Bereich:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='Geschaeftsbereich']/saml:AttributeValue"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='IdentityLinkDomainIdentifierType']">
+ <tr>
+ <td class="italicstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='IdentityLinkDomainIdentifierType']"/>:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='wbPK']/saml:AttributeValue/pr:Identification/pr:Type"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='bPK'] or //saml:Attribute[@AttributeName='wbPK']">
+ <tr>
+ <td class="italicstyle">Identifikator:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='bPK']/saml:AttributeValue/pr:Identification/pr:Value"/>
+ <xsl:value-of select="//saml:Attribute[@AttributeName='wbPK']/saml:AttributeValue/pr:Identification/pr:Value"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='MandatorWbpk']">
+ <tr>
+ <td class="italicstyle">Identifikator des Vollmachtgebers:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='MandatorWbpk']/saml:AttributeValue/text()"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='OIDTextualDescription']">
+ <tr>
+ <td class="italicstyle">OID:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='OID']/saml:AttributeValue"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='HPI']">
+ <tr>
+ <td class="italicstyle">HPI:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='HPI']/saml:AttributeValue"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <tr>
+ <td class="italicstyle">Datum:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="substring(//@IssueInstant,9,2)"/>
+ <xsl:text>.</xsl:text>
+ <xsl:value-of select="substring(//@IssueInstant,6,2)"/>
+ <xsl:text>.</xsl:text>
+ <xsl:value-of select="substring(//@IssueInstant,1,4)"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="italicstyle">Uhrzeit:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="substring(//@IssueInstant,12,2)"/>
+ <xsl:text>:</xsl:text>
+ <xsl:value-of select="substring(//@IssueInstant,15,2)"/>
+ <xsl:text>:</xsl:text>
+ <xsl:value-of select="substring(//@IssueInstant,18,2)"/>
+ </td>
+ </tr>
+ </table>
+ </body>
+ </html>
+ </xsl:template>
+ </xsl:stylesheet>
+ </dsig:Transform>
+ <dsig:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
+ </dsig:Transforms>
+</VerifyTransformsInfoProfile>
diff --git a/id/server/data/deploy/conf/moa-spss/profiles/MOAIDTransformAuthBlockTable_EN.xml b/id/server/data/deploy/conf/moa-spss/profiles/MOAIDTransformAuthBlockTable_EN.xml
new file mode 100644
index 000000000..207296d52
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/profiles/MOAIDTransformAuthBlockTable_EN.xml
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VerifyTransformsInfoProfile xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#">
+ <dsig:Transforms xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
+ <dsig:Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116">
+ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#" exclude-result-prefixes="pr saml">
+ <xsl:output method="xml" xml:space="default"/>
+ <xsl:template match="/" xmlns="http://www.w3.org/1999/xhtml">
+ <html>
+ <head>
+ <title>Signing the authentication data</title>
+ <style type="text/css" media="screen">
+ .normalstyle { font-size: medium; }
+ .italicstyle { font-size: medium; font-style: italic; }
+ .titlestyle{ text-decoration:underline; font-weight:bold; font-family: Verdana; font-size: medium; }
+ .h4style{ font-size: large; font-family: Verdana; }
+ </style>
+ </head>
+ <body>
+ <h4 class="h4style">Authentication Data:</h4>
+ <p class="titlestyle">Personal Data</p>
+ <table class="parameters">
+ <xsl:if test="normalize-space(//@Issuer)">
+ <tr>
+ <td class="italicstyle">Name:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//@Issuer"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="string(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue)">
+ <tr>
+ <td class="italicstyle">Date of Birth:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,9,2)"/>
+ <xsl:text>.</xsl:text>
+ <xsl:value-of select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,6,2)"/>
+ <xsl:text>.</xsl:text>
+ <xsl:value-of select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,1,4)"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='OIDTextualDescription']">
+ <tr>
+ <td class="italicstyle">Role:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='OIDTextualDescription']/saml:AttributeValue"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='MandatorName']">
+ <tr>
+ <td class="italicstyle">Mandate:</td>
+ <td class="normalstyle">
+ <xsl:text>I am also authorized as </xsl:text>
+ <xsl:value-of select="//saml:Attribute[@AttributeName='RepresentationType']/saml:AttributeValue/text()"/>
+ <xsl:text> of </xsl:text>
+ <xsl:value-of select="//saml:Attribute[@AttributeName='MandatorName']/saml:AttributeValue/text()"/>
+ <xsl:if test="//saml:Attribute[@AttributeName='MandatorDateOfBirth']">
+ <xsl:text>, born on </xsl:text>
+ <xsl:value-of select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,9,2)"/>
+ <xsl:text>.</xsl:text>
+ <xsl:value-of select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,6,2)"/>
+ <xsl:text>.</xsl:text>
+ <xsl:value-of select="substring(//saml:Attribute[@AttributeName='MandatorDateOfBirth']/saml:AttributeValue,1,4)"/>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='MandatorDomainIdentifier']">
+ <xsl:text>, </xsl:text>
+ <xsl:value-of select="//saml:Attribute[@AttributeName='MandatorDomainIdentifier']/saml:AttributeValue/text()"/>
+ </xsl:if>
+ <xsl:text>, to act on their behalf.</xsl:text>
+ </td>
+ </tr>
+ </xsl:if>
+ </table>
+ <p class="titlestyle">Application Data</p>
+ <table class="parameters">
+ <tr>
+ <td class="italicstyle">Name:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='oaFriendlyName']/saml:AttributeValue"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="italicstyle">Country:</td>
+ <td class="normalstyle">Austria</td>
+ </tr>
+ </table>
+ <p class="titlestyle">Technical Parameters</p>
+ <table class="parameters">
+ <tr>
+ <td class="italicstyle">URL:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='OA']/saml:AttributeValue"/>
+ </td>
+ </tr>
+ <xsl:if test="//saml:Attribute[@AttributeName='Geschaeftsbereich']">
+ <tr>
+ <td class="italicstyle">Sector:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='Geschaeftsbereich']/saml:AttributeValue"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='IdentityLinkDomainIdentifierType']">
+ <tr>
+ <td class="italicstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='IdentityLinkDomainIdentifierType']"/>:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='wbPK']/saml:AttributeValue/pr:Identification/pr:Type"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='bPK'] or //saml:Attribute[@AttributeName='wbPK']">
+ <tr>
+ <td class="italicstyle">Identifier:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='bPK']/saml:AttributeValue/pr:Identification/pr:Value"/>
+ <xsl:value-of select="//saml:Attribute[@AttributeName='wbPK']/saml:AttributeValue/pr:Identification/pr:Value"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='MandatorWbpk']">
+ <tr>
+ <td class="italicstyle">Identifier of the principal:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='MandatorWbpk']/saml:AttributeValue/text()"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='OIDTextualDescription']">
+ <tr>
+ <td class="italicstyle">OID:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='OID']/saml:AttributeValue"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <xsl:if test="//saml:Attribute[@AttributeName='HPI']">
+ <tr>
+ <td class="italicstyle">HPI:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="//saml:Attribute[@AttributeName='HPI']/saml:AttributeValue"/>
+ </td>
+ </tr>
+ </xsl:if>
+ <tr>
+ <td class="italicstyle">Date:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="substring(//@IssueInstant,9,2)"/>
+ <xsl:text>.</xsl:text>
+ <xsl:value-of select="substring(//@IssueInstant,6,2)"/>
+ <xsl:text>.</xsl:text>
+ <xsl:value-of select="substring(//@IssueInstant,1,4)"/>
+ </td>
+ </tr>
+ <tr>
+ <td class="italicstyle">Time:</td>
+ <td class="normalstyle">
+ <xsl:value-of select="substring(//@IssueInstant,12,2)"/>
+ <xsl:text>:</xsl:text>
+ <xsl:value-of select="substring(//@IssueInstant,15,2)"/>
+ <xsl:text>:</xsl:text>
+ <xsl:value-of select="substring(//@IssueInstant,18,2)"/>
+ </td>
+ </tr>
+ </table>
+ </body>
+ </html>
+ </xsl:template>
+ </xsl:stylesheet>
+ </dsig:Transform>
+ <dsig:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
+ </dsig:Transforms>
+</VerifyTransformsInfoProfile>
diff --git a/id/server/data/deploy/conf/moa-spss/sslKeys/customer1/moa-ssl-kunde1.der b/id/server/data/deploy/conf/moa-spss/sslKeys/customer1/moa-ssl-kunde1.der
new file mode 100644
index 000000000..1851527de
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/sslKeys/customer1/moa-ssl-kunde1.der
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/sslKeys/customer1/moa-ssl-kunde1[pwd=kunde1].p12 b/id/server/data/deploy/conf/moa-spss/sslKeys/customer1/moa-ssl-kunde1[pwd=kunde1].p12
new file mode 100644
index 000000000..314cbc862
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/sslKeys/customer1/moa-ssl-kunde1[pwd=kunde1].p12
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/sslKeys/customer1/trustedServers[pwd=servers].keystore b/id/server/data/deploy/conf/moa-spss/sslKeys/customer1/trustedServers[pwd=servers].keystore
new file mode 100644
index 000000000..bd9765a4c
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/sslKeys/customer1/trustedServers[pwd=servers].keystore
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/sslKeys/customer2/moa-ssl-kunde2.der b/id/server/data/deploy/conf/moa-spss/sslKeys/customer2/moa-ssl-kunde2.der
new file mode 100644
index 000000000..f50aa4d68
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/sslKeys/customer2/moa-ssl-kunde2.der
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/sslKeys/customer2/moa-ssl-kunde2[pwd=kunde2].p12 b/id/server/data/deploy/conf/moa-spss/sslKeys/customer2/moa-ssl-kunde2[pwd=kunde2].p12
new file mode 100644
index 000000000..e5820fdf2
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/sslKeys/customer2/moa-ssl-kunde2[pwd=kunde2].p12
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/sslKeys/customer2/trustedServers[pwd=servers].keystore b/id/server/data/deploy/conf/moa-spss/sslKeys/customer2/trustedServers[pwd=servers].keystore
new file mode 100644
index 000000000..bd9765a4c
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/sslKeys/customer2/trustedServers[pwd=servers].keystore
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/sslKeys/server/moa-ssl-server.der b/id/server/data/deploy/conf/moa-spss/sslKeys/server/moa-ssl-server.der
new file mode 100644
index 000000000..e0f78a82c
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/sslKeys/server/moa-ssl-server.der
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/sslKeys/tomcat/tomcat[pwd=server].keystore b/id/server/data/deploy/conf/moa-spss/sslKeys/tomcat/tomcat[pwd=server].keystore
new file mode 100644
index 000000000..da42549d4
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/sslKeys/tomcat/tomcat[pwd=server].keystore
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/sslKeys/tomcat/trustedClients[pwd=clients].keystore b/id/server/data/deploy/conf/moa-spss/sslKeys/tomcat/trustedClients[pwd=clients].keystore
new file mode 100644
index 000000000..bdc296cf4
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/sslKeys/tomcat/trustedClients[pwd=clients].keystore
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-Qual-01.20011130-20041130.SerNo01f6(SecureSignatureKeypair).cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-Qual-01.20011130-20041130.SerNo01f6(SecureSignatureKeypair).cer
new file mode 100644
index 000000000..d361d919f
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-Qual-01.20011130-20041130.SerNo01f6(SecureSignatureKeypair).cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-Qual-01.20011215-20041215.SerNo021e(SecureSignatureKeypair).cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-Qual-01.20011215-20041215.SerNo021e(SecureSignatureKeypair).cer
new file mode 100644
index 000000000..ad13d7b28
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-Qual-01.20011215-20041215.SerNo021e(SecureSignatureKeypair).cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-Qual-01.20020207-20050207.SerNo0291(SecureSignatureKeypair).cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-Qual-01.20020207-20050207.SerNo0291(SecureSignatureKeypair).cer
new file mode 100644
index 000000000..f9f27442b
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-Qual-01.20020207-20050207.SerNo0291(SecureSignatureKeypair).cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-Qual-01.20020207-20050207.SerNo210d(SecureSignatureKeypair).cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-Qual-01.20020207-20050207.SerNo210d(SecureSignatureKeypair).cer
new file mode 100644
index 000000000..b6f39e354
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-Qual-01.20020207-20050207.SerNo210d(SecureSignatureKeypair).cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-Qual-01.20041201-20141201.SerNoE243(SecureSignatureKeypair).cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-Qual-01.20041201-20141201.SerNoE243(SecureSignatureKeypair).cer
new file mode 100644
index 000000000..f9fef65fc
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-Qual-01.20041201-20141201.SerNoE243(SecureSignatureKeypair).cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-Qual-02.20041203-20141203.SerNoE248(SecureSignatureKeypair).cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-Qual-02.20041203-20141203.SerNoE248(SecureSignatureKeypair).cer
new file mode 100644
index 000000000..36a442b89
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-Qual-02.20041203-20141203.SerNoE248(SecureSignatureKeypair).cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-Qual-03.20080425-20180425.SerNoe694(SecureSignatureKeypair).cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-Qual-03.20080425-20180425.SerNoe694(SecureSignatureKeypair).cer
new file mode 100644
index 000000000..ab9e0cd7d
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-Qual-03.20080425-20180425.SerNoe694(SecureSignatureKeypair).cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-nQual-01-20011201-20041201.SerNo0213(CertifiedKeypair).cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-nQual-01-20011201-20041201.SerNo0213(CertifiedKeypair).cer
new file mode 100644
index 000000000..289fc2198
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-nQual-01-20011201-20041201.SerNo0213(CertifiedKeypair).cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-nQual-01.20010427-20040427.SerNo006f(CertifiedKeypair).cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-nQual-01.20010427-20040427.SerNo006f(CertifiedKeypair).cer
new file mode 100644
index 000000000..b7d4b08a6
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-nQual-01.20010427-20040427.SerNo006f(CertifiedKeypair).cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-nQual-01.20011212-20041212.SerNo0213(CertifiedKeypair).cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-nQual-01.20011212-20041212.SerNo0213(CertifiedKeypair).cer
new file mode 100644
index 000000000..289fc2198
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-nQual-01.20011212-20041212.SerNo0213(CertifiedKeypair).cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-nQual-01.20011212-20041212.SerNo0218(CertifiedKeypair).cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-nQual-01.20011212-20041212.SerNo0218(CertifiedKeypair).cer
new file mode 100644
index 000000000..69de75609
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-nQual-01.20011212-20041212.SerNo0218(CertifiedKeypair).cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-nQual-01.20040326-20070326.SerNo6632(CertifiedKeypair).cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-nQual-01.20040326-20070326.SerNo6632(CertifiedKeypair).cer
new file mode 100644
index 000000000..8c434777e
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-nQual-01.20040326-20070326.SerNo6632(CertifiedKeypair).cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-nQual-01.20041201-20141201.SerNoe242(CertifiedKeypair).cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-nQual-01.20041201-20141201.SerNoe242(CertifiedKeypair).cer
new file mode 100644
index 000000000..efa28178e
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-nQual-01.20041201-20141201.SerNoe242(CertifiedKeypair).cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cer
new file mode 100644
index 000000000..33e776369
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.der b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.der
new file mode 100644
index 000000000..3be7b6a06
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.der
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/EGIZ_Test_CA_-_User.20070829-20140101.SerNo00.cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/EGIZ_Test_CA_-_User.20070829-20140101.SerNo00.cer
new file mode 100644
index 000000000..73553b996
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/EGIZ_Test_CA_-_User.20070829-20140101.SerNo00.cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/a-sign-Premium-Test-Sig-02.20041227-20141201.SerNo00b5ac.cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/a-sign-Premium-Test-Sig-02.20041227-20141201.SerNo00b5ac.cer
new file mode 100644
index 000000000..911640d0e
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/a-sign-Premium-Test-Sig-02.20041227-20141201.SerNo00b5ac.cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/a-sign-TEST-Qual-01a.20041117-20141117.SerNo00da88.cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/a-sign-TEST-Qual-01a.20041117-20141117.SerNo00da88.cer
new file mode 100644
index 000000000..cac44093a
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/a-sign-TEST-Qual-01a.20041117-20141117.SerNo00da88.cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/a-sign-TEST-nQual-01a.20041117-20080630.SerNo00da8b.cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/a-sign-TEST-nQual-01a.20041117-20080630.SerNo00da8b.cer
new file mode 100644
index 000000000..32893db7f
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/a-sign-TEST-nQual-01a.20041117-20080630.SerNo00da8b.cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/mobilkom.A1 Signatur.20040326-20140326.SerNo6646(SecureSignatureKeypair_CertifiedKeypair).cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/mobilkom.A1 Signatur.20040326-20140326.SerNo6646(SecureSignatureKeypair_CertifiedKeypair).cer
new file mode 100644
index 000000000..06b40aa67
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/mobilkom.A1 Signatur.20040326-20140326.SerNo6646(SecureSignatureKeypair_CertifiedKeypair).cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cer
new file mode 100644
index 000000000..7e9fd5b0b
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cer
new file mode 100644
index 000000000..da38ce028
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-Qual-01.20011130-20041130.SerNo01f6(SecureSignatureKeypair).cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-Qual-01.20011130-20041130.SerNo01f6(SecureSignatureKeypair).cer
new file mode 100644
index 000000000..d361d919f
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-Qual-01.20011130-20041130.SerNo01f6(SecureSignatureKeypair).cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-Qual-01.20011215-20041215.SerNo021e(SecureSignatureKeypair).cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-Qual-01.20011215-20041215.SerNo021e(SecureSignatureKeypair).cer
new file mode 100644
index 000000000..ad13d7b28
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-Qual-01.20011215-20041215.SerNo021e(SecureSignatureKeypair).cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-Qual-01.20020207-20050207.SerNo0291(SecureSignatureKeypair).cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-Qual-01.20020207-20050207.SerNo0291(SecureSignatureKeypair).cer
new file mode 100644
index 000000000..f9f27442b
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-Qual-01.20020207-20050207.SerNo0291(SecureSignatureKeypair).cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-Qual-01.20020207-20050207.SerNo210d(SecureSignatureKeypair).cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-Qual-01.20020207-20050207.SerNo210d(SecureSignatureKeypair).cer
new file mode 100644
index 000000000..b6f39e354
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-Qual-01.20020207-20050207.SerNo210d(SecureSignatureKeypair).cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-Qual-01.20041201-20141201.SerNoE243(SecureSignatureKeypair).cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-Qual-01.20041201-20141201.SerNoE243(SecureSignatureKeypair).cer
new file mode 100644
index 000000000..f9fef65fc
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-Qual-01.20041201-20141201.SerNoE243(SecureSignatureKeypair).cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-Qual-02.20041203-20141203.SerNoE248(SecureSignatureKeypair).cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-Qual-02.20041203-20141203.SerNoE248(SecureSignatureKeypair).cer
new file mode 100644
index 000000000..36a442b89
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-Qual-02.20041203-20141203.SerNoE248(SecureSignatureKeypair).cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-Qual-03.20080425-20180425.SerNoe694(SecureSignatureKeypair).cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-Qual-03.20080425-20180425.SerNoe694(SecureSignatureKeypair).cer
new file mode 100644
index 000000000..ab9e0cd7d
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-Qual-03.20080425-20180425.SerNoe694(SecureSignatureKeypair).cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-nQual-01-20011201-20041201.SerNo0213(CertifiedKeypair).cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-nQual-01-20011201-20041201.SerNo0213(CertifiedKeypair).cer
new file mode 100644
index 000000000..289fc2198
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-nQual-01-20011201-20041201.SerNo0213(CertifiedKeypair).cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-nQual-01.20010427-20040427.SerNo006f(CertifiedKeypair).cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-nQual-01.20010427-20040427.SerNo006f(CertifiedKeypair).cer
new file mode 100644
index 000000000..b7d4b08a6
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-nQual-01.20010427-20040427.SerNo006f(CertifiedKeypair).cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-nQual-01.20011212-20041212.SerNo0213(CertifiedKeypair).cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-nQual-01.20011212-20041212.SerNo0213(CertifiedKeypair).cer
new file mode 100644
index 000000000..289fc2198
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-nQual-01.20011212-20041212.SerNo0213(CertifiedKeypair).cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-nQual-01.20011212-20041212.SerNo0218(CertifiedKeypair).cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-nQual-01.20011212-20041212.SerNo0218(CertifiedKeypair).cer
new file mode 100644
index 000000000..69de75609
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-nQual-01.20011212-20041212.SerNo0218(CertifiedKeypair).cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-nQual-01.20040326-20070326.SerNo6632(CertifiedKeypair).cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-nQual-01.20040326-20070326.SerNo6632(CertifiedKeypair).cer
new file mode 100644
index 000000000..8c434777e
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-nQual-01.20040326-20070326.SerNo6632(CertifiedKeypair).cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-nQual-01.20041201-20141201.SerNoe242(CertifiedKeypair).cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-nQual-01.20041201-20141201.SerNoe242(CertifiedKeypair).cer
new file mode 100644
index 000000000..efa28178e
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-nQual-01.20041201-20141201.SerNoe242(CertifiedKeypair).cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cer
new file mode 100644
index 000000000..33e776369
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.der b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.der
new file mode 100644
index 000000000..3be7b6a06
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.der
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/mobilkom.A1 Signatur.20040326-20140326.SerNo6646(SecureSignatureKeypair_CertifiedKeypair).cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/mobilkom.A1 Signatur.20040326-20140326.SerNo6646(SecureSignatureKeypair_CertifiedKeypair).cer
new file mode 100644
index 000000000..06b40aa67
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/mobilkom.A1 Signatur.20040326-20140326.SerNo6646(SecureSignatureKeypair_CertifiedKeypair).cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cer
new file mode 100644
index 000000000..7e9fd5b0b
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cer
new file mode 100644
index 000000000..da38ce028
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungMitTestkarten/EGIZ_Test_CA_-_Signaturdienst.20070829-20140101.SerNo02.cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungMitTestkarten/EGIZ_Test_CA_-_Signaturdienst.20070829-20140101.SerNo02.cer
new file mode 100644
index 000000000..277b6083a
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungMitTestkarten/EGIZ_Test_CA_-_Signaturdienst.20070829-20140101.SerNo02.cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungMitTestkarten/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungMitTestkarten/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cer
new file mode 100644
index 000000000..376d0753f
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungMitTestkarten/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungMitTestkarten/a-sign-corporate-light-02.cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungMitTestkarten/a-sign-corporate-light-02.cer
new file mode 100644
index 000000000..61a7ccb15
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungMitTestkarten/a-sign-corporate-light-02.cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungMitTestkarten/a-sign-corporate-light-03-20051114-20151114.SerNo01AAED.cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungMitTestkarten/a-sign-corporate-light-03-20051114-20151114.SerNo01AAED.cer
new file mode 100644
index 000000000..5171276f4
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungMitTestkarten/a-sign-corporate-light-03-20051114-20151114.SerNo01AAED.cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungOhneTestkarten/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungOhneTestkarten/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cer
new file mode 100644
index 000000000..376d0753f
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungOhneTestkarten/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungOhneTestkarten/a-sign-corporate-light-02.cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungOhneTestkarten/a-sign-corporate-light-02.cer
new file mode 100644
index 000000000..61a7ccb15
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungOhneTestkarten/a-sign-corporate-light-02.cer
Binary files differ
diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungOhneTestkarten/a-sign-corporate-light-03-20051114-20151114.SerNo01AAED.cer b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungOhneTestkarten/a-sign-corporate-light-03-20051114-20151114.SerNo01AAED.cer
new file mode 100644
index 000000000..5171276f4
--- /dev/null
+++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/MOAIDBuergerkartePersonenbindungOhneTestkarten/a-sign-corporate-light-03-20051114-20151114.SerNo01AAED.cer
Binary files differ
diff --git a/id/server/data/deploy/errorpages/errorpage-auth_debug.jsp b/id/server/data/deploy/errorpages/errorpage-auth_debug.jsp
new file mode 100644
index 000000000..8e1e331d6
--- /dev/null
+++ b/id/server/data/deploy/errorpages/errorpage-auth_debug.jsp
@@ -0,0 +1,53 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<%@ page contentType="text/html; charset=UTF-8" %>
+<html>
+<head>
+<title>Ein Fehler ist aufgetreten</title>
+</head>
+<% Throwable exceptionThrown = (Throwable)request.getAttribute("ExceptionThrown");
+ String errorMessage = (String)request.getAttribute("ErrorMessage");
+ String wrongParameters = (String)request.getAttribute("WrongParameters");
+ String logLevel = (String)request.getAttribute("LogLevel");
+%>
+
+<body>
+<h1>Fehler bei der Anmeldung</h1>
+<p>Bei der Anmeldung ist ein Fehler aufgetreten.</p>
+
+<% if (logLevel != null) { %>
+<% if (errorMessage != null) { %>
+<p>
+<%= errorMessage%><br>
+</p>
+<% } %>
+<% if (exceptionThrown != null) { %>
+<p>
+<%= exceptionThrown.getMessage()%>
+</p>
+<% } %>
+<% if (wrongParameters != null) { %>
+<p>Die Angabe der Parameter ist unvollst&auml;ndig.<br></p>
+<b> <%= wrongParameters %> </b><br>
+<p>
+ Beispiele f&uuml;r korrekte Links zur MOA-ID Authentisierung sind:
+</p>
+<p>
+<tt>&lt;a href="https://&lt;MOA-URL&gt;/StartAuthentication?Target=&lt;Gesch&auml;ftsbereich&gt;&amp;OA=&lt;OA-URL&gt;&amp;Template=&lt;Template-URL&gt;&quot;&gt;</tt>
+</p>
+<p>
+<tt>&lt;a href="https://&lt;MOA-URL&gt;/SelectBKU?Target=&lt;Gesch&auml;ftsbereich&gt;&amp;OA=&lt;OA-URL&gt;&amp;Template=&lt;Template-URL&gt;&amp;BKUSelectionTemplate=&lt;BKU-Template-URL&gt;&quot;&gt;</tt>
+</p>
+<p>
+Im Falle einer Applikation aus dem privatwirtschaftlichen Bereich (type="businessService") entf&auml;llt die Angabe des <i>Target</i> Parameters:
+</p>
+<p>
+<tt>&lt;a href="https://&lt;MOA-URL&gt;/StartAuthentication?OA=&lt;OA-URL&gt;&amp;Template=&lt;Template-URL&gt;&quot;&gt;</tt>
+</p>
+<p>
+<tt>&lt;a href="https://&lt;MOA-URL&gt;/SelectBKU?OA=&lt;OA-URL&gt;&amp;Template=&lt;Template-URL&gt;&amp;BKUSelectionTemplate=&lt;BKU-Template-URL&gt;&quot;&gt;</tt>
+</p>
+<p>Die Angabe der Parameter <tt>&quot;Template&quot;</tt> und <tt>&quot;BKUSelectionTemplate&quot;</tt> ist optional.</p>
+<% } %>
+<% } %>
+</body>
+</html> \ No newline at end of file
diff --git a/id/server/data/deploy/errorpages/errorpage-auth_empty.jsp b/id/server/data/deploy/errorpages/errorpage-auth_empty.jsp
new file mode 100644
index 000000000..40739efea
--- /dev/null
+++ b/id/server/data/deploy/errorpages/errorpage-auth_empty.jsp
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<%@ page contentType="text/html; charset=UTF-8" %>
+<html>
+<head>
+<title>Ein Fehler ist aufgetreten</title>
+</head>
+
+<body>
+<h1>Fehler bei der Anmeldung</h1>
+<p>Bei der Anmeldung ist ein Fehler aufgetreten.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/id/server/data/deploy/errorpages/errorpage-proxy_debug.jsp b/id/server/data/deploy/errorpages/errorpage-proxy_debug.jsp
new file mode 100644
index 000000000..8e1e331d6
--- /dev/null
+++ b/id/server/data/deploy/errorpages/errorpage-proxy_debug.jsp
@@ -0,0 +1,53 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<%@ page contentType="text/html; charset=UTF-8" %>
+<html>
+<head>
+<title>Ein Fehler ist aufgetreten</title>
+</head>
+<% Throwable exceptionThrown = (Throwable)request.getAttribute("ExceptionThrown");
+ String errorMessage = (String)request.getAttribute("ErrorMessage");
+ String wrongParameters = (String)request.getAttribute("WrongParameters");
+ String logLevel = (String)request.getAttribute("LogLevel");
+%>
+
+<body>
+<h1>Fehler bei der Anmeldung</h1>
+<p>Bei der Anmeldung ist ein Fehler aufgetreten.</p>
+
+<% if (logLevel != null) { %>
+<% if (errorMessage != null) { %>
+<p>
+<%= errorMessage%><br>
+</p>
+<% } %>
+<% if (exceptionThrown != null) { %>
+<p>
+<%= exceptionThrown.getMessage()%>
+</p>
+<% } %>
+<% if (wrongParameters != null) { %>
+<p>Die Angabe der Parameter ist unvollst&auml;ndig.<br></p>
+<b> <%= wrongParameters %> </b><br>
+<p>
+ Beispiele f&uuml;r korrekte Links zur MOA-ID Authentisierung sind:
+</p>
+<p>
+<tt>&lt;a href="https://&lt;MOA-URL&gt;/StartAuthentication?Target=&lt;Gesch&auml;ftsbereich&gt;&amp;OA=&lt;OA-URL&gt;&amp;Template=&lt;Template-URL&gt;&quot;&gt;</tt>
+</p>
+<p>
+<tt>&lt;a href="https://&lt;MOA-URL&gt;/SelectBKU?Target=&lt;Gesch&auml;ftsbereich&gt;&amp;OA=&lt;OA-URL&gt;&amp;Template=&lt;Template-URL&gt;&amp;BKUSelectionTemplate=&lt;BKU-Template-URL&gt;&quot;&gt;</tt>
+</p>
+<p>
+Im Falle einer Applikation aus dem privatwirtschaftlichen Bereich (type="businessService") entf&auml;llt die Angabe des <i>Target</i> Parameters:
+</p>
+<p>
+<tt>&lt;a href="https://&lt;MOA-URL&gt;/StartAuthentication?OA=&lt;OA-URL&gt;&amp;Template=&lt;Template-URL&gt;&quot;&gt;</tt>
+</p>
+<p>
+<tt>&lt;a href="https://&lt;MOA-URL&gt;/SelectBKU?OA=&lt;OA-URL&gt;&amp;Template=&lt;Template-URL&gt;&amp;BKUSelectionTemplate=&lt;BKU-Template-URL&gt;&quot;&gt;</tt>
+</p>
+<p>Die Angabe der Parameter <tt>&quot;Template&quot;</tt> und <tt>&quot;BKUSelectionTemplate&quot;</tt> ist optional.</p>
+<% } %>
+<% } %>
+</body>
+</html> \ No newline at end of file
diff --git a/id/server/data/deploy/errorpages/errorpage-proxy_empty.jsp b/id/server/data/deploy/errorpages/errorpage-proxy_empty.jsp
new file mode 100644
index 000000000..40739efea
--- /dev/null
+++ b/id/server/data/deploy/errorpages/errorpage-proxy_empty.jsp
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<%@ page contentType="text/html; charset=UTF-8" %>
+<html>
+<head>
+<title>Ein Fehler ist aufgetreten</title>
+</head>
+
+<body>
+<h1>Fehler bei der Anmeldung</h1>
+<p>Bei der Anmeldung ist ein Fehler aufgetreten.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/id/server/data/deploy/templates/LIESMICH_TEMPLATES.txt b/id/server/data/deploy/templates/LIESMICH_TEMPLATES.txt
new file mode 100644
index 000000000..e23ebad6e
--- /dev/null
+++ b/id/server/data/deploy/templates/LIESMICH_TEMPLATES.txt
@@ -0,0 +1,39 @@
+TEMPLATES:
+==========
+Zweck:
+------
+Mithilfe von Templates können Sie das Aussehen der Seiten
+"Auswahl der Bürgerkartenumgebung" sowie "Anmeldung mit Bürgerkarte"
+anpassen. Damit können Sie zusätzliche Hintergrundinformationen (Wozu
+dient die Anmeldung, etc.) zu diesen Seiten hinzufügen und das Layout an
+Ihre sonstigen Anwendungen anpassen.
+
+Wird kein Template mit den Parametern Template und BKUSelectionTemplate
+angegeben, so wird defaultmäßig jew. eine schlichte "neutrale" Variante
+angezeigt.
+
+Bei der Erstellung von Template muss die Form gemäß MOA-ID Dokumentation
+Abschnitt: "Aufruf von MOA-ID" (id-anwendung_1.htm) eingehalten werden.
+
+Templates können Grundsätzlich von jeder HTTP Adresse abgerufen
+werden, d.h. sie können auf einen belibigen Webserver abgelegt werden.
+
+
+Anwendung des Beispiels:
+------------------------
+Wenn Sie keinen anderen Webserver zum Ablegen der Templates verwenden möchten,
+so kann die Webcontainer Fähigkeit von Tomcat für die Ablage der HTML-Templates
+genutzt werden. Ein einfaches Beispiel mit den beiden Templates
+"SampleBKUSelectionTemplate.html" sowie "SampleTemplate.html" findet sich im
+WAR Archiv moaid-templates.war
+
+
+Wenn dieses WAR Archiv in das webapps Verzeichnis von Tomcat gestellt wird, so
+wird diese automatisch entpackt und deployed. In Folge können Sie die Template
+Dateien per Parameter beim Aufruf von MOA-ID angeben.
+
+Beispiel Link mit Einsatz von Template:
+https://localhost:8443/moa-id-auth/SelectBKU?Target=Test-Bereich&OA=https://localhost:8443/&BKUSelectionTemplate=http://localhost:8080/moaid-templates/SampleBKUSelectionTemplate.html&Template=http://localhost:8080/moaid-templates/SampleTemplate.html
+
+
+Sie können diese beiden Templates als Vorlage für eigene Designs verwenden. \ No newline at end of file
diff --git a/id/server/data/deploy/tomcat/catalina.policy b/id/server/data/deploy/tomcat/catalina.policy
new file mode 100644
index 000000000..3df83157d
--- /dev/null
+++ b/id/server/data/deploy/tomcat/catalina.policy
@@ -0,0 +1,244 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// ============================================================================
+// catalina.corepolicy - Security Policy Permissions for Tomcat 5
+//
+// This file contains a default set of security policies to be enforced (by the
+// JVM) when Catalina is executed with the "-security" option. In addition
+// to the permissions granted here, the following additional permissions are
+// granted to the codebase specific to each web application:
+//
+// * Read access to the document root directory
+//
+// $Id: catalina.policy 609451 2008-01-06 22:38:14Z markt $
+// ============================================================================
+
+
+// ========== SYSTEM CODE PERMISSIONS =========================================
+
+
+// These permissions apply to javac
+grant codeBase "file:${java.home}/lib/-" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to all shared system extensions
+grant codeBase "file:${java.home}/jre/lib/ext/-" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to javac when ${java.home] points at $JAVA_HOME/jre
+grant codeBase "file:${java.home}/../lib/-" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to all shared system extensions when
+// ${java.home} points at $JAVA_HOME/jre
+grant codeBase "file:${java.home}/lib/ext/-" {
+ permission java.security.AllPermission;
+};
+
+
+// ========== CATALINA CODE PERMISSIONS =======================================
+
+
+// These permissions apply to the launcher code
+grant codeBase "file:${catalina.home}/bin/commons-launcher.jar" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to the daemon code
+grant codeBase "file:${catalina.home}/bin/commons-daemon.jar" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to the commons-logging API
+grant codeBase "file:${catalina.home}/bin/commons-logging-api-1.1.1.jar" {
+ permission java.security.AllPermission;
+ permission java.io.FilePermission "<<ALL FILES>>", "read,write,execute,delete";
+};
+
+// These permissions apply to the server startup code
+grant codeBase "file:${catalina.home}/bin/bootstrap.jar" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to the JMX server
+grant codeBase "file:${catalina.home}/bin/jmx.jar" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to JULI
+grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
+ permission java.security.AllPermission;
+
+ permission java.util.PropertyPermission "java.util.logging.config.class", "read";
+ permission java.util.PropertyPermission "java.util.logging.config.file", "read";
+ permission java.lang.RuntimePermission "shutdownHooks";
+ permission java.io.FilePermission "${catalina.base}${file.separator}conf${file.separator}logging.properties", "read";
+ permission java.util.PropertyPermission "catalina.base", "read";
+ permission java.util.logging.LoggingPermission "control";
+ permission java.io.FilePermission "${catalina.base}${file.separator}logs", "read, write";
+ permission java.io.FilePermission "${catalina.base}${file.separator}logs${file.separator}*", "read, write";
+
+ permission java.io.FilePermission "<<ALL FILES>>", "read,write,execute,delete";
+
+ permission java.lang.RuntimePermission "getClassLoader";
+ // To enable per context logging configuration, permit read access to the appropriate file.
+ // Be sure that the logging configuration is secure before enabling such access
+ // eg for the examples web application:
+ // permission java.io.FilePermission "${catalina.base}${file.separator}webapps${file.separator}examples${file.separator}WEB-INF${file.separator}classes${file.separator}logging.properties", "read";
+};
+
+// These permissions apply to the servlet API classes
+// and those that are shared across all class loaders
+// located in the "common" directory
+grant codeBase "file:${catalina.home}/common/-" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to the container's core code, plus any additional
+// libraries installed in the "server" directory
+grant codeBase "file:${catalina.home}/server/-" {
+ permission java.security.AllPermission;
+};
+
+// The permissions granted to the balancer WEB-INF/classes and WEB-INF/lib directory
+grant codeBase "file:${catalina.home}/webapps/balancer/-" {
+ permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.util.digester";
+ permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.util.digester.*";
+};
+// ========== WEB APPLICATION PERMISSIONS =====================================
+
+
+// grant codeBase "jar:file:${catalina.home}/webapps/moa-spss/WEB-INF/lib/moa-common-1.4.4.jar!/-" {
+// permission java.lang.FilePermission
+
+//}
+
+// These permissions are granted by default to all web applications
+// In addition, a web application will be given a read FilePermission
+// and JndiPermission for all files and directories in its document root.
+grant {
+ // Required for JNDI lookup of named JDBC DataSource's and
+ // javamail named MimePart DataSource used to send mail
+ permission java.util.PropertyPermission "java.home", "read";
+ permission java.util.PropertyPermission "java. .*", "read";
+ permission java.util.PropertyPermission "javax.sql.*", "read";
+
+ // OS Specific properties to allow read access
+ permission java.util.PropertyPermission "os.name", "read";
+ permission java.util.PropertyPermission "os.version", "read";
+ permission java.util.PropertyPermission "os.arch", "read";
+ permission java.util.PropertyPermission "file.separator", "read";
+ permission java.util.PropertyPermission "path.separator", "read";
+ permission java.util.PropertyPermission "line.separator", "read";
+
+ // JVM properties to allow read access
+ permission java.util.PropertyPermission "java.version", "read";
+ permission java.util.PropertyPermission "java.vendor", "read";
+ permission java.util.PropertyPermission "java.vendor.url", "read";
+ permission java.util.PropertyPermission "java.class.version", "read";
+ permission java.util.PropertyPermission "java.specification.version", "read";
+ permission java.util.PropertyPermission "java.specification.vendor", "read";
+ permission java.util.PropertyPermission "java.specification.name", "read";
+
+ permission java.util.PropertyPermission "java.vm.specification.version", "read";
+ permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
+ permission java.util.PropertyPermission "java.vm.specification.name", "read";
+ permission java.util.PropertyPermission "java.vm.version", "read";
+ permission java.util.PropertyPermission "java.vm.vendor", "read";
+ permission java.util.PropertyPermission "java.vm.name", "read";
+
+ // required for moa id/spss
+ permission java.util.PropertyPermission "*", "read, write";
+
+ // make this finer, directory listing attack is possible, do not permit logging from here
+
+// permission java.io.FilePermission "${catalina.home}/temp/-", "read,write";
+// permission java.io.FilePermission "${catalina.home}/temp", "read,write";
+
+ permission java.io.FilePermission "${catalina.home}/conf/moa-id", "read,write";
+ permission java.io.FilePermission "${catalina.home}/conf/moa-id/-", "read,write";
+ permission java.io.FilePermission "${catalina.home}/conf/moa-spss", "read,write";
+ permission java.io.FilePermission "${catalina.home}/conf/moa-spss/-", "read,write";
+ permission java.io.FilePermission "${catalina.home}/conf/log4j.properties", "read";
+ permission java.io.FilePermission "${catalina.base}${file.separator}conf${file.separator}logging.properties", "read";
+ permission java.util.logging.LoggingPermission "control";
+ permission java.io.FilePermission "${catalina.base}${file.separator}logs", "read, write";
+ permission java.io.FilePermission "${catalina.base}${file.separator}logs${file.separator}*", "read, write";
+
+ permission java.security.SecurityPermission "*";
+
+ permission java.lang.RuntimePermission "*";
+
+ permission java.io.FilePermission "${catalina.home}/webapps/moa-spss/WEB-INF/server-config.wsdd", "read,write";
+ permission java.io.FilePermission "${catalina.home}/webapps/moa-id-auth/WEB-INF/server-config.wsdd", "read,write";
+ permission java.io.FilePermission "client-config.wsdd", "read,write";
+
+ permission java.net.NetPermission "specifyStreamHandler";
+
+ permission java.net.SocketPermission "*", "connect,accept,listen,resolve";
+
+
+
+ // Required for OpenJMX
+ permission java.lang.RuntimePermission "getAttribute";
+
+ // Allow read of JAXP compliant XML parser debug
+ permission java.util.PropertyPermission "jaxp.debug", "read";
+
+ // Precompiled JSPs need access to this package.
+ permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime";
+ permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime.*";
+
+ // Precompiled JSPs need access to this system property.
+ permission java.util.PropertyPermission "org.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER", "read";
+};
+
+
+// You can assign additional permissions to particular web applications by
+// adding additional "grant" entries here, based on the code base for that
+// application, /WEB-INF/classes/, or /WEB-INF/lib/ jar files.
+//
+// Different permissions can be granted to JSP pages, classes loaded from
+// the /WEB-INF/classes/ directory, all jar files in the /WEB-INF/lib/
+// directory, or even to individual jar files in the /WEB-INF/lib/ directory.
+//
+// For instance, assume that the standard "examples" application
+// included a JDBC driver that needed to establish a network connection to the
+// corresponding database and used the scrape taglib to get the weather from
+// the NOAA web server. You might create a "grant" entries like this:
+//
+// The permissions granted to the context root directory apply to JSP pages.
+// grant codeBase "file:${catalina.home}/webapps/examples/-" {
+// permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
+// permission java.net.SocketPermission "*.noaa.gov:80", "connect";
+// };
+//
+// The permissions granted to the context WEB-INF/classes directory
+// grant codeBase "file:${catalina.home}/webapps/examples/WEB-INF/classes/-" {
+// };
+//
+// The permission granted to your JDBC driver
+// grant codeBase "jar:file:${catalina.home}/webapps/examples/WEB-INF/lib/driver.jar!/-" {
+// permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
+// };
+// The permission granted to the scrape taglib
+// grant codeBase "jar:file:${catalina.home}/webapps/examples/WEB-INF/lib/scrape.jar!/-" {
+// permission java.net.SocketPermission "*.noaa.gov:80", "connect";
+// };
+
diff --git a/id/server/data/deploy/tomcat/tomcat-4.1.x/server.mod_jk.xml b/id/server/data/deploy/tomcat/tomcat-4.1.x/server.mod_jk.xml
new file mode 100644
index 000000000..30770b5bf
--- /dev/null
+++ b/id/server/data/deploy/tomcat/tomcat-4.1.x/server.mod_jk.xml
@@ -0,0 +1,162 @@
+<!-- Alternate Example-less Configuration File -->
+<!-- Note that component elements are nested corresponding to their
+ parent-child relationships with each other -->
+<!-- A "Server" is a singleton element that represents the entire JVM,
+ which may contain one or more "Service" instances. The Server
+ listens for a shutdown command on the indicated port.
+
+ Note: A "Server" is not itself a "Container", so you may not
+ define subcomponents such as "Valves" or "Loggers" at this level.
+ -->
+<Server port="8005" shutdown="SHUTDOWN" debug="0">
+ <!-- Uncomment this entry to enable JMX MBeans support -->
+ <!--
+ <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
+ debug="0" port="-1" login="admin" password="admin"/>
+-->
+ <!-- A "Service" is a collection of one or more "Connectors" that share
+ a single "Container" (and therefore the web applications visible
+ within that Container). Normally, that Container is an "Engine",
+ but this is not required.
+
+ Note: A "Service" is not itself a "Container", so you may not
+ define subcomponents such as "Valves" or "Loggers" at this level.
+ -->
+ <!-- Define the Tomcat Stand-Alone Service -->
+ <Service name="Tomcat-Standalone">
+ <!-- A "Connector" represents an endpoint by which requests are received
+ and responses are returned. Each Connector passes requests on to the
+ associated "Container" (normally an Engine) for processing.
+
+ By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
+ You can also enable an SSL HTTP/1.1 Connector on port 8443 by
+ following the instructions below and uncommenting the second Connector
+ entry. SSL support requires the following steps (see the SSL Config
+ HOWTO in the Tomcat 4.0 documentation bundle for more detailed
+ instructions):
+ * Download and install JSSE 1.0.2 or later, and put the JAR files
+ into "$JAVA_HOME/jre/lib/ext".
+ * Execute:
+ %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
+ $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix)
+ with a password value of "changeit" for both the certificate and
+ the keystore itself.
+
+ By default, DNS lookups are enabled when a web application calls
+ request.getRemoteHost(). This can have an adverse impact on
+ performance, so you can disable it by setting the
+ "enableLookups" attribute to "false". When DNS lookups are disabled,
+ request.getRemoteHost() will return the String version of the
+ IP address of the remote client.
+ -->
+ <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
+ <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
+ port="8009" minProcessors="5" maxProcessors="75"
+ enableLookups="true" redirectPort="8443" acceptCount="10" debug="0"
+ connectionTimeout="0" useURIValidationHack="false"
+ protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>
+ <!-- An Engine represents the entry point (within Catalina) that processes
+ every request. The Engine implementation for Tomcat stand alone
+ analyzes the HTTP headers included with the request, and passes them
+ on to the appropriate Host (virtual host). -->
+ <!-- Define the top level container in our container hierarchy -->
+ <Engine name="Standalone" defaultHost="localhost" debug="0">
+ <!-- The request dumper valve dumps useful debugging information about
+ the request headers and cookies that were received, and the response
+ headers and cookies that were sent, for all requests received by
+ this instance of Tomcat. If you care only about requests to a
+ particular virtual host, or a particular application, nest this
+ element inside the corresponding <Host> or <Context> entry instead.
+
+ For a similar mechanism that is portable to all Servlet 2.3
+ containers, check out the "RequestDumperFilter" Filter in the
+ example application (the source for this filter may be found in
+ "$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").
+
+ Request dumping is disabled by default. Uncomment the following
+ element to enable it. -->
+ <!--
+ <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
+ -->
+ <!-- Global logger unless overridden at lower levels -->
+ <Logger className="org.apache.catalina.logger.FileLogger"
+ prefix="catalina_log." suffix=".txt" timestamp="true"/>
+ <!-- Because this Realm is here, an instance will be shared globally -->
+ <Realm className="org.apache.catalina.realm.MemoryRealm" />
+ <!-- Replace the above Realm with one of the following to get a Realm
+ stored in a database and accessed via JDBC -->
+ <!-- Define the default virtual host -->
+ <Host name="localhost" debug="0" appBase="webapps"
+ unpackWARs="true" autoDeploy="true">
+ <!-- Normally, users must authenticate themselves to each web app
+ individually. Uncomment the following entry if you would like
+ a user to be authenticated the first time they encounter a
+ resource protected by a security constraint, and then have that
+ user identity maintained across *all* web applications contained
+ in this virtual host. -->
+ <!--
+ <Valve className="org.apache.catalina.authenticator.SingleSignOn"
+ debug="0"/>
+ -->
+ <!-- Access log processes all requests for this virtual host. By
+ default, log files are created in the "logs" directory relative to
+ $CATALINA_HOME. If you wish, you can specify a different
+ directory with the "directory" attribute. Specify either a relative
+ (to $CATALINA_HOME) or absolute path to the desired directory.
+ -->
+ <Valve className="org.apache.catalina.valves.AccessLogValve"
+ directory="logs" prefix="localhost_access_log."
+ suffix=".txt" pattern="common"/>
+ <!-- Logger shared by all Contexts related to this virtual host. By
+ default (when using FileLogger), log files are created in the "logs"
+ directory relative to $CATALINA_HOME. If you wish, you can specify
+ a different directory with the "directory" attribute. Specify either a
+ relative (to $CATALINA_HOME) or absolute path to the desired
+ directory.-->
+ <Logger className="org.apache.catalina.logger.FileLogger"
+ directory="logs" prefix="localhost_log." suffix=".txt"
+ timestamp="true"/>
+ <!-- Define properties for each web application. This is only needed
+ if you want to set non-default properties, or have web application
+ document roots in places other than the virtual host's appBase
+ directory. -->
+ <!-- Tomcat Root Context -->
+ <!--
+ <Context path="" docBase="ROOT" debug="0"/>
+ -->
+ </Host>
+ </Engine>
+ </Service>
+ <!-- The MOD_WEBAPP connector is used to connect Apache 1.3 with Tomcat 4.0
+ as its servlet container. Please read the README.txt file coming with
+ the WebApp Module distribution on how to build it.
+ (Or check out the "jakarta-tomcat-connectors/webapp" CVS repository)
+
+ To configure the Apache side, you must ensure that you have the
+ "ServerName" and "Port" directives defined in "httpd.conf". Then,
+ lines like these to the bottom of your "httpd.conf" file:
+
+ LoadModule webapp_module libexec/mod_webapp.so
+ WebAppConnection warpConnection warp localhost:8008
+ WebAppDeploy examples warpConnection /examples/
+
+ The next time you restart Apache (after restarting Tomcat, if needed)
+ the connection will be established, and all applications you make
+ visible via "WebAppDeploy" directives can be accessed through Apache.
+ -->
+ <!-- Define an Apache-Connector Service -->
+ <Service name="Tomcat-Apache">
+ <Connector className="org.apache.catalina.connector.warp.WarpConnector"
+ port="8008" minProcessors="5" maxProcessors="75"
+ enableLookups="true" acceptCount="10" debug="0"/>
+ <!-- Replace "localhost" with what your Apache "ServerName" is set to -->
+ <Engine className="org.apache.catalina.connector.warp.WarpEngine"
+ name="Apache" debug="0" appBase="webapps">
+ <!-- Global logger unless overridden at lower levels -->
+ <Logger className="org.apache.catalina.logger.FileLogger"
+ prefix="apache_log." suffix=".txt" timestamp="true"/>
+ <!-- Because this Realm is here, an instance will be shared globally -->
+ <Realm className="org.apache.catalina.realm.MemoryRealm" />
+ </Engine>
+ </Service>
+</Server> \ No newline at end of file
diff --git a/id/server/data/deploy/tomcat/tomcat-4.1.x/server.xml b/id/server/data/deploy/tomcat/tomcat-4.1.x/server.xml
new file mode 100644
index 000000000..b259d2dec
--- /dev/null
+++ b/id/server/data/deploy/tomcat/tomcat-4.1.x/server.xml
@@ -0,0 +1,171 @@
+<!-- Alternate Example-less Configuration File -->
+<!-- Note that component elements are nested corresponding to their
+ parent-child relationships with each other -->
+<!-- A "Server" is a singleton element that represents the entire JVM,
+ which may contain one or more "Service" instances. The Server
+ listens for a shutdown command on the indicated port.
+
+ Note: A "Server" is not itself a "Container", so you may not
+ define subcomponents such as "Valves" or "Loggers" at this level.
+ -->
+<Server port="8005" shutdown="SHUTDOWN" debug="0">
+ <!-- Uncomment this entry to enable JMX MBeans support -->
+ <!--
+ <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
+ debug="0" port="-1" login="admin" password="admin"/>
+-->
+ <!-- A "Service" is a collection of one or more "Connectors" that share
+ a single "Container" (and therefore the web applications visible
+ within that Container). Normally, that Container is an "Engine",
+ but this is not required.
+
+ Note: A "Service" is not itself a "Container", so you may not
+ define subcomponents such as "Valves" or "Loggers" at this level.
+ -->
+ <!-- Define the Tomcat Stand-Alone Service -->
+ <Service name="Tomcat-Standalone">
+ <!-- A "Connector" represents an endpoint by which requests are received
+ and responses are returned. Each Connector passes requests on to the
+ associated "Container" (normally an Engine) for processing.
+
+ By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
+ You can also enable an SSL HTTP/1.1 Connector on port 8443 by
+ following the instructions below and uncommenting the second Connector
+ entry. SSL support requires the following steps (see the SSL Config
+ HOWTO in the Tomcat 4.0 documentation bundle for more detailed
+ instructions):
+ * Download and install JSSE 1.0.2 or later, and put the JAR files
+ into "$JAVA_HOME/jre/lib/ext".
+ * Execute:
+ %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
+ $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix)
+ with a password value of "changeit" for both the certificate and
+ the keystore itself.
+
+ By default, DNS lookups are enabled when a web application calls
+ request.getRemoteHost(). This can have an adverse impact on
+ performance, so you can disable it by setting the
+ "enableLookups" attribute to "false". When DNS lookups are disabled,
+ request.getRemoteHost() will return the String version of the
+ IP address of the remote client.
+ -->
+ <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
+ <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
+ port="8080" minProcessors="5" maxProcessors="75"
+ enableLookups="true" redirectPort="8443" acceptCount="100"
+ debug="0" connectionTimeout="20000" useURIValidationHack="false"
+ disableUploadTimeout="true"/>
+ <!-- Note : To disable connection timeouts, set connectionTimeout value to -1 -->
+ <!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
+ <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
+ port="8443" minProcessors="5" maxProcessors="75"
+ enableLookups="uri" acceptCount="100" debug="0" scheme="https"
+ secure="true" useURIValidationHack="false"
+ disableUploadTimeout="true">
+ <Factory
+ className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory"
+ clientAuth="false" protocol="TLS"/>
+ </Connector>
+ <!-- An Engine represents the entry point (within Catalina) that processes
+ every request. The Engine implementation for Tomcat stand alone
+ analyzes the HTTP headers included with the request, and passes them
+ on to the appropriate Host (virtual host). -->
+ <!-- Define the top level container in our container hierarchy -->
+ <Engine name="Standalone" defaultHost="localhost" debug="0">
+ <!-- The request dumper valve dumps useful debugging information about
+ the request headers and cookies that were received, and the response
+ headers and cookies that were sent, for all requests received by
+ this instance of Tomcat. If you care only about requests to a
+ particular virtual host, or a particular application, nest this
+ element inside the corresponding <Host> or <Context> entry instead.
+
+ For a similar mechanism that is portable to all Servlet 2.3
+ containers, check out the "RequestDumperFilter" Filter in the
+ example application (the source for this filter may be found in
+ "$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").
+
+ Request dumping is disabled by default. Uncomment the following
+ element to enable it. -->
+ <!--
+ <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
+ -->
+ <!-- Global logger unless overridden at lower levels -->
+ <Logger className="org.apache.catalina.logger.FileLogger"
+ prefix="catalina_log." suffix=".txt" timestamp="true"/>
+ <!-- Because this Realm is here, an instance will be shared globally -->
+ <Realm className="org.apache.catalina.realm.MemoryRealm"/>
+ <!-- Define the default virtual host -->
+ <Host name="localhost" debug="0" appBase="webapps"
+ unpackWARs="true" autoDeploy="true">
+ <!-- Normally, users must authenticate themselves to each web app
+ individually. Uncomment the following entry if you would like
+ a user to be authenticated the first time they encounter a
+ resource protected by a security constraint, and then have that
+ user identity maintained across *all* web applications contained
+ in this virtual host. -->
+ <!--
+ <Valve className="org.apache.catalina.authenticator.SingleSignOn"
+ debug="0"/>
+ -->
+ <!-- Access log processes all requests for this virtual host. By
+ default, log files are created in the "logs" directory relative to
+ $CATALINA_HOME. If you wish, you can specify a different
+ directory with the "directory" attribute. Specify either a relative
+ (to $CATALINA_HOME) or absolute path to the desired directory.
+ -->
+ <Valve className="org.apache.catalina.valves.AccessLogValve"
+ directory="logs" prefix="localhost_access_log."
+ suffix=".txt" pattern="common"/>
+ <!-- Logger shared by all Contexts related to this virtual host. By
+ default (when using FileLogger), log files are created in the "logs"
+ directory relative to $CATALINA_HOME. If you wish, you can specify
+ a different directory with the "directory" attribute. Specify either a
+ relative (to $CATALINA_HOME) or absolute path to the desired
+ directory.-->
+ <Logger className="org.apache.catalina.logger.FileLogger"
+ directory="logs" prefix="localhost_log." suffix=".txt"
+ timestamp="true"/>
+ <!-- Define properties for each web application. This is only needed
+ if you want to set non-default properties, or have web application
+ document roots in places other than the virtual host's appBase
+ directory. -->
+ <!-- Tomcat Root Context -->
+ <!--
+ <Context path="" docBase="../moa-id-proxy.war" debug="0"/>
+ -->
+ </Host>
+ </Engine>
+ </Service>
+ <!-- The MOD_WEBAPP connector is used to connect Apache 1.3 with Tomcat 4.0
+ as its servlet container. Please read the README.txt file coming with
+ the WebApp Module distribution on how to build it.
+ (Or check out the "jakarta-tomcat-connectors/webapp" CVS repository)
+
+ To configure the Apache side, you must ensure that you have the
+ "ServerName" and "Port" directives defined in "httpd.conf". Then,
+ lines like these to the bottom of your "httpd.conf" file:
+
+ LoadModule webapp_module libexec/mod_webapp.so
+ WebAppConnection warpConnection warp localhost:8008
+ WebAppDeploy examples warpConnection /examples/
+
+ The next time you restart Apache (after restarting Tomcat, if needed)
+ the connection will be established, and all applications you make
+ visible via "WebAppDeploy" directives can be accessed through Apache.
+ -->
+ <!-- Define an Apache-Connector Service -->
+ <Service name="Tomcat-Apache">
+ <Connector className="org.apache.catalina.connector.warp.WarpConnector"
+ port="8008" minProcessors="5" maxProcessors="75"
+ enableLookups="true" acceptCount="10" debug="0"/>
+ <!-- Replace "localhost" with what your Apache "ServerName" is set to -->
+ <Engine className="org.apache.catalina.connector.warp.WarpEngine"
+ name="Apache" debug="0" appBase="webapps">
+ <!-- Global logger unless overridden at lower levels -->
+ <Logger className="org.apache.catalina.logger.FileLogger"
+ prefix="apache_log." suffix=".txt" timestamp="true"/>
+ <!-- Because this Realm is here, an instance will be shared globally -->
+ <Realm className="org.apache.catalina.realm.MemoryRealm"/>
+ </Engine>
+ </Service>
+</Server> \ No newline at end of file
diff --git a/id/server/data/deploy/tomcat/tomcat-5.0.x/server.mod_jk.xml b/id/server/data/deploy/tomcat/tomcat-5.0.x/server.mod_jk.xml
new file mode 100644
index 000000000..bbc375984
--- /dev/null
+++ b/id/server/data/deploy/tomcat/tomcat-5.0.x/server.mod_jk.xml
@@ -0,0 +1,386 @@
+<!-- Example Server Configuration File -->
+<!-- Note that component elements are nested corresponding to their
+ parent-child relationships with each other -->
+
+<!-- A "Server" is a singleton element that represents the entire JVM,
+ which may contain one or more "Service" instances. The Server
+ listens for a shutdown command on the indicated port.
+
+ Note: A "Server" is not itself a "Container", so you may not
+ define subcomponents such as "Valves" or "Loggers" at this level.
+ -->
+
+<Server port="8005" shutdown="SHUTDOWN" debug="0">
+
+
+ <!-- Comment these entries out to disable JMX MBeans support -->
+ <!-- You may also configure custom components (e.g. Valves/Realms) by
+ including your own mbean-descriptor file(s), and setting the
+ "descriptors" attribute to point to a ';' seperated list of paths
+ (in the ClassLoader sense) of files to add to the default list.
+ e.g. descriptors="/com/myfirm/mypackage/mbean-descriptor.xml"
+ -->
+ <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
+ debug="0"/>
+ <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
+ debug="0"/>
+
+ <!-- Global JNDI resources -->
+ <GlobalNamingResources>
+
+ <!-- Test entry for demonstration purposes -->
+ <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
+
+ <!-- Editable user database that can also be used by
+ UserDatabaseRealm to authenticate users -->
+ <Resource name="UserDatabase" auth="Container"
+ type="org.apache.catalina.UserDatabase"
+ description="User database that can be updated and saved">
+ </Resource>
+ <ResourceParams name="UserDatabase">
+ <parameter>
+ <name>factory</name>
+ <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
+ </parameter>
+ <parameter>
+ <name>pathname</name>
+ <value>conf/tomcat-users.xml</value>
+ </parameter>
+ </ResourceParams>
+
+ </GlobalNamingResources>
+
+ <!-- A "Service" is a collection of one or more "Connectors" that share
+ a single "Container" (and therefore the web applications visible
+ within that Container). Normally, that Container is an "Engine",
+ but this is not required.
+
+ Note: A "Service" is not itself a "Container", so you may not
+ define subcomponents such as "Valves" or "Loggers" at this level.
+ -->
+
+ <!-- Define the Tomcat Stand-Alone Service -->
+ <Service name="Catalina">
+
+ <!-- A "Connector" represents an endpoint by which requests are received
+ and responses are returned. Each Connector passes requests on to the
+ associated "Container" (normally an Engine) for processing.
+
+ By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
+ You can also enable an SSL HTTP/1.1 Connector on port 8443 by
+ following the instructions below and uncommenting the second Connector
+ entry. SSL support requires the following steps (see the SSL Config
+ HOWTO in the Tomcat 5 documentation bundle for more detailed
+ instructions):
+ * If your JDK version 1.3 or prior, download and install JSSE 1.0.2 or
+ later, and put the JAR files into "$JAVA_HOME/jre/lib/ext".
+ * Execute:
+ %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
+ $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix)
+ with a password value of "changeit" for both the certificate and
+ the keystore itself.
+
+ By default, DNS lookups are enabled when a web application calls
+ request.getRemoteHost(). This can have an adverse impact on
+ performance, so you can disable it by setting the
+ "enableLookups" attribute to "false". When DNS lookups are disabled,
+ request.getRemoteHost() will return the String version of the
+ IP address of the remote client.
+ -->
+
+ <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
+ <Connector port="8080"
+ maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
+ enableLookups="false" redirectPort="8443" acceptCount="100"
+ debug="0" connectionTimeout="20000"
+ disableUploadTimeout="true" />
+ <!-- Note : To disable connection timeouts, set connectionTimeout value
+ to 0 -->
+
+ <!-- Note : To use gzip compression you could set the following properties :
+
+ compression="on"
+ compressionMinSize="2048"
+ noCompressionUserAgents="gozilla, traviata"
+ compressableMimeType="text/html,text/xml"
+ -->
+
+ <!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
+ <Connector port="8443"
+ maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
+ enableLookups="false" disableUploadTimeout="true"
+ acceptCount="100" debug="0" scheme="https" secure="true"
+ clientAuth="false" sslProtocol="TLS" />
+
+ <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
+ <Connector port="8009"
+ enableLookups="false" redirectPort="8443" debug="0"
+ protocol="AJP/1.3" />
+
+ <!-- Define a Proxied HTTP/1.1 Connector on port 8082 -->
+ <!-- See proxy documentation for more information about using this. -->
+ <!--
+ <Connector port="8082"
+ maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
+ enableLookups="false"
+ acceptCount="100" debug="0" connectionTimeout="20000"
+ proxyPort="80" disableUploadTimeout="true" />
+ -->
+
+ <!-- An Engine represents the entry point (within Catalina) that processes
+ every request. The Engine implementation for Tomcat stand alone
+ analyzes the HTTP headers included with the request, and passes them
+ on to the appropriate Host (virtual host). -->
+
+ <!-- You should set jvmRoute to support load-balancing via JK/JK2 ie :
+ <Engine name="Standalone" defaultHost="localhost" debug="0" jvmRoute="jvm1">
+ -->
+
+ <!-- Define the top level container in our container hierarchy -->
+ <Engine name="Catalina" defaultHost="localhost" debug="0">
+
+ <!-- The request dumper valve dumps useful debugging information about
+ the request headers and cookies that were received, and the response
+ headers and cookies that were sent, for all requests received by
+ this instance of Tomcat. If you care only about requests to a
+ particular virtual host, or a particular application, nest this
+ element inside the corresponding <Host> or <Context> entry instead.
+
+ For a similar mechanism that is portable to all Servlet 2.4
+ containers, check out the "RequestDumperFilter" Filter in the
+ example application (the source for this filter may be found in
+ "$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").
+
+ Request dumping is disabled by default. Uncomment the following
+ element to enable it. -->
+ <!--
+ <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
+ -->
+
+ <!-- Global logger unless overridden at lower levels -->
+ <Logger className="org.apache.catalina.logger.FileLogger"
+ prefix="catalina_log." suffix=".txt"
+ timestamp="true"/>
+
+ <!-- Because this Realm is here, an instance will be shared globally -->
+
+ <!-- This Realm uses the UserDatabase configured in the global JNDI
+ resources under the key "UserDatabase". Any edits
+ that are performed against this UserDatabase are immediately
+ available for use by the Realm. -->
+ <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
+ debug="0" resourceName="UserDatabase"/>
+
+ <!-- Comment out the old realm but leave here for now in case we
+ need to go back quickly -->
+ <!--
+ <Realm className="org.apache.catalina.realm.MemoryRealm" />
+ -->
+
+ <!-- Replace the above Realm with one of the following to get a Realm
+ stored in a database and accessed via JDBC -->
+
+ <!--
+ <Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
+ driverName="org.gjt.mm.mysql.Driver"
+ connectionURL="jdbc:mysql://localhost/authority"
+ connectionName="test" connectionPassword="test"
+ userTable="users" userNameCol="user_name" userCredCol="user_pass"
+ userRoleTable="user_roles" roleNameCol="role_name" />
+ -->
+
+ <!--
+ <Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
+ driverName="oracle.jdbc.driver.OracleDriver"
+ connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL"
+ connectionName="scott" connectionPassword="tiger"
+ userTable="users" userNameCol="user_name" userCredCol="user_pass"
+ userRoleTable="user_roles" roleNameCol="role_name" />
+ -->
+
+ <!--
+ <Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
+ driverName="sun.jdbc.odbc.JdbcOdbcDriver"
+ connectionURL="jdbc:odbc:CATALINA"
+ userTable="users" userNameCol="user_name" userCredCol="user_pass"
+ userRoleTable="user_roles" roleNameCol="role_name" />
+ -->
+
+ <!-- Define the default virtual host
+ Note: XML Schema validation will not work with Xerces 2.2.
+ -->
+ <Host name="localhost" debug="0" appBase="webapps"
+ unpackWARs="true" autoDeploy="true"
+ xmlValidation="false" xmlNamespaceAware="false">
+
+ <!-- Defines a cluster for this node,
+ By defining this element, means that every manager will be changed.
+ So when running a cluster, only make sure that you have webapps in there
+ that need to be clustered and remove the other ones.
+ A cluster has the following parameters:
+
+ className = the fully qualified name of the cluster class
+
+ name = a descriptive name for your cluster, can be anything
+
+ debug = the debug level, higher means more output
+
+ mcastAddr = the multicast address, has to be the same for all the nodes
+
+ mcastPort = the multicast port, has to be the same for all the nodes
+
+ mcastBindAddr = bind the multicast socket to a specific address
+
+ mcastTTL = the multicast TTL if you want to limit your broadcast
+
+ mcastSoTimeout = the multicast readtimeout
+
+ mcastFrequency = the number of milliseconds in between sending a "I'm alive" heartbeat
+
+ mcastDropTime = the number a milliseconds before a node is considered "dead" if no heartbeat is received
+
+ tcpThreadCount = the number of threads to handle incoming replication requests, optimal would be the same amount of threads as nodes
+
+ tcpListenAddress = the listen address (bind address) for TCP cluster request on this host,
+ in case of multiple ethernet cards.
+ auto means that address becomes
+ InetAddress.getLocalHost().getHostAddress()
+
+ tcpListenPort = the tcp listen port
+
+ tcpSelectorTimeout = the timeout (ms) for the Selector.select() method in case the OS
+ has a wakup bug in java.nio. Set to 0 for no timeout
+
+ printToScreen = true means that managers will also print to std.out
+
+ expireSessionsOnShutdown = true means that
+
+ useDirtyFlag = true means that we only replicate a session after setAttribute,removeAttribute has been called.
+ false means to replicate the session after each request.
+ false means that replication would work for the following piece of code:
+ <%
+ HashMap map = (HashMap)session.getAttribute("map");
+ map.put("key","value");
+ %>
+ replicationMode = can be either 'pooled', 'synchronous' or 'asynchronous'.
+ * Pooled means that the replication happens using several sockets in a synchronous way. Ie, the data gets replicated, then the request return. This is the same as the 'synchronous' setting except it uses a pool of sockets, hence it is multithreaded. This is the fastest and safest configuration. To use this, also increase the nr of tcp threads that you have dealing with replication.
+ * Synchronous means that the thread that executes the request, is also the
+ thread the replicates the data to the other nodes, and will not return until all
+ nodes have received the information.
+ * Asynchronous means that there is a specific 'sender' thread for each cluster node,
+ so the request thread will queue the replication request into a "smart" queue,
+ and then return to the client.
+ The "smart" queue is a queue where when a session is added to the queue, and the same session
+ already exists in the queue from a previous request, that session will be replaced
+ in the queue instead of replicating two requests. This almost never happens, unless there is a
+ large network delay.
+ -->
+ <!--
+ When configuring for clustering, you also add in a valve to catch all the requests
+ coming in, at the end of the request, the session may or may not be replicated.
+ A session is replicated if and only if all the conditions are met:
+ 1. useDirtyFlag is true or setAttribute or removeAttribute has been called AND
+ 2. a session exists (has been created)
+ 3. the request is not trapped by the "filter" attribute
+
+ The filter attribute is to filter out requests that could not modify the session,
+ hence we don't replicate the session after the end of this request.
+ The filter is negative, ie, anything you put in the filter, you mean to filter out,
+ ie, no replication will be done on requests that match one of the filters.
+ The filter attribute is delimited by ;, so you can't escape out ; even if you wanted to.
+
+ filter=".*\.gif;.*\.js;" means that we will not replicate the session after requests with the URI
+ ending with .gif and .js are intercepted.
+
+ The deployer element can be used to deploy apps cluster wide.
+ Currently the deployment only deploys/undeploys to working members in the cluster
+ so no WARs are copied upons startup of a broken node.
+ The deployer watches a directory (watchDir) for WAR files when watchEnabled="true"
+ When a new war file is added the war gets deployed to the local instance,
+ and then deployed to the other instances in the cluster.
+ When a war file is deleted from the watchDir the war is undeployed locally
+ and cluster wide
+ -->
+
+ <!--
+ <Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
+ managerClassName="org.apache.catalina.cluster.session.DeltaManager"
+ expireSessionsOnShutdown="false"
+ useDirtyFlag="true">
+
+ <Membership
+ className="org.apache.catalina.cluster.mcast.McastService"
+ mcastAddr="228.0.0.4"
+ mcastPort="45564"
+ mcastFrequency="500"
+ mcastDropTime="3000"/>
+
+ <Receiver
+ className="org.apache.catalina.cluster.tcp.ReplicationListener"
+ tcpListenAddress="auto"
+ tcpListenPort="4001"
+ tcpSelectorTimeout="100"
+ tcpThreadCount="6"/>
+
+ <Sender
+ className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
+ replicationMode="pooled"/>
+
+ <Valve className="org.apache.catalina.cluster.tcp.ReplicationValve"
+ filter=".*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;"/>
+
+ <Deployer className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
+ tempDir="/tmp/war-temp/"
+ deployDir="/tmp/war-deploy/"
+ watchDir="/tmp/war-listen/"
+ watchEnabled="false"/>
+ </Cluster>
+ -->
+
+
+
+ <!-- Normally, users must authenticate themselves to each web app
+ individually. Uncomment the following entry if you would like
+ a user to be authenticated the first time they encounter a
+ resource protected by a security constraint, and then have that
+ user identity maintained across *all* web applications contained
+ in this virtual host. -->
+ <!--
+ <Valve className="org.apache.catalina.authenticator.SingleSignOn"
+ debug="0"/>
+ -->
+
+ <!-- Access log processes all requests for this virtual host. By
+ default, log files are created in the "logs" directory relative to
+ $CATALINA_HOME. If you wish, you can specify a different
+ directory with the "directory" attribute. Specify either a relative
+ (to $CATALINA_HOME) or absolute path to the desired directory.
+ -->
+ <!--
+ <Valve className="org.apache.catalina.valves.AccessLogValve"
+ directory="logs" prefix="localhost_access_log." suffix=".txt"
+ pattern="common" resolveHosts="false"/>
+ -->
+
+ <!-- Logger shared by all Contexts related to this virtual host. By
+ default (when using FileLogger), log files are created in the "logs"
+ directory relative to $CATALINA_HOME. If you wish, you can specify
+ a different directory with the "directory" attribute. Specify either a
+ relative (to $CATALINA_HOME) or absolute path to the desired
+ directory.-->
+ <Logger className="org.apache.catalina.logger.FileLogger"
+ directory="logs" prefix="localhost_log." suffix=".txt"
+ timestamp="true"/>
+
+ <!-- Tomcat Root Context -->
+ <!--
+ <Context path="" docBase="../webappsProxy" debug="0"/>
+ -->
+
+ </Host>
+
+ </Engine>
+
+ </Service>
+
+</Server>
diff --git a/id/server/data/deploy/tomcat/tomcat-5.0.x/server.xml b/id/server/data/deploy/tomcat/tomcat-5.0.x/server.xml
new file mode 100644
index 000000000..9b86b38ca
--- /dev/null
+++ b/id/server/data/deploy/tomcat/tomcat-5.0.x/server.xml
@@ -0,0 +1,388 @@
+<!-- Example Server Configuration File -->
+<!-- Note that component elements are nested corresponding to their
+ parent-child relationships with each other -->
+
+<!-- A "Server" is a singleton element that represents the entire JVM,
+ which may contain one or more "Service" instances. The Server
+ listens for a shutdown command on the indicated port.
+
+ Note: A "Server" is not itself a "Container", so you may not
+ define subcomponents such as "Valves" or "Loggers" at this level.
+ -->
+
+<Server port="8005" shutdown="SHUTDOWN" debug="0">
+
+
+ <!-- Comment these entries out to disable JMX MBeans support -->
+ <!-- You may also configure custom components (e.g. Valves/Realms) by
+ including your own mbean-descriptor file(s), and setting the
+ "descriptors" attribute to point to a ';' seperated list of paths
+ (in the ClassLoader sense) of files to add to the default list.
+ e.g. descriptors="/com/myfirm/mypackage/mbean-descriptor.xml"
+ -->
+ <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
+ debug="0"/>
+ <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
+ debug="0"/>
+
+ <!-- Global JNDI resources -->
+ <GlobalNamingResources>
+
+ <!-- Test entry for demonstration purposes -->
+ <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
+
+ <!-- Editable user database that can also be used by
+ UserDatabaseRealm to authenticate users -->
+ <Resource name="UserDatabase" auth="Container"
+ type="org.apache.catalina.UserDatabase"
+ description="User database that can be updated and saved">
+ </Resource>
+ <ResourceParams name="UserDatabase">
+ <parameter>
+ <name>factory</name>
+ <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
+ </parameter>
+ <parameter>
+ <name>pathname</name>
+ <value>conf/tomcat-users.xml</value>
+ </parameter>
+ </ResourceParams>
+
+ </GlobalNamingResources>
+
+ <!-- A "Service" is a collection of one or more "Connectors" that share
+ a single "Container" (and therefore the web applications visible
+ within that Container). Normally, that Container is an "Engine",
+ but this is not required.
+
+ Note: A "Service" is not itself a "Container", so you may not
+ define subcomponents such as "Valves" or "Loggers" at this level.
+ -->
+
+ <!-- Define the Tomcat Stand-Alone Service -->
+ <Service name="Catalina">
+
+ <!-- A "Connector" represents an endpoint by which requests are received
+ and responses are returned. Each Connector passes requests on to the
+ associated "Container" (normally an Engine) for processing.
+
+ By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
+ You can also enable an SSL HTTP/1.1 Connector on port 8443 by
+ following the instructions below and uncommenting the second Connector
+ entry. SSL support requires the following steps (see the SSL Config
+ HOWTO in the Tomcat 5 documentation bundle for more detailed
+ instructions):
+ * If your JDK version 1.3 or prior, download and install JSSE 1.0.2 or
+ later, and put the JAR files into "$JAVA_HOME/jre/lib/ext".
+ * Execute:
+ %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
+ $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix)
+ with a password value of "changeit" for both the certificate and
+ the keystore itself.
+
+ By default, DNS lookups are enabled when a web application calls
+ request.getRemoteHost(). This can have an adverse impact on
+ performance, so you can disable it by setting the
+ "enableLookups" attribute to "false". When DNS lookups are disabled,
+ request.getRemoteHost() will return the String version of the
+ IP address of the remote client.
+ -->
+
+ <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
+ <Connector port="8080"
+ maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
+ enableLookups="false" redirectPort="8443" acceptCount="100"
+ debug="0" connectionTimeout="20000"
+ disableUploadTimeout="true" />
+ <!-- Note : To disable connection timeouts, set connectionTimeout value
+ to 0 -->
+
+ <!-- Note : To use gzip compression you could set the following properties :
+
+ compression="on"
+ compressionMinSize="2048"
+ noCompressionUserAgents="gozilla, traviata"
+ compressableMimeType="text/html,text/xml"
+ -->
+
+ <!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
+ <Connector port="8443"
+ maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
+ enableLookups="false" disableUploadTimeout="true"
+ acceptCount="100" debug="0" scheme="https" secure="true"
+ clientAuth="false" sslProtocol="TLS" />
+
+ <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
+ <!--
+ <Connector port="8009"
+ enableLookups="false" redirectPort="8443" debug="0"
+ protocol="AJP/1.3" />
+ -->
+
+ <!-- Define a Proxied HTTP/1.1 Connector on port 8082 -->
+ <!-- See proxy documentation for more information about using this. -->
+ <!--
+ <Connector port="8082"
+ maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
+ enableLookups="false"
+ acceptCount="100" debug="0" connectionTimeout="20000"
+ proxyPort="80" disableUploadTimeout="true" />
+ -->
+
+ <!-- An Engine represents the entry point (within Catalina) that processes
+ every request. The Engine implementation for Tomcat stand alone
+ analyzes the HTTP headers included with the request, and passes them
+ on to the appropriate Host (virtual host). -->
+
+ <!-- You should set jvmRoute to support load-balancing via JK/JK2 ie :
+ <Engine name="Standalone" defaultHost="localhost" debug="0" jvmRoute="jvm1">
+ -->
+
+ <!-- Define the top level container in our container hierarchy -->
+ <Engine name="Catalina" defaultHost="localhost" debug="0">
+
+ <!-- The request dumper valve dumps useful debugging information about
+ the request headers and cookies that were received, and the response
+ headers and cookies that were sent, for all requests received by
+ this instance of Tomcat. If you care only about requests to a
+ particular virtual host, or a particular application, nest this
+ element inside the corresponding <Host> or <Context> entry instead.
+
+ For a similar mechanism that is portable to all Servlet 2.4
+ containers, check out the "RequestDumperFilter" Filter in the
+ example application (the source for this filter may be found in
+ "$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").
+
+ Request dumping is disabled by default. Uncomment the following
+ element to enable it. -->
+ <!--
+ <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
+ -->
+
+ <!-- Global logger unless overridden at lower levels -->
+ <Logger className="org.apache.catalina.logger.FileLogger"
+ prefix="catalina_log." suffix=".txt"
+ timestamp="true"/>
+
+ <!-- Because this Realm is here, an instance will be shared globally -->
+
+ <!-- This Realm uses the UserDatabase configured in the global JNDI
+ resources under the key "UserDatabase". Any edits
+ that are performed against this UserDatabase are immediately
+ available for use by the Realm. -->
+ <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
+ debug="0" resourceName="UserDatabase"/>
+
+ <!-- Comment out the old realm but leave here for now in case we
+ need to go back quickly -->
+ <!--
+ <Realm className="org.apache.catalina.realm.MemoryRealm" />
+ -->
+
+ <!-- Replace the above Realm with one of the following to get a Realm
+ stored in a database and accessed via JDBC -->
+
+ <!--
+ <Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
+ driverName="org.gjt.mm.mysql.Driver"
+ connectionURL="jdbc:mysql://localhost/authority"
+ connectionName="test" connectionPassword="test"
+ userTable="users" userNameCol="user_name" userCredCol="user_pass"
+ userRoleTable="user_roles" roleNameCol="role_name" />
+ -->
+
+ <!--
+ <Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
+ driverName="oracle.jdbc.driver.OracleDriver"
+ connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL"
+ connectionName="scott" connectionPassword="tiger"
+ userTable="users" userNameCol="user_name" userCredCol="user_pass"
+ userRoleTable="user_roles" roleNameCol="role_name" />
+ -->
+
+ <!--
+ <Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
+ driverName="sun.jdbc.odbc.JdbcOdbcDriver"
+ connectionURL="jdbc:odbc:CATALINA"
+ userTable="users" userNameCol="user_name" userCredCol="user_pass"
+ userRoleTable="user_roles" roleNameCol="role_name" />
+ -->
+
+ <!-- Define the default virtual host
+ Note: XML Schema validation will not work with Xerces 2.2.
+ -->
+ <Host name="localhost" debug="0" appBase="webapps"
+ unpackWARs="true" autoDeploy="true"
+ xmlValidation="false" xmlNamespaceAware="false">
+
+ <!-- Defines a cluster for this node,
+ By defining this element, means that every manager will be changed.
+ So when running a cluster, only make sure that you have webapps in there
+ that need to be clustered and remove the other ones.
+ A cluster has the following parameters:
+
+ className = the fully qualified name of the cluster class
+
+ name = a descriptive name for your cluster, can be anything
+
+ debug = the debug level, higher means more output
+
+ mcastAddr = the multicast address, has to be the same for all the nodes
+
+ mcastPort = the multicast port, has to be the same for all the nodes
+
+ mcastBindAddr = bind the multicast socket to a specific address
+
+ mcastTTL = the multicast TTL if you want to limit your broadcast
+
+ mcastSoTimeout = the multicast readtimeout
+
+ mcastFrequency = the number of milliseconds in between sending a "I'm alive" heartbeat
+
+ mcastDropTime = the number a milliseconds before a node is considered "dead" if no heartbeat is received
+
+ tcpThreadCount = the number of threads to handle incoming replication requests, optimal would be the same amount of threads as nodes
+
+ tcpListenAddress = the listen address (bind address) for TCP cluster request on this host,
+ in case of multiple ethernet cards.
+ auto means that address becomes
+ InetAddress.getLocalHost().getHostAddress()
+
+ tcpListenPort = the tcp listen port
+
+ tcpSelectorTimeout = the timeout (ms) for the Selector.select() method in case the OS
+ has a wakup bug in java.nio. Set to 0 for no timeout
+
+ printToScreen = true means that managers will also print to std.out
+
+ expireSessionsOnShutdown = true means that
+
+ useDirtyFlag = true means that we only replicate a session after setAttribute,removeAttribute has been called.
+ false means to replicate the session after each request.
+ false means that replication would work for the following piece of code:
+ <%
+ HashMap map = (HashMap)session.getAttribute("map");
+ map.put("key","value");
+ %>
+ replicationMode = can be either 'pooled', 'synchronous' or 'asynchronous'.
+ * Pooled means that the replication happens using several sockets in a synchronous way. Ie, the data gets replicated, then the request return. This is the same as the 'synchronous' setting except it uses a pool of sockets, hence it is multithreaded. This is the fastest and safest configuration. To use this, also increase the nr of tcp threads that you have dealing with replication.
+ * Synchronous means that the thread that executes the request, is also the
+ thread the replicates the data to the other nodes, and will not return until all
+ nodes have received the information.
+ * Asynchronous means that there is a specific 'sender' thread for each cluster node,
+ so the request thread will queue the replication request into a "smart" queue,
+ and then return to the client.
+ The "smart" queue is a queue where when a session is added to the queue, and the same session
+ already exists in the queue from a previous request, that session will be replaced
+ in the queue instead of replicating two requests. This almost never happens, unless there is a
+ large network delay.
+ -->
+ <!--
+ When configuring for clustering, you also add in a valve to catch all the requests
+ coming in, at the end of the request, the session may or may not be replicated.
+ A session is replicated if and only if all the conditions are met:
+ 1. useDirtyFlag is true or setAttribute or removeAttribute has been called AND
+ 2. a session exists (has been created)
+ 3. the request is not trapped by the "filter" attribute
+
+ The filter attribute is to filter out requests that could not modify the session,
+ hence we don't replicate the session after the end of this request.
+ The filter is negative, ie, anything you put in the filter, you mean to filter out,
+ ie, no replication will be done on requests that match one of the filters.
+ The filter attribute is delimited by ;, so you can't escape out ; even if you wanted to.
+
+ filter=".*\.gif;.*\.js;" means that we will not replicate the session after requests with the URI
+ ending with .gif and .js are intercepted.
+
+ The deployer element can be used to deploy apps cluster wide.
+ Currently the deployment only deploys/undeploys to working members in the cluster
+ so no WARs are copied upons startup of a broken node.
+ The deployer watches a directory (watchDir) for WAR files when watchEnabled="true"
+ When a new war file is added the war gets deployed to the local instance,
+ and then deployed to the other instances in the cluster.
+ When a war file is deleted from the watchDir the war is undeployed locally
+ and cluster wide
+ -->
+
+ <!--
+ <Cluster className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
+ managerClassName="org.apache.catalina.cluster.session.DeltaManager"
+ expireSessionsOnShutdown="false"
+ useDirtyFlag="true">
+
+ <Membership
+ className="org.apache.catalina.cluster.mcast.McastService"
+ mcastAddr="228.0.0.4"
+ mcastPort="45564"
+ mcastFrequency="500"
+ mcastDropTime="3000"/>
+
+ <Receiver
+ className="org.apache.catalina.cluster.tcp.ReplicationListener"
+ tcpListenAddress="auto"
+ tcpListenPort="4001"
+ tcpSelectorTimeout="100"
+ tcpThreadCount="6"/>
+
+ <Sender
+ className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
+ replicationMode="pooled"/>
+
+ <Valve className="org.apache.catalina.cluster.tcp.ReplicationValve"
+ filter=".*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;"/>
+
+ <Deployer className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
+ tempDir="/tmp/war-temp/"
+ deployDir="/tmp/war-deploy/"
+ watchDir="/tmp/war-listen/"
+ watchEnabled="false"/>
+ </Cluster>
+ -->
+
+
+
+ <!-- Normally, users must authenticate themselves to each web app
+ individually. Uncomment the following entry if you would like
+ a user to be authenticated the first time they encounter a
+ resource protected by a security constraint, and then have that
+ user identity maintained across *all* web applications contained
+ in this virtual host. -->
+ <!--
+ <Valve className="org.apache.catalina.authenticator.SingleSignOn"
+ debug="0"/>
+ -->
+
+ <!-- Access log processes all requests for this virtual host. By
+ default, log files are created in the "logs" directory relative to
+ $CATALINA_HOME. If you wish, you can specify a different
+ directory with the "directory" attribute. Specify either a relative
+ (to $CATALINA_HOME) or absolute path to the desired directory.
+ -->
+ <!--
+ <Valve className="org.apache.catalina.valves.AccessLogValve"
+ directory="logs" prefix="localhost_access_log." suffix=".txt"
+ pattern="common" resolveHosts="false"/>
+ -->
+
+ <!-- Logger shared by all Contexts related to this virtual host. By
+ default (when using FileLogger), log files are created in the "logs"
+ directory relative to $CATALINA_HOME. If you wish, you can specify
+ a different directory with the "directory" attribute. Specify either a
+ relative (to $CATALINA_HOME) or absolute path to the desired
+ directory.-->
+ <Logger className="org.apache.catalina.logger.FileLogger"
+ directory="logs" prefix="localhost_log." suffix=".txt"
+ timestamp="true"/>
+
+ <!-- Tomcat Root Context -->
+ <!--
+ <Context path="" docBase="../webappsProxy" debug="0"/>
+ -->
+
+ </Host>
+
+ </Engine>
+
+ </Service>
+
+</Server>
diff --git a/id/server/data/deploy/tomcat/tomcat-util-4.1.27-patched/tomcat-util.jar b/id/server/data/deploy/tomcat/tomcat-util-4.1.27-patched/tomcat-util.jar
new file mode 100644
index 000000000..62c7645b9
--- /dev/null
+++ b/id/server/data/deploy/tomcat/tomcat-util-4.1.27-patched/tomcat-util.jar
Binary files differ
diff --git a/id/server/data/deploy/tomcat/unix/tomcat-start.sh b/id/server/data/deploy/tomcat/unix/tomcat-start.sh
new file mode 100644
index 000000000..6dc0289d5
--- /dev/null
+++ b/id/server/data/deploy/tomcat/unix/tomcat-start.sh
@@ -0,0 +1,28 @@
+#! /bin/bash
+
+export JAVA_HOME= <insert java home directory (no trailing path separator)>
+export CATALINA_HOME= <insert Tomcat 4.1.x home directory (no trailing path separator)>
+export CATALINA_BASE=$CATALINA_HOME
+
+CONFIG_OPT=-Dmoa.id.configuration=$CATALINA_BASE/conf/moa-id/SampleMOAIDConfiguration.xml
+LOGGING_OPT=-Dlog4j.configuration=file:$CATALINA_BASE/conf/moa-id/log4j.properties
+SPSS_OPT=-Dmoa.spss.server.configuration=$CATALINA_BASE/conf/moa-spss/SampleMOASPSSConfiguration.xml
+
+#TRUST_STORE_OPT=-Djavax.net.ssl.trustStore=$CATALINA_BASE/conf/moa-spss/keys/clients/trustedMOAClients-password=changeit.keystore
+#TRUST_STORE_PASS_OPT=-Djavax.net.ssl.trustStorePassword=changeit
+#TRUST_STORE_TYPE_OPT=-Djavax.net.ssl.trustStoreType=jks
+
+export CATALINA_OPTS="$CONFIG_OPT $LOGGING_OPT $SPSS_OPT $TRUST_STORE_OPT $TRUST_STORE_PASS_OPT $TRUST_STORE_TYPE_OPT"
+
+echo CATALINA_HOME: $CATALINA_HOME
+echo CATALINA_BASE: $CATALINA_BASE
+echo CATALINA_OPTS: $CATALINA_OPTS
+
+echo
+echo Moving old log files to logs\backup
+mv logs/*.out logs/backup
+mv logs/*.txt logs/backup
+mv logs/*.log logs/backup
+
+cd $CATALINA_HOME
+./bin/startup.sh
diff --git a/id/server/data/deploy/tomcat/unix/tomcat-stop.sh b/id/server/data/deploy/tomcat/unix/tomcat-stop.sh
new file mode 100644
index 000000000..82e4ffcfe
--- /dev/null
+++ b/id/server/data/deploy/tomcat/unix/tomcat-stop.sh
@@ -0,0 +1,7 @@
+#! /bin/bash
+
+export JAVA_HOME= <insert java home directory (no trailing path separator)>
+export CATALINA_HOME= <insert Tomcat 4.1.x home directory (no trailing path separator)>
+
+cd $CATALINA_HOME
+./bin/shutdown.sh \ No newline at end of file
diff --git a/id/server/data/deploy/tomcat/uriworkermap.properties b/id/server/data/deploy/tomcat/uriworkermap.properties
new file mode 100644
index 000000000..32b4c1f50
--- /dev/null
+++ b/id/server/data/deploy/tomcat/uriworkermap.properties
@@ -0,0 +1,9 @@
+# a sample mod_jk uriworkermap.properties file for mapping
+# MOA-ID-AUTH and MOA-ID-PROXY web service requests to workers
+#
+# omit the mappings you don't need
+
+#/moa-id-auth/*=moaworker
+
+#forward all requests to tomcat (e.g.)
+/*=moaworker \ No newline at end of file
diff --git a/id/server/data/deploy/tomcat/win32/startTomcat.bat b/id/server/data/deploy/tomcat/win32/startTomcat.bat
new file mode 100644
index 000000000..676e52f21
--- /dev/null
+++ b/id/server/data/deploy/tomcat/win32/startTomcat.bat
@@ -0,0 +1,26 @@
+rem ----------------------------------------------------------------------------------------------
+rem Modify these entries according to your needs
+
+rem JDK home directory (no trailing path separator)
+set JAVA_HOME=<jdk home directory>
+
+rem Tomcat home directory (no trailing path separator)
+set CATALINA_HOME=<Tomcat home directory>
+
+rem ----------------------------------------------------------------------------------------------
+
+set CONFIG_OPT_SPSS=-Dmoa.spss.server.configuration=%CATALINA_HOME%/conf/moa-spss/SampleMOASPSSConfiguration.xml
+set CONFIG_OPT_ID=-Dmoa.id.configuration=%CATALINA_HOME%/conf/moa-id/SampleMOAIDConfiguration.xml
+set LOGGING_OPT=-Dlog4j.configuration=file:%CATALINA_HOME%/conf/moa-id/log4j.properties
+
+set PARAMS_MOA=%CONFIG_OPT_SPSS% %CONFIG_OPT_ID% %LOGGING_OPT%
+
+rem set PARAM_TRUST_STORE=-Djavax.net.ssl.trustStore=truststore.jks
+rem set PARAM_TRUST_STORE_PASS=-Djavax.net.ssl.trustStorePassword=changeit
+rem set PARAM_TRUST_STORE_TYPE=-Djavax.net.ssl.trustStoreType=jks
+rem set PARAMS_SSL=%PARAM_TRUST_STORE% %PARAM_TRUST_STORE_PASS% %PARAM_TRUST_STORE_TYPE%
+
+set CATALINA_OPTS=%PARAMS_MOA% %PARAMS_SSL%
+
+cd %CATALINA_HOME%
+bin\catalina.bat start
diff --git a/id/server/data/deploy/tomcat/win32/stopTomcat.bat b/id/server/data/deploy/tomcat/win32/stopTomcat.bat
new file mode 100644
index 000000000..46c1ba570
--- /dev/null
+++ b/id/server/data/deploy/tomcat/win32/stopTomcat.bat
@@ -0,0 +1,13 @@
+rem ----------------------------------------------------------------------------------------------
+rem Modify these entries according to your needs
+
+rem JDK home directory (no trailing path separator)
+set JAVA_HOME=<jdk home directory>
+
+rem Tomcat home directory (no trailing path separator)
+set CATALINA_HOME=<Tomcat home directory>
+
+rem ----------------------------------------------------------------------------------------------
+
+cd %CATALINA_HOME%
+bin\catalina.bat stop
diff --git a/id/server/data/deploy/tomcat/workers.properties b/id/server/data/deploy/tomcat/workers.properties
new file mode 100644
index 000000000..9350ddc77
--- /dev/null
+++ b/id/server/data/deploy/tomcat/workers.properties
@@ -0,0 +1,6 @@
+# a sample workers.properties file defining a single mod_jk worker
+
+worker.list=moaworker
+worker.moaworker.type=ajp13
+worker.moaworker.host=localhost
+worker.moaworker.port=8009
diff --git a/id/server/doc/Architektur ID.vsd b/id/server/doc/Architektur ID.vsd
new file mode 100644
index 000000000..d4678007a
--- /dev/null
+++ b/id/server/doc/Architektur ID.vsd
Binary files differ
diff --git a/id/server/doc/MOA ID 1.x.wsdl b/id/server/doc/MOA ID 1.x.wsdl
new file mode 100644
index 000000000..86c08226a
--- /dev/null
+++ b/id/server/doc/MOA ID 1.x.wsdl
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- edited with XML Spy v4.4 U (http://www.xmlspy.com) by patrick peck (anecon) -->
+<definitions name="MOA" targetNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" xmlns:moa="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/ http://schemas.xmlsoap.org/wsdl/">
+ <import namespace="http://reference.e-government.gv.at/namespace/moa/20020822#" location="MOA-SPSS-1.2.xsd"/>
+ <message name="GetAuthenticationDataInput">
+ <part name="body" element="samlp:Request"/>
+ </message>
+ <message name="GetAuthenticationDataOutput">
+ <part name="body" element="samlp:Response"/>
+ </message>
+ <message name="MOAFault">
+ <part name="body" element="moa:ErrorResponse"/>
+ </message>
+ <portType name="IdentificationPortType">
+ <operation name="getAuthenticationData">
+ <input message="tns:GetAuthenticationDataInput"/>
+ <output message="tns:GetAuthenticationDataOutput"/>
+ <fault name="MOAFault" message="tns:MOAFault"/>
+ </operation>
+ </portType>
+ <binding name="IdentificationBinding" type="tns:IdentificationPortType" xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/soap/ http://schemas.xmlsoap.org/wsdl/soap/">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="getAuthenticationData">
+ <soap:operation soapAction="urn:GetAuthenticationDataAction"/>
+ <input>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </output>
+ <fault name="MOAFault">
+ <soap:fault name="MOAFault" use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </fault>
+ </operation>
+ </binding>
+ <service name="GetAuthenticationDataService">
+ <port name="IdentificationPort" binding="tns:IdentificationBinding">
+ <soap:address location="http://localhost/Identification"/>
+ </port>
+ </service>
+</definitions>
diff --git a/id/server/doc/MOA-ID Feinspezifikation.doc b/id/server/doc/MOA-ID Feinspezifikation.doc
new file mode 100644
index 000000000..e71ffa8e6
--- /dev/null
+++ b/id/server/doc/MOA-ID Feinspezifikation.doc
Binary files differ
diff --git a/id/server/doc/MOA-ID-Configuration-1.5.0.xsd b/id/server/doc/MOA-ID-Configuration-1.5.0.xsd
new file mode 100644
index 000000000..c5d6f0b07
--- /dev/null
+++ b/id/server/doc/MOA-ID-Configuration-1.5.0.xsd
@@ -0,0 +1,642 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns="http://www.buergerkarte.at/namespaces/moaconfig#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.buergerkarte.at/namespaces/moaconfig#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.4.3">
+ <!-- es werden lokale Schemas referenziert für real aufgelöste Schemas bitte ersetzen: http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd -->
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd"/>
+ <xsd:import namespace="http://reference.e-government.gv.at/namespace/persondata/20020228#" schemaLocation="PersonData_20_en_moaWID.xsd"/>
+ <xsd:element name="Configuration">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="LoginType" type="LoginType" default="stateful"/>
+ <xsd:element name="Binding" minOccurs="0">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="full"/>
+ <xsd:enumeration value="userName"/>
+ <xsd:enumeration value="none"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:choice>
+ <xsd:element ref="ParamAuth"/>
+ <xsd:element ref="BasicAuth"/>
+ <xsd:element ref="HeaderAuth"/>
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:simpleType name="LoginType">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="stateless"/>
+ <xsd:enumeration value="stateful"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:element name="ParamAuth">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Parameter" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Parameter">
+ <xsd:complexType>
+ <xsd:attribute name="Name" type="xsd:token" use="required"/>
+ <xsd:attribute name="Value" type="MOAAuthDataType" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="BasicAuth">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="UserID" type="MOAAuthDataType"/>
+ <xsd:element name="Password" type="MOAAuthDataType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="HeaderAuth">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Header" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Header">
+ <xsd:complexType>
+ <xsd:attribute name="Name" type="xsd:token" use="required"/>
+ <xsd:attribute name="Value" type="MOAAuthDataType" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:simpleType name="MOAAuthDataType">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="MOAGivenName"/>
+ <xsd:enumeration value="MOAFamilyName"/>
+ <xsd:enumeration value="MOADateOfBirth"/>
+ <xsd:enumeration value="MOABPK"/>
+ <xsd:enumeration value="MOAWBPK"/>
+ <xsd:enumeration value="MOAPublicAuthority"/>
+ <xsd:enumeration value="MOABKZ"/>
+ <xsd:enumeration value="MOAQualifiedCertificate"/>
+ <xsd:enumeration value="MOAStammzahl"/>
+ <xsd:enumeration value="MOAIdentificationValueType"/>
+ <xsd:enumeration value="MOAIPAddress"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="MOAKeyBoxSelector">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="SecureSignatureKeypair"/>
+ <xsd:enumeration value="CertifiedKeypair"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <!--Konfiguration für Authentisierungs- und Proxy-Komponente und Online-Applikation-->
+ <xsd:element name="MOA-IDConfiguration">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="AuthComponent" type="AuthComponentType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter der Authentisierungs-Komponente</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="ProxyComponent" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Konfigurationsparameter der Proxy-Komponente</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="AuthComponent">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Kommunikation zw. Proxykomponente und Authenttisierungskomponente</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die SOAP-Verbindung von der Proxy-Komponente zur Auth-Komponente (vgl. AuthComponent/MOA-SP/ConnectionParameter)</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="OnlineApplication" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die OA</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="OnlineApplicationType">
+ <xsd:attribute name="publicURLPrefix" type="xsd:anyURI" use="required"/>
+ <xsd:attribute name="keyBoxIdentifier" type="MOAKeyBoxSelector" use="optional" default="SecureSignatureKeypair"/>
+ <xsd:attribute name="type" use="optional" default="publicService">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:NMTOKEN">
+ <xsd:enumeration value="businessService"/>
+ <xsd:enumeration value="publicService"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="calculateHPI" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="friendlyName" type="xsd:string" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ChainingModes" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>spezifiziert den Algorithmus (&quot;pkix&quot; oder &quot;chaining&quot;) für die Zertifikatspfadvalidierung</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="TrustAnchor">
+ <xsd:annotation>
+ <xsd:documentation>ein vom SystemDefaultMode abweichender ChiningMode kann für jeden TrustAnchor gesetzt werden</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="dsig:X509IssuerSerialType">
+ <xsd:attribute name="mode" type="ChainingModeType" use="required"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="systemDefaultMode" type="ChainingModeType" use="optional" default="pkix"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="TrustedCACertificates" type="xsd:anyURI" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>verweist auf ein Verzeichnis, das vertrauenswürdige CA (Zwischen-CA, Wurzel-CA) Zertifikate enthält.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="GenericConfiguration" minOccurs="0" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:attribute name="name" use="required">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="DirectoryCertStoreParameters.RootDir"/>
+ <xsd:enumeration value="AuthenticationSession.TimeOut"/>
+ <xsd:enumeration value="AuthenticationData.TimeOut"/>
+ <xsd:enumeration value="TrustManager.RevocationChecking"/>
+ <xsd:enumeration value="FrontendServlets.EnableHTTPConnection"/>
+ <xsd:enumeration value="FrontendServlets.DataURLPrefix"/>
+ <xsd:enumeration value="AuthenticationServer.KeepAssertion"/>
+ <xsd:enumeration value="AuthenticationServer.WriteAssertionToFile"/>
+ <xsd:enumeration value="AuthenticationServer.SourceID"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="value" type="xsd:string" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="TrustedBKUs" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="BKUURL" type="xsd:anyURI" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:complexType name="AuthComponentType">
+ <xsd:sequence>
+ <xsd:element name="BKUSelection" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterServerAuthType"/>
+ </xsd:sequence>
+ <xsd:attribute name="BKUSelectionAlternative" type="BKUSelectionType" use="optional" default="HTMLComplete"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Templates" type="TemplatesType" minOccurs="0"/>
+ <xsd:element name="SecurityLayer">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Kommunikation mit dem Security-Layer</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="TransformsInfo" type="TransformsInfoType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="MOA-SP">
+ <xsd:annotation>
+ <xsd:documentation>enthält Konfiguratiosnparameter für die Kommunikation mit dem MOA SP Modul</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die SOAP-Verbindung von der AUTH-Komponente zu MOA-SP; das Attribut URL enthält den Endpunkt des Server; wird das Schema &quot;https&quot; verwendet müssen die Kind-Elemente angegeben werden; wird das Schema &quot;http&quot; verwendet dürfen keine Kind-Elemente angegeben werden; wird das Element nicht verwendet dann wird MOA-SP über das API aufgerufen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="VerifyIdentityLink">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Überprüfung der Personenbindung</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="TrustProfileID"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="VerifyAuthBlock">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter für die Überprüfung des AUTH-Blocks</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="TrustProfileID"/>
+ <xsd:element name="VerifyTransformsInfoProfileID" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="IdentityLinkSigners" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Informationen über akzeptierte Signers des IdentityLinks</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="X509SubjectName" type="xsd:string" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>akzeptierte Signer des IdentityLinks werden per X509SubjectName (Kodierung nach RFC 2253) identifiziert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="VerifyInfoboxes" type="VerifyInfoboxesType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Defaultparameter für die Überprüfung weiterer Infoboxen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="ForeignIdentities" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType">
+ <xsd:annotation>
+ <xsd:documentation>Verbindungsparameter zum SZR-Gateway (GetIdentityLink)</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="OnlineMandates" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType">
+ <xsd:annotation>
+ <xsd:documentation>Verbindungsparameter zum Online-Vollmachten-Service</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="TransformsInfoType">
+ <xsd:annotation>
+ <xsd:documentation>das Attribut filename verweist auf eine Datei mit globalem Element TransformsInfo vom Typ sl10:TransformsInfo; diese TransformsInfo werden in den CreateXMLSignatureRequest für die Signatur des AUTH-Blocks inkludiert</xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="filename" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:complexType name="TemplatesType">
+ <xsd:sequence>
+ <xsd:element name="BKUSelectionTemplate" type="TemplateType" minOccurs="0"/>
+ <xsd:element name="Template" type="TemplateType" minOccurs="0"/>
+ <xsd:element name="InputProcessorSignTemplate" type="TemplateType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="TemplateType">
+ <xsd:annotation>
+ <xsd:documentation>das Attribut URL spezifiziert die Lage des Templates</xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="URL" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:complexType name="VerifyInfoboxesType">
+ <xsd:annotation>
+ <xsd:documentation>Verifikation zusätzlicher Infoboxen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="DefaultTrustProfile" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Optionales DefaultTrustprofil für die Überprüfung aller weiteren Infoboxen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="TrustProfileID"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Infobox" type="InfoboxType" minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Parameter für Überprüfung weiterer Infoboxen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="InfoboxType">
+ <xsd:annotation>
+ <xsd:documentation>Parameter zur Überprüfung einzelner Infoboxen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="FriendlyName" type="xsd:string" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>optionalervName, der für Fehlermeldungen verwendet werden soll; z.B.: &quot;Stellvertretungen&quot; für &quot;Mandates&quot;; fehlt dieser Parameter, dann wird das Identifier-Attribut verwendet</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="TrustProfileID" type="xsd:string" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>TrustProfil, das für die Überprüfung der Infobox verwendet werden soll</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="ValidatorClass" type="xsd:string" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Validatorklasse, die für die Prüfung der Infobox verwendet werden soll; muss gesetzt werden, wenn Package- und Klassenname vom Default Package- und Klassennamen abweichen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="SchemaLocations" type="SchemaLocationType" minOccurs="0"/>
+ <xsd:element name="ApplicationSpecificParameters" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Infobox spezifische Parameter, die der jeweiligen Prüfapplikation übergeben werden</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="skip" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ParepSpecificParameters" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Infobox spezifische Parameter, die der Prüfapplikation für berufliche Parteienvertretung übergeben werden. Dies ist logisch Teil der ApplicationSpecificParameters, kann jedoch aufgrund der Strukturierung validierend geparst werden und dadurch wird eine funktionierende Konfiguration bei Programmstart garantiert.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="EnableInfoboxValidator" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Falls Infoboxinhalte für die berufliche Parteienvertretung in der Vollmachten Infobox &quot;mandates&quot; abgelegt werden und Vertretung für berufliche Parteienvertreter aktiviert ist, so kann mit diesem Schalter die Vollmachtsprüfung für normale Vollmachten deaktiviert werden. Damit wird erreicht, dass mittels der Vollmachten Infobox ausschließlich berufliche Parteienvertretung aktiviert ist. Dieser Schalter ist nur für die Vollmachten Infobox &quot;mandates&quot; relevant.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="PartyRepresentation" type="PartyRepresentationType">
+ <xsd:annotation>
+ <xsd:documentation>Eigentlicher Konfigurationsteil für berufliche Parteienvertretung</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="Identifier" type="xsd:string" use="required"/>
+ <xsd:attribute name="required" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideStammzahl" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideIdentityLink" type="xsd:boolean" use="optional" default="false"/>
+ </xsd:complexType>
+ <xsd:complexType name="SchemaLocationType">
+ <xsd:annotation>
+ <xsd:documentation>Spezifiziert die Lage von XML Schemas</xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="Schema" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:attribute name="namespace" type="xsd:anyURI" use="required"/>
+ <xsd:attribute name="schemaLocation" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ProxyComponentType"/>
+ <xsd:complexType name="OnlineApplicationType">
+ <xsd:sequence>
+ <xsd:element name="AuthComponent" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter über die OA, die die Authentisierungs-Komponente betreffen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <!--xsd:element name="IdentificationNumber" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="pr:AbstractSimpleIdentification"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element-->
+ <xsd:element name="IdentificationNumber" minOccurs="0">
+ <xsd:complexType>
+ <xsd:choice>
+ <xsd:element ref="pr:Firmenbuchnummer"/>
+ <xsd:element ref="pr:ZMRzahl"/>
+ <xsd:element ref="pr:Vereinsnummer"/>
+ <xsd:element ref="pr:ERJPZahl"/>
+ <xsd:element name="AnyNumber">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="Identifier" type="xsd:string" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Templates" type="TemplatesType" minOccurs="0"/>
+ <xsd:element name="TransformsInfo" type="TransformsInfoType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="VerifyInfoboxes" type="VerifyInfoboxesType" minOccurs="0"/>
+ </xsd:sequence>
+ <xsd:attribute name="slVersion" use="optional" default="1.1">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="1.1"/>
+ <xsd:enumeration value="1.2"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="provideStammzahl" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideAUTHBlock" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideIdentityLink" type="xsd:boolean" use="optional" default="false"/>
+ <xsd:attribute name="provideCertificate" type="xsd:boolean" use="optional" default="false"/>
+ <!--xsd:element ref="pr:AbstractSimpleIdentification" minOccurs="0" maxOccurs="1"/-->
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ProxyComponent" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter über die OA, die die Proxy-Komponente betreffen</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType">
+ <xsd:annotation>
+ <xsd:documentation>enthält Parameter über die OA, die die Proxy-Komponente betreffen</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="configFileURL" type="xsd:anyURI" use="optional"/>
+ <xsd:attribute name="sessionTimeOut" type="xsd:int" use="optional"/>
+ <xsd:attribute name="loginParameterResolverImpl" type="xsd:string" use="optional"/>
+ <xsd:attribute name="loginParameterResolverConfiguration" type="xsd:string" use="optional"/>
+ <xsd:attribute name="connectionBuilderImpl" type="xsd:string" use="optional"/>
+ </xsd:complexType>
+ </xsd:element>
+ <!--xsd:element ref="pr:CorporateBody" minOccurs="0" maxOccurs="1"/-->
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ConnectionParameterServerAuthType">
+ <xsd:sequence>
+ <xsd:element name="AcceptedServerCertificates" type="xsd:anyURI" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>URL zu einem Verzeichnis, das akzeptierte Server-Zertifikate der TLS-Verbindung enthält (keine CA-Zertifikate)</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="URL" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:complexType name="ConnectionParameterClientAuthType">
+ <xsd:complexContent>
+ <xsd:extension base="ConnectionParameterServerAuthType">
+ <xsd:sequence>
+ <xsd:element name="ClientKeyStore" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>URL zu einem KeyStore, der den privaten Schlüssel, der für die TLS-Client-Authentisierung verwendet wird, enthält</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:anyURI">
+ <xsd:attribute name="password" type="xsd:string" use="optional"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:element name="TrustProfileID" type="xsd:string"/>
+ <xsd:simpleType name="ChainingModeType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="chaining"/>
+ <xsd:enumeration value="pkix"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="BKUSelectionType">
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="HTMLComplete"/>
+ <xsd:enumeration value="HTMLSelect"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:element name="CompatibilityMode" default="false">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:element name="EnableInfoboxValidator" default="true">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:element name="AlwaysShowForm" default="false">
+ <xsd:annotation>
+ <xsd:documentation>Soll nicht nur bei leerer oder standardisierter Vollmacht mit unvollständigen Daten, sondern beispielsweise zu Kontrollzwecken das Eingabeformular immer angezeigt werden, wenn ein Einschreiten durch berufliche Parteienvertretung geschieht so kann dies mittels dieses Schalters veranlasst werden</xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+ </xsd:element>
+ <xsd:complexType name="InputProcessorType">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="template" type="xsd:anyURI" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>Das Attribut spezifiziert die Lage des Templates, welches der InputProcessor zur Darstellung des Eingabeformulars nutzen soll</xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ <xsd:complexType name="PartyRepresentationType">
+ <xsd:sequence>
+ <xsd:element name="InputProcessor" type="InputProcessorType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Default InputProcessor. Konfiguration eines vom Standardprozess abweichenden Verarbeitungsvorgangs bei der beruflichen Parteienvertretung. Der Wert dieses Elements ist der vollständige Klassenname des InputProzessors</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element ref="AlwaysShowForm" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Default Wert für Formularanzeige. Soll nicht nur bei leerer oder standardisierter Vollmacht mit unvollständigen Daten, sondern beispielsweise zu Kontrollzwecken das Eingabeformular zur vervollständigung der Vertretenendaten immer angezeigt werden, wenn ein Einschreiten durch berufliche Parteienvertretung geschieht so kann dies mittels dieses Schalters veranlasst werden</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Default Verbindungsparameter zum SZR-Gateway (für den EGIZ-Demonstrator im internen Netzwerk: https://129.27.142.5:8443/szr-gateway/services/MandateCreation)</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="PartyRepresentative" type="PartyRepresentativeType" minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Falls keine speziellen beruflichen ParteienvertreterInnen definiert sind (Element kommt nicht vor), werden ausschließlich standardisierte Vollmachten mit einer MandateID=&quot;*&quot; akzeptiert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="PartyRepresentativeType">
+ <xsd:sequence>
+ <xsd:element name="InputProcessor" type="InputProcessorType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Konfiguration eines vom Standardprozess abweichenden Verarbeitungsvorgangs bei der beruflichen Parteienvertretung. Der Wert dieses Elements ist der vollständige Klassenname des InputProzessors</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element ref="AlwaysShowForm" minOccurs="0"/>
+ <xsd:element name="ConnectionParameter" type="ConnectionParameterClientAuthType" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Optionale Verbindungsparameter zu speziellem (SZR-)Gateway</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="oid" use="required">
+ <xsd:annotation>
+ <xsd:documentation>OID der Parteienvertretung lt. &quot;Object Identifier der öffentlichen Verwaltung&quot; - Konvention, Empfehlung. Diese ID muss mit der MandateID der übermittelten standardisierten Vollmacht übereinstimmen. Eine Parteienvertretung für standardisierte Vollmachten mit der MandateID &quot;*&quot; muss nicht definiert werden und erlaubt eine allgemeine berufliche Parteienvertretung mit Standardtexten. In anderen Fällen ist eine erlaubte OID mitttels dieses Attributs zu definieren</xsd:documentation>
+ </xsd:annotation>
+ <!--xsd:simpleType>
+ <xsd:restriction/>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="1.2.40.0.10.3.1"/>
+ <xsd:enumeration value="1.2.40.0.10.3.2"/>
+ <xsd:enumeration value="1.2.40.0.10.3.3"/>
+ <xsd:enumeration value="1.2.40.0.10.3.10"/>
+ <xsd:enumeration value="1.2.40.0.10.3.10.IdentifiedVoiceChannel"/>
+ </xsd:restriction>
+ </xsd:simpleType-->
+ </xsd:attribute>
+ <xsd:attribute name="representPhysicalParty" use="optional" default="false">
+ <xsd:annotation>
+ <xsd:documentation>Legt fest, ob berufliche Parteienvertretung für natürliche Personen erlaubt ist</xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="representCorporateParty" use="optional" default="false">
+ <xsd:annotation>
+ <xsd:documentation>Legt fest, ob berufliche Parteienvertretung für juristische Personen erlaubt ist (welche z.B. ein Organwalter nicht vertreten darf und dieser Wert aus diesem Grund dort false sein muss)</xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:boolean"/>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="representationText" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>Beschreibender Text, der an Stelle des Standardtexts bei der Signatur der Anmeldedaten im Falle einer vorliegenden beruflichen Parteienvertretung zur Signatur vorgelegt wird</xsd:documentation>
+ </xsd:annotation>
+ <!--xsd:simpleType>
+ <xsd:restriction/>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="berufsmäßige(r) Parteienvertreter(in) mit Notariatseigenschaft"/>
+ <xsd:enumeration value="berufsmäßige(r) Parteienvertreter(in) mit Rechtsanwaltseigenschaft"/>
+ <xsd:enumeration value="berufsmäßige(r) Parteienvertreter(in) mit Ziviltechnikerinneneigenschaft)"/>
+ <xsd:enumeration value="Organwalter"/>
+ <xsd:enumeration value="Parteienvertreter(in) über einen identifizierten Sprachkanal"/>
+ </xsd:restriction>
+ </xsd:simpleType-->
+ </xsd:attribute>
+ </xsd:complexType>
+</xsd:schema>
diff --git a/id/server/doc/MOA-Testzertifikate.pdf b/id/server/doc/MOA-Testzertifikate.pdf
new file mode 100644
index 000000000..a2c44f2a2
--- /dev/null
+++ b/id/server/doc/MOA-Testzertifikate.pdf
Binary files differ
diff --git a/id/server/doc/MOA-Testzertifikate.vsd b/id/server/doc/MOA-Testzertifikate.vsd
new file mode 100644
index 000000000..c36051c04
--- /dev/null
+++ b/id/server/doc/MOA-Testzertifikate.vsd
Binary files differ
diff --git a/id/server/doc/MOA_ID_1.2_20040315.pdf b/id/server/doc/MOA_ID_1.2_20040315.pdf
new file mode 100644
index 000000000..0c89c2730
--- /dev/null
+++ b/id/server/doc/MOA_ID_1.2_20040315.pdf
Binary files differ
diff --git a/id/server/doc/MOA_ID_1.3_20060315.pdf b/id/server/doc/MOA_ID_1.3_20060315.pdf
new file mode 100644
index 000000000..c9b0d160c
--- /dev/null
+++ b/id/server/doc/MOA_ID_1.3_20060315.pdf
Binary files differ
diff --git a/id/server/doc/MOA_ID_1.4_20070802.pdf b/id/server/doc/MOA_ID_1.4_20070802.pdf
new file mode 100644
index 000000000..a3a2f1177
--- /dev/null
+++ b/id/server/doc/MOA_ID_1.4_20070802.pdf
Binary files differ
diff --git a/id/server/doc/MOA_ID_1.4_Anhang.pdf b/id/server/doc/MOA_ID_1.4_Anhang.pdf
new file mode 100644
index 000000000..0c923666f
--- /dev/null
+++ b/id/server/doc/MOA_ID_1.4_Anhang.pdf
Binary files differ
diff --git a/id/server/doc/OID-1-0-3.pdf b/id/server/doc/OID-1-0-3.pdf
new file mode 100644
index 000000000..4beab3e41
--- /dev/null
+++ b/id/server/doc/OID-1-0-3.pdf
Binary files differ
diff --git a/id/server/doc/bku-auswahl.20030408.pdf b/id/server/doc/bku-auswahl.20030408.pdf
new file mode 100644
index 000000000..39efe315f
--- /dev/null
+++ b/id/server/doc/bku-auswahl.20030408.pdf
Binary files differ
diff --git a/id/server/doc/cs-sstc-schema-assertion-01.xsd b/id/server/doc/cs-sstc-schema-assertion-01.xsd
new file mode 100644
index 000000000..8bc5af147
--- /dev/null
+++ b/id/server/doc/cs-sstc-schema-assertion-01.xsd
@@ -0,0 +1,194 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- edited with XML Spy v3.5 NT (http://www.xmlspy.com) by Phill Hallam-Baker (VeriSign Inc.) -->
+<schema targetNamespace="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified">
+ <import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
+ <annotation>
+ <documentation>
+ Document identifier: cs-sstc-schema-assertion-01
+ Location: http://www.oasis-open.org/committees/security/docs/
+ </documentation>
+ </annotation>
+ <simpleType name="IDType">
+ <restriction base="string"/>
+ </simpleType>
+ <simpleType name="IDReferenceType">
+ <restriction base="string"/>
+ </simpleType>
+ <simpleType name="DecisionType">
+ <restriction base="string">
+ <enumeration value="Permit"/>
+ <enumeration value="Deny"/>
+ <enumeration value="Indeterminate"/>
+ </restriction>
+ </simpleType>
+ <element name="AssertionIDReference" type="saml:IDReferenceType"/>
+ <element name="Assertion" type="saml:AssertionType"/>
+ <complexType name="AssertionType">
+ <sequence>
+ <element ref="saml:Conditions" minOccurs="0"/>
+ <element ref="saml:Advice" minOccurs="0"/>
+ <choice maxOccurs="unbounded">
+ <element ref="saml:Statement"/>
+ <element ref="saml:SubjectStatement"/>
+ <element ref="saml:AuthenticationStatement"/>
+ <element ref="saml:AuthorizationDecisionStatement"/>
+ <element ref="saml:AttributeStatement"/>
+ </choice>
+ <element ref="ds:Signature" minOccurs="0"/>
+ </sequence>
+ <attribute name="MajorVersion" type="integer" use="required"/>
+ <attribute name="MinorVersion" type="integer" use="required"/>
+ <attribute name="AssertionID" type="saml:IDType" use="required"/>
+ <attribute name="Issuer" type="string" use="required"/>
+ <attribute name="IssueInstant" type="dateTime" use="required"/>
+ </complexType>
+ <element name="Conditions" type="saml:ConditionsType"/>
+ <complexType name="ConditionsType">
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element ref="saml:AudienceRestrictionCondition"/>
+ <element ref="saml:Condition"/>
+ </choice>
+ <attribute name="NotBefore" type="dateTime" use="optional"/>
+ <attribute name="NotOnOrAfter" type="dateTime" use="optional"/>
+ </complexType>
+ <element name="Condition" type="saml:ConditionAbstractType"/>
+ <complexType name="ConditionAbstractType" abstract="true"/>
+ <element name="AudienceRestrictionCondition" type="saml:AudienceRestrictionConditionType"/>
+ <complexType name="AudienceRestrictionConditionType">
+ <complexContent>
+ <extension base="saml:ConditionAbstractType">
+ <sequence>
+ <element ref="saml:Audience" maxOccurs="unbounded"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="Audience" type="anyURI"/>
+ <element name="Advice" type="saml:AdviceType"/>
+ <complexType name="AdviceType">
+ <choice minOccurs="0" maxOccurs="unbounded">
+ <element ref="saml:AssertionIDReference"/>
+ <element ref="saml:Assertion"/>
+ <any namespace="##other" processContents="lax"/>
+ </choice>
+ </complexType>
+ <element name="Statement" type="saml:StatementAbstractType"/>
+ <complexType name="StatementAbstractType" abstract="true"/>
+ <element name="SubjectStatement" type="saml:SubjectStatementAbstractType"/>
+ <complexType name="SubjectStatementAbstractType" abstract="true">
+ <complexContent>
+ <extension base="saml:StatementAbstractType">
+ <sequence>
+ <element ref="saml:Subject"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="Subject" type="saml:SubjectType"/>
+ <complexType name="SubjectType">
+ <choice>
+ <sequence>
+ <element ref="saml:NameIdentifier"/>
+ <element ref="saml:SubjectConfirmation" minOccurs="0"/>
+ </sequence>
+ <element ref="saml:SubjectConfirmation"/>
+ </choice>
+ </complexType>
+ <element name="NameIdentifier" type="saml:NameIdentifierType"/>
+ <complexType name="NameIdentifierType">
+ <simpleContent>
+ <extension base="string">
+ <attribute name="NameQualifier" type="string" use="optional"/>
+ <attribute name="Format" type="anyURI" use="optional"/>
+ </extension>
+ </simpleContent>
+ </complexType>
+ <element name="SubjectConfirmation" type="saml:SubjectConfirmationType"/>
+ <complexType name="SubjectConfirmationType">
+ <sequence>
+ <element ref="saml:ConfirmationMethod" maxOccurs="unbounded"/>
+ <element ref="saml:SubjectConfirmationData" minOccurs="0"/>
+ <element ref="ds:KeyInfo" minOccurs="0"/>
+ </sequence>
+ </complexType>
+ <element name="SubjectConfirmationData" type="anyType"/>
+ <element name="ConfirmationMethod" type="anyURI"/>
+ <element name="AuthenticationStatement" type="saml:AuthenticationStatementType"/>
+ <complexType name="AuthenticationStatementType">
+ <complexContent>
+ <extension base="saml:SubjectStatementAbstractType">
+ <sequence>
+ <element ref="saml:SubjectLocality" minOccurs="0"/>
+ <element ref="saml:AuthorityBinding" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="AuthenticationMethod" type="anyURI" use="required"/>
+ <attribute name="AuthenticationInstant" type="dateTime" use="required"/>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="SubjectLocality" type="saml:SubjectLocalityType"/>
+ <complexType name="SubjectLocalityType">
+ <attribute name="IPAddress" type="string" use="optional"/>
+ <attribute name="DNSAddress" type="string" use="optional"/>
+ </complexType>
+ <element name="AuthorityBinding" type="saml:AuthorityBindingType"/>
+ <complexType name="AuthorityBindingType">
+ <attribute name="AuthorityKind" type="QName" use="required"/>
+ <attribute name="Location" type="anyURI" use="required"/>
+ <attribute name="Binding" type="anyURI" use="required"/>
+ </complexType>
+ <element name="AuthorizationDecisionStatement" type="saml:AuthorizationDecisionStatementType"/>
+ <complexType name="AuthorizationDecisionStatementType">
+ <complexContent>
+ <extension base="saml:SubjectStatementAbstractType">
+ <sequence>
+ <element ref="saml:Action" maxOccurs="unbounded"/>
+ <element ref="saml:Evidence" minOccurs="0"/>
+ </sequence>
+ <attribute name="Resource" type="anyURI" use="required"/>
+ <attribute name="Decision" type="saml:DecisionType" use="required"/>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="Action" type="saml:ActionType"/>
+ <complexType name="ActionType">
+ <simpleContent>
+ <extension base="string">
+ <attribute name="Namespace" type="anyURI"/>
+ </extension>
+ </simpleContent>
+ </complexType>
+ <element name="Evidence" type="saml:EvidenceType"/>
+ <complexType name="EvidenceType">
+ <choice maxOccurs="unbounded">
+ <element ref="saml:AssertionIDReference"/>
+ <element ref="saml:Assertion"/>
+ </choice>
+ </complexType>
+ <element name="AttributeStatement" type="saml:AttributeStatementType"/>
+ <complexType name="AttributeStatementType">
+ <complexContent>
+ <extension base="saml:SubjectStatementAbstractType">
+ <sequence>
+ <element ref="saml:Attribute" maxOccurs="unbounded"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="AttributeDesignator" type="saml:AttributeDesignatorType"/>
+ <complexType name="AttributeDesignatorType">
+ <attribute name="AttributeName" type="string" use="required"/>
+ <attribute name="AttributeNamespace" type="anyURI" use="required"/>
+ </complexType>
+ <element name="Attribute" type="saml:AttributeType"/>
+ <complexType name="AttributeType">
+ <complexContent>
+ <extension base="saml:AttributeDesignatorType">
+ <sequence>
+ <element ref="saml:AttributeValue" maxOccurs="unbounded"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="AttributeValue" type="anyType"/>
+</schema>
diff --git a/id/server/doc/cs-sstc-schema-protocol-01.xsd b/id/server/doc/cs-sstc-schema-protocol-01.xsd
new file mode 100644
index 000000000..ecad05b0f
--- /dev/null
+++ b/id/server/doc/cs-sstc-schema-protocol-01.xsd
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- edited with XML Spy v4.2 U (http://www.xmlspy.com) by Phillip Hallam-Baker (Phillip Hallam-Baker) -->
+<schema targetNamespace="urn:oasis:names:tc:SAML:1.0:protocol" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified">
+ <import namespace="urn:oasis:names:tc:SAML:1.0:assertion" schemaLocation="cs-sstc-schema-assertion-01.xsd"/>
+ <import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
+ <annotation>
+ <documentation>
+ Document identifier: cs-sstc-schema-protocol-01
+ Location: http://www.oasis-open.org/committees/security/docs/
+ </documentation>
+ </annotation>
+ <complexType name="RequestAbstractType" abstract="true">
+ <sequence>
+ <element ref="samlp:RespondWith" minOccurs="0" maxOccurs="unbounded"/>
+ <element ref="ds:Signature" minOccurs="0"/>
+ </sequence>
+ <attribute name="RequestID" type="saml:IDType" use="required"/>
+ <attribute name="MajorVersion" type="integer" use="required"/>
+ <attribute name="MinorVersion" type="integer" use="required"/>
+ <attribute name="IssueInstant" type="dateTime" use="required"/>
+ </complexType>
+ <element name="RespondWith" type="QName"/>
+ <element name="Request" type="samlp:RequestType"/>
+ <complexType name="RequestType">
+ <complexContent>
+ <extension base="samlp:RequestAbstractType">
+ <choice>
+ <element ref="samlp:Query"/>
+ <element ref="samlp:SubjectQuery"/>
+ <element ref="samlp:AuthenticationQuery"/>
+ <element ref="samlp:AttributeQuery"/>
+ <element ref="samlp:AuthorizationDecisionQuery"/>
+ <element ref="saml:AssertionIDReference" maxOccurs="unbounded"/>
+ <element ref="samlp:AssertionArtifact" maxOccurs="unbounded"/>
+ </choice>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="AssertionArtifact" type="string"/>
+ <element name="Query" type="samlp:QueryAbstractType"/>
+ <complexType name="QueryAbstractType" abstract="true"/>
+ <element name="SubjectQuery" type="samlp:SubjectQueryAbstractType"/>
+ <complexType name="SubjectQueryAbstractType" abstract="true">
+ <complexContent>
+ <extension base="samlp:QueryAbstractType">
+ <sequence>
+ <element ref="saml:Subject"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="AuthenticationQuery" type="samlp:AuthenticationQueryType"/>
+ <complexType name="AuthenticationQueryType">
+ <complexContent>
+ <extension base="samlp:SubjectQueryAbstractType">
+ <attribute name="AuthenticationMethod" type="anyURI"/>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="AttributeQuery" type="samlp:AttributeQueryType"/>
+ <complexType name="AttributeQueryType">
+ <complexContent>
+ <extension base="samlp:SubjectQueryAbstractType">
+ <sequence>
+ <element ref="saml:AttributeDesignator" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="Resource" type="anyURI" use="optional"/>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="AuthorizationDecisionQuery" type="samlp:AuthorizationDecisionQueryType"/>
+ <complexType name="AuthorizationDecisionQueryType">
+ <complexContent>
+ <extension base="samlp:SubjectQueryAbstractType">
+ <sequence>
+ <element ref="saml:Action" maxOccurs="unbounded"/>
+ <element ref="saml:Evidence" minOccurs="0" maxOccurs="1"/>
+ </sequence>
+ <attribute name="Resource" type="anyURI" use="required"/>
+ </extension>
+ </complexContent>
+ </complexType>
+ <complexType name="ResponseAbstractType" abstract="true">
+ <sequence>
+ <element ref="ds:Signature" minOccurs="0"/>
+ </sequence>
+ <attribute name="ResponseID" type="saml:IDType" use="required"/>
+ <attribute name="InResponseTo" type="saml:IDReferenceType" use="optional"/>
+ <attribute name="MajorVersion" type="integer" use="required"/>
+ <attribute name="MinorVersion" type="integer" use="required"/>
+ <attribute name="IssueInstant" type="dateTime" use="required"/>
+ <attribute name="Recipient" type="anyURI" use="optional"/>
+ </complexType>
+ <element name="Response" type="samlp:ResponseType"/>
+ <complexType name="ResponseType">
+ <complexContent>
+ <extension base="samlp:ResponseAbstractType">
+ <sequence>
+ <element ref="samlp:Status"/>
+ <element ref="saml:Assertion" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="Status" type="samlp:StatusType"/>
+ <complexType name="StatusType">
+ <sequence>
+ <element ref="samlp:StatusCode"/>
+ <element ref="samlp:StatusMessage" minOccurs="0" maxOccurs="1"/>
+ <element ref="samlp:StatusDetail" minOccurs="0"/>
+ </sequence>
+ </complexType>
+ <element name="StatusCode" type="samlp:StatusCodeType"/>
+ <complexType name="StatusCodeType">
+ <sequence>
+ <element ref="samlp:StatusCode" minOccurs="0"/>
+ </sequence>
+ <attribute name="Value" type="QName" use="required"/>
+ </complexType>
+ <element name="StatusMessage" type="string"/>
+ <element name="StatusDetail" type="samlp:StatusDetailType"/>
+ <complexType name="StatusDetailType">
+ <sequence>
+ <any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+</schema>
diff --git a/id/server/doc/moa-id.htm b/id/server/doc/moa-id.htm
new file mode 100644
index 000000000..82e5adc19
--- /dev/null
+++ b/id/server/doc/moa-id.htm
@@ -0,0 +1,7 @@
+<html>
+<head>
+<meta http-equiv="refresh" content="0; URL=moa_id/moa.htm"/>
+
+</head>
+<body></body>
+</html> \ No newline at end of file
diff --git a/id/server/doc/moa_id/examples/BKUSelectionTemplate.html b/id/server/doc/moa_id/examples/BKUSelectionTemplate.html
new file mode 100644
index 000000000..5536226a8
--- /dev/null
+++ b/id/server/doc/moa_id/examples/BKUSelectionTemplate.html
@@ -0,0 +1,52 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>MOA ID - Auswahl der B&uuuml;rgerkartenumgebung</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta name="Author" content="Max Mustermann">
+ <meta name="keywords" content="MOA-ID">
+ <link rel="stylesheet" type="text/css" href="/moaid-templates/css/main.css">
+ <link rel="stylesheet" type="text/css" href="/moaid-templates/css/display.css" media="screen,projection,tv,handheld">
+</head>
+
+<body>
+<img src="/moaid-templates/SampleLogo.gif" alt='Organisation XY'>
+<h1 align="center">Auswahl der B&uuml;rgerkartenumgebung</h1>
+<p></p>
+<p>Sie haben sich f&uuml;r Anmeldung mit Ihrer B&uuml;rgerkarte entschieden. Da es verschiedene Formen der B&uuml;rgerkarte gibt, m&uuml;ssen Sie nun w&auml;hlen, welche Sie bei der Anmeldung verwenden wollen.</p>
+<h3>Auswahl der B&uuml;rgerkarte</h3>
+<form name="CustomizedForm" method="post" action="<StartAuth>">
+ <BKUSelect>
+ <input type="submit" value="Ausw&auml;hlen"/>
+</form>
+<br/>
+<p></p>
+
+ <input type="hidden" value="Weitere Info"/>
+</form>
+
+<h4>Hinweise: </h4>
+<ul>
+ <li>
+ <p>Wollen Sie eine A-Trust B&uuml;rgerkarte erwerben? Hier finden Sie Informationen
+ dazu: <a href="http://www.a-trust.at/info.asp?node=337" target="_blank">A-Trust
+ B&uuml;rgerkarte.</a> Bei der Anmeldung mit der A-Trust B&uuml;rgerkarte
+ ben&ouml;tigen Sie eine funktionsf&auml;hige B&uuml;rgerkartensoftware sowie
+ einen passenden Kartenleser.</p>
+ </li>
+ <li>
+ <p>Wollen Sie ein A1-Signatur erwerben? Wenden Sie sich an 0800-664 680 um
+ Informationen zur A1-Signatur zu erhalten.
+ Hier finden Sie ebenfalls Informationen dazu: <a href="http://www.a1.net/signatur" target="_blank">A1-Signatur</a>.
+ Bei der Anmeldung mit der A1-Signatur wird keine B&uuml;rgerkartensoftware und
+ kein Kartenleser ben&ouml;tigt.</p>
+ </li>
+</ul>
+<div align="right"><a href="http://validator.w3.org/check?uri=http://localhost:8080/moaid-templates/SampleBKUSElectionTemplate.html"><img border="0"
+ src="/moaid-templates/valid-html401.gif"
+ alt="Valid HTML 4.01!" height="31" width="88"></a> </div>
+<p align="right">&nbsp; </p>
+
+
+</body>
+</html>
diff --git a/id/server/doc/moa_id/examples/ChainingModes.txt b/id/server/doc/moa_id/examples/ChainingModes.txt
new file mode 100644
index 000000000..820b60d06
--- /dev/null
+++ b/id/server/doc/moa_id/examples/ChainingModes.txt
@@ -0,0 +1,6 @@
+ <ChainingModes systemDefaultMode="pkix">
+ <TrustAnchor mode="chaining">
+ <dsig:X509IssuerName>CN=A-Trust-nQual-0,OU=A-Trust-nQual-0,O=A-Trust,C=AT</dsig:X509IssuerName>
+ <dsig:X509SerialNumber>536</dsig:X509SerialNumber>
+ </TrustAnchor>
+ </ChainingModes>
diff --git a/id/server/doc/moa_id/examples/IdentityLinkSigners.txt b/id/server/doc/moa_id/examples/IdentityLinkSigners.txt
new file mode 100644
index 000000000..15269ad79
--- /dev/null
+++ b/id/server/doc/moa_id/examples/IdentityLinkSigners.txt
@@ -0,0 +1,9 @@
+ <!-- Gueltige Signatoren des IdentityLink, der von der Buergerkarte gelesen wird -->
+ <IdentityLinkSigners>
+ <!-- Personenbindung alt (Ausgabe vor 05.2004) -->
+ <X509SubjectName>CN=zmr,OU=BMI-IV-2,O=BMI,C=AT</X509SubjectName>
+ <!-- Personenbindung neu (ab 05.2004, mit Stammzahl) mit Typo -->
+ <X509SubjectName>T=Dr.,CN=Nikolaus Schwab,O=BM f. Inneres i.A. des gf. Mitgieds der Datenschutzkommission</X509SubjectName>
+ <!-- Personenbindung neu (ab 05.2004, mit Stammzahl) jedoch ohne Typo -->
+ <X509SubjectName>T=Dr.,CN=Nikolaus Schwab,O=BM f. Inneres i.A. des gf. Mitglieds der Datenschutzkommission</X509SubjectName>
+ </IdentityLinkSigners> \ No newline at end of file
diff --git a/id/server/doc/moa_id/examples/LoginServletExample.txt b/id/server/doc/moa_id/examples/LoginServletExample.txt
new file mode 100644
index 000000000..587ef5e97
--- /dev/null
+++ b/id/server/doc/moa_id/examples/LoginServletExample.txt
@@ -0,0 +1,171 @@
+import java.io.IOException;
+import java.util.Vector;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.rpc.Call;
+import javax.xml.rpc.Service;
+import javax.xml.rpc.ServiceFactory;
+
+import org.apache.axis.message.SOAPBodyElement;
+import org.apache.xml.serialize.LineSeparator;
+import org.apache.xml.serialize.OutputFormat;
+import org.apache.xml.serialize.XMLSerializer;
+import org.jaxen.JaxenException;
+import org.jaxen.SimpleNamespaceContext;
+import org.jaxen.dom.DOMXPath;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * Beispiel für ein Login-Servlet, das von MOA-ID-AUTH über einen Redirect aufgerufen wird.
+ * Es werden demonstriert:
+ * - Parameterübergabe von MOA-ID-AUTH
+ * - Aufruf des MOA-ID-AUTH Web Service zum Abholen der Anmeldedaten über das Apache Axis Framework
+ * - Parsen der Anmeldedaten mittels der XPath Engine "Jaxen"
+ * - Speichern der Anmeldedaten in der HTTPSession
+ * - Redirect auf die eigentliche Startseite der OA
+ *
+ * @author Paul Ivancsics
+ */
+public class LoginServletExample extends HttpServlet {
+
+ // Web Service QName und Endpoint
+ private static final QName SERVICE_QNAME = new QName("GetAuthenticationData");
+ private static final String ENDPOINT =
+ "http://localhost:8080/moa-id-auth/services/GetAuthenticationData";
+ // NamespaceContext für Jaxen
+ private static SimpleNamespaceContext NS_CONTEXT;
+ static {
+ NS_CONTEXT = new SimpleNamespaceContext();
+ NS_CONTEXT.addNamespace("saml", "urn:oasis:names:tc:SAML:1.0:assertion");
+ NS_CONTEXT.addNamespace("samlp", "urn:oasis:names:tc:SAML:1.0:protocol");
+ NS_CONTEXT.addNamespace("pr", "http://reference.e-government.gv.at/namespace/persondata/20020228#");
+ }
+
+ /**
+ * Servlet wird von MOA-ID-AUTH nach erfolgter Authentisierung über ein Redirect aufgerufen.
+ */
+ protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws ServletException, IOException {
+
+ // Parameter "Target" und "SAMLArtifact" aus dem Redirect von MOA-ID-AUTH lesen
+ String target = req.getParameter("Target");
+ String samlArtifact = req.getParameter("SAMLArtifact");
+
+ try {
+ // DOMBuilder instanzieren
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ factory.setNamespaceAware(true);
+ DocumentBuilder builder = factory.newDocumentBuilder();
+
+ // <samlp:Request> zusammenstellen und in einen DOM-Baum umwandeln
+ String samlRequest =
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?><samlp:Request IssueInstant=\"2003-01-01T00:00:00+02:00\" MajorVersion=\"1\" MinorVersion=\"0\" RequestID=\"12345678901234567890\" xmlns:samlp=\"urn:oasis:names:tc:SAML:1.0:protocol\"><samlp:AssertionArtifact>"
+ + samlArtifact
+ + "</samlp:AssertionArtifact></samlp:Request>";
+ Document root_request = builder.parse(new ByteArrayInputStream(samlRequest.getBytes()));
+
+ // Neues SOAPBodyElement anlegen und mit dem DOM-Baum füllen
+ SOAPBodyElement body = new SOAPBodyElement(root_request.getDocumentElement());
+ SOAPBodyElement[] params = new SOAPBodyElement[] { body };
+
+ // AXIS-Service für Aufruf von MOA-ID-AUTH instanzieren
+ Service service = ServiceFactory.newInstance().createService(SERVICE_QNAME);
+
+ // Axis-Call erzeugen und mit Endpoint verknüpfen
+ Call call = service.createCall();
+ call.setTargetEndpointAddress(ENDPOINT);
+
+ // Call aufrufen und die Antwort speichern
+ System.out.println("Calling MOA-ID-AUTH ...");
+ Vector responses = (Vector) call.invoke(params);
+
+ // erstes BodyElement auslesen
+ SOAPBodyElement response = (SOAPBodyElement) responses.get(0);
+
+ // <samlp:Response> als DOM-Baum holen
+ Document responseDocument = response.getAsDocument();
+ Element samlResponse = responseDocument.getDocumentElement();
+
+ // <samlp:Response> auf System.out ausgeben
+ System.out.println("Response received:");
+ OutputFormat format = new OutputFormat((Document) responseDocument);
+ format.setLineSeparator(LineSeparator.Windows);
+ format.setIndenting(true);
+ format.setLineWidth(0);
+ XMLSerializer serializer = new XMLSerializer(System.out, format);
+ serializer.asDOMSerializer();
+ serializer.serialize(responseDocument);
+
+ // <samlp:StatusCode> auslesen
+ Attr statusCodeAttr = (Attr)getNode(samlResponse, "/samlp:Response/samlp:Status/samlp:StatusCode/@Value");
+ String samlStatusCode = statusCodeAttr.getValue();
+ System.out.println("StatusCode: " + samlStatusCode);
+
+ // <saml:Assertion> auslesen
+ if ("samlp:Success".equals(samlStatusCode)) {
+ Element samlAssertion = (Element)getNode(samlResponse, "/samlp:Response/saml:Assertion");
+
+ // FamilyName aus der <saml:Assertion> parsen
+ Node familyNameNode = getNode(samlAssertion, "//saml:AttributeStatement/saml:Attribute[@AttributeName=\"PersonData\"]/saml:AttributeValue/pr:Person/pr:Name/pr:FamilyName");
+ String familyName = getText(familyNameNode);
+ System.out.println("Family name: " + familyName);
+
+ // weitere Anmeldedaten aus der <saml:Assertion> parsen
+ // ...
+
+ // Anmeldedaten und Target in der HTTPSession speichern
+ HttpSession session = req.getSession();
+ session.setAttribute("UserFamilyName", familyName);
+ session.setAttribute("Geschaeftsbereich", target);
+
+ // weitere Anmeldedaten in der HTTPSession speichern
+ // ...
+
+ // Redirect auf die eigentliche Startseite
+ resp.sendRedirect("/index.jsp");
+ }
+ }
+ catch (Exception ex) {
+ ex.printStackTrace();
+ }
+ }
+ /** Returns the first node matching an XPath expression. */
+ private static Node getNode(Node contextNode, String xpathExpression) throws JaxenException {
+ DOMXPath xpath = new DOMXPath(xpathExpression);
+ xpath.setNamespaceContext(NS_CONTEXT);
+ return (Node) xpath.selectSingleNode(contextNode);
+ }
+ /** Returns the text that a node contains. */
+ public static String getText(Node node) {
+ if (!node.hasChildNodes()) {
+ return "";
+ }
+
+ StringBuffer result = new StringBuffer();
+ NodeList list = node.getChildNodes();
+ for (int i = 0; i < list.getLength(); i++) {
+ Node subnode = list.item(i);
+ if (subnode.getNodeType() == Node.TEXT_NODE) {
+ result.append(subnode.getNodeValue());
+ } else if (subnode.getNodeType() == Node.CDATA_SECTION_NODE) {
+ result.append(subnode.getNodeValue());
+ } else if (subnode.getNodeType() == Node.ENTITY_REFERENCE_NODE) {
+ // Recurse into the subtree for text
+ // (and ignore comments)
+ result.append(getText(subnode));
+ }
+ }
+ return result.toString();
+ }
+}
diff --git a/id/server/doc/moa_id/examples/SampleMOAIDVerifyInfoboxesConfiguration.xml b/id/server/doc/moa_id/examples/SampleMOAIDVerifyInfoboxesConfiguration.xml
new file mode 100644
index 000000000..09e60c6f1
--- /dev/null
+++ b/id/server/doc/moa_id/examples/SampleMOAIDVerifyInfoboxesConfiguration.xml
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Beispielkonfiguration fuer MOA-ID ohne Proxy mit Unterstuetzung fuer A-Trust und A1-Signatur -->
+<MOA-IDConfiguration xmlns="http://www.buergerkarte.at/namespaces/moaconfig#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:sl10="http://www.buergerkarte.at/namespaces/securitylayer/20020225#" xmlns:sl11="http://www.buergerkarte.at/namespaces/securitylayer/20020831#">
+ <!-- Konfiguration fuer MOA-ID-AUTH -->
+ <AuthComponent>
+ <!-- URL und akzeptierte TLS-Server-Zertifikate des verwendeten BKU-Auswahl Service -->
+ <BKUSelection BKUSelectionAlternative="HTMLSelect">
+ <ConnectionParameter URL="http://auswahl.buergerkarte.at/htmlcode">
+ <!-- <AcceptedServerCertificates>certs/server-certs</AcceptedServerCertificates> -->
+ </ConnectionParameter>
+ </BKUSelection>
+ <!-->Globale Templates zum Anpassen der Seiten &quot;Auswahl der B&uuml;rgerkartenumgebung&quot; und
+ &quot;Anmeldung mit B&uuml;rgerkarte&quot;<-->
+ <!--Templates>
+ <BKUSelectionTemplate URL="sampleTemplates/SampleBKUSelectionTemplate.html"/>
+ <Template URL="sampleTemplates/SampleTemplate.html"/>
+ </Templates-->
+ <!-- Transformationen fuer die Anzeige des AUTH-Block im Secure Viewer -->
+ <SecurityLayer>
+ <!-- TransformInfo in Textform -->
+ <TransformsInfo filename="transforms/TransformsInfoAuthBlockText.xml"/>
+ <!--TransformsInfo filename="transforms/TransformsInfoAuthBlockTextAmir.xml"/-->
+ </SecurityLayer>
+ <MOA-SP>
+ <!-- URL und akzeptierte TLS-Server-Zertifikate des MOA-SP Web Service, falls MOA-SP ueber Web Service angesprochen wird.
+ Wenn MOA-SP direkt ueber API aufgerufen werden soll, so wird das Element auskommentiert -->
+ <!-- ConnectionParameter URL="http://moa.gv.at/moa-spss-test/services/SignatureVerification"/ -->
+ <!-- ConnectionParameter URL="http://localhost:8080/moa-spss/services/SignatureVerification"/ -->
+ <!-- <AcceptedServerCertificates>certs/server-certs</AcceptedServerCertificates> -->
+ <!-- <ClientKeyStore password="Keystore Pass">file_to_clientkeystore</ClientKeyStore> -->
+ <!-- </ConnectionParameter> -->
+
+ <!-- TrustProfile fuer den IdentityLink der Buergerkarte (muss in MOA-SP konfiguriert sein) -->
+ <VerifyIdentityLink>
+ <TrustProfileID>MOAIDBuergerkartePersonenbindung</TrustProfileID>
+ </VerifyIdentityLink>
+ <!-- TrustProfile fuer die Signatur des Benutzers mit der Buergerkarte (muss in MOA-SP konfiguriert sein) -->
+ <VerifyAuthBlock>
+ <TrustProfileID>MOAIDBuergerkarteAuthentisierungsDaten</TrustProfileID>
+ <!-- VerifyTransformsInfoProfile mit den Transformationen fuer die Anzeige der Anmeldedaten im Secure Viewer (muss in MOA-SP konfiguriert sein) -->
+ <VerifyTransformsInfoProfileID>MOAIDTransformAuthBlockText</VerifyTransformsInfoProfileID>
+ <!-->Auskommentieren, falls die in der Beispiel-Onlineapplikation definierte Transformationverwendet wird:<-->
+ <!--VerifyTransformsInfoProfileID>MOAIDTransformAuthBlock</VerifyTransformsInfoProfileID-->
+ </VerifyAuthBlock>
+ </MOA-SP>
+
+ <!-- Gueltige Signatoren des IdentityLink, der von der Buergerkarte gelesen wird -->
+ <IdentityLinkSigners>
+ <!-- Personenbindung alt (Ausgabe vor 05.2004) -->
+ <X509SubjectName>CN=zmr,OU=BMI-IV-2,O=BMI,C=AT</X509SubjectName>
+ <!-- Personenbindung neu (ab 05.2004, mit Stammzahl) mit Typo -->
+ <X509SubjectName>T=Dr.,CN=Nikolaus Schwab,O=BM f. Inneres i.A. des gf. Mitgieds der Datenschutzkommission</X509SubjectName>
+ <!-- Personenbindung neu (ab 05.2004, mit Stammzahl) jedoch ohne Typo -->
+ <X509SubjectName>T=Dr.,CN=Nikolaus Schwab,O=BM f. Inneres i.A. des gf. Mitglieds der Datenschutzkommission</X509SubjectName>
+ </IdentityLinkSigners>
+ <VerifyInfoboxes>
+ <DefaultTrustProfile>
+ <TrustProfileID>GlobalVIDefaultTrust</TrustProfileID>
+ </DefaultTrustProfile>
+ <Infobox Identifier="InfoboxA" />
+ <Infobox Identifier="InfoboxB" required="true" provideStammzahl="true" provideIdentityLink="false">
+ <FriendlyName>Beispiel Infobox B</FriendlyName>
+ <TrustProfileID>GlobalInfoboxBTrust</TrustProfileID>
+ <SchemaLocations>
+ <Schema namespace="http://ns1.ns1" schemaLocation="schemas/ns1.xsd"/>
+ <Schema namespace="http://ns2.ns2" schemaLocation="schemas/ns2.xsd"/>
+ </SchemaLocations>
+ <ApplicationSpecificParameters>
+ <Parameter1>content1</Parameter1>
+ <Parameter2>content2</Parameter2>
+ <Parameter3>
+ <Parameter3a>content3a</Parameter3a>
+ <Parameter3b>content3b</Parameter3b>
+ </Parameter3>
+ </ApplicationSpecificParameters>
+ </Infobox>
+ </VerifyInfoboxes>
+ </AuthComponent>
+
+ <!-- Eintragung fuer jede Online-Applikation -->
+ <!-- publicURLPrefix referenziert hier keine richtige Online Applikation; muss angepasst werden -->
+ <!-- erste Online-Applikation -->
+ <OnlineApplication publicURLPrefix="https://OA1/">
+ <!-- fuer MOA-ID-AUTH -->
+ <AuthComponent slVersion="1.2">
+ <VerifyInfoboxes>
+ <DefaultTrustProfile>
+ <TrustProfileID>LocalOA1DefaultTrust</TrustProfileID>
+ </DefaultTrustProfile>
+ <!-- InfoboxB -->
+ <Infobox Identifier="InfoboxB" required="true">
+ <FriendlyName>Demo Infobox B</FriendlyName>
+ <ValidatorClass>oa1.validate.InfoboxBValidator</ValidatorClass>
+ <SchemaLocations>
+ <Schema namespace="http://ns1.ns1" schemaLocation="schemas/local/ns1oa1.xsd"/>
+ <Schema namespace="http://ns2.ns2" schemaLocation="schemas/local/ns2oa1.xsd"/>
+ </SchemaLocations>
+ </Infobox>
+ <!-- InfoboxC -->
+ <Infobox Identifier="InfoboxC">
+ <FriendlyName>Demo Infobox C</FriendlyName>
+ <TrustProfileID>LocalInfoboxOA1CTrust</TrustProfileID>
+ </Infobox>
+ <!-- InfoboxD -->
+ <Infobox Identifier="InfoboxD" />
+ </VerifyInfoboxes>
+ </AuthComponent>
+ </OnlineApplication>
+ <!-- zweite Online-Applikation -->
+ <OnlineApplication publicURLPrefix="https://OA2/">
+ <!-- fuer MOA-ID-AUTH -->
+ <AuthComponent>
+ <VerifyInfoboxes>
+ <!-- InfoboxA -->
+ <Infobox Identifier="InfoboxA">
+ <TrustProfileID>LocalInfoboxOA2ATrust</TrustProfileID>
+ </Infobox>
+ <!-- InfoboxB -->
+ <Infobox Identifier="InfoboxB" />
+ </VerifyInfoboxes>
+ </AuthComponent>
+ </OnlineApplication>
+ <!-- dritte Online-Applikation -->
+ <OnlineApplication publicURLPrefix="https://OA3/">
+ <AuthComponent provideStammzahl="true" />
+ </OnlineApplication>
+
+ <!-- ChainingModes fuer die Zertifikatspfadueberpruefung der TLS-Zertifikate -->
+ <ChainingModes systemDefaultMode="pkix">
+ </ChainingModes>
+
+ <!-- fuer MOA-ID-AUTH: CA-Zertifikat des Servers MOA-SP, falls dieses Service ueber HTTPS angesprochen wird
+ zusaeztlich: CA-Zertifikat aller Online-Applikationen, die ueber HTTPS angesprochen werden -->
+ <TrustedCACertificates>certs/ca-certs</TrustedCACertificates>
+
+ <!-- Cache-Verzeichnis fuer-Zertifikate -->
+ <!-- Hinweis: wenn TC in linux oder unix betrieben wird vollstaendigen pfad fuer DirectoryCertStoreParameters.RootDir verwenden -->
+ <GenericConfiguration name="DirectoryCertStoreParameters.RootDir" value="certs/certstore"/>
+ <!-- Time-Out fuer die Anmeldung von Beginn bis zum Anlegen der Anmeldedaten, in Sekunden -->
+ <GenericConfiguration name="AuthenticationSession.TimeOut" value="600"/>
+ <!-- Time-Out fuer die Anmeldung vom Anlegen bis zum Abholen der Anmeldedaten, in Sekunden -->
+ <GenericConfiguration name="AuthenticationData.TimeOut" value="120"/>
+
+ <!-- Alternatives Data URL prefix (falls Webserver vorgeschaltet wird) -->
+ <!--GenericConfiguration name="FrontendServlets.DataURLPrefix" value="https://<your_webserver>/moa-id-auth/"/ -->
+ <!-- HTTP Verbindung auf Frontend Servlets zulassen / verbieten (falls Webserver vorgeschaltet wird) -->
+ <!-- GenericConfiguration name="FrontendServlets.EnableHTTPConnection" value="true"/ -->
+</MOA-IDConfiguration>
diff --git a/id/server/doc/moa_id/examples/Template.html b/id/server/doc/moa_id/examples/Template.html
new file mode 100644
index 000000000..5074f5beb
--- /dev/null
+++ b/id/server/doc/moa_id/examples/Template.html
@@ -0,0 +1,50 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>MOA ID - Identifizierter Zugang mit B&uuml;rgerkarte</title>
+</head>
+
+<body>
+<img src="/moaid-templates/SampleLogo.gif" alt='Organisation XY'>
+<h1 align="center">Sicherer Zugang zur Online-Anwendung mit B&uuml;rgerkarte</h1>
+<p></p>
+
+Der identifizierte Zugang erfolgt &uuml;ber die Module f&uuml;r Online Applikationen (MOA) unter Verwendung einer B&uuml;rgerkarte und deren Signaturfunktion.
+
+<p></p>
+<p>Wenn Sie in Folge die Schaltfl&auml;che "Anmeldung mit B&uuml;rgerkarte"
+aktivieren, so werden zur Signatur der Anmeldedaten aufgefordert. Wenn sie diese
+signieren, so werden sie zur Online-Anwendung weitergeleitet und angemeldet.</p>
+
+
+<form name="CustomizedForm" action="<BKU>" method="post">
+<div align="center">
+<input type="hidden"
+name="XMLRequest"
+value="<XMLRequest>"/>
+<input type="hidden"
+name="DataURL"
+value="<DataURL>"/>
+<input type="hidden"
+name="PushInfobox"
+value="<PushInfobox>"/>
+
+<input type="submit" value="Anmeldung mit B&uuml;rgerkarte" name="submit"/>
+</div>
+</form>
+<form name="CustomizedInfoForm"
+action="<BKU>"
+method="post">
+<input type="hidden"
+name="XMLRequest"
+value="<CertInfoXMLRequest>"/>
+<input type="hidden"
+name="DataURL"
+value="<CertInfoDataURL>"/>
+
+
+<input type="hidden" value="Weitere Info"/>
+</form>
+
+</body>
+</html>
diff --git a/id/server/doc/moa_id/examples/TransformsInfoAuthBlock.txt b/id/server/doc/moa_id/examples/TransformsInfoAuthBlock.txt
new file mode 100644
index 000000000..edbde0073
--- /dev/null
+++ b/id/server/doc/moa_id/examples/TransformsInfoAuthBlock.txt
@@ -0,0 +1,35 @@
+<sl10:TransformsInfo>
+ <dsig:Transforms>
+ <dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
+ <dsig:Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116">
+ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#">
+ <xsl:template match="/" xmlns="http://www.w3.org/1999/xhtml">
+ <html>
+ <head>
+ <title>Signatur der Anmeldedaten</title>
+ </head>
+ <body>
+<h1>Signatur der Anmeldedaten</h1>
+<p></p>
+<h4>Mit meiner elektronischen Signatur beantrage ich, <b><xsl:value-of select="//@Issuer"/></b>,
+geboren am
+<xsl:value-of select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,9,2)"/>.<xsl:value-of select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,6,2)"/>.<xsl:value-of select="substring(//saml:Attribute[@AttributeName='Geburtsdatum']/saml:AttributeValue,3,2)"/>, den Zugang zur gesicherten Anwendung.</h4>
+<p></p>
+<h4>Datum und Uhrzeit: <xsl:value-of select="substring(//@IssueInstant,9,2)"/>.<xsl:value-of select="substring(//@IssueInstant,6,2)"/>.<xsl:value-of select="substring(//@IssueInstant,1,4)"/>, <xsl:value-of select="substring(//@IssueInstant,12,2)"/>:<xsl:value-of select="substring(//@IssueInstant,15,2)"/>:<xsl:value-of select="substring(//@IssueInstant,18,2)"/></h4>
+<xsl:if test="//saml:Attribute[@AttributeName='wbPK']">
+ <h4>wbPK(*): <xsl:value-of select="//saml:Attribute[@AttributeName='wbPK']/saml:AttributeValue/pr:Identification/pr:Value"/></h4>
+ <p></p>
+ <hr></hr>
+ <font size="2">(*) wbPK: Das <i>Wirtschaftsbereichsspezifische Personenkennzeichen</i> wird aus den jeweiligen Stammzahlen des Buergers und des Wirtschaftsunternehmens berechnet und ermoeglicht eine eindeutige Zuordnung des Buergers zum Wirtschaftsunternehmen.</font>
+</xsl:if>
+ </body>
+ </html>
+ </xsl:template>
+ </xsl:stylesheet>
+ </dsig:Transform>
+ <dsig:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
+ </dsig:Transforms>
+ <sl10:FinalDataMetaInfo>
+ <sl10:MimeType>text/html</sl10:MimeType>
+ </sl10:FinalDataMetaInfo>
+</sl10:TransformsInfo>
diff --git a/id/server/doc/moa_id/examples/conf/MOA-ID-Configuration.xml b/id/server/doc/moa_id/examples/conf/MOA-ID-Configuration.xml
new file mode 100644
index 000000000..d0ea9cf6c
--- /dev/null
+++ b/id/server/doc/moa_id/examples/conf/MOA-ID-Configuration.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Beispielkonfiguration fuer MOA-ID mit Unterstuetzung fuer A-Trust und A1-Signatur
+ Rudolf Schamberger, Stabsstelle IKT-Strategie des Bundes, Bundeskanzleramt -->
+<MOA-IDConfiguration xmlns="http://www.buergerkarte.at/namespaces/moaconfig#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:sl10="http://www.buergerkarte.at/namespaces/securitylayer/20020225#" xmlns:sl11="http://www.buergerkarte.at/namespaces/securitylayer/20020831#">
+ <!-- Konfiguration fuer MOA-ID-AUTH -->
+ <AuthComponent>
+ <!-- URL und akzeptierte TLS-Server-Zertifikate des verwendeten BKU-Auswahl Service -->
+ <BKUSelection BKUSelectionAlternative="HTMLSelect">
+ <ConnectionParameter URL="http://auswahl.buergerkarte.at/htmlcode">
+ <!-- <AcceptedServerCertificates>certs/server-certs</AcceptedServerCertificates> -->
+ </ConnectionParameter>
+ </BKUSelection>
+ <!-- Transformationen fuer die Anzeige des AUTH-Block im Secure Viewer -->
+ <SecurityLayer>
+ <!-- TransformInfo in Textform -->
+ <TransformsInfo filename="transforms/TransformsInfoAuthBlockText.xml"/>
+ </SecurityLayer>
+ <MOA-SP>
+ <!-- URL und akzeptierte TLS-Server-Zertifikate des MOA-SP Web Service, falls MOA-SP ueber Web Service angesprochen wird.
+ Wenn MOA-SP direkt ueber API aufgerufen werden soll, so wird das Element auskommentiert -->
+ <!-- <ConnectionParameter URL="http://localhost:8080/moa-spss/services/SignatureVerification"> -->
+ <!-- <AcceptedServerCertificates>certs/server-certs</AcceptedServerCertificates> -->
+ <!-- <ClientKeyStore password="Keystore Pass">file_to_clientkeystore</ClientKeyStore> -->
+ <!-- </ConnectionParameter> -->
+
+ <!-- TrustProfile fuer den IdentityLink der Buergerkarte (muss in MOA-SP konfiguriert sein) -->
+ <VerifyIdentityLink>
+ <TrustProfileID>MOAIDBuergerkartePersonenbindung</TrustProfileID>
+ </VerifyIdentityLink>
+ <!-- TrustProfile fuer die Signatur des Benutzers mit der Buergerkarte (muss in MOA-SP konfiguriert sein) -->
+ <VerifyAuthBlock>
+ <TrustProfileID>MOAIDBuergerkarteAuthentisierungsDaten</TrustProfileID>
+ <!-- VerifyTransformsInfoProfile mit den Transformationen fuer die Anzeige der Anmeldedaten im Secure Viewer (muss in MOA-SP konfiguriert sein) -->
+ <VerifyTransformsInfoProfileID>MOAIDTransformAuthBlockText</VerifyTransformsInfoProfileID>
+ </VerifyAuthBlock>
+ </MOA-SP>
+
+ <!-- Gueltige Signatoren des IdentityLink, der von der Buergerkarte gelesen wird -->
+ <IdentityLinkSigners>
+ <!-- Personenbindung alt (Ausgabe vor 05.2004) -->
+ <X509SubjectName>CN=zmr,OU=BMI-IV-2,O=BMI,C=AT</X509SubjectName>
+ <!-- Personenbindung neu (ab 05.2004, mit Stammzahl) mit Typo -->
+ <X509SubjectName>T=Dr.,CN=Nikolaus Schwab,O=BM f. Inneres i.A. des gf. Mitgieds der Datenschutzkommission</X509SubjectName>
+ <!-- Personenbindung neu (ab 05.2004, mit Stammzahl) jedoch ohne Typo -->
+ <X509SubjectName>T=Dr.,CN=Nikolaus Schwab,O=BM f. Inneres i.A. des gf. Mitglieds der Datenschutzkommission</X509SubjectName>
+ </IdentityLinkSigners>
+ </AuthComponent>
+
+ <!-- Konfiguration fuer MOA-ID-PROXY -->
+ <ProxyComponent>
+ <!-- URL und akzeptierte TLS-Server-Zertifikate des MOA-ID-AUTH Web Service -->
+ <AuthComponent>
+ <ConnectionParameter URL="http://localhost:8080/moa-id-auth/services/GetAuthenticationData">
+ <!-- <AcceptedServerCertificates>certs/server-certs</AcceptedServerCertificates> -->
+ <!-- <ClientKeyStore password="Keystore Pass">file_to_clientkeystore</ClientKeyStore> -->
+ </ConnectionParameter>
+ </AuthComponent>
+ </ProxyComponent>
+
+ <!-- Eintragung fuer jede Online-Applikation -->
+ <!-- Demo Online-Applikation: Zugriff auf www.digitales.oesterreich.gv.at ueber MOA-ID-PROXY -->
+ <OnlineApplication publicURLPrefix="https://localhost:8443/">
+ <!-- fuer MOA-ID-AUTH -->
+ <AuthComponent>
+ <!-- Spezifikation der Stammzahl des Wirtschaftsunternehmens bei type = "businessService" -->
+ <!-- <IdentificationNumber> -->
+ <!-- Beispiel Firmenbuchnummer -->
+ <!-- <pr:Firmenbuchnummer xmlns:pr="http://reference.e-government.gv.at/namespace/persondata/20020228#">468924i</pr:Firmenbuchnummer> -->
+ <!-- </IdentificationNumber> -->
+ </AuthComponent>
+ <!-- fuer MOA-ID-PROXY -->
+ <ProxyComponent configFileURL="oa/SampleOAConfiguration.xml" sessionTimeOut="600">
+ <!-- <ProxyComponent configFileURL="oa/SampleOAConfiguration.xml" sessionTimeOut="600" loginParameterResolverImpl="at.gv.egovernment.moa.id.proxy.DefaultLoginParameterResolver" loginParameterResolverConfiguration="" connectionBuilderImpl="at.gv.egovernment.moa.id.proxy.DefaultConnectionBuilder"> -->
+ <!-- URL und akzeptierte TLS-Server-Zertifikate der Online-Applikation -->
+ <ConnectionParameter URL="http://www.digitales.oesterreich.gv.at/">
+ <!-- <AcceptedServerCertificates>certs/server-certs</AcceptedServerCertificates> -->
+ <!-- <ClientKeyStore password="Keystore Pass">file_to_clientkeystore</ClientKeyStore> -->
+ </ConnectionParameter>
+ </ProxyComponent>
+ </OnlineApplication>
+
+ <!-- ChainingModes fuer die Zertifikatspfadueberpruefung der TLS-Zertifikate -->
+ <ChainingModes systemDefaultMode="pkix">
+ </ChainingModes>
+
+ <!-- fuer MOA-ID-AUTH: CA-Zertifikat des Servers MOA-SP, falls dieses Service ueber HTTPS angesprochen wird
+ fuer MOA-ID-PROXY: CA-Zertifikat des Servers MOA-ID-AUTH, falls dieses Service ueber HTTPS angesprochen wird
+ zusaeztlich: CA-Zertifikat aller Online-Applikationen, die ueber HTTPS angesprochen werden -->
+ <TrustedCACertificates>certs/ca-certs</TrustedCACertificates>
+
+ <!-- Cache-Verzeichnis fuer-Zertifikate -->
+ <!-- Hinweis: wenn TC in linux oder unix betrieben wird vollstaendigen pfad fuer DirectoryCertStoreParameters.RootDir verwenden -->
+ <GenericConfiguration name="DirectoryCertStoreParameters.RootDir" value="certs/certstore"/>
+ <!-- Time-Out fuer die Anmeldung von Beginn bis zum Anlegen der Anmeldedaten, in Sekunden -->
+ <GenericConfiguration name="AuthenticationSession.TimeOut" value="600"/>
+ <!-- Time-Out fuer die Anmeldung vom Anlegen bis zum Abholen der Anmeldedaten, in Sekunden -->
+ <GenericConfiguration name="AuthenticationData.TimeOut" value="120"/>
+
+ <!-- Alternatives Data URL prefix (falls Webserver vorgeschaltet wird) -->
+ <!--GenericConfiguration name="FrontendServlets.DataURLPrefix" value="https://<your_webserver>/moa-id-auth/"/ -->
+ <!-- HTTP Verbindung auf Frontend Servlets zulassen / verbieten (falls Webserver vorgeschaltet wird) -->
+ <!-- GenericConfiguration name="FrontendServlets.EnableHTTPConnection" value="true"/ -->
+</MOA-IDConfiguration>
diff --git a/id/server/doc/moa_id/examples/conf/OAConfBasicAuth.xml b/id/server/doc/moa_id/examples/conf/OAConfBasicAuth.xml
new file mode 100644
index 000000000..fc99cea79
--- /dev/null
+++ b/id/server/doc/moa_id/examples/conf/OAConfBasicAuth.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Demokonfiguration fuer eine Online Applikation (OA) welche 401 Basic Authentication zur Uebergabe der Parameter verwendet -->
+<Configuration xmlns="http://www.buergerkarte.at/namespaces/moaconfig#" xmlns:sl10="http://www.buergerkarte.at/namespaces/securitylayer/20020225#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <LoginType>stateless</LoginType>
+ <BasicAuth>
+ <UserID>MOAFamilyName</UserID>
+ <Password>MOAGivenName</Password>
+ </BasicAuth>
+</Configuration>
diff --git a/id/server/doc/moa_id/examples/conf/OAConfHeaderAuth.xml b/id/server/doc/moa_id/examples/conf/OAConfHeaderAuth.xml
new file mode 100644
index 000000000..4d34c3646
--- /dev/null
+++ b/id/server/doc/moa_id/examples/conf/OAConfHeaderAuth.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Demokonfiguration fuer eine Online Applikation (OA) welche Header Authentication zur Uebergabe der Parameter verwendet -->
+<Configuration xmlns="http://www.buergerkarte.at/namespaces/moaconfig#" xmlns:sl10="http://www.buergerkarte.at/namespaces/securitylayer/20020225#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <LoginType>stateless</LoginType>
+ <HeaderAuth>
+ <!-- zusaetzlicher Header GivenName -->
+ <Header Name="X-MOAParameterGivenName" Value="MOAGivenName"></Header>
+ <Header Name="X-MOAParameterFamilyName" Value="MOAFamilyName"></Header>
+ </HeaderAuth>
+</Configuration>
diff --git a/id/server/doc/moa_id/examples/conf/OAConfParamAuth.xml b/id/server/doc/moa_id/examples/conf/OAConfParamAuth.xml
new file mode 100644
index 000000000..979faca95
--- /dev/null
+++ b/id/server/doc/moa_id/examples/conf/OAConfParamAuth.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Demokonfiguration fuer eine Online Applikation (OA) welche Parameter Authentication verwendet -->
+<Configuration xmlns="http://www.buergerkarte.at/namespaces/moaconfig#" xmlns:sl10="http://www.buergerkarte.at/namespaces/securitylayer/20020225#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <LoginType>stateless</LoginType>
+ <ParamAuth>
+ <!-- URL Parameter GivenName und FamilyName -->
+ <Parameter Name="GivenName" Value="MOAGivenName"></Parameter>
+ <Parameter Name="FamilyName" Value="MOAFamilyName"></Parameter>
+ </ParamAuth>
+</Configuration>
diff --git a/id/server/doc/moa_id/examples/moa-id-env.sh.txt b/id/server/doc/moa_id/examples/moa-id-env.sh.txt
new file mode 100644
index 000000000..1ccca10c1
--- /dev/null
+++ b/id/server/doc/moa_id/examples/moa-id-env.sh.txt
@@ -0,0 +1,15 @@
+rem insert Tomcat 4.1.x home directory (no trailing path separator)
+set CATALINA_HOME=<Tomcat 4.1.x home directory>
+
+CONFIG_OPT_SPSS=-Dmoa.spss.server.configuration=$CATALINA_HOME/conf/moa-spss/SampleMOASPSSConfiguration.xml
+CONFIG_OPT_ID=-Dmoa.id.configuration=$CATALINA_HOME/conf/moa-id/SampleMOAIDConfiguration.xml
+
+
+LOGGING_OPT=-Dlog4j.configuration=file:$CATALINA_HOME/conf/moa-id/log4j.properties
+# TRUST_STORE_OPT=-Djavax.net.ssl.trustStore=truststore.jks
+# TRUST_STORE_PASS_OPT=-Djavax.net.ssl.trustStorePassword=changeit
+# TRUST_STORE_TYPE_OPT=-Djavax.net.ssl.trustStoreType=jks
+
+export CATALINA_OPTS="$CONFIG_OPT_SPSS $CONFIG_OPT_ID $LOGGING_OPT $TRUST_STORE_OPT $TRUST_STORE_PASS_OPT $TRUST_STORE_TYPE_OPT"
+echo CATALINA_OPTS=$CATALINA_OPTS
+
diff --git a/id/server/doc/moa_id/examples/startTomcat.bat.txt b/id/server/doc/moa_id/examples/startTomcat.bat.txt
new file mode 100644
index 000000000..29588120c
--- /dev/null
+++ b/id/server/doc/moa_id/examples/startTomcat.bat.txt
@@ -0,0 +1,26 @@
+rem ----------------------------------------------------------------------------------------------
+rem Modify these entries according to your needs
+
+rem JDK home directory (no trailing path separator)
+set JAVA_HOME=<jdk home directory>
+
+rem Tomcat 4.1.x home directory (no trailing path separator)
+set CATALINA_HOME=<Tomcat 4.1.x home directory>
+
+rem ----------------------------------------------------------------------------------------------
+
+set CONFIG_OPT_SPSS=-Dmoa.spss.server.configuration=%CATALINA_HOME%/conf/moa-spss/SampleMOASPSSConfiguration.xml
+set CONFIG_OPT_ID=-Dmoa.id.configuration=%CATALINA_HOME%/conf/moa-id/SampleMOAIDConfiguration.xml
+set LOGGING_OPT=-Dlog4j.configuration=file:%CATALINA_HOME%/conf/moa-id/log4j.properties
+
+set PARAMS_MOA=%CONFIG_OPT_SPSS% %CONFIG_OPT_ID% %LOGGING_OPT%
+
+rem set PARAM_TRUST_STORE=-Djavax.net.ssl.trustStore=truststore.jks
+rem set PARAM_TRUST_STORE_PASS=-Djavax.net.ssl.trustStorePassword=changeit
+rem set PARAM_TRUST_STORE_TYPE=-Djavax.net.ssl.trustStoreType=jks
+rem set PARAMS_SSL=%PARAM_TRUST_STORE% %PARAM_TRUST_STORE_PASS% %PARAM_TRUST_STORE_TYPE%
+
+set CATALINA_OPTS=%PARAMS_MOA% %PARAMS_SSL%
+
+cd %CATALINA_HOME%
+bin\catalina.bat start \ No newline at end of file
diff --git a/id/server/doc/moa_id/faqs.htm b/id/server/doc/moa_id/faqs.htm
new file mode 100644
index 000000000..0b9ef0415
--- /dev/null
+++ b/id/server/doc/moa_id/faqs.htm
@@ -0,0 +1,217 @@
+<html>
+<head>
+ <title>FAQs - H&auml;ufig gestellte Fragen </title>
+ <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
+ <meta content="heinz.rosenkranz@brz.gv.at" name="author"/>
+
+<style type="text/css">
+ body { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; }
+ td { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; }
+ th { font-family:"Verdana", "Arial"; font-size:10pt; font-weight:bold; color:#c0c0c0; background:#505050}
+ li { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; margin-top:3px }
+ ul { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; margin-top:3px }
+ #titel { font-family:"Verdana", "Arial"; font-size:18pt; color:#505060; }
+ #subtitel { font-family:"Verdana", "Arial"; font-size:12pt; font-weight:bold; color:#505060; }
+ #slogan { font-family:"Verdana", "Arial"; font-size:8pt; color:#808090; text-align:justify; width:160px }
+ #block { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; text-align:justify }
+ #klein { font-family:"Verdana", "Arial"; font-size:9pt; color:#505060; margin-top:6px }
+ a:link {color:#000090}
+ a:visited {color:#000090}
+ a:hover {color:#c03030}
+ a {text-decoration: none}
+</style>
+
+<script language="JavaScript">
+<!--
+function goWin(url) {
+ Fenster=window.open(url,"smallWin","toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=yes,scrollbars=yes,width=500,height=480,top=20,screenY=0,left=20,screenX=0");
+ window.setTimeout("showWin()",300);
+}
+function showWin() { Fenster.focus(); }
+// -->
+</script>
+</head>
+
+<body bgcolor="#FFFFFF" >
+<div style="width:650px">
+
+<!-- Projekt-Logo -->
+<div style="height:42px; font-size:16pt; color:#b0b8c0; background:#003050">
+&#160;Module f&uuml;r Online-Applikationen
+</div>
+<div style="margin-left:8px; margin-top:3px; font-size:8pt; color:#707070; ">
+<!-- Development Center der BRZ GmbH, A-Trust und IAIK Graz -->&#160;
+</div>
+<div style="margin-top:-65px; text-align:right; font-size:8pt; font-weight:bold; color:#d04040;" >
+Projekt <span style="font-size:48pt; ">moa</span>&#160;
+</div>
+<br />
+
+<!-- First Section with Navigation -->
+ <table width="650" border="0" cellpadding="10" cellspacing="0">
+ <tr>
+ <td width="170" valign="top">
+ <div style="font-weight:bold; margin-top:12px">FAQs</div>
+ <br />
+ <div id="klein"><a href="moa.htm"><img src="../moa_images/west.gif" border="0" width="13" height="14" />
+ <b> Zur&uuml;ck</b></a></div>
+ <br />
+ <!-- div id="slogan">
+MOA ist eine Entwicklung des Bundesrechenzentrums BRZ in Zusammenarbeit mit A-Trust und dem Institut f&uuml;r angewandte Informations- und Kom-munikationstechnik (IAIK) der Universit&auml;t Graz
+</div -->
+ </td>
+ <td valign="top">
+ <div id="titel">FAQs - H&auml;ufig gestellte Fragen </div>
+ <p id="block"><b><a href="#frage1">Frage</a><a href="#frage4">&nbsp;</a><a href="#frage1">1</a></b>
+ Mit dem Internet Explorer kommt es bei einer Anmeldung an der lokal
+ installierten Version von MOA-ID zu Fehlern beim Redirect. Warum?</p>
+ <p id="block"> <b><a href="#frage2">Frage</a><a href="#frage4">&nbsp;</a><a href="#frage2">2</a></b>
+ Wenn die Proxy-Komponente lokal l&auml;uft und per TLS/SSL aufgerufen
+ wird, kommt es zu einer Fehlermeldung. Wie kann dies verhindert werden?</p>
+ <p id="block"><b><a href="#frage3">Frage</a><a href="#frage4">&nbsp;</a><a href="#frage3">3</a></b>
+ Es soll serverseitig lediglich starke TLS/SSL Verschl&uuml;sselung (&gt;100
+ Bit) unterst&uuml;tzt werden. Wie kann dies erzwungen werden?</p>
+ <p id="block"><b><a href="#frage4">Frage&nbsp;4 </a></b>Beim Starten von
+ MOA ID bzw. MOA SPSS tritt folgende Exception auf: <tt>java.lang.ClassCastException:
+ iaik.asn1.structures.Name</tt>. Was kann der Fehler sein?<b><a href="#frage3"></a></b></p>
+ <p id="block"><b><a href="#frage5">Frage&nbsp;5</a></b> Ich m&ouml;chte
+ MOA in einer Umgebung betreiben, die einen Internet-Zugang nur &uuml;ber
+ einen Proxy erlaubt. Funktioniert das?</p>
+ <p id="block"><b><a href="#frage6">Frage&nbsp;6</a></b> Tomcat: W&auml;rend
+ des Betriebs kommt es zu org.apache.commons.logging.LogConfigurationException.
+ Wie kann dies verhindert werden?</p>
+ <hr>
+ <p id="subtitel"></p>
+ <p id="subtitel"><a name="frage1"></a>Frage 1</p>
+ <p id="block"><b>Q: </b>Mit dem Internet Explorer kommt es bei einer Anmeldung
+ an der lokal installierten Version von MOA-ID zu Fehlern beim Redirect.
+ Warum?</p>
+ <p id="block"><b>A:</b> Aufgrund eines Fehlers in Microsofts Internet
+ Explorer schl&auml;gt der (lokale) Redirect auf dem lokal installierten
+ Tomcat fehl.</p>
+ <p id="block"> Als Workaround empfiehlt es sich, zum lokalen Testen einen
+ alternativen Browser wie <a href="http://www.opera.com/">Opera</a>,
+ <a href="http://www.mozilla.org/">Mozilla</a> oder <a href="http://www.netscape.org/">Netscape</a>
+ zu verwenden, da diese Probleme dort nicht auftreten. Von einem anderen
+ Rechner aus kann jedoch die Anmeldung an MOA-ID auch mit dem Internet
+ Explorer erfolgen. </p>
+ <hr />
+ <p id="subtitel"><a name="frage2"></a>Frage 2</p>
+ <p id="block"> <b>Q: </b>Wenn die Proxy-Komponente lokal l&auml;uft und
+ per TLS/SSL aufgerufen wird, kommt es zu einer Fehlermeldung. Wie kann
+ dies verhindert werden?</p>
+ <p id="block"> <b>A:</b> Wenn in der Konfiguration statt 'localhost' der
+ eigene Rechnername verwendet wird, funktioniert die Proxy-Komponente
+ wie gewohnt.<br>
+ <br />
+ Zum Herausfinden des Rechnernamens wechselt man unter Windows auf die
+ Kommandozeile und kann mittels 'ipconfig /all' den Rechnernamen herausfinden.
+ Unix/Linux-Anwender sehen bspw. mittels 'cat' in der Datei /etc/hosts
+ nach, der Texteintrag hinter der eigenen IP-Adresse spezifiziert den
+ Rechnernamen. </p>
+ <hr />
+ <p id="subtitel"><a name="frage3"></a>Frage 3</p>
+ <p id="block"> <b>Q: </b>Es soll serverseitig lediglich starke TLS/SSL
+ Verschl&uuml;sselung (&gt;100 Bit) unterst&uuml;tzt werden. Wie kann
+ dies erzwungen werden?</p>
+ <p id="block"> <b>A: </b>Tomcat bietet (bis dato) keine einfache M&ouml;glichkeit
+ die serverseitig verwendeten TLS/SSL Verschl&uuml;sselungsalgorithmen
+ zu konfigurieren. Daher empfiehlt es sich in diesem Fall, einen Web-Server
+ wie Apache oder den Microsoft Internet-Information-Server f&uuml;r das
+ SSL-Handling vorzuschalten und dort in der jeweiligen Konfiguration
+ starke Verschl&uuml;sselung zu erzwingen.<b> </b></p>
+ <hr />
+ <b>
+ <p id="subtitel"><a name="frage4"></a>Frage 4</p>
+ Q: </b>Beim Starten von MOA SPSS tritt folgende Exception auf: <tt>java.lang.ClassCastException:
+ iaik.asn1.structures.Name</tt>. Was kann der Fehler sein?
+ <p id="block"> <b>A:</b> Auf Grund einer mangelhaften Implementierung
+ in einigen Versionen des JDK 1.3.1 kann es beim Betrieb von MOA zu folgendem
+ Problem kommen: Sun macht in der Implementierung von PKCS7.getCertificate()
+ einen Downcast vom Interface java.security.Principal auf die eigene
+ Implementierung, was zu einer ClassCastException f&uuml;hrt, wenn der JCE-Provider
+ von Sun nicht an erster Stelle in der List der Security-Provider installiert
+ ist. MOA geht nun aber so vor, dass der JCE-Provider des IAIK an die
+ erste Stelle installiert wird, wenn er zum Zeitpunkt der Konfiguration
+ noch nicht installiert war. Wird dann von irgendeinem ClassLoader der
+ jar-Verifier ben&uuml;tzt, wird PKCS7.getCertificate() verwendet, und
+ es kommt zu einer ClassCastException. </p>
+ <p id="block"> Wird MOA &uuml;ber die API-Schnittstelle verwendet, ist ein
+ Workaround die manuelle Installation des IAIK-JCE-Providers nach dem
+ Sun JCE-Provider (etwa an die letzte Stelle), bevor die MOA-Konfiguration
+ aufgerufen wird. Bei Verwendung der Webservices ist die M&ouml;glichkeit
+ der statischen Konfiguration der JCE-Provider mittels Angabe in der
+ Datei $JAVA_HOME/jre/lib/security/java.security der einzige bekannte
+ Workaround. Hierzu m&uuml;ssen die Eintr&auml;ge
+ <pre>
+ security.provider.1=sun.security.provider.Sun
+ security.provider.2=com.sun.rsajca.Provider
+</pre>
+ durch folgenden Eintrag erg&auml;nzt werden:
+ <pre>
+ security.provider.3=iaik.security.provider.IAIK
+</pre>
+ <p></p>
+
+ <hr />
+ <p id="subtitel"><a name="frage5"></a>Frage 5</p>
+ <div id="block">
+ <p id="block"><b>Q: </b>Ich m&ouml;chte MOA in einer Umgebung betreiben,
+ die einen Internet-Zugang nur &uuml;ber einen Proxy erlaubt. Funktioniert
+ das?</p>
+ <p id="block"> <b>A:</b> Ja, zumindest f&uuml;r Zugriffe &uuml;ber HTTP.
+ Sie m&uuml;ssen dazu die nachfolgenden JAVA System-Properties setzen:</p>
+ <blockquote>
+ <p><tt>http.proxyHost=&lt;proxyhost&gt;<br>
+ http.proxyPort=&lt;proxyport&gt;<br>
+ http.nonProxyHosts=&quot;&lt;exceptionhosts&gt;&quot;</tt></p>
+ </blockquote>
+ <p><tt>&lt;proxyhost&gt;</tt> gibt den Namen oder die IP-Adresse des
+ Proxies an.</p>
+ <p><tt>&lt;proxyport&gt;</tt> gibt den Port des Proxies an.</p>
+ <p><tt>&lt;exceptionhosts&gt;</tt> enth&auml;lt eine Liste von Rechnernamen,
+ die nicht &uuml;ber den Proxy laufen sollen. Jedenfalls m&uuml;ssen
+ sie hier <tt>localhost</tt> angeben. Einzelne Namen sind durch eine
+ Pipe (<tt>|</tt>) zu trennen. Bitte beachten Sie, dass IP-Addressen
+ nicht angegeben werden d&uuml;rfen, sowie die verpflichtend zu verwendenen
+ Anf&uuml;hrungszeichen.</p>
+ </div>
+ <hr />
+ <p id="subtitel"><a name="frage6">Frage 6</a></p>
+ <p><b>Q:</b> Tomcat: W&auml;rend des Betriebs kommt es zu org.apache.commons.logging.LogConfigurationException.
+ Wie kann dies verhindert werden?</p>
+ <p>org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException:
+ org.apache.commons.logging.LogConfigurationException<br>
+ : Class org.apache.commons.logging.impl.Jdk14Logger does not implement
+ Log</p>
+ <p><b>A:</b> Dies ist ein Fehler in tomcat in der Version 4.1.27. $CATALINA_HOME\server\lib\tomcat-util.jar muss gegen eine
+ gepatchte Version ausgetauscht werden, da ein BUG in der Originalversion
+ von tomcat 4.1.27. Diese gepatchte Version ist in der MOA-ID Distribution
+ im Verzeichnis $MOA_ID_INST_AUTH\tomcat\tomcat-util-4.1.27-patched\
+ zu finden.</p>
+ <p>&nbsp; </p>
+ </td>
+ </tr>
+ <tr>
+ <td width="170" valign="top">&nbsp;</td>
+ <td valign="top">&nbsp;</td>
+ </tr>
+ </table>
+
+
+
+
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+ <td width="150" valign="top"><br />
+ </td>
+ <td valign="top" width="460">
+ <hr />
+<div style="font-size:8pt; color:#909090">&copy; 2003 <!-- Development Center, BRZ GmbH --></div>
+</td></tr></table>
+<br />
+
+
+</div>
+</body>
+</html>
diff --git a/id/server/doc/moa_id/id-admin.htm b/id/server/doc/moa_id/id-admin.htm
new file mode 100644
index 000000000..7192f02e2
--- /dev/null
+++ b/id/server/doc/moa_id/id-admin.htm
@@ -0,0 +1,321 @@
+<html>
+<head>
+ <title>MOA ID-Administration</title>
+ <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
+ <meta content="heinz.rosenkranz@brz.gv.at" name="author"/>
+
+<style type="text/css">
+ body { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; }
+ td { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; }
+ th { font-family:"Verdana", "Arial"; font-size:10pt; font-weight:bold; color:#d8d8d8; background:#505050}
+ li { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; margin-top:3px }
+ ul { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; margin-top:3px }
+ tt { font-size:9pt; color:#505060; }
+ #titel { font-family:"Verdana", "Arial"; font-size:18pt; color:#505060; }
+ #subtitel { font-family:"Verdana", "Arial"; font-size:12pt; font-weight:bold; color:#505060; }
+ #slogan { font-family:"Verdana", "Arial"; font-size:8pt; color:#808090; text-align:justify; width:160px }
+ #block { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; text-align:justify }
+ #klein { font-family:"Verdana", "Arial"; font-size:9pt; color:#505060; margin-top:3px }
+ #info { font-family:"Verdana", "Arial"; font-size:8pt; color:#505060; padding:3px; border:solid 1px #c0c0c0 }
+ #infolist { font-family:"Verdana", "Arial"; font-size:8pt; color:#505060; }
+ a:link {color:#000090}
+ a:visited {color:#000090}
+ a:hover {color:#c03030}
+ a {text-decoration: none}
+</style>
+
+<script language="JavaScript">
+<!--
+function goWin(url) {
+ Fenster=window.open(url,"smallWin","toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=yes,scrollbars=yes,width=500,height=480,top=20,screenY=0,left=20,screenX=0");
+ window.setTimeout("showWin()",300);
+}
+function showWin() { Fenster.focus(); }
+// -->
+</script>
+</head>
+
+<body bgcolor="#FFFFFF" >
+<div style="width:650px">
+
+<!-- Projekt-Logo -->
+<div style="height:42px; font-size:16pt; color:#b0b8c0; background:#003050">
+&#160;Module f&uuml;r Online-Applikationen
+</div>
+<div style="margin-left:8px; margin-top:3px; font-size:8pt; color:#707070; ">
+<!-- Development Center der BRZ GmbH, A-Trust und IAIK Graz -->&#160;
+</div>
+<div style="margin-top:-65px; text-align:right; font-size:8pt; font-weight:bold; color:#d04040;" >
+Projekt <span style="font-size:48pt; ">moa</span>&#160;
+</div>
+<br />
+
+<!-- First Section with Navigation -->
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top">
+<div style="font-weight:bold; margin-top:12px">MOA-ID</div><br />
+<div id="klein"><img src="../moa_images/select.gif" border="0" width="13" height="14" />
+ <b> &Uuml;bersicht</b></div>
+<div id="klein"><a href="id-admin_1.htm"><img src="../moa_images/idle.gif" border="0" width="13" height="14" />
+ <b> Basis-Installation</b></a></div>
+<div id="klein"><a href="id-admin_2.htm"><img src="../moa_images/idle.gif" border="0" width="13" height="14" />
+ <b> Konfiguration </b></a></div>
+<div id="klein"><a href="id-admin_3.htm"><img src="../moa_images/idle.gif" border="0" width="13" height="14" />
+ <b> Optionale<br />&#160; &#160;&#160;Komponenten</b></a></div>
+<br />
+<div id="klein"><a href="moa.htm"><img src="../moa_images/west.gif" border="0" width="13" height="14" />
+ <b> Zur&uuml;ck</b></a></div>
+<br />
+</td>
+
+<td valign="top">
+<div id="titel">MOA ID-Administration v.1.5</div>
+<p id="block">
+Die Komponenten des Moduls Identifikation (MOA-ID), MOA-ID-AUTH und MOA-ID-PROXY, sind als plattformunabh&auml;ngige Webapplikationen ausgelegt.
+MOA-ID-AUTH ist die Basiskomponente des Moduls, und MOA-ID-PROXY ist eine optionale Zusatzkomponente.
+F&uuml;r den Betrieb dieser Webapplikationen wird eine Java Virtual Machine und ein Java Servlet Container vorausgesetzt.
+<br /><br />
+Dieses Handbuch beschreibt die Installation und Konfiguration von MOA-ID-AUTH und von MOA-ID-PROXY, und die Einrichtung der Systemumgebungen.
+</p>
+</td></tr></table>
+<br />
+
+
+
+<div id="szenarien" />
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top" id="klein">
+<p id="titel">&#160;</p>
+</td>
+<td valign="top">
+<p id="titel">&Uuml;bersicht </p>
+<div id="block">
+F&uuml;r den Betrieb von MOA-ID-AUTH sind unterschiedliche Szenarien m&ouml;glich, die unterschiedliche M&ouml;glichkeiten bieten und die Installation unterschiedlicher Software- und Hardware-Komponenten erfordern. Dieser Abschnitt gibt einen kurzen &Uuml;berblick &uuml;ber die notwendige Basis-Installation und optionale weitere Konfigurationsm&ouml;glichkeiten.
+</div>
+</td></tr></table>
+<br />
+
+<div id="szenarien1" />
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top" id="klein">
+<p id="subtitel">&#160;</p>
+</td>
+<td valign="top">
+<div id="subtitel">Basis-Installation von MOA-ID-AUTH</div>
+<div id="block">
+Die Basis-Installation stellt einerseits die minimalen Anforderungen f&uuml;r den Betrieb von MOA-ID-AUTH dar, andererseits dient sie als Ausgangspunkt f&uuml;r weitere (optionale) Konfigurations-M&ouml;glichkeiten.
+<br /><br />
+Folgende Software ist Voraussetzung f&uuml;r die Basis-Installation:
+
+<ul>
+<li>JDK 1.4.0, JDK 1.4.2, JDK 1.5.0 oder JDK 1.6</li>
+<li>Tomcat 4.1.31, Tomcat 5.0.28, Tomcat 5.5 oder Tomcat 6</li>
+<li>MOA-ID-AUTH 1.5 </li>
+<li>MOA SP/SS 1.5 oder neuer (entweder als WebService oder direkt als interne Bibliothek)</li>
+</ul>
+</div>
+<div id="block">
+Um m&ouml;glichen Versionskonflikten aus dem Weg zu gehen sollten stets die neuesten Versionen von MOA-ID als auch von MOA-SP/SS verwendet werden. <br/>
+In diesem Betriebs-Szenario wird MOA-ID-AUTH in Tomcat deployt. Tomcat fungiert gleichzeitig als HTTP- und HTTPS-Endpunkt f&uuml;r MOA-ID-AUTH. Beide Protokolle werden direkt in Tomcat konfiguriert.
+<br/><br/>
+Die Webapplikation verwendet Log4j als Logging Toolkit.
+</div>
+</table>
+<br />
+
+<div id="szenarien2" />
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top" id="klein">
+<p id="subtitel">&#160;</p>
+</td>
+<td valign="top">
+<p id="subtitel">Basis-Installation von MOA-ID-PROXY (optional)</p>
+<div id="block">
+Einer Online-Applikation, f&uuml;r die MOA-ID-AUTH die Authentisierung &uuml;bernimmt, kann die Komponente MOA-ID-PROXY vorgeschaltet werden. Diese Komponente &uuml;bernimmt die Anmeldedaten von MOA-ID-AUTH, f&uuml;hrt die Anmeldung an der Online Applikation durch und schleust in der Folge Daten an die Online-Applikation und Daten an den Benutzer durch.
+
+Die Basis-Installation von MOA-ID-PROXY geschieht im Wesentlichen analog zur Basis-Installation von MOA-ID-AUTH.
+<br/><br/>
+MOA-ID-AUTH und MOA-ID-PROXY k&ouml;nnen in verschiedenen Konstellationen zum Einsatz gebracht werden:
+<ul>
+<li>auf verschiedenen Rechnern</li>
+<li>auf ein und demselben Rechner in verschiedenen Java Servlet Containern</li>
+<li>auf ein und demselben Rechner in ein und demselben Java Servlet Container</li>
+</ul>
+ <br />
+Ausgehend von der Basis-Installation k&ouml;nnen die optionalen Konfigurationen, die in den nachfolgenden Abschnitten beschrieben werden, unabh&auml;ngig und in beliebiger Kombination aufgesetzt werden.
+</div>
+</td></tr></table>
+<br />
+
+<div id="szenarien3" />
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top" id="klein">
+<p id="subtitel">&#160;</p>
+</td>
+<td valign="top">
+<p id="subtitel">Konfiguration mit vorgeschaltetem Webserver (optional)</p>
+<div id="block">
+Den MOA ID Webapplikationen kann jeweils optional ein Webserver vorgeschaltet sein. Unter Microsoft Windows ist das im Regelfall der Microsoft Internet Information Server (MS IIS), auf Unix-Systemen kommt &uuml;blicherweise der Apache Webserver zum Einsatz.
+<br /><br />
+ Folgende Software ist unter Windows Voraussetzung:
+</div>
+<ul>
+<li>MS IIS 5.0 </li>
+<li>Jakarta mod_jk 1.2.2 </li>
+</ul>
+<div id="block">Folgende Software ist unter Unix/Linux Voraussetzung: <div id="block">
+<ul>
+<li>Apache Webserver 2.0.x mit mod_SSL </li>
+<li>Jakarta mod_jk 1.2.2 </li>
+</ul>
+<div id="block">In diesem Fall &uuml;bernimmt der vorgeschaltete Webserver die Funktion des HTTP- und HTTPS-Endpunktes. Beide Protokolle werden im Webserver konfiguriert.
+<br /><br />
+Mittels mod_jk werden die Webservice-Aufrufe, die im vorgeschalteten Webserver eintreffen, an Tomcat weiter geleitet, bzw. die Antwort von Tomcat wieder an den Webserver zur&uuml;ck &uuml;bermittelt.
+</div>
+</div></div></td></tr></table>
+<br />
+
+<div id="szenarien4" />
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top" id="klein">
+<p id="subtitel">&#160;</p>
+</td>
+<td valign="top">
+<p id="subtitel">Konfiguration mit PostgreSQL (optional)</p>
+<div id="block">
+Das MOA ID Webservice kann eine PostgreSQL Datenbank nutzen, um:
+</div>
+<ul>
+<li>Log-Meldungen zu speichern </li>
+</ul>
+<div id="block">F&uuml;r den Zugriff auf PostgreSQL ist die Installation folgender Software Voraussetzung: </div>
+<ul>
+<li>PostgreSQL 7.3</li>
+</ul>
+</td></tr></table>
+<br />
+
+<div id="szenarien5" />
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top" id="klein">
+<p id="subtitel">&#160;</p>
+</td>
+<td valign="top">
+<p id="subtitel">Zusammenfassung</p>
+<div id="block">
+Notwendig f&uuml;r den Betrieb von MOA ID ist eine Basis-Installation. Weitere optionale Konfigurationen k&ouml;nnen unabh&auml;ngig und in beliebiger Kombination miteinander durchgef&uuml;hrt werden, um eine bessere Integration der MOA ID Webapplikationen in die vorhandene Betriebs-Infrastruktur zu erreichen.
+</div>
+</td></tr></table>
+<br /><br />
+
+
+
+<div id="referenzen" />
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top" id="klein">
+<p id="subtitel">&#160;</p>
+</td>
+<td valign="top">
+<p id="titel">Referenzierte Software</p>
+<div id="block">
+Die Versionsangaben beziehen sich auf die Versionen, mit denen die MOA ID Webapplikationen entwickelt und getestet wurde. Geringf&uuml;gig andere Software-Versionen stellen &uuml;blicherweise kein Problem dar.
+</div>
+<br /><br />
+<div id="block">
+ <table border="1" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <th width="59%">Komponente</th>
+ <th width="41%">Getestete Version</th>
+ </tr>
+ <tr>
+ <td width="59%"><b>JDK (SDK)</b> </td>
+ <td width="41%"><p>min. <a href="http://java.sun.com/j2se/1.4.0/download.html">1.4.0</a> bzw. <a href="http://java.sun.com/j2se/1.4.2/download.html"><br>
+ 1.4.2</a><br/>
+ <a href="http://java.sun.com/j2se/1.5.0/download.html">1.5.0</a><br/>
+ <a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">1.6.0</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td width="59%" height="21"><b>Tomcat</b></td>
+ <td width="41%" height="21">
+ <p><a href="http://archive.apache.org/dist/tomcat/tomcat-4/v4.1.31/bin/jakarta-tomcat-4.1.31.zip">4.1.31</a><br/>
+ <a href="http://tomcat.apache.org/download-55.cgi">5.5.x</a><br/>
+ <a href="http://tomcat.apache.org/download-60.cgi">6.0.x</a></p>
+ </td>
+ </tr>
+ <tr>
+ <td width="59%"><b>MOA-ID-AUTH </b></td>
+ <td width="41%"><a href="http://egovlabs.gv.at/frs/?group_id=6&release_id=5">1.5 (neueste Version) </a></td>
+ </tr>
+ <tr>
+ <td width="59%"><b>MOA-ID-PROXY </b></td>
+ <td width="41%"><a href="http://egovlabs.gv.at/frs/?group_id=6&release_id=5">1.5 (neueste Version)</a></td>
+ </tr>
+ <tr>
+ <td width="59%"><b>MOA-SPSS </b></td>
+ <td width="41%"><a href="http://egovlabs.gv.at/frs/?group_id=6&release_id=5">1.5 (neueste Version)</a>&#160;</td>
+ </tr>
+ <tr>
+ <td width="59%"><b>Apache Webserver </b></td>
+ <td width="41%"><a href="http://httpd.apache.org/">1.3.X</a>
+ bzw.<br>
+ <a href="http://httpd.apache.org/">2.0.X</a></td>
+ </tr>
+ <tr>
+ <td width="59%"><b>Microsoft Internet Information Server
+ </b></td>
+ <td width="41%"><a href="http://www.microsoft.com/windows2000/en/server/iis/default.asp">5.0</a>&#160; <br/>
+ <a href="http://www.microsoft.com/WindowsServer2003/iis/default.mspx">6.0</a>&#160; </td>
+ </tr>
+ <tr>
+ <td width="59%"><b>mod_SSL </b></td>
+ <td width="41%">(<a href="http://httpd.apache.org/docs-2.0/ssl/">**</a>)&#160;
+ </td>
+ </tr>
+ <tr>
+ <td width="59%"><b>Jakarta mod_jk </b></td>
+ <td width="41%"><a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/">1.2.2&#160;</a>
+ </td>
+ </tr>
+ <tr>
+ <td width="59%"><b>Jakarta Log4j </b></td>
+ <td width="41%"><a href="http://jakarta.apache.org/log4j/docs/index.html">1.2.8</a>&#160;
+ </td>
+ </tr>
+ <tr>
+ <td width="59%"><b>PostgreSQL </b></td>
+ <td width="41%"><a href="http://techdocs.postgresql.org/installguides.php">7.3</a>&#160;
+ </td>
+ </tr>
+ </table>
+</div>
+<br />
+ <br />
+
+ <div id="block"> (**) passend zur Version des Apache Webservers </div>
+</td></tr></table>
+<br /><br />
+
+
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top"><br /></td>
+<td valign="top">
+<hr />
+<div style="font-size:8pt; color:#909090">&copy; 2004</div>
+</td></tr></table>
+<br />
+
+
+</div>
+</div></div></div></div></div></div></body>
+</html>
diff --git a/id/server/doc/moa_id/id-admin_1.htm b/id/server/doc/moa_id/id-admin_1.htm
new file mode 100644
index 000000000..2b3ade1ed
--- /dev/null
+++ b/id/server/doc/moa_id/id-admin_1.htm
@@ -0,0 +1,549 @@
+<html>
+<head>
+ <title>MOA ID-Administration</title>
+ <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
+ <meta content="heinz.rosenkranz@brz.gv.at" name="author"/>
+
+<style type="text/css">
+ body { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; }
+ td { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; }
+ th { font-family:"Verdana", "Arial"; font-size:10pt; font-weight:bold; color:#d8d8d8; background:#505050}
+ li { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; margin-top:3px }
+ ul { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; margin-top:3px }
+ tt { font-size:9pt; color:#505060; }
+ pre { font-size:9pt; color:#505060; }
+ #titel { font-family:"Verdana", "Arial"; font-size:18pt; color:#505060; }
+ #subtitel { font-family:"Verdana", "Arial"; font-size:12pt; font-weight:bold; color:#505060; }
+ #slogan { font-family:"Verdana", "Arial"; font-size:8pt; color:#808090; text-align:justify; width:160px }
+ #block { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; text-align:justify }
+ #klein { font-family:"Verdana", "Arial"; font-size:9pt; color:#505060; margin-top:3px }
+ #info { font-family:"Verdana", "Arial"; font-size:8pt; color:#505060; padding:3px; border:solid 1px #c0c0c0 }
+ #infolist { font-family:"Verdana", "Arial"; font-size:8pt; color:#505060; }
+ a:link {color:#000090}
+ a:visited {color:#000090}
+ a:hover {color:#c03030}
+ a {text-decoration: none}
+</style>
+
+<script language="JavaScript">
+<!--
+function goWin(url) {
+ Fenster=window.open(url,"smallWin","toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=yes,scrollbars=yes,width=500,height=480,top=20,screenY=0,left=20,screenX=0");
+ window.setTimeout("showWin()",300);
+}
+function showWin() { Fenster.focus(); }
+// -->
+</script>
+</head>
+
+<body bgcolor="#FFFFFF" >
+<div style="width:650px">
+
+<!-- Projekt-Logo -->
+<div style="height:42px; font-size:16pt; color:#b0b8c0; background:#003050">
+&#160;Module f&uuml;r Online-Applikationen
+</div>
+<div style="margin-left:8px; margin-top:3px; font-size:8pt; color:#707070; ">
+<!-- Development Center der BRZ GmbH, A-Trust und IAIK Graz -->&#160;
+</div>
+<div style="margin-top:-65px; text-align:right; font-size:8pt; font-weight:bold; color:#d04040;" >
+Projekt <span style="font-size:48pt; ">moa</span>&#160;
+</div>
+<br />
+
+<!-- First Section with Navigation -->
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top">
+<div style="font-weight:bold; margin-top:12px">MOA-ID</div><br />
+<div id="klein"><a href="id-admin.htm"><img src="../moa_images/idle.gif" border="0" width="13" height="14" />
+ <b> &Uuml;bersicht</b></a></div>
+<div id="klein"><img src="../moa_images/select.gif" border="0" width="13" height="14" />
+ <b> Basis-Installation</b></div>
+<div id="klein"><a href="id-admin_2.htm"><img src="../moa_images/idle.gif" border="0" width="13" height="14" />
+ <b> Konfiguration </b></a></div>
+<div id="klein"><a href="id-admin_3.htm"><img src="../moa_images/idle.gif" border="0" width="13" height="14" />
+ <b> Optionale<br />&#160; &#160;&#160;Komponenten</b></a></div>
+<br />
+<div id="klein"><a href="moa.htm"><img src="../moa_images/west.gif" border="0" width="13" height="14" />
+ <b> Zur&uuml;ck</b></a></div>
+<br />
+<div id="slogan">
+<b>Installationsschritte: </b>
+<br />
+<a href="#vorbereitung"><b>Vorbereitung</b></a><br />
+<a href="#Tomcat"><b>Tomcat Konfiguration</b></a><br />
+<a href="#deployment_ak"><b>Deployment<br/>MOA-ID-AUTH</b></a><br />
+<a href="#deployment_pk"><b>Deployment<br/>MOA-ID-PROXY</b></a><br />
+<a href="#Tomcat_Start"><b>Tomcat Start/Stop</b></a><br />
+<a href="#Logging"><b>Logging</b></a><br />
+</div>
+</td>
+
+<td valign="top">
+<p id="titel">Basis-Installation v.1.5</p>
+Bei der Basis-Installation von MOA-ID-AUTH und von MOA-ID-PROXY ist grunds&auml;tzlich gleichartig vorzugehen.
+Unterschiede sind in der Installationsanweisung angef&uuml;hrt.
+<div id="vorbereitung" />
+<p id="subtitel">Vorbereitung</p>
+<div id="block">
+ <p><b>Installation des JDK</b><br />
+ Installieren Sie das JDK in ein
+ beliebiges Verzeichnis. Das Wurzelverzeichnis der JDK-Installation
+ wird im weiteren Verlauf als $JAVA_HOME bezeichnet. <br />
+ <br />
+ <b>Installation von Tomcat</b><br />
+ Installieren Sie Tomcat in ein Verzeichnis, das <b>keine Leer- und
+ Sonderzeichen</b> im Pfadnamen enth&auml;lt. Am Besten verwenden
+ die referenzierte Version von Tomcat im zip-Format. (Hinweis f.
+ Windows: nicht die selbstinstallierende exe Version verwenden.)
+ Das Wurzelverzeichnis der Tomcat-Installation wird im weiteren Verlauf
+ als $CATALINA_HOME bezeichnet.<br />
+ <br />
+ <b>Entpacken der MOA ID Webapplikation</b><br />
+ Entpacken Sie die ausgelieferten Dateien der Webapplikation (moa-id-auth-x.y.zip
+ oder moa-id-proxy-x.y.zip; ersetzen Sie x.y durch die Releasenummer
+ von MOA-ID-AUTH bzw. MOA-ID-PROXY) in ein beliebiges Verzeichnis.
+ Diese Verzeichnisse werden im weiteren Verlauf als $MOA_ID_INST_AUTH
+ bzw. $MOA_ID_INST_PROXY bezeichnet. <br />
+ <br />
+ <b>Installation der IAIK JCE und des IAIK LDAP Protocol Handlers</b><br />
+ Die Dateien aus dem Verzeichnis $MOA_ID_INST_AUTH/ext (oder $MOA_ID_INST_PROXY/ext)
+ m&uuml;ssen in das Verzeichnis $JAVA_HOME/jre/lib/ext kopiert werden.
+ Anschlie&szlig;end steht eine Unterst&uuml;tzung f&uuml;r Kryptographie
+ und SSL jeder Java-Anwendung die dieses JDK verwendet zur Verf&uuml;gung.<br>
+ <br />
+ Zus&auml;tzlich m&uuml;ssen die so genannten Unlimited Strength
+ Jurisdiction Policy Files heruntergeladen, entpackt
+ und ins Verzeichnis $JAVA_HOME/jre/lib/security kopiert werden. </p>
+ <p>Der Download f&uuml;r diese Dateien findet sich am unteren Ende
+ der Download-Seite des jeweiligen JDK in der Sektion "Other
+ Downloads". D.h. JDK <a href="http://java.sun.com/j2se/1.4.0/download.html">
+ hier f&uuml;r 1.4.0</a>, das JDK <a href="http://java.sun.com/j2se/1.4.2/download.html">hier
+ f&uuml;r 1.4.2</a>, das JDK <a href="http://java.sun.com/j2se/1.5.0/download.html">hier
+ f&uuml;r 1.5.0</a> bzw. das JDK <a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">hier
+ f&uuml;r 1.6.0</a></p>
+ </div>
+
+</td></tr></table>
+
+<div id="Tomcat" />
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<td width="170" valign="top" id="klein">
+<p id="subtitel">&#160;</p>
+<div id="slogan">
+<br /><br />
+</div>
+</td>
+<td valign="top">
+<p id="subtitel">Konfiguration von Tomcat</p>
+<div id="block">
+<b>Minimale Konfiguration</b> <br />
+Die zentrale Konfigurations-Datei von Tomcat ist $CATALINA_HOME/conf/server.xml. Tomcat wird grunds&auml;tzlich mit
+einer funktionierenden Default-Konfiguration ausgeliefert, die jedoch einiges an Ballast enth&auml;lt und viele Ports
+offen l&auml;sst. Die Datei server.xml im Verzeichnis mit der Versionsnummer des verwendeten Tomcats unter $MOA_ID_INST_AUTH/tomcat (bzw. $MOA_ID_INST_PROXY/tomcat) enth&auml;lt eine minimale
+Tomcat-Konfiguration, die je einen Connector f&uuml;r HTTP und f&uuml;r HTTPS freischaltet. Die jeweilige Datei server.mod_jk.xml schaltet zus&auml;tzlich den AJP Connector Port f&uuml;r den Apache Webserver frei (falls diese Datei verwendet werden soll ist sie zuvor noch auf server.xml umzubenennen).<br /><br />
+<b>SSL</b><br />
+F&uuml;r den sicheren Betrieb von MOA-ID-AUTH ist die Verwendung von SSL Voraussetzung, sofern nicht ein vorgelagerter WebServer (Apache oder IIS) das SSL-Handling &uuml;bernimmt.
+Ebenso kann SSL auch f&uuml;r MOA-ID-PROXY verwendet werden.
+Das Dokument <a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html" target="_new">Tomcat SSL Configuration HOW-TO</a> gibt einen guten &Uuml;berblick &uuml;ber die Konfiguration von SSL in Tomcat. Da die f&uuml;r SSL notwendigen Bibliotheken bereits im Abschnitt "Vorbereitung" eingebunden wurden, sind nur noch folgende Schritte notwendig:
+</div>
+<ul>
+<li>Erstellung eines Server-Keystores, welches den privaten Schl&uuml;ssel des Servers sowie das Server-Zertifikat enth&auml;lt,
+z.B. mit dem <a href="http://java.sun.com/j2se/1.3/docs/tooldocs/win32/keytool.html" target="_new"> Java Keytool</a>. <br />
+<b>Hinweis:</b> Standardm&auml;&szlig;ig wird beim Erzeugen eines neuen Keystores im Home-Verzeichnis des Benutzers die Datei ".keystore" angelegt. M&ouml;chte man den Dateinamen und Pfad &auml;ndern, kann man das dem SSL-Connector in $CATALINA_HOME/conf/server.xml durch hinzuf&uuml;gen des Attributes <i>keystoreFile="NAME DES KEYSTORES"</i> im Element &lt;Factory&gt; bekannt machen. Das zum Keystore geh&ouml;rende Passwort &uuml;bergibt man Tomcat mittels des Attributes <i>keystorePass= "PASSWORT DES KEYSTORES"</i> im Element &lt;Factory&gt;. </li>
+<li>Erstellung eines Keystores mit vertrauensw&uuml;rdigen Client-Zertifikaten, z.B. mit dem <a href="http://java.sun.com/j2se/1.3/docs/tooldocs/win32/keytool.html" target="_new"> Java Keytool</a> (nur, wenn SSL Client-Authentisierung verwendet werden soll) </li>
+<li>Falls eine Client-Authentisierung gew&uuml;nscht ist, muss die Konfiguration des SSL-Connectors in $CATALINA_HOME/conf/server.xml angepasst werden.</li>
+</ul>
+
+<div id="block">
+<b>MOA Administrator</b><br />
+Der Aufruf der URL f&uuml;r die dynamische Konfiguration von MOA-ID-AUTH ist durch eine Passwort-Abfrage gesch&uuml;tzt, und kann nur von Benutzern aufgerufen werden, die der Benutzer-Rolle <tt>moa-admin</tt> zugeordnet werden k&ouml;nnen.<br />
+Um diese Benutzer-Rolle und einen oder mehrere Benutzer einzurichten, m&uuml;ssen in der Datei $CATALINA_HOME/conf/tomcat-users.xml unter dem Element <tt>&lt;tomcat-users&gt;</tt> sinngem&auml;&szlig; folgende Eintr&auml;ge hinzugef&uuml;gt werden:
+<pre>
+&lt;role rolename="moa-admin"/&gt;
+&lt;user username="moa" password="moa" roles="moa-admin"/&gt;
+</pre>
+</div>
+</td></tr></table>
+
+<div id="deployment_ak" />
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<td width="170" valign="top" id="klein">
+<p id="subtitel">&#160;</p>
+<div id="slogan">
+<br /><br />
+</div>
+</td>
+<td valign="top">
+<p id="subtitel">Deployment von MOA-ID-AUTH in Tomcat</p>
+<div id="block">
+Um MOA-ID-AUTH in Tomcat f&uuml;r den Ablauf vorzubereiten, sind folgende Schritte notwendig: <br />
+ <ul>
+ <li>Die Datei $MOA_ID_INST_AUTH/moa-id-auth.war wird ins Verzeichnis
+ $CATALINA_HOME/webapps kopiert. Dort wird sie beim ersten Start
+ von Tomcat automatisch ins Verzeichnis $CATALINA_HOME/webapps/moa-id-auth
+ entpackt. </li>
+ <li>Die MOA-ID Konfigurationsdatei und die zugeh&ouml;rigen Verzeichnisse
+ "certs" und "transforms" werden in ein beliebiges Verzeichnis
+ im Filesystem kopiert (z.B. $CATALINA_HOME/conf/moa-id). <br />
+ Im Verzeichnis $MOA_ID_INST_AUTH/conf/moa-id befinden sich
+ acht verschiedene Beispielkonfigurationen, die als Ausgangspunkte
+ f&uuml;r die Konfiguration von MOA-ID-AUTH dienen k&ouml;nnen:
+ <ul>
+ <li>SampleMOAIDConfiguration.xml: Konfiguration von MOA-ID f&uuml;r
+ eine Anwendung aus dem &ouml;ffentlichen Bereich.
+ <br>Karte: B&uuml;rgerkarte
+ <br>Konfiguration ohne Proxykomponente</li>
+ <li>SampleMOAIDConfiguration_withTestBKs.xml: Konfiguration von MOA-ID
+ f&uuml;r eine Anwendung aus dem &ouml;ffentlichen Bereich.
+ <br>Karte: B&uuml;rgerkarte und Testkarte
+ <br>Konfiguration ohne Proxykomponente</li>
+ <li>SampleMOAWIDConfiguration.xml: Konfiguration von MOA-ID f&uuml;r
+ eine Anwendung aus dem privatwirtschaftlichen Bereich (MOA-WID Modus).
+ <br>Karte: B&uuml;rgerkarte
+ <br>Konfiguration ohne Proxykomponente</li>
+ <li>SampleMOAWIDConfiguration_withTestBKs.xml: Konfiguration von MOA-ID f&uuml;r
+ eine Anwendung aus dem privatwirtschaftlichen Bereich (MOA-WID Modus).
+ <br>Karte: B&uuml;rgerkarte und Testkarte
+ <br>Konfiguration ohne Proxykomponente</li>
+ <li id="sampleProxyConfig">SampleMOAIDConfigurationProxy.xml: Konfiguration von MOA-ID f&uuml;r
+ eine Anwendung aus dem &ouml;ffentlichen Bereich.
+ <br>Karte: B&uuml;rgerkarte
+ <br>Konfiguration mit <a href="#deployment_pk">Proxykomponente</a>.</li>
+ <li>SampleMOAIDConfiguration_withTestBKsProxy.xml: Konfiguration von MOA-ID
+ f&uuml;r eine Anwendung aus dem &ouml;ffentlichen Bereich.
+ <br>Karte: B&uuml;rgerkarte und Testkarte
+ <br>Konfiguration mit <a href="#deployment_pk">Proxykomponente</a></li>
+ <li>SampleMOAWIDConfigurationProxy.xml: Konfiguration von MOA-ID f&uuml;r
+ eine Anwendung aus dem privatwirtschaftlichen Bereich (MOA-WID Modus).
+ <br>Karte: B&uuml;rgerkarte
+ <br>Konfiguration mit <a href="#deployment_pk">Proxykomponente</a></li>
+ <li>SampleMOAWIDConfiguration_withTestBKsProxy.xml: Konfiguration von MOA-ID f&uuml;r
+ eine Anwendung aus dem privatwirtschaftlichen Bereich (MOA-WID Modus).
+ <br>Karte: B&uuml;rgerkarte und Testkarte
+ <br>Konfiguration mit <a href="#deployment_pk">Proxykomponente</a></li>
+ </ul>
+ </li>
+ <li>Die endorsed Libraries f&uuml;r Tomcat m&uuml;ssen aus dem
+ Verzeichnis $MOA_ID_INST_AUTH/endorsed in das Tomcat-Verzeichnis
+ $CATALINA_HOME/common/endorsed kopieren werden. F&uuml;r Tomcat 6 m&uuml;ssen die Dateien in das Verzeichnis $CATALINA_HOME/endorsed kopiert werden (das Verzeichnis endorsed ist dabei im Allgemein erst anzulegen). Folgende Libraries
+ sind f&uuml;r das Deployment im endorsed Verzeichnis vorgesehen:
+ <ul>
+ <li>xalan.jar</li>
+ <li>serializer.jar (f&uuml;r Xalan ben&ouml;tigt)</li>
+ <li>xml-apis.jar</li>
+ <li id="klein">xercesImpl.jar</li>
+ </ul>
+ Eventuell vorhandene Dateien mit dem gleichen Namen m&uuml;ssen
+ ersetzt werden. Die ggf. in diesem Verzeichnis vorhandene Datei
+ <code>xmlParserAPIs.jar</code> muss gel&ouml;scht werden.</li>
+ <li>Folgende Java System Properties sind zu setzen: <br />
+ <ul id="klein">
+ <li id="klein">moa.id.configuration=Name der MOA ID Konfigurationsdatei.
+ Eine beispielhafte MOA ID Konfiguration ist in $MOA_ID_INST_AUTH/conf/moa-id/
+ SampleMOAIDConfiguration.xml enthalten.</li>
+ <li id="klein">log4j.configuration=URL der Log4j Konfigurationsdatei.
+ Eine beispielhafte Log4j-Konfiguration ist in $MOA_ID_INST_AUTH/conf/moa-id/log4j.properties
+ enthalten. </li>
+ <li id="klein">javax.net.ssl.trustStore=Name des Truststores
+ f&uuml;r vertrauensw&uuml;rdige SSL Client-Zertifikate (optional;
+ nur, wenn SSL Client-Authentisierung durchgef&uuml;hrt werden
+ soll). <br>
+ </li>
+ </ul>
+ Diese Java System-Properties werden Tomcat &uuml;ber die Umgebungsvariable
+ CATALINA_OPTS mitgeteilt (Beispiel-Skripte zum Setzen dieser
+ Properties f&uuml;r <b>Windows</b> und f&uuml;r <b>Unix bzw.
+ Linux</b> finden sie unter $MOA_ID_INST_AUTH/tomcat/win32 bzw.
+ $MOA_ID_INST_AUTH/tomcat/unix). Diese Skripte k&ouml;nnen sie nach $CATALINA_HOME kopieren und in Folge von dort starten nachdem die Variablen CATALINA_HOME sowie JAVA_HOME in den Skripten entsprechend den Pfaden der Installation gesetzt wurden.
+ </ul>
+</div>
+</td></tr></table>
+
+
+<div id="deployment_pk" />
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<td width="170" valign="top" id="klein">
+<p id="subtitel">&#160;</p>
+<div id="slogan">
+<br /><br />
+</div>
+</td>
+<td valign="top">
+<p id="subtitel">Deployment von MOA-ID-PROXY in Tomcat</p>
+<div id="block">
+Um MOA-ID-PROXY in Tomcat f&uuml;r den Ablauf vorzubereiten, sind folgende Schritte notwendig:
+<br />
+ <ul>
+ <li>
+ <b>F&uuml;r Tomcat 4.1.31:</b>
+ <ul>
+ <li>Die Datei $MOA_ID_INST_PROXY/moa-id-proxy.war wird in ein
+ beliebiges Verzeichnis (bspw. $CATALINA_HOME/webappsProxy) kopiert. <b>HINWEIS:
+ Das Verzeichnis darf sich NICHT unterhalb $CATALINA_HOME/webapps befinden!</b><br/>
+ </li>
+ <li>Anschlie&szlig;end muss in der Datei <tt>$CATALINA_HOME/conf/server.xml</tt> der
+ Tomcat-Root-Context auf diese Datei gesetzt werden: wenn
+ das war-file sich in $CATALINA_HOME/webappsProxy befindet, geschieht dies
+ mit dem Einf&uuml;gen von folgendem Element innerhalb von
+ <tt>&lt;Server&gt;...&lt;Service&gt;...&lt;Engine&gt;...&lt;Host&gt;</tt>:
+ <pre>&lt;Context path=""
+ docBase="../webappsProxy/moa-id-proxy.war"
+ debug="0"/&gt;</pre>
+ Anmerkung: Der Root-Context von Tomcat ist normalerweise auskommentiert.
+ </li>
+ </ul>
+ </li>
+ <li>
+ <b>F&uuml;r Tomcat 5.0.28:</b>
+ <ul>
+ <li>Die Datei $MOA_ID_INST_PROXY/moa-id-proxy.war ist in ein
+ beliebiges Verzeichnis (bspw. $CATALINA_HOME/webappsProxy) <b>zu entpacken</b>
+ (diese Datei ist mittels ZIP Algorithmus komprimiert und kann mit jedem Tool,
+ das mit .ZIP-Dateien umgehen kann, ge&ouml;ffnet werden). <b>HINWEIS:
+ Das Verzeichnis darf sich NICHT unterhalb $CATALINA_HOME/webapps befinden!</b><br/>
+ </li>
+ <li>Anschlie&szlig;end muss in der Datei <tt>$CATALINA_HOME/conf/server.xml</tt> der
+ Tomcat-Root-Context auf diese Datei gesetzt werden: wenn die Proxy Web-Applikation
+ nach $CATALINA_HOME\webappsProxy entpackt wurde, geschieht dies mit dem Einf&uuml;gen
+ von folgendem Element innerhalb von
+ <tt>&lt;Server&gt;...&lt;Service&gt;...&lt;Engine&gt;...&lt;Host&gt;</tt>: </li>
+ <pre>&lt;Context path="" docBase="../webappsProxy"
+ debug="0"/&gt;</pre>
+ Alternativ kann statt die Datei server.xml zu &auml;ndern in <tt>$CATALINA_HOME\conf\Catalina\localhost</tt> eine Datei moa-id-proxy.xml mit vorhin angegebenen Inhalt erstellt werden.
+ </ul>
+ </li>
+ </ul>
+
+ <br />
+ <b>Tomcat Konfiguration:</b>
+ <ul>
+ <li>Die MOA-ID Konfigurationsdatei und die zugeh&ouml;rigen
+ Verzeichnisse "certs" und "oa" werden in ein beliebiges Verzeichnis
+ im Filesystem kopiert (z.B. $CATALINA_HOME/ conf/moa-id).
+ <br />
+ Im Verzeichnis $MOA_ID_INST_PROXY/conf/moa-id befinden sich
+ vier verschiedene <a href="#sampleProxyConfig">Beispielkonfigurationen</a>,
+ die als Ausgangspunkte f&uuml;r die Konfiguration von MOA-ID-PROXY
+ dienen k&ouml;nnen.
+ </li>
+ <li>Die endorsed Libraries f&uuml;r Tomcat m&uuml;ssen aus dem
+ Verzeichnis $MOA_ID_INST_PROXY/endorsed in das Tomcat-Verzeichnis
+ $CATALINA_HOME/common/endorsed kopiert werden. Folgende Libraries
+ sind f&uuml;r das Deployment im endorsed Verzeichnis vorgesehen:
+ <ul>
+ <li id="klein">Xerces-J-2.4.0 (bestehend aus xercesImpl.jar
+ und xmlParserAPIs.jar)</li>
+ </ul>
+ Eventuell vorhandene Dateien mit dem gleichen Namen m&uuml;ssen
+ ersetzt werden.
+ </li>
+ <li>Folgende Java System Properties sind zu setzen: <br />
+ <ul id="klein">
+ <li id="klein">moa.id.configuration=Name der MOA ID Konfigurationsdatei.
+ Eine beispielhafte MOA ID Konfiguration ist in $MOA_ID_INST_AUTH/conf/moa-id/
+ SampleMOAIDConfiguration.xml enthalten.</li>
+ <li id="klein">log4j.configuration=URL der Log4j Konfigurationsdatei.
+ Eine beispielhafte Log4j-Konfiguration ist in $MOA_ID_INST_AUTH/conf/moa-id/log4j.properties
+ enthalten. </li>
+ <li id="klein">javax.net.ssl.trustStore=Name des Truststores
+ f&uuml;r vertrauensw&uuml;rdige SSL Client-Zertifikate
+ (optional; nur, wenn SSL Client-Authentisierung durchgef&uuml;hrt
+ werden soll). </li>
+ </ul>
+ </li>
+ Diese Java System-Properties werden Tomcat &uuml;ber die Umgebungsvariable
+ CATALINA_OPTS mitgeteilt (siehe Deployment von MOA-ID-AUTH<a href="examples/moa-id-env.sh.txt"></a>).
+ <br>
+ <br>
+ Beispiel-Skripts zum Setzen von CATALINA_OPTS und zum Starten
+ von Tomcat sind in $MOA_ID_INST_AUTH\tomcat\ zu finden - Sie
+ k&ouml;nnen diese f&uuml;r Ihre Zwecke adaptieren (JAVA_HOME
+ und $CATALINA_HOME setzen) und nach $CATALINA_HOME kopieren.
+ </ul>
+</div>
+</td></tr></table>
+
+<div id="Tomcat_Start" />
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<td width="170" valign="top" id="klein">
+<p id="subtitel">&#160;</p>
+<div id="slogan">
+<br /><br />
+</div>
+</td>
+<td valign="top">
+<p id="subtitel">Starten und Stoppen von Tomcat </p>
+ <div id="block"> Nach dem Deployment und der Konfiguration kann
+ Tomcat aus seinem Wurzelverzeichnis ($CATALINA_HOME) mit <br />
+ <pre>
+ startTomcat (unter Windows) oder
+ moa-id-env.sh
+ bin/catalina.sh start (unter Unix/Linux)
+</pre>
+gestartet werden. Das Stoppen von Tomcat erfolgt analog mit <br />
+<pre>
+ bin\catalina stop (unter Windows) oder
+ bin/catalina.sh stop (unter Unix/Linux)
+</pre>
+Ein erfolgreicher Startvorgang von MOA-ID-AUTH ist an folgender Log-Meldung ersichtlich: <br />
+<pre>
+ INFO | 08 13:33:38,497 | main |
+ MOA ID Authentisierung wurde
+ erfolgreich gestartet
+</pre>
+Analog bei MOA-ID-PROXY: <br/>
+<pre>
+ INFO | 08 13:35:49,876 | main |
+ MOA ID Proxy wurde erfolgreich gestartet
+</pre>
+
+Nach dem erfolgreichen Starten von Tomcat steht MOA-ID-AUTH unter der URL
+<pre>
+http(s)://host:port/moa-id-auth/StartAuthentication
+</pre>
+zur Verf&uuml;gung. Der WebService ist unter
+<pre>
+http(s)://host:port/moa-id-auth/services/GetAuthenticationData
+</pre>
+<p>erreichbar. Die Verf&uuml;gbarkeit der Anwendung kann &uuml;berpr&uuml;ft werden, indem die URLs mit einem Web-Browser aufgerufen werden.</p>
+<p><strong>Musterseite (MOA-Template zur B&uuml;rgerkartenauswahl)</strong><br />
+Nach dem erfolgreichen Starten von Tomcat steht eine Musterseite unter der URL</p>
+<pre>
+http(s)://host:port/moa-id-auth/index.html</pre>
+<p>zur Verf&uuml;gung. Diese Musterseite bietet eine integrierte Darstellung der B&uuml;rgerkartenauswahl bei MOA-ID. Die Musterseite stellt dabei beispielhaft dar, wie eine B&uuml;rgerkartenauswahl m&ouml;glichst nahtlos in MOA-ID integriert werde kann. Sie umfa&szlig;t dabei vorkonfigurierte Loginm&ouml;glichkeiten mittels Online-BKU, lokaler BKU und Handy-BKU. <em>Anmerkung</em>: Um sich &uuml;ber die Musterseite einloggen zu k&ouml;nnen, m&uuml;ssen noch die Parameter f&uuml;r den MOA-ID Aufruf angegeben werden - siehe Dokumentation der Musterseite, die &uuml;ber die Musterseite verlinkt ist bzw. &uuml;ber folgende URL abgerufen werden kann</p>
+<pre>
+http(s)://host:port/moa-id-auth/BKAuswahl-MOA-Template-Howto.pdf </pre>
+<p><b>Dynamische Konfigurations-Updates</b><br />
+ Dynamische Konfigurations-Updates k&ouml;nnen f&uuml;r MOA-ID-AUTH durch den Aufruf der URL http://hostname:port/moa-id-auth/ConfigurationUpdate (z.B. durch Eingabe in einem Browser) durchgef&uuml;hrt werden. Analog wird die Konfiguration von MOA-ID-PROXY mittels http://hostname:port/ConfigurationUpdate aktualisiert.<br />
+ <br />
+ <b>Hinweis: </b>Konfigurations&auml;nderungen f&uuml;r die Online-Applikationen betreffen grunds&auml;tzlich sowohl die Auth- als auch die Proxy-Komponente.
+Wenn bspw. das <tt>publicURLPrefix</tt> der OA ge&auml;ndert wird, muss sowohl f&uuml;r die Auth- als auch f&uuml;r die Proxy-Komponente ein ConfigurationUpdate durchgef&uuml;hrt werden. <br />
+<br />
+Konnte MOA-ID-AUTH bzw. MOA-ID-PROXY nicht ordnungsgem&auml;&szlig; konfiguriert und gestartet werden, geht das aus der Log-Meldung hervor: <br />
+</p>
+<pre>
+FATAL | 03 13:19:06,924 | main | Fehler
+ beim Starten des Service MOA ID Authentisierung
+</pre>
+bzw.
+<pre>
+FATAL | 03 13:19:06,924 | main | Fehler
+ beim Starten des Service MOA ID Proxy
+</pre>
+In diesem Fall geben die WARN bzw. ERROR Log-Meldungen unmittelbar davor Aufschluss &uuml;ber den genaueren Grund. <br />
+</div>
+</td></tr></table>
+
+
+<div id="Logging" />
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<td width="170" valign="top" id="klein">
+<p id="subtitel">&#160;</p>
+<div id="slogan">
+<br /><br />
+</div>
+</td>
+<td valign="top">
+<div id="Logging" />
+<p id="subtitel">Logging</p>
+<div id="block">
+Die MOA ID Webapplikation verwendet Jakarta Log4j f&uuml;r die Ausgabe von Log-Meldungen am Bildschirm bzw. in Log-Dateien. Log4j bietet zahlreiche Konfigurationsm&ouml;glichkeiten, die ausf&uuml;hrlich im <a href="http://jakarta.apache.org/log4j/docs/manual.html" target="_new">Log4j Handbuch</a> beschrieben sind. Unter anderem gibt es die M&ouml;glichkeit, folgende Einstellungen vorzunehmen: <br />
+<ul>
+<li id="klein">Das verwendete Log-Level (DEBUG, INFO, WARN, ERROR, FATAL).</li>
+<li id="klein">Name und maximale Gr&ouml;&szlig;e der Log-Datei(en).</li>
+<li id="klein">Das Aussehen der Log-Eintr&auml;ge.</li>
+</ul>
+Es werden folgende Log-Hierarchien verwendet:
+</div>
+<ul>
+<li>moa.id.auth f&uuml;r alle Log-Meldungen aus dem MOA-ID-AUTH Modul </li>
+<li>moa.id.proxy f&uuml;r alle Log-Meldungen aus dem MOA-ID-PROXY Modul </li>
+<li>moa.spss.server f&uuml;r alle Log-Meldungen aus dem MOA-SPSS Modul </li>
+<li>iaik.server f&uuml;r alle Log-Meldungen aus den IAIK Kryptographie-Modulen </li>
+</ul>
+<div id="block">
+Als Ausgangspunkt f&uuml;r die Logging-Konfiguration liegt die Datei $MOA_ID_INST_AUTH/conf/moa-id/log4j.properties (bzw. $MOA_ID_INST_PROXY/conf/moa-id/log4j.properties) bei.
+Wird diese Datei als Logging-Konfiguration verwendet, so werden alle Log-Meldungen sowohl in die Konsole, als auch in die Datei <tt>$CATALINA_HOME/logs/moa-id.log</tt> geschrieben.
+<br /><br />
+<b>Format der Log-Meldungen</b><br />
+Anhand einer konkreten Log-Meldung wird das Format der MOA ID Log-Meldungen erl&auml;utert:
+<pre>
+ INFO | 09 08:23:59,385 | Thread-8 |
+ Anmeldedaten zu MOASession -5468974113772848113
+ angelegt, SAML Artifakt
+ AAF/BrdRfnMaQVGIbP/Gf9OwDUwwsXChb7nuT+VXQzOoHbV
+</pre>
+
+Der Wert <tt>INFO</tt> besagt, dass die Log-Meldung im Log-Level <tt>INFO</tt> entstanden ist. Folgende Log-Levels existieren:<br />
+<ul>
+<li id="klein"><tt>DEBUG:</tt> Log-Meldungen im Log-Level <tt>DEBUG</tt> geben Auskunft &uuml;ber die innere Arbeitsweise des Systems. Sie sind haupts&auml;chlich f&uuml;r Entwickler interessant.</li>
+<li id="klein"><tt>INFO:</tt> Diese Log-Meldungen geben informative Status-Informationen &uuml;ber den Ablauf der Webapplikation, wie z.B., dass eine neue Anfrage eingelangt ist.</li>
+<li id="klein"><tt>WARN:</tt> Bei der Ausf&uuml;hrung einer Operation sind leichte Fehler aufgetreten. Der Ablauf der Webapplikation ist nicht weiter beeintr&auml;chtigt.</li>
+<li id="klein"><tt>ERROR:</tt> Die Ausf&uuml;hrung einer Operation musste abgebrochen werden. Die Webapplikation ist davon nicht beeintr&auml;chtigt. </li>
+<li id="klein"><tt>FATAL:</tt> Es ist ein Fehler aufgetreten, der den weiteren Betrieb der Webapplikation nicht mehr sinnvoll macht.</li>
+</ul>
+Der n&auml;chste Wert <tt>09 08:23:59,385</tt>, gibt den Zeitpunkt an, an dem die Log-Meldung generiert wurde (in diesem Fall den 9. Tag im aktuellen Monat, sowie die genaue Uhrzeit). <br />
+Der Rest der Zeile einer Log-Meldung ist der eigentliche Text, mit dem das System bestimmte Informationen anzeigt. Im Fehlerfall ist h&auml;ufig ein Java Stack-Trace angef&uuml;gt, der eine genauere Ursachen-Forschung erm&ouml;glicht.
+<br /><br />
+
+
+<b>Wichtige Log-Meldungen</b><br />
+Neben den im Abschnitt "Starten und Stoppen von Tomcat" beschriebenen Log-Meldungen, die anzeigen, ob die Webapplikation
+ordnungsgem&auml;&szlig; gestartet wurde, geben nachfolgenden Log-Meldungen Aufschluss &uuml;ber die Abarbeitung von Anfragen.
+Die Annahme einer Anfrage wird beispielsweise angezeigt durch:
+</div>
+<pre>
+ INFO | 09 08:37:17,663 | Thread-9 |
+ MOASession 6576509775379152205 angelegt
+
+ INFO | 09 08:37:20,828 | Thread-9 |
+ Anmeldedaten zu MOASession 6576509775379152205
+ angelegt, SAML Artifakt
+ AAF/BrdRfnMaQVGIbP/Gf9OwDUwwsXChb7nuT+VXQzOoHbV
+
+</pre>
+
+<div id="block">
+Die 1. Log-Meldung besagt, dass sich ein Benutzer an MOA-ID-AUTH angemeldet und eine eindeutige SessionID zugewiesen bekommen hat. <br />
+Die 2. Log-Meldung informiert dar&uuml;ber, dass die Anmeldedaten des Benutzers unter dem angezeigten SAML Artifakt abgeholt werden k&ouml;nnen.<br />
+</div>
+Wenn nun versucht wird, eine Transaktion mit einer ung&uumlltigen SessionID fortzusetzen erh&auml;lt man folgende Log-Meldung:<br />
+<pre>
+ ERROR | 09 09:34:27,105 | Thread-8 |
+ at.gv.egovernment.moa.id.AuthenticationException:
+ MOASessionID ist unbekannt
+ (MOASessionID=-8650403497547200032)
+</pre><div id="block">
+ <p>In diesem Fall gibt der mitgeloggte Stacktrace Auskunft
+ &uuml;ber die Art des Fehlers. Der Aufrufer der MOA ID
+ Webapplikation bekommt einen Fehlercode sowie eine kurze
+ Beschreibung des Fehlers als Antwort zur&uuml;ck. <br />
+ <br />
+ Die Tats&auml;chlich &uuml;bertragenen Anfragen bzw. Antworten
+ werden aus Effizienzgr&uuml;nden nur im Log-Level DEBUG
+ angezeigt. </p>
+ <hr />
+ <p>
+ </div>
+ </p>
+
+</td></tr></table>
+<br /><br />
+
+
+
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top"><br /></td>
+<td valign="top">
+<hr />
+<div style="font-size:8pt; color:#909090">&copy; 2010</div>
+</td></tr></table>
+<br />
+
+
+</div>
+</div></div></div></div></div></body>
+</html>
diff --git a/id/server/doc/moa_id/id-admin_2.htm b/id/server/doc/moa_id/id-admin_2.htm
new file mode 100644
index 000000000..6e5dec828
--- /dev/null
+++ b/id/server/doc/moa_id/id-admin_2.htm
@@ -0,0 +1,1477 @@
+<html>
+<head>
+ <title>MOA ID-Administration</title>
+ <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
+ <meta content="heinz.rosenkranz@brz.gv.at" name="author"/>
+
+<style type="text/css">
+ body { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; }
+ td { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; }
+ th { font-family:"Verdana", "Arial"; font-size:10pt; font-weight:bold; color:#d8d8d8; background:#505050}
+ li { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; margin-top:3px }
+ ul { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; margin-top:3px }
+ tt { font-size:9pt; color:#505060; }
+ #titel { font-family:"Verdana", "Arial"; font-size:18pt; color:#505060; }
+ #subtitel { font-family:"Verdana", "Arial"; font-size:12pt; color:#505060; font-weight:bold; }
+ #slogan { font-family:"Verdana", "Arial"; font-size:8pt; color:#808090; text-align:justify; width:160px }
+ #block { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; text-align:justify }
+ #klein { font-family:"Verdana", "Arial"; font-size:9pt; color:#505060; margin-top:3px }
+ #info { font-family:"Verdana", "Arial"; font-size:8pt; color:#505060; padding:3px; border:solid 1px #c0c0c0 }
+ #infolist { font-family:"Verdana", "Arial"; font-size:8pt; color:#505060; }
+ a:link {color:#000090}
+ a:visited {color:#000090}
+ a:hover {color:#c03030}
+ a {text-decoration: none}
+</style>
+
+<script language="JavaScript">
+<!--
+function goWin(url) {
+ Fenster=window.open(url,"smallWin","toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=yes,scrollbars=yes,width=500,height=480,top=20,screenY=0,left=20,screenX=0");
+ window.setTimeout("showWin()",300);
+}
+function showWin() { Fenster.focus(); }
+// -->
+</script>
+</head>
+
+<body bgcolor="#FFFFFF" >
+<div style="width:650px">
+
+<!-- Projekt-Logo -->
+<div style="height:42px; font-size:16pt; color:#b0b8c0; background:#003050">
+&#160;Module f&uuml;r Online-Applikationen
+</div>
+<div style="margin-left:8px; margin-top:3px; font-size:8pt; color:#707070; ">
+<!-- Development Center der BRZ GmbH, A-Trust und IAIK Graz -->&#160;
+</div>
+<div style="margin-top:-65px; text-align:right; font-size:8pt; font-weight:bold; color:#d04040;" >
+Projekt <span style="font-size:48pt; ">moa</span>&#160;
+</div>
+<br />
+
+<!-- First Section with Navigation -->
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top">
+<div style="font-weight:bold; margin-top:12px">MOA-ID</div><br />
+<div id="klein"><a href="id-admin.htm"><img src="../moa_images/idle.gif" border="0" width="13" height="14" />
+ <b> &uuml;bersicht</b></a></div>
+<div id="klein"><a href="id-admin_1.htm"><img src="../moa_images/idle.gif" border="0" width="13" height="14" />
+ <b> Basis-Installation</b></a></div>
+<div id="klein"><img src="../moa_images/select.gif" border="0" width="13" height="14" />
+ <b> Konfiguration </b></div>
+<div id="klein"><a href="id-admin_3.htm"><img src="../moa_images/idle.gif" border="0" width="13" height="14" />
+ <b> Optionale<br />&#160; &#160;&#160;Komponenten</b></a></div>
+<br />
+<div id="klein"><a href="moa.htm"><img src="../moa_images/west.gif" border="0" width="13" height="14" />
+ <b> Zur&uuml;ck</b></a></div>
+<br /><br />
+<div id="slogan">
+<a href="#moaid-konfiguration"><b>Konfiguration<br />von MOA-ID</b></a>
+<br /><br />
+<a href="examples/conf/MOA-ID-Configuration.xml" target="_new">Konfigurationsdatei</a>
+<br /><br />
+<b>Parameter-&uuml;bersicht</b><br />
+<a href="#ConnectionParameter">ConnectionParameter</a><br />
+<a href="#AuthComponent">AuthComponent</a><br />
+<a href="#BKUSelection" >&nbsp;&nbsp;BKUSelection</a><br />
+<a href="#SecurityLayer">&nbsp;&nbsp;SecurityLayer</a><br />
+<a href="#MOA-SP">&nbsp;&nbsp;MOA-SP</a><br />
+<a href="#IdentityLinkSigners">&nbsp;&nbsp;IdentityLinkSigners</a><br />
+<a href="#VerifyInfoboxesAuth">&nbsp;&nbsp;VerifyInfoboxes</a><br />
+<a href="#ForeignIdentitiesAuth">&nbsp;&nbsp;ForeignIdentities</a><br />
+<a href="#AuthComponent_OnlineMandates">&nbsp;&nbsp;OnlineMandates</a><br />
+<a href="#ProxyComponent">ProxyComponent</a><br />
+<a href="#OnlineApplication">OnlineApplication</a><br />
+<a href="#OnlineApplication/AuthComponent">&nbsp;&nbsp;AuthComponent</a><br />
+<a href="#OnlineApplication/ProxyComponent">&nbsp;&nbsp;ProxyComponent</a><br />
+<a href="#ChainingModes">ChainingModes</a><br />
+<a href="#TrustedCACertificates">TrustedCACertificates</a><br />
+<a href="#GenericConfiguration">GenericConfiguration</a><br />
+<a href="#TrustedBKUs">TrustedBKUs</a><br />
+<br />
+<a href="#oa-config"><b>Konfiguration<br />der Online-Applikation</b></a><br />
+<br />
+<b>Parameter-&uuml;bersicht</b><br />
+<a href="#LoginType">LoginType</a><br />
+<a href="#ParamAuth">ParamAuth</a><br />
+<a href="#Parameter">&nbsp;&nbsp;ParamAuth/Parameter</a><br />
+<a href="#BasicAuth">BasicAuth</a><br />
+<a href="#HeaderAuth">HeaderAuth</a><br />
+<a href="#Header">&nbsp;&nbsp;HeaderAuth/Header</a><br />
+<br />
+<a href="#sp-config"><b>Konfiguration<br />von MOA-SP</b></a><br />
+<br />
+<a href="#verifytransformsInfoProfile">VerifyTransformsInfoProfile</a><br />
+<a href="#trustProfile">TrustProfile</a><br />
+<a href="#certstore">Certstore</a><br />
+<br />
+<a href="#online-config"><b>&auml;nderung der Konfig. <br />w&auml;hrend des Betriebs</b></a><br />
+<br/>
+<a href="#errorpages"><b>&Auml;ndern der Default-Errorpages</b></a><br />
+<br/>
+<a href="#security"><b>Tomcat Security Manager </b></a><br />
+
+<br />
+</div>
+
+</td>
+
+ <td valign="top">
+ <div id="titel">Konfiguration von MOA ID v.1.5</div>
+ <div id="moaid-konfiguration" />
+ <p id="subtitel">Konfiguration von MOA ID v.1.5</p>
+ <p id="block"> Die Konfiguration von MOA ID wird mittels einer XML-basierten
+ Konfigurationsdatei, die dem Schema
+ <a href="../MOA-ID-Configuration-1.5.0.xsd" target="_new">MOA-ID-Configuration-1.5.0.xsd</a> entspricht, durchgef&uuml;hrt.
+ <p /> Der Ort der Konfigurationsdatei wird im Abschnitt <a href="id-admin_1.htm#deployment">Deployment
+ der Web-Applikation in Tomcat</a> beschrieben.
+ <p>Enth&auml;lt die Konfigurationsdatei relative Pfadangaben, werden
+ diese relativ zum Verzeichnis in dem sich die MOA-ID Konfigurationsdatei
+ befindet interpretiert.<br>
+ </p>
+ <div id="ConnectionParameter" />
+ <p id="block"> <b>ConnectionParameter</b> <br />
+ Das Element <tt>ConnectionParameter</tt> enth&auml;lt Parameter,
+ die MOA-ID f&uuml;r den Aufbau von Verbindungen zu anderen Komponenten
+ ben&ouml;tigt. Dieses Element tritt mehrfach in der Konfigurationsdatei
+ auf und wird daher vorab detailliert beschrieben. <br />
+ <br />
+ Das Attribut <tt>URL</tt> enth&auml;lt die URL der Komponente zu
+ der die Verbindung aufgebaut werden soll. Wird das Schema <tt>https</tt>
+ verwendet, k&ouml;nnen die Kind-Elemente <tt>AcceptedServerCertificates</tt>
+ und <tt>ClientKeyStore</tt> angegeben werden. Wird das Schema <tt>http</tt>
+ verwendet m&uuml;ssen keine Kind-Elemente angegeben werden bzw.
+ werden diese nicht ausgewertet. Andere Schemas werden nicht unterst&uuml;tzt.
+ <br />
+ <br />
+ Wird die Verbindung &uuml;ber TLS aufgebaut und erfordert der TLS-Server
+ eine Client-Authentisierung mittels Zertifikate, dann muss das Kind-Element
+ <tt>ClientKeyStore</tt> spezifiziert werden. Im Element <tt>ClientKeyStore</tt>
+ wird der Filename des PKCS#12-Keys (relativ zur MOA-ID Konfigurationsdatei)
+ angegeben. Diesem Keystore wird der private Schl&uuml;ssel f&uuml;r
+ die TLS-Client-Authentisierung entnommen. Das Passwort zum Lesen
+ des privaten Schl&uuml;ssels wird im Attribut <tt>ClientKeyStore/@password</tt>
+ konfiguriert.<br />
+ Aufgrund der Tatsache, dass starke Verschl&uuml;sselung eine Voraussetzung
+ f&uuml;r MOA-ID darstellt, werden clientseitig nur die folgenden
+ Cipher Suites unterst&uuml;tzt:<br/>
+ <ul>
+ <li><tt>SSL_RSA_WITH_RC4_128_SHA</tt></li>
+ <li><tt>SSL_RSA_WITH_RC4_128_MD5</tt></li>
+ <li><tt>SSL_RSA_WITH_3DES_EDE_CBC_SHA</tt></li>
+ </ul>
+ Im Kind-Element <tt>AcceptedServerCertificates</tt> kann ein Verzeichnisname
+ (relativ zur MOA-ID Konfigurationsdatei) angegeben werden, in dem
+ die akzeptierten Zertifikate der TLS-Verbindung hinterlegt sind. In
+ diesem Verzeichnis werden nur Serverzertifikate abgelegt. Fehlt dieser
+ Parameter wird lediglich &uuml;berpr&uuml;ft ob ein Zertifikatspfad
+ zu den im Element <tt>&lt;TrustedCACertificates&gt;</tt> angegebenen
+ Zertifikaten erstellt werden kann. Falls dies nicht m&ouml;glich ist,
+ kommt es zu einem Fehlerfall.
+ <p></p>
+ <div id="AuthComponent" />
+ <p id="block"> <b>AuthComponent</b> <br />
+ <tt>AuthComponent</tt> enth&auml;lt Parameter, die nur die MOA-ID
+ Authentisierungskomponente betreffen. Das Element ist optional
+ und muss nicht verwendet werden, wenn auf dem Server keine MOA-ID
+ Authentisierungskomponente installiert wird. <br />
+ <br />
+ Das Element <tt>AuthComponent</tt> hat sechs Kind-Elemente:
+ <ul>
+ <li><tt>BKUSelection</tt> (optional)</li>
+ <li><tt>SecurityLayer</tt></li>
+ <li><tt>MOA-SP</tt></li>
+ <li><tt>IdentityLinkSigners</tt></li>
+ <li><tt>VerifyInfoboxes</tt> (optional ab Version 1.4)</li>
+ <li><tt>ForeignIdentities</tt></li>
+ <li><tt>OnlineMandates</tt></li>
+ </ul>
+<p></p>
+ <div id="BKUSelection" />
+ <p id="block"> <b>AuthComponent/BKUSelection</b> <br />
+ Das optionale Element <tt>BKUSelection</tt> enth&auml;lt Parameter
+ zur Nutzung eines Auswahldienstes f&uuml;r eine B&uuml;rgerkartenumgebung
+ (BKU). Wird das Element nicht angegeben, dann wird die lokale
+ B&uuml;rgerkartenumgebung auf <tt>http://localhost:3495/http-security-layer-request</tt>
+ verwendet. <br />
+ <br />
+ Das Attribut <tt>BKUSelectionAlternative</tt> gibt an welche
+ Alternative zur BKU-Auswahl verwendet werden soll. MOA-ID unterst&uuml;tzt
+ die Werte <tt>HTMLComplete</tt> (vollst&auml;ndige HTML-Auswahl)
+ und <tt>HTMLSelect</tt> (HTML-Code f&uuml;r Auswahl) [<a href="../bku-auswahl.20030408.pdf">"Auswahl
+ von B&uuml;rgerkartenumgebungen"</a>, Arno Hollosi]. <br />
+ <br />
+ Das Kind-Element <tt>ConnectionParameter</tt> spezifiziert die
+ Verbindung zum Auswahldienst (siehe <a href="#ConnectionParameter"><tt>ConnectionParameter</tt></a>),
+ jedoch kann das Kind-Element <tt>ClientKeyStore</tt> nicht angegeben
+ werden. </p>
+ <div id="AuthTemplates" />
+ <p id="block"> <b>AuthComponent/Templates</b> <br />
+ Das optionale Element <tt>Templates</tt> kann genau einmal vorkommen, um
+ das Aussehen der Seiten &quot;Auswahl der B&uuml;rgerkartenumgebung&quot; sowie
+ &quot;Anmeldung mit B&uuml;rgerkarte&quot; anzupassen. Die hier
+ spezifizierten (globalen) Templates haben Priorit&auml;t gegen&uuml;ber Templates,
+ die in der aufrufenden URL (vgl. <a href="id-anwendung_1.htm" target="_new">Aufruf von MOA-ID-AUTH</a>)
+ &uuml;bergeben werden, haben jedoch Nachrang gegen&uuml;ber in
+ der Konfigurationsdatei f&uuml;r eine Online-Applikation individuell definierte (lokale)
+ Templates (siehe <a href="#OnlineApplication/AuthComponent/Templates" target="_new">
+ OnlineApplication/AuthComponent/Templates</a>).
+ Das hei&szlig;t, sind in der Konfigurationsddatei f&uuml;r eine Online-Applikation lokale
+ Templates definiert (Element <tt>OnlineApplication/AuthComponent/Templates</tt>), so werden
+ die als global spezifizierten Templates (<tt>AuthComponent/Templates</tt>) f&uuml;r diese
+ OnlineApplikation ignoriert, jedoch f&uuml;r alle anderen Online-Applikationen
+ verwendet. Templates in der aufrufenden URL werden demnach nur mehr dann
+ herangezogen, wenn in der Konfigurationsdatei weder globale (f&uuml;r alle
+ Online-Applikationen g&uuml;ltig) noch lokale (Templates je Online-Applikation)
+ spezifiziert sind.<br>
+ Das <tt>Templates</tt>-Element hat die zwei Kindelemente
+ <tt>BKUSelectionTemplate</tt> und <tt>Template</tt>. Jedes dieser
+ beiden Elemente kann genau einmal vorkommen oder fehlen.
+ Das Kindelement <tt>BKUSelectionTemplate</tt> spezifiziert ein Template
+ zur Gestaltung der Seite &quot;Auswahl der B&uuml;rgerkartenumgebung&quot;,
+ w&auml;hrend das Kindelement <tt>Template</tt> die Seite
+ &quot;Anmeldung mit B&uuml;rgerkarte&quot; referenziert.
+ Beide Elemente haben genau ein Attribut namens <tt>URL</tt>,
+ das die Lage des Templates im Form einer URL beschreibt.
+ Relative Pfadangaben werden dabei relativ zum Verzeichnis, in dem sich die
+ MOA-ID Konfigurationsdatei befindet, interpretiert. Bei Templates die &uuml;ber das Protokoll https referenziert werden, muss vor dem Start des Tomcat ein Truststore angegeben werden, das die notwendigen vertrauensw&uuml;rdigen Zertifikate enth&auml;lt. Siehe dazu die Parameter in den vorbereiteten Startdateien <tt>startTomcat.bat</tt> und <tt>tomcat-start.sh</tt>.<br>
+ Im folgenden Beispiel werden zwei Templates im Verzeichnis
+ CATALINA_HOME/conf/moa-id/templates referenziert:
+ <br>
+ <pre>
+&lt;Templates&gt;
+ &lt;BKUSelectionTemplate URL="templates/SampleBKUSelectionTemplate.html"/&gt;
+ &lt;Template URL="templates/SampleTemplate.html"/&gt;
+&lt;/Templates&gt;</pre>
+
+ <br>
+ Richtlinien zur Struktur der beiden Templates k&ouml;nnen der
+ MOA-ID-Spezifikation bzw. dem Abschnitt
+ <a href="id-anwendung_1.htm" target="_new">Aufruf von MOA-ID-AUTH</a>
+ dieses Handbuches entnommen werden.
+
+ </p>
+
+ <div id="SecurityLayer" />
+ <p id="block"> <b>AuthComponent/SecurityLayer</b> <br />
+ Das Element <tt>SecurityLayer</tt> enth&auml;lt Parameter
+ zur Nutzung des Security-Layers. <br />
+ <br />
+ Das Kind-Element <tt>TransformsInfo</tt> spezifiziert eine
+ Transformation, die f&uuml;r die Erstellung der Signatur des
+ AUTH-Blocks als Parameter in den <tt>CreateXMLSignatureRequest</tt>
+ des Security-Layers integriert werden muss. Mehrere unterschiedliche
+ Implementierungen des Security-Layer k&ouml;nnen durch die
+ Angabe mehrerer <tt>TransformsInfo</tt>-Elemente unterst&uuml;tzt
+ werden. <br />
+ <br />
+ Das Attribut <tt>TransformsInfo/@filename</tt> verweist auf
+ eine Datei, die das globale Element <tt>TransformsInfo</tt>
+ vom Typ <tt>TransformsInfo</tt> enth&auml;lt. Die Angabe erfolgt
+ relativ zur MOA-ID Konfigurationsdatei. Das Encoding dieser
+ Datei muss UTF-8 sein. <br />
+ <br />
+ <a href="examples/TransformsInfoAuthBlock.txt">Beispiel f&uuml;r
+ eine TransformsInfo-Datei</a> </p>
+ <div id="MOA-SP" />
+ <p id="block"> <b>AuthComponent/MOA-SP</b> <br />
+ Das Element <tt>MOA-SP</tt> enth&auml;lt Parameter zur Nutzung
+ von MOA-SP. MOA-SP wird f&uuml;r die &uuml;berpr&uuml;fung
+ der Signatur der Personenbindung und des AUTH-Blocks verwendet.
+ <br />
+ <br />
+ Wird das Kind-Element <tt>ConnectionParameter</tt> angegeben,
+ dann wird MOA-SP &uuml;ber das Webservice angesprochen.</p>
+ <p id="block">Wird das Kind-Element <tt>ConnectionParameter</tt>
+ nicht angegeben so wird eine MOA-ID beiligende Version von
+ MOA-SP direkt &uuml;ber das Java-API angesprochen. In diesem
+ Fall muss das System-Property auf die verwendete Konfigurationsdatei
+ von MOA-SP gesetzt werden. Eine beispielhafte MOA-SP Konfigurationsdatei
+ ist in <tt>$MOA_ID_INST_AUTH/conf/moa-spss/SampleMOASPSSConfiguration.xml</tt>
+ enthalten. </p>
+
+ <div id="moaid-konfiguration" />
+ <div id="ConnectionParameter" />
+ <div id="AuthComponent" />
+ <div id="BKUSelection" />
+ <div id="SecurityLayer" />
+ <div id="MOA-SP" />
+ <div id="verifytransformsInfoProfile" />
+ <p><b><i>Hinweis:</i></b><i> MOA-SP muss entsprechend konfiguriert
+ werden - siehe hierzu Abschnitt <a href="#sp-config">Konfiguration
+ von MOA-SP</a>. Alle Details zur Konfiguration von MOA-SP
+ finden sie in der Distribution von MOA-SP/SS beiligenden
+ Dokumentation im Abschnitt 'Konfiguration'.<br>
+ </i><br />
+ Das Kind-Element <tt>VerifyIdentityLink/TrustProfileID</tt>
+ spezifiziert eine TrustProfileID, die f&uuml;r den <tt>VerifyXMLSignatureRequest</tt>
+ zur &Uuml;berpr&uuml;fung der Signatur der Personenbindung
+ verwendet werden muss. Diese TrustProfileID muss beim
+ verwendeten MOA-SP Modul konfiguriert sein.<br />
+ <br />
+ Die Kind-Elemente <tt>VerifyAuthBlock/TrustProfileID</tt>
+ und <tt>VerifyAuthBlock/VerifyTransformsInfoProfileID</tt>
+ spezifizieren eine TrustProfileID und eine ID f&uuml;r
+ ein Transformationsprofil, die f&uuml;r den <tt>VerifyXMLSignatureRequest</tt>
+ zur &uuml;berpr&uuml;fung der Signatur des Auth-Blocks
+ verwendet werden m&uuml;ssen. Diese TrustProfileID muss
+ beim verwendeten MOA-SP Modul konfiguriert sein.</p>
+
+ <div id="moaid-konfiguration" />
+ <div id="AuthComponent" />
+ <div id="IdentityLinkSigners" />
+ <p id="block"> <b>AuthComponent/IdentityLinkSigners</b>
+ <br />
+ Dieses Element gibt an von welchen Signatoren die Signatur
+ des IdentityLink erstellt werden musste damit der IdentityLink
+ akzeptiert wird. F&uuml;r jeden Signator muss der <tt>X509SubjectName</tt>
+ nach RFC 2253 spezifiziert werden. <br />
+ <br />
+ <a href="examples/IdentityLinkSigners.txt">Beispiel</a>
+ <br /><br />
+ <b>Anmerkung:</b> Ab Version 1.4 ist dieses Element nicht mehr verpflichtend notwendig, da die
+ Berechtigung von Zertifikaten zum Signieren von Personenbindungen ab Februar
+ 2007 &uuml;ber die Zertifikatseigenschaft "Eigenschaft zur Ausstellung von Personenbindungen"
+ (OID: 1.2.40.0.10.1.7.1) gepr&uuml;ft wird.
+ Der Namens-Check des alten Zertifikats wird fix in MOA-ID integriert, sodass das
+ <tt>IdentityLinkSigners</tt>-Element in der Konfiguration &uuml;berfl&uuml;ssig wird.
+
+ <br />
+ </p>
+ <div id="VerifyInfoboxesAuth" />
+ <p id="block"> <b>AuthComponent/VerifyInfoboxes</b>
+ <br />
+ Ab Version 1.4 bietet MOA-ID die M&ouml;glichkeit einer erweiterten Infobox-Validierung,
+ das hei&szlig;t, es k&ouml;nnen neben der Personenbindung auch weitere ausgelesene Infoboxen
+ validiert werden. Die f&uuml;r die Validierung der Infoboxen notwendigen Parameter
+ k&ouml;nnen &uuml;ber die Konfigurationsdatei durch das <tt>VerifyInfoboxes</tt>
+ Element sowohl <a href="#VerifyInfoboxesAuth">global</a> als auch
+ <a href="#OnlineApplication/AuthComponent/VerifyInfoboxes">lokal</a>
+ je Online-Applikation gesetzt werden. MOA-ID &uuml;bergibt diese Parameter der
+ Applikation, die f&uuml;r die Verifikation des Inhaltes der jeweilgen von der BKU
+ &uuml;bermittelten Infobox verantwortlich ist. Im Folgenden wird eine derartige
+ Applikation als <tt>Pr&uuml;fapplikation</tt> bezeichnet.
+ <br />
+ Das <tt>Verifyinfoboxes</tt> Element ist optional und kann fehlen,
+ wenn keine Infoboxen au&szlig;er der der Personenbindung validiert werden m&uuml;ssen.
+ <br />
+ Das <tt>VerifyInfoboxes</tt>-Element hat folgende Kind-Elemente:
+ <ul>
+ <li id="DefaultTrustProfileVI"><tt>DefaultTrustProfile</tt>: Dieses optionale
+ Element kann nur einmal vorkommen und spezifiziert ein Trust-Profil, das
+ von einer <tt>Pr&uuml;fapplikation</tt> zur Validierung einer Infobox
+ herangezogen werden kann, wenn f&uuml;r diese Infobox kein eigenes
+ <a href="#TrustProfileVI">Trust-Profil</a> gesetzt wurde. Es hat genau ein
+ Kindelement namens <tt>TrustProfileID</tt>, das die ID eines in MOA-SP
+ konfigurierten Trust-Profiles enth&auml;lt.
+ <br />
+ <b>Anmerkung:</b> Das Trust-Profil f&uuml;r die
+ <a href="#trustProfile">Personenbindung</a> darf <b>nicht</b>
+ zur Validierung anderer Infoboxen verwendet werden. Das Trust-Profil f&uuml;r
+ die <a href="#trustProfile">B&uuml;rgerkarte</a> <b>soll</b> nur dann zur Validierung
+ anderer Infoboxen verwendet werden, wenn die zur Verifikation der Zertifikate ben&ouml;tigten
+ Wurzelzertifikate bereits im entsprechenden Trust-Store enthalten sind. (vgl.
+ MOA-ID Spezifikation, Abschnitt 4.6).
+ </li>
+ <li id="InfoboxVI"><tt>Infobox</tt>: Dieses Element kann beliebig oft vorkommen
+ und kapselt die Parameter, die f&uuml;r die Validierung einer Infobox an die
+ jeweilige Pr&uuml;fapplikation &uuml;bergeben werden.
+ <br />
+ Das <tt>Infobox</tt>-Element hat folgende Attribute:
+ <ul>
+ <li id="IdentifierVI"><tt>Identifier:</tt> Dieses Attribut muss vorhanden sein und gibt
+ den <tt>Namen</tt> der Infobox an. Er muss dabei exakt dem <tt>Bezeichner</tt>
+ der jeweiligen zu validierenden Infobox aus der BKU entsprechen, also
+ zum Beispiel <tt>Mandates</tt> f&uuml;r die <tt>Vollmachten</tt>-Infobox oder
+ <tt>EHSPToken</tt> f&uuml;r die <tt>GDAToken</tt>-Infobox.
+ <br />
+ </li>
+ <li id="requiredVI"><tt>required:</tt> Dieses Attribut vom Typ
+ <tt>boolean</tt> bestimmt, ob MOA-ID den Inhalt der entsprechenden Infobox
+ f&uuml;r die Anmeldung zwingend ben&ouml;tigt. Ist es auf <tt>true</tt>
+ gesetzt, und wird der entsprechende Infobox-Inhalt nicht von der BKU
+ &uuml;bermittelt, so bricht MOA-ID den Anmeldevorgang mit einer Fehlermeldung
+ ab.
+ <br />
+ Fehlt dieses Attribut, so wird als Defaultwert <tt>false</tt> gesetzt.
+ <br />
+ </li>
+ <li id="provideStammzahlVI"><tt>provideStammzahl:</tt> Dieses Attribut vom Typ
+ <tt>boolean</tt> bestimmt, ob die Pr&uuml;fapplikation die Stammzahl aus der
+ Personenbindung erhalten darf. Fehlt dieses Attribut, so wird als Defaultwert
+ <tt>false</tt> gesetzt.
+ <br />
+ <b>Anmerkung</b>: Das Attribut steht in keinem Zusammenhang zum gleichnamigen
+ Attribut <a href="#provideStammzahlOA">OnlineApplication/AuthComponent/@provideStammzahl</a>,
+ das angibt ob die Stammzahl an die <i>Online-Applikation</i> weitergegeben werden darf.
+ </li>
+ <li id="provideIdentityLinkVI"><tt>provideIdentityLink:</tt> Dieses Attribut vom Typ
+ <tt>boolean</tt> bestimmt, ob die Pr&uuml;fapplikation die Personenbindung erhalten
+ soll. Hat es den Wert <tt>true</tt>, so wird ein Klone des Wurzel-Elements der Personenbindung
+ an die Pr&uuml;fapplikation &uuml;bergeben, wobei zu beachten ist, dass die
+ darin enthaltene Stammzahl auf einen leeren String gesetzt wird, falls das
+ Attribut <a href="#provideStammzahlVI">provideStammzahl</a> auf <tt>false</tt>
+ gesetzt ist.
+ Fehlt das <tt>provideIdentityLink</tt>-Attribut, so wird als Defaultwert <tt>false</tt> gesetzt.
+ <br />
+ <b>Anmerkung 1</b>: Das Attribut steht in keinem Zusammenhang zum gleichnamigen
+ Attribut <a href="#provideIdentityLinkOA">OnlineApplication/AuthComponent/@provideIdentityLink</a>,
+ das angibt ob die <i>Online-Applikation</i> die Personenbindung erhalten
+ soll.
+ <br />
+ <b>Anmerkung 2</b>: Der Pr&uuml;fapplikation werden defaultm&auml;&szlig;ig der Vorname,
+ der Familienname, das Geburtsdatum, der Typ der Stammzahl, die Stammzahl
+ (konfigurierbar) und die &ouml;ffentlichen Schl&uuml;ssel aus der Personenbindung
+ &uuml;bergeben. Das Attribut <tt>provideIdentityLink</tt> sollte deshalb
+ wirklich nur dann auf <tt>true</tt> gesetzt werden, wenn von der
+ Pr&uuml;fapplikation noch andere Daten aus der Personenbindung ben&ouml;tigt
+ werden.
+ </li>
+ </ul>
+ Das <tt>Infobox</tt>-Element hat folgende Kind-Elemente:
+ <ul>
+ <li id="FriendlyNameVI"><tt>FriendlyName</tt>: Das Element ist optional und
+ enth&auml;lt einen Namen, der von MOA-ID zur Anzeige von, die jeweilige Infobox
+ betreffende, Fehlermeldungen im Browser verwendet wird. Im Regelfall wird man
+ hier den deutschen Namen der Infobox setzen, also z.B. <tt>Vollmachten</tt>
+ oder <tt>Stellvertretungen</tt> f&uuml;r die <tt>Mandates</tt>-Infobox oder
+ <tt>GDAToken</tt> f&uuml;r die <tt>EHSPToken</tt>-Infobox.
+ <br />
+ Fehlt dieses Element, so wird f&uuml;r Fehlermeldungen der Wert des
+ <a href="#IdentifierVI">Identifier</a>-Attributes verwendet.
+ </li>
+ <li id="TrustProfileVI"><tt>TrustProfileID</tt>: Das Element ist optional und
+ bezeichnet ein in MOA-SP konfiguriertes Trust-Profil, das von MOA-ID
+ f&uuml;r die Validierung der Infobox verwendet wird.
+ Dabei ist wieder zu beachten, dass das Trust-Profil f&uuml;r die
+ <a href="#trustProfile">Personenbindung</a> <b>nicht</b>
+ zur Validierung anderer Infoboxen verwendet werden darf, und das Trust-Profil f&uuml;r
+ die <a href="#trustProfile">B&uuml;rgerkarte</a> nur dann zur Validierung
+ anderer Infoboxen verwendet werden <b>soll</b>, wenn die zur Verifikation der
+ Zertifikate ben&ouml;tigten Wurzelzertifikate bereits im entsprechenden
+ Trust-Store enthalten sind. (vgl. MOA-ID Spezifikation, Abschnitt 4.6).
+ <br />Fehlt dieses Element, so wird das
+ <a href="#DefaultTrustProfileVI">Default-Trust-Profil</a>
+ verwendet. Ist dieses auch nicht konfiguriert, so wird f&uuml;r die
+ Validierung der entsprechenden Infobox keine Zertifikatspr&uuml;fung
+ notwendig sein.
+ </li>
+ <li id="ValidatorClassVI"><tt>ValidatorClass</tt>: Das Element ist optional
+ und bezeichnet den Namen der Klasse (voller Package-Name), die von MOA-ID
+ zur Validierung der Infobox geladen werden soll. Fehlt dieses Element,
+ so wird MOA-ID versuchen, eine Default-Klasse zu laden, deren Namen aus
+ dem <a href="#IdentifierVI">Identifier</a>-Attribut der Infobox abgeleitet
+ wird (vgl. MOA-ID-Spezifikation, Abschnitt 4.7.2.3,
+ <tt>Zuordnung eines InfoboxReadResponse zu einer implementierenden Klasse</tt>).
+ <br />
+ <b>Anmerkung</b>: Im Regelfall wird dieses Element fehlen, da bei der
+ Entwicklung einer Infobox-Pr&uuml;fapplikation der Default-Klassennamen
+ verwendet werden sollte. Nur wenn es verschiedene Pr&uuml;fapplikationen
+ f&uuml;r eine Infobox gibt, wird man das <tt>ValidatorClass</tt>
+ verwenden, um eine andere als die Default-Applikation zu laden.
+ </li>
+ <li id="SchemaLocationsVI"><tt>SchemaLocations</tt>: Das Element ist optional
+ und referenziert XML-Schemas, die von der Pr&uuml;fapplikation zum
+ validierenden Parsen von Infoboxen verwendet werden k&ouml;nnen. Das
+ Element hat beliebig viele <tt>Schema</tt>-Kindelemente, dessen Attribute
+ <tt>namespace</tt> und <tt>schemaLocation</tt> jeweils die Namespace-URI
+ und den Ort (URI) des entsprechenden Schemas bezeichnen. Relative URIs im
+ <tt>schemaLocation</tt>-Attribut sind dabei relativ zum Verzeichnis der
+ MOA-ID-Konfigurationsdatei zu interpretieren.
+ <br />
+ Beispiel:
+ <br />
+ <pre>
+ &lt;SchemaLocations&gt;
+ &lt;Schema namespace="http://ns1.ns1" schemaLocation="schemas/ns1.xsd"/&gt;
+ &lt;Schema namespace="http://ns2.ns2" schemaLocation="schemas/ns2.xsd"/&gt;
+ &lt;/SchemaLocations>
+ </pre>
+ Weitere M&ouml;glichkeiten zur &Uuml;bergabe von XML-Schemas an die
+ Pr&uuml;fapplikation k&ouml;nnen in der MOA-ID-Spezifikation im
+ Abschnitt 4.7.2, <tt>Erweiterte Infobox&uuml;berpr&uuml;fung</tt>, nachgelesen werden.
+ </li>
+ <li id="ApplicationSpecificParametersVI"><tt>ApplicationSpecificParameters</tt>:
+ Das Element ist optional und nimmt Infobox-kontext-spezifische Parameter
+ auf.
+ <br />
+ Da MOA-ID die zus&auml;tzlichen zur Personenbindung abgefragten Infoboxen
+ (bzw. deren Inhalte) nicht a priori kennt, ist es unm&ouml;glich vorherzusehen,
+ welche Parameter eine Pr&uuml;fapplikation zum Validieren einer Infobox
+ ben&ouml;tigt. Die Konfiguration sieht daher das Element
+ <tt>ApplicationSpecificParameters</tt> vor, um einer bestimmten
+ Pr&uuml;fapplikation kontext spezifische Parameter zu &uuml;bermitteln.
+ Dieses Element wird vollst&auml;ndig an die Pr&uuml;fapplikation
+ weitergegeben, und es obliegt der Pr&uuml;fapplikation die Kindelemente
+ des <tt>ApplicationSpecificParameters</tt>-Element zu extrahieren und zu
+ interpretieren.
+ <br />
+ Beispiel:
+ <br />
+ <pre>
+ &lt;ApplicationSpecificParameters&gt;
+ &lt;Parameter1&gt;content1&lt;/Parameter1&gt;
+ &lt;Parameter2&gt;content2&lt;/Parameter2&gt;
+ &lt;Parameter3&gt;
+ &lt;Parameter3a&gt;content3a&lt;/Parameter3a&gt;
+ &lt;Parameter3b&gt;content3b&lt;/Parameter3b&gt;
+ &lt;/Parameter3&gt;
+ &lt;/ApplicationSpecificParameters&gt;
+ </pre>
+ </li>
+ </ul>
+ </li>
+ </ul>
+ <p><br />
+ Eine Beispielkonfiguration finden sie am Ende das Abschnitts
+ <a href="#VerifyInfoboxesOA">OnlineApplication/AuthComponent/VerifyInfoboxes</a>.
+ <br />
+ </p>
+ <div id="ForeignIdentitiesAuth" />
+ <p><b>AuthComponent/ForeignIdentities</b> <br />
+Ab Version 1.4.7 bietet MOA-ID die M&ouml;glichkeit der Nutzung von ausl&auml;ndischen Karten. Hierf&uuml;r ist ein Stammzahlenregister-Gateway n&ouml;tig, das einen entsprechenden Zugang zum Stammzahlenregister bereitstellt. Es ist hierzu ein entsprechender <a href="#ConnectionParameter"><tt>ConnectionParameter</tt></a> zu definieren, der die Zugangsdaten zum Gateway bereith&auml;lt (siehe <a href="#ConnectionParameter"><tt>ConnectionParameter</tt></a>). In der Default-Konfiguration ist der Zugang zum Stammzahlenregister-Gateway bereits aktiviert. Es muss nur noch das Client-Zertifikat f&uuml;r die SSL-Verbinung zum Gateway angegeben werden. Voraussetzung daf&uuml;r ist ein Zertifikat von A-Trust bzw. A-CERT mit Verwaltungseigenschaft oder Dienstleistereigenschaft. Wenn ihr MOA-ID Zertifikat diese Voraussetzung erf&uuml;llt, k&ouml;nnen Sie dieses hier angeben.<br />
+ </p>
+ <p><b><div id="AuthComponent_OnlineMandates">AuthComponent/OnlineMandates</div></b> <br />
+Ab Version 1.5.0 bietet MOA-ID die M&ouml;glichkeit der Nutzung von Online-Vollmachten f&uuml;r Anwendungen aus dem &ouml;ffentlichen Bereich. Hierf&uuml;r ist ein Online-Vollmachten-Service n&ouml;tig. Es ist hierzu ein ensprechender <a href="#ConnectionParameter"><tt>ConnectionParameter</tt></a> zu definieren, der die Zugangsdaten zum Online-Vollmachten-Service bereith&auml;lt (siehe <a href="#ConnectionParameter"><tt>ConnectionParameter</tt></a>). In der Default-Konfiguration ist der Zugang zum Online-Vollmachten-Service bereits aktiviert. Es muss nur noch das Client-Zertifikat f&uuml;r die SSL-Verbinung zum Service angegeben werden. Voraussetzung daf&uuml;r ist ein Zertifikat von A-Trust bzw. A-CERT mit Verwaltungseigenschaft oder Dienstleistereigenschaft. Wenn ihr MOA-ID Zertifikat diese Voraussetzung erf&uuml;llt, k&ouml;nnen Sie dieses hier angeben.<br />
+Hinweis: Um den Online-Vollmachten Modus f&uuml;r eine Online Applikation zu aktivieren, m&uuml;ssen Sie das Vollmachten Profil angeben - siehe <a href="#OnlineApplication/AuthComponent/Mandates">hier</a>.
+
+ </p>
+<p id="block"> <b>ProxyComponent</b> <br />
+ <tt>ProxyComponent</tt> enth&auml;lt Parameter, die
+ nur die MOA-ID Proxykomponente betreffen. Das Element
+ ist optional und muss nicht verwendet werden, wenn auf
+ dem Server keine MOA-ID Proxykomponente installiert
+ wird. <br />
+ <br />
+ Das Element <tt>ProxyComponent</tt> hat nur das Kind-Element
+ <tt>AuthComponent</tt>, das die Verbindung zur Authentisierungs-komponente
+ beschreibt. <br />
+ <br />
+ Baut die Proxykomponente die Verbindung zur Authentisierungs-komponente
+ &uuml;ber ein Webservice auf, dann muss das Element
+ <tt>ConnectionParameter</tt> spezifiziert werden. <br />
+ <br />
+ Baut die Proxykomponente die Verbindung zur Authentisierungs-komponente
+ &uuml;ber das API auf, dann wird das Element <tt>ConnectionParameter</tt>
+ nicht spezifiziert. </p>
+ <div id="OnlineApplication" />
+ <p id="block"> <b>OnlineApplication</b> <br />
+ F&uuml;r jede Online-Applikation, die &uuml;ber MOA-ID
+ authentisiert wird, gibt es ein Element <tt>OnlineApplication</tt>.
+ Die Parameter betreffen teils die MOA-ID Authentisierungskomponente,
+ teils die MOA-ID Proxykomponente, teils beide. <br />
+ <br />
+ Das ab Version 1.3 optionale Attribut <tt>OnlineApplication/@type</tt>
+ spezifiziert den Typ der OnlineApplikation und kann
+ die Werte <tt>publicService</tt> f&uuml;r eine Applikation
+ aus dem &ouml;ffentlichen Bereich und <tt>businessService</tt>
+ f&uuml;r eine Anwendung aus dem privatwirtschaftlichen Bereich annehmen.
+ Ab Version 1.4 kann im Modus <tt>businessService</tt> ein zus&auml;tzliches
+ logisches Attribut <tt>OnlineApplication/@calculateHPI</tt> angegeben werden.
+ Dadurch wird im Falle von <tt>calculateHPI="true"</tt> im privatwirtschaftlichen
+ Bereich zur Identifikation der Health Professional Identifier HPI anstatt des wbPKs (siehe
+ <a href="#OnlineApplication/AuthComponent/IdentificationNumber">
+ OnlineApplication/AuthComponent/IdentificationNumber</a>) berechnet
+ und zur Anmeldung weiterverwendet.
+ Ist dieses Attribut nicht gesetzt, so wird der Typ <tt>publicService</tt>
+ vorausgesetzt. <br />
+ <br />
+ Das Attribut <tt>OnlineApplication/@publicURLPrefix</tt>
+ entspricht dem URL-Pr&auml;fix der nach au&szlig;en
+ sichtbaren Dom&auml;ne der Online-Applikation, welcher
+ von der MOA-ID Proxykomponente durch den URL-Pr&auml;fix
+ der wirklichen Dom&auml;ne (Attribut <tt>OnlineApplication/ProxyComponent/ConnectionParameter/@URL</tt>)
+ ersetzt wird. Es dient als Schl&uuml;ssel zum Auffinden
+ der Konfigurationsparameter zur Online-Applikation. </p>
+ <p>Mit dem Attribut <tt>OnlineApplication/@friendlyName</tt> kann eine benutzerfreundlicher Name f&uuml;r die Online-Applikation angegeben werden. Dieser Name scheint beim Login des Benutzer auf.</p>
+ <p>Das Attribut <tt>OnlineApplication/@keyBoxIdentifier</tt> gibt das Schl&uuml;sselpaar an, welches von der B&uuml;rgerkartenumgebung
+ zum Signieren des Auth Blocks verwendet wird. M&ouml;gliche
+ Werte: <tt>CertifiedKeypair </tt>sowie<tt> SecureSignatureKeypair.<br>
+ </tt><br />
+ Das Element <tt>OnlineApplication</tt> hat optional
+ zwei Kind-Elemente: <tt>AuthComponent</tt> und <tt>ProxyComponent</tt>. </p>
+<div id="OnlineApplication/AuthComponent" />
+ <p id="block"> <b>OnlineApplication/AuthComponent</b>
+ <br />
+ Das Element <tt>OnlineApplication/AuthComponent</tt>
+ muss verwendet werden wenn auf dem Server die Authentisierungskomponente
+ installiert wird. Es enth&auml;lt Parameter, die
+ das Verhalten der Authentisierungskomponente bez&uuml;glich
+ der Online-Applikation konfiguriert. <br />
+ <br />
+ Das optionale Attribut <tt>slVersion</tt> definiert die Version des
+ verwendeten SecurityLayer und damit den Namespace aller
+ Requests, die von MOA-ID an die B&uuml;rgerkartenumgebung
+ geschickt werden. Dieses Attribut kann entweder den Wert <tt>1.1</tt>
+ oder <tt>1.2</tt> annehmen. Fehlt das Attribut, so wird als
+ Defaultwert <tt>1.1</tt> gesetzt.
+ <br />Wurde als Typ der Online-Applikation
+ der Wert <tt>businessService</tt> (vgl. Attribut <tt>OnlineApplication/@type</tt>)
+ spezifiziert, so wird das Attribut <tt>slVersion</tt> ignoriert
+ und immer der Wert <tt>1.2</tt> verwendet, da die f&uuml;r
+ Applikationen aus dem privatwirtschaftlichen Bereich notwendige
+ Berechnung des <tt>wirtschaftsbereichsspezifischen Personenkennzeichens</tt>
+ (<tt>wbPK</tt>) erst ab SecurityLayer Version <tt>1.2</tt> m&ouml;glich ist.
+ <br /><br />
+ Das Attribut <tt id="provideStammzahlOA">provideStammzahl</tt> bestimmt,
+ ob die Stammzahl in den Anmeldedaten aufscheint
+ oder ob der Wert ausgeblendet (d.h. auf den Leerstring gesetzt)
+ wird. Die Attribute <tt>provideAUTHBlock</tt> und
+ <tt id="provideIdentityLinkOA">provideIdentityLink</tt> steuern, ob die
+ Anmeldedaten den Auth-Block bzw. die Personenbindung enthalten.
+ Ab Version 1.3 kann das Attribut <tt>provideCertificate</tt>
+ verwendet werden, um das Signatorzertifikat in die
+ Anmeldedaten aufzunehmen.
+ Alle Attribute sind optional und haben den Default-Wert
+ <tt>false</tt>.
+ <br />
+ <b>Anmerkung</b>: Das Attribut <tt>provideStammzahl</tt> steht in keinem
+ Zusammenhang zum gleichnamigen Attribut
+ <a href="#provideStammzahlVI">VerifyInfoboxes/@provideStammzahl</a>,
+ das angibt ob die Stammzahl an eine <i>Pr&uuml;fapplikation</i> weitergegeben
+ werden darf.
+ <b>Anmerkung</b>: Das Attribut <tt>provideIdentityLink</tt> steht in keinem
+ Zusammenhang zum gleichnamigen Attribut
+ <a href="#provideIdentityLinkVI">VerifyInfoboxes/@provideIdentityLink</a>,
+ das angibt ob die Personenbindung an eine <i>Pr&uuml;fapplikation</i>
+ weitergegeben werden soll.
+ <br />
+ <br />
+ </p>
+ <div id="OnlineApplication/AuthComponent/IdentificationNumber" />
+ <p id="block"> <b>OnlineApplication/AuthComponent/IdentificationNumber</b>
+ <br />
+ Das <tt>wirtschaftsbereichsspezifische Personenkennzeichen</tt> (<tt>wbPK</tt>)
+ wird aus der auf der B&uuml;rgerkarte gespeicherten Stammzahl des B&uuml;rgers
+ und der Stammzahl des Wirtschaftsunternehmens berechnet.
+ Laut <a href="http://reference.e-government.gv.at/E-Government-Gesetz.394.0.html" target="_new">E-Governmentgesetz</a>
+ darf die <i>Errechnung eines wbPK aus der Stammzahl nicht beim Auftraggeber eines
+ privaten Bereichs durchgef&uuml;hrt werden</i> (vgl. E-GovGesetz &sect;12(1).4), und muss deshalb
+ an die B&uuml;rgerkartenumgebung ausgelagert werden.
+ Das <tt>OnlineApplication/AuthComponent/IdentificationNumber</tt> Element
+ wird nun verwendet, um die Stammzahl des Wirtschaftsunternehmens zu spezifizieren,
+ welche in weiterer Folge von MOA-ID an die B&uuml;rgerkartenumgebung &uuml;bergeben
+ wird.<br /> Dieses Element muss bei privatwirtschaftlichen Applikationen
+ vorhanden sein und wird ignoriert, falls es im Kontext von Anwendungen aus
+ dem &ouml;ffentlichen Bereich verwendet wird. <br />
+ Das Element hat genau eines der folgenden m&ouml;glichen Kindelemente
+ aus dem <a href="http://www.buergerkarte.at/konzept/personenbindung/spezifikation/20050214/" target="_new">PersonData</a>
+ Namespace, die als einzigen Inhalt die jeweilige Stammzahl des Unternehmens enthalten:
+ <ul>
+ <li>
+ Das Element <tt>pr:Firmenbuchnummer</tt> enth&auml;lt als einzigen Inhalt
+ die Firmenbuchnummer des Unternehmens.
+ </li>
+ <li>
+ Das Element <tt>pr:Vereinsnummer</tt> enth&auml;lt als einzigen Inhalt
+ die Vereinsregisternummer des Unternehmens.
+ </li>
+ <li>
+ Das Element <tt>pr:ERJPZahl</tt> enth&auml;lt als einzigen Inhalt eine
+ Zahl aus dem Erg&auml;nzungsregister f&uuml;r nicht-nat&uuml;rliche Personen (CorporateBody).
+ </li>
+ <li>
+ Das Element <tt>pr:ZMRzahl</tt> enth&auml;lt als einzigen Inhalt eine
+ Stammzahl einer nat&uuml;rlichen in &Ouml;sterreich meldepflichtigen Person.
+ </li>
+ </ul>
+
+ Die Stammzahl ist jeweils ohne Pr&auml;fix anzugeben, also wird zum Beispiel
+ die Firmenbuchnummer <tt>FN468924i</tt> folgenderma&szlig;en definiert:
+ <br /> <br />
+ <tt>&lt;pr:Firmenbuchnummer&gt;468924i&lt;/pr:Firmenbuchnummer&gt;</tt>
+ <br /><br />
+ Leerzeichen werden ignoriert und im Falle einer Firmenbuchnummer werden
+ f&uuml;hrende Nullen gel&ouml;scht und Bindestriche aus der Nummer entfernt.
+ <br /><br />
+ Beispiele:<br />
+ <blockquote>
+ <tt>468924 i</tt> wird zu <tt>468924i</tt><br />
+ <tt>00468924</tt> wird zu <tt>468924i</tt><br />
+ <tt>468924-i</tt> wird zu <tt>468924i</tt><br />
+ </blockquote>
+ Alternativ zu den oben angef&uuml;hrten Elementen aus dem
+ <a href="http://www.buergerkarte.at/konzept/personenbindung/spezifikation/20050214/" target="_new">PersonData</a>
+ Namespace kann auch das Element <tt>AnyNumber</tt> verwendet werden, um
+ Stammzahlen zu spezifizieren, die nicht einer der vier oben aufgelisteten
+ Kategorien zugeordnet werden k&ouml;nnen.
+ <br></br>
+ Das Element <tt>AnyNumber</tt> hat genau ein Attribut namens <tt>Identifier</tt>,
+ das das Pr&auml;fix der jeweiligen Stammzahl ent&auml;lt. Der Inhalt des
+ Elements <tt>AnyNumber</tt> ist die Stammzahl selbst, wobei die selben Regeln
+ wie oben gelten.
+ <br></br>
+ Die Firmenbuchnummer aus obigem Beispiel k&ouml;nnte man nun beispielsweise mit Hilfe das Elements
+ <tt>AnyNumber</tt> auch folgenderma&szlig;en definieren:
+ <br></br>
+ <tt>&lt;AnyNumber Identifier="FN"&gt;468924i&lt;/AnyNumber&gt;</tt>
+ <br></br>
+ Es sei aber nochmals daraufhingewiesen, dass f&uuml;r Stammzahlen der
+ Kategorien <tt>Firmenbuchnummer</tt>, <tt>Vereinsnummer</tt>,
+ <tt>ERJPZahl</tt> und <tt>ZMRzahl</tt> die vordefinierten Elemente aus
+ dem <a href="http://www.buergerkarte.at/konzept/personenbindung/spezifikation/20050214/" target="_new">PersonData</a>
+ Namespace verwendet werden sollen. Das Element <tt>AnyNumber</tt> wurde haupts&auml;chlich in
+ das Schema aufgenommen, um offen f&uuml;r m&ouml;gliche Erweiterungen zu sein.
+ </p>
+ <div id="OnlineApplication/AuthComponent/Templates" />
+ <p id="block"> <b>OnlineApplication/AuthComponent/Templates</b>
+ <br />
+ Dieses Kindelement kann genau einmal vorkommen und entspricht in seiner Struktur dem
+ Element <a href="#AuthTemplates" target="_new">AuthComponent/Templates</a>.
+ Es kann verwendet werden, um Templates zur Gestaltung der Seiten
+ &quot;Auswahl der B&uuml;rgerkartenumgebung&quot; sowie
+ &quot;Anmeldung mit B&uuml;rgerkarte&quot; individuell f&uuml;r
+ eine Online-Applikation zu definieren. Die hier definierten Templates haben
+ Priorit&auml;t gegen&uuml;ber globalen Templates und Templates, die
+ in der aufrufenden URL &uuml;bergeben werden.
+ </p>
+ </div>
+
+ <div id="OnlineApplication/AuthComponent/TransformsInfo" />
+ <p id="block"> <b>OnlineApplication/AuthComponent/TransformsInfo</b>
+ <br />
+ Dieses Kindelement kann mehrfach vorkommen und entspricht in seiner Struktur
+ dem Element <tt>AuthComponent/SecurityLayer/TransformsInfo</tt>.
+ Das Element kann verwendet werden, um f&uuml;r unterschiedliche
+ Online-Applikationen unterschiedliche Transformationen zu spezifizieren.
+ Alle &uuml;ber dieses Element definierten Transformationen haben
+ Vorrang gegen&uuml;ber die durch <tt>AuthComponent/SecurityLayer/TransformsInfo</tt>
+ angegebenen Transformationen. Das hei&szlig;t, ist f&uuml;r eine
+ Online-Applikation das Kindelement <tt>AuthComponent/TransformsInfo</tt>
+ vorhanden, so wird f&uuml;r diese Applikation die durch dieses Element
+ spezifizierte Transformation verwendet (das Element kann nat&uuml;rlich
+ mehrfach vorkommen, wodurch mehrere Transformationen bezeichnet werden).
+ F&uuml;r alle Applkikationen, die kein Kindelement vom Typ
+ <tt>AuthComponent/TransformsInfo</tt> enthalten, werden die unter
+ <tt>AuthComponent/SecurityLayer/TransformsInfo</tt> spezifizierten
+ &quot;Default-Transformationen&quot; verwendet. <br />
+ Dabei ist zu beachten, dass f&uuml;r jede definierte Transformation
+ ein entsprechendes <tt>MOA-SP/VerifyAuthBlock/VerifyTransformsInfoProfileID</tt>
+ Element vorhanden sein muss.</p>
+ </p>
+ </div>
+ <div id="VerifyInfoboxesOA" >
+ <p id="block"> <b>OnlineApplication/AuthComponent/VerifyInfoboxes</b>
+ <br />
+ Dieses optionale Element entspricht dem <a href="#VerifyInfoboxesAuth">VerifyInfoboxes</a>-Element
+ aus der globalen AUTH-Komponente und &uuml;berschreibt teilweise die
+ dort gesetzten Werte f&uuml;r die jeweilige Infobox pro Online-Applikation.
+ Dabei gelten die folgenden Regeln:
+ <br />
+ Ist nur das globale <a href="#VerifyInfoboxesAuth">VerifyInfoboxes</a>-Element
+ vorhanden, so gelten die dort definierten Parameter f&uuml;r <b>alle</b>
+ Online-Applikationen. Ist kein globales Element vorhanden, so kann
+ MOA-ID f&uuml;r alle Online-Applikation, in deren AUTH-Komponente
+ ein <tt>VerifyInfoboxes</tt>-Element enthalten ist, die darin
+ definierten Infoboxen &uuml;berpr&uuml;fen. F&uuml;r
+ Online-Applikationen, in deren AUTH-Komponente kein
+ <tt>VerifyInfoboxes</tt>-Element gesetzt ist, kann demnach keine
+ andere Infobox als die der Personenbindung validiert werden.
+ <br />
+ Sind sowohl global (<tt>MOA-IDConfiguration/AuthComponent/VerifyInfoboxes</tt>)
+ als auch lokal (<tt>OnlineApplication/AuthComponent/VerifyInfoboxes</tt>)
+ in den Online-Applikationen Infobox-Validatoren konfiguriert, so verarbeitet
+ MOA-ID die darin enthaltenen Parameter wie folgt:
+ <ul>
+ <li id="DefaultTrustProfileOA"><tt>DefaultTrustProfile</tt>: Ein lokal
+ definiertes Default-Trust-Profil hat sowohl Vorrang gegen&uuml;ber einem
+ global gesetzten <a href="#DefaultTrustProfileVI">Default-Trust-Profil</a>
+ als auch gegen&uuml;ber einem global gesetzen
+ <a href="#TrustProfileVI">infobox-spezifischen</a> Trustprofil. Ist
+ beispielsweise im globalen <tt>VerifyInfoboxes</tt>-Element zwar kein
+ Default-Trust-Profil, aber f&uuml;r die Infobox A ein eigenes Trust-Profil
+ definiert, so wird ein lokal definiertes Default-Trust-Profil dem global
+ f&uuml;r die Infobox A gesetzten Trust-Profil vorgezogen.
+ </li>
+ <li id="InfoboxOA"><tt>Infobox</tt>: MOA-ID kann die Vereinigung aus den
+ global und lokal konfigurierten Infoboxen f&uuml;r eine Online-Applikation
+ validieren. Sind beispielsweise global Pr&uuml;fapplikationen
+ f&uuml;r die Infoboxen mit den Bezeichnern
+ (<a href="#IdentifierVI">Infobox/@Identifier</a>-Attribut) <tt>A</tt>
+ und <tt>B</tt> konfiguriert, und lokal f&uuml;r die Online-Applikation
+ <tt>OA1</tt> die Infoboxen <tt>B</tt>, <tt>C</tt> und <tt>D</tt>, so
+ kann MOA-ID f&uuml;r die Online-Applikation <tt>OA1</tt> die
+ Infoboxen <tt>A</tt>, <tt>B</tt>, <tt>C</tt> und <tt>D</tt> validieren.
+ F&uuml;r die Infobox <tt>A</tt> werden dabei die Parameter aus der
+ globalen Konfiguration verwendet und f&uuml;r die Infoboxen
+ <tt>C</tt> und <tt>D</tt> die lokalen Parameter. F&uuml;r die Infobox
+ <tt>B</tt> sind sowohl globale als auch lokale Parameter vorhanden,
+ die von MOA-ID wie folgt interpretiert werden:
+ <ul>
+ <li>Attribute:
+ Die Attribute <a href="#requiredVI">required</a>,
+ <a href="#provideStammzahlVI">provideStammzahl</a> und
+ <a href="#provideIdentityLinkVI">provideIdentityLink</a> <b><i>&uuml;berschreiben</i></b>
+ die global gesetzten Werte. Dabei ist zu beachten, das ein Fehlen dieser
+ Attribute bedeutet, dass ihnen &uuml;ber das Schema der Defaultwert
+ <tt>false</tt> zugewiesen wird. Ist also beispielsweise f&uuml;r die
+ Infobox mit dem Bezeichner <tt>B</tt> das <tt>required</tt>-Attribut
+ global auf <tt>true</tt> gesetzt (&lt;Infobox Identifier="B" required="true"&gt;)
+ und fehlt dieses Attribut lokal in der Online-Applikation <tt>OA1</tt>
+ (&lt;Infobox Identifier="B"&gt;), so hat das <tt>required</tt>-Attribut
+ f&uuml;r die Infobox <tt>B</tt> den Wert <tt>false</tt>.
+ <br />
+ Die Attribute <a href="#requiredVI">required</a>,
+ <a href="#provideStammzahlVI">provideStammzahl</a> und
+ <a href="#provideIdentityLinkVI">provideIdentityLink</a> m&uuml;ssen also
+ f&uuml;r Infoboxen, die sowohl global als auch lokal konfiguriert sind,
+ in jeder lokalen Konfiguration neu gesetzt werden, wenn ihnen der Wert
+ <tt>true</tt> zugwiesen werden sollen.
+ </li>
+ <li>Kind-Elemente:
+ <ul>
+ <li id="FriendlyNameOA"><a href="#FriendlyNameVI">FriendlyName</a>:
+ Ein lokal gesetzter <tt>FriendlyName</tt> wird einem global
+ gesetzten vorgezogen. Ist sowohl lokal als auch global kein
+ <tt>FriendlyName</tt> definiert, so wird das
+ <a href="#IdentifierVI">Identifier</a>-Attribut als <tt>FriendlyName</tt>
+ verwendet.
+ <br />
+ </li>
+ <li id="TrustProfileOA"><a href="#TrustProfileVI">TrustProfileID</a>:
+ Ein lokal definiertes Trust-Profil wird einem lokal definierten
+ Default-Trust-Profil vorgezogen. Sind lokal sowohl kein
+ Default-Trust-Profil als auch kein infobox-spezifisches Trust-Profil
+ definiert, so wird das global gesetzte infobox-spezifisches Trust-Profil
+ verwendet. Fehlt auch dieses, so wird das globale Default-Trust-Profil
+ selektiert. Ist weder lokal als auch lokal ein Trust-Profil
+ definiert, so wird f&uuml;r f&uuml;r die Validierung dieser
+ Infobox kein Trust-Profil ben&ouml;tigt.
+ </li>
+ <li id="ValidatorClassOA"><a href="#ValidatorClassVI">ValidatorClass</a>:
+ Eine lokal gesetzte Validator-Klasse wird einer global gesetzten
+ vorgezogen. Ist sowohl lokal als auch global f&uuml;r eine Infobox
+ keine Validator-Klasse konfiguriert, so wird die Default-Klasse
+ geladen (siehe <a href="#ValidatorClassVI">ValidatorClass</a>).
+ </li>
+ <li id="SchemaLocationsOA"><a href=#SchemaLocations">SchemaLocations</a>:
+ Lokal definierte Schemas werden global definierten vorgezogen.
+ Sind lokal keine Schemas konfiguriert, so werden die globalen verwendet,
+ so sie vorhanden sind.
+ </li>
+ <li id="ApplicationSpecificParametersOA">
+ <a href="#ApplicationSpecificParameters">ApplicationSpecificParameters</a>:
+ Lokal definierte applikationsspezifische Parameter werden global
+ definierten vorgezogen. Sind lokal keine derartigen Parameter
+ konfiguriert, so werden die globalen verwendet, so sie vorhanden
+ sind.
+ </li>
+ </ul>
+ </li>
+ </ul>
+ </li>
+ </ul>
+ <br />
+ <b id="VerifyInfoboxesSample">Beispiel</b>: In der Konfigurationsdatei
+ <a href="examples/SampleMOAIDVerifyInfoboxesConfiguration.xml" target="_new">
+ SampleMOAIDVerifyInfoboxesConfiguration.xml</a> sind global
+ (<tt>MOA-IDConfiguration/AuthComponent/VerifyInfoboxes</tt>)
+ Pr&uuml;fapplikationen f&uuml;r die beiden Infoboxen mit den Bezeichnern
+ <tt>InfoboxA</tt> und <tt>InfoboxB</tt> konfiguriert.
+ <tt>InfoboxA</tt> demonstriert in diesem Beispiel die minimale Konfiguration
+ einer Pr&uuml;fapplikation - es ist nur der Identifier angegeben. MOA-ID
+ wird in diesem Fall versuchen, die Default-Validatorklasse
+ <tt>at.gv.egovernment.moa.id.auth.validator.infoboxa.InfoboxAValidator</tt>
+ zu laden (siehe dazu auch MOA-ID-Spezifikation, Abschnitt 4.7.2.3,
+ <tt>Zuordnung eines InfoboxReadResponse zu einer implementierenden Klasse</tt>).
+ Da ein Default-Trust-Profil (<tt>GlobalVIDefaultTrust</tt>) konfiguriert ist,
+ wird MOA-ID dieses Profil zur Verifikation von Zertifikaten heranziehen.
+ Da kein <tt>FriendlyName</tt> gesetzt ist, wird das <tt>Identifier</tt> Attibut
+ (<tt>InfoboxA</tt>) als <tt>FriendlyName</tt> verwendet. Weitere Parameter
+ sind f&uuml;r die Verifikation dieser Infobox nicht erforderlich.
+ <br />
+ Die Pr&uuml;fapplikation f&uuml;r die <tt>InfoboxB</tt> setzt nahezu alle
+ m&ouml;glichen Parameter mit Ausnahme der Validator-Klasse. MOA-ID wird
+ zur Verifikation dieser Infobox also auch die daf&uuml;r zust&auml;dige Default-Klasse
+ (<tt>at.gv.egovernment.moa.id.auth.validator.infoboxb.InfoboxBValidator</tt>)
+ laden, und alle konfigurierten Parameter an diese Klasse &uuml;bergeben.
+ <br />
+ In die Konfigurationsdatei sind drei Online-Applikationen mit den
+ public URL-Prefixen <tt>https://OA1/</tt>, <tt>https://OA2/</tt> und
+ <tt>https://OA3/</tt> eingetragen.
+ Online-Applikation <tt>OA1</tt> konfiguriert Pr&uuml;fapplikationen f&uuml;r
+ die drei Infoboxen <tt>InfoboxB</tt>, <tt>InfoboxC</tt> und
+ <tt>InfoboxD</tt>. Das hei&szlig;t, MOA-ID kann f&uuml;r die Online-Applikation
+ <tt>OA1</tt> insgesamt vier Infoboxen &uuml;berpr&uuml;fen: die
+ Parameter f&uuml;r die Infobox <tt>InfoboxA</tt> werden
+ von der entsprechenden global konfigurierten Pr&uuml;applikation
+ &uuml;bernommen. Die Infoboxen <tt>InfoboxC</tt> und
+ <tt>InfoboxD</tt> sind nur lokal gesetzt. F&uuml;r <tt>InfoboxB</tt>
+ &uuml;bernimmt MOA-ID die applikationsspezifischen Parameter aus der
+ entsprechenden global konfigurierten Infobox und &uuml;berschreibt
+ alle weiteren Parameter mit den lokalen Werten. Als Trust-Profil wird
+ das lokale Deafult-Trust-Profil (<tt>LocalOA1DefaultTrust</tt>) genommen -
+ dieses hat Vorrang gegen&uuml;ber den global gesetzten Profilen. Weiters
+ ist zu beachten, dass die Attribute <tt>provideStammzahl</tt> und
+ <tt>provideIdentityLink</tt> lokal nicht gesetzt sind, und daher den
+ Deafult-Wert <tt>false</tt> einnehmen.
+ <br />
+ Das <tt>VerifyInfoboxes</tt>-Element in der AUTH-Komponente der zweiten
+ Online-Applikation (<tt>OA2</tt>) spezifiziert keine anderen Pr&uuml;fapplikationen
+ als die global definierten, &uuml;berschreibt aber f&uuml;r beide Infoboxen
+ teilweise die global gesetzten Parameter. <tt>InfoboxA</tt> verwendet
+ ein lokal definiertes Trust-Profil (<tt>LocalInfoboxOA2ATrust</tt>),
+ <tt>InfoboxB</tt> &uuml;bernimmt
+ alle globalen Parameter, setzt aber f&uuml;r die Attribute <tt>required</tt>,
+ <tt>provideStammzahl</tt> und <tt>provideIdentityLink</tt> jeweils den
+ Defaultwert <tt>false</tt>.
+ <br />
+ Die dritte Online-Applikation <tt>OA3</tt> enth&auml;lt in Ihrer AUTH-Komponente
+ kein <tt>VerifyInfoboxes</tt>-Element. MOA-ID &uuml;bernimmt daher f&uuml;r
+ diese Online-Applikation die global konfigurierten Infobox-Pr&uuml;applikationen
+ (<tt>InfoboxA</tt> und <tt>InfoboxB</tt>) mit allen Paramertern genauso wie
+ sie dort gesetzt sind. Zu beachten ist hier, dass das in der AUTH-Komponente
+ auf <tt>true</tt> gesetzte Attribut <tt>proviedStammzahl</tt> die
+ Online-Applikation und <b><i>nicht</i></b> die Pr&uuml;applikation
+ betrifft.
+ <br />
+ </p>
+ </div>
+
+ <div id="OnlineApplication/AuthComponent/Mandates" />
+ <p id="block"> <b>OnlineApplication/AuthComponent/Mandates</b>
+ <br />
+ Mit Hilfe dieses Elements werden die Online-Vollmachten f&uuml;r die Online-Applikation aktiviert.
+ Als Kindelement muss <tt>Profiles</tt> angegeben werden. Dieses Element beinhaltet eine (Komma-separierte)
+ Liste von Vollmachten-Identifikatoren, die festlegen mit welchen Vollmachtstypen man sich bei der Online-Applikation anmelden kann.<br/>
+ Hinweis: Hierzu muss auch die Verbindung zum Online-Vollmachten Service konfiguriert werden - siehe <a href="#AuthComponent_OnlineMandates">hier</a>
+</p>
+
+ </div>
+ <div id="OnlineApplication/ProxyComponent" />
+ <p id="block"> <b>OnlineApplication/ProxyComponent</b>
+ <br />
+ Das Element <tt>OnlineApplication/ProxyComponent</tt>
+ muss verwendet werden wenn auf dem Server die
+ Proxykomponente installiert wird. <br />
+ <br />
+ Das optionale Attribut <tt>configFileURL</tt>
+ verweist auf eine Konfigurationsdatei die dem Schema
+ <a href="../MOA-ID-Configuration-1.4.xsd" target="_new">MOA-ID-Configuration-1.4.xsd</a>
+ entspricht mit Dokument-Element <tt>Configuration</tt>.
+ Die Angabe erfolgt relativ zur verwendeten MOA-ID
+ Konfigurationsdatei. Beispiel f&uuml;r das Element
+ <tt>configFileURL</tt>: &quot;oa/SampleOAConfiguration.xml&quot;.<br />
+ Defaultm&auml;&szlig;ig wird versucht die Datei
+ von der betreffenden OnlineApplikation unter dem
+ Wert: <tt>http://&lt;realURLPrefix&gt;/MOAConfig.xml</tt>
+ zu laden.<br/>
+ (<tt>&lt;realURLPrefix&gt;</tt> entspricht dem
+ Wert von <tt>OnlineApplication/ProxyComponent/ConnectionParameter/@URL</tt>)
+ <br />
+ <br />
+ Das optionale Attribut <tt>sessionTimeOut</tt>
+ legt das Timeout einer Benutzersession in der
+ Proxykomponente in Sekunden fest.<br />
+ Default-Wert: 3600 <br />
+ <br />
+ Im optionalen Attribut <tt>loginParameterResolverImpl</tt>
+ kann der Klassenname eines zu verwendenden <tt>LoginParameterResolver</tt>
+ angegeben werden, welcher die Defaultimplementierung
+ ersetzt. <br />
+ </p>
+ <p id="block">Im optionalen Attribut <tt>loginParameterResolverConfiguration
+ </tt>kann ein Configurationsstring f&uuml;r die
+ Initialisierung der betreffenden <tt>loginParameterResolverImpl</tt>
+ angegeben werden.<br>
+ <br />
+ Im optionalen Attribut <tt>connectionBuilderImpl</tt>
+ kann der Klassenname eines zu verwendenden ConnectionBuilder
+ angegeben werden, welcher die Defaultimplementierung
+ ersetzt. <br />
+ <br />
+ Im Kind-Element <tt>ConnectionParameter</tt> ist
+ konfiguriert, wie MOA-ID-PROXY zur Online-Applikation
+ verbindet. </p>
+ <div id="ChainingModes" />
+ <p id="block"> <b>ChainingModes</b><br />
+ Das Element <tt>ChainingModes</tt> definiert,
+ ob bei der Zertifikatspfad-&uuml;berpr&uuml;fung
+ das Kettenmodell (<tt>"chaining"</tt>) oder
+ das Modell nach PKIX RFC 3280 (<tt>"pkix"</tt>)
+ verwendet werden soll. <br />
+ <br />
+ Das Attribut <tt>systemDefaultMode</tt> spezifiziert
+ das Modell, das im Standardfall verwendet werden
+ soll. <br/>
+ <br/>
+ Mit dem Kind-Element <tt>TrustAnchor</tt> kann
+ f&uuml;r jeden Trust Anchor ein abweichendes
+ Modell spezifiziert werden. Ein Trust Anchor
+ ist ein Zertifikat, das in <tt>TrustedCACertificates</tt>
+ spezifiziert ist. Ein Trust Anchor wird durch
+ den Typ <tt>&lt;dsig:X509IssuerSerialType&gt;</tt>
+ spezifiziert. Das f&uuml;r diesen Trust Anchor
+ g&uuml;ltige Modell wird durch das Attribut
+ <tt>mode</tt> spezifiziert. <br/>
+ <br/>
+ G&uuml;ltige Werte f&uuml;r die Attribute <tt>systemDefaultMode</tt>
+ und <tt>mode</tt> sind <tt>"chaining"</tt> und
+ <tt>"pkix"</tt>. <br/>
+ <br/>
+ <a href="examples/ChainingModes.txt">Beispiel</a>
+ </p>
+ <div id="TrustedCACertificates" />
+ <p id="block"> <b>TrustedCACertificates</b><br />
+ Das Element <tt>TrustedCACertificates</tt>
+ enth&auml;lt das Verzeichnis (relativ zur
+ MOA-ID Konfigurationsdatei), das jene Zertifikate
+ enth&auml;lt, die als vertrauensw&uuml;rdig
+ betrachtet werden. Im Zuge der &Uuml;berpr&uuml;fung
+ der TLS-Serverzertifikate wird die Zertifikatspfaderstellung
+ an einem dieser Zertifikate beendet. </p>
+ <div id="GenericConfiguration" />
+ <p id="block"> <b>GenericConfiguration</b><br />
+ Das Element <tt>GenericConfiguration</tt>
+ erm&ouml;glicht das Setzen von Namen-Werte
+ Paaren mittels der Attribute <tt>name</tt>
+ und <tt>value</tt>. Die folgende Liste spezifiziert
+ <ul>
+ <li>g&uuml;ltige Werte f&uuml;r das name-Attribut,
+ </li>
+ <li>eine Beschreibung </li>
+ <li>g&uuml;ltige Werte f&uuml;r das value-Attribut
+ und (falls vorhanden)</li>
+ <li>den Default-Wert f&uuml;r das value-Attribut.
+ </li>
+ </ul>
+ <table border="0" cellspacing="3" cellpadding="2">
+ <tr id="DirectoryCertStoreParameters.RootDir">
+ <th align="left">name: DirectoryCertStoreParameters.RootDir</th>
+ </tr>
+ <tr>
+ <td id="info"> Gibt den Pfadnamen zu einem
+ Verzeichnis an, das als Zertifikatsspeicher
+ im Zuge der TLS-Server-Zertifikats&uuml;berpr&uuml;fung
+ verwendet wird.<br />
+ <hr />
+ <b>value: </b><br />
+ G&uuml;ltige Werte: Name eines g&uuml;ltigen
+ Verzeichnisses (relativ zur MOA-ID Konfigurationsdatei)<br />
+ <b>Dieser Parameter muss angegeben werden.</b>
+ </td>
+ </tr>
+ </table>
+ <table border="0" cellspacing="3" cellpadding="2">
+ <tr id="AuthenticationSession.TimeOut">
+ <th align="left">name: AuthenticationSession.TimeOut</th>
+ </tr>
+ <tr>
+ <td id="info"> Gibt die Zeitspanne in
+ Sekunden vom Beginn der Authentisierung
+ bis zum Anlegen der Anmeldedaten an.
+ Wird die Angegebene Zeitspanne &uuml;berschritten
+ wird der Anmeldevorgang abgebrochen.
+ <br />
+ <hr />
+ <b>value: </b><br />
+ G&uuml;ltige Werte: positive Ganzzahlen
+ <br />
+ Default-Wert: 120 </td>
+ </tr>
+ </table>
+ <table border="0" cellspacing="3" cellpadding="2">
+ <tr id="AuthenticationData.TimeOut">
+ <th align="left">name: AuthenticationData.TimeOut</th>
+ </tr>
+ <tr>
+ <td id="info"> Gibt die Zeitspanne in
+ Sekunden an, f&uuml;r die die Anmeldedaten
+ in der Authentisierungskomponente zum
+ Abholen durch die Proxykomponente oder
+ eine nachfolgende Applikation bereitstehen.
+ Nach Ablauf dieser Zeitspanne werden
+ die Anmeldedaten gel&ouml;scht.<br />
+ <hr />
+ <b>value: </b><br />
+ G&uuml;ltige Werte: positive Ganzzahlen<br />
+ Default-Wert: 600 </td>
+ </tr>
+ </table>
+ <table border="0" cellspacing="3" cellpadding="2">
+ <tr id="TrustManager.RevocationChecking">
+ <th align="left">name: TrustManager.RevocationChecking</th>
+ </tr>
+ <tr>
+ <td id="info"> F&uuml;r die TLS-Server-Authentisierung
+ d&uuml;rfen nur Server-Zertifikate verwendet
+ werden, die eine CRLDP-Extension enthalten
+ (andernfalls kann von MOA-ID keine CRL-&uuml;berpr&uuml;fung
+ durchgef&uuml;hrt werden). <br />
+ Soll das RevocationChecking generell
+ ausgeschaltet werden, ist dieses Attribut
+ anzugeben und auf "false" zu setzen.
+ <br />
+ <hr />
+ <b>value: </b><br />
+ G&uuml;ltige Werte: true, false<br />
+ Default-Wert: true </td>
+ </tr>
+ </table>
+ <table border="0" cellspacing="3" cellpadding="2">
+ <tr id="TrustManager.RevocationChecking">
+ <th align="left">name: FrontendServlets.EnableHTTPConnection</th>
+ </tr>
+ <tr>
+ <td id="info">
+ <p>Standardm&auml;&szlig;ig k&ouml;nnen
+ die beiden Servlets &quot;StartAuthentication&quot;
+ und &quot;SelectBKU&quot; welche das
+ User-Frontend darstellen, aus Sicherheitsgr&uuml;nden,
+ nur &uuml;ber das Schema HTTPS aufgerufen
+ werden. </p>
+ <p>Wenn die beiden Servlets jedoch auch
+ Verbindungen nach dem Schema HTTP
+ entgegennehmen sollen, so kann mittels
+ dem Attribut &quot;EnableHTTPServletConnection&quot;
+ erlaubt werden.</p>
+ <p>Hinweis: Sicher und sinnvoll ist
+ das Erlauben der HTTP Verbindung nur
+ dann, wenn ein Vorgeschalteter Webserver
+ das HTTPS handling &uuml;bernimmt,
+ und eine Verbindung zu den Servlets
+ nur &uuml;ber diesen Webserver m&ouml;glich
+ ist.</p>
+ <hr />
+ <b>value: </b><br />
+ G&uuml;ltige Werte: true, false<br />
+ Default-Wert: false</td>
+ </tr>
+ </table>
+ <table border="0" cellspacing="3" cellpadding="2">
+ <tr id="TrustManager.RevocationChecking">
+ <th align="left"><a name="DataURLPrefix"></a>name:
+ FrontendServlets.DataURLPrefix</th>
+ </tr>
+ <tr>
+ <td id="info">
+ <p>Standardm&auml;&szlig;ig wird als
+ DataURL Prefix das URL Pr&auml;fix
+ unter dem die MOA-ID Servlets erreichbar
+ sind verwendet. Im Falle das sich
+ der MOA-ID Server hinter einer Firewall
+ befindet und die Requests von einem
+ vorgelagertem Webserver weitergereicht
+ werden, kann mit FrontendServlets.DataURLPrefix
+ ein alternatives URL Pr&auml;fix angegeben
+ werden. In diesem Fall muss der Webserver
+ so konfiguriert sein, dass er Request
+ auf diese URLs an den MOA-ID Server
+ weiterleitet.</p>
+ <hr />
+ <b>value: </b><br />
+ G&uuml;ltige Werte: URLs nach dem Schema
+ 'http://' und 'https://'<br />
+ Default-Wert: kein Default-Wert<br>
+ Beispiel: &lt;GenericConfiguration name=&quot;FrontendServlets.DataURLPrefix&quot;
+ value=&quot;https://&lt;your_webserver&gt;/moa-id-auth/&quot;/&gt;</td>
+ </tr>
+ </table>
+ </div>
+ <div id="TrustedBKUs" />
+ <p id="block"> <b>TrustedBKUs</b><br />
+ Das Element <tt>TrustedBKUs</tt>
+ erm&ouml;glicht das Setzen von vertrauensw&uuml;rdigen B&uuml;rgerkartenumgebungen.
+ In <tt>BKUURL</tt> Unterelementen werden die vertrauensw&uuml;rdigen URLs eingetragen. Diese Liste von URLs wird mit dem Parameter bkuURI abgeglichen. Lokale B&uuml;rgerkartenumgebungen m&uuml;ssen nicht eingetragen werden - diesen wird automatisch vertraut.
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </td>
+ </tr></table>
+
+
+<br /><br />
+<div id="oa-config" />
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top" id="klein">
+<p id="subtitel">&#160;</p>
+<div id="slogan">
+<br /><br />
+</div>
+</td>
+<td valign="top">
+<p id="subtitel">Konfiguration der Online-Applikation</p>
+<div id="block">
+Die Konfiguration der OA beschreibt die Art und Weise, wie die Proxykomponente die Anmeldung an der Online-Applikation
+durchf&uuml;hrt.
+<br /><br />
+Der Name der Konfigurationsdatei wird in der Konfiguration von MOA-ID als Wert des Attributs
+<tt>configFileURL</tt> des Elements <tt>MOA-IDConfiguration/OnlineApplication/ProxyComponent</tt> hinterlegt.
+<br/>Ist dieses Attribut nicht gesetzt, dann wird die Datei von <tt>http://&lt;realURLPrefix&gt;/MOAConfig.xml</tt> geladen,
+wobei <tt>&lt;realURLPrefix&gt;</tt> dem Konfigurationswert <tt>OnlineApplication/ProxyComponent/ConnectionParameter/@URL</tt> entspricht.
+<br /><br />
+Die Konfigurationsdatei ist eine XML-Datei, die dem Schema
+<a href="../MOA-ID-Configuration-1.4.xsd" target="_new">MOA-ID-Configuration-1.4.xsd</a> mit dem Wurzelelement
+<tt>Configuration</tt> entspricht.
+</div>
+
+<div id="LoginType" />
+<p id="block">
+<b>LoginType</b><br />
+Das Element <tt>LoginType</tt> gibt an, ob die Online-Applikation ein einmaliges Login erwartet (<tt>stateful</tt>),
+oder ob die Login-Parameter bei jedem Request mitgegeben werden m&uuml;ssen (<tt>stateless</tt>). Im Fall einer stateful
+Online-Applikation werden die in der HTTP-Session der Proxykomponente gespeicherten Anmeldedaten nur f&uuml;r den Aufruf
+des Login-Scripts verwendet. Unmittelbar nach dem Aufruf werden sie gel&ouml;scht.
+<br />
+Default-Wert: <tt>stateful</tt>
+</p>
+</div>
+
+<div id="ParamAuth" />
+<p id="block">
+<b>ParamAuth</b><br />
+Konfiguriert die &uuml;bergabe der Authentisierungs-Parameter an die Online-Applikation mittels URL-Parametern. Das Element
+kann ein oder mehrere Kind-Elemente <tt>&lt;Parameter&gt;</tt> beinhalten.
+</p>
+</div>
+
+<div id="Parameter" />
+<p id="block">
+<b>ParamAuth/Parameter</b><br />
+Das Element <tt>&lt;Parameter&gt;</tt> enth&auml;lt die Attribute <tt>Name</tt> und <tt>Value</tt>.
+<br /><br />
+Das Attribut <tt>Name</tt> beschreibt den Namen des Parameters und ist ein frei zu w&auml;hlender String.
+<br /><br />
+Das Attribut <tt>Value</tt> beschreibt den Inhalt des Parameters und kann einen der durch <tt>MOAAuthDataType</tt> beschriebenen
+Werte annehmen. G&uuml;ltige Werte von <tt>MOAAuthDataType</tt> sind:
+<ul>
+<li><tt>MOAGivenName</tt> - der Vorname des Benutzers, wie in der Personenbindung enthalten
+<li><tt>MOAFamilyName</tt> - der Nachname des Benutzers, wie in der Personenbindung enthalten
+<li><tt>MOADateOfBirth</tt> - das Geburtsdatum des Benutzers, wie in der Personenbindung enthalten
+<li><tt>MOABPK</tt> - die bereichsspezifische Personenkennzeichnung des Benutzers, wie von der
+Authentisierungskomponente berechnet
+<li><tt>MOAWBPK</tt> - das wirtschaftsbereichsspezifische Personenkennzeichen des Benutzers, wie von der
+B&uuml;gerkartenumgebung berechnet
+<li><tt>MOAPublicAuthority</tt> - wird durch <tt>true</tt> ersetzt, falls der Benutzer mit einem Zertifikat signierte,
+welches eine <a href="../OID-1-0-3.pdf">Beh&ouml;rdenerweiterung</a> beinhaltet. Andernfalls wird <tt>false</tt> gesetzt
+<li><tt>MOABKZ</tt> - das Beh&ouml;rdenkennzeichen (nur sinnvoll, wenn <tt>MOAPublicAuthority</tt> den Wert <tt>true</tt>
+ergibt)
+<li><tt>MOAQualifiedCertificate</tt> - wird durch <tt>true</tt> ersetzt, falls das Zertifikat des Benutzers
+qualifiziert ist, andernfalls wird <tt>false</tt> gesetzt
+<li><tt>MOAStammzahl</tt> - die Stammzahl des Benutzers; diese ist nur dann verf&uuml;gbar, wenn die Online-Applikation
+die Stammzahl bekommen darf (und daher in der Personenbindung enthalten ist)
+<li><tt>MOAIPAddress</tt> - IP-Adresse des Client des Benutzers.
+</ul>
+
+Anhand der <tt>&lt;Parameter&gt;</tt>-Elemente wird der Request f&uuml;r den Login-Vorgang (f&uuml;r stateful Online-Applikationen)
+folgenderma&szlig;en zusammenge-stellt:<br />
+<blockquote>
+<code>GET https://&lt;login-url&gt;?<br />
+&nbsp;&nbsp;&lt;p1.name=p1.resolvedValue&gt;&<br />
+&nbsp;&nbsp;&lt;p2.name=p2.resolvedValue&gt;...</code>
+</blockquote>
+<p id="block">
+Die <tt>&lt;login-url&gt;</tt> ergibt sich aus dem Parameter OA des <a href="id-anwendung_1.htm">Aufrufs von MOA-ID-AUTH</a>,
+zusammen mit der Konfiguration von <tt>OnlineApplication/@publicURLPrefix</tt> und von <tt>OnlineApplication/ProxyComponent/ConnectionParameter/@URL</tt>.
+<br/>Der Wert <tt>resolvedValue</tt> wird in MOA-ID-PROXY je nach Wert des Platzhalters eingesetzt.
+</p>
+<tt></tt></div><tt></tt>
+<div id="BasicAuth" />
+<p id="block">
+<b>BasicAuth</b><br />
+Das Element <tt>BasicAuth</tt> konfiguriert die &uuml;bergabe der Authentisierungs-Parameter an die Online-Appliktion
+mittels HTTP Basic Authentication. Es enth&auml;lt zwei Kind-Elemente.
+<br /><br />
+Das Element <tt>UserID</tt> gibt die UserId des zu authentisierenden Benutzers an und kann einen der durch
+<tt>MOAAuthDataType</tt> beschriebenen Werte annehmen.
+<br /><br />
+Das Element <tt>Password</tt> gibt das Passwort des zu authentisierenden Benutzers an und kann einen der durch
+<tt>MOAAuthDataType</tt> beschriebenen Werte annehmen.
+</p>
+</div>
+
+<div id="HeaderAuth" />
+<p id="block">
+<b>HeaderAuth</b><br />
+Das Element <tt>HeaderAuth</tt> konfiguriert die &uuml;bergabe der Authentisierungs-Parameter an die Online-Applikation
+in HTTP Request Headern. Das Element kann ein oder mehrere Kind-Elemente <tt>&lt;Header&gt;</tt> beinhalten.
+</p>
+</div>
+
+<div id="Header" />
+<p id="block">
+<b>HeaderAuth/Header</b><br />
+Das Element <tt>&lt;Header&gt;</tt> enth&auml;lt die Attribute Name und Value.
+<br /><br />
+Das Attribut <tt>Name</tt> beschreibt den Namen des Header und ist ein frei zu w&auml;hlender String.
+<br /><br />
+Das Attribut <tt>Value</tt> beschreibt den Inhalt des Header und kann einen der durch <tt>MOAAuthDataType</tt>
+beschriebenen Werte annehmen.
+<br /><br />
+Die Header werden folgenderma&szlig;en in den Request an die Online-Applikation eingef&uuml;gt:
+<blockquote><pre>
+&lt;h1.name&gt;:&lt;h1.resolvedValue&gt;
+&lt;h2.name&gt;:&lt;h2.resolvedValue&gt;
+...
+</pre></blockquote>
+Der Wert <tt>resolvedValue</tt> wird in der Proxykomponente je nach Wert des Platzhalters eingesetzt.
+Etwaige Header aus dem urspr&uuml;nglichen Request an die Proxykomponente, die denselben Namen haben, m&uuml;ssen
+&uuml;berschrieben werden.
+<p></p>
+</div>
+</tt></tt></td></tr></table>
+
+
+<div id="sp-config" />
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top" id="klein">
+<p id="subtitel">&#160;</p>
+<div id="slogan">
+<br /><br />
+</div>
+</td>
+<td valign="top">
+<p id="subtitel">Konfiguration von MOA-SP</p>
+<div id="block">
+
+ <p id="block"> MOA-ID &uuml;berpr&uuml;ft die Signaturen der Personenbindung und
+ des AUTH-Blocks mit dem <tt>VerifyXMLSignatureRequest</tt> von
+ MOA-SP. Dazu muss MOA-SP wie unten beschreiben konfiguriert werden.
+ <br />
+ <br />
+ <b>VerifyTransformsInfoProfile</b><br />
+ Der Request zum &uuml;berpr&uuml;fen der Signatur des AUTH-Blocks
+ verwendet ein vordefiniertes VerifyTransformsInfoProfile. Die
+ im Request verwendete Profil-ID wird in der MOA-ID Konfigurationsdatei
+ im Element <tt>/MOA-IDConfiguration/ AuthComponent/MOA-SP/VerifyAuthBlock/
+ VerifyTransformsInfoProfileID</tt> definiert. Entsprechend muss
+ am MOA-SP Server ein VerifyTransformsInfoProfile mit gleichlautender
+ ID definiert werden. Die Profiledefinition selbst ist in der Auslieferung
+ von MOA-ID in <tt>$MOA_ID_INST_AUTH/conf/moa-spss/profiles/MOAIDTransformAuthBlock.xml</tt>
+ enthalten. Diese Profildefinition muss unver&auml;ndert &uuml;bernommen
+ werden. </p>
+ <div id="verifytransformsInfoProfile" /></div>
+
+<div id="trustProfile" />
+<p id="block">
+<b>TrustProfile</b><br />
+Die Requests zur &uuml;berpr&uuml;fung der Signatur verwenden vordefinierte TrustProfile.
+Die im Request verwendete Profil-IDs werden in der MOA-ID Konfigurationsdatei
+in den Elementen <tt>/MOA-IDConfiguration/AuthComponent/MOA-SP/VerifyIdentityLink/ TrustProfileID</tt> und
+<tt>/MOA-IDConfiguration/AuthComponent/MOA-SP/VerifyAuthBlock/TrustProfileID</tt> definiert. Diese beiden Elemente
+k&ouml;nnen unterschiedliche oder identische TrustProfileIDs enthalten.
+Am MOA-SP Server m&uuml;ssen TrustProfile mit gleichlautender ID definiert werden.
+Die Auslieferung von MOA-ID enth&auml;lt das Verzeichnis <tt>$MOA_ID_INST_AUTH/conf/moa-spss/trustprofiles/MOAIDBuergerkarteRoot</tt>,
+das als TrustProfile verwendet werden kann. Weitere Zertifikate k&ouml;nnen als vertrauensw&uuml;rdig hinzugef&uuml;gt werden.
+</p>
+</div>
+
+<div id="certstore" />
+<p id="block">
+<b>Certstore</b><br />
+Zum Aufbau eines Zertifikatspfades k&ouml;nnen ben&ouml;tigte Zertifikate aus einem Zertifikatsspeicher verwendet werden.
+Die Auslieferung von MOA-ID enth&auml;lt das Verzeichnis <tt>$MOA_ID_INST_AUTH/conf/moa-spss/certstore</tt>, das als initialer
+Zertifikatsspeicher verwendet werden kann.
+</p>
+</div>
+
+<div>
+Hinweis: Mit dem Wechsel auf Version 1.3 verwendet MOA SP/SS ein neues Format f&uuml;r die XML-Konfigurationsdatei.
+F&uuml;r die Konvertierung einer &auml;lteren Konfigurationsdatei auf das neue Format steht Ihnen ein Tool
+zur Verf&uuml;gung. Details dazu finden sie in der der Distribution von MOA-SP/SS beiligenden
+Dokumentation im Kapitel 'Konfiguration', Abschnitt 1.2.1.<br>
+
+</div>
+</td></tr></table>
+
+
+<div id="online-config" />
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top" id="klein">
+<p id="subtitel">&#160;</p>
+<div id="slogan">
+<br /><br />
+</div>
+</td>
+<td valign="top">
+<p id="subtitel">&Auml;nderung der Konfiguration w&auml;hrend des Betriebs</p>
+<div id="block">
+Der Inhalt dieser Konfiguration, bzw. jene Teile, auf die indirekt verwiesen wird, k&ouml;nnen w&auml;hrend des laufenden
+Betriebes des MOA-Servers ge&auml;ndert werden. Der Server selbst wird durch den Aufruf einer <a href="id-admin_1.htm#ConfigUpdate">URL</a>
+(im Applikationskontext von MOA ID) dazu veranlasst, die ge&auml;nderte Konfiguration neu einzulesen.
+Im Falle einer fehlerhaften neuen Konfiguration wird die urspr&uuml;ngliche Konfiguration beibehalten.
+</div>
+
+
+</td>
+</tr>
+
+<tr>
+<td width="170" valign="top" id="klein">
+<p id="subtitel">&#160;</p>
+<div id="slogan">
+<br /><br />
+</div>
+</td>
+<div id="errorpages" />
+<td valign="top">
+<p id="subtitel">&Auml;ndern der Default Errorpages</p>
+<div id="block">
+ <p>Die Default-Errorpages geben bei MOA-ID-AUTH und MOA-ID-PROXY immer die entsprechende Fehlermeldung aus, so eine vorhanden ist. M&ouml;chte man dies verhindern bzw. abh&auml;ngig vom eingestellten Log-Level machen so k&ouml;nnen diese Errorpages ersetzt werden. Entsprechende Errorpages sind unter $MOA_ID_INST_AUTH/errorpages bzw. $MOA_ID_INST_PROXY/errorpages zu finden. Diese k&ouml;nnen die Default-Errorpages unter dem jeweiligen webapps-Kontext von MOA-ID-AUTH (errorpage-auth.jsp) bzw. MOA-ID-PROXY (errorpage-proxy.jsp )ersetzen. </p>
+ <p>Die in $MOA_ID_INST_AUTH/errorpages bzw. $MOA_ID_INST_PROXY/errorpages enthaltenen Errorpages bedeuten dabei folgendes:</p>
+ <ul>
+ <li>errorpage-auth_debug.jsp und errorpage-proxy_debug.jsp:<br>
+ Geben erweiterte Meldungen wie (ErrorMessage, ExceptionThrown) aus, wenn der Log-Level f&uuml;r
+ moa.id.auth bzw. moa.id.proxy auf debug gesetzt sind. Ansonsten erfolgt nur eine allgemeine Ausgabe, dass ein
+ Fehler aufgetreten ist.</li>
+ <li>errorpage-auth_empty.jsp und errorpage-proxy_empty.jsp:<br>
+ Unabh&auml;ngig vom Log-Level erfolgt nur einen allgemeine Ausgabe, dass ein Fehler aufgetreten ist.<br>
+ </li>
+ </ul>
+ <p></p>
+</div></td>
+
+</tr>
+
+
+<tr>
+<td width="170" valign="top" id="klein">
+<p id="subtitel">&#160;</p>
+<div id="slogan">
+<br /><br />
+</div>
+</td>
+<td valign="top">
+<div id="security" />
+<p id="subtitel">Tomcat Security Manager</p>
+<div id="block">
+ <p>Apache Tomcat bietet die M&ouml;glichkeit den Server unter einem Security Manager zu betreiben. Damit ist es m&ouml;glich den lokalen Dateizugriff zu beschr&auml;nken. Mit Hilfe der Datei &quot;catalina.policy&quot; k&ouml;nnen so Zugriffe auf lokale Dateien und Verzeichnisse festgelegt werden. Eine beispielhafte catalina.policy Datei finden Sie im Verzeichnis $MOA_ID_INST_AUTH/tomcat bzw. $MOA_ID_INST_PROXY/tomcat. Diese Datei wurde unter Apache Tomcat 4.1.31, 5.0.28 und 5.5.27 getestet. </p>
+ <p>Mehr Informationen zum Security Manager entnehmen Sie bitte der entsprechenden Apache Tomcat Dokumentation. </p>
+ </div></td>
+
+</tr>
+</table>
+<br /><br />
+
+
+
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top"><br /></td>
+<td valign="top">
+<hr />
+<div style="font-size:8pt; color:#909090">&copy; 2010</div>
+</td></tr></table>
+<br />
+
+
+</div>
+</div></div></div></body>
+</html>
diff --git a/id/server/doc/moa_id/id-admin_3.htm b/id/server/doc/moa_id/id-admin_3.htm
new file mode 100644
index 000000000..8b1c74e7c
--- /dev/null
+++ b/id/server/doc/moa_id/id-admin_3.htm
@@ -0,0 +1,204 @@
+<html>
+<head>
+ <title>MOA ID-Administration</title>
+ <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
+ <meta content="heinz.rosenkranz@brz.gv.at" name="author"/>
+
+<style type="text/css">
+ body { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; }
+ td { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; }
+ th { font-family:"Verdana", "Arial"; font-size:10pt; font-weight:bold; color:#d8d8d8; background:#505050}
+ li { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; margin-top:3px }
+ ul { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; margin-top:3px }
+ tt { font-size:9pt; color:#505060; }
+ #titel { font-family:"Verdana", "Arial"; font-size:18pt; color:#505060; }
+ #subtitel { font-family:"Verdana", "Arial"; font-size:12pt; font-weight:bold; color:#505060; }
+ #slogan { font-family:"Verdana", "Arial"; font-size:8pt; color:#808090; text-align:justify; width:160px }
+ #block { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; text-align:justify }
+ #klein { font-family:"Verdana", "Arial"; font-size:9pt; color:#505060; margin-top:3px }
+ #info { font-family:"Verdana", "Arial"; font-size:8pt; color:#505060; padding:3px; border:solid 1px #c0c0c0 }
+ #infolist { font-family:"Verdana", "Arial"; font-size:8pt; color:#505060; }
+ a:link {color:#000090}
+ a:visited {color:#000090}
+ a:hover {color:#c03030}
+ a {text-decoration: none}
+</style>
+
+<script language="JavaScript">
+<!--
+function goWin(url) {
+ Fenster=window.open(url,"smallWin","toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=yes,scrollbars=yes,width=500,height=480,top=20,screenY=0,left=20,screenX=0");
+ window.setTimeout("showWin()",300);
+}
+function showWin() { Fenster.focus(); }
+// -->
+</script>
+</head>
+
+<body bgcolor="#FFFFFF" >
+<div style="width:650px">
+
+<!-- Projekt-Logo -->
+<div style="height:42px; font-size:16pt; color:#b0b8c0; background:#003050">
+&#160;Module f&uuml;r Online-Applikationen
+</div>
+<div style="margin-left:8px; margin-top:3px; font-size:8pt; color:#707070; ">
+<!-- Development Center der BRZ GmbH, A-Trust und IAIK Graz -->&#160;
+</div>
+<div style="margin-top:-65px; text-align:right; font-size:8pt; font-weight:bold; color:#d04040;" >
+Projekt <span style="font-size:48pt; ">moa</span>&#160;
+</div>
+<br />
+
+<!-- First Section with Navigation -->
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top">
+<div style="font-weight:bold; margin-top:12px">MOA-ID</div><br />
+<div id="klein"><a href="id-admin.htm"><img src="../moa_images/idle.gif" border="0" width="13" height="14" />
+ <b> &Uuml;bersicht</b></a></div>
+<div id="klein"><a href="id-admin_1.htm"><img src="../moa_images/idle.gif" border="0" width="13" height="14" />
+ <b> Basis-Installation</b></a></div>
+<div id="klein"><a href="id-admin_2.htm"><img src="../moa_images/idle.gif" border="0" width="13" height="14" />
+ <b> Konfiguration </b></a></div>
+<div id="klein"><img src="../moa_images/select.gif" border="0" width="13" height="14" />
+ <b> Optionale<br />&#160; &#160;&#160;Komponenten</b></div>
+<br />
+<div id="klein"><a href="moa.htm"><img src="../moa_images/west.gif" border="0" width="13" height="14" />
+ <b> Zur&uuml;ck</b></a></div>
+<br />
+<div id="slogan">
+<b>Optionale <br />Komponenten</b><br />
+<a href="#IIS"><b>IIS </b></a><br />
+<a href="#Apache"><b>Apache </b></a><br />
+<a href="#SQL"><b>PostgreSQL </b></a><br />
+</div>
+</td>
+
+<div id="IIS" />
+<td valign="top">
+<p id="titel">Konfiguration der optionalen Komponenten</p>
+<p id="subtitel">Konfiguration des Microsoft Internet Information Server (optional)</p>
+<div id="block">
+Vor MOA-ID-AUTH oder MOA-ID-PROXY kann optional ein MS IIS vorgeschaltet sein. In diesem Fall &uuml;bernimmt der MS IIS die HTTP bzw. HTTPS-Kommunikation mit dem Aufrufer des Webservices. Die Kommunikation zwischen MS IIS und dem in Tomcat deployten Webservice wird durch Jakarta mod_jk durchgef&uuml;hrt.<br /><br />
+<b>Konfiguration von Jakarta mod_jk im MS IIS</b><br />
+F&uuml;r die Kommunikation des MS IIS mit dem im Tomcat deployten Webservice wird das ISAPI-Modul von Jakarta mod_jk im MS IIS installiert und konfiguriert. Eine detaillierte Installations- und Konfigurationsanleitung gibt das <a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/iishowto.html" target="_new">mod_jk IIS HowTo</a>. Beispiele f&uuml;r <tt>workers.properties</tt> und <tt>uriworkermap.properties</tt> Dateien liegen im ausgelieferten moa-id-auth-x.y.zip bzw. moa-id-proxy-x.y.zip, Verzeichnis tomcat bei.
+<br /><br />
+<b>Konfiguration von Tomcat</b><br />
+Damit Tomcat die Aufrufe, die von MS IIS mittels Jakarta mod_jk weiterleitet, entgegennehmen kann, muss in $CATALINA_HOME/conf/server.xml der AJP 1.3 Connector aktiviert werden. Im Gegenzug k&ouml;nnen die Connectoren f&uuml;r HTTP und HTTPS deaktiviert werden. Das geschieht am einfachsten durch ein- bzw. auskommentieren der entsprechenden <tt>Connector</tt> Konfigurations-Elemente in dieser Datei.
+<br /><br />
+</div>
+<div id="block">
+ <p><b>Konfiguration von SSL</b><br />
+ Die Dokumentation zum Einrichten von SSL auf dem MS IIS steht nach
+ Installation des IIS unter http://localhost/iisHelp/ bzw. <a href="http://www.microsoft.com/windows2000/en/server/iis/default.asp" target="_new">online</a>
+ zur Verf&uuml;gung. </p>
+ <p><b><a name="Prefix"></a>Konfiguration des zu verwendenden DATA-URL
+ Pr&auml;fix</b><br>
+ Befindet sich der Rechner auf dem MOA-ID installiert wird hinter
+ einer Firewall welche zwar Zugriffe vom vorgelagerten Webserver
+ zul&auml;sst, nicht jedoch direkte Zugriffe (von den Rechnern von
+ MOA-ID Benutzern), so muss manuell in der Konfigurationsdatei von
+ MOA-ID ein s.g. DATA-URL Pr&auml;fix vergeben werden. An dieses
+ URL-Pr&auml;fix werden Daten von der verwendeten B&uuml;rgerkartenumgebung
+ gesendet. Details finden sie im Abschnitt <a href="./id-admin_2.htm#DataURLPrefix">Konfiguration</a>.
+ Requests an das DataURL-Pr&auml;fix&gt; m&uuml;ssen durch den Webserver
+ an https://&lt;moa-id-rechnername&gt;/moa-id-auth/ bzw. an http://&lt;moa-id-rechnername&gt;/moa-id-auth/
+ weitergeleitet werden.</p>
+ </div>
+</td></div></tr></table>
+<br /><br />
+
+
+<div id="Apache" />
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top" id="klein">
+<p id="subtitel">&#160;</p>
+<div id="slogan">
+<br /><br />
+</div>
+</td>
+<td valign="top">
+<p id="subtitel">Konfiguration des Apache Webservers (optional)</p>
+<div id="block">
+Vor MOA-ID-AUTH oder MOA-ID-PROXY kann ein Apache Webserver vorgeschaltet sein. Das Prinzip funktioniert wie bei MS IIS, auch hier wird Jakarta mod_jk f&uuml;r die Kommunikation zwischen Webserver und Tomcat eingesetzt.
+<br /><br />
+<b>Konfiguration von Jakarta mod_jk im Apache Webserver</b><br />
+ Um MOA-ID-AUTH oder MOA-ID-PROXY hinter einem Apache Webserver zu betreiben, ist die Konfiguration des Apache-Moduls mod_jk erforderlich. Eine detaillierte Installations- und Konfigurationsanleitung gibt das <a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/aphowto.html" target="_new">mod_jk Apache HowTo</a>. Ein Beispiel f&uuml;r eine <tt>workers.properties</tt> Datei liegt im Verzeichnis $MOA_SPSS_INST/conf/moa bei.<br />
+Um MOA-ID-AUTH oder MOA-ID-PROXY dem Apache Webserver bekannt zu machen, muss folgender Eintrag in die Apache Konfigurationsdatei gemacht werden:
+<pre>
+ JkMount /moa-id-auth/* moaworker
+</pre>
+oder f&uuml;r die Proxy-Komponente
+<pre>
+ JkMount /* moaworker
+</pre>
+ <br />
+<b>Konfiguration von Tomcat</b><br />
+Die Konfiguration von Tomcat ist analog wie im Abschnitt &uuml;ber den MS IIS durchzuf&uuml;hren.
+<br /><br />
+
+<b>Konfiguration von SSL mit mod_SSL </b><br />
+Apache kann in Verbindung mit mod_SSL als SSL-Endpunkt f&uuml;r das MOA-ID-AUTH Webservice fungieren. In diesem Fall entf&auml;llt die SSL-Konfiguration in Tomcat, da Apache und Tomcat auch im Fall von SSL Daten via mod_jk austauschen. Eine detaillierte Installations- und Konfigurationsanleitung von mod_SSL gibt die <a href="http://www.modssl.org/docs/" target="_new">Online-Dokumentation</a>.
+<br /><br />
+Bei der Verwendung von Client-Authentisierung muss darauf geachtet werden, dass mod_ssl die HTTP-Header mit den Informationen &uuml;ber das Client-Zertifikat exportiert. Dies wird durch Angabe der Option<br />
+<pre>
+ SSLOptions +ExportCertData +StdEnvVars
+</pre>
+in der Apache-Konfiguration erreicht.<br />
+Weiters muss Jakarta mod_jk angewiesen werden, die SSL Schl&uuml;ssell&auml;nge zu exportieren. Dies geschieht mit der Direktive:
+<pre>
+ JkOptions +ForwardKeySize
+ +ForwardURICompat
+ -ForwardDirectories
+</pre>
+ <p><b>Konfiguration des zu verwendenden DATA-URL Pr&auml;fix</b></p>
+ <p>siehe gleichnamige <a href="id-admin_3.htm#Prefix">&Uuml;berschrift
+ </a>in Abschnitt &quot;Konfiguration des Microsoft Internet Information
+ Server (optional)&quot;</p>
+ </div>
+</td></tr></table>
+<br /><br />
+
+
+<div id="SQL" />
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top" id="klein">
+<p id="subtitel">&#160;</p>
+</td>
+<td valign="top">
+<p id="subtitel">Konfiguration von PostgreSQL</p>
+<div id="block">
+MOA-ID-AUTH bzw. MOA-ID-PROXY kann PostgreSQL zum Abspeichern von Log-Meldungen verwenden. Hierf&uuml;r wird eine installierte und konfigurierte Datenbank vorausgesetzt. Eine detaillierte &Uuml;bersicht &uuml;ber die Installation und Konfiguration von PostgreSQL gibt die <a href="http://techdocs.postgresql.org/">Online-Dokumentation</a>.<br /><br />
+<b>Logging</b><br />
+F&uuml;r das Logging in eine PostgreSQL Datenbank mittels Jakarta Log4j muss zun&auml;chst eine Tabelle f&uuml;r die Log-Meldungen angelegt werden. Dies kann mit folgendem SQL-Statement erreicht werden:
+<pre>
+ create table spss_log
+ (log_time timestamp,
+ log_level varchar(5),
+ log_msg varchar(256));
+</pre>
+Um das Logging in die Datenbank Log4j bekannt zu machen, muss die Log4j-Konfiguration adaptiert werden. Die Datei $MOA_SPSS_INST/conf/moa/log4.properties enth&auml;lt bereits eine beispielhafte Jakarta Log4j-Konfiguration f&uuml;r das Logging in eine PostgreSQL Datenbank, die standardm&auml;&szlig;ig ausgeschaltet ist. Hinweis: Bei Tests hat sich das Logging in eine Datenbank mit Jakarta Log4j als Performance-Engpa&szlig; herausgestellt. Es wird deshalb empfohlen, auf dieses Feature zu verzichten.
+<br /><br />
+</div>
+
+</td></tr></table>
+<br /><br />
+
+
+
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top"><br /></td>
+<td valign="top">
+<hr />
+<div style="font-size:8pt; color:#909090">&copy; 2004</div>
+</td></tr></table>
+<br />
+
+
+</div>
+</div></div></body>
+</html>
diff --git a/id/server/doc/moa_id/id-anwendung.htm b/id/server/doc/moa_id/id-anwendung.htm
new file mode 100644
index 000000000..d5057f854
--- /dev/null
+++ b/id/server/doc/moa_id/id-anwendung.htm
@@ -0,0 +1,104 @@
+<html>
+<head>
+ <title>MOA ID-Anwendung</title>
+ <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
+ <meta content="heinz.rosenkranz@brz.gv.at" name="author"/>
+
+<style type="text/css">
+ body { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; }
+ td { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; }
+ th { font-family:"Verdana", "Arial"; font-size:10pt; font-weight:bold; color:#d8d8d8; background:#505050}
+ li { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; margin-top:3px }
+ ul { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; margin-top:3px }
+ tt { font-size:9pt; color:#505060; }
+ #titel { font-family:"Verdana", "Arial"; font-size:18pt; color:#505060; }
+ #subtitel { font-family:"Verdana", "Arial"; font-size:12pt; font-weight:bold; color:#505060; }
+ #slogan { font-family:"Verdana", "Arial"; font-size:8pt; color:#808090; text-align:justify; width:160px }
+ #block { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; text-align:justify }
+ #klein { font-family:"Verdana", "Arial"; font-size:9pt; color:#505060; margin-top:3px }
+ #info { font-family:"Verdana", "Arial"; font-size:8pt; color:#505060; padding:3px; border:solid 1px #c0c0c0 }
+ #infolist { font-family:"Verdana", "Arial"; font-size:8pt; color:#505060; }
+ a:link {color:#000090}
+ a:visited {color:#000090}
+ a:hover {color:#c03030}
+ a {text-decoration: none}
+</style>
+
+<script language="JavaScript">
+<!--
+function goWin(url) {
+ Fenster=window.open(url,"smallWin","toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=yes,scrollbars=yes,width=500,height=480,top=20,screenY=0,left=20,screenX=0");
+ window.setTimeout("showWin()",300);
+}
+function showWin() { Fenster.focus(); }
+// -->
+</script>
+</head>
+
+
+<body bgcolor="#FFFFFF" >
+<div style="width:650px">
+
+<!-- Projekt-Logo -->
+<div style="height:42px; font-size:16pt; color:#b0b8c0; background:#003050">
+&#160;Module f&uuml;r Online-Applikationen
+</div>
+<div style="margin-left:8px; margin-top:3px; font-size:8pt; color:#707070; ">
+<!-- Development Center der BRZ GmbH, A-Trust und IAIK Graz -->&#160;
+</div>
+<div style="margin-top:-65px; text-align:right; font-size:8pt; font-weight:bold; color:#d04040;" >
+Projekt <span style="font-size:48pt; ">moa</span>&#160;
+</div>
+<br />
+
+<!-- First Section with Navigation -->
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top">
+<div style="font-weight:bold; margin-top:12px">MOA-ID</div><br />
+<div id="klein"><img src="../moa_images/select.gif" border="0" width="13" height="14" />
+ <b> &Uuml;bersicht</b></div>
+<div id="klein"><a href="id-anwendung_1.htm"><img src="../moa_images/idle.gif" border="0" width="13" height="14" />
+ <b> Aufruf MOA-ID-AUTH</b></a></div>
+<div id="klein"><a href="id-anwendung_2.htm"><img src="../moa_images/idle.gif" border="0" width="13" height="14" />
+ <b> Abfrage MOA-ID-AUTH </b></a></div>
+<br />
+<div id="klein"><a href="moa.htm"><img src="../moa_images/west.gif" border="0" width="13" height="14" />
+ <b> Zur&uuml;ck</b></a></div>
+<br />
+</td>
+
+<td valign="top">
+<div id="titel">MOA ID-Anwendung</div>
+<p id="block">
+MOA-ID f&uuml;hrt f&uuml;r eine Online-Applikation (OA) die Benutzeridentifizierung und -authentisierung mit Hilfe der B&uuml;rgerkarte durch.
+</p>
+<p id="titel">&Uuml;bersicht </p>
+Um diese Funktionalit&auml;t verf&uuml;gbar zu machen, ist folgendermaßen vorzugehen:<br />
+</p>
+<ul>
+<li>Die OA muss als Webapplikation installiert werden.</li>
+<li>MOA-ID-AUTH muss als Webapplikation <a href="id-admin_1.htm">installiert</a> und f&uuml;r die OA <a href="id-admin_2.htm">konfiguriert</a> werden.</li>
+<li>MOA-ID-AUTH wird durch einen Verweis von einer Webseite aufgerufen.
+Diese Webseite kann z.B. Teil eines Portals sein.</li>
+<li>Nach erfolgter Authentisierung holt die OA die bereitgestellten Anmeldedaten zum B&uuml;rger von MOA-ID-AUTH ab.
+Dies kann unter Mithilfe der Webapplikation MOA-ID-PROXY geschehen, die f&uuml;r diesen Zweck <a href="id-admin_1.htm">installiert</a> und f&uuml;r die OA <a href="id-admin_2.htm">konfiguriert</a> werden muss.</li>
+</ul>
+</td></tr></table>
+<br />
+
+
+
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top"><br /></td>
+<td valign="top">
+<hr />
+<div style="font-size:8pt; color:#909090">&copy; 2003 <!-- Development Center, BRZ GmbH --></div>
+</td></tr></table>
+<br />
+
+
+</div>
+</body>
+</html>
diff --git a/id/server/doc/moa_id/id-anwendung_1.htm b/id/server/doc/moa_id/id-anwendung_1.htm
new file mode 100644
index 000000000..041cd437a
--- /dev/null
+++ b/id/server/doc/moa_id/id-anwendung_1.htm
@@ -0,0 +1,211 @@
+<html>
+<head>
+ <title>MOA ID-Anwendung</title>
+ <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
+ <meta content="heinz.rosenkranz@brz.gv.at" name="author"/>
+
+<style type="text/css">
+ body { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; }
+ td { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; }
+ th { font-family:"Verdana", "Arial"; font-size:10pt; font-weight:bold; color:#d8d8d8; background:#505050}
+ li { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; margin-top:3px }
+ ul { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; margin-top:3px }
+ tt { font-size:9pt; color:#505060; }
+ pre { font-size:9pt; color:#505060; }
+ #titel { font-family:"Verdana", "Arial"; font-size:18pt; color:#505060; }
+ #subtitel { font-family:"Verdana", "Arial"; font-size:12pt; font-weight:bold; color:#505060; }
+ #slogan { font-family:"Verdana", "Arial"; font-size:8pt; color:#808090; text-align:justify; width:160px }
+ #block { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; text-align:justify }
+ #klein { font-family:"Verdana", "Arial"; font-size:9pt; color:#505060; margin-top:3px }
+ #info { font-family:"Verdana", "Arial"; font-size:8pt; color:#505060; padding:3px; border:solid 1px #c0c0c0 }
+ #infolist { font-family:"Verdana", "Arial"; font-size:8pt; color:#505060; }
+ a:link {color:#000090}
+ a:visited {color:#000090}
+ a:hover {color:#c03030}
+ a {text-decoration: none}
+</style>
+
+<script language="JavaScript">
+<!--
+function goWin(url) {
+ Fenster=window.open(url,"smallWin","toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=yes,scrollbars=yes,width=500,height=480,top=20,screenY=0,left=20,screenX=0");
+ window.setTimeout("showWin()",300);
+}
+function showWin() { Fenster.focus(); }
+// -->
+</script>
+</head>
+
+<body bgcolor="#FFFFFF" >
+<div style="width:650px">
+
+<!-- Projekt-Logo -->
+<div style="height:42px; font-size:16pt; color:#b0b8c0; background:#003050">
+&#160;Module f&uuml;r Online-Applikationen
+</div>
+<div style="margin-left:8px; margin-top:3px; font-size:8pt; color:#707070; ">
+<!-- Development Center der BRZ GmbH, A-Trust und IAIK Graz -->&#160;
+</div>
+<div style="margin-top:-65px; text-align:right; font-size:8pt; font-weight:bold; color:#d04040;" >
+Projekt <span style="font-size:48pt; ">moa</span>&#160;
+</div>
+<br />
+
+<!-- First Section with Navigation -->
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top">
+<div style="font-weight:bold; margin-top:12px">MOA-ID</div><br />
+<div id="klein"><a href="id-anwendung.htm"><img src="../moa_images/idle.gif" border="0" width="13" height="14" />
+ <b> &Uuml;bersicht</b></a></div>
+<div id="klein"><a href="id-anwendung_1.htm"><img src="../moa_images/select.gif" border="0" width="13" height="14" />
+ <b> Aufruf MOA-ID-AUTH</b></a></div>
+<div id="klein"><a href="id-anwendung_2.htm"><img src="../moa_images/idle.gif" border="0" width="13" height="14" />
+ <b> Abfrage MOA-ID-AUTH </b></a></div>
+<br />
+<div id="klein"><a href="moa.htm"><img src="../moa_images/west.gif" border="0" width="13" height="14" />
+ <b> Zur&uuml;ck</b></a></div>
+</br /><br />
+</td>
+<td valign="top">
+<p id="titel">Aufruf von MOA-ID-AUTH </p>
+<div id="block">MOA-ID-AUTH wird immer durch eine andere (verweisende) Webseite aufgerufen. Diese Webseite kann z.B. Teil eines Portals sein.
+Der Aufruf erfolgt durch einen Verweis der Form: </div>
+<pre>&lt;a href=&quot;https://&lt;moa-id-server-und-pfad&gt;/
+StartAuthentication?Target=&lt;gesch&auml;ftsbereich&gt;
+&OA=&lt;oa-url&gt;&Template=&lt;template-url&gt;&amp;useMandate=false&quot;&gt;</pre>
+<table border="1"><tbody valign="baseline">
+<tr>
+<td id="klein">&lt;moa-id-server-und-pfad&gt;</td><td id="klein">Server und Pfad, wo MOA-ID-AUTH installiert ist</td>
+</tr>
+<tr>
+<td id="klein">Target=&lt;gesch&auml;ftsbereich&gt;</td>
+<td id="klein">Angabe, f&uuml;r welches Verfahren der Benutzer authentisiert werden soll</td>
+</tr>
+<tr>
+<td id="klein">OA=&lt;oa-url&gt;</td><td id="klein">Webseite, auf die der Browser nach erfolgter Authentisierung weitergeleitet werden soll</td>
+</tr>
+<tr>
+<td id="klein">Template=&lt;template-url&gt;</td><td id="klein">optional; HTML-Vorlage f&uuml;r der Anmeldeseite von MOA-ID-AUTH, &uuml;ber die der B&uuml;rger den Authentisierungsvorgang startet. &Uuml;ber diesen Parameter kann das Aussehen der Anmeldeseite an das Aussehen der Online-Applikation angepasst werden.</td>
+</tr>
+<tr>
+ <td id="klein">useMandate=&lt;true/false&gt;</td>
+ <td id="klein">optional; Gibt an ob eine Anmeldung im Online-Vollmachten-Modus durchgef&uuml;hrt werden soll (=true) oder nicht (=false);</td>
+</tr>
+</tbody>
+</table>
+<br/><br/>
+
+<div id="block">
+<b>Template</b><br /><br />
+Ein <a href="examples/Template.html">Template</a> f&uuml;r die Anmeldeseite von MOA-ID-AUTH kann aus folgender Grundstruktur aufgebaut werden: </div>
+<pre>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt;<br>&lt;html&gt;<br>&lt;head&gt;<br>&lt;title&gt;MOA ID - Identifizierter Zugang mit B&amp;uuml;rgerkarte&lt;/title&gt;
+ &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;<br>&lt;/head&gt;</pre>
+<p>&lt;form name=&quot;CustomizedForm&quot; action=&quot;&lt;BKU&gt;&quot; method=&quot;post&quot;&gt;<br>
+&lt;div align=&quot;center&quot;&gt;<br>
+&lt;input type=&quot;hidden&quot;<br>
+name=&quot;XMLRequest&quot;<br>
+value=&quot;&lt;XMLRequest&gt;&quot;/&gt;<br>
+&lt;input type=&quot;hidden&quot;<br>
+name=&quot;DataURL&quot;<br>
+value=&quot;&lt;DataURL&gt;&quot;/&gt;<br>
+&lt;input type=&quot;hidden&quot;<br>
+name=&quot;PushInfobox&quot<br>
+ value=&quot;&lt;PushInfobox&gt;&quot;/&gt;<br>
+&lt;input type=&quot;submit&quot; value=&quot;Anmeldung mit B&amp;uuml;rgerkarte&quot; name=&quot;submit&quot;/&gt;<br>
+&lt;/div&gt;<br>
+&lt;/form&gt;<br>
+&lt;form name=&quot;CustomizedInfoForm&quot;<br>
+action=&quot;&lt;BKU&gt;&quot;<br>
+method=&quot;post&quot;&gt;<br>
+&lt;input type=&quot;hidden&quot;<br>
+name=&quot;XMLRequest&quot;<br>
+value=&quot;&lt;CertInfoXMLRequest&gt;&quot;/&gt;<br>
+&lt;input type=&quot;hidden&quot;<br>
+name=&quot;DataURL&quot;<br>
+value=&quot;&lt;CertInfoDataURL&gt;&quot;/&gt;<br>
+</p>
+<p> &lt;input type=&quot;hidden&quot; value=&quot;Weitere Info&quot;/&gt;<br>
+&lt;/form&gt;</p><p>&lt;/body&gt;<br>
+&lt;/html&gt;<br>
+</p>
+Innerhalb dieser <tt>&lt;form&gt;</tt>-Elemente k&ouml;nnen Texte, Beschriftungen und Styles modifiziert werden,
+und es k&ouml;nnen zus&auml;tzliche Elemente darin aufgenommen werden.
+<br /><br />
+Die vorgegebene Grundstruktur ist aber in jedem Fall einzuhalten, und es m&uuml;ssen die speziellen
+Tags <tt>&lt;BKU&gt;</tt> (kommt 2x vor), <tt>&lt;XMLRequest&gt;</tt>, <tt>&lt;DataURL&gt;</tt>, <tt>&lt;CertInfoXMLRequest&gt;</tt> und <tt>&lt;CertInfoDataURL&gt;</tt>
+darin enthalten sein. Das Tag &lt;PushInfobox&gt; muss ab Version 1.4 vorhanden sein, wenn MOA-ID auch andere Infoboxen als die Personenbindung bearbeiten kann.
+<br /><br />
+
+<div id="block">
+<b>BKU-Auswahl</b><br /><br />
+MOA-ID-AUTH bietet die M&ouml;glichkeit, die B&uuml;rgerkartenumgebung (BKU) auszuw&auml;hlen, &uuml;ber die in weiterer Folge die B&uuml;rgerkarte ausgelesen wird. Der Aufruf erfolgt dann durch einen Verweis der Form: </div>
+<pre>&lt;a href=&quot;https://&lt;moa-id-server-und-pfad&gt;/
+SelectBKU?Target=&lt;gesch&auml;ftsbereich&gt;
+&OA=&lt;oa-url&gt;&Template=&lt;template-url&gt;
+&BKUSelectionTemplate=&lt;bku-template-url&gt;&quot;&gt;</pre>
+<table border="1"><tbody valign="baseline">
+<tr><td id="klein">BKUSelectionTemplate= &lt;bku-template-url&gt;</td>
+<td id="klein">optional; HTML-Vorlage f&uuml;r der BKU-Auswahlseite von MOA-ID-AUTH.
+&Uuml;ber diesen Parameter kann das Aussehen der BKU-Auswahlseite an das Aussehen der Online-Applikation angepasst werden.</td>
+</tr>
+</tbody></table>
+<br/><br/>
+
+<div id="block">
+<b>BKUSelectionTemplate</b><br /><br />
+Ein <a href="examples/BKUSelectionTemplate.html">Template f&uuml;r die BKU-Auswahl</a> von MOA-ID-AUTH kann aus folgender Grundstruktur aufgebaut werden: </div>
+<pre>
+&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt;<br>&lt;html&gt;<br>&lt;head&gt;<br>&lt;title&gt;MOA ID - Auswahl der B&amp;uuuml;rgerkartenumgebung&lt;/title&gt;
+ &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;&gt;<br>&lt;/head&gt;</pre><p>&lt;form name=&quot;CustomizedForm&quot; method=&quot;post&quot; action=&quot;&lt;StartAuth&gt;&quot;&gt;<br>
+&lt;BKUSelect&gt; <br>
+&lt;input type=&quot;submit&quot; value=&quot;Ausw&amp;auml;hlen&quot;/&gt;<br>
+&lt;/form&gt;<br>
+&lt;br/&gt;<br>
+&lt;p&gt;&lt;/p&gt;</p>
+<p> &lt;input type=&quot;hidden&quot; value=&quot;Weitere Info&quot;/&gt;<br>
+&lt;/form&gt;</p>
+<p>&lt;/body&gt;<br>
+&lt;/html&gt;<br>
+</p>
+<p>
+
+
+Innerhalb dieser <tt>&lt;form&gt;</tt>-Elemente k&ouml;nnen Texte, Beschriftungen und Styles modifiziert werden,
+und es k&ouml;nnen zus&auml;tzliche Elemente darin aufgenommen werden. <br />
+<br />
+Auch dabei ist die vorgegebene Grundstruktur einzuhalten, die speziellen Tags <tt>&lt;StartAuth&gt;</tt> und <tt>&lt;BKUSelect&gt;</tt> sind verpflichtend.</p>
+<p><strong>Wichtiger Hinweis:</strong> wenn die Templates &uuml;ber HTTPS geladen werden sollten, so muss das SSL/TLS Zertifikat des Servers in einem Java Truststore gespeichert werden und dieser beim Start von Tomcat angegeben werden. </p>
+<strong>Vorgeschlagene Vorgehensweise:<br>
+</strong>
+<pre>
+
+1. Webserver SSL/TLS Zertifikat speichern im .cer Format speichern (z.B. mittels Internet Explorer).<br>
+2. Mittels Java Keytool das Zertifikat in einen Java Truststore importieren. </pre>
+
+Im folgenden Beispiel wird in den Java Truststore &quot;truststore.jks&quot; mit dem Passwort &quot;changeit&quot; importiert.<br>
+<pre>keytool -import -trustcacerts -alias mytomcat -file tomcat_localhost.cer -keystore truststore.jks</pre>
+<p>3. Truststore beim Starten von Tomcat angeben (&uuml;ber das Hinzuf&uuml;gen folgender Parameter in
+ die Variable CATALINA_OPTS im Tomcat Startskript).</p>
+<p><br><pre>
+ -Djavax.net.ssl.trustStore=&lt;PFAD&gt;\truststore.jks<br>
+ -Djavax.net.ssl.trustStorePassword=changeit<br>
+ -Djavax.net.ssl.trustStoreType=jks <br /></pre>
+</p></td>
+</tr></table>
+
+
+
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top"><br /></td>
+<td valign="top">
+<hr />
+<div style="font-size:8pt; color:#909090">&copy; 2004</div>
+</td></tr></table>
+<br />
+
+
+</div>
+</body>
+</html>
diff --git a/id/server/doc/moa_id/id-anwendung_2.htm b/id/server/doc/moa_id/id-anwendung_2.htm
new file mode 100644
index 000000000..df8b10aad
--- /dev/null
+++ b/id/server/doc/moa_id/id-anwendung_2.htm
@@ -0,0 +1,247 @@
+<html>
+<head>
+ <title>MOA ID-Anwendung</title>
+ <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
+ <meta content="heinz.rosenkranz@brz.gv.at" name="author"/>
+
+<style type="text/css">
+ body { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; }
+ td { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; }
+ th { font-family:"Verdana", "Arial"; font-size:10pt; font-weight:bold; color:#d8d8d8; background:#505050}
+ li { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; margin-top:3px }
+ ul { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; margin-top:3px }
+ tt { font-size:9pt; color:#505060; }
+ pre { font-size:9pt; color:#505060; }
+ #titel { font-family:"Verdana", "Arial"; font-size:18pt; color:#505060; }
+ #subtitel { font-family:"Verdana", "Arial"; font-size:12pt; font-weight:bold; color:#505060; }
+ #slogan { font-family:"Verdana", "Arial"; font-size:8pt; color:#808090; text-align:justify; width:160px }
+ #block { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; text-align:justify }
+ #klein { font-family:"Verdana", "Arial"; font-size:9pt; color:#505060; margin-top:3px }
+ #info { font-family:"Verdana", "Arial"; font-size:8pt; color:#505060; padding:3px; border:solid 1px #c0c0c0 }
+ #infolist { font-family:"Verdana", "Arial"; font-size:8pt; color:#505060; }
+ a:link {color:#000090}
+ a:visited {color:#000090}
+ a:hover {color:#c03030}
+ a {text-decoration: none}
+</style>
+
+<script language="JavaScript">
+<!--
+function goWin(url) {
+ Fenster=window.open(url,"smallWin","toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=yes,scrollbars=yes,width=500,height=480,top=20,screenY=0,left=20,screenX=0");
+ window.setTimeout("showWin()",300);
+}
+function showWin() { Fenster.focus(); }
+// -->
+</script>
+</head>
+
+<body bgcolor="#FFFFFF" >
+<div style="width:650px">
+
+<!-- Projekt-Logo -->
+<div style="height:42px; font-size:16pt; color:#b0b8c0; background:#003050">
+&#160;Module f&uuml;r Online-Applikationen
+</div>
+<div style="margin-left:8px; margin-top:3px; font-size:8pt; color:#707070; ">
+<!-- Development Center der BRZ GmbH, A-Trust und IAIK Graz -->&#160;
+</div>
+<div style="margin-top:-65px; text-align:right; font-size:8pt; font-weight:bold; color:#d04040;" >
+Projekt <span style="font-size:48pt; ">moa</span>&#160;
+</div>
+<br />
+
+<!-- First Section with Navigation -->
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top">
+<div style="font-weight:bold; margin-top:12px">MOA-ID</div><br />
+<div id="klein"><a href="id-anwendung.htm"><img src="../moa_images/idle.gif" border="0" width="13" height="14" />
+ <b> &Uuml;bersicht</b></a></div>
+<div id="klein"><a href="id-anwendung_1.htm"><img src="../moa_images/idle.gif" border="0" width="13" height="14" />
+ <b> Aufruf MOA-ID-AUTH</b></a></div>
+<div id="klein"><a href="id-anwendung_2.htm"><img src="../moa_images/select.gif" border="0" width="13" height="14" />
+ <b> Abfrage MOA-ID-AUTH </b></a></div>
+<br />
+<div id="klein"><a href="moa.htm"><img src="../moa_images/west.gif" border="0" width="13" height="14" />
+ <b> Zur&uuml;ck</b></a></div>
+</br /><br />
+<div id="slogan">
+<b>Abfragearten: </b>
+</br />
+<a href="#webservice"><b>Web Service</b></a><br />
+<a href="#proxy"><b>MOA-ID-PROXY</b></a><br />
+</div>
+</td>
+
+
+<td valign="top">
+<p id="titel">Abfrage der Anmeldedaten von MOA-ID-AUTH</p>
+<div id="block">Nach erfolgter Authentisierung stehen in MOA-ID-AUTH Anmeldedaten zum Abholen bereit,
+und MOA-ID-AUTH veranlasst einen Redirect zur Online-Applikation (OA).
+<br /><br />
+In diesem Redirect werden der Gesch&auml;ftsbereich und ein SAML-Artifact als Parameter &uuml;bergeben.
+</div>
+<pre>&lt;a href=&quot;https://&lt;oa-url&gt;
+?Target=&lt;gesch&auml;ftsbereich&gt;
+&SAMLArtifact=&lt;saml-artifact&gt;&quot;&gt;</pre>
+
+<table border="1"><tbody valign="baseline">
+<tr><td>&lt;oa-url&gt;</td><td>URL, der beim Aufruf von MOA-ID-AUTH als Parameter &quot;OA&quot; &uuml;bergeben wurde</td></tr>
+<tr><td>Target=&lt;gesch&auml;ftsbereich&gt;</td><td>Parameter, der beim Aufruf von MOA-ID-AUTH &uuml;bergeben wurde</td></tr>
+<tr><td>SAMLArtifact=&lt;saml-artifact&gt;</td><td>SAML-Artifact, das von MOA-ID-AUTH zu den Anmeldedaten erstellt wurde.
+Mithilfe dieses SAML-Artifacts kann die OA die Anmeldedaten von MOA-ID-AUTH abholen.</td></tr>
+</tbody></table>
+<br/><br/>
+<div id="block">Grunds&auml;tzlich stehen einer OA mehrere Arten zum Abholen der Anmeldedaten von MOA-ID-AUTH zur Verf&uuml;gung: </div>
+<ol>
+<li>Die Applikation ruft selbst das MOA-ID-AUTH Web Service auf.
+<br/>Die Implementierung dieser Variante wird empfohlen, insbesondere f&uuml;r Online-Applikationen, die neu erstellt werden.
+</li>
+<li>Es wird die MOA-ID-PROXY Webapplikation eingesetzt, um die Anmeldedaten abzuholen und an die OA zu &uuml;bergeben.
+<br/>Aus Sicht von MOA-ID-PROXY ist bedeutsam, ob die OA die Anmeldedaten nach Abarbeitung des HTTP-Requests beh&auml;lt.
+<ul>
+<li>Stateful OA: MOA-ID-PROXY &uuml;bergibt einmalig die Anmeldedaten an die OA, und die OA speichert die Anmeldedaten, typischerweise unter Einsatz von Cookies.</li>
+<li>Stateless OA: MOA-ID-PROXY &uuml;bergibt die Anmeldedaten bei jedem HTTP-Request vom Browser des B&uuml;rgers an die OA.</li>
+</ul>
+Diese Variante ist vorzuziehen, wenn
+<ul>
+<li>f&uuml;r die Plattform, auf der die OA aufbaut, Web Service-Schnittstellen nicht verf&uuml;gbar sind</li>
+<li>das n&ouml;tige Web Service-Know How nicht zur Verf&uuml;gung steht</li>
+<li>die Implementierung von Variante 1 zu aufw&auml;ndig w&auml;re</li>
+<li>eine Anpassung der OA aus bestimmten Gr&uuml;nden nicht m&ouml;glich ist</li>
+</ul>
+</li>
+</ol>
+</td></tr></table>
+
+
+
+<div id="webservice" />
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<td width="170" valign="top" id="klein">
+<p id="subtitel">&#160;</p>
+<div id="slogan">
+<br /><br />
+</div>
+</td>
+
+<td valign="top">
+<p id="subtitel">Aufruf des MOA-ID-AUTH Web Service</p>
+<div id="block">Das MOA-ID-AUTH Web Service wird &uuml;ber einen &lt;samlp:Request&gt; aufgerufen.
+Der &lt;samlp:Request&gt; enth&auml;lt in einem &lt;samlp:AssertionArtifact&gt; das von MOA-ID-AUTH &uuml;bergebene SAML-Artifact.
+<br/><br/>
+MOA-ID-AUTH liefert als Antwort einen &lt;samlp:Response&gt;. Die Anmeldedaten sind im &lt;samlp:Response&gt; in Form einer &lt;saml:Assertion&gt; enthalten.
+<br/><br/>
+<a href="../cs-sstc-schema-protocol-01.xsd">SAML 1.0 Protocol Schema</a>
+<br/>
+<a href="../cs-sstc-schema-assertion-01.xsd">SAML 1.0 Assertion Schema</a>
+<br/>
+Der detaillierte Aufbau der &lt;saml:Assertion&gt; zu den Anmeldedaten ist in der <a href="../MOA_ID_1.4_20070306.pdf">Spezifikation MOA-ID 1.4</a> beschrieben.
+<br/><br/>
+<h4>Beispiel LoginServletExample</h4>
+Das Abholen der Anmeldedaten durch Aufruf des Web Service von MOA-ID-AUTH wird anhand eines beispielhaften Java Servlet gezeigt.
+Das LoginServletExample wird in einer Stateful OA von MOA-ID-AUTH nach erfolgter Authentisierung &uuml;ber Redirect aufgerufen.
+<br/><br/>
+Das Beispiel demonstriert insgesamt die Integration von MOA-ID-AUTH in die OA:
+</div>
+<ul>
+<li>Parameter&uuml;bergabe von MOA-ID-AUTH an die OA</li>
+<li>Aufruf des MOA-ID-AUTH Web Service mittels des SOAP Frameworks "Apache AXIS"</li>
+<li>Parsen der Anmeldedaten mittels der XPath Engine "Jaxen"</li>
+<li>Speichern der Anmeldedaten in der HTTPSession</li>
+<li>Redirect auf die eigentliche Startseite der OA</li>
+</ul>
+
+
+<b>Voraussetzungen</b><br >
+<div id="block">Die folgende Liste enth&auml;lt die f&uuml;r das Beispiel erforderlichen Java-Bibliotheken. Die angef&uuml;hrten Versionsnummern bezeichnen jene Versionen dieser Java-Bibliotheken, mit denen das Beispiel getestet wurde. </div>
+<br />
+<table border="1" width="100%" cellpadding="2" cellspacing="0">
+<tr>
+<th>Java-Bibliothek</th><th>Version</th><th>Bemerkung</th>
+</tr><tr>
+<tr valign="top">
+<td>JDK</td>
+<td>1.4.0+, 1.5.0</td>
+<td>Java Development Kit</td>
+</tr><tr valign="top">
+<td>Xerces <br />XML Parser</td><td>2.0.2+</td>
+<td id="klein">Download: <a href="http://xml.apache.org/xerces2-j/">xml.apache.org/xerces2-j</a> </td>
+</tr><tr valign="top">
+<td>AXIS <br />SOAP Framework</td><td>1.0+</td>
+<td id="klein">Download: <a href="http://xml.apache.org/axis/">xml.apache.org/axis</a> </td>
+</tr><tr valign="top">
+<td>Jaxen XPath Engine</td><td>1.0+</td>
+<td id="klein">Download: <a href="http://jaxen.sourceforge.net/">http://jaxen.sourceforge.net</a> </td>
+</tr><tr valign="top">
+<td>Servlet API</td><td>2.3+</td>
+<td id="klein">Download: <a href="http://java.sun.com/products/servlet/">java.sun.com/products/servlet</a> </td>
+</tr>
+</table>
+<br/>
+<b>Code</b><br />
+<a href="examples/LoginServletExample.txt">LoginServletExample</a>
+
+</td></tr></table>
+
+<DIV bla="hhalloo">
+
+
+
+<div id="proxy" />
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<td width="170" valign="top" id="klein">
+<p id="subtitel">&#160;</p>
+<div id="slogan">
+<br /><br />
+</div>
+</td>
+<td valign="top">
+<p id="subtitel">Einsatz von MOA-ID-PROXY zum Abfragen der Anmeldedaten von MOA-ID-AUTH</p>
+<div id="block">
+Anstatt den Aufruf des MOA-ID-AUTH Web Service in der OA zu implementieren, kann die MOA-ID-PROXY Webapplikation eingesetzt werden, um dies f&uuml;r die OA zu erledigen. MOA-ID-PROXY muss f&uuml;r die OA konfiguriert werden, so wie in <a href="id-admin_2.htm#OnlineApplication/ProxyComponent">MOA-ID-Administration</a> beschrieben.
+<br/><br/>
+Bei der Konfiguration ist speziell zu beachten:
+<br/><br/>
+<b>Konfigurationsdatei zur OA</b><br />
+Der <a href="id-admin_2.htm#oa-config">LoginType</a> (stateful oder stateless) ist gem&auml;ß dem Applikationstyp zu setzen.
+<br/><br/>
+Die <a href="id-admin_2.htm#oa-config">&Uuml;bergabe der Anmeldedaten</a> ist in Form und Inhalt zu konfigurieren.
+</div>
+<ul>
+<li>BasicAuth: HTTP Basic Authentication (<a href="examples/conf/OAConfBasicAuth.xml">Beispiel</a>)</li>
+<li>ParamAuth: &Uuml;bergabe &uuml;ber Requestparameter (<a href="examples/conf/OAConfParamAuth.xml">Beispiel</a>)</li>
+<li>HeaderAuth: &Uuml;bergabe &uuml;ber Requestheader (<a href="examples/conf/OAConfHeaderAuth.xml">Beispiel</a>)</li>
+</ul>
+
+<div id="block">
+<b>LoginParameterResolver</b><br />
+Das &Uuml;bergabe der Anmeldedaten an die OA &uuml;ber Request Parameter oder Header geschieht in einer Standardimplementierung des Interface
+<pre>at.gv.egovernment.moa.proxy.LoginParameterResolver</pre>
+Falls die Erfordernisse der OA mittels <a href="id-admin_2.htm#oa-config">Konfiguration</a> nicht abgedeckt werden k&ouml;nnen,
+so kann eine maßgeschneiderte Implementierung von <tt>LoginParameterResolver</tt> erstellt und zusammen mit MOA-ID-PROXY zum Einsatz gebracht werden
+(siehe <a href="../api-doc/at/gv/egovernment/moa/id/proxy/LoginParameterResolver.html">API</a>).
+<br/><br/>
+<b>ConnectionBuilder</b>
+Das Herstellen einer URL-Verbindung von MOA-ID-PROXY zur OA geschieht einer Standardimplementierung des Interface
+<pre>at.gv.egovernment.moa.proxy.ConnectionBuilder </pre>
+Falls n&ouml;tig, kann eine maßgeschneiderte Implementierung von <tt>ConnectionBuilder</tt> erstellt und zusammen mit MOA-ID-PROXY zum Einsatz gebracht werden
+(siehe <a href="../api-doc/at/gv/egovernment/moa/id/proxy/ConnectionBuilder.html">API</a>).
+</div>
+</td></tr></table>
+
+
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top"><br /></td>
+<td valign="top">
+<hr />
+<div style="font-size:8pt; color:#909090">&copy; 2003 <!-- Development Center, BRZ GmbH --></div>
+</td></tr></table>
+<br />
+
+
+</div>
+</body>
+</html>
diff --git a/id/server/doc/moa_id/links.htm b/id/server/doc/moa_id/links.htm
new file mode 100644
index 000000000..ef6c09083
--- /dev/null
+++ b/id/server/doc/moa_id/links.htm
@@ -0,0 +1,145 @@
+<html>
+<head>
+ <title>MOA Grundlagen</title>
+ <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
+ <meta content="heinz.rosenkranz@brz.gv.at" name="author"/>
+
+<style type="text/css">
+ body { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; }
+ td { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; }
+ th { font-family:"Verdana", "Arial"; font-size:10pt; font-weight:bold; color:#c0c0c0; background:#505050}
+ li { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; margin-top:3px }
+ ul { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; margin-top:3px }
+ #titel { font-family:"Verdana", "Arial"; font-size:18pt; color:#505060; }
+ #subtitel { font-family:"Verdana", "Arial"; font-size:12pt; font-weight:bold; color:#505060; }
+ #slogan { font-family:"Verdana", "Arial"; font-size:8pt; color:#808090; text-align:justify; width:160px }
+ #block { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; text-align:justify }
+ #klein { font-family:"Verdana", "Arial"; font-size:9pt; color:#505060; margin-top:6px }
+ a:link {color:#000090}
+ a:visited {color:#000090}
+ a:hover {color:#c03030}
+ a {text-decoration: none}
+</style>
+
+<script language="JavaScript">
+<!--
+function goWin(url) {
+ Fenster=window.open(url,"smallWin","toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=yes,scrollbars=yes,width=500,height=480,top=20,screenY=0,left=20,screenX=0");
+ window.setTimeout("showWin()",300);
+}
+function showWin() { Fenster.focus(); }
+// -->
+</script>
+</head>
+
+<body bgcolor="#FFFFFF" >
+<div style="width:650px">
+
+<!-- Projekt-Logo -->
+<div style="height:42px; font-size:16pt; color:#b0b8c0; background:#003050">
+&#160;Module f&uuml;r Online-Applikationen
+</div>
+<div style="margin-left:8px; margin-top:3px; font-size:8pt; color:#707070; ">
+<!-- Development Center der BRZ GmbH, A-Trust und IAIK Graz -->&#160;
+</div>
+<div style="margin-top:-65px; text-align:right; font-size:8pt; font-weight:bold; color:#d04040;" >
+Projekt <span style="font-size:48pt; ">moa</span>&#160;
+</div>
+<br />
+
+<!-- First Section with Navigation -->
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top">
+<div style="font-weight:bold; margin-top:12px">MOA Links</div><br />
+<div id="klein"><a href="#Extern"><img src="../moa_images/idle.gif" border="0" width="13" height="14" />
+ <b> Ext. Komponenten</b></a></div>
+<div id="klein"><a href="#Administration"><img src="../moa_images/idle.gif" border="0" width="13" height="14" />
+ <b> Administration</b></a></div>
+<div id="klein"><a href="#Anwendung"><img src="../moa_images/idle.gif" border="0" width="13" height="14" />
+ <b> Anwendung</b></a></div>
+<div id="klein"><a href="#Spezifikationen"><img src="../moa_images/idle.gif" border="0" width="13" height="14" />
+ <b> Spezifikationen</b></a></div>
+<br />
+<div id="klein"><a href="moa.htm"><img src="../moa_images/west.gif" border="0" width="13" height="14" />
+ <b> Zur&uuml;ck</b></a></div>
+<br />
+<!-- div id="slogan">
+MOA ist eine Entwicklung des Bundesrechenzentrums BRZ in Zusammenarbeit mit A-Trust und dem Institut f&uuml;r angewandte Informations- und Kom-munikationstechnik (IAIK) der Universit&auml;t Graz
+</div --></td>
+
+<td valign="top">
+<div id="titel">MOA Links </div>
+
+<div id="Administration" />
+<p id="subtitel">Externe Komponenten</p>
+
+<div id="klein">Apache <br />
+<a href="http://httpd.apache.org/">http://httpd.apache.org/</a></div>
+
+<div id="klein">Internet Information Server <br />
+<a href="http://www.iis.net/">http://www.iis.net/</a></div>
+
+<div id="klein">Tomcat <br />
+<a href="http://tomcat.apache.org/">http://tomcat.apache.org/</a></div>
+
+<div id="klein">Tomcat mod_SSL <br />
+<a href="http://httpd.apache.org/docs/2.2/ssl/">http://httpd.apache.org/docs/2.2/ssl/</a></div>
+
+<div id="klein">Tomcat mod_jk <br />
+<a href="http://tomcat.apache.org/connectors-doc/">http://tomcat.apache.org/connectors-doc/</a></div>
+
+<div id="klein">Logging Toolkit <br />
+<a href="http://jakarta.apache.org/log4j/">http://jakarta.apache.org/log4j/</a></div>
+
+<div id="klein">IAIK JCE <br />
+<a href="http://jce.iaik.tugraz.at/products/index.php">http://jce.iaik.tugraz.at/products/index.php </a></div>
+
+<div id="klein">PostgreSQL <br />
+<a href="http://www.postgresql.org/">http://www.postgresql.org/</a></div>
+
+<div id="Spezifikationen" />
+<p id="subtitel">Spezifikationen</p>
+<p id="klein">
+<div id="klein">DOM <br />
+<a href="http://www.w3c.org/DOM/">http://www.w3c.org/DOM</a></div>
+
+<div id="klein">E-Government <br />
+<a href="http://reference.e-government.gv.at/">http://reference.e-government.gv.at</a></div>
+
+<div id="klein">B&uuml;rgerkarte<br />
+<a href="http://www.buergerkarte.at">http://www.buergerkarte.at</a></div>
+
+<div id="klein">Security Layer Version 1.2<br />
+<a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/aktuell/">http://www.buergerkarte.at/konzept/securitylayer/spezifikation/aktuell/</a></div>
+
+<div id="klein">Personenbindung Version 1.2.2<br />
+<a href="http://www.buergerkarte.at/konzept/personenbindung/spezifikation/aktuell/">http://www.buergerkarte.at/konzept/personenbindung/spezifikation/aktuell/</a></div>
+
+<div id="klein">Security Assertion Markup Language <br />
+<a href="http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=security">http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=security</a></div>
+
+</td></tr>
+<tr>
+ <td valign="top">&nbsp;</td>
+ <td valign="top">&nbsp;</td>
+</tr>
+</table>
+
+
+
+
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top"><br /></td>
+<td valign="top">
+<hr />
+<div style="font-size:8pt; color:#909090">&copy; 2010
+ <!-- Development Center, BRZ GmbH --></div>
+</td></tr></table>
+<br />
+
+
+</div>
+</body>
+</html>
diff --git a/id/server/doc/moa_id/moa-id-ablauf.jpg b/id/server/doc/moa_id/moa-id-ablauf.jpg
new file mode 100644
index 000000000..0585664f4
--- /dev/null
+++ b/id/server/doc/moa_id/moa-id-ablauf.jpg
Binary files differ
diff --git a/id/server/doc/moa_id/moa.htm b/id/server/doc/moa_id/moa.htm
new file mode 100644
index 000000000..b3633736e
--- /dev/null
+++ b/id/server/doc/moa_id/moa.htm
@@ -0,0 +1,258 @@
+<html>
+<head>
+ <title>MOA Module fuer Online Applikationen</title>
+ <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
+ <meta content="heinz.rosenkranz@brz.gv.at" name="author"/>
+
+<style type="text/css">
+ body { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; }
+ td { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; }
+ li { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; margin-top:3px }
+ ul { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; margin-top:3px }
+ tt { font-size:9pt; color:#505060; }
+ #titel { font-family:"Verdana", "Arial"; font-size:18pt; color:#505060; }
+ #subtitel { font-family:"Verdana", "Arial"; font-size:12pt; font-weight:bold; color:#505060; }
+ #slogan { font-family:"Verdana", "Arial"; font-size:8pt; color:#808090; text-align:justify; width:160px }
+ #block { font-family:"Verdana", "Arial"; font-size:10pt; color:#505060; text-align:justify }
+ #klein { font-family:"Verdana", "Arial"; font-size:9pt; color:#505060; margin-top:3px }
+ a:link {color:#000090}
+ a:visited {color:#000090}
+ a:hover {color:#c03030}
+ a {text-decoration: none}
+</style>
+
+<script language="JavaScript">
+<!--
+function goWin(url) {
+ Fenster=window.open(url,"smallWin","toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=yes,scrollbars=yes,width=500,height=480,top=20,screenY=0,left=20,screenX=0");
+ window.setTimeout("showWin()",300);
+}
+function showWin() { Fenster.focus(); }
+// -->
+</script>
+</head>
+
+<body bgcolor="#FFFFFF" >
+<div style="width:650px">
+
+
+
+<!-- Projekt-Logo -->
+<div style="height:42px; font-size:16pt; color:#b0b8c0; background:#003050">
+&#160;Module f&uuml;r Online-Applikationen
+</div>
+<div style="margin-left:8px; margin-top:3px; font-size:8pt; color:#707070; ">
+<!-- Development Center der BRZ GmbH, A-Trust und IAIK Graz -->&#160;
+</div>
+<div style="margin-top:-65px; text-align:right; font-size:8pt; font-weight:bold; color:#d04040;" >
+Projekt <span style="font-size:48pt; ">moa</span>&#160;
+</div>
+<br />
+
+
+
+<!-- First Section with Navigation -->
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top">
+<div style="font-weight:bold; margin-top:12px">MOA-ID</div><br />
+<div id="klein"><img src="../moa_images/select.gif" border="0" width="13" height="14" />
+ <b> Allgemein</b></div>
+<div id="klein"><a href="id-admin.htm"><img src="../moa_images/idle.gif" border="0" width="13" height="14" />
+ <b> ID Administration</b></a></div>
+<div id="klein"><a href="id-anwendung.htm"><img src="../moa_images/idle.gif" border="0" width="13" height="14" />
+ <b> ID Anwendung</b></a></div>
+<div id="klein"><a href="../api-doc/index.html" target="_javadoc">
+ <img src="../moa_images/idle.gif" border="0" width="13" height="14" />
+ <b> API-Dokumentation</b></a></div>
+<div id="klein"><a href="faqs.htm"><img src="../moa_images/idle.gif" border="0" width="13" height="14" />
+ <b> FAQs</b></a></div>
+<div id="klein"><a href="links.htm"><img src="../moa_images/idle.gif" border="0" width="13" height="14" />
+ <b> Links</b></a></div>
+<br />
+<div> <a href="javascript:history.back()">
+ <img src="../moa_images/west.gif" border="0" width="13" height="14" /> &#160;
+ <b>Zur&uuml;ck </b></a></div>
+<br />
+<div id="slogan">
+</div>
+</td>
+
+<td valign="top">
+<img src="../moa_images/moa_thema.gif" align="right" />
+<div id="titel">Allgemein v.1.5</div>
+<p id="block">
+Dieses Dokument enth&auml;lt die Dokumentation f&uuml;r das Modul <br />
+<ul>
+<li>MOA-ID (Identifikation)</li>
+</ul></p>
+</td></tr></table>
+
+<div id="id" />
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top" id="klein">
+<p id="subtitel">&#160;</p>
+<div id="slogan">
+</div>
+</td>
+<td valign="top">
+<div id="block">
+Das Modul Identifikation stellt Online-Applikationen Funktionalit&auml;t zur Verf&uuml;gung zu stellen, damit diese
+eine Benutzer-Identifikation und -Authentisierung mit Hilfe der B&uuml;rgerkarte und deren Signaturfunktion
+realisieren k&ouml;nnen.
+<br /><br />
+Das Modul besteht aus zwei Komponenten:
+<ul>
+<li>Die Authentisierungskomponente (MOA-ID-AUTH) f&uuml;hrt die eigentliche Authentisierung des Benutzers durch und &uuml;bergibt der
+Proxykomponente die Anmeldedaten.</li>
+<li>Die Proxykomponente (MOA-ID-PROXY) &uuml;bernimmt die Anmeldedaten von der Authentisierungskomponente,
+f&uuml;hrt die Anmeldung an der Online Applikation durch und schleust in der Folge Daten an die Online-Applikation
+und Daten an den Benutzer durch.</li>
+</ul>
+Diese beiden Komponenten k&ouml;nnen auf unterschiedlichen Rechnern
+oder auf dem gleichen Rechner eingesetzt werden.
+<br /><br />
+Die Funktionalit&auml;t und der Aufbau der Schnittstelle zu MOA-ID ist in der
+<a href="../MOA_ID_1.4_20070802.pdf" target="_new">Spezifikation</a> bzw. im <a href="../MOA_ID_1.4_Anhang.pdf" target="_new">Anhang zur Spezifikation</a> detailliert beschrieben.
+<br />
+<br />
+F&uuml;r den Betrieb von MOA-ID ist der Einsatz von MOA-Signaturpr&uuml;fung (MOA-SP) erforderlich.
+</div>
+
+<br /><br />
+<div id="titel">Ablauf einer Anmeldung</div>
+<br />
+
+<img src="moa-id-ablauf.jpg" border="0" hspace="-200" width="500" />
+
+<table border="0" cellspacing="3" cellpadding="2">
+
+<tr>
+<td valign="top" width="30">1</td>
+<td id="block">Der Benutzer verbindet sich zu einem Web-Portal, &uuml;ber das die verf&uuml;gbaren Online-Applikationen (OA) erreichbar
+sind. Jeder Link zu einer OA verweist auf die Authentisierungs-komponente.
+</td>
+</tr>
+
+<tr>
+<td valign="top">2</td>
+<td id="block">Der Benutzer verbindet sich mit MOA-ID-AUTH, die die Authentisierung des
+Benutzers durchf&uuml;hrt:</td>
+</tr>
+
+<tr>
+<td valign="top">2.1</td>
+<td id="block">MOA-ID-AUTH bietet dem Benutzer optional eine Auswahl von verf&uuml;gbaren B&uuml;rgerkartenumgebungen (engl. Bezeichnung: Security-Layer) an.</td>
+</tr>
+
+<tr>
+<td valign="top">2.2</td>
+<td id="block">MOA-ID-AUTH erzeugt eine HTML-Seite mit einem <tt>&lt;InfoboxReadRequest&gt;</tt>
+ zum Auslesen der Personenbindung. Diese HTML-Seite wird an den Browser geschickt.</td>
+</tr>
+
+<tr>
+<td valign="top">2.3</td>
+<td id="block">Der Browser schickt den <tt>&lt;InfoboxReadRequest&gt;</tt> an den ausgew&auml;hlten Security-Layer. Der Security-Layer liest die
+Personenbindung von der B&uuml;rgerkarte und sendet diese an MOA-ID-AUTH, die die Signatur der Personenbindung durch
+einen Aufruf von MOA-SP &uuml;berpr&uuml;ft.
+</td>
+</tr>
+
+<tr>
+<td valign="top">2.4</td>
+<td id="block">MOA-ID-AUTH erstellt den AUTH-Block. Der AUTH-Block enth&auml;lt
+<ul>
+<li>Vor- und Nachname aus der Personenbindung,</li>
+<li>URL von MOA-ID-AUTH,</li>
+<li>URL und Gesch&auml;ftsbereich der Online-Applikation,</li>
+<li>die aktuelle Zeit.</li>
+</ul>
+Anschlie&szlig;end wird
+eine XML Antwortseite, die das Kommando zum Signieren (<tt>&lt;CreateXMLSignatureRequest&gt;</tt>) des generierten
+AUTH-Blocks enth&auml;lt, an den ausgew&auml;hlten Security-Layer gesendet.</td>
+</tr>
+
+<tr>
+<td valign="top">2.5</td>
+<td id="block">Der Request wird vom Security-Layer verarbeitet. Die signierten Daten werden an
+MOA-ID-AUTH zur&uuml;ckgesendet.</td>
+</tr>
+
+<tr>
+<td valign="top">2.6</td>
+<td id="block">MOA-ID-AUTH &uuml;berpr&uuml;ft den signierten AUTH-Block und legt f&uuml;r den Benutzer die Anmeldedaten
+an. Die Anmeldedaten enthalten
+<ul>
+<li>die bereichsspezifische Personenkennzeichen (bPK),</li>
+<li>den signierten AUTH-Block (optional),</li>
+<li>die Personenbindung (optional),</li>
+<li>die <tt>PersonData</tt>-Struktur aus der Personenbindung (optional),</li>
+<li>die Information, ob die Signatur des AUTH-Blocks mit einem qualifiziertem Zertifikat erfolgte,</li>
+<li>Informationen zur Beh&ouml;rde, falls die Signatur mit einem Beh&ouml;rdenzertifikat erzeugt wurde.</li>
+</ul>
+</td>
+</tr>
+
+<tr>
+<td valign="top">2.7</td>
+<td id="block">Ist der obige Authentisierungsvorgang erfolgreich, dann wird eine Redirect-Seite
+zum Browser gesendet.</td>
+</tr>
+
+<tr>
+<td valign="top">3</td>
+<td id="block">Der Browser f&uuml;hrt das Redirect zur Proxykomponente durch. Als Parameter wird das von MOA-ID-AUTH
+erzeugte SAML-Artifact &uuml;bergeben.</td>
+</tr>
+
+<tr>
+<td valign="top">4</td>
+<td id="block">Die Proxykomponente verwendet dieses eindeutige SAML-Artifact, um die Anmeldedaten
+von MOA-ID-AUTH zu erhal-ten. Danach werden die Anmeldedaten in MOA-ID-AUTH gel&ouml;scht.</td>
+</tr>
+
+<tr>
+<td valign="top">5</td>
+<td id="block">MOA-ID-PROXY liest die Konfigurationsdatei der zugeh&ouml;rigen Online-Applikation, die beschreibt, wie die Anmeldedaten
+an die nachfolgende Applikation &uuml;bergeben werden m&uuml;ssen, und meldet den Benutzer bei der Applikation an.</td>
+</tr>
+
+<tr>
+<td valign="top">6</td>
+<td id="block">Ist die betreffende OA als stateless konfiguriert, so werden in weiterer Folge die Antworten der OA
+an den Benutzer weitergeleitet und die Anfragen des Benutzers an die OA weitergeleitet.</td>
+</tr>
+
+
+</table>
+<div id="subtitel">Erg&auml;nzung f&uuml;r ausl&auml;ndische B&uuml;rger</div>
+<div id="block">
+ <p>Ab der MOA Release 1.4.7 ist es m&ouml;glich, dass sich auch ausl&auml;ndische B&uuml;rger mittels MOA-ID einloggen k&ouml;nnen. Hierzu wird eine Verbindung zu einem sogenannten Stammzahlenregister-Gateway aufgebaut, dass basierend auf den Zertifikatsdaten des ausl&auml;ndischen B&uuml;rgers eine Eintragung im Erg&auml;nzungsregister f&uuml;r nat&uuml;rliche Personen gem&auml;&szlig; E-Government Gesetz &sect;6(5) vornimmt. Somit ist es m&ouml;glich, dass eine Personenbindung ausgestellt werden kann, die in weitere Folge an MOA-ID weitergeleitet wird. </p>
+ <p>Der Zugang zu diesem Stammzahlenregister-Gateway ist &uuml;ber eine Client-Server Authentifizierung abgesichert. Als Client-Zertifikate werden Zertifikate der Firmen A-Trust bzw. A-CERT, die mit der Verwaltungs- oder Dienstleistereigenschaft versehen sind, akzeptiert. </p>
+ </div>
+
+ <div id="subtitel">Online-Vollmachten</div>
+<div id="block">
+ <p>Ab der MOA Release 1.5.0 werden Online-Vollmachten (f&uuml;r Anwendungen aus dem &ouml;ffentlichen Bereich) unterst&uuml;tzt. Hierzu werden diese Vollmachten &uuml;ber eine Online-Vollmachten-Service ausgew&auml;hlt. Der Zugang zu diesem Online-Vollmachten Service ist &uuml;ber eine Client-Server Authentifizierung abgesichert. Als Client-Zertifikate werden Zertifikate der Firmen A-Trust bzw. A-CERT, die mit der Verwaltungs- oder Dienstleistereigenschaft versehen sind, akzeptiert. </p>
+</div>
+
+</td></tr></table>
+
+<br /><br />
+
+<!-- Trailer -->
+<table width="650" border="0" cellpadding="10" cellspacing="0">
+<tr>
+<td width="170" valign="top"><br /></td>
+<td valign="top">
+<hr />
+<div style="font-size:8pt; color:#909090">&copy; 2010</div>
+</td></tr></table>
+<br />
+
+
+</div>
+</body>
+</html>
diff --git a/id/server/doc/moa_images/east.gif b/id/server/doc/moa_images/east.gif
new file mode 100644
index 000000000..e76117cb0
--- /dev/null
+++ b/id/server/doc/moa_images/east.gif
Binary files differ
diff --git a/id/server/doc/moa_images/idle.gif b/id/server/doc/moa_images/idle.gif
new file mode 100644
index 000000000..28b8148e5
--- /dev/null
+++ b/id/server/doc/moa_images/idle.gif
Binary files differ
diff --git a/id/server/doc/moa_images/moa_diagramm1.jpg b/id/server/doc/moa_images/moa_diagramm1.jpg
new file mode 100644
index 000000000..776331fb8
--- /dev/null
+++ b/id/server/doc/moa_images/moa_diagramm1.jpg
Binary files differ
diff --git a/id/server/doc/moa_images/moa_thema.gif b/id/server/doc/moa_images/moa_thema.gif
new file mode 100644
index 000000000..f59075528
--- /dev/null
+++ b/id/server/doc/moa_images/moa_thema.gif
Binary files differ
diff --git a/id/server/doc/moa_images/north.gif b/id/server/doc/moa_images/north.gif
new file mode 100644
index 000000000..b4316b5d7
--- /dev/null
+++ b/id/server/doc/moa_images/north.gif
Binary files differ
diff --git a/id/server/doc/moa_images/pfeil.gif b/id/server/doc/moa_images/pfeil.gif
new file mode 100644
index 000000000..e4eeb1740
--- /dev/null
+++ b/id/server/doc/moa_images/pfeil.gif
Binary files differ
diff --git a/id/server/doc/moa_images/print.gif b/id/server/doc/moa_images/print.gif
new file mode 100644
index 000000000..b8e59144e
--- /dev/null
+++ b/id/server/doc/moa_images/print.gif
Binary files differ
diff --git a/id/server/doc/moa_images/select.gif b/id/server/doc/moa_images/select.gif
new file mode 100644
index 000000000..59a1694c5
--- /dev/null
+++ b/id/server/doc/moa_images/select.gif
Binary files differ
diff --git a/id/server/doc/moa_images/south.gif b/id/server/doc/moa_images/south.gif
new file mode 100644
index 000000000..c70ab3e97
--- /dev/null
+++ b/id/server/doc/moa_images/south.gif
Binary files differ
diff --git a/id/server/doc/moa_images/transdot.gif b/id/server/doc/moa_images/transdot.gif
new file mode 100644
index 000000000..e31aba280
--- /dev/null
+++ b/id/server/doc/moa_images/transdot.gif
Binary files differ
diff --git a/id/server/doc/moa_images/west.gif b/id/server/doc/moa_images/west.gif
new file mode 100644
index 000000000..135698ee7
--- /dev/null
+++ b/id/server/doc/moa_images/west.gif
Binary files differ
diff --git a/id/server/idserverlib/.classpath b/id/server/idserverlib/.classpath
new file mode 100644
index 000000000..1c79cc393
--- /dev/null
+++ b/id/server/idserverlib/.classpath
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/id/server/idserverlib/.project b/id/server/idserverlib/.project
new file mode 100644
index 000000000..b2e34e738
--- /dev/null
+++ b/id/server/idserverlib/.project
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>moa-id-lib</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ </natures>
+</projectDescription>
diff --git a/id/server/idserverlib/.settings/org.eclipse.jdt.core.prefs b/id/server/idserverlib/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..8bba65ebb
--- /dev/null
+++ b/id/server/idserverlib/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Thu Sep 20 14:35:41 CEST 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.source=1.4
diff --git a/id/server/idserverlib/.settings/org.eclipse.wst.common.component b/id/server/idserverlib/.settings/org.eclipse.wst.common.component
new file mode 100644
index 000000000..87b873d7b
--- /dev/null
+++ b/id/server/idserverlib/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+<wb-module deploy-name="moa-id-lib">
+<wb-resource deploy-path="/" source-path="/src/main/java"/>
+<wb-resource deploy-path="/" source-path="/src/main/resources"/>
+</wb-module>
+</project-modules>
diff --git a/id/server/idserverlib/.settings/org.eclipse.wst.common.project.facet.core.xml b/id/server/idserverlib/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 000000000..30c02fe23
--- /dev/null
+++ b/id/server/idserverlib/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <fixed facet="jst.java"/>
+ <fixed facet="jst.utility"/>
+ <installed facet="jst.java" version="1.4"/>
+ <installed facet="jst.utility" version="1.0"/>
+</faceted-project>
diff --git a/id/server/idserverlib/.settings/org.maven.ide.eclipse.prefs b/id/server/idserverlib/.settings/org.maven.ide.eclipse.prefs
new file mode 100644
index 000000000..3f907cfa1
--- /dev/null
+++ b/id/server/idserverlib/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,9 @@
+#Tue Jul 07 16:06:59 CEST 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
diff --git a/id/server/idserverlib/pom.xml b/id/server/idserverlib/pom.xml
new file mode 100644
index 000000000..eb21c2fd3
--- /dev/null
+++ b/id/server/idserverlib/pom.xml
@@ -0,0 +1,197 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>MOA.id</groupId>
+ <artifactId>moa-id</artifactId>
+ <version>1.5.0</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>MOA.id.server</groupId>
+ <artifactId>moa-id-lib</artifactId>
+ <packaging>jar</packaging>
+ <version>1.5.0</version>
+ <name>MOA ID API</name>
+
+ <properties>
+ <repositoryPath>${basedir}/../../../repository</repositoryPath>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>MOA</groupId>
+ <artifactId>moa-common</artifactId>
+ <type>jar</type>
+ </dependency>
+ <dependency>
+ <groupId>MOA</groupId>
+ <artifactId>moa-common</artifactId>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>MOA.spss.server</groupId>
+ <artifactId>moa-spss-lib</artifactId>
+ <!--version>${project.version}</version-->
+ </dependency>
+ <dependency>
+ <groupId>axis</groupId>
+ <artifactId>axis</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>xml-apis</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>xalan</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>serializer</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-discovery</groupId>
+ <artifactId>commons-discovery</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>dav4j</groupId>
+ <artifactId>dav4j</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>httpsclient</groupId>
+ <artifactId>httpsclient</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_moa</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_ecc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_jce_full</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_ixsil</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_X509TrustManager</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>regexp</groupId>
+ <artifactId>regexp</artifactId>
+ </dependency>
+ <!-- <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ </dependency>-->
+ <!-- <dependency>
+ <groupId>at.gv.egovernment.moa.id</groupId>
+ <artifactId>mandate-validate</artifactId>
+ <version>1.1</version>
+ </dependency>-->
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.6</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ <archive>
+ <addMavenDescriptor>false</addMavenDescriptor>
+ </archive>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.2</version>
+ <configuration>
+ <quiet>true</quiet>
+ <author>false</author>
+ <version>false</version>
+ <use>true</use>
+ <excludePackageNames>at.gv.egovernment.moa.spss.server.*;at.gv.egovernment.moa.spss.api.impl.*;at.gv.egovernment.moa.spss.impl.*</excludePackageNames>
+ <tags>
+ <tag>
+ <name>pre</name>
+ <placement>a</placement>
+ <head>Preconditions:</head>
+ </tag>
+ <tag>
+ <name>post</name>
+ <placement>a</placement>
+ <head>Postconditions:</head>
+ </tag>
+ </tags>
+ <links>
+ <link>http://java.sun.com/j2se/1.4/docs/api/</link>
+ <link>http://java.sun.com/j2se/1.5.0/docs/api/</link>
+ <link>http://logging.apache.org/log4j/docs/api/</link>
+ </links>
+ <target>1.4</target>
+ </configuration>
+ <executions>
+ <execution>
+ <id>generate-javadoc</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/AuthenticationException.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/AuthenticationException.java
new file mode 100644
index 000000000..86ecc96d4
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/AuthenticationException.java
@@ -0,0 +1,46 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id;
+
+
+/**
+ * Exception thrown during handling of AuthenticationSession
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class AuthenticationException extends MOAIDException {
+
+ /**
+ * Constructor for AuthenticationException.
+ * @param messageId
+ */
+ public AuthenticationException(String messageId, Object[] parameters) {
+ super(messageId, parameters, null);
+ }
+ /**
+ * Constructor for AuthenticationException.
+ * @param messageId
+ * @param parameters
+ * @param wrapped
+ */
+ public AuthenticationException(
+ String messageId,
+ Object[] parameters,
+ Throwable wrapped) {
+ super(messageId, parameters, wrapped);
+ }
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/BuildException.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/BuildException.java
new file mode 100644
index 000000000..fc14afec5
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/BuildException.java
@@ -0,0 +1,49 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id;
+
+
+/**
+ * Exception thrown while building an XML or HTML structure.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class BuildException extends MOAIDException {
+
+ /**
+ * Constructor for BuildException.
+ * @param messageId
+ * @param parameters
+ */
+ public BuildException(String messageId, Object[] parameters) {
+ super(messageId, parameters);
+ }
+
+ /**
+ * Constructor for BuildException.
+ * @param messageId
+ * @param parameters
+ * @param wrapped
+ */
+ public BuildException(
+ String messageId,
+ Object[] parameters,
+ Throwable wrapped) {
+ super(messageId, parameters, wrapped);
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/ECDSAConverterException.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/ECDSAConverterException.java
new file mode 100644
index 000000000..6b78fb214
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/ECDSAConverterException.java
@@ -0,0 +1,49 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id;
+
+
+/**
+ * Exception thrown while converting ECDSAKeys from/to an XML structure.
+ *
+ * @author Rudolf Schamberger
+ * @version $Id$
+ */
+public class ECDSAConverterException extends MOAIDException {
+
+ /**
+ * Constructor for ECDSAConverterException.
+ * @param messageId
+ * @param parameters
+ */
+ public ECDSAConverterException(String messageId, Object[] parameters) {
+ super(messageId, parameters);
+ }
+
+ /**
+ * Constructor for ECDSAConverterException.
+ * @param messageId
+ * @param parameters
+ * @param wrapped
+ */
+ public ECDSAConverterException(
+ String messageId,
+ Object[] parameters,
+ Throwable wrapped) {
+ super(messageId, parameters, wrapped);
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/MOAIDException.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/MOAIDException.java
new file mode 100644
index 000000000..40a52c8d2
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/MOAIDException.java
@@ -0,0 +1,174 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id;
+
+import java.io.PrintStream;
+import java.io.PrintWriter;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.id.util.MOAIDMessageProvider;
+import at.gv.egovernment.moa.util.Constants;
+
+/**
+ * Base class of technical MOA exceptions.
+ *
+ * Technical exceptions are exceptions that originate from system failure (e.g.,
+ * a database connection fails, a component is not available, etc.)
+ *
+ * @author Patrick Peck, Ivancsics Paul
+ * @version $Id$
+ */
+public class MOAIDException extends Exception {
+ /** message ID */
+ private String messageId;
+ /** wrapped exception */
+ private Throwable wrapped;
+
+ /**
+ * Create a new <code>MOAIDException</code>.
+ *
+ * @param messageId The identifier of the message associated with this
+ * exception.
+ * @param parameters Additional message parameters.
+ */
+ public MOAIDException(String messageId, Object[] parameters) {
+ super(MOAIDMessageProvider.getInstance().getMessage(messageId, parameters));
+ this.messageId = messageId;
+ }
+
+ /**
+ * Create a new <code>MOAIDException</code>.
+ *
+ * @param messageId The identifier of the message associated with this
+ * <code>MOAIDException</code>.
+ * @param parameters Additional message parameters.
+ * @param wrapped The exception wrapped by this
+ * <code>MOAIDException</code>.
+ */
+ public MOAIDException(
+ String messageId,
+ Object[] parameters,
+ Throwable wrapped) {
+
+ super(MOAIDMessageProvider.getInstance().getMessage(messageId, parameters));
+ this.messageId = messageId;
+ this.wrapped = wrapped;
+ }
+
+ /**
+ * Print a stack trace of this exception to <code>System.err</code>.
+ *
+ * @see java.lang.Throwable#printStackTrace()
+ */
+ public void printStackTrace() {
+ printStackTrace(System.err);
+ }
+
+ /**
+ * Print a stack trace of this exception, including the wrapped exception.
+ *
+ * @param s The stream to write the stack trace to.
+ * @see java.lang.Throwable#printStackTrace(java.io.PrintStream)
+ */
+ public void printStackTrace(PrintStream s) {
+ if (getWrapped() == null)
+ super.printStackTrace(s);
+ else {
+ s.print("Root exception: ");
+ getWrapped().printStackTrace(s);
+ }
+ }
+
+ /**
+ * Print a stack trace of this exception, including the wrapped exception.
+ *
+ * @param s The stream to write the stacktrace to.
+ * @see java.lang.Throwable#printStackTrace(java.io.PrintWriter)
+ */
+ public void printStackTrace(PrintWriter s) {
+ if (getWrapped() == null)
+ super.printStackTrace(s);
+ else {
+ s.print("Root exception: ");
+ getWrapped().printStackTrace(s);
+ }
+ }
+
+ /**
+ * @return message ID
+ */
+ public String getMessageId() {
+ return messageId;
+ }
+
+ /**
+ * @return wrapped exception
+ */
+ public Throwable getWrapped() {
+ return wrapped;
+ }
+
+ /**
+ * Convert this <code>MOAIDException</code> to an <code>ErrorResponse</code>
+ * element from the MOA namespace.
+ *
+ * @return An <code>ErrorResponse</code> element, containing the subelements
+ * <code>ErrorCode</code> and <code>Info</code> required by the MOA schema.
+ */
+ public Element toErrorResponse() {
+ DocumentBuilder builder;
+ DOMImplementation impl;
+ Document doc;
+ Element errorResponse;
+ Element errorCode;
+ Element info;
+
+ // create a new document
+ try {
+ builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ impl = builder.getDOMImplementation();
+ } catch (ParserConfigurationException e) {
+ return null;
+ }
+
+ // build the ErrorResponse element
+ doc = impl.createDocument(Constants.MOA_NS_URI, "ErrorResponse", null);
+ errorResponse = doc.getDocumentElement();
+
+ // add MOA namespace declaration
+ errorResponse.setAttributeNS(
+ Constants.XMLNS_NS_URI,
+ "xmlns",
+ Constants.MOA_NS_URI);
+
+ // build the child elements
+ errorCode = doc.createElementNS(Constants.MOA_NS_URI, "ErrorCode");
+ errorCode.appendChild(doc.createTextNode(messageId));
+ info = doc.createElementNS(Constants.MOA_NS_URI, "Info");
+ info.appendChild(doc.createTextNode(toString()));
+ errorResponse.appendChild(errorCode);
+ errorResponse.appendChild(info);
+ return errorResponse;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/ParseException.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/ParseException.java
new file mode 100644
index 000000000..29d0bbfa5
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/ParseException.java
@@ -0,0 +1,49 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id;
+
+
+/**
+ * Exception thrown while parsing an XML structure.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class ParseException extends MOAIDException {
+
+ /**
+ * Constructor for ParseException.
+ * @param messageId
+ * @param parameters
+ */
+ public ParseException(String messageId, Object[] parameters) {
+ super(messageId, parameters);
+ }
+
+ /**
+ * Constructor for ParseException.
+ * @param messageId
+ * @param parameters
+ * @param wrapped
+ */
+ public ParseException(
+ String messageId,
+ Object[] parameters,
+ Throwable wrapped) {
+ super(messageId, parameters, wrapped);
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/ServiceException.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/ServiceException.java
new file mode 100644
index 000000000..57e0a7807
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/ServiceException.java
@@ -0,0 +1,49 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id;
+
+
+/**
+ * Exception thrown while calling the MOA-SPSS web service.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class ServiceException extends MOAIDException {
+
+ /**
+ * Constructor for ServiceException.
+ * @param messageId
+ * @param parameters
+ */
+ public ServiceException(String messageId, Object[] parameters) {
+ super(messageId, parameters);
+ }
+
+ /**
+ * Constructor for ServiceException.
+ * @param messageId
+ * @param parameters
+ * @param wrapped
+ */
+ public ServiceException(
+ String messageId,
+ Object[] parameters,
+ Throwable wrapped) {
+ super(messageId, parameters, wrapped);
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java
new file mode 100644
index 000000000..a772e0457
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java
@@ -0,0 +1,1905 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth;
+
+import iaik.pki.PKIException;
+import iaik.x509.X509Certificate;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.security.GeneralSecurityException;
+import java.security.Principal;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.Vector;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.TransformerException;
+
+import org.apache.xpath.XPathAPI;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.xml.sax.SAXException;
+
+import at.gv.egovernment.moa.id.AuthenticationException;
+import at.gv.egovernment.moa.id.BuildException;
+import at.gv.egovernment.moa.id.ParseException;
+import at.gv.egovernment.moa.id.ServiceException;
+import at.gv.egovernment.moa.id.auth.builder.AuthenticationBlockAssertionBuilder;
+import at.gv.egovernment.moa.id.auth.builder.AuthenticationDataAssertionBuilder;
+import at.gv.egovernment.moa.id.auth.builder.BPKBuilder;
+import at.gv.egovernment.moa.id.auth.builder.CertInfoVerifyXMLSignatureRequestBuilder;
+import at.gv.egovernment.moa.id.auth.builder.CreateXMLSignatureRequestBuilder;
+import at.gv.egovernment.moa.id.auth.builder.DataURLBuilder;
+import at.gv.egovernment.moa.id.auth.builder.GetIdentityLinkFormBuilder;
+import at.gv.egovernment.moa.id.auth.builder.InfoboxReadRequestBuilder;
+import at.gv.egovernment.moa.id.auth.builder.InfoboxValidatorParamsBuilder;
+import at.gv.egovernment.moa.id.auth.builder.PersonDataBuilder;
+import at.gv.egovernment.moa.id.auth.builder.SAMLArtifactBuilder;
+import at.gv.egovernment.moa.id.auth.builder.SelectBKUFormBuilder;
+import at.gv.egovernment.moa.id.auth.builder.VerifyXMLSignatureRequestBuilder;
+import at.gv.egovernment.moa.id.auth.data.AuthenticationSession;
+import at.gv.egovernment.moa.id.auth.data.CreateXMLSignatureResponse;
+import at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttribute;
+import at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttributeImpl;
+import at.gv.egovernment.moa.id.auth.data.IdentityLink;
+import at.gv.egovernment.moa.id.auth.data.InfoboxValidationResult;
+import at.gv.egovernment.moa.id.auth.data.InfoboxValidatorParams;
+import at.gv.egovernment.moa.id.auth.data.VerifyXMLSignatureResponse;
+import at.gv.egovernment.moa.id.auth.invoke.SignatureVerificationInvoker;
+import at.gv.egovernment.moa.id.auth.parser.CreateXMLSignatureResponseParser;
+import at.gv.egovernment.moa.id.auth.parser.ExtendedInfoboxReadResponseParser;
+import at.gv.egovernment.moa.id.auth.parser.InfoboxReadResponseParser;
+import at.gv.egovernment.moa.id.auth.parser.SAMLArtifactParser;
+import at.gv.egovernment.moa.id.auth.parser.VerifyXMLSignatureResponseParser;
+import at.gv.egovernment.moa.id.auth.servlet.AuthServlet;
+import at.gv.egovernment.moa.id.auth.validator.CreateXMLSignatureResponseValidator;
+import at.gv.egovernment.moa.id.auth.validator.IdentityLinkValidator;
+import at.gv.egovernment.moa.id.auth.validator.InfoboxValidator;
+import at.gv.egovernment.moa.id.auth.validator.ValidateException;
+import at.gv.egovernment.moa.id.auth.validator.VerifyXMLSignatureResponseValidator;
+import at.gv.egovernment.moa.id.auth.validator.parep.ParepUtils;
+import at.gv.egovernment.moa.id.auth.validator.parep.ParepValidator;
+import at.gv.egovernment.moa.id.auth.validator.parep.client.szrgw.SZRGWConstants;
+import at.gv.egovernment.moa.id.auth.validator.parep.config.ParepConfiguration;
+import at.gv.egovernment.moa.id.config.ConfigurationException;
+import at.gv.egovernment.moa.id.config.ConfigurationProvider;
+import at.gv.egovernment.moa.id.config.ConnectionParameter;
+import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
+import at.gv.egovernment.moa.id.config.auth.OAAuthParameter;
+import at.gv.egovernment.moa.id.config.auth.VerifyInfoboxParameter;
+import at.gv.egovernment.moa.id.config.auth.VerifyInfoboxParameters;
+import at.gv.egovernment.moa.id.data.AuthenticationData;
+import at.gv.egovernment.moa.id.util.HTTPUtils;
+import at.gv.egovernment.moa.id.util.MOAIDMessageProvider;
+import at.gv.egovernment.moa.id.util.Random;
+import at.gv.egovernment.moa.id.util.SSLUtils;
+import at.gv.egovernment.moa.id.util.client.mis.simple.MISMandate;
+import at.gv.egovernment.moa.logging.LogMsg;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.Base64Utils;
+import at.gv.egovernment.moa.util.BoolUtils;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.DateTimeUtils;
+import at.gv.egovernment.moa.util.FileUtils;
+import at.gv.egovernment.moa.util.StringUtils;
+
+/**
+ * API for MOA ID Authentication Service.<br>
+ * {@link AuthenticationSession} is stored in a session store and retrieved
+ * by giving the session ID.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class AuthenticationServer implements MOAIDAuthConstants {
+
+ /** single instance */
+ private static AuthenticationServer instance;
+ /** session data store (session ID -> AuthenticationSession) */
+ private static Map sessionStore = new HashMap();
+ /** authentication data store (assertion handle -> AuthenticationData) */
+ private static Map authenticationDataStore = new HashMap();
+ /**
+ * time out in milliseconds used by {@link cleanup} for session store
+ */
+ private long sessionTimeOut = 10 * 60 * 1000; // default 10 minutes
+ /**
+ * time out in milliseconds used by {@link cleanup} for authentication data store
+ */
+ private long authDataTimeOut = 2 * 60 * 1000; // default 2 minutes
+
+ /**
+ * Returns the single instance of <code>AuthenticationServer</code>.
+ *
+ * @return the single instance of <code>AuthenticationServer</code>
+ */
+ public static AuthenticationServer getInstance() {
+ if (instance == null)
+ instance = new AuthenticationServer();
+ return instance;
+ }
+ /**
+ * Constructor for AuthenticationServer.
+ */
+ public AuthenticationServer() {
+ super();
+ }
+ /**
+ * Processes request to select a BKU.
+ * <br/>Processing depends on value of {@link AuthConfigurationProvider#getBKUSelectionType}.
+ * <br/>For <code>bkuSelectionType==HTMLComplete</code>, a <code>returnURI</code> for the
+ * "BKU Auswahl" service is returned.
+ * <br/>For <code>bkuSelectionType==HTMLSelect</code>, an HTML form for BKU selection is returned.
+ * @param authURL base URL of MOA-ID Auth component
+ * @param target "Gesch&auml;ftsbereich"
+ * @param oaURL online application URL requested
+ * @param bkuSelectionTemplateURL template for BKU selection form to be used
+ * in case of <code>HTMLSelect</code>; may be null
+ * @param templateURL URL providing an HTML template for the HTML form to be used
+ * for call <code>startAuthentication</code>
+ * @return for <code>bkuSelectionType==HTMLComplete</code>, the <code>returnURI</code> for the
+ * "BKU Auswahl" service;
+ * for <code>bkuSelectionType==HTMLSelect</code>, an HTML form for BKU selection
+ * @throws WrongParametersException upon missing parameters
+ * @throws AuthenticationException when the configured BKU selection service cannot be reached,
+ * and when the given bkuSelectionTemplateURL cannot be reached
+ * @throws ConfigurationException on missing configuration data
+ * @throws BuildException while building the HTML form
+ */
+ public String selectBKU(
+ String authURL,
+ String target,
+ String oaURL,
+ String bkuSelectionTemplateURL,
+ String templateURL)
+ throws WrongParametersException, AuthenticationException, ConfigurationException, BuildException {
+
+ //check if HTTP Connection may be allowed (through FRONTEND_SERVLETS_ENABLE_HTTP_CONNECTION_PROPERTY)
+ String boolStr = AuthConfigurationProvider.getInstance().getGenericConfigurationParameter(
+ AuthConfigurationProvider.FRONTEND_SERVLETS_ENABLE_HTTP_CONNECTION_PROPERTY);
+ if ((!authURL.startsWith("https:")) && (false == BoolUtils.valueOf(boolStr)))
+ throw new AuthenticationException("auth.07", new Object[] { authURL + "*" });
+ if (isEmpty(authURL))
+ throw new WrongParametersException("StartAuthentication", "AuthURL", "auth.05");
+ if (isEmpty(oaURL))
+ throw new WrongParametersException("StartAuthentication", PARAM_OA, "auth.05");
+
+ ConnectionParameter bkuConnParam =
+ AuthConfigurationProvider.getInstance().getBKUConnectionParameter();
+ if (bkuConnParam == null)
+ throw new ConfigurationException(
+ "config.08",
+ new Object[] { "BKUSelection/ConnectionParameter" });
+ OAAuthParameter oaParam =
+ AuthConfigurationProvider.getInstance().getOnlineApplicationParameter(oaURL);
+ if (oaParam == null)
+ throw new AuthenticationException("auth.00", new Object[] { oaURL });
+
+ if (!oaParam.getBusinessService()) {
+ if (isEmpty(target))
+ throw new WrongParametersException("StartAuthentication", PARAM_TARGET, "auth.05");
+ } else {
+ if (!isEmpty(target)) {
+ Logger.info("Ignoring target parameter thus application type is \"businessService\"");
+ }
+ target = null;
+ }
+
+ AuthenticationSession session = newSession();
+ Logger.info("MOASession " + session.getSessionID() + " angelegt");
+ session.setTarget(target);
+ session.setOAURLRequested(oaURL);
+ session.setPublicOAURLPrefix(oaParam.getPublicURLPrefix());
+ session.setAuthURL(authURL);
+ session.setTemplateURL(templateURL);
+ session.setBusinessService(oaParam.getBusinessService());
+ String returnURL =
+ new DataURLBuilder().buildDataURL(authURL, REQ_START_AUTHENTICATION, session.getSessionID());
+ String bkuSelectionType = AuthConfigurationProvider.getInstance().getBKUSelectionType();
+ if (bkuSelectionType.equals(AuthConfigurationProvider.BKU_SELECTION_TYPE_HTMLCOMPLETE)) {
+ // bkuSelectionType==HTMLComplete
+ String redirectURL = bkuConnParam.getUrl() + "?" + AuthServlet.PARAM_RETURN + "=" + returnURL;
+ return redirectURL;
+ } else {
+ // bkuSelectionType==HTMLSelect
+ String bkuSelectTag;
+ try {
+ bkuSelectTag = readBKUSelectTag(AuthConfigurationProvider.getInstance(), bkuConnParam);
+ } catch (Throwable ex) {
+ throw new AuthenticationException(
+ "auth.11",
+ new Object[] { bkuConnParam.getUrl(), ex.toString()},
+ ex);
+ }
+ String bkuSelectionTemplate = null;
+ // override template url by url from configuration file
+ if (oaParam.getBkuSelectionTemplateURL() != null) {
+ bkuSelectionTemplateURL = oaParam.getBkuSelectionTemplateURL();
+ }
+ if (bkuSelectionTemplateURL != null) {
+ try {
+ bkuSelectionTemplate = new String(FileUtils.readURL(bkuSelectionTemplateURL));
+ } catch (IOException ex) {
+ throw new AuthenticationException(
+ "auth.03",
+ new Object[] { bkuSelectionTemplateURL, ex.toString()},
+ ex);
+ }
+ }
+ String htmlForm =
+ new SelectBKUFormBuilder().build(bkuSelectionTemplate, returnURL, bkuSelectTag);
+ return htmlForm;
+ }
+ }
+ /**
+ * Method readBKUSelectTag.
+ * @param conf the ConfigurationProvider
+ * @param connParam the ConnectionParameter for that connection
+ * @return String
+ * @throws ConfigurationException on config-errors
+ * @throws PKIException on PKI errors
+ * @throws IOException on any data error
+ * @throws GeneralSecurityException on security errors
+ */
+ private String readBKUSelectTag(ConfigurationProvider conf, ConnectionParameter connParam)
+ throws ConfigurationException, PKIException, IOException, GeneralSecurityException {
+
+ if (connParam.isHTTPSURL())
+ return SSLUtils.readHttpsURL(conf, connParam);
+ else
+ return HTTPUtils.readHttpURL(connParam.getUrl());
+ }
+ /**
+ * Processes the beginning of an authentication session.
+ * <ul>
+ * <li>Starts an authentication session</li>
+ * <li>Creates an <code>&lt;InfoboxReadRequest&gt;</code></li>
+ * <li>Creates an HTML form for querying the identity link from the
+ * security layer implementation.
+ * <br>Form parameters include
+ * <ul>
+ * <li>the <code>&lt;InfoboxReadRequest&gt;</code></li>
+ * <li>the data URL where the security layer implementation sends it response to</li>
+ * </ul>
+ * </ul>
+ * @param authURL URL of the servlet to be used as data URL
+ * @param target "Gesch&auml;ftsbereich" of the online application requested
+ * @param oaURL online application URL requested
+ * @param bkuURL URL of the "B&uuml;rgerkartenumgebung" to be used;
+ * may be <code>null</code>; in this case, the default location will be used
+ * @param useMandate Indicates if mandate is used or not
+ * @param templateURL URL providing an HTML template for the HTML form generated
+ * @param scheme determines the protocol used
+ * @return HTML form
+ * @throws AuthenticationException
+ * @see GetIdentityLinkFormBuilder
+ * @see InfoboxReadRequestBuilder
+ */
+ public String startAuthentication(
+ String authURL,
+ String target,
+ String oaURL,
+ String templateURL,
+ String bkuURL,
+ String useMandate,
+ String sessionID,
+ String scheme)
+ throws WrongParametersException, AuthenticationException, ConfigurationException, BuildException {
+
+ if (isEmpty(sessionID)) {
+ if (isEmpty(authURL))
+ throw new WrongParametersException("StartAuthentication", "AuthURL", "auth.05");
+
+ //check if HTTP Connection may be allowed (through FRONTEND_SERVLETS_ENABLE_HTTP_CONNECTION_PROPERTY)
+ String boolStr =
+ AuthConfigurationProvider.getInstance().getGenericConfigurationParameter(
+ AuthConfigurationProvider.FRONTEND_SERVLETS_ENABLE_HTTP_CONNECTION_PROPERTY);
+ if ((!authURL.startsWith("https:")) && (false == BoolUtils.valueOf(boolStr)))
+ throw new AuthenticationException("auth.07", new Object[] { authURL + "*" });
+ if (isEmpty(oaURL))
+ throw new WrongParametersException("StartAuthentication", PARAM_OA, "auth.05");
+ }
+ AuthenticationSession session;
+ OAAuthParameter oaParam;
+ if (sessionID != null) {
+ session = getSession(sessionID);
+ oaParam =
+ AuthConfigurationProvider.getInstance().getOnlineApplicationParameter(
+ session.getPublicOAURLPrefix());
+ } else {
+ oaParam =
+ AuthConfigurationProvider.getInstance().getOnlineApplicationParameter(oaURL);
+ if (oaParam == null)
+ throw new AuthenticationException("auth.00", new Object[] { oaURL });
+ if (!oaParam.getBusinessService()) {
+ if (isEmpty(target))
+ throw new WrongParametersException("StartAuthentication", PARAM_TARGET, "auth.05");
+ } else {
+ target = null;
+ }
+ session = newSession();
+ Logger.info("MOASession " + session.getSessionID() + " angelegt");
+ session.setTarget(target);
+ session.setOAURLRequested(oaURL);
+ session.setPublicOAURLPrefix(oaParam.getPublicURLPrefix());
+ session.setAuthURL(authURL);
+ session.setTemplateURL(templateURL);
+ session.setBusinessService(oaParam.getBusinessService());
+ }
+ // BKU URL has not been set yet, even if session already exists
+ if (bkuURL == null) {
+ if (scheme!=null && scheme.equalsIgnoreCase("https")) {
+ bkuURL = DEFAULT_BKU_HTTPS;
+ } else {
+ bkuURL = DEFAULT_BKU;
+ }
+ }
+ session.setBkuURL(bkuURL);
+ session.setDomainIdentifier(oaParam.getIdentityLinkDomainIdentifier());
+ String infoboxReadRequest =
+ new InfoboxReadRequestBuilder().build(oaParam.getSlVersion12(),
+ oaParam.getBusinessService(),
+ oaParam.getIdentityLinkDomainIdentifier());
+
+ if ((useMandate != null) && (useMandate.compareTo("") != 0)) {
+ session.setUseMandate(useMandate);
+ }
+ else {
+ session.setUseMandate("false");
+ }
+ String dataURL =
+ new DataURLBuilder().buildDataURL(
+ session.getAuthURL(),
+ REQ_VERIFY_IDENTITY_LINK,
+ session.getSessionID());
+ String template = null;
+ // override template url by url from configuration file
+ if (oaParam.getTemplateURL() != null) {
+ templateURL = oaParam.getTemplateURL();
+ } else {
+ templateURL = session.getTemplateURL();
+ }
+ if (templateURL != null) {
+ try {
+ template = new String(FileUtils.readURL(templateURL));
+ } catch (IOException ex) {
+ throw new AuthenticationException(
+ "auth.03",
+ new Object[] { templateURL, ex.toString()},
+ ex);
+ }
+ }
+ String pushInfobox = "";
+ VerifyInfoboxParameters verifyInfoboxParameters = oaParam.getVerifyInfoboxParameters();
+ if (verifyInfoboxParameters != null) {
+ pushInfobox = verifyInfoboxParameters.getPushInfobox();
+ session.setPushInfobox(pushInfobox);
+ }
+ String certInfoRequest = new CertInfoVerifyXMLSignatureRequestBuilder().build(oaParam.getSlVersion12());
+ String certInfoDataURL =
+ new DataURLBuilder().buildDataURL(
+ session.getAuthURL(),
+ REQ_START_AUTHENTICATION,
+ session.getSessionID());
+ String htmlForm =
+ new GetIdentityLinkFormBuilder().build(
+ template,
+ bkuURL,
+ infoboxReadRequest,
+ dataURL,
+ certInfoRequest,
+ certInfoDataURL,
+ pushInfobox);
+ return htmlForm;
+ }
+ /**
+ * Processes an <code>&lt;InfoboxReadResponse&gt;</code> sent by the
+ * security layer implementation.<br>
+ * <ul>
+ * <li>Validates given <code>&lt;InfoboxReadResponse&gt;</code></li>
+ * <li>Parses identity link enclosed in <code>&lt;InfoboxReadResponse&gt;</code></li>
+ * <li>Verifies identity link by calling the MOA SP component</li>
+ * <li>Checks certificate authority of identity link</li>
+ * <li>Stores identity link in the session</li>
+ * <li>Verifies all additional infoboxes returned from the BKU</li>
+ * <li>Creates an authentication block to be signed by the user</li>
+ * <li>Creates and returns a <code>&lt;CreateXMLSignatureRequest&gt;</code>
+ * containg the authentication block, meant to be returned to the
+ * security layer implementation</li>
+ * </ul>
+ *
+ * @param sessionID ID of associated authentication session data
+ * @param infoboxReadResponseParameters The parameters from the response returned from
+ * the BKU including the <code>&lt;InfoboxReadResponse&gt;</code>
+ * @return String representation of the <code>&lt;CreateXMLSignatureRequest&gt;</code>
+ */
+ public String verifyIdentityLink(String sessionID, Map infoboxReadResponseParameters)
+ throws
+ AuthenticationException,
+ BuildException,
+ ParseException,
+ ConfigurationException,
+ ValidateException,
+ ServiceException {
+
+ if (isEmpty(sessionID))
+ throw new AuthenticationException("auth.10", new Object[] { REQ_VERIFY_IDENTITY_LINK, PARAM_SESSIONID});
+
+ String xmlInfoboxReadResponse = (String)infoboxReadResponseParameters.get(PARAM_XMLRESPONSE);
+
+ if (isEmpty(xmlInfoboxReadResponse))
+ throw new AuthenticationException("auth.10", new Object[] { REQ_VERIFY_IDENTITY_LINK, PARAM_XMLRESPONSE});
+
+ AuthenticationSession session = getSession(sessionID);
+ if (session.getTimestampIdentityLink() != null)
+ throw new AuthenticationException("auth.01", new Object[] { sessionID });
+ session.setTimestampIdentityLink();
+ AuthConfigurationProvider authConf = AuthConfigurationProvider.getInstance();
+
+ // check if an identity link was found
+ // Errorcode 2911 von Trustdesk BKU (nicht spezifikationskonform (SL1.2))
+ CharSequence se = "ErrorCode>2911".substring(0);
+ boolean b = xmlInfoboxReadResponse.contains(se);
+ if (b) { // no identity link found
+ Logger.info("Es konnte keine Personenbindung auf der Karte gefunden werden. Versuche Anmeldung als ausländische eID.");
+ return null;
+ }
+ // spezifikationsgemäßer (SL1.2) Errorcode
+ se = "ErrorCode>4002";
+ b = xmlInfoboxReadResponse.contains(se);
+ if (b) { // Unbekannter Infoboxbezeichner
+ Logger.info("Unbekannter Infoboxbezeichner. Versuche Anmeldung als ausländische eID.");
+ return null;
+ }
+
+ // for testing new identity link certificate
+ // https://localhost:8443/moa-id-auth/StartAuthentication?Target=AR&OA=https://localhost:8443/TestMOAID_OA/LoginServletExample
+// xmlInfoboxReadResponse = null;
+// try {
+// File file = new File("c:/temp/xxxMuster-new-cert_infobox.xml");
+// FileInputStream fis;
+//
+// fis = new FileInputStream(file);
+// byte[] array = Utils.readFromInputStream(fis);
+//
+// xmlInfoboxReadResponse = new String(array);
+// //System.out.println(xmlInfoboxReadResponse);
+//
+// } catch (FileNotFoundException e) {
+// // TODO Auto-generated catch block
+// e.printStackTrace();
+// } catch (UtilsException e) {
+// // TODO Auto-generated catch block
+// e.printStackTrace();
+// }
+//
+
+
+ // parses the <InfoboxReadResponse>
+ IdentityLink identityLink =
+ new InfoboxReadResponseParser(xmlInfoboxReadResponse).parseIdentityLink();
+ // validates the identity link
+ IdentityLinkValidator.getInstance().validate(identityLink);
+ // builds a <VerifyXMLSignatureRequest> for a call of MOA-SP
+ Element domVerifyXMLSignatureRequest =
+ new VerifyXMLSignatureRequestBuilder().build(
+ identityLink,
+ authConf.getMoaSpIdentityLinkTrustProfileID());
+
+ // invokes the call
+ Element domVerifyXMLSignatureResponse =
+ new SignatureVerificationInvoker().verifyXMLSignature(domVerifyXMLSignatureRequest);
+ // parses the <VerifyXMLSignatureResponse>
+ VerifyXMLSignatureResponse verifyXMLSignatureResponse =
+ new VerifyXMLSignatureResponseParser(domVerifyXMLSignatureResponse).parseData();
+
+ if (identityLink.getIdentificationType().equalsIgnoreCase(Constants.URN_PREFIX_BASEID)) {
+ }
+
+ OAAuthParameter oaParam =
+ AuthConfigurationProvider.getInstance().getOnlineApplicationParameter(
+ session.getPublicOAURLPrefix());
+
+ // if OA is type is business service the manifest validation result has to be ignored
+ boolean ignoreManifestValidationResult = oaParam.getBusinessService() ? true : false;
+
+ // validates the <VerifyXMLSignatureResponse>
+ VerifyXMLSignatureResponseValidator.getInstance().validate(
+ verifyXMLSignatureResponse,
+ authConf.getIdentityLinkX509SubjectNames(),
+ VerifyXMLSignatureResponseValidator.CHECK_IDENTITY_LINK,
+ ignoreManifestValidationResult);
+
+ session.setIdentityLink(identityLink);
+ // now validate the extended infoboxes
+ verifyInfoboxes(session, infoboxReadResponseParameters, !oaParam.getProvideStammzahl());
+
+ return getCreateXMLSignatureRequestAuthBlockOrRedirect(session, authConf, oaParam);
+ }
+
+
+ /**
+ * Processes an <code>Mandate</code> sent by the
+ * MIS.<br>
+ * <ul>
+ * <li>Validates given <code>Mandate</code></li>
+ * <li>Verifies Mandate by calling the MOA SP component</li>
+ * <li>Creates an authentication block to be signed by the user</li>
+ * <li>Creates and returns a <code>&lt;CreateXMLSignatureRequest&gt;</code>
+ * containg the authentication block, meant to be returned to the
+ * security layer implementation</li>
+ * </ul>
+ *
+ * @param sessionID ID of associated authentication session data
+ * @param infoboxReadResponseParameters The parameters from the response returned from
+ * the BKU including the <code>&lt;InfoboxReadResponse&gt;</code>
+ * @return String representation of the <code>&lt;CreateXMLSignatureRequest&gt;</code>
+ */
+ public String verifyMandate(String sessionID, MISMandate mandate)
+ throws
+ AuthenticationException,
+ BuildException,
+ ParseException,
+ ConfigurationException,
+ ValidateException,
+ ServiceException {
+
+ if (isEmpty(sessionID))
+ throw new AuthenticationException("auth.10", new Object[] { GET_MIS_SESSIONID, PARAM_SESSIONID});
+
+ String sMandate = new String(mandate.getMandate());
+ if (sMandate == null | sMandate.compareToIgnoreCase("") == 0) {
+ Logger.error("Mandate is empty.");
+ throw new AuthenticationException("auth.16", new Object[] { GET_MIS_SESSIONID});
+ }
+
+
+ AuthenticationSession session = getSession(sessionID);
+ AuthConfigurationProvider authConf = AuthConfigurationProvider.getInstance();
+
+
+ OAAuthParameter oaParam =
+ AuthConfigurationProvider.getInstance().getOnlineApplicationParameter(
+ session.getPublicOAURLPrefix());
+
+ try {
+ // set extended SAML attributes
+ setExtendedSAMLAttributeForMandates(session, mandate, oaParam.getBusinessService());
+ } catch (SAXException e) {
+ throw new AuthenticationException("auth.16", new Object[] { GET_MIS_SESSIONID}, e);
+ } catch (IOException e) {
+ throw new AuthenticationException("auth.16", new Object[] { GET_MIS_SESSIONID}, e);
+ } catch (ParserConfigurationException e) {
+ throw new AuthenticationException("auth.16", new Object[] { GET_MIS_SESSIONID}, e);
+ } catch (TransformerException e) {
+ throw new AuthenticationException("auth.16", new Object[] { GET_MIS_SESSIONID}, e);
+ }
+
+
+ return getCreateXMLSignatureRequestAuthBlockOrRedirect(session, authConf, oaParam);
+ }
+
+ /**
+ *
+ * @param session
+ * @param authConf
+ * @param oaParam
+ * @return
+ * @throws ConfigurationException
+ * @throws BuildException
+ * @throws ValidateException
+ */
+ public String getCreateXMLSignatureRequestAuthBlockOrRedirect(AuthenticationSession session, AuthConfigurationProvider authConf, OAAuthParameter oaParam)
+ throws
+ ConfigurationException,
+ BuildException,
+ ValidateException {
+
+ // check for intermediate processing of the infoboxes
+ if (session.isValidatorInputPending()) return "Redirect to Input Processor";
+
+ if (authConf==null) authConf = AuthConfigurationProvider.getInstance();
+ if (oaParam==null) oaParam = AuthConfigurationProvider.getInstance().
+ getOnlineApplicationParameter(session.getPublicOAURLPrefix());
+
+ //BZ.., calculate bPK for signing to be already present in AuthBlock
+ IdentityLink identityLink = session.getIdentityLink();
+ if (identityLink.getIdentificationType().equals(Constants.URN_PREFIX_BASEID)) {
+ // only compute bPK if online application is a public service and we have the Stammzahl
+ String bpkBase64 = new BPKBuilder().buildBPK(
+ identityLink.getIdentificationValue(),
+ session.getTarget());
+ identityLink.setIdentificationValue(bpkBase64);
+ }
+ //..BZ
+
+
+ // builds the AUTH-block
+ String authBlock = buildAuthenticationBlock(session);
+// session.setAuthBlock(authBlock);
+ // builds the <CreateXMLSignatureRequest>
+ String[] transformsInfos = oaParam.getTransformsInfos();
+ if ((transformsInfos == null) || (transformsInfos.length == 0)) {
+ // no OA specific transforms specified, use default ones
+ transformsInfos = authConf.getTransformsInfos();
+ }
+ String createXMLSignatureRequest =
+ new CreateXMLSignatureRequestBuilder().build(authBlock,
+ oaParam.getKeyBoxIdentifier(),
+ transformsInfos,
+ oaParam.getSlVersion12());
+ return createXMLSignatureRequest;
+ }
+
+
+
+ /**
+ * Returns an CreateXMLSignatureRequest for signing the ERnP statement.<br>
+ * <ul>
+ * <li>Creates an CreateXMLSignatureRequest to be signed by the user</li>
+ * </ul>
+ *
+ * @param sessionID ID of associated authentication session data
+ * @param cert The certificate from the user
+ * @return String representation of the <code>&lt;CreateXMLSignatureRequest&gt;</code>
+ */
+ public String createXMLSignatureRequestForeignID(String sessionID, X509Certificate cert)
+ throws
+ AuthenticationException,
+ BuildException,
+ ParseException,
+ ConfigurationException,
+ ValidateException,
+ ServiceException {
+
+ if (isEmpty(sessionID))
+ throw new AuthenticationException("auth.10", new Object[] { REQ_VERIFY_CERTIFICATE, PARAM_SESSIONID});
+
+ AuthenticationSession session = getSession(sessionID);
+
+ AuthConfigurationProvider authConf = AuthConfigurationProvider.getInstance();
+
+ OAAuthParameter oaParam =
+ AuthConfigurationProvider.getInstance().getOnlineApplicationParameter(
+ session.getPublicOAURLPrefix());
+
+ return getCreateXMLSignatureRequestForeigID(session, authConf, oaParam, cert);
+ }
+
+ public String getCreateXMLSignatureRequestForeigID(AuthenticationSession session, AuthConfigurationProvider authConf, OAAuthParameter oaParam, X509Certificate cert) throws ConfigurationException
+ {
+
+ // check for intermediate processing of the infoboxes
+ if (session.isValidatorInputPending()) return "Redirect to Input Processor";
+
+ if (authConf==null) authConf = AuthConfigurationProvider.getInstance();
+ if (oaParam==null) oaParam = AuthConfigurationProvider.getInstance().
+ getOnlineApplicationParameter(session.getPublicOAURLPrefix());
+
+ Principal subject = cert.getSubjectDN();
+
+ String createXMLSignatureRequest =
+ new CreateXMLSignatureRequestBuilder().buildForeignID(subject.toString(), oaParam, session);
+ return createXMLSignatureRequest;
+}
+
+ /**
+ * Processes an <code>&lt;CreateXMLSignatureResponse&gt;</code> sent by the
+ * security layer implementation.<br>
+ * <ul>
+ * <li>Validates given <code>&lt;CreateXMLSignatureResponse&gt;</code></li>
+ * <li>Parses response enclosed in <code>&lt;CreateXMLSignatureResponse&gt;</code></li>
+ * <li>Verifies signature by calling the MOA SP component</li>
+ * <li>Returns the signer certificate</li>
+ * </ul>
+ *
+ * @param sessionID ID of associated authentication session data
+ * @param createXMLSignatureResponseParameters The parameters from the response returned from
+ * the BKU including the <code>&lt;CreateXMLSignatureResponse&gt;</code>
+ */
+ public X509Certificate verifyXMLSignature(String sessionID, Map createXMLSignatureResponseParameters)
+ throws
+ AuthenticationException,
+ BuildException,
+ ParseException,
+ ConfigurationException,
+ ValidateException,
+ ServiceException {
+
+
+ if (isEmpty(sessionID))
+ throw new AuthenticationException("auth.10", new Object[] { REQ_GET_FOREIGN_ID, PARAM_SESSIONID});
+
+
+ String xmlCreateXMLSignatureResponse = (String)createXMLSignatureResponseParameters.get(PARAM_XMLRESPONSE);
+
+
+ if (isEmpty(xmlCreateXMLSignatureResponse))
+ throw new AuthenticationException("auth.10", new Object[] { REQ_GET_FOREIGN_ID, PARAM_XMLRESPONSE});
+
+ AuthenticationSession session = getSession(sessionID);
+ /*if (session.getTimestampIdentityLink() != null)
+ throw new AuthenticationException("auth.01", new Object[] { sessionID });*/
+ //session.setTimestampIdentityLink();
+ AuthConfigurationProvider authConf = AuthConfigurationProvider.getInstance();
+
+
+ // parses the <CreateXMLSignatureResponse>
+ CreateXMLSignatureResponseParser p = new CreateXMLSignatureResponseParser(xmlCreateXMLSignatureResponse);
+ CreateXMLSignatureResponse createXMLSignatureResponse = p.parseResponseDsig();
+
+ // builds a <VerifyXMLSignatureRequest> for a call of MOA-SP
+ Element domVerifyXMLSignatureRequest =
+ new VerifyXMLSignatureRequestBuilder().buildDsig(
+ createXMLSignatureResponse, authConf.getMoaSpAuthBlockTrustProfileID());
+
+ // invokes the call
+ Element domVerifyXMLSignatureResponse =
+ new SignatureVerificationInvoker().verifyXMLSignature(domVerifyXMLSignatureRequest);
+
+ // parses the <VerifyXMLSignatureResponse>
+ VerifyXMLSignatureResponse verifyXMLSignatureResponse =
+ new VerifyXMLSignatureResponseParser(domVerifyXMLSignatureResponse).parseData();
+
+
+ //int code = verifyXMLSignatureResponse.getSignatureCheckCode();
+
+ return verifyXMLSignatureResponse.getX509certificate();
+
+ }
+
+ /**
+ * Processes an <code>&lt;CreateXMLSignatureResponse&gt;</code> sent by the
+ * security layer implementation.<br>
+ * <ul>
+ * <li>Validates given <code>&lt;CreateXMLSignatureResponse&gt;</code></li>
+ * <li>Parses response enclosed in <code>&lt;CreateXMLSignatureResponse&gt;</code></li>
+ * <li>Verifies signature by calling the MOA SP component</li>
+ * <li>Returns the signer certificate</li>
+ * </ul>
+ *
+ * @param sessionID ID of associated authentication session data
+ * @param readInfoboxResponseParameters The parameters from the response returned from
+ * the BKU including the <code>&lt;ReadInfoboxResponse&gt;</code>
+ */
+ public X509Certificate getCertificate(String sessionID, Map readInfoboxResponseParameters)
+ throws
+ AuthenticationException,
+ BuildException,
+ ParseException,
+ ConfigurationException,
+ ValidateException,
+ ServiceException {
+
+
+ if (isEmpty(sessionID))
+ throw new AuthenticationException("auth.10", new Object[] { REQ_VERIFY_CERTIFICATE, PARAM_SESSIONID});
+
+
+ String xmlReadInfoboxResponse = (String)readInfoboxResponseParameters.get(PARAM_XMLRESPONSE);
+
+ if (isEmpty(xmlReadInfoboxResponse))
+ throw new AuthenticationException("auth.10", new Object[] { REQ_VERIFY_CERTIFICATE, PARAM_XMLRESPONSE});
+
+ // parses the <CreateXMLSignatureResponse>
+ InfoboxReadResponseParser p = new InfoboxReadResponseParser(xmlReadInfoboxResponse);
+ X509Certificate cert = p.parseCertificate();
+
+ return cert;
+
+ }
+
+ /**
+ * Builds an authentication block <code>&lt;saml:Assertion&gt;</code> from given session data.
+ * @param session authentication session
+ *
+ * @return <code>&lt;saml:Assertion&gt;</code> as a String
+ *
+ * @throws BuildException If an error occurs on serializing an extended SAML attribute
+ * to be appended to the AUTH-Block.
+ */
+ private String buildAuthenticationBlock(AuthenticationSession session) throws BuildException {
+ IdentityLink identityLink = session.getIdentityLink();
+ String issuer = identityLink.getName();
+ String gebDat = identityLink.getDateOfBirth();
+ String identificationValue = identityLink.getIdentificationValue();
+ String identificationType = identityLink.getIdentificationType();
+
+ String issueInstant = DateTimeUtils.buildDateTime(Calendar.getInstance());
+ session.setIssueInstant(issueInstant);
+ String authURL = session.getAuthURL();
+ String target = session.getTarget();
+ //Bug #485 (https://egovlabs.gv.at/tracker/index.php?func=detail&aid=485&group_id=6&atid=105)
+ //String oaURL = session.getPublicOAURLPrefix();
+ String oaURL = session.getPublicOAURLPrefix().replaceAll("&", "&amp;");
+ List extendedSAMLAttributes = session.getExtendedSAMLAttributesAUTH();
+ String authBlock = new AuthenticationBlockAssertionBuilder().buildAuthBlock(
+ issuer,
+ issueInstant,
+ authURL,
+ target,
+ identificationValue,
+ identificationType,
+ oaURL,
+ gebDat,
+ extendedSAMLAttributes,
+ session);
+
+ return authBlock;
+ }
+
+
+ /**
+ * Verifies the infoboxes (except of the identity link infobox) returned by the BKU by
+ * calling appropriate validator classes.
+ *
+ * @param session The actual authentication session.
+ * @param infoboxReadResponseParams The parameters returned from the BKU as response
+ * to an infobox read request (including the infobox
+ * tokens to be verified).
+ * @param hideStammzahl Indicates whether source pins (<code>Stammzahl</code>en)
+ * should be hidden in any SAML attribute that may be
+ * returned by a validator.
+ *
+ * @throws AuthenticationException If the verification of at least one infobox fails.
+ * @throws ConfigurationException If the OAuthParameter cannot be extracted.
+ */
+ private void verifyInfoboxes(
+ AuthenticationSession session, Map infoboxReadResponseParams, boolean hideStammzahl)
+ throws ValidateException, ConfigurationException
+ {
+
+ AuthConfigurationProvider authConfigurationProvider = AuthConfigurationProvider.getInstance();
+ // get the default VerifyInfobox parameters
+ Map defaultInfoboxParameters = null;
+ VerifyInfoboxParameters defaultVerifyInfoboxParameters =
+ authConfigurationProvider.getDefaultVerifyInfoboxParameters();
+ if (defaultVerifyInfoboxParameters != null) {
+ defaultInfoboxParameters = defaultVerifyInfoboxParameters.getInfoboxParameters();
+ }
+ // get the OA specific VerifyInfobox parameters
+ Map infoboxParameters = null;
+ OAAuthParameter oaParam =
+ authConfigurationProvider.getOnlineApplicationParameter(session.getPublicOAURLPrefix());
+ VerifyInfoboxParameters verifyInfoboxParameters = oaParam.getVerifyInfoboxParameters();
+ session.setExtendedSAMLAttributesAUTH(new Vector()); // Initialize SAML Attributes
+ session.setExtendedSAMLAttributesOA(new Vector());
+
+ if (verifyInfoboxParameters != null) {
+
+ infoboxParameters = verifyInfoboxParameters.getInfoboxParameters();
+ // get the list of infobox identifiers
+ List identifiers = verifyInfoboxParameters.getIdentifiers();
+ if (identifiers != null) {
+ // step through the identifiers and verify the infoboxes
+ Iterator it = identifiers.iterator();
+ while (it.hasNext()) {
+ String identifier = (String)it.next();
+ // get the infobox read response from the map of parameters
+ String infoboxReadResponse = (String)infoboxReadResponseParams.get(identifier);
+ // get the configuration parameters
+ VerifyInfoboxParameter verifyInfoboxParameter = null;
+ Object object = infoboxParameters.get(identifier);
+ // if not present, use default
+ if ((object == null) && (defaultInfoboxParameters != null)) {
+ object = defaultInfoboxParameters.get(identifier);
+ }
+ if (object != null) {
+ verifyInfoboxParameter = (VerifyInfoboxParameter)object;
+ }
+ if (infoboxReadResponse != null) {
+ if (verifyInfoboxParameter == null) {
+ // should not happen because of the pushinfobox mechanism; check it anyway
+ Logger.error("No validator for verifying \"" + identifier + "\"-infobox configured.");
+ throw new ValidateException("validator.41", new Object[] {identifier});
+ } else {
+ String friendlyName = verifyInfoboxParameter.getFriendlyName();
+ boolean isParepRequest = false;
+
+ // parse the infobox read reponse
+ List infoboxTokenList = null;
+ try {
+ infoboxTokenList =
+ ExtendedInfoboxReadResponseParser.parseInfoboxReadResponse(infoboxReadResponse, friendlyName);
+ } catch (ParseException e) {
+ Logger.error("InfoboxReadResponse for \"" + identifier +
+ "\"-infobox could not be parsed successfully: " + e.getMessage());
+ throw new ValidateException("validator.43", new Object[] {friendlyName});
+ }
+ // set compatibility mode for mandates infobox and all infoboxes (it is possible to be a parep infobox)
+ session.setMandateCompatibilityMode(ParepConfiguration.isMandateCompatibilityMode(verifyInfoboxParameter.getApplicationSpecificParams()));
+ // check for party representation in mandates infobox
+ if (Constants.INFOBOXIDENTIFIER_MANDATES.equalsIgnoreCase(identifier) && !((infoboxTokenList == null || infoboxTokenList.size() == 0))){
+ //We need app specific parameters
+ if (null==verifyInfoboxParameter.getApplicationSpecificParams()) {
+ throw new ValidateException("validator.66", new Object[] {friendlyName});
+ }
+ Element mandate = ParepValidator.extractPrimaryToken(infoboxTokenList);
+ //ParepUtils.serializeElement(mandate, System.out);
+ String mandateID = ParepUtils.extractRepresentativeID(mandate);
+ if (!isEmpty(mandateID) &&
+ ("*".equals(mandateID) || mandateID.startsWith(MOAIDAuthConstants.PARTY_REPRESENTATION_OID_NUMBER))) {
+ isParepRequest = true;
+ }
+ if (!isParepRequest) {
+ //if mandates validator is disabled we must throw an error in this case
+ if (!ParepUtils.isValidatorEnabled(verifyInfoboxParameter.getApplicationSpecificParams())) {
+ throw new ValidateException("validator.60", new Object[] {friendlyName});
+ }
+ }
+ }
+
+ // get the class for validating the infobox
+ InfoboxValidator infoboxValidator = null;
+ try {
+ Class validatorClass = null;
+ if (isParepRequest) {
+ // Mandates infobox in party representation mode
+ validatorClass = Class.forName("at.gv.egovernment.moa.id.auth.validator.parep.ParepValidator");
+ } else {
+ validatorClass = Class.forName(verifyInfoboxParameter.getValidatorClassName());
+ }
+ infoboxValidator = (InfoboxValidator) validatorClass.newInstance();
+ } catch (Exception e) {
+ Logger.error("Could not load validator class \"" + verifyInfoboxParameter.getValidatorClassName() +
+ "\" for \"" + identifier + "\"-infobox: " + e.getMessage());
+ throw new ValidateException("validator.42", new Object[] {friendlyName});
+ }
+ Logger.debug("Successfully loaded validator class \"" + verifyInfoboxParameter.getValidatorClassName() +
+ "\" for \"" + identifier + "\"-infobox.");
+ // build the parameters for validating the infobox
+ InfoboxValidatorParams infoboxValidatorParams =
+ InfoboxValidatorParamsBuilder.buildInfoboxValidatorParams(
+ session, verifyInfoboxParameter, infoboxTokenList, oaParam);
+
+ // now validate the infobox
+ InfoboxValidationResult infoboxValidationResult = null;
+ try {
+ infoboxValidationResult = infoboxValidator.validate(infoboxValidatorParams);
+ } catch (ValidateException e) {
+ Logger.error("Error validating " + identifier + " infobox:" + e.getMessage());
+ throw new ValidateException(
+ "validator.44", new Object[] {friendlyName});
+ }
+ if (!infoboxValidationResult.isValid()) {
+ Logger.info("Validation of " + identifier + " infobox failed.");
+ throw new ValidateException(
+ "validator.40", new Object[] {friendlyName, infoboxValidationResult.getErrorMessage()});
+ }
+
+ Logger.info(identifier + " infobox successfully validated.");
+ // store the validator for post processing
+ session.addInfoboxValidator(identifier, friendlyName, infoboxValidator);
+
+ // get the SAML attributes to be appended to the AUTHBlock or to the final
+ // SAML Assertion
+ AddAdditionalSAMLAttributes(session, infoboxValidationResult.getExtendedSamlAttributes(), identifier, friendlyName);
+ }
+ } else {
+ if ((verifyInfoboxParameter !=null) && (verifyInfoboxParameter.isRequired())) {
+ Logger.info("Infobox \"" + identifier + "\" is required, but not returned from the BKU");
+ throw new ValidateException(
+ "validator.48", new Object[] {verifyInfoboxParameter.getFriendlyName()});
+ }
+ Logger.debug("Infobox \"" + identifier + "\" not returned from BKU.");
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Verifies the infoboxes (except of the identity link infobox) returned by the BKU by
+ * calling appropriate validator classes.
+ *
+ * @param session The actual authentication session.
+ * @param mandate The Mandate from the MIS
+ *
+ * @throws AuthenticationException
+ * @throws ConfigurationException
+ * @throws TransformerException
+ * @throws ParserConfigurationException
+ * @throws IOException
+ * @throws SAXException
+ */
+ private void setExtendedSAMLAttributeForMandates(
+ AuthenticationSession session, MISMandate mandate, boolean business)
+ throws ValidateException, ConfigurationException, SAXException, IOException, ParserConfigurationException, TransformerException
+ {
+
+ ExtendedSAMLAttribute[] extendedSamlAttributes = addExtendedSamlAttributes(mandate, business);
+
+
+ AddAdditionalSAMLAttributes(session, extendedSamlAttributes, "MISService", "MISService");
+
+ }
+
+ /**
+ * Intermediate processing of the infoboxes. The first pending infobox
+ * validator may validate the provided input
+ *
+ * @param session The current authentication session
+ * @param parameters The parameters got returned by the user input fields
+ */
+ public static void processInput(AuthenticationSession session, Map parameters) throws ValidateException
+ {
+
+ // post processing of the infoboxes
+ Iterator iter = session.getInfoboxValidatorIterator();
+ if (iter != null) {
+ while (iter.hasNext()) {
+ Vector infoboxValidatorVector = (Vector) iter.next();
+ InfoboxValidator infoboxvalidator = (InfoboxValidator) infoboxValidatorVector.get(2);
+ if (!ParepUtils.isEmpty(infoboxvalidator.getForm())) {
+ String identifier = (String) infoboxValidatorVector.get(0);
+ String friendlyName = (String) infoboxValidatorVector.get(1);
+ InfoboxValidationResult infoboxValidationResult = null;
+ try {
+ infoboxValidationResult = infoboxvalidator.validate(parameters);
+ } catch (ValidateException e) {
+ Logger.error("Error validating " + identifier + " infobox:" + e.getMessage());
+ throw new ValidateException(
+ "validator.44", new Object[] {friendlyName});
+ }
+ if (!infoboxValidationResult.isValid()) {
+ Logger.info("Validation of " + identifier + " infobox failed.");
+ throw new ValidateException(
+ "validator.40", new Object[] {friendlyName, infoboxValidationResult.getErrorMessage()});
+ }
+ AddAdditionalSAMLAttributes(session, infoboxValidationResult.getExtendedSamlAttributes(), identifier, friendlyName);
+ }
+ }
+ }
+ }
+
+ /**
+ * Adds given SAML Attributes to the current session. They will be appended
+ * to the final SAML Assertion or the AUTH block. If the attributes are
+ * already in the list, they will be replaced.
+ *
+ * @param session The current session
+ * @param extendedSAMLAttributes The SAML attributes to add
+ * @param identifier The infobox identifier for debug purposes
+ * @param friendlyNam The friendly name of the infobox for debug purposes
+ */
+ private static void AddAdditionalSAMLAttributes(AuthenticationSession session, ExtendedSAMLAttribute[] extendedSAMLAttributes,
+ String identifier, String friendlyName) throws ValidateException
+ {
+ if (extendedSAMLAttributes == null) return;
+ List oaAttributes = session.getExtendedSAMLAttributesOA();
+ if (oaAttributes==null) oaAttributes = new Vector();
+ List authAttributes = session.getExtendedSAMLAttributesAUTH();
+ if (authAttributes==null) authAttributes = new Vector();
+ int length = extendedSAMLAttributes.length;
+ for (int i=0; i<length; i++) {
+ ExtendedSAMLAttribute samlAttribute = extendedSAMLAttributes[i];
+
+ Object value = verifySAMLAttribute(samlAttribute, i, identifier, friendlyName);
+
+ if ((value instanceof String) || (value instanceof Element)) {
+ switch (samlAttribute.getAddToAUTHBlock()) {
+ case ExtendedSAMLAttribute.ADD_TO_AUTHBLOCK_ONLY:
+ replaceExtendedSAMLAttribute(authAttributes, samlAttribute);
+ break;
+ case ExtendedSAMLAttribute.ADD_TO_AUTHBLOCK:
+ replaceExtendedSAMLAttribute(authAttributes, samlAttribute);
+ replaceExtendedSAMLAttribute(oaAttributes, samlAttribute);
+ break;
+ case ExtendedSAMLAttribute.NOT_ADD_TO_AUTHBLOCK:
+ replaceExtendedSAMLAttribute(oaAttributes, samlAttribute);
+ break;
+ default:
+ Logger.info("Invalid return value from method \"getAddToAUTHBlock()\" ("
+ + samlAttribute.getAddToAUTHBlock() + ") in SAML attribute number "
+ + (i+1) + " for infobox " + identifier);
+ throw new ValidateException(
+ "validator.47", new Object[] {friendlyName, String.valueOf((i+1))});
+ }
+ } else {
+ Logger.info("The type of SAML-Attribute number " + (i+1) + " returned from " +
+ identifier + "-infobox validator is not valid. Must be either \"java.Lang.String\"" +
+ " or \"org.w3c.dom.Element\"");
+ throw new ValidateException(
+ "validator.46", new Object[] {identifier, String.valueOf((i+1))});
+ }
+ }
+ session.setExtendedSAMLAttributesAUTH(authAttributes);
+ session.setExtendedSAMLAttributesOA(oaAttributes);
+ }
+
+// /**
+// * Adds given SAML Attributes to the current session. They will be appended
+// * to the final SAML Assertion or the AUTH block. If the attributes are
+// * already in the list, they will be replaced.
+// *
+// * @param session The current session
+// * @param extendedSAMLAttributes The SAML attributes to add
+// * @param identifier The infobox identifier for debug purposes
+// * @param friendlyNam The friendly name of the infobox for debug purposes
+// */
+// private static void AddAdditionalSAMLAttributes(AuthenticationSession session, MISMandate mandate) throws ValidateException
+// {
+//
+// List oaAttributes = session.getExtendedSAMLAttributesOA();
+// if (oaAttributes==null) oaAttributes = new Vector();
+// List authAttributes = session.getExtendedSAMLAttributesAUTH();
+// if (authAttributes==null) authAttributes = new Vector();
+//
+//
+// addExtendedSamlAttributes(authAttributes, mandate);
+//
+// session.setExtendedSAMLAttributesAUTH(authAttributes);
+// session.setExtendedSAMLAttributesOA(oaAttributes);
+// }
+
+ /**
+ * Adds the AUTH block related SAML attributes to the validation result.
+ * This is needed always before the AUTH block is to be signed, because the
+ * name of the mandator has to be set
+ * @throws ParserConfigurationException
+ * @throws IOException
+ * @throws SAXException
+ * @throws TransformerException
+ */
+ private static ExtendedSAMLAttribute[] addExtendedSamlAttributes(MISMandate mandate, boolean business) throws SAXException, IOException, ParserConfigurationException, TransformerException {
+
+ Vector extendedSamlAttributes = new Vector();
+
+ extendedSamlAttributes.clear();
+
+ //extendedSamlAttributes.add(new ExtendedSAMLAttributeImpl(ParepValidator.EXT_SAML_MANDATE_RAW, mandate, SZRGWConstants.MANDATE_NS, ExtendedSAMLAttribute.NOT_ADD_TO_AUTHBLOCK));
+ // RepresentationType
+ extendedSamlAttributes.add(new ExtendedSAMLAttributeImpl(ParepValidator.EXT_SAML_MANDATE_REPRESENTATIONTYPE, ParepValidator.EXT_SAML_MANDATE_REPRESENTATIONTEXT, SZRGWConstants.MANDATE_NS, ExtendedSAMLAttribute.ADD_TO_AUTHBLOCK_ONLY));
+
+ // Name
+ Element domMandate = mandateToElement(mandate);
+ Element nameSpaceNode = domMandate.getOwnerDocument().createElement("NameSpaceNode");
+ nameSpaceNode.setAttribute("xmlns" + SZRGWConstants.PD_POSTFIX, Constants.PD_NS_URI);
+ nameSpaceNode.setAttribute("xmlns" + SZRGWConstants.MANDATE_POSTFIX, SZRGWConstants.MANDATE_NS);
+
+ Element mandator = (Element) XPathAPI.selectSingleNode(domMandate, "//md:Mandate/md:Mandator", nameSpaceNode);
+
+ // first check if physical person
+ Element name = (Element) XPathAPI.selectSingleNode(mandator, "descendant-or-self::pr:Name/pr:GivenName", nameSpaceNode);
+ String mandatorname = ParepUtils.extractMandatorName(mandator);
+
+ extendedSamlAttributes.add(new ExtendedSAMLAttributeImpl(ParepValidator.EXT_SAML_MANDATE_NAME, mandatorname, SZRGWConstants.MANDATE_NS, ExtendedSAMLAttribute.ADD_TO_AUTHBLOCK_ONLY));
+ // Geburtsdatum
+ String dob = ParepUtils.extractMandatorDateOfBirth(mandator);
+ if (dob != null && !"".equals(dob)) {
+ extendedSamlAttributes.add(new ExtendedSAMLAttributeImpl(ParepValidator.EXT_SAML_MANDATE_DOB, dob, SZRGWConstants.MANDATE_NS, ExtendedSAMLAttribute.ADD_TO_AUTHBLOCK_ONLY));
+
+ }
+
+ // Mandate
+ extendedSamlAttributes.add(new ExtendedSAMLAttributeImpl(ParepValidator.EXT_SAML_MANDATE_RAW, domMandate, SZRGWConstants.MANDATE_NS, ExtendedSAMLAttribute.NOT_ADD_TO_AUTHBLOCK));
+
+ // (w)bpk
+ String wbpk = ParepUtils.extractMandatorWbpk(mandator);
+ if (!ParepUtils.isEmpty(wbpk)) {
+ if (!ParepUtils.isPhysicalPerson(mandator)){
+ String idType = ParepUtils.extractMandatorIdentificationType(mandator);
+ if (!ParepUtils.isEmpty(idType) && idType.startsWith(Constants.URN_PREFIX_BASEID)) {
+ extendedSamlAttributes.add(new ExtendedSAMLAttributeImpl(ParepValidator.EXT_SAML_MANDATE_CB_BASE_ID, ParepUtils.getRegisterString(idType) + ": " + wbpk, SZRGWConstants.MANDATE_NS, ExtendedSAMLAttribute.ADD_TO_AUTHBLOCK_ONLY));
+ }
+ } else
+ if (business) {
+ extendedSamlAttributes.add(new ExtendedSAMLAttributeImpl(ParepValidator.EXT_SAML_MANDATE_WBPK, wbpk, SZRGWConstants.MANDATE_NS, ExtendedSAMLAttribute.ADD_TO_AUTHBLOCK_ONLY));
+ }
+ }
+
+ String oid = mandate.getProfRep();
+ if (oid != null) {
+ String oidDescription = mandate.getTextualDescriptionOfOID();
+ extendedSamlAttributes.add(new ExtendedSAMLAttributeImpl(ParepValidator.EXT_SAML_MANDATE_OIDTEXTUALDESCRIPTION, oidDescription, SZRGWConstants.MANDATE_NS, ExtendedSAMLAttribute.ADD_TO_AUTHBLOCK_ONLY));
+ }
+
+ ExtendedSAMLAttribute[] ret = new ExtendedSAMLAttribute[extendedSamlAttributes.size()];
+ extendedSamlAttributes.copyInto(ret);
+ Logger.debug("ExtendedSAML Attributes: " + ret.length);
+ return ret;
+
+
+
+ }
+
+ /**
+ *
+ * @param mandate
+ * @return
+ * @throws ParserConfigurationException
+ * @throws IOException
+ * @throws SAXException
+ */
+ private static Element mandateToElement(MISMandate mandate) throws SAXException, IOException, ParserConfigurationException {
+ ByteArrayInputStream bais = new ByteArrayInputStream(mandate.getMandate());
+ Document doc = DOMUtils.parseDocumentSimple(bais);
+ return doc.getDocumentElement();
+ }
+ private static void replaceExtendedSAMLAttribute(List attributes, ExtendedSAMLAttribute samlAttribute) {
+ if (null==attributes) {
+ attributes = new Vector();
+ } else {
+ String id = samlAttribute.getName();
+ int length = attributes.size();
+ for (int i=0; i<length; i++) {
+ ExtendedSAMLAttribute att = (ExtendedSAMLAttribute) attributes.get(i);
+ if (id.equals(att.getName())) {
+ // replace attribute
+ attributes.set(i, samlAttribute);
+ return;
+ }
+ }
+ attributes.add(samlAttribute);
+ }
+ }
+
+
+
+ /**
+ * Processes a <code>&lt;CreateXMLSignatureResponse&gt;</code> sent by the
+ * security layer implementation.<br>
+ * <ul>
+ * <li>Validates given <code>&lt;CreateXMLSignatureResponse&gt;</code></li>
+ * <li>Parses <code>&lt;CreateXMLSignatureResponse&gt;</code> for error codes</li>
+ * <li>Parses authentication block enclosed in
+ * <code>&lt;CreateXMLSignatureResponse&gt;</code></li>
+ * <li>Verifies authentication block by calling the MOA SP component</li>
+ * <li>Creates authentication data</li>
+ * <li>Creates a corresponding SAML artifact</li>
+ * <li>Stores authentication data in the authentication data store
+ * indexed by the SAML artifact</li>
+ * <li>Deletes authentication session</li>
+ * <li>Returns the SAML artifact, encoded BASE64</li>
+ * </ul>
+ *
+ * @param sessionID session ID of the running authentication session
+ * @param xmlCreateXMLSignatureReadResponse String representation of the
+ * <code>&lt;CreateXMLSignatureResponse&gt;</code>
+ * @return SAML artifact needed for retrieving authentication data, encoded BASE64
+ */
+ public String verifyAuthenticationBlock(
+ String sessionID,
+ String xmlCreateXMLSignatureReadResponse)
+ throws
+ AuthenticationException,
+ BuildException,
+ ParseException,
+ ConfigurationException,
+ ServiceException,
+ ValidateException {
+
+ if (isEmpty(sessionID))
+ throw new AuthenticationException("auth.10", new Object[] { REQ_VERIFY_AUTH_BLOCK, PARAM_SESSIONID});
+ if (isEmpty(xmlCreateXMLSignatureReadResponse))
+ throw new AuthenticationException("auth.10", new Object[] { REQ_VERIFY_AUTH_BLOCK, PARAM_XMLRESPONSE});
+ AuthenticationSession session = getSession(sessionID);
+ AuthConfigurationProvider authConf = AuthConfigurationProvider.getInstance();
+ // parses <CreateXMLSignatureResponse>
+ CreateXMLSignatureResponse csresp =
+ new CreateXMLSignatureResponseParser(xmlCreateXMLSignatureReadResponse).parseResponse();
+ try {
+ String serializedAssertion = DOMUtils.serializeNode(csresp.getSamlAssertion());
+ session.setAuthBlock(serializedAssertion);
+ } catch (TransformerException e) {
+ throw new ParseException("parser.04", new Object[] { REQ_VERIFY_AUTH_BLOCK, PARAM_XMLRESPONSE});
+ } catch (IOException e) {
+ throw new ParseException("parser.04", new Object[] { REQ_VERIFY_AUTH_BLOCK, PARAM_XMLRESPONSE});
+ }
+ // validates <CreateXMLSignatureResponse>
+ new CreateXMLSignatureResponseValidator().validate(csresp, session);
+ // builds a <VerifyXMLSignatureRequest> for a MOA-SPSS call
+ String[] vtids = authConf.getMoaSpAuthBlockVerifyTransformsInfoIDs();
+ String tpid = authConf.getMoaSpAuthBlockTrustProfileID();
+ Element domVsreq = new VerifyXMLSignatureRequestBuilder().build(csresp, vtids, tpid);
+ // debug output
+
+ // invokes the call
+ Element domVsresp = new SignatureVerificationInvoker().verifyXMLSignature(domVsreq);
+ // debug output
+
+ // parses the <VerifyXMLSignatureResponse>
+ VerifyXMLSignatureResponse vsresp = new VerifyXMLSignatureResponseParser(domVsresp).parseData();
+
+ if (Logger.isTraceEnabled()) {
+ if (domVsresp!=null) {
+ try {
+ String xmlVerifyXMLSignatureResponse = DOMUtils.serializeNode(domVsresp, true);
+ Logger.trace(new LogMsg(xmlCreateXMLSignatureReadResponse));
+ Logger.trace(new LogMsg(xmlVerifyXMLSignatureResponse));
+ } catch (Throwable t) {
+ t.printStackTrace();
+ Logger.info(new LogMsg(t.getStackTrace()));
+ }
+ }
+ }
+
+ // validates the <VerifyXMLSignatureResponse>
+ VerifyXMLSignatureResponseValidator.getInstance().validate(
+ vsresp,
+ null,
+ VerifyXMLSignatureResponseValidator.CHECK_AUTH_BLOCK,
+ false);
+
+
+ // TODO See Bug #144
+ // Compare AuthBlock Data with information stored in session, especially date and time
+
+
+ // compares the public keys from the identityLink with the AuthBlock
+ VerifyXMLSignatureResponseValidator.getInstance().validateCertificate(
+ vsresp,
+ session.getIdentityLink());
+
+ // post processing of the infoboxes
+ Iterator iter = session.getInfoboxValidatorIterator();
+ boolean formpending = false;
+ if (iter != null) {
+ while (!formpending && iter.hasNext()) {
+ Vector infoboxValidatorVector = (Vector) iter.next();
+ String identifier = (String) infoboxValidatorVector.get(0);
+ String friendlyName = (String) infoboxValidatorVector.get(1);
+ InfoboxValidator infoboxvalidator = (InfoboxValidator) infoboxValidatorVector.get(2);
+ InfoboxValidationResult infoboxValidationResult = null;
+ try {
+ infoboxValidationResult = infoboxvalidator.validate(csresp.getSamlAssertion());
+ } catch (ValidateException e) {
+ Logger.error("Error validating " + identifier + " infobox:" + e.getMessage());
+ throw new ValidateException(
+ "validator.44", new Object[] {friendlyName});
+ }
+ if (!infoboxValidationResult.isValid()) {
+ Logger.info("Validation of " + identifier + " infobox failed.");
+ throw new ValidateException(
+ "validator.40", new Object[] {friendlyName, infoboxValidationResult.getErrorMessage()});
+ }
+ String form = infoboxvalidator.getForm();
+ if (ParepUtils.isEmpty(form)) {
+ AddAdditionalSAMLAttributes(session, infoboxValidationResult.getExtendedSamlAttributes(), identifier, friendlyName);
+ } else {
+ return "Redirect to Input Processor";
+ }
+ }
+ }
+
+ // Exchange person data information by a mandate if needed
+ List oaAttributes = session.getExtendedSAMLAttributesOA();
+ IdentityLink replacementIdentityLink = null;
+ if (session.isMandateCompatibilityMode() && oaAttributes != null && oaAttributes.size()>0) {
+ // look if we have a mandate
+ boolean foundMandate = false;
+ Iterator it = oaAttributes.iterator();
+ while (!foundMandate && it.hasNext()) {
+ ExtendedSAMLAttribute samlAttribute = (ExtendedSAMLAttribute)it.next();
+ if (ParepValidator.EXT_SAML_MANDATE_RAW.equals(samlAttribute.getName())) {
+ Object value = samlAttribute.getValue();
+ if (value instanceof Element) {
+ Element mandate = (Element) value;
+ replacementIdentityLink = new IdentityLink();
+ Element mandator = ParepUtils.extractMandator(mandate);
+ String dateOfBirth = "";
+ Element prPerson = null;
+ String familyName = "";
+ String givenName = "";
+ String identificationType = "";
+ String identificationValue = "";
+ if (mandator != null) {
+ boolean physical = ParepUtils.isPhysicalPerson(mandator);
+ if (physical) {
+ familyName = ParepUtils.extractText(mandator, "descendant-or-self::pr:Name/pr:FamilyName/text()");
+ givenName = ParepUtils.extractText(mandator, "descendant-or-self::pr:Name/pr:GivenName/text()");
+ dateOfBirth = ParepUtils.extractMandatorDateOfBirth(mandator);
+ } else {
+ familyName = ParepUtils.extractMandatorFullName(mandator);
+ }
+ identificationType = ParepUtils.getIdentification(mandator, "Type");
+ identificationValue = ParepUtils.extractMandatorWbpk(mandator);
+ prPerson = ParepUtils.extractPrPersonOfMandate(mandate);
+ if (physical && session.getBusinessService() && identificationType!=null && Constants.URN_PREFIX_BASEID.equals(identificationType)) {
+ // now we calculate the wbPK and do so if we got it from the BKU
+ identificationType = Constants.URN_PREFIX_WBPK + "+" + session.getDomainIdentifier();
+ identificationValue = new BPKBuilder().buildWBPK(identificationValue, session.getDomainIdentifier());
+ ParepUtils.HideStammZahlen(prPerson, true, null, null, true);
+ }
+
+ }
+ replacementIdentityLink.setDateOfBirth(dateOfBirth);
+ replacementIdentityLink.setFamilyName(familyName);
+ replacementIdentityLink.setGivenName(givenName);
+ replacementIdentityLink.setIdentificationType(identificationType);
+ replacementIdentityLink.setIdentificationValue(identificationValue);
+ replacementIdentityLink.setPrPerson(prPerson);
+ try {
+ replacementIdentityLink.setSamlAssertion(session.getIdentityLink().getSamlAssertion());
+ } catch (Exception e) {
+ throw new ValidateException("validator.64", null);
+ }
+ } else {
+ Logger.info("The type of Mandate SAML-Attribute is not \"org.w3c.dom.Element\"");
+ throw new ValidateException("validator.64", null);
+ }
+ }
+ }
+ }
+
+ // builds authentication data and stores it together with a SAML artifact
+ AuthenticationData authData = buildAuthenticationData(session, vsresp, replacementIdentityLink);
+ String samlArtifact =
+ new SAMLArtifactBuilder().build(session.getAuthURL(), session.getSessionID());
+ storeAuthenticationData(samlArtifact, authData);
+
+ // invalidates the authentication session
+ sessionStore.remove(sessionID);
+ Logger.info(
+ "Anmeldedaten zu MOASession " + sessionID + " angelegt, SAML Artifakt " + samlArtifact);
+ return samlArtifact;
+ }
+
+ /**
+ * Gets the foreign authentication data.<br>
+ * <ul>
+ * <li>Creates authentication data</li>
+ * <li>Creates a corresponding SAML artifact</li>
+ * <li>Stores authentication data in the authentication data store
+ * indexed by the SAML artifact</li>
+ * <li>Deletes authentication session</li>
+ * <li>Returns the SAML artifact, encoded BASE64</li>
+ * </ul>
+ *
+ * @param sessionID session ID of the running authentication session
+ * @return SAML artifact needed for retrieving authentication data, encoded BASE64
+ */
+ public String getForeignAuthenticationData(
+ String sessionID)
+ throws
+ AuthenticationException,
+ BuildException,
+ ParseException,
+ ConfigurationException,
+ ServiceException,
+ ValidateException {
+
+ if (isEmpty(sessionID))
+ throw new AuthenticationException("auth.10", new Object[] { REQ_VERIFY_AUTH_BLOCK, PARAM_SESSIONID});
+
+ AuthenticationSession session = getSession(sessionID);
+ //AuthConfigurationProvider authConf = AuthConfigurationProvider.getInstance();
+ try {
+ String serializedAssertion = DOMUtils.serializeNode(session.getIdentityLink().getSamlAssertion());
+ session.setAuthBlock(serializedAssertion);
+ } catch (TransformerException e) {
+ throw new ParseException("parser.04", new Object[] { REQ_VERIFY_AUTH_BLOCK, PARAM_XMLRESPONSE});
+ } catch (IOException e) {
+ throw new ParseException("parser.04", new Object[] { REQ_VERIFY_AUTH_BLOCK, PARAM_XMLRESPONSE});
+ }
+ // post processing of the infoboxes
+ Iterator iter = session.getInfoboxValidatorIterator();
+ boolean formpending = false;
+ if (iter != null) {
+ while (!formpending && iter.hasNext()) {
+ Vector infoboxValidatorVector = (Vector) iter.next();
+ String identifier = (String) infoboxValidatorVector.get(0);
+ String friendlyName = (String) infoboxValidatorVector.get(1);
+ InfoboxValidator infoboxvalidator = (InfoboxValidator) infoboxValidatorVector.get(2);
+ InfoboxValidationResult infoboxValidationResult = null;
+ try {
+ infoboxValidationResult = infoboxvalidator.validate(session.getIdentityLink().getSamlAssertion());
+ } catch (ValidateException e) {
+ Logger.error("Error validating " + identifier + " infobox:" + e.getMessage());
+ throw new ValidateException(
+ "validator.44", new Object[] {friendlyName});
+ }
+ if (!infoboxValidationResult.isValid()) {
+ Logger.info("Validation of " + identifier + " infobox failed.");
+ throw new ValidateException(
+ "validator.40", new Object[] {friendlyName, infoboxValidationResult.getErrorMessage()});
+ }
+ String form = infoboxvalidator.getForm();
+ if (ParepUtils.isEmpty(form)) {
+ AddAdditionalSAMLAttributes(session, infoboxValidationResult.getExtendedSamlAttributes(), identifier, friendlyName);
+ } else {
+ return "Redirect to Input Processor";
+ }
+ }
+ }
+
+ // Exchange person data information by a mandate if needed
+ List oaAttributes = session.getExtendedSAMLAttributesOA();
+ IdentityLink replacementIdentityLink = null;
+ if (session.isMandateCompatibilityMode() && oaAttributes != null && oaAttributes.size()>0) {
+ // look if we have a mandate
+ boolean foundMandate = false;
+ Iterator it = oaAttributes.iterator();
+ while (!foundMandate && it.hasNext()) {
+ ExtendedSAMLAttribute samlAttribute = (ExtendedSAMLAttribute)it.next();
+ if (ParepValidator.EXT_SAML_MANDATE_RAW.equals(samlAttribute.getName())) {
+ Object value = samlAttribute.getValue();
+ if (value instanceof Element) {
+ Element mandate = (Element) value;
+ replacementIdentityLink = new IdentityLink();
+ Element mandator = ParepUtils.extractMandator(mandate);
+ String dateOfBirth = "";
+ Element prPerson = null;
+ String familyName = "";
+ String givenName = "";
+ String identificationType = "";
+ String identificationValue = "";
+ if (mandator != null) {
+ boolean physical = ParepUtils.isPhysicalPerson(mandator);
+ if (physical) {
+ familyName = ParepUtils.extractText(mandator, "descendant-or-self::pr:Name/pr:FamilyName/text()");
+ givenName = ParepUtils.extractText(mandator, "descendant-or-self::pr:Name/pr:GivenName/text()");
+ dateOfBirth = ParepUtils.extractMandatorDateOfBirth(mandator);
+ } else {
+ familyName = ParepUtils.extractMandatorFullName(mandator);
+ }
+ identificationType = ParepUtils.getIdentification(mandator, "Type");
+ identificationValue = ParepUtils.extractMandatorWbpk(mandator);
+ prPerson = ParepUtils.extractPrPersonOfMandate(mandate);
+ if (physical && session.getBusinessService() && identificationType!=null && Constants.URN_PREFIX_BASEID.equals(identificationType)) {
+ // now we calculate the wbPK and do so if we got it from the BKU
+ identificationType = Constants.URN_PREFIX_WBPK + "+" + session.getDomainIdentifier();
+ identificationValue = new BPKBuilder().buildWBPK(identificationValue, session.getDomainIdentifier());
+ ParepUtils.HideStammZahlen(prPerson, true, null, null, true);
+ }
+
+ }
+ replacementIdentityLink.setDateOfBirth(dateOfBirth);
+ replacementIdentityLink.setFamilyName(familyName);
+ replacementIdentityLink.setGivenName(givenName);
+ replacementIdentityLink.setIdentificationType(identificationType);
+ replacementIdentityLink.setIdentificationValue(identificationValue);
+ replacementIdentityLink.setPrPerson(prPerson);
+ try {
+ replacementIdentityLink.setSamlAssertion(session.getIdentityLink().getSamlAssertion());
+ } catch (Exception e) {
+ throw new ValidateException("validator.64", null);
+ }
+ } else {
+ Logger.info("The type of Mandate SAML-Attribute is not \"org.w3c.dom.Element\"");
+ throw new ValidateException("validator.64", null);
+ }
+ }
+ }
+ }
+
+ VerifyXMLSignatureResponse vsresp = new VerifyXMLSignatureResponse();
+ X509Certificate cert = session.getForeignSignerCertificate();
+ vsresp.setX509certificate(cert);
+ AuthenticationData authData = buildAuthenticationData(session, vsresp, replacementIdentityLink);
+ String samlArtifact =
+ new SAMLArtifactBuilder().build(session.getAuthURL(), session.getSessionID());
+ storeAuthenticationData(samlArtifact, authData);
+
+ // invalidates the authentication session
+ sessionStore.remove(sessionID);
+ Logger.info(
+ "Anmeldedaten zu MOASession " + sessionID + " angelegt, SAML Artifakt " + samlArtifact);
+ return samlArtifact;
+ }
+
+ /**
+ * Builds the AuthenticationData object together with the
+ * corresponding <code>&lt;saml:Assertion&gt;</code>
+ * @param session authentication session
+ * @param verifyXMLSigResp VerifyXMLSignatureResponse from MOA-SP
+ * @return AuthenticationData object
+ * @throws ConfigurationException while accessing configuration data
+ * @throws BuildException while building the <code>&lt;saml:Assertion&gt;</code>
+ */
+ private AuthenticationData buildAuthenticationData(
+ AuthenticationSession session,
+ VerifyXMLSignatureResponse verifyXMLSigResp,
+ IdentityLink replacementIdentityLink)
+ throws ConfigurationException, BuildException {
+
+ IdentityLink identityLink;
+ if (replacementIdentityLink == null) {
+ identityLink = session.getIdentityLink();
+ } else {
+ // We have got data form a mandate we need now to use to stay compatible with applications
+ identityLink = replacementIdentityLink;
+ }
+
+ AuthenticationData authData = new AuthenticationData();
+ OAAuthParameter oaParam =
+ AuthConfigurationProvider.getInstance().getOnlineApplicationParameter(
+ session.getPublicOAURLPrefix());
+ boolean businessService = oaParam.getBusinessService();
+ authData.setMajorVersion(1);
+ authData.setMinorVersion(0);
+ authData.setAssertionID(Random.nextRandom());
+ authData.setIssuer(session.getAuthURL());
+ authData.setIssueInstant(DateTimeUtils.buildDateTime(Calendar.getInstance()));
+ authData.setIdentificationType(identityLink.getIdentificationType());
+ authData.setGivenName(identityLink.getGivenName());
+ authData.setFamilyName(identityLink.getFamilyName());
+ authData.setDateOfBirth(identityLink.getDateOfBirth());
+ authData.setQualifiedCertificate(verifyXMLSigResp.isQualifiedCertificate());
+ authData.setPublicAuthority(verifyXMLSigResp.isPublicAuthority());
+ authData.setPublicAuthorityCode(verifyXMLSigResp.getPublicAuthorityCode());
+ authData.setBkuURL(session.getBkuURL());
+ boolean provideStammzahl = oaParam.getProvideStammzahl();
+ if (provideStammzahl) {
+ authData.setIdentificationValue(identityLink.getIdentificationValue());
+ }
+ String prPerson = new PersonDataBuilder().build(identityLink, provideStammzahl);
+ try {
+ String signerCertificateBase64 = "";
+ if (oaParam.getProvideCertifcate()) {
+ X509Certificate signerCertificate = verifyXMLSigResp.getX509certificate();
+ if (signerCertificate != null) {
+ signerCertificateBase64 = Base64Utils.encode(signerCertificate.getEncoded());
+ } else {
+ Logger.info("\"provideCertificate\" is \"true\", but no signer certificate available");
+ }
+ }
+ authData.setSignerCertificate(signerCertificateBase64);
+ if (businessService) {
+ authData.setWBPK(identityLink.getIdentificationValue());
+ } else {
+ authData.setBPK(identityLink.getIdentificationValue());
+
+ //BZ.., calculation of bPK already before sending AUTHBlock
+ /*
+ if (identityLink.getIdentificationType().equals(Constants.URN_PREFIX_BASEID)) {
+ // only compute bPK if online application is a public service and we have the Stammzahl
+ String bpkBase64 = new BPKBuilder().buildBPK(
+ identityLink.getIdentificationValue(),
+ session.getTarget());
+ authData.setBPK(bpkBase64);
+ }*/
+
+ }
+ String ilAssertion =
+ oaParam.getProvideIdentityLink()
+ ? identityLink.getSerializedSamlAssertion()
+ : "";
+ if (!oaParam.getProvideStammzahl()) {
+ ilAssertion = StringUtils.replaceAll(ilAssertion, identityLink.getIdentificationValue(), "");
+ }
+ String authBlock = oaParam.getProvideAuthBlock() ? session.getAuthBlock() : "";
+ String samlAssertion =
+ new AuthenticationDataAssertionBuilder().build(
+ authData,
+ prPerson,
+ authBlock,
+ ilAssertion,
+ session.getBkuURL(),
+ signerCertificateBase64,
+ businessService,
+ session.getExtendedSAMLAttributesOA());
+ authData.setSamlAssertion(samlAssertion);
+
+ String assertionFile = AuthConfigurationProvider.getInstance().getGenericConfigurationParameter("AuthenticationServer.WriteAssertionToFile");
+ if (!ParepUtils.isEmpty(assertionFile)) ParepUtils.saveStringToFile(samlAssertion, new File(assertionFile)); //Ex: "c:/saml_assertion.xml"
+
+ return authData;
+ } catch (Throwable ex) {
+ throw new BuildException(
+ "builder.00",
+ new Object[] { "AuthenticationData", ex.toString()},
+ ex);
+ }
+ }
+ /**
+ * Retrieves <code>AuthenticationData</code> indexed by the SAML artifact.
+ * The <code>AuthenticationData</code> is deleted from the store upon end of this call.
+ *
+ * @return <code>AuthenticationData</code>
+ */
+ public AuthenticationData getAuthenticationData(String samlArtifact)
+ throws AuthenticationException {
+ String assertionHandle;
+ try {
+ assertionHandle = new SAMLArtifactParser(samlArtifact).parseAssertionHandle();
+ } catch (ParseException ex) {
+ throw new AuthenticationException("1205", new Object[] { samlArtifact, ex.toString()});
+ }
+ AuthenticationData authData = null;
+ synchronized (authenticationDataStore) {
+ authData = (AuthenticationData) authenticationDataStore.get(assertionHandle);
+ if (authData == null) {
+ Logger.error("Assertion not found for SAML Artifact: " + samlArtifact);
+ throw new AuthenticationException("1206", new Object[] { samlArtifact });
+ }
+ boolean keepAssertion = false;
+ try {
+ String boolStr = AuthConfigurationProvider.getInstance().getGenericConfigurationParameter("AuthenticationServer.KeepAssertion");
+ if (null!=boolStr && boolStr.equalsIgnoreCase("true")) keepAssertion = true;//Only allowed for debug purposes!!!
+ } catch (ConfigurationException ex) {
+ throw new AuthenticationException("1205", new Object[] { samlArtifact, ex.toString()});
+ }
+ if (!keepAssertion) {
+ authenticationDataStore.remove(assertionHandle);
+ }
+ }
+ long now = new Date().getTime();
+ if (now - authData.getTimestamp().getTime() > authDataTimeOut)
+ throw new AuthenticationException("1207", new Object[] { samlArtifact });
+ Logger.debug("Assertion delivered for SAML Artifact: " + samlArtifact);
+ return authData;
+ }
+ /**
+ * Stores authentication data indexed by the assertion handle contained in the
+ * given saml artifact.
+ * @param samlArtifact SAML artifact
+ * @param authData authentication data
+ * @throws AuthenticationException when SAML artifact is invalid
+ */
+ private void storeAuthenticationData(String samlArtifact, AuthenticationData authData)
+ throws AuthenticationException {
+
+ try {
+ SAMLArtifactParser parser = new SAMLArtifactParser(samlArtifact);
+ // check type code 0x0001
+ byte[] typeCode = parser.parseTypeCode();
+ if (typeCode[0] != 0 || typeCode[1] != 1)
+ throw new AuthenticationException("auth.06", new Object[] { samlArtifact });
+ String assertionHandle = parser.parseAssertionHandle();
+ synchronized (authenticationDataStore) {
+ Logger.debug("Assertion stored for SAML Artifact: " + samlArtifact);
+ authenticationDataStore.put(assertionHandle, authData);
+ }
+ } catch (AuthenticationException ex) {
+ throw ex;
+ } catch (Throwable ex) {
+ throw new AuthenticationException("auth.06", new Object[] { samlArtifact });
+ }
+ }
+ /**
+ * Creates a new session and puts it into the session store.
+ *
+ * @param id Session ID
+ * @return AuthenticationSession created
+ * @exception AuthenticationException
+ * thrown when an <code>AuthenticationSession</code> is running
+ * already for the given session ID
+ */
+ private static AuthenticationSession newSession() throws AuthenticationException {
+ String sessionID = Random.nextRandom();
+ AuthenticationSession newSession = new AuthenticationSession(sessionID);
+ synchronized (sessionStore) {
+ AuthenticationSession session = (AuthenticationSession) sessionStore.get(sessionID);
+ if (session != null)
+ throw new AuthenticationException("auth.01", new Object[] { sessionID });
+ sessionStore.put(sessionID, newSession);
+ }
+ return newSession;
+ }
+ /**
+ * Retrieves a session from the session store.
+ *
+ * @param id session ID
+ * @return <code>AuthenticationSession</code> stored with given session ID,
+ * <code>null</code> if session ID unknown
+ */
+ public static AuthenticationSession getSession(String id) throws AuthenticationException {
+ AuthenticationSession session = (AuthenticationSession) sessionStore.get(id);
+ if (session == null)
+ throw new AuthenticationException("auth.02", new Object[] { id });
+ return session;
+ }
+ /**
+ * Cleans up expired session and authentication data stores.
+ */
+ public void cleanup() {
+ long now = new Date().getTime();
+ synchronized (sessionStore) {
+ Set keys = new HashSet(sessionStore.keySet());
+ for (Iterator iter = keys.iterator(); iter.hasNext();) {
+ String sessionID = (String) iter.next();
+ AuthenticationSession session = (AuthenticationSession) sessionStore.get(sessionID);
+ if (now - session.getTimestampStart().getTime() > sessionTimeOut) {
+ Logger.info(
+ MOAIDMessageProvider.getInstance().getMessage(
+ "cleaner.02",
+ new Object[] { sessionID }));
+ sessionStore.remove(sessionID);
+ }
+ }
+ }
+ synchronized (authenticationDataStore) {
+ Set keys = new HashSet(authenticationDataStore.keySet());
+ for (Iterator iter = keys.iterator(); iter.hasNext();) {
+ String samlAssertionHandle = (String) iter.next();
+ AuthenticationData authData = (AuthenticationData) authenticationDataStore.get(samlAssertionHandle);
+ if (now - authData.getTimestamp().getTime() > authDataTimeOut) {
+ Logger.info(
+ MOAIDMessageProvider.getInstance().getMessage(
+ "cleaner.03",
+ new Object[] { authData.getAssertionID() }));
+ authenticationDataStore.remove(samlAssertionHandle);
+ }
+ }
+ }
+ }
+
+ /**
+ * Sets the sessionTimeOut.
+ * @param seconds Time out of the session in seconds
+ */
+ public void setSecondsSessionTimeOut(long seconds) {
+ sessionTimeOut = 1000 * seconds;
+ }
+ /**
+ * Sets the authDataTimeOut.
+ * @param seconds Time out for signing AuthData in seconds
+ */
+ public void setSecondsAuthDataTimeOut(long seconds) {
+ authDataTimeOut = 1000 * seconds;
+ }
+
+ /**
+ * Checks a parameter.
+ * @param param parameter
+ * @return true if the parameter is null or empty
+ */
+ private boolean isEmpty(String param) {
+ return param == null || param.length() == 0;
+ }
+
+ /**
+ * Checks the correctness of SAML attributes and returns its value.
+ * @param param samlAttribute
+ * @param i the number of the verified attribute for messages
+ * @param identifier the infobox identifier for messages
+ * @param friendlyname the friendly name of the infobox for messages
+ * @return the SAML attribute value (Element or String)
+ */
+ private static Object verifySAMLAttribute(ExtendedSAMLAttribute samlAttribute, int i, String identifier, String friendlyName)
+ throws ValidateException{
+ String name = samlAttribute.getName();
+
+
+ if (name == null) {
+ Logger.info("The name of SAML-Attribute number " + (i+1) + " returned from " +
+ identifier + "-infobox validator is null.");
+ throw new ValidateException(
+ "validator.45", new Object[] {friendlyName, "Name", String.valueOf((i+1)), "null"});
+ }
+ if (name == "") {
+ Logger.info("The name of SAML-Attribute number " + (i+1) + " returned from " +
+ identifier + "-infobox validator is empty.");
+ throw new ValidateException(
+ "validator.45", new Object[] {friendlyName, "Name", String.valueOf((i+1)), "leer"});
+ }
+ if (samlAttribute.getNameSpace() == null) {
+ Logger.info("The namespace of SAML-Attribute number " + (i+1) + " returned from " +
+ identifier + "-infobox validator is null.");
+ throw new ValidateException(
+ "validator.45", new Object[] {friendlyName, "Namespace", String.valueOf((i+1)), "null"});
+ }
+ Object value = samlAttribute.getValue();
+ if (value == null) {
+ Logger.info("The value of SAML-Attribute number " + (i+1) + " returned from " +
+ identifier + "-infobox validator is null.");
+ throw new ValidateException(
+ "validator.45", new Object[] {friendlyName ,"Wert", String.valueOf((i+1)), "null"});
+ }
+
+ return value;
+ }
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationSessionCleaner.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationSessionCleaner.java
new file mode 100644
index 000000000..8c06f7961
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationSessionCleaner.java
@@ -0,0 +1,67 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth;
+
+import at.gv.egovernment.moa.id.util.MOAIDMessageProvider;
+import at.gv.egovernment.moa.logging.Logger;
+
+/**
+ * Thread cleaning the <code>AuthenticationServer</code> session store
+ * and authentication data store from garbage.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class AuthenticationSessionCleaner implements Runnable {
+
+ /** interval the <code>AuthenticationSessionCleaner</code> is run in */
+ private static final long SESSION_CLEANUP_INTERVAL = 30 * 60; // 30 min
+
+ /**
+ * Runs the thread. Cleans the <code>AuthenticationServer</code> session store
+ * and authentication data store from garbage, then sleeps for given interval, and restarts.
+ */
+ public void run() {
+ while (true) {
+ try {
+ Logger.debug("AuthenticationSessionCleaner run");
+ AuthenticationServer.getInstance().cleanup();
+ }
+ catch (Exception e) {
+ Logger.error(MOAIDMessageProvider.getInstance().getMessage("cleaner.01", null), e);
+ }
+ try {
+ Thread.sleep(SESSION_CLEANUP_INTERVAL * 1000);
+ }
+ catch (InterruptedException e) {
+ }
+ }
+ }
+
+ /**
+ * start the sessionCleaner
+ */
+ public static void start() {
+ // start the session cleanup thread
+ Thread sessionCleaner =
+ new Thread(new AuthenticationSessionCleaner());
+ sessionCleaner.setName("SessionCleaner");
+ sessionCleaner.setDaemon(true);
+ sessionCleaner.setPriority(Thread.MIN_PRIORITY);
+ sessionCleaner.start();
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthConstants.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthConstants.java
new file mode 100644
index 000000000..35dddb476
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthConstants.java
@@ -0,0 +1,107 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth;
+
+import iaik.asn1.ObjectID;
+
+
+/**
+ * Constants used throughout moa-id-auth component.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public interface MOAIDAuthConstants {
+
+ /** servlet parameter &quot;Target&quot; */
+ public static final String PARAM_TARGET = "Target";
+ /** servlet parameter &quot;useMandate&quot; */
+ public static final String PARAM_USEMANDATE = "useMandate";
+ /** servlet parameter &quot;OA&quot; */
+ public static final String PARAM_OA = "OA";
+ /** servlet parameter &quot;bkuURI&quot; */
+ public static final String PARAM_BKU = "bkuURI";
+ /** servlet parameter &quot;BKUSelectionTemplate&quot; */
+ public static final String PARAM_BKUTEMPLATE = "BKUSelectionTemplate";
+ /** servlet parameter &quot;BKUSelectionTemplate&quot; */
+ public static final String PARAM_INPUT_PROCESSOR_SIGN_TEMPLATE = "InputProcessorSignTemplate";
+ /** default BKU URL */
+ public static final String DEFAULT_BKU = "http://localhost:3495/http-security-layer-request";
+ /** default BKU URL for https connections*/
+ public static final String DEFAULT_BKU_HTTPS = "https://127.0.0.1:3496/https-security-layer-request";
+ /** servlet parameter &quot;returnURI&quot; */
+ public static final String PARAM_RETURN = "returnURI";
+ /** servlet parameter &quot;Template&quot; */
+ public static final String PARAM_TEMPLATE = "Template";
+ /** servlet parameter &quot;MOASessionID&quot; */
+ public static final String PARAM_SESSIONID = "MOASessionID";
+ /** servlet parameter &quot;XMLResponse&quot; */
+ public static final String PARAM_XMLRESPONSE = "XMLResponse";
+ /** servlet parameter &quot;SAMLArtifact&quot; */
+ public static final String PARAM_SAMLARTIFACT = "SAMLArtifact";
+ /** Request name {@link at.gv.egovernment.moa.id.auth.servlet.StartAuthenticationServlet} is mapped to */
+ public static final String REQ_START_AUTHENTICATION = "StartAuthentication";
+ /** Request name {@link at.gv.egovernment.moa.id.auth.servlet.VerifyIdentityLinkServlet} is mapped to */
+ public static final String REQ_VERIFY_IDENTITY_LINK = "VerifyIdentityLink";
+ /** Request name {@link at.gv.egovernment.moa.id.auth.servlet.GetForeignIDServlet} is mapped to */
+ public static final String REQ_GET_FOREIGN_ID = "GetForeignID";
+ /** Request name {@link at.gv.egovernment.moa.id.auth.servlet.VerifyCertificateServlet} is mapped to */
+ public static final String REQ_VERIFY_CERTIFICATE = "VerifyCertificate";
+ /** Request name {@link at.gv.egovernment.moa.id.auth.servlet.GetMISSessionIDServlet} is mapped to */
+ public static final String GET_MIS_SESSIONID = "GetMISSessionID";
+ /** Request name {@link at.gv.egovernment.moa.id.auth.servlet.ProcessValidatorInputServlet} is mapped to */
+ public static final String REQ_PROCESS_VALIDATOR_INPUT = "ProcessInput";
+ /** Request name {@link at.gv.egovernment.moa.id.auth.servlet.VerifyAuthenticationBlockServlet} is mapped to */
+ public static final String REQ_VERIFY_AUTH_BLOCK = "VerifyAuthBlock";
+ /** Logging hierarchy used for controlling debug output of XML structures to files */
+ public static final String DEBUG_OUTPUT_HIERARCHY = "moa.id.auth";
+ /** Header Name for controlling the caching mechanism of the browser */
+ public static final String HEADER_EXPIRES = "Expires";
+ /** Header Value for controlling the caching mechanism of the browser */
+ public static final String HEADER_VALUE_EXPIRES = "Sat, 6 May 1995 12:00:00 GMT";
+ /** Header Name for controlling the caching mechanism of the browser */
+ public static final String HEADER_PRAGMA = "Pragma";
+ /** Header Value for controlling the caching mechanism of the browser */
+ public static final String HEADER_VALUE_PRAGMA = "no-cache";
+ /** Header Name for controlling the caching mechanism of the browser */
+ public static final String HEADER_CACHE_CONTROL = "Cache-control";
+ /** Header Value for controlling the caching mechanism of the browser */
+ public static final String HEADER_VALUE_CACHE_CONTROL = "no-store, no-cache, must-revalidate";
+ /** Header Value for controlling the caching mechanism of the browser */
+ public static final String HEADER_VALUE_CACHE_CONTROL_IE = "post-check=0, pre-check=0";
+ /**
+ * the identity link signer X509Subject names of those identity link signer certificates
+ * not including the identity link signer OID. The authorisation for signing the identity
+ * link must be checked by using their issuer names. After february 19th 2007 the OID of
+ * the certificate will be used fo checking the authorisation for signing identity links.
+ */
+ public static final String[] IDENTITY_LINK_SIGNERS_WITHOUT_OID =
+ new String[] {"T=Dr.,CN=Nikolaus Schwab,O=BM f. Inneres i.A. des gf. Mitgieds der Datenschutzkommission",
+ "T=Dr.,CN=Nikolaus Schwab,O=BM f. Inneres i.A. des gf. Mitglieds der Datenschutzkommission"};
+
+ /** the number of the certifcate extension "Eigenschaft zur Ausstellung von Personenbindungen" */
+ public static final String IDENTITY_LINK_SIGNER_OID_NUMBER = "1.2.40.0.10.1.7.1";
+ /**
+ * the OID of the identity link signer certificate (Eigenschaft zur Ausstellung von Personenbindungen);
+ * used for checking the authorisation for signing the identity link for identity links signed after february 19th 2007
+ */
+ public static final ObjectID IDENTITY_LINK_SIGNER_OID = new ObjectID(IDENTITY_LINK_SIGNER_OID_NUMBER);
+ /** the number of the certifcate extension for party representatives */
+ public static final String PARTY_REPRESENTATION_OID_NUMBER = "1.2.40.0.10.3";
+ /** the number of the certifcate extension for party organ representatives */
+ public static final String PARTY_ORGAN_REPRESENTATION_OID_NUMBER = PARTY_REPRESENTATION_OID_NUMBER + ".10";
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthInitializer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthInitializer.java
new file mode 100644
index 000000000..6ececb8f0
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthInitializer.java
@@ -0,0 +1,180 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth;
+
+import iaik.pki.PKIException;
+import iaik.pki.jsse.IAIKX509TrustManager;
+
+import java.io.IOException;
+import java.security.GeneralSecurityException;
+import java.util.Properties;
+
+import javax.activation.CommandMap;
+import javax.activation.MailcapCommandMap;
+import javax.mail.Session;
+import javax.net.ssl.SSLSocketFactory;
+
+import at.gv.egovernment.moa.id.config.ConfigurationException;
+import at.gv.egovernment.moa.id.config.ConnectionParameter;
+import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
+import at.gv.egovernment.moa.id.iaik.config.LoggerConfigImpl;
+import at.gv.egovernment.moa.id.util.AxisSecureSocketFactory;
+import at.gv.egovernment.moa.id.util.MOAIDMessageProvider;
+import at.gv.egovernment.moa.id.util.SSLUtils;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.logging.LoggingContext;
+import at.gv.egovernment.moa.logging.LoggingContextManager;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.iaik.config.IaikConfigurator;
+import at.gv.egovernment.moa.util.Constants;
+
+/**
+ * Web application initializer
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class MOAIDAuthInitializer {
+
+ /** a boolean identifying if the MOAIDAuthInitializer has been startet */
+ public static boolean initialized = false;
+
+ /**
+ * Initializes the web application components which need initialization:
+ * logging, JSSE, MOA-ID Auth configuration, Axis, session cleaner.
+ */
+ public static void initialize() throws ConfigurationException,
+ PKIException, IOException, GeneralSecurityException {
+ if (initialized) return;
+ initialized = true;
+ Logger.setHierarchy("moa.id.auth");
+ Logger.info("Default java file.encoding: "
+ + System.getProperty("file.encoding"));
+
+ //JDK bug workaround according to:
+ // http://jce.iaik.tugraz.at/products/03_cms/faq/index.php#JarVerifier
+ // register content data handlers for S/MIME types
+ MailcapCommandMap mc = new MailcapCommandMap();
+ CommandMap.setDefaultCommandMap(mc);
+
+ // create some properties and get the default Session
+ Properties props = new Properties();
+ props.put("mail.smtp.host", "localhost");
+ Session session = Session.getDefaultInstance(props, null);
+
+ // Restricts TLS cipher suites
+ System.setProperty(
+ "https.cipherSuites",
+ "SSL_RSA_WITH_RC4_128_SHA,SSL_RSA_WITH_RC4_128_MD5,SSL_RSA_WITH_3DES_EDE_CBC_SHA");
+ // load some jsse classes so that the integrity of the jars can be
+ // verified
+ // before the iaik jce is installed as the security provider
+ // this workaround is only needed when sun jsse is used in conjunction
+ // with
+ // iaik-jce (on jdk1.3)
+ ClassLoader cl = MOAIDAuthInitializer.class.getClassLoader();
+ try {
+ cl.loadClass("javax.security.cert.Certificate"); // from jcert.jar
+ } catch (ClassNotFoundException e) {
+ Logger.warn(MOAIDMessageProvider.getInstance().getMessage(
+ "init.01", null), e);
+ }
+
+ // Initializes SSLSocketFactory store
+ SSLUtils.initialize();
+
+ // Initializes Namespace Map
+ Constants.nSMap.put(Constants.SAML_PREFIX, Constants.SAML_NS_URI);
+ Constants.nSMap.put(Constants.ECDSA_PREFIX,
+ "http://www.w3.org/2001/04/xmldsig-more#");
+ Constants.nSMap.put(Constants.DSIG_PREFIX, Constants.DSIG_NS_URI);
+
+ // Loads the configuration
+ AuthConfigurationProvider authConf = AuthConfigurationProvider.reload();
+ ConnectionParameter moaSPConnParam = authConf
+ .getMoaSpConnectionParameter();
+
+ // If MOA-SP API calls: loads MOA-SP configuration and configures IAIK
+ if (moaSPConnParam == null) {
+ try {
+ LoggingContextManager.getInstance().setLoggingContext(
+ new LoggingContext("startup"));
+ ConfigurationProvider config = ConfigurationProvider
+ .getInstance();
+ new IaikConfigurator().configure(config);
+ } catch (at.gv.egovernment.moa.spss.server.config.ConfigurationException ex) {
+ throw new ConfigurationException("config.10", new Object[] { ex
+ .toString() }, ex);
+ }
+ }
+
+ // Initializes IAIKX509TrustManager logging
+ String log4jConfigURL = System.getProperty("log4j.configuration");
+ if (log4jConfigURL != null) {
+ IAIKX509TrustManager.initLog(new LoggerConfigImpl(log4jConfigURL));
+ }
+
+ // Initializes the Axis secure socket factory for use in calling the
+ // MOA-SP web service
+ if (moaSPConnParam != null && moaSPConnParam.isHTTPSURL()) {
+ SSLSocketFactory ssf = SSLUtils.getSSLSocketFactory(authConf,
+ moaSPConnParam);
+ AxisSecureSocketFactory.initialize(ssf);
+ }
+
+ // sets the authentication session and authentication data time outs
+ String param = authConf
+ .getGenericConfigurationParameter(AuthConfigurationProvider.AUTH_SESSION_TIMEOUT_PROPERTY);
+ if (param != null) {
+ long sessionTimeOut = 0;
+ try {
+ sessionTimeOut = new Long(param).longValue();
+ } catch (NumberFormatException ex) {
+ Logger
+ .error(MOAIDMessageProvider
+ .getInstance()
+ .getMessage(
+ "config.05",
+ new Object[] { AuthConfigurationProvider.AUTH_SESSION_TIMEOUT_PROPERTY }));
+ }
+ if (sessionTimeOut > 0)
+ AuthenticationServer.getInstance()
+ .setSecondsSessionTimeOut(sessionTimeOut);
+ }
+ param = authConf
+ .getGenericConfigurationParameter(AuthConfigurationProvider.AUTH_DATA_TIMEOUT_PROPERTY);
+ if (param != null) {
+ long authDataTimeOut = 0;
+ try {
+ authDataTimeOut = new Long(param).longValue();
+ } catch (NumberFormatException ex) {
+ Logger
+ .error(MOAIDMessageProvider
+ .getInstance()
+ .getMessage(
+ "config.05",
+ new Object[] { AuthConfigurationProvider.AUTH_DATA_TIMEOUT_PROPERTY }));
+ }
+ if (authDataTimeOut > 0)
+ AuthenticationServer.getInstance()
+ .setSecondsAuthDataTimeOut(authDataTimeOut);
+ }
+
+ // Starts the session cleaner thread to remove unpicked authentication data
+ AuthenticationSessionCleaner.start();
+ }
+
+} \ No newline at end of file
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/WrongParametersException.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/WrongParametersException.java
new file mode 100644
index 000000000..720bb9bb0
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/WrongParametersException.java
@@ -0,0 +1,38 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth;
+
+import at.gv.egovernment.moa.id.MOAIDException;
+
+/**
+ * Exception thrown when the <code>AuthenticationServer</code> API is
+ * called with wrong parameters provided.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class WrongParametersException extends MOAIDException {
+
+ /**
+ * Constructor
+ */
+ public WrongParametersException(String call, String parameter, String errorID) {
+ super(errorID, new Object[] {call, parameter});
+ //super("auth.05", new Object[] {call, parameter});
+ //super("auth.12", new Object[] {call, parameter});
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationAssertionBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationAssertionBuilder.java
new file mode 100644
index 000000000..b99ee2472
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationAssertionBuilder.java
@@ -0,0 +1,103 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.builder;
+
+import java.io.IOException;
+import java.text.MessageFormat;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.xml.transform.TransformerException;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.id.ParseException;
+import at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttribute;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.StringUtils;
+
+/**
+ * Base class for building authentication the AUTHBlock and final OA data SAML assertions.
+ * Encapsulates methods used by the two specific builders
+ * {@link at.gv.egovernment.moa.id.auth.builder.AuthenticationBlockAssertionBuilder AuthenticationBlockAssertionBuilder}
+ * and
+ * {@link at.gv.egovernment.moa.id.auth.builder.AuthenticationDataAssertionBuilder AuthenticationDataAssertionBuilder}
+ *
+ * @author Harald Bratko
+ */
+public class AuthenticationAssertionBuilder {
+
+ /** the NewLine representation in Java*/
+ protected static String NL = "\n";
+
+ protected static String SAML_ATTRIBUTE =
+ " <saml:Attribute AttributeName=''{0}'' AttributeNamespace=''{1}''>" + NL +
+ " <saml:AttributeValue>{2}</saml:AttributeValue>" + NL +
+ " </saml:Attribute>"+ NL;
+
+ /**
+ * Empty constructor
+ */
+ public AuthenticationAssertionBuilder() {
+ }
+
+ /**
+ * Builds the SAML attributes to be appended to the AUTHBlock or to the SAML assertion
+ * delivered to the online application.
+ * The method traverses through the list of given SAML attribute objects and builds an
+ * XML structure (String representation) for each of the attributes.
+ *
+ * @param extendedSAMLAttributes The SAML attributes to be appended to the AUTHBlock or
+ * to the SAML assertion delivered to the online application.
+ * @return A string representation including the XML structures of
+ * the SAML attributes.
+ *
+ * @throws ParseException If an error occurs on serializing an SAML attribute.
+ */
+ protected String buildExtendedSAMLAttributes(List extendedSAMLAttributes) throws ParseException
+ {
+ StringBuffer sb = new StringBuffer();
+ if (extendedSAMLAttributes!=null) {
+ Iterator it = extendedSAMLAttributes.iterator();
+ while (it.hasNext()) {
+ ExtendedSAMLAttribute extendedSAMLAttribute = (ExtendedSAMLAttribute)it.next();
+ Object value = extendedSAMLAttribute.getValue();
+ String name = extendedSAMLAttribute.getName();
+ String namespace = extendedSAMLAttribute.getNameSpace();
+ if (value instanceof String) {
+ sb.append(MessageFormat.format( SAML_ATTRIBUTE, new Object[] {name, namespace, value}));
+ } else if (value instanceof Element) {
+ try {
+ String serializedValue = DOMUtils.serializeNode((Element)(value));
+ serializedValue = StringUtils.removeXMLDeclaration(serializedValue);
+ sb.append(MessageFormat.format( SAML_ATTRIBUTE, new Object[] {name, namespace, serializedValue}));
+ } catch (TransformerException e) {
+ Logger.error("Error on serializing SAML attribute \"" + name +
+ " (namespace: \"" + namespace + "\".");
+ throw new ParseException("parser.05", new Object[] { name, namespace});
+ } catch (IOException e) {
+ Logger.error("Error on serializing SAML attribute \"" + name +
+ " (namespace: \"" + namespace + "\".");
+ throw new ParseException("parser.05", new Object[] { name, namespace});
+ }
+ }
+ }
+ }
+ return sb.toString();
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationBlockAssertionBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationBlockAssertionBuilder.java
new file mode 100644
index 000000000..bab387b4a
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationBlockAssertionBuilder.java
@@ -0,0 +1,362 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.builder;
+
+import java.text.MessageFormat;
+import java.util.List;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.id.BuildException;
+import at.gv.egovernment.moa.id.ParseException;
+import at.gv.egovernment.moa.id.auth.data.AuthenticationSession;
+import at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttribute;
+import at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttributeImpl;
+import at.gv.egovernment.moa.id.config.ConfigurationException;
+import at.gv.egovernment.moa.id.config.TargetToSectorNameMapper;
+import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
+import at.gv.egovernment.moa.id.config.auth.OAAuthParameter;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.StringUtils;
+
+/**
+ * Builder for the authentication block <code>&lt;saml:Assertion&gt;</code>
+ * to be included in a <code>&lt;CreateXMLSignatureResponse&gt;</code>.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class AuthenticationBlockAssertionBuilder extends AuthenticationAssertionBuilder implements Constants {
+
+ /** template for the Auth-Block */
+ private static String AUTH_BLOCK =
+ "<saml:Assertion xmlns:saml=''" + SAML_NS_URI + "''{0} MajorVersion=''1'' MinorVersion=''0'' AssertionID=''any'' Issuer=''{1}'' IssueInstant=''{2}''>" + NL +
+ " <saml:AttributeStatement>" + NL +
+ " <saml:Subject>" + NL +
+ " <saml:NameIdentifier>{3}</saml:NameIdentifier>" + NL +
+ " </saml:Subject>" + NL +
+ "{4}" +
+ " <saml:Attribute AttributeName=''OA'' AttributeNamespace=''" + MOA_NS_URI + "''>" + NL +
+ " <saml:AttributeValue>{5}</saml:AttributeValue>" + NL +
+ " </saml:Attribute>" + NL +
+ " <saml:Attribute AttributeName=''Geburtsdatum'' AttributeNamespace=''" + MOA_NS_URI + "''>" + NL +
+ " <saml:AttributeValue>{6}</saml:AttributeValue>" + NL +
+ " </saml:Attribute>" + NL +
+ "{7}" +
+ " </saml:AttributeStatement>" + NL +
+ "</saml:Assertion>";
+
+ private static String GESCHAEFTS_BEREICH_ATTRIBUTE =
+ " <saml:Attribute AttributeName=''Geschaeftsbereich'' AttributeNamespace=''" + MOA_NS_URI + "''>" + NL +
+ " <saml:AttributeValue>{0}</saml:AttributeValue>" + NL +
+ " </saml:Attribute>" + NL;
+
+ private static String WBPK_ATTRIBUTE =
+ " <saml:Attribute AttributeName=''wbPK'' AttributeNamespace=''" + MOA_NS_URI + "''>" + NL +
+ " <saml:AttributeValue>" + NL +
+ " <pr:Identification>" + NL +
+ " <pr:Value>{0}</pr:Value>" + NL +
+ " <pr:Type>{1}</pr:Type>" + NL +
+ " </pr:Identification>" + NL +
+ " </saml:AttributeValue>" + NL +
+ " </saml:Attribute>" + NL;
+
+
+ private static String PR_IDENTIFICATION_ATTRIBUTE =
+ " <pr:Identification xmlns:pr=\"" + PD_NS_URI + "\">" + NL +
+ " <pr:Value>{0}</pr:Value>" + NL +
+ " <pr:Type>{1}</pr:Type>" + NL +
+ " </pr:Identification>" + NL;
+
+ /**
+ * The number of SAML attributes included in this AUTH-Block (without the extended SAML attributes).
+ */
+ public static final int NUM_OF_SAML_ATTRIBUTES = 3;
+
+ /**
+ * Constructor for AuthenticationBlockAssertionBuilder.
+ */
+ public AuthenticationBlockAssertionBuilder() {
+ super();
+ }
+
+ /**
+ * Builds the authentication block <code>&lt;saml:Assertion&gt;</code>
+ *
+ * @param issuer authentication block issuer; <code>"GivenName FamilyName"</code>
+ * @param issueInstant current timestamp
+ * @param authURL URL of MOA-ID authentication component
+ * @param target "Gesch&auml;ftsbereich"; maybe <code>null</code> if the application
+ * is a business application
+ * @param identityLinkValue the content of the <code>&lt;pr:Value&gt;</code>
+ * child element of the <code>&lt;pr:Identification&gt;</code>
+ * element derived from the Identitylink; this is the
+ * value of the <code>wbPK</code>;
+ * maybe <code>null</code> if the application is a public service
+ * @param identityLinkType the content of the <code>&lt;pr:Type&gt;</code>
+ * child element of the <code>&lt;pr:Identification&gt;</code>
+ * element derived from the Identitylink; this includes the
+ * URN prefix and the identification number of the business
+ * application used as input for wbPK computation;
+ * maybe <code>null</code> if the application is a public service
+ * @param oaURL public URL of online application requested
+ * @param gebDat The date of birth from the identity link.
+ * @param extendedSAMLAttributes The SAML attributes to be appended to the AUTHBlock.
+ *
+ * @return String representation of authentication block
+ * <code>&lt;saml:Assertion&gt;</code> built
+ *
+ * @throws BuildException If an error occurs on serializing an extended SAML attribute
+ * to be appended to the AUTH-Block.
+ */
+ public String buildAuthBlock(
+ String issuer,
+ String issueInstant,
+ String authURL,
+ String target,
+ String identityLinkValue,
+ String identityLinkType,
+ String oaURL,
+ String gebDat,
+ List extendedSAMLAttributes,
+ AuthenticationSession session)
+ throws BuildException
+ {
+ session.setSAMLAttributeGebeORwbpk(true);
+ String gebeORwbpk = "";
+ String wbpkNSDeclaration = "";
+
+ //BZ.., reading OA parameters
+ OAAuthParameter oaParam;
+ try {
+ oaParam = AuthConfigurationProvider.getInstance().getOnlineApplicationParameter(
+ session.getPublicOAURLPrefix());
+ } catch (ConfigurationException e) {
+ Logger.error("Error on building AUTH-Block: " + e.getMessage());
+ throw new BuildException("builder.00", new Object[] { "AUTH-Block", e.toString()});
+ }
+ //..BZ
+
+
+ if (target == null) {
+ // OA is a business application
+ if (!Constants.URN_PREFIX_HPI.equals(identityLinkType)) {
+ // Only add wbPKs to AUTH-Block. HPIs can be added to the AUTH-Block by the corresponding Validator
+ gebeORwbpk = MessageFormat.format(WBPK_ATTRIBUTE, new Object[] { identityLinkValue, identityLinkType });
+ wbpkNSDeclaration = " xmlns:pr=\"" + PD_NS_URI + "\"";
+
+ //BZ.., adding type of wbPK domain identifier
+ ExtendedSAMLAttribute idLinkDomainIdentifierTypeAttribute =
+ new ExtendedSAMLAttributeImpl("IdentityLinkDomainIdentifierType", oaParam.getIdentityLinkDomainIdentifierType(), Constants.MOA_NS_URI, ExtendedSAMLAttribute.ADD_TO_AUTHBLOCK_ONLY);
+
+ extendedSAMLAttributes.add(idLinkDomainIdentifierTypeAttribute);
+ //..BZ
+
+ } else {
+ // We do not have a wbPK, therefore no SAML-Attribute is provided
+ session.setSAMLAttributeGebeORwbpk(false);
+ }
+ } else {
+ // OA is a govermental application
+ //BZ..
+ String sectorName = TargetToSectorNameMapper.getSectorNameViaTarget(target);
+ //gebeORwbpk = MessageFormat.format(GESCHAEFTS_BEREICH_ATTRIBUTE, new Object[] { target });
+ gebeORwbpk = MessageFormat.format(GESCHAEFTS_BEREICH_ATTRIBUTE, new Object[] { target + " (" + sectorName + ")" });
+ //..BZ
+
+ //BZ.., no business service, adding bPK
+
+ Element bpkSamlValueElement;
+ try {
+ bpkSamlValueElement = DOMUtils.parseDocument(MessageFormat.format(PR_IDENTIFICATION_ATTRIBUTE, new Object[] { identityLinkValue, Constants.URN_PREFIX_BPK }), false, null, null).getDocumentElement();
+ } catch (Exception e) {
+ Logger.error("Error on building AUTH-Block: " + e.getMessage());
+ throw new BuildException("builder.00", new Object[] { "AUTH-Block", e.toString()});
+ }
+ ExtendedSAMLAttribute bpkAttribute =
+ new ExtendedSAMLAttributeImpl("bPK", bpkSamlValueElement, Constants.MOA_NS_URI, ExtendedSAMLAttribute.ADD_TO_AUTHBLOCK_ONLY);
+
+ extendedSAMLAttributes.add(bpkAttribute);
+ //gebeORwbpk = gebeORwbpk + MessageFormat.format(BPK_ATTRIBUTE, new Object[] { identityLinkValue, identityLinkType });
+ wbpkNSDeclaration = " xmlns:pr=\"" + PD_NS_URI + "\"";
+ //..BZ
+ }
+
+ //BZ.., adding friendly name of OA
+ String oaFriendlyName = StringUtils.isEmpty(oaParam.getFriendlyName()) ? "" : oaParam.getFriendlyName();
+
+ ExtendedSAMLAttribute oaFriendlyNameAttribute =
+ new ExtendedSAMLAttributeImpl("oaFriendlyName", oaFriendlyName, Constants.MOA_NS_URI, ExtendedSAMLAttribute.ADD_TO_AUTHBLOCK_ONLY);
+
+ extendedSAMLAttributes.add(oaFriendlyNameAttribute);
+ //..BZ
+
+ String assertion;
+ try {
+ assertion = MessageFormat.format(
+ AUTH_BLOCK, new Object[] {
+ wbpkNSDeclaration,
+ issuer,
+ issueInstant,
+ authURL,
+ gebeORwbpk,
+ oaURL,
+ gebDat,
+ buildExtendedSAMLAttributes(extendedSAMLAttributes)});
+ } catch (ParseException e) {
+ Logger.error("Error on building AUTH-Block: " + e.getMessage());
+ throw new BuildException("builder.00", new Object[] { "AUTH-Block", e.toString()});
+ }
+
+ return assertion;
+
+ }
+
+ /**
+ * Builds the authentication block <code>&lt;saml:Assertion&gt;</code>
+ *
+ * @param issuer authentication block issuer; <code>"GivenName FamilyName"</code>
+ * @param issueInstant current timestamp
+ * @param authURL URL of MOA-ID authentication component
+ * @param target "Gesch&auml;ftsbereich"; maybe <code>null</code> if the application
+ * is a business application
+ * @param identityLinkValue the content of the <code>&lt;pr:Value&gt;</code>
+ * child element of the <code>&lt;pr:Identification&gt;</code>
+ * element derived from the Identitylink; this is the
+ * value of the <code>wbPK</code>;
+ * maybe <code>null</code> if the application is a public service
+ * @param identityLinkType the content of the <code>&lt;pr:Type&gt;</code>
+ * child element of the <code>&lt;pr:Identification&gt;</code>
+ * element derived from the Identitylink; this includes the
+ * URN prefix and the identification number of the business
+ * application used as input for wbPK computation;
+ * maybe <code>null</code> if the application is a public service
+ * @param oaURL public URL of online application requested
+ * @param gebDat The date of birth from the identity link.
+ * @param extendedSAMLAttributes The SAML attributes to be appended to the AUTHBlock.
+ *
+ * @return String representation of authentication block
+ * <code>&lt;saml:Assertion&gt;</code> built
+ *
+ * @throws BuildException If an error occurs on serializing an extended SAML attribute
+ * to be appended to the AUTH-Block.
+ */
+ public String buildAuthBlockForeignID(
+ String issuer,
+ String issueInstant,
+ String authURL,
+ String target,
+ String identityLinkValue,
+ String identityLinkType,
+ String oaURL,
+ String gebDat,
+ List extendedSAMLAttributes,
+ AuthenticationSession session)
+ throws BuildException
+ {
+ session.setSAMLAttributeGebeORwbpk(true);
+ String gebeORwbpk = "";
+ String wbpkNSDeclaration = "";
+
+ //BZ.., reading OA parameters
+ OAAuthParameter oaParam;
+ try {
+ oaParam = AuthConfigurationProvider.getInstance().getOnlineApplicationParameter(
+ session.getPublicOAURLPrefix());
+ } catch (ConfigurationException e) {
+ Logger.error("Error on building AUTH-Block: " + e.getMessage());
+ throw new BuildException("builder.00", new Object[] { "AUTH-Block", e.toString()});
+ }
+ //..BZ
+
+
+ if (target == null) {
+ // OA is a business application
+ if (!Constants.URN_PREFIX_HPI.equals(identityLinkType)) {
+ // Only add wbPKs to AUTH-Block. HPIs can be added to the AUTH-Block by the corresponding Validator
+ gebeORwbpk = MessageFormat.format(WBPK_ATTRIBUTE, new Object[] { identityLinkValue, identityLinkType });
+ wbpkNSDeclaration = " xmlns:pr=\"" + PD_NS_URI + "\"";
+
+ //BZ.., adding type of wbPK domain identifier
+ ExtendedSAMLAttribute idLinkDomainIdentifierTypeAttribute =
+ new ExtendedSAMLAttributeImpl("IdentityLinkDomainIdentifierType", oaParam.getIdentityLinkDomainIdentifierType(), Constants.MOA_NS_URI, ExtendedSAMLAttribute.ADD_TO_AUTHBLOCK_ONLY);
+
+ extendedSAMLAttributes.add(idLinkDomainIdentifierTypeAttribute);
+ //..BZ
+
+ } else {
+ // We do not have a wbPK, therefore no SAML-Attribute is provided
+ session.setSAMLAttributeGebeORwbpk(false);
+ }
+ } else {
+ // OA is a govermental application
+ //BZ..
+ String sectorName = TargetToSectorNameMapper.getSectorNameViaTarget(target);
+ //gebeORwbpk = MessageFormat.format(GESCHAEFTS_BEREICH_ATTRIBUTE, new Object[] { target });
+ gebeORwbpk = MessageFormat.format(GESCHAEFTS_BEREICH_ATTRIBUTE, new Object[] { target + " (" + sectorName + ")" });
+ //..BZ
+
+ //BZ.., no business service, adding bPK
+
+ Element bpkSamlValueElement;
+ try {
+ bpkSamlValueElement = DOMUtils.parseDocument(MessageFormat.format(PR_IDENTIFICATION_ATTRIBUTE, new Object[] { identityLinkValue, Constants.URN_PREFIX_BPK }), false, null, null).getDocumentElement();
+ } catch (Exception e) {
+ Logger.error("Error on building AUTH-Block: " + e.getMessage());
+ throw new BuildException("builder.00", new Object[] { "AUTH-Block", e.toString()});
+ }
+ ExtendedSAMLAttribute bpkAttribute =
+ new ExtendedSAMLAttributeImpl("bPK", bpkSamlValueElement, Constants.MOA_NS_URI, ExtendedSAMLAttribute.ADD_TO_AUTHBLOCK_ONLY);
+
+ extendedSAMLAttributes.add(bpkAttribute);
+ //gebeORwbpk = gebeORwbpk + MessageFormat.format(BPK_ATTRIBUTE, new Object[] { identityLinkValue, identityLinkType });
+ wbpkNSDeclaration = " xmlns:pr=\"" + PD_NS_URI + "\"";
+ //..BZ
+ }
+
+ //BZ.., adding friendly name of OA
+ String oaFriendlyName = StringUtils.isEmpty(oaParam.getFriendlyName()) ? "" : oaParam.getFriendlyName();
+
+ ExtendedSAMLAttribute oaFriendlyNameAttribute =
+ new ExtendedSAMLAttributeImpl("oaFriendlyName", oaFriendlyName, Constants.MOA_NS_URI, ExtendedSAMLAttribute.ADD_TO_AUTHBLOCK_ONLY);
+
+ extendedSAMLAttributes.add(oaFriendlyNameAttribute);
+ //..BZ
+
+ String assertion;
+ try {
+ assertion = MessageFormat.format(
+ AUTH_BLOCK, new Object[] {
+ wbpkNSDeclaration,
+ issuer,
+ issueInstant,
+ authURL,
+ gebeORwbpk,
+ oaURL,
+ gebDat,
+ buildExtendedSAMLAttributes(extendedSAMLAttributes)});
+ } catch (ParseException e) {
+ Logger.error("Error on building AUTH-Block: " + e.getMessage());
+ throw new BuildException("builder.00", new Object[] { "AUTH-Block", e.toString()});
+ }
+
+ return assertion;
+
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationDataAssertionBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationDataAssertionBuilder.java
new file mode 100644
index 000000000..2e1c608a6
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationDataAssertionBuilder.java
@@ -0,0 +1,172 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.builder;
+
+import java.text.MessageFormat;
+import java.util.List;
+
+import at.gv.egovernment.moa.id.BuildException;
+import at.gv.egovernment.moa.id.ParseException;
+import at.gv.egovernment.moa.id.data.AuthenticationData;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.StringUtils;
+
+/**
+ * Builder for the authentication data <code>&lt;saml:Assertion&gt;</code>
+ * to be provided by the MOA ID Auth component.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class AuthenticationDataAssertionBuilder extends AuthenticationAssertionBuilder implements Constants {
+ /** private static String NL contains the NewLine representation in Java*/
+ private static final String NL = "\n";
+ /**
+ * XML template for the <code>&lt;saml:Assertion&gt;</code> to be built
+ */
+ private static final String AUTH_DATA =
+ "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" + NL +
+ "<saml:Assertion xmlns:saml=''" + SAML_NS_URI + "'' xmlns:pr=''" + PD_NS_URI + "'' xmlns:xsi=''" + XSI_NS_URI + "''" +
+ " xmlns:si=''" + XSI_NS_URI + "''" +
+ " MajorVersion=''1'' MinorVersion=''0'' AssertionID=''{0}'' Issuer=''{1}'' IssueInstant=''{2}''>" + NL +
+ " <saml:AttributeStatement>" + NL +
+ " <saml:Subject>" + NL +
+ " <saml:NameIdentifier NameQualifier=''{3}''>{4}</saml:NameIdentifier>" + NL +
+ " <saml:SubjectConfirmation>" + NL +
+ " <saml:ConfirmationMethod>" + MOA_NS_URI + "cm</saml:ConfirmationMethod>" + NL +
+ " <saml:SubjectConfirmationData>{5}{6}</saml:SubjectConfirmationData>" + NL +
+ " </saml:SubjectConfirmation>" + NL +
+ " </saml:Subject>" + NL +
+ " <saml:Attribute AttributeName=''PersonData'' AttributeNamespace=''" + PD_NS_URI + "''>" + NL +
+ " <saml:AttributeValue>{7}</saml:AttributeValue>" + NL +
+ " </saml:Attribute>" + NL +
+ " <saml:Attribute AttributeName=''isQualifiedCertificate'' AttributeNamespace=''" + MOA_NS_URI + "''>" + NL +
+ " <saml:AttributeValue>{8}</saml:AttributeValue>" + NL +
+ " </saml:Attribute>" + NL +
+ " <saml:Attribute AttributeName=''bkuURL'' AttributeNamespace=''" + MOA_NS_URI + "''>" + NL +
+ " <saml:AttributeValue>{9}</saml:AttributeValue>" + NL +
+ " </saml:Attribute>" + NL +
+ "{10}" +
+ "{11}" +
+ "{12}" +
+ " </saml:AttributeStatement>" + NL +
+ "</saml:Assertion>";
+ /**
+ * XML template for the <code>&lt;saml:Attribute&gt;</code> named <code>"isPublicAuthority"</code>,
+ * to be inserted into the <code>&lt;saml:Assertion&gt;</code>
+ */
+ private static final String PUBLIC_AUTHORITY_ATT =
+ " <saml:Attribute AttributeName=''isPublicAuthority'' AttributeNamespace=''urn:oid:1.2.40.0.10.1.1.1''>" + NL +
+ " <saml:AttributeValue>{0}</saml:AttributeValue>" + NL +
+ " </saml:Attribute>" + NL;
+
+ private static final String SIGNER_CERTIFICATE_ATT =
+ " <saml:Attribute AttributeName=''SignerCertificate'' AttributeNamespace=''" + MOA_NS_URI + "''>" + NL +
+ " <saml:AttributeValue>{0}</saml:AttributeValue>" + NL +
+ " </saml:Attribute>" + NL;
+
+ /**
+ * Constructor for AuthenticationDataAssertionBuilder.
+ */
+ public AuthenticationDataAssertionBuilder() {
+ super();
+ }
+
+ /**
+ * Builds the authentication data <code>&lt;saml:Assertion&gt;</code>.
+ *
+ * @param authData the <code>AuthenticationData</code> to build the
+ * <code>&lt;saml:Assertion&gt;</code> from
+ * @param xmlPersonData <code>lt;pr:Person&gt;</code> element as a String
+ * @param xmlAuthBlock authentication block to be included in a
+ * <code>lt;saml:SubjectConfirmationData&gt;</code> element; may include
+ * the <code>"Stammzahl"</code> or not; may be empty
+ * @param xmlIdentityLink the IdentityLink
+ * @param signerCertificateBase64 Base64 encoded certificate of the signer. Maybe
+ * an empty string if the signer certificate should not be provided.
+ * Will be ignored if the <code>businessService</code> parameter is
+ * set to <code>false</code>.
+ * @param businessService <code>true</code> if the online application is a
+ * business service, otherwise <code>false</code>
+ * @return the <code>&lt;saml:Assertion&gt;</code>
+ * @throws BuildException if an error occurs during the build process
+ */
+ public String build(
+ AuthenticationData authData,
+ String xmlPersonData,
+ String xmlAuthBlock,
+ String xmlIdentityLink,
+ String bkuURL,
+ String signerCertificateBase64,
+ boolean businessService,
+ List extendedSAMLAttributes)
+ throws BuildException
+ {
+
+ String isQualifiedCertificate = authData.isQualifiedCertificate() ? "true" : "false";
+ String publicAuthorityAttribute = "";
+ if (authData.isPublicAuthority()) {
+ String publicAuthorityIdentification = authData.getPublicAuthorityCode();
+ if (publicAuthorityIdentification == null)
+ publicAuthorityIdentification = "True";
+ publicAuthorityAttribute = MessageFormat.format(
+ PUBLIC_AUTHORITY_ATT, new Object[] { publicAuthorityIdentification });
+ }
+
+
+ String signerCertificateAttribute = "";
+ if (signerCertificateBase64 != "") {
+ signerCertificateAttribute = MessageFormat.format(
+ SIGNER_CERTIFICATE_ATT, new Object[] { signerCertificateBase64 });
+ }
+
+ String pkType;
+ String pkValue;
+ if (businessService) {
+ pkType = authData.getIdentificationType();
+ pkValue = authData.getWBPK();
+
+ } else {
+ // <saml:NameIdentifier NameQualifier> always has the bPK as type/value
+ pkType = URN_PREFIX_BPK;
+ pkValue = authData.getBPK();
+ }
+
+ String assertion;
+ try {
+ assertion = MessageFormat.format(AUTH_DATA, new Object[] {
+ authData.getAssertionID(),
+ authData.getIssuer(),
+ authData.getIssueInstant(),
+ pkType,
+ pkValue,
+ StringUtils.removeXMLDeclaration(xmlAuthBlock),
+ StringUtils.removeXMLDeclaration(xmlIdentityLink),
+ StringUtils.removeXMLDeclaration(xmlPersonData),
+ isQualifiedCertificate,
+ bkuURL,
+ publicAuthorityAttribute,
+ signerCertificateAttribute,
+ buildExtendedSAMLAttributes(extendedSAMLAttributes)});
+ } catch (ParseException e) {
+ Logger.error("Error on building Authentication Data Assertion: " + e.getMessage());
+ throw new BuildException("builder.00", new Object[] { "Authentication Data Assertion", e.toString()});
+ }
+ return assertion;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/BPKBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/BPKBuilder.java
new file mode 100644
index 000000000..c2c43b7bd
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/BPKBuilder.java
@@ -0,0 +1,94 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.builder;
+
+import java.security.MessageDigest;
+
+import at.gv.egovernment.moa.id.BuildException;
+import at.gv.egovernment.moa.util.Base64Utils;
+import at.gv.egovernment.moa.util.Constants;
+
+/**
+ * Builder for the bPK, as defined in
+ * <code>&quot;Ableitung f&uml;r die bereichsspezifische Personenkennzeichnung&quot;</code>
+ * version <code>1.0.1</code> from <code>&quot;reference.e-government.gv.at&quot;</code>.
+ *
+ * @author Paul Schamberger
+ * @version $Id$
+ */
+public class BPKBuilder {
+
+ /**
+ * Builds the bPK from the given parameters.
+ * @param identificationValue Base64 encoded "Stammzahl"
+ * @param target "Bereich lt. Verordnung des BKA"
+ * @return bPK in a BASE64 encoding
+ * @throws BuildException if an error occurs on building the bPK
+ */
+ public String buildBPK(String identificationValue, String target)
+ throws BuildException {
+
+ if ((identificationValue == null ||
+ identificationValue.length() == 0 ||
+ target == null ||
+ target.length() == 0))
+ {
+ throw new BuildException("builder.00",
+ new Object[] {"BPK", "Unvollständige Parameterangaben: identificationValue=" +
+ identificationValue + ",target=" + target});
+ }
+ String basisbegriff = identificationValue + "+" + Constants.URN_PREFIX_CDID + "+" + target;
+ try {
+ MessageDigest md = MessageDigest.getInstance("SHA-1");
+ byte[] hash = md.digest(basisbegriff.getBytes("ISO-8859-1"));
+ String hashBase64 = Base64Utils.encode(hash);
+ return hashBase64;
+ } catch (Exception ex) {
+ throw new BuildException("builder.00", new Object[] {"bPK", ex.toString()}, ex);
+ }
+ }
+
+ /**
+ * Builds the wbPK from the given parameters.
+ * @param identificationValue Base64 encoded "Stammzahl"
+ * @param registerAndOrdNr type of register + "+" + number in register.
+ * @return wbPK in a BASE64 encoding
+ * @throws BuildException if an error occurs on building the wbPK
+ */
+ public String buildWBPK(String identificationValue, String registerAndOrdNr)
+ throws BuildException {
+
+ if ((identificationValue == null ||
+ identificationValue.length() == 0 ||
+ registerAndOrdNr == null ||
+ registerAndOrdNr.length() == 0))
+ {
+ throw new BuildException("builder.00",
+ new Object[] {"wbPK", "Unvollständige Parameterangaben: identificationValue=" +
+ identificationValue + ",Register+Registernummer=" + registerAndOrdNr});
+ }
+ String basisbegriff = identificationValue + "+" + Constants.URN_PREFIX_WBPK + "+" + registerAndOrdNr;
+ try {
+ MessageDigest md = MessageDigest.getInstance("SHA-1");
+ byte[] hash = md.digest(basisbegriff.getBytes("ISO-8859-1"));
+ String hashBase64 = Base64Utils.encode(hash);
+ return hashBase64;
+ } catch (Exception ex) {
+ throw new BuildException("builder.00", new Object[] {"wbPK", ex.toString()}, ex);
+ }
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/Builder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/Builder.java
new file mode 100644
index 000000000..2cd1370c1
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/Builder.java
@@ -0,0 +1,74 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.builder;
+
+import at.gv.egovernment.moa.id.BuildException;
+import at.gv.egovernment.moa.util.StringUtils;
+
+/**
+ * Base class for HTML/XML builders providing commonly useful functions.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class Builder {
+
+ /**
+ * Replaces a given number of occurences of a special tag in an XML or HTML template by a value.
+ * @param template html template
+ * @param tag special tag
+ * @param value value replacing the tag
+ * @param expected specifies if the tag is expected to present; if <code>true</code> and the tag
+ * is not present, an exception is thrown; if <code>false</code> and the tag is
+ * not present, the original string is returned
+ * @param maxreplacements Set -1 to replace each occurence of tag, or limit replacements by a given positive number
+ * @return XML or HTML code, the tag replaced
+ * @throws BuildException when template does not contain the tag
+ */
+ protected String replaceTag(
+ String template,
+ String tag,
+ String value,
+ boolean expected,
+ int maxreplacements)
+ throws BuildException
+ {
+ String result = template;
+ int index = result.indexOf(tag);
+ if (index < 0) {
+ if (expected) {
+ // Substring not found but should
+ throw new BuildException(
+ "builder.01",
+ new Object[] {"&lt;" + tag.substring(1, tag.length() - 1) + "&gt;"});
+ }
+ } else {
+ // replace each occurence
+ if (maxreplacements == -1) {
+ return StringUtils.replaceAll(template, tag, value);
+ } else {
+ int found = 1;
+ while (index > -1 && (found <= maxreplacements)) {
+ result = result.substring(0, index) + value + result.substring(index + tag.length());
+ index = result.indexOf(tag);
+ if (index > -1) found += 1;
+ }
+ }
+ }
+ return result;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/CertInfoVerifyXMLSignatureRequestBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/CertInfoVerifyXMLSignatureRequestBuilder.java
new file mode 100644
index 000000000..f4481453b
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/CertInfoVerifyXMLSignatureRequestBuilder.java
@@ -0,0 +1,99 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.builder;
+
+import java.io.IOException;
+import java.text.MessageFormat;
+
+import at.gv.egovernment.moa.id.BuildException;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.FileUtils;
+
+/**
+ * Builder for the <code>&lt;VerifyXMLSignatureRequest&gt;</code> structure
+ * used for presenting certificate information in the secure viewer of the security layer implementation.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class CertInfoVerifyXMLSignatureRequestBuilder extends Builder implements Constants {
+
+ /** special tag in the VerifyXMLRequest template to be substituted for a <code>&lt;dsig:Signature&gt;</code> */
+ private static final String SIGNATURE_TAG = "<dsig:Signature/>";
+
+ /** private static String nl contains the NewLine representation in Java*/
+ private static final String nl = "\n";
+
+ /**
+ * XML template for the CertInfoVerifyXMLSignatureRequest to be built
+ */
+ static final String CERTINFO_REQUEST =
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + nl +
+ "<{0}:VerifyXMLSignatureRequest {2} xmlns:dsig=\"" + DSIG_NS_URI + "\">" + nl +
+ " <{0}:SignatureInfo>" + nl +
+ " <{0}:SignatureEnvironment>" + nl +
+ " <{1}:XMLContent xml:space=\"preserve\"><dsig:Signature/></{1}:XMLContent>" + nl +
+ " </{0}:SignatureEnvironment>" + nl +
+ " <{0}:SignatureLocation>//dsig:Signature</{0}:SignatureLocation>" + nl +
+ " </{0}:SignatureInfo>" + nl +
+ "</{0}:VerifyXMLSignatureRequest>";
+
+ /**
+ * Constructor
+ */
+ public CertInfoVerifyXMLSignatureRequestBuilder() {
+ super();
+ }
+ /**
+ * Builds the <code>&lt;VerifyXMLSignatureRequest&gt;</code> structure.
+ * @return the XML structure
+ * @throws BuildException
+ */
+ public String build(boolean slVersion12) throws BuildException {
+
+ String sl10Prefix;
+ String sl11Prefix;
+ String slNsDeclaration;
+
+ if (slVersion12) {
+
+ sl10Prefix = SL12_PREFIX;
+ sl11Prefix = SL12_PREFIX;
+ slNsDeclaration = "xmlns:" + SL12_PREFIX + "=\"" + SL12_NS_URI + "\"";
+
+ } else {
+
+ sl10Prefix = SL10_PREFIX;
+ sl11Prefix = SL11_PREFIX;
+ slNsDeclaration = "xmlns:" + sl11Prefix + "=\"" + SL11_NS_URI + "\" xmlns:" + sl10Prefix + "=\"" + SL10_NS_URI + "\"";
+
+ }
+
+ String certInfoRequest = MessageFormat.format(CERTINFO_REQUEST, new Object[] {sl11Prefix, sl10Prefix, slNsDeclaration});
+ String resDsigSignature = "resources/xmldata/CertInfoDsigSignature.xml";
+
+
+ try {
+ String dsigSignature = FileUtils.readResource(resDsigSignature, "UTF-8");
+ certInfoRequest = replaceTag(certInfoRequest, SIGNATURE_TAG, dsigSignature, true, 1);
+ return certInfoRequest;
+ }
+ catch (IOException ex) {
+ throw new BuildException("auth.04", new Object[] {resDsigSignature, ex.toString()});
+ }
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/CreateXMLSignatureRequestBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/CreateXMLSignatureRequestBuilder.java
new file mode 100644
index 000000000..c61e2dd84
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/CreateXMLSignatureRequestBuilder.java
@@ -0,0 +1,252 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.builder;
+
+import java.text.MessageFormat;
+import java.util.Calendar;
+
+import at.gv.egovernment.moa.id.auth.data.AuthenticationSession;
+import at.gv.egovernment.moa.id.config.TargetToSectorNameMapper;
+import at.gv.egovernment.moa.id.config.auth.OAAuthParameter;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DateTimeUtils;
+import at.gv.egovernment.moa.util.StringUtils;
+
+/**
+ * Builder for the <code>&lt;CreateXMLSignatureRequest&gt;</code> structure
+ * used for requesting a signature under the authentication block from the
+ * security layer implementation.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class CreateXMLSignatureRequestBuilder implements Constants {
+ /** private static String nl contains the NewLine representation in Java*/
+ private static final String nl = "\n";
+ /**
+ * XML template for the <code>&lt;moa:CreateXMLSignatureRequest&gt;</code> to be built
+ */
+ private static final String CREATE_XML_SIGNATURE_REQUEST =
+ "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" + nl +
+ "<{3}:CreateXMLSignatureRequest xmlns:dsig=''" + DSIG_NS_URI + "'' {5}>" + nl +
+ " <{3}:KeyboxIdentifier>{1}</{3}:KeyboxIdentifier>" + nl +
+ " <{3}:DataObjectInfo Structure=''detached''>" + nl +
+ " <{4}:DataObject Reference=''''/>" + nl +
+ "{2}" +
+ " </{3}:DataObjectInfo>" + nl +
+ " <{3}:SignatureInfo>" + nl +
+ " <{3}:SignatureEnvironment>" + nl +
+ " <{4}:XMLContent>{0}</{4}:XMLContent>" + nl +
+ " </{3}:SignatureEnvironment>" + nl +
+ " <{3}:SignatureLocation xmlns:saml=''" + SAML_NS_URI + "'' Index=''2''>/saml:Assertion</{3}:SignatureLocation>" + nl +
+ " </{3}:SignatureInfo>" + nl +
+ "</{3}:CreateXMLSignatureRequest>";
+
+
+ /**
+ * Constructor for CreateXMLSignatureRequestBuilder.
+ */
+ public CreateXMLSignatureRequestBuilder() {
+ super();
+ }
+
+ /**
+ * Builds the <code>&lt;CreateXMLSignatureRequest&gt;</code>.
+ *
+ * @param authBlock String representation of XML authentication block
+ * @param keyBoxIdentifier the key box identifier which will be used (e.g. CertifiedKeypair)
+ * @param slVersion12 specifies whether the Security Layer version number is 1.2 or not
+ * @return String representation of <code>&lt;CreateXMLSignatureRequest&gt;</code>
+ */
+ public String build(String authBlock, String keyBoxIdentifier, String[] dsigTransformInfos, boolean slVersion12) {
+
+ String sl10Prefix;
+ String sl11Prefix;
+ String slNsDeclaration;
+
+ String dsigTransformInfosString = "";
+ for (int i = 0; i < dsigTransformInfos.length; i++) {
+ dsigTransformInfosString += dsigTransformInfos[i];
+ }
+
+ if (slVersion12) {
+
+ // replace the SecurityLayer namespace prefixes and URIs within the transforms
+ dsigTransformInfosString = StringUtils.changeSLVersion(dsigTransformInfosString,
+ SL10_PREFIX, SL12_PREFIX,
+ SL10_NS_URI, SL12_NS_URI);
+ sl10Prefix = SL12_PREFIX;
+ sl11Prefix = SL12_PREFIX;
+ slNsDeclaration = "xmlns:" + SL12_PREFIX + "='" + SL12_NS_URI + "'";
+
+ } else {
+
+ sl10Prefix = SL10_PREFIX;
+ sl11Prefix = SL11_PREFIX;
+ slNsDeclaration = "xmlns:" + sl10Prefix + "='" + SL10_NS_URI + "' xmlns:" + sl11Prefix + "='" + SL11_NS_URI + "'";
+
+ }
+
+ String request = MessageFormat.format(
+ CREATE_XML_SIGNATURE_REQUEST, new Object[] { authBlock,
+ keyBoxIdentifier,
+ dsigTransformInfosString,
+ sl11Prefix,
+ sl10Prefix,
+ slNsDeclaration });
+
+ return request;
+ }
+
+ /**
+ * Builds the <code>&lt;CreateXMLSignatureRequest&gt;</code> for a foreign ID.
+ *
+ * @param subject the subject of the foreign certificate
+ * @param oaParam parameter for the OA
+ * @param session current session
+ * @return String representation of <code>&lt;CreateXMLSignatureRequest&gt;</code>
+ */
+ public String buildForeignID(String subject, OAAuthParameter oaParam, AuthenticationSession session) {
+
+ String target = session.getTarget();
+ String sectorName = TargetToSectorNameMapper.getSectorNameViaTarget(target);
+
+ Calendar cal = Calendar.getInstance();
+ String date = DateTimeUtils.buildDate(cal);
+ String time = DateTimeUtils.buildTime(cal);
+
+ String request = "";
+ request += "<sl:CreateXMLSignatureRequest xmlns:sl=\"http://www.buergerkarte.at/namespaces/securitylayer/1.2#\">";
+ request += "<sl:KeyboxIdentifier>SecureSignatureKeypair</sl:KeyboxIdentifier>";
+ request += "<sl:DataObjectInfo Structure=\"enveloping\">";
+ request += "<sl:DataObject>";
+ request += "<sl:XMLContent>";
+
+ request += "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
+ request += "<head>";
+ request += "<title>Signatur der Anmeldedaten</title>";
+ request += "<style type=\"text/css\" media=\"screen\">";
+ request += ".normalstyle { font-size: medium; }";
+ request += ".italicstyle { font-size: medium; font-style: italic; }";
+ request += ".titlestyle{ text-decoration:underline; font-weight:bold; font-family: Verdana; font-size: medium; }";
+ request += ".h4style{ font-size: large; font-family: Verdana; }";
+ request += "</style>";
+
+// request += "<style type=\"text/css\" media=\"screen\">.boldstyle { font-weight: bold; } .italicstyle { font-style: italic; } .annotationstyle { font-size: small; } .graybground {background-color: #E0E0E0;}";
+// request += ".titlestyle{ text-decoration:underline; font-weight:bold; font-family: Verdana; font-size: x-small; }";
+// request += ".h4style{ font-family: Verdana; }";
+// request += "table.parameters { font-size: x-small; }";
+// request += "</style>";
+ request += "</head>";
+ request += "<body>";
+ request += "<h4 class=\"h4style\">Authentication Data:</h4>";
+ request += "<p class=\"titlestyle\">Personal Data</p>";
+ request += "<table class=\"parameters\">";
+ request += "<tr>";
+ request += "<td class=\"italicstyle\">Name:</td>";
+ request += "<td class=\"normalstyle\">";
+ request += subject;
+ request += "</td>";
+ request += "</tr>";
+ request += "</table>";
+ request += "<p class=\"titlestyle\">Application Data</p>";
+ request += "<table class=\"parameters\">";
+ request += "<tr>";
+ request += "<td class=\"italicstyle\">Name:</td>";
+ request += "<td class=\"normalstyle\">";
+ // friendlyname from OA
+ request += StringUtils.isEmpty(oaParam.getFriendlyName()) ? "" : oaParam.getFriendlyName();
+ request += "</td>";
+ request += "</tr>";
+ request += "<tr>";
+ request += "<td class=\"italicstyle\">Country:</td>";
+ request += "<td class=\"normalstyle\">Austria</td>";
+ request += "</tr>";
+ request += "</table>";
+ request += "<p class=\"titlestyle\">Technical Parameters</p>";
+ request += "<table class=\"parameters\">";
+ request += "<tr>";
+ request += "<td class=\"italicstyle\">URL:</td>";
+ request += "<td class=\"normalstyle\">";
+ //public URL prefix from OA
+ request += oaParam.getPublicURLPrefix();
+ request += "</td>";
+ request += "</tr>";
+ boolean business = oaParam.getBusinessService();
+ if (business) {
+ // OA is businessservice
+ String identifierType = oaParam.getIdentityLinkDomainIdentifierType();
+ String identifier = oaParam.getIdentityLinkDomainIdentifier();
+ request += "<tr>";
+ request += "<td class=\"italicstyle\">";
+ request += identifierType + ":";
+ request += "</td>";
+ request += "<td class=\"normalstyle\">";
+ request += identifier;
+ request += "</td>";
+ request += "</tr>";
+ }
+ else {
+ // OA is publicservice
+ request += "<tr>";
+ request += "<td class=\"italicstyle\">";
+ request += "Sector:</td>";
+ request += "<td class=\"normalstyle\">";
+ request += target + " (" + sectorName + ")";
+ request += "</td>";
+ request += "</tr>";
+
+ }
+
+ request += "<tr>";
+ request += "<td class=\"italicstyle\">Date:</td>";
+ request += "<td class=\"normalstyle\">";
+ request += date;
+ request += "</td>";
+ request += "</tr>";
+ request += "<tr>";
+ request += "<td class=\"italicstyle\">Time:</td>";
+ request += "<td class=\"normalstyle\">";
+ request += time;
+ request += "</td>";
+ request += "</tr>";
+ request += "</table>";
+
+ request += "<p class=\"normalstyle\">I hereby request to access this e-government application by using my " +
+ "domestic electronic identity. <br/>" +
+ "I further affirm that I am not yet registered with the Austrian Central " +
+ "Residents Registry and that I am not obliged to register with the Austrian " +
+ "Central Residents Registry according to Austrian law.<br/>" +
+ "In the event I am not yet registered with the Supplementary Register, I " +
+ "explicitly grant to do so according to §6 (5) E-Government Act (EGovG, idF: " +
+ "BGBl. I Nr. 7/2008 und BGBl. I Nr. 59/2008).</p>";
+
+ request += "</body>";
+ request += "</html>";
+
+ request += "</sl:XMLContent>";
+ request += "</sl:DataObject>";
+ request += "<sl:TransformsInfo>";
+ request += "<sl:FinalDataMetaInfo>";
+ request += "<sl:MimeType>application/xhtml+xml</sl:MimeType>";
+ request += "</sl:FinalDataMetaInfo>";
+ request += "</sl:TransformsInfo>";
+ request += "</sl:DataObjectInfo>";
+ request += "</sl:CreateXMLSignatureRequest>";
+
+ return request;
+ }
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/CreateXMLSignatureRequestBuilderForeign.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/CreateXMLSignatureRequestBuilderForeign.java
new file mode 100644
index 000000000..9227d5303
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/CreateXMLSignatureRequestBuilderForeign.java
@@ -0,0 +1,126 @@
+package at.gv.egovernment.moa.id.auth.builder;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.io.StringWriter;
+
+import at.gv.egovernment.moa.id.BuildException;
+
+
+/**
+ * Builder for CreateXMLSignatureRequest to sign data from a foreign
+ * eID card.
+ *
+ */
+
+public class CreateXMLSignatureRequestBuilderForeign extends Builder {
+
+ /** special tag in the XML template to be substituted for the KeyboxIdentifier */
+ private static final String KEYBOXID_TAG = "<KEYBOXID>";
+ /** special tag in the XML template to be substituted for the content */
+ private static final String XMLCONTENT_TAG = "<XMLContent>";
+ /** private static int all contains the representation to replace all tags*/
+ private static final int ALL = -1;
+
+ /** default HTML template */
+ private static final String DEFAULT_XML_TEMPLATE =
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
+ "<sl:CreateXMLSignatureRequest xmlns:sl=\"http://www.buergerkarte.at/namespaces/securitylayer/1.2#\">" +
+ "<sl:KeyboxIdentifier>" + KEYBOXID_TAG + "</sl:KeyboxIdentifier>" +
+ "<sl:DataObjectInfo Structure=\"enveloping\">" +
+ "<sl:DataObject>" +
+ "<sl:XMLContent>" + XMLCONTENT_TAG + "</sl:XMLContent>" +
+ "</sl:DataObject>" +
+ "<sl:TransformsInfo>" +
+ "<sl:FinalDataMetaInfo>" +
+ "<sl:MimeType>text/plain</sl:MimeType>" +
+ "</sl:FinalDataMetaInfo>" +
+ "</sl:TransformsInfo>" +
+ "</sl:DataObjectInfo>" +
+ "</sl:CreateXMLSignatureRequest>";
+
+ /** default HTML template */
+ private static final String DEFAULT_XHTML_TEMPLATE =
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
+ "<sl:CreateXMLSignatureRequest xmlns:sl=\"http://www.buergerkarte.at/namespaces/securitylayer/1.2#\">" +
+ "<sl:KeyboxIdentifier>" + KEYBOXID_TAG + "</sl:KeyboxIdentifier>" +
+ "<sl:DataObjectInfo Structure=\"enveloping\">" +
+ "<sl:DataObject>" +
+ "<sl:XMLContent>" + XMLCONTENT_TAG + "</sl:XMLContent>" +
+ "</sl:DataObject>" +
+ "<sl:TransformsInfo>" +
+ "<sl:FinalDataMetaInfo>" +
+ "<sl:MimeType>application/xhtml+xml</sl:MimeType>" +
+ "</sl:FinalDataMetaInfo>" +
+ "</sl:TransformsInfo>" +
+ "</sl:DataObjectInfo>" +
+ "</sl:CreateXMLSignatureRequest>";
+
+ /**
+ * Constructor for CreateXMLSignatureRequestBuilderForeign.
+ */
+ public CreateXMLSignatureRequestBuilderForeign() {
+ super();
+ }
+ /**
+ * Builds the XML request.
+ *
+ * @param xmlRequest XML Request to be sent as a parameter in the form
+ * @param bkuURL URL of the "B&uuml;rgerkartenumgebung" the form will be submitted to;
+ * may be <code>null</code>, in this case the default URL will be used
+ * @param dataURL DataURL to be sent as a parameter in the form
+ */
+ public String build(
+ String keyboxIdentifier,
+ String xmlContent)
+ throws BuildException
+ {
+ String xmlRequest = DEFAULT_XHTML_TEMPLATE;
+ xmlRequest = replaceTag(xmlRequest, KEYBOXID_TAG, keyboxIdentifier, true, ALL);
+ //htmlForm = replaceTag(htmlForm, XMLREQUEST_TAG, encodeParameter(xmlRequest), true, ALL);
+ xmlRequest = replaceTag(xmlRequest, XMLCONTENT_TAG, xmlContent, true, ALL);
+ return xmlRequest;
+ }
+ /**
+ * Encodes a string for inclusion as a parameter in the form.
+ * Double quotes are substituted by <code>"&amp;quot;"</code>.
+ * @param s the string to be encoded
+ * @return the string encoded
+ * @throws BuildException on any exception encountered
+ */
+ public static String encodeParameter(String s) throws BuildException {
+ StringReader in = new StringReader(s);
+ StringWriter out = new StringWriter();
+ try {
+ for (int ch = in.read(); ch >= 0; ch = in.read()) {
+ if (ch == '"')
+ out.write("&quot;");
+ else if (ch == '<')
+ out.write("&lt;");
+ else if (ch == '>')
+ out.write("&gt;");
+ else if (ch == 'ä')
+ out.write("&auml;");
+ else if (ch == 'ö')
+ out.write("&ouml;");
+ else if (ch == 'ü')
+ out.write("&uuml;");
+ else if (ch == 'Ä')
+ out.write("&Auml;");
+ else if (ch == 'Ö')
+ out.write("&Ouml;");
+ else if (ch == 'Ü')
+ out.write("&Uuml;");
+ else if (ch == 'ß')
+ out.write("&szlig;");
+ else
+ out.write(ch);
+ }
+ }
+ catch (IOException ex) {
+ throw new BuildException("builder.00", new Object[] {"GetIdentityLinkForm", ex.toString()});
+ }
+ return out.toString();
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/DataURLBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/DataURLBuilder.java
new file mode 100644
index 000000000..4048f3c0a
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/DataURLBuilder.java
@@ -0,0 +1,98 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.builder;
+
+import at.gv.egovernment.moa.id.auth.servlet.AuthServlet;
+import at.gv.egovernment.moa.id.config.ConfigurationException;
+import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
+import at.gv.egovernment.moa.id.util.MOAIDMessageProvider;
+import at.gv.egovernment.moa.logging.Logger;
+
+/**
+ * Builds a DataURL parameter meant for the security layer implementation
+ * to respond to.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class DataURLBuilder {
+
+ /**
+ * Constructor for DataURLBuilder.
+ */
+ public DataURLBuilder() {
+ super();
+ }
+
+ /**
+ * Constructs a data URL for <code>VerifyIdentityLink</code> or <code>VerifyAuthenticationBlock</code>,
+ * including the <code>MOASessionID</code> as a parameter.
+ *
+ * @param authBaseURL base URL (context path) of the MOA ID Authentication component,
+ * including a trailing <code>'/'</code>
+ * @param authServletName request part of the data URL
+ * @param sessionID sessionID to be included in the dataURL
+ * @return String
+ */
+ public String buildDataURL(String authBaseURL, String authServletName, String sessionID) {
+
+ String individualDataURLPrefix = null;
+ String dataURL;
+ try {
+ //check if an individual prefix is configured
+ individualDataURLPrefix = AuthConfigurationProvider.getInstance().
+ getGenericConfigurationParameter(AuthConfigurationProvider.INDIVIDUAL_DATA_URL_PREFIX);
+
+ if (null != individualDataURLPrefix) {
+
+ //check individualDataURLPrefix
+ if(!individualDataURLPrefix.startsWith("http"))
+ throw(new ConfigurationException("config.13", new Object[] { individualDataURLPrefix}));
+
+ //when ok then use it
+ dataURL = individualDataURLPrefix + authServletName;
+ } else
+ dataURL = authBaseURL + authServletName;
+
+ } catch (ConfigurationException e) {
+ Logger.warn(e);
+ Logger.warn(MOAIDMessageProvider.getInstance().getMessage("config.12", new Object[] { authBaseURL } ));
+ dataURL = authBaseURL + authServletName;
+ }
+
+ dataURL = addParameter(dataURL, AuthServlet.PARAM_SESSIONID, sessionID);
+ return dataURL;
+ }
+
+ /**
+ * Method addParameter.
+ * @param urlString represents the url
+ * @param paramname is the parameter to be added
+ * @param value is the value of that parameter
+ * @return String
+ */
+ private String addParameter(String urlString, String paramname, String value) {
+ String url = urlString;
+ if (paramname != null) {
+ if (url.indexOf("?") < 0)
+ url += "?";
+ else
+ url += "&";
+ url += paramname + "=" + value;
+ }
+ return url;
+ }
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilder.java
new file mode 100644
index 000000000..9bab8643f
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilder.java
@@ -0,0 +1,231 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.builder;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.io.StringWriter;
+
+import at.gv.egovernment.moa.id.BuildException;
+
+/**
+ * Builder for HTML form requesting the security layer implementation
+ * to get the identity link from smartcard by a <code>&lt;InfoboxReadRequest&gt;</code>.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class GetIdentityLinkFormBuilder extends Builder {
+ /** private static String NL contains the NewLine representation in Java*/
+ private static final String nl = "\n";
+ /** special tag in the HTML template to be substituted for the BKU URL */
+ private static final String BKU_TAG = "<BKU>";
+ /** special tag in the HTML template to be substituted for the XML request */
+ private static final String XMLREQUEST_TAG = "<XMLRequest>";
+ /** special tag in the HTML template to be substituted for the data URL */
+ private static final String DATAURL_TAG = "<DataURL>";
+ /** special tag in the HTML template to be substituted for certificate info XML request */
+ private static final String CERTINFO_XMLREQUEST_TAG = "<CertInfoXMLRequest>";
+ /** special tag in the HTML template to be substituted for the certificate info data URL */
+ private static final String CERTINFO_DATAURL_TAG = "<CertInfoDataURL>";
+ /** special tag in the HTML template to be substituted for the infoboxes to be pushed from the BKU */
+ private static final String PUSHINFOBOX_TAG = "<PushInfobox>";
+ /** private static int all contains the representation to replace all tags*/
+ private static final int ALL = -1;
+
+ /** default HTML template */
+ private static final String DEFAULT_HTML_TEMPLATE =
+ "<html>" + nl +
+ "<head>" + nl +
+ "<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">" + nl +
+ "<title>Anmeldung mit B&uuml;rgerkarte</title>" + nl +
+ "</head>" + nl +
+ "<body>" + nl +
+ "<form name=\"GetIdentityLinkForm\"" + nl +
+ " action=\"" + BKU_TAG + "\"" + nl +
+ " method=\"post\">" + nl +
+ " <input type=\"hidden\" " + nl +
+ " name=\"XMLRequest\"" + nl +
+ " value=\"" + XMLREQUEST_TAG + "\"/>" + nl +
+ " <input type=\"hidden\" " + nl +
+ " name=\"DataURL\"" + nl +
+ " value=\"" + DATAURL_TAG + "\"/>" + nl +
+ " <input type=\"hidden\" " + nl +
+ " name=\"PushInfobox\"" + nl +
+ " value=\"" + PUSHINFOBOX_TAG + "\"/>" + nl +
+ " <input type=\"submit\" value=\"Anmeldung mit B&uuml;rgerkarte\"/>" + nl +
+ "</form>" + nl +
+ "<form name=\"CertificateInfoForm\"" + nl +
+ " action=\"" + BKU_TAG + "\"" + nl +
+ " method=\"post\">" + nl +
+ " <input type=\"hidden\" " + nl +
+ " name=\"XMLRequest\"" + nl +
+ " value=\"" + CERTINFO_XMLREQUEST_TAG + "\"/>" + nl +
+ " <input type=\"hidden\" " + nl +
+ " name=\"DataURL\"" + nl +
+ " value=\"" + CERTINFO_DATAURL_TAG + "\"/>" + nl +
+// " <input type=\"submit\" value=\"Information zu Wurzelzertifikaten\"/>" + nl +
+ " <input type=\"hidden\" value=\"Information zu Wurzelzertifikaten\"/>" + nl +
+ "</form>" + nl +
+ "</body>" + nl +
+ "</html>";
+
+ /** default HTML template */
+ private static final String DEFAULT_HTML_TEMPLATE_FOR_MANDATES =
+ "<html>" + nl +
+ "<head>" + nl +
+ "<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">" + nl +
+ "<title>Vollmachten-Anmeldung</title>" + nl +
+ "<script type=\"text/javascript\">" + nl +
+ "window.onload=function() {" + nl +
+ "document.VollmachtenForm.submit();" + nl +
+ "document.VollmachtenForm.Senden.disabled=true;" + nl +
+ "return;" + nl +
+ "}" + nl +
+ "</script>" + nl +
+ "</head>" + nl +
+ "<body>" + nl +
+ "<form name=\"VollmachtenForm\"" + nl +
+ " action=\"" + BKU_TAG + "\"" + nl +
+ " method=\"post\">" + nl +
+ " <input type=\"hidden\" " + nl +
+ " name=\"XMLRequest\"" + nl +
+ " value=\"" + XMLREQUEST_TAG + "\"/>" + nl +
+ " <input type=\"hidden\" " + nl +
+ " name=\"DataURL\"" + nl +
+ " value=\"" + DATAURL_TAG + "\"/>" + nl +
+ " <input type=\"hidden\" " + nl +
+ " name=\"PushInfobox\"" + nl +
+ " value=\"" + PUSHINFOBOX_TAG + "\"/>" + nl +
+ " <input type=\"submit\" value=\"Starte Signatur\" name=\"Senden\"/>" + nl +
+ "</form>" + nl +
+ "<form name=\"CertificateInfoForm\"" + nl +
+ " action=\"" + BKU_TAG + "\"" + nl +
+ " method=\"post\">" + nl +
+ " <input type=\"hidden\" " + nl +
+ " name=\"XMLRequest\"" + nl +
+ " value=\"" + CERTINFO_XMLREQUEST_TAG + "\"/>" + nl +
+ " <input type=\"hidden\" " + nl +
+ " name=\"DataURL\"" + nl +
+ " value=\"" + CERTINFO_DATAURL_TAG + "\"/>" + nl +
+// " <input type=\"submit\" value=\"Information zu Wurzelzertifikaten\"/>" + nl +
+ " <input type=\"hidden\" value=\"Information zu Wurzelzertifikaten\"/>" + nl +
+ "</form>" + nl +
+ "</body>" + nl +
+ "</html>";
+
+ /**
+ * Constructor for GetIdentityLinkFormBuilder.
+ */
+ public GetIdentityLinkFormBuilder() {
+ super();
+ }
+ /**
+ * Builds the HTML form, including XML Request and data URL as parameters.
+ *
+ * @param htmlTemplate template to be used for the HTML form;
+ * may be <code>null</code>, in this case a default layout will be produced
+ * @param xmlRequest XML Request to be sent as a parameter in the form
+ * @param bkuURL URL of the "B&uuml;rgerkartenumgebung" the form will be submitted to;
+ * may be <code>null</code>, in this case the default URL will be used
+ * @param dataURL DataURL to be sent as a parameter in the form
+ */
+ public String build(
+ String htmlTemplate,
+ String bkuURL,
+ String xmlRequest,
+ String dataURL,
+ String certInfoXMLRequest,
+ String certInfoDataURL,
+ String pushInfobox)
+ throws BuildException
+ {
+ String htmlForm = htmlTemplate == null ? DEFAULT_HTML_TEMPLATE : htmlTemplate;
+ htmlForm = replaceTag(htmlForm, BKU_TAG, bkuURL, true, ALL);
+ htmlForm = replaceTag(htmlForm, XMLREQUEST_TAG, encodeParameter(xmlRequest), true, ALL);
+ htmlForm = replaceTag(htmlForm, DATAURL_TAG, dataURL, true, ALL);
+ htmlForm = replaceTag(htmlForm, PUSHINFOBOX_TAG, pushInfobox, false, ALL);
+//new:wird oben mitreplaced htmlForm = replaceTag(htmlForm, BKU_TAG, bkuURL);
+ htmlForm = replaceTag(htmlForm, CERTINFO_XMLREQUEST_TAG, encodeParameter(certInfoXMLRequest), true, ALL);
+ htmlForm = replaceTag(htmlForm, CERTINFO_DATAURL_TAG, certInfoDataURL, true, ALL);
+ return htmlForm;
+ }
+
+ /**
+ * Builds the HTML form, including XML Request and data URL as parameters.
+ *
+ * @param htmlTemplate template to be used for the HTML form;
+ * may be <code>null</code>, in this case a default layout will be produced
+ * @param xmlRequest XML Request to be sent as a parameter in the form
+ * @param bkuURL URL of the "B&uuml;rgerkartenumgebung" the form will be submitted to;
+ * may be <code>null</code>, in this case the default URL will be used
+ * @param dataURL DataURL to be sent as a parameter in the form
+ */
+ public String buildCreateSignature(
+ String bkuURL,
+ String xmlRequest,
+ String dataURL)
+ throws BuildException
+ {
+ String htmlForm = DEFAULT_HTML_TEMPLATE_FOR_MANDATES;
+ htmlForm = replaceTag(htmlForm, BKU_TAG, bkuURL, true, ALL);
+ htmlForm = replaceTag(htmlForm, XMLREQUEST_TAG, encodeParameter(xmlRequest), true, ALL);
+ htmlForm = replaceTag(htmlForm, DATAURL_TAG, dataURL, true, ALL);
+ return htmlForm;
+ }
+ /**
+ * Encodes a string for inclusion as a parameter in the form.
+ * Double quotes are substituted by <code>"&amp;quot;"</code>.
+ * @param s the string to be encoded
+ * @return the string encoded
+ * @throws BuildException on any exception encountered
+ */
+ public static String encodeParameter(String s) throws BuildException {
+ StringReader in = new StringReader(s);
+ StringWriter out = new StringWriter();
+ try {
+ for (int ch = in.read(); ch >= 0; ch = in.read()) {
+ if (ch == '"')
+ out.write("&quot;");
+ else if (ch == '<')
+ out.write("&lt;");
+ else if (ch == '>')
+ out.write("&gt;");
+ else if (ch == 'ä')
+ out.write("&auml;");
+ else if (ch == 'ö')
+ out.write("&ouml;");
+ else if (ch == 'ü')
+ out.write("&uuml;");
+ else if (ch == 'Ä')
+ out.write("&Auml;");
+ else if (ch == 'Ö')
+ out.write("&Ouml;");
+ else if (ch == 'Ü')
+ out.write("&Uuml;");
+ else if (ch == 'ß')
+ out.write("&szlig;");
+ else
+ out.write(ch);
+ }
+ }
+ catch (IOException ex) {
+ throw new BuildException("builder.00", new Object[] {"GetIdentityLinkForm", ex.toString()});
+ }
+ return out.toString();
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/GetVerifyAuthBlockFormBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/GetVerifyAuthBlockFormBuilder.java
new file mode 100644
index 000000000..a94c705a6
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/GetVerifyAuthBlockFormBuilder.java
@@ -0,0 +1,101 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.builder;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.io.StringWriter;
+
+import at.gv.egovernment.moa.id.BuildException;
+
+/**
+ * Builder for HTML form requesting a security layer request
+ *
+ * @author Peter Danner
+ * @version $Id: GetIdentityLinkFormBuilder.java 769 2007-01-10 15:37:52Z peter.danner $
+ */
+public class GetVerifyAuthBlockFormBuilder extends Builder {
+ /** private static String NL contains the NewLine representation in Java*/
+ private static final String nl = "\n";
+ /** special tag in the HTML template to be substituted for the BKU URL */
+ private static final String BKU_TAG = "<BKU>";
+ /** special tag in the HTML template to be substituted for the XML request */
+ private static final String XMLREQUEST_TAG = "<XMLRequest>";
+ /** special tag in the HTML template to be substituted for the data URL */
+ private static final String DATAURL_TAG = "<DataURL>";
+ /** special tag in the HTML template to be substituted for the infoboxes to be pushed from the BKU */
+ private static final String PUSHINFOBOX_TAG = "<PushInfobox>";
+ /** private static int all contains the representation to replace all tags*/
+ private static final int ALL = -1;
+
+ /** default HTML template */
+ private static final String DEFAULT_HTML_TEMPLATE =
+ "<html>" + nl +
+ " <head>" + nl +
+ " <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\"/>" + nl +
+ " <title>Signatur der Anmeldedaten</title>" + nl +
+ " </head>" + nl +
+ " <body onLoad=\"autoSubmit()\">" + nl +
+ " <script type=\"text/javascript\">" + nl +
+ " //<!-- " + nl +
+ " function autoSubmit() { " + nl +
+ " document.VerifyAuthBlockForm.submitButton.disabled=true;" + nl +
+ " document.VerifyAuthBlockForm.submit(); " + nl +
+ " } //-->" + nl +
+ " </script>" + nl +
+ " <form name=\"VerifyAuthBlockForm\" action=\"" + BKU_TAG + "\" method=\"post\" enctype=\"application/x-www-form-urlencoded\">" + nl +
+ " <input type=\"hidden\" name=\"XMLRequest\" value=\"" + XMLREQUEST_TAG + "\"/>" + nl +
+ " <input type=\"hidden\" name=\"DataURL\" value=\"" + DATAURL_TAG + "\"/>" + nl +
+ " <input type=\"hidden\" name=\"PushInfobox\" value=\"" + PUSHINFOBOX_TAG + "\"/>" + nl +
+ " <input type=\"submit\" value=\"Signieren der Anmeldedaten\" id=\"submitButton\"/>" + nl +
+ " </form>" + nl +
+ " </body>" + nl +
+ "</html>";
+
+ /**
+ * Constructor for GetVerifyAuthBlockFormBuilder.
+ */
+ public GetVerifyAuthBlockFormBuilder() {
+ super();
+ }
+ /**
+ * Builds the HTML form, including XML Request and data URL as parameters.
+ *
+ * @param htmlTemplate template to be used for the HTML form;
+ * may be <code>null</code>, in this case a default layout will be produced
+ * @param xmlRequest XML Request to be sent as a parameter in the form
+ * @param bkuURL URL of the "B&uuml;rgerkartenumgebung" the form will be submitted to;
+ * may be <code>null</code>, in this case the default URL will be used
+ * @param dataURL DataURL to be sent as a parameter in the form
+ */
+ public String build(
+ String htmlTemplate,
+ String bkuURL,
+ String xmlRequest,
+ String dataURL,
+ String pushInfobox)
+ throws BuildException
+ {
+ String htmlForm = htmlTemplate == null ? DEFAULT_HTML_TEMPLATE : htmlTemplate;
+ htmlForm = replaceTag(htmlForm, BKU_TAG, bkuURL, true, ALL);
+ htmlForm = replaceTag(htmlForm, XMLREQUEST_TAG, GetIdentityLinkFormBuilder.encodeParameter(xmlRequest), true, ALL);
+ htmlForm = replaceTag(htmlForm, DATAURL_TAG, dataURL, true, ALL);
+ if (null==pushInfobox) pushInfobox="";
+ htmlForm = replaceTag(htmlForm, PUSHINFOBOX_TAG, pushInfobox, false, ALL);
+ return htmlForm;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/InfoboxReadRequestBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/InfoboxReadRequestBuilder.java
new file mode 100644
index 000000000..030c68d48
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/InfoboxReadRequestBuilder.java
@@ -0,0 +1,101 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.builder;
+
+import at.gv.egovernment.moa.util.Constants;
+
+/**
+ * Builder for the <code>&lt;InfoboxReadRequest&gt;</code> structure
+ * used for requesting the identity link from the security layer implementation.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class InfoboxReadRequestBuilder implements Constants {
+
+
+ /**
+ * Constructor for InfoboxReadRequestBuilder.
+ */
+ public InfoboxReadRequestBuilder() {
+ }
+
+
+ /**
+ * Builds an <code>&lt;InfoboxReadRequest&gt;</code>.
+ *
+ * @param slVersion12 specifies whether the Security Layer version is
+ * version 1.2 or not
+ * @param businessService specifies whether the online application is a
+ * business service or not
+ * @param identityLinkDomainIdentifier the identification number of the business
+ * company; maybe <code>null</code> if the OA
+ * is a public service; must not be <code>null</code>
+ * if the OA is a business service
+ *
+ * @return <code>&lt;InfoboxReadRequest&gt;</code> as String
+ */
+ public String build(boolean slVersion12, boolean businessService, String identityLinkDomainIdentifier) {
+
+ String slPrefix;
+ String slNsDeclaration;
+
+ if (slVersion12) {
+ slPrefix = SL12_PREFIX;
+ slNsDeclaration = SL12_NS_URI;
+ } else {
+ slPrefix = SL10_PREFIX;
+ slNsDeclaration = SL10_NS_URI;
+ }
+
+ StringBuffer sb = new StringBuffer("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>");
+ sb.append("<");
+ sb.append(slPrefix);
+ sb.append(":InfoboxReadRequest xmlns:");
+ sb.append(slPrefix);
+ sb.append("=\"");
+ sb.append(slNsDeclaration);
+ sb.append("\">");
+ sb.append("<");
+ sb.append(slPrefix);
+ sb.append(":InfoboxIdentifier>IdentityLink</");
+ sb.append(slPrefix);
+ sb.append(":InfoboxIdentifier>");
+ sb.append("<");
+ sb.append(slPrefix);
+ sb.append(":BinaryFileParameters ContentIsXMLEntity=\"true\"/>");
+ if (businessService) {
+ sb.append("<");
+ sb.append(slPrefix);
+ sb.append(":BoxSpecificParameters>");
+ sb.append("<");
+ sb.append(slPrefix);
+ sb.append(":IdentityLinkDomainIdentifier>");
+ sb.append(identityLinkDomainIdentifier);
+ sb.append("</sl:IdentityLinkDomainIdentifier>");
+ sb.append("</");
+ sb.append(slPrefix);
+ sb.append(":BoxSpecificParameters>");
+ }
+ sb.append("</");
+ sb.append(slPrefix);
+ sb.append(":InfoboxReadRequest>");
+
+ return sb.toString();
+
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/InfoboxReadRequestBuilderCertificate.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/InfoboxReadRequestBuilderCertificate.java
new file mode 100644
index 000000000..60feb7d2f
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/InfoboxReadRequestBuilderCertificate.java
@@ -0,0 +1,94 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.builder;
+
+import at.gv.egovernment.moa.util.Constants;
+
+/**
+ * Builder for the <code>&lt;InfoboxReadRequest&gt;</code> structure
+ * used for requesting the identity link from the security layer implementation.
+ *
+ * @author Paul Ivancsics
+ * @version $Id: InfoboxReadRequestBuilder.java 1087 2008-08-28 07:55:59Z mcentner $
+ */
+public class InfoboxReadRequestBuilderCertificate implements Constants {
+
+
+ /**
+ * Constructor for InfoboxReadRequestBuilder.
+ */
+ public InfoboxReadRequestBuilderCertificate() {
+ }
+
+
+ /**
+ * Builds an <code>&lt;InfoboxReadRequest&gt;</code>.
+ *
+ * @param slVersion12 specifies whether the Security Layer version is
+ * version 1.2 or not
+ * @param businessService specifies whether the online application is a
+ * business service or not
+ * @param identityLinkDomainIdentifier the identification number of the business
+ * company; maybe <code>null</code> if the OA
+ * is a public service; must not be <code>null</code>
+ * if the OA is a business service
+ *
+ * @return <code>&lt;InfoboxReadRequest&gt;</code> as String
+ */
+ public String build(boolean slVersion12) {
+
+ String slPrefix;
+ String slNsDeclaration;
+
+ if (slVersion12) {
+ slPrefix = SL12_PREFIX;
+ slNsDeclaration = SL12_NS_URI;
+ } else {
+ slPrefix = SL10_PREFIX;
+ slNsDeclaration = SL10_NS_URI;
+ }
+
+ StringBuffer sb = new StringBuffer("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>");
+ sb.append("<");
+ sb.append(slPrefix);
+ sb.append(":InfoboxReadRequest xmlns:");
+ sb.append(slPrefix);
+ sb.append("=\"");
+ sb.append(slNsDeclaration);
+ sb.append("\">");
+ sb.append("<");
+ sb.append(slPrefix);
+ sb.append(":InfoboxIdentifier>Certificates</");
+ sb.append(slPrefix);
+ sb.append(":InfoboxIdentifier>");
+ sb.append("<");
+ sb.append(slPrefix);
+ sb.append(":AssocArrayParameters>");
+ sb.append("<");
+ sb.append(slPrefix);
+ sb.append(":ReadValue Key=\"SecureSignatureKeypair\"/>");
+ sb.append("</");
+ sb.append(slPrefix);
+ sb.append(":AssocArrayParameters>");
+ sb.append("</");
+ sb.append(slPrefix);
+ sb.append(":InfoboxReadRequest>");
+
+ return sb.toString();
+
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/InfoboxValidatorParamsBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/InfoboxValidatorParamsBuilder.java
new file mode 100644
index 000000000..18744e5f1
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/InfoboxValidatorParamsBuilder.java
@@ -0,0 +1,97 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.builder;
+
+import java.util.List;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.id.auth.data.AuthenticationSession;
+import at.gv.egovernment.moa.id.auth.data.IdentityLink;
+import at.gv.egovernment.moa.id.auth.data.InfoboxValidatorParams;
+import at.gv.egovernment.moa.id.auth.data.InfoboxValidatorParamsImpl;
+import at.gv.egovernment.moa.id.auth.parser.IdentityLinkAssertionParser;
+import at.gv.egovernment.moa.id.config.auth.OAAuthParameter;
+import at.gv.egovernment.moa.id.config.auth.VerifyInfoboxParameter;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+/**
+ * This class provides one method for building parameters needed for
+ * validating an infobox token.
+ *
+ * @author Harald Bratko
+ */
+public class InfoboxValidatorParamsBuilder {
+
+ // hide the default constructor
+ private InfoboxValidatorParamsBuilder() {
+ }
+
+ /**
+ * Builds the parameters passed to the validator class for validating an infobox token.
+ *
+ * @param session The actual Authentication session.
+ * @param verifyInfoboxParameter The configuration parameters for the infobox.
+ * @param infoboxTokenList Contains the infobox token to be validated.
+ * @param oaParam The configuration parameters of the online application
+ *
+ * @return Parameters for validating an infobox token.
+ */
+ public static InfoboxValidatorParams buildInfoboxValidatorParams(
+ AuthenticationSession session,
+ VerifyInfoboxParameter verifyInfoboxParameter,
+ List infoboxTokenList,
+ OAAuthParameter oaParam)
+ {
+ InfoboxValidatorParamsImpl infoboxValidatorParams = new InfoboxValidatorParamsImpl();
+ IdentityLink identityLink = session.getIdentityLink();
+
+ // the infobox token to validate
+ infoboxValidatorParams.setInfoboxTokenList(infoboxTokenList);
+ // configuration parameters
+ infoboxValidatorParams.setTrustProfileID(verifyInfoboxParameter.getTrustProfileID());
+ infoboxValidatorParams.setSchemaLocations(verifyInfoboxParameter.getSchemaLocations());
+ infoboxValidatorParams.setApplicationSpecificParams(verifyInfoboxParameter.getApplicationSpecificParams());
+ // authentication session parameters
+ infoboxValidatorParams.setBkuURL(session.getBkuURL());
+ infoboxValidatorParams.setTarget(session.getTarget());
+ infoboxValidatorParams.setDomainIdentifier(oaParam.getIdentityLinkDomainIdentifier());
+ infoboxValidatorParams.setBusinessApplication(session.getBusinessService());
+ // parameters from the identity link
+ infoboxValidatorParams.setFamilyName(identityLink.getFamilyName());
+ infoboxValidatorParams.setGivenName(identityLink.getGivenName());
+ infoboxValidatorParams.setDateOfBirth(identityLink.getDateOfBirth());
+ if (verifyInfoboxParameter.getProvideStammzahl()) {
+ infoboxValidatorParams.setIdentificationValue(identityLink.getIdentificationValue());
+ }
+ infoboxValidatorParams.setIdentificationType(identityLink.getIdentificationType());
+ infoboxValidatorParams.setPublicKeys(identityLink.getPublicKey());
+ if (verifyInfoboxParameter.getProvideIdentityLink()) {
+ Element identityLinkElem = (Element)identityLink.getSamlAssertion().cloneNode(true);
+ if (!verifyInfoboxParameter.getProvideStammzahl()) {
+ Element identificationValueElem =
+ (Element)XPathUtils.selectSingleNode(identityLinkElem, IdentityLinkAssertionParser.PERSON_IDENT_VALUE_XPATH);
+ if (identificationValueElem != null) {
+ identificationValueElem.getFirstChild().setNodeValue("");
+ }
+ }
+ infoboxValidatorParams.setIdentityLink(identityLinkElem);
+ }
+ infoboxValidatorParams.setHideStammzahl(!oaParam.getProvideStammzahl());
+ return infoboxValidatorParams;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/PersonDataBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/PersonDataBuilder.java
new file mode 100644
index 000000000..ee578fe43
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/PersonDataBuilder.java
@@ -0,0 +1,74 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.builder;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+import at.gv.egovernment.moa.id.BuildException;
+import at.gv.egovernment.moa.id.auth.data.IdentityLink;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+/**
+ * Builder for the <code>lt;pr:Person&gt;</code> element to be inserted
+ * in the authentication data <code>lt;saml:Assertion&gt;</code>.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class PersonDataBuilder {
+
+ /**
+ * Constructor for PersonDataBuilder.
+ */
+ public PersonDataBuilder() {
+ super();
+ }
+ /**
+ * Builds the <code>&lt;pr:Person&gt;</code> element.<br/>
+ * Utilizes the parsed <code>&lt;prPerson&gt;</code> from the identity link
+ * and the information regarding inclusion of <code>"Stammzahl"</code> in the
+ * <code>&lt;pr:Person&gt;</code> data.
+ *
+ * @param identityLink <code>IdentityLink</code> containing the
+ * attribute <code>prPerson</code>
+ * @param provideStammzahl true if <code>"Stammzahl"</code> is to be included;
+ * false otherwise
+ * @return the <code>&lt;pr:Person&gt;</code> element as a String
+ * @throws BuildException on any error
+ */
+ public String build(IdentityLink identityLink, boolean provideStammzahl)
+ throws BuildException {
+
+ try {
+ Element prPerson = (Element)identityLink.getPrPerson().cloneNode(true);
+ if (! provideStammzahl) {
+ Node prIdentification = XPathUtils.selectSingleNode(prPerson, "pr:Identification/pr:Value");
+ //remove IdentificationValue
+ prIdentification.getFirstChild().setNodeValue("");
+ }
+ String xmlString = DOMUtils.serializeNode(prPerson);
+ return xmlString;
+ }
+ catch (Exception ex) {
+ throw new BuildException(
+ "builder.00",
+ new Object[] {"PersonData", ex.toString()},
+ ex);
+ }
+ }
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SAMLArtifactBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SAMLArtifactBuilder.java
new file mode 100644
index 000000000..f0e9c7484
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SAMLArtifactBuilder.java
@@ -0,0 +1,92 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.builder;
+
+import java.io.ByteArrayOutputStream;
+import java.security.MessageDigest;
+
+import at.gv.egovernment.moa.id.BuildException;
+import at.gv.egovernment.moa.id.auth.validator.parep.ParepUtils;
+import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.Base64Utils;
+
+/**
+ * Builder for the SAML artifact, as defined in the
+ * Browser/Artifact profile of SAML.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class SAMLArtifactBuilder {
+
+ /**
+ * The generic configuration parameter for an alternative SourceID.
+ */
+ private static final String GENERIC_CONFIG_PARAM_SOURCEID = "AuthenticationServer.SourceID";
+
+ /**
+ * Constructor for SAMLArtifactBuilder.
+ */
+ public SAMLArtifactBuilder() {
+ super();
+ }
+
+ /**
+ * Builds the SAML artifact, encoded BASE64.
+ * <ul>
+ * <li><code>TypeCode</code>: <code>0x0001</code>.</li>
+ * <li><code>SourceID</code>: SHA-1 hash of the authURL</li>
+ * <li><code>AssertionHandle</code>: SHA-1 hash of the <code>MOASessionID</code></li>
+ * </ul>
+ * @param authURL URL auf the MOA-ID Auth component to be used for construction
+ * of <code>SourceID</code>
+ * @param sessionID <code>MOASessionID</code> to be used for construction
+ * of <code>AssertionHandle</code>
+ * @return the 42-byte SAML artifact, encoded BASE64
+ */
+ public String build(String authURL, String sessionID) throws BuildException {
+ try {
+ MessageDigest md = MessageDigest.getInstance("SHA-1");
+ byte[] sourceID;
+ // alternative sourceId
+ String alternativeSourceID = AuthConfigurationProvider.getInstance().getGenericConfigurationParameter(GENERIC_CONFIG_PARAM_SOURCEID);
+ if (!ParepUtils.isEmpty(alternativeSourceID)) {
+ // if generic config parameter "AuthenticationServer.SourceID" is given, use that sourceID instead of authURL;
+ sourceID = md.digest(alternativeSourceID.getBytes());
+ Logger.info("Building SAMArtifact from sourceID \"" + alternativeSourceID + "\" instead of authURL \"" + authURL + "\".");
+ } else {
+ sourceID = md.digest(authURL.getBytes());
+ }
+ byte[] assertionHandle = md.digest(sessionID.getBytes());
+ ByteArrayOutputStream out = new ByteArrayOutputStream(42);
+ out.write(0);
+ out.write(1);
+ out.write(sourceID, 0, 20);
+ out.write(assertionHandle, 0, 20);
+ byte[] samlArtifact = out.toByteArray();
+ String samlArtifactBase64 = Base64Utils.encode(samlArtifact);
+ return samlArtifactBase64;
+ }
+ catch (Throwable ex) {
+ throw new BuildException(
+ "builder.00",
+ new Object[] {"SAML Artifact, MOASessionID=" + sessionID, ex.toString()},
+ ex);
+ }
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SAMLResponseBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SAMLResponseBuilder.java
new file mode 100644
index 000000000..2978b54a1
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SAMLResponseBuilder.java
@@ -0,0 +1,106 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.builder;
+
+import java.text.MessageFormat;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.id.BuildException;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.StringUtils;
+
+/**
+ * Builder for the <code>lt;samlp:Response&gt;</code> used for passing
+ * result and status information from the <code>GetAuthenticationData</code>
+ * web service.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class SAMLResponseBuilder implements Constants {
+ /** XML - Template for samlp:Response */
+ private static final String RESPONSE =
+ "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" +
+ "<samlp:Response xmlns:samlp=\"" + SAMLP_NS_URI + "\" xmlns:saml=\"" + SAML_NS_URI + "\"" +
+ " ResponseID=\"{0}\" InResponseTo=\"{1}\" MajorVersion=\"1\" MinorVersion=\"0\" IssueInstant=\"{2}\">" +
+ " <samlp:Status>" +
+ " <samlp:StatusCode Value=\"{3}\">" +
+ " {4}" +
+ " </samlp:StatusCode>" +
+ " <samlp:StatusMessage>{5}</samlp:StatusMessage>" +
+ " </samlp:Status>" +
+ " {6}" +
+ "</samlp:Response>";
+ /** XML - Template for samlp:StatusCode */
+ private static final String SUB_STATUS_CODE =
+ "<samlp:StatusCode Value=\"{0}\"></samlp:StatusCode>";
+
+ /**
+ * Constructor for SAMLResponseBuilder.
+ */
+ public SAMLResponseBuilder() {
+ super();
+ }
+ /**
+ * Builds the SAML response.
+ * @param responseID response ID
+ * @param inResponseTo request ID of <code>lt;samlp:Request&gt;</code> responded to
+ * @param issueInstant current timestamp
+ * @param statusCode status code
+ * @param subStatusCode sub-status code refining the status code; may be <code>null</code>
+ * @param statusMessage status message
+ * @param samlAssertion SAML assertion representing authentication data
+ * @return SAML response as a DOM element
+ */
+ public Element build(
+ String responseID,
+ String inResponseTo,
+ String issueInstant,
+ String statusCode,
+ String subStatusCode,
+ String statusMessage,
+ String samlAssertion)
+ throws BuildException {
+
+ try {
+ String xmlSubStatusCode =
+ subStatusCode == null ?
+ "" :
+ MessageFormat.format(SUB_STATUS_CODE, new Object[] {subStatusCode});
+
+ String xmlResponse = MessageFormat.format(RESPONSE, new Object[] {
+ responseID,
+ inResponseTo,
+ issueInstant,
+ statusCode,
+ xmlSubStatusCode,
+ statusMessage,
+ StringUtils.removeXMLDeclaration(samlAssertion) });
+ Element domResponse = DOMUtils.parseDocument(xmlResponse, false, ALL_SCHEMA_LOCATIONS, null).getDocumentElement();
+ return domResponse;
+ }
+ catch (Throwable ex) {
+ throw new BuildException(
+ "builder.00",
+ new Object[] { "samlp:Response", ex.toString() },
+ ex);
+ }
+ }
+
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SelectBKUFormBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SelectBKUFormBuilder.java
new file mode 100644
index 000000000..a291d24df
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SelectBKUFormBuilder.java
@@ -0,0 +1,78 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.builder;
+
+import at.gv.egovernment.moa.id.BuildException;
+
+/**
+ * Builder for the BKU selection form requesting the user to choose
+ * a BKU from a list.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class SelectBKUFormBuilder extends Builder {
+ /** private static String NL contains the NewLine representation in Java*/
+ private static final String nl = "\n";
+ /** special tag in the HTML template to be substituted for the form action which is
+ * a URL of MOA-ID Auth */
+ private static final String ACTION_TAG = "<StartAuth>";
+ /** special tag in the HTML template to be substituted for the <code>&lt;select;gt;</code> tag
+ * containing the BKU selection options */
+ private static final String SELECT_TAG = "<BKUSelect>";
+ /**
+ * Template for the default html-code to be returned as security-layer-selection to be built
+ */
+ private static final String DEFAULT_HTML_TEMPLATE =
+ "<html>" + nl +
+ "<head>" + nl +
+ "<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">" + nl +
+ "<title>Auswahl der B&uuml;rgerkartenumgebung</title>" + nl +
+ "</head>" + nl +
+ "<body>" + nl +
+ "<form name=\"BKUSelectionForm\"" + nl +
+ " action=\"" + ACTION_TAG + "\"" + nl +
+ " method=\"post\">" + nl +
+ SELECT_TAG + nl +
+ " <input type=\"submit\" value=\"B&uuml;rgerkartenumgebung ausw&auml;hlen\"/>" + nl +
+ "</form>" + nl +
+ "</body>" + nl +
+ "</html>";
+
+ /**
+ * Constructor
+ */
+ public SelectBKUFormBuilder() {
+ super();
+ }
+ /**
+ * Method build. Builds the form
+ * @param htmlTemplate to be used
+ * @param startAuthenticationURL the url where the startAuthenticationServlet can be found
+ * @param bkuSelectTag if a special bku should be used
+ * @return String
+ * @throws BuildException on any error
+ */
+ public String build(String htmlTemplate, String startAuthenticationURL, String bkuSelectTag)
+ throws BuildException {
+
+ String htmlForm = htmlTemplate == null ? DEFAULT_HTML_TEMPLATE : htmlTemplate;
+ htmlForm = replaceTag(htmlForm, ACTION_TAG, startAuthenticationURL, true, 1);
+ htmlForm = replaceTag(htmlForm, SELECT_TAG, bkuSelectTag, true, 1);
+ return htmlForm;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/VerifyXMLSignatureRequestBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/VerifyXMLSignatureRequestBuilder.java
new file mode 100644
index 000000000..a6b61e747
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/VerifyXMLSignatureRequestBuilder.java
@@ -0,0 +1,363 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.builder;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+import at.gv.egovernment.moa.id.BuildException;
+import at.gv.egovernment.moa.id.ParseException;
+import at.gv.egovernment.moa.id.auth.data.CreateXMLSignatureResponse;
+import at.gv.egovernment.moa.id.auth.data.IdentityLink;
+import at.gv.egovernment.moa.util.Base64Utils;
+import at.gv.egovernment.moa.util.Constants;
+
+/**
+ * Builder for the <code>&lt;VerifyXMLSignatureRequestBuilder&gt;</code> structure
+ * used for sending the DSIG-Signature of the Security Layer card for validating to MOA-SP.
+ *
+ * @author Stefan Knirsch
+ * @version $Id$
+ */
+public class VerifyXMLSignatureRequestBuilder {
+
+ /** shortcut for XMLNS namespace URI */
+ private static final String XMLNS_NS_URI = Constants.XMLNS_NS_URI;
+ /** shortcut for MOA namespace URI */
+ private static final String MOA_NS_URI = Constants.MOA_NS_URI;
+ /** The DSIG-Prefix */
+ private static final String DSIG = Constants.DSIG_PREFIX + ":";
+
+ /** The document containing the <code>VerifyXMLsignatureRequest</code> */
+ private Document requestDoc_;
+ /** the <code>VerifyXMLsignatureRequest</code> root element */
+ private Element requestElem_;
+
+
+ /**
+ * Builds the body for a <code>VerifyXMLsignatureRequest</code> including the root
+ * element and namespace declarations.
+ *
+ * @throws BuildException If an error occurs on building the document.
+ */
+ public VerifyXMLSignatureRequestBuilder() throws BuildException {
+ try {
+ DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ requestDoc_ = docBuilder.newDocument();
+ requestElem_ = requestDoc_.createElementNS(MOA_NS_URI, "VerifyXMLSignatureRequest");
+ requestElem_.setAttributeNS(XMLNS_NS_URI, "xmlns", MOA_NS_URI);
+ requestElem_.setAttributeNS(XMLNS_NS_URI, "xmlns:" + Constants.DSIG_PREFIX, Constants.DSIG_NS_URI);
+ requestDoc_.appendChild(requestElem_);
+ } catch (Throwable t) {
+ throw new BuildException(
+ "builder.00",
+ new Object[] {"VerifyXMLSignatureRequest", t.toString()},
+ t);
+ }
+ }
+
+
+ /**
+ * Builds a <code>&lt;VerifyXMLSignatureRequest&gt;</code>
+ * from an IdentityLink with a known trustProfileID which
+ * has to exist in MOA-SP
+ * @param identityLink - The IdentityLink
+ * @param trustProfileID - a preconfigured TrustProfile at MOA-SP
+ *
+ * @return Element - The complete request as Dom-Element
+ *
+ * @throws ParseException
+ */
+ public Element build(IdentityLink identityLink, String trustProfileID)
+ throws ParseException
+ {
+ try {
+ // build the request
+ Element dateTimeElem = requestDoc_.createElementNS(MOA_NS_URI, "DateTime");
+ requestElem_.appendChild(dateTimeElem);
+ Node dateTime = requestDoc_.createTextNode(identityLink.getIssueInstant());
+ dateTimeElem.appendChild(dateTime);
+ Element verifiySignatureInfoElem =
+ requestDoc_.createElementNS(MOA_NS_URI, "VerifySignatureInfo");
+ requestElem_.appendChild(verifiySignatureInfoElem);
+ Element verifySignatureEnvironmentElem =
+ requestDoc_.createElementNS(MOA_NS_URI, "VerifySignatureEnvironment");
+ verifiySignatureInfoElem.appendChild(verifySignatureEnvironmentElem);
+ Element base64ContentElem = requestDoc_.createElementNS(MOA_NS_URI, "Base64Content");
+ verifySignatureEnvironmentElem.appendChild(base64ContentElem);
+ // insert the base64 encoded identity link SAML assertion
+ String serializedAssertion = identityLink.getSerializedSamlAssertion();
+ String base64EncodedAssertion = Base64Utils.encode(serializedAssertion.getBytes("UTF-8"));
+ //replace all '\r' characters by no char.
+ StringBuffer replaced = new StringBuffer();
+ for (int i = 0; i < base64EncodedAssertion.length(); i ++) {
+ char c = base64EncodedAssertion.charAt(i);
+ if (c != '\r') {
+ replaced.append(c);
+ }
+ }
+ base64EncodedAssertion = replaced.toString();
+ Node base64Content = requestDoc_.createTextNode(base64EncodedAssertion);
+ base64ContentElem.appendChild(base64Content);
+ // specify the signature location
+ Element verifySignatureLocationElem =
+ requestDoc_.createElementNS(MOA_NS_URI, "VerifySignatureLocation");
+ verifiySignatureInfoElem.appendChild(verifySignatureLocationElem);
+ Node signatureLocation = requestDoc_.createTextNode(DSIG + "Signature");
+ verifySignatureLocationElem.appendChild(signatureLocation);
+ // signature manifest params
+ Element signatureManifestCheckParamsElem =
+ requestDoc_.createElementNS(MOA_NS_URI, "SignatureManifestCheckParams");
+ requestElem_.appendChild(signatureManifestCheckParamsElem);
+ signatureManifestCheckParamsElem.setAttribute("ReturnReferenceInputData", "false");
+ // add the transforms
+ Element referenceInfoElem = requestDoc_.createElementNS(MOA_NS_URI, "ReferenceInfo");
+ signatureManifestCheckParamsElem.appendChild(referenceInfoElem);
+ Element[] dsigTransforms = identityLink.getDsigReferenceTransforms();
+
+ for (int i = 0; i < dsigTransforms.length; i++) {
+ Element verifyTransformsInfoProfileElem =
+ requestDoc_.createElementNS(MOA_NS_URI, "VerifyTransformsInfoProfile");
+ referenceInfoElem.appendChild(verifyTransformsInfoProfileElem);
+ verifyTransformsInfoProfileElem.appendChild(requestDoc_.importNode(dsigTransforms[i], true));
+ }
+ Element returnHashInputDataElem =
+ requestDoc_.createElementNS(MOA_NS_URI, "ReturnHashInputData");
+ requestElem_.appendChild(returnHashInputDataElem);
+ Element trustProfileIDElem = requestDoc_.createElementNS(MOA_NS_URI, "TrustProfileID");
+ trustProfileIDElem.appendChild(requestDoc_.createTextNode(trustProfileID));
+ requestElem_.appendChild(trustProfileIDElem);
+ } catch (Throwable t) {
+ throw new ParseException("builder.00",
+ new Object[] { "VerifyXMLSignatureRequest (IdentityLink)" }, t);
+ }
+
+ return requestElem_;
+ }
+
+ /**
+ * Builds a <code>&lt;VerifyXMLSignatureRequest&gt;</code>
+ * from an IdentityLink with a known trustProfileID which
+ * has to exist in MOA-SP
+ * @param identityLink - The IdentityLink
+ * @param trustProfileID - a preconfigured TrustProfile at MOA-SP
+ *
+ * @return Element - The complete request as Dom-Element
+ *
+ * @throws ParseException
+ */
+ public Element build(byte[]mandate, String trustProfileID)
+ throws ParseException
+ {
+ try {
+ // build the request
+// Element dateTimeElem = requestDoc_.createElementNS(MOA_NS_URI, "DateTime");
+// requestElem_.appendChild(dateTimeElem);
+// Node dateTime = requestDoc_.createTextNode(identityLink.getIssueInstant());
+// dateTimeElem.appendChild(dateTime);
+ Element verifiySignatureInfoElem =
+ requestDoc_.createElementNS(MOA_NS_URI, "VerifySignatureInfo");
+ requestElem_.appendChild(verifiySignatureInfoElem);
+ Element verifySignatureEnvironmentElem =
+ requestDoc_.createElementNS(MOA_NS_URI, "VerifySignatureEnvironment");
+ verifiySignatureInfoElem.appendChild(verifySignatureEnvironmentElem);
+ Element base64ContentElem = requestDoc_.createElementNS(MOA_NS_URI, "Base64Content");
+ verifySignatureEnvironmentElem.appendChild(base64ContentElem);
+ // insert the base64 encoded identity link SAML assertion
+ //String serializedAssertion = identityLink.getSerializedSamlAssertion();
+ //String base64EncodedAssertion = Base64Utils.encode(mandate.getBytes("UTF-8"));
+ String base64EncodedAssertion = Base64Utils.encode(mandate);
+ //replace all '\r' characters by no char.
+ StringBuffer replaced = new StringBuffer();
+ for (int i = 0; i < base64EncodedAssertion.length(); i ++) {
+ char c = base64EncodedAssertion.charAt(i);
+ if (c != '\r') {
+ replaced.append(c);
+ }
+ }
+ base64EncodedAssertion = replaced.toString();
+ Node base64Content = requestDoc_.createTextNode(base64EncodedAssertion);
+ base64ContentElem.appendChild(base64Content);
+ // specify the signature location
+ Element verifySignatureLocationElem =
+ requestDoc_.createElementNS(MOA_NS_URI, "VerifySignatureLocation");
+ verifiySignatureInfoElem.appendChild(verifySignatureLocationElem);
+ Node signatureLocation = requestDoc_.createTextNode(DSIG + "Signature");
+ verifySignatureLocationElem.appendChild(signatureLocation);
+ // signature manifest params
+ Element signatureManifestCheckParamsElem =
+ requestDoc_.createElementNS(MOA_NS_URI, "SignatureManifestCheckParams");
+ requestElem_.appendChild(signatureManifestCheckParamsElem);
+ signatureManifestCheckParamsElem.setAttribute("ReturnReferenceInputData", "false");
+// // add the transforms
+// Element referenceInfoElem = requestDoc_.createElementNS(MOA_NS_URI, "ReferenceInfo");
+// signatureManifestCheckParamsElem.appendChild(referenceInfoElem);
+// Element[] dsigTransforms = identityLink.getDsigReferenceTransforms();
+//
+// for (int i = 0; i < dsigTransforms.length; i++) {
+// Element verifyTransformsInfoProfileElem =
+// requestDoc_.createElementNS(MOA_NS_URI, "VerifyTransformsInfoProfile");
+// referenceInfoElem.appendChild(verifyTransformsInfoProfileElem);
+// verifyTransformsInfoProfileElem.appendChild(requestDoc_.importNode(dsigTransforms[i], true));
+// }
+ Element returnHashInputDataElem =
+ requestDoc_.createElementNS(MOA_NS_URI, "ReturnHashInputData");
+ requestElem_.appendChild(returnHashInputDataElem);
+ Element trustProfileIDElem = requestDoc_.createElementNS(MOA_NS_URI, "TrustProfileID");
+ trustProfileIDElem.appendChild(requestDoc_.createTextNode(trustProfileID));
+ requestElem_.appendChild(trustProfileIDElem);
+ } catch (Throwable t) {
+ throw new ParseException("builder.00",
+ new Object[] { "VerifyXMLSignatureRequest (IdentityLink)" }, t);
+ }
+
+ return requestElem_;
+ }
+
+
+ /**
+ * Builds a <code>&lt;VerifyXMLSignatureRequest&gt;</code>
+ * from the signed AUTH-Block with a known trustProfileID which
+ * has to exist in MOA-SP
+ * @param csr - signed AUTH-Block
+ * @param verifyTransformsInfoProfileID - allowed verifyTransformsInfoProfileID
+ * @param trustProfileID - a preconfigured TrustProfile at MOA-SP
+ * @return Element - The complete request as Dom-Element
+ * @throws ParseException
+ */
+ public Element build(
+ CreateXMLSignatureResponse csr,
+ String[] verifyTransformsInfoProfileID,
+ String trustProfileID)
+ throws BuildException { //samlAssertionObject
+
+ try {
+ // build the request
+// requestElem_.setAttributeNS(Constants.XMLNS_NS_URI, "xmlns:"
+// + Constants.XML_PREFIX, Constants.XMLNS_NS_URI);
+ Element verifiySignatureInfoElem =
+ requestDoc_.createElementNS(MOA_NS_URI, "VerifySignatureInfo");
+ requestElem_.appendChild(verifiySignatureInfoElem);
+ Element verifySignatureEnvironmentElem =
+ requestDoc_.createElementNS(MOA_NS_URI, "VerifySignatureEnvironment");
+ verifiySignatureInfoElem.appendChild(verifySignatureEnvironmentElem);
+ Element xmlContentElem = requestDoc_.createElementNS(MOA_NS_URI, "XMLContent");
+ verifySignatureEnvironmentElem.appendChild(xmlContentElem);
+ xmlContentElem.setAttribute(Constants.XML_PREFIX + ":space", "preserve");
+ // insert the SAML assertion
+ xmlContentElem.appendChild(requestDoc_.importNode(csr.getSamlAssertion(), true));
+ // specify the signature location
+ Element verifySignatureLocationElem =
+ requestDoc_.createElementNS(MOA_NS_URI, "VerifySignatureLocation");
+ verifiySignatureInfoElem.appendChild(verifySignatureLocationElem);
+ Node signatureLocation = requestDoc_.createTextNode(DSIG + "Signature");
+ verifySignatureLocationElem.appendChild(signatureLocation);
+ // signature manifest params
+ Element signatureManifestCheckParamsElem =
+ requestDoc_.createElementNS(MOA_NS_URI, "SignatureManifestCheckParams");
+ requestElem_.appendChild(signatureManifestCheckParamsElem);
+ signatureManifestCheckParamsElem.setAttribute("ReturnReferenceInputData", "true");
+ // add the transform profile IDs
+ Element referenceInfoElem = requestDoc_.createElementNS(MOA_NS_URI, "ReferenceInfo");
+ signatureManifestCheckParamsElem.appendChild(referenceInfoElem);
+ for (int i = 0; i < verifyTransformsInfoProfileID.length; i++) {
+ Element verifyTransformsInfoProfileIDElem =
+ requestDoc_.createElementNS(MOA_NS_URI, "VerifyTransformsInfoProfileID");
+ referenceInfoElem.appendChild(verifyTransformsInfoProfileIDElem);
+ verifyTransformsInfoProfileIDElem.appendChild(
+ requestDoc_.createTextNode(verifyTransformsInfoProfileID[i]));
+ }
+ Element returnHashInputDataElem =
+ requestDoc_.createElementNS(MOA_NS_URI, "ReturnHashInputData");
+ requestElem_.appendChild(returnHashInputDataElem);
+ Element trustProfileIDElem = requestDoc_.createElementNS(MOA_NS_URI, "TrustProfileID");
+ trustProfileIDElem.appendChild(requestDoc_.createTextNode(trustProfileID));
+ requestElem_.appendChild(trustProfileIDElem);
+
+ } catch (Throwable t) {
+ throw new BuildException("builder.00", new Object[] { "VerifyXMLSignatureRequest" }, t);
+ }
+
+ return requestElem_;
+ }
+
+ /**
+ * Builds a <code>&lt;VerifyXMLSignatureRequest&gt;</code>
+ * from the signed data with a known trustProfileID which
+ * has to exist in MOA-SP
+ * @param csr - signed AUTH-Block
+ * @param trustProfileID - a preconfigured TrustProfile at MOA-SP
+ * @return Element - The complete request as Dom-Element
+ * @throws ParseException
+ */
+ public Element buildDsig(
+ CreateXMLSignatureResponse csr,
+ String trustProfileID)
+ throws BuildException { //samlAssertionObject
+
+ try {
+ // build the request
+// requestElem_.setAttributeNS(Constants.XMLNS_NS_URI, "xmlns:"
+// + Constants.XML_PREFIX, Constants.XMLNS_NS_URI);
+
+ Element verifiySignatureInfoElem =
+ requestDoc_.createElementNS(MOA_NS_URI, "VerifySignatureInfo");
+ requestElem_.appendChild(verifiySignatureInfoElem);
+ Element verifySignatureEnvironmentElem =
+ requestDoc_.createElementNS(MOA_NS_URI, "VerifySignatureEnvironment");
+ verifiySignatureInfoElem.appendChild(verifySignatureEnvironmentElem);
+
+ Element xmlContentElem = requestDoc_.createElementNS(MOA_NS_URI, "XMLContent");
+ verifySignatureEnvironmentElem.appendChild(xmlContentElem);
+ xmlContentElem.setAttribute(Constants.XML_PREFIX + ":space", "preserve");
+
+ // insert the dsig:Signature
+ xmlContentElem.appendChild(requestDoc_.importNode(csr.getDsigSignature(), true));
+ // specify the signature location
+ Element verifySignatureLocationElem =
+ requestDoc_.createElementNS(MOA_NS_URI, "VerifySignatureLocation");
+ verifiySignatureInfoElem.appendChild(verifySignatureLocationElem);
+ Node signatureLocation = requestDoc_.createTextNode("/"+ DSIG + "Signature");
+ verifySignatureLocationElem.appendChild(signatureLocation);
+ // signature manifest params
+ Element signatureManifestCheckParamsElem =
+ requestDoc_.createElementNS(MOA_NS_URI, "SignatureManifestCheckParams");
+ requestElem_.appendChild(signatureManifestCheckParamsElem);
+ signatureManifestCheckParamsElem.setAttribute("ReturnReferenceInputData", "true");
+ // add the transform profile IDs
+ Element referenceInfoElem = requestDoc_.createElementNS(MOA_NS_URI, "ReferenceInfo");
+ signatureManifestCheckParamsElem.appendChild(referenceInfoElem);
+
+ Element returnHashInputDataElem =
+ requestDoc_.createElementNS(MOA_NS_URI, "ReturnHashInputData");
+ requestElem_.appendChild(returnHashInputDataElem);
+ Element trustProfileIDElem = requestDoc_.createElementNS(MOA_NS_URI, "TrustProfileID");
+
+ trustProfileIDElem.appendChild(requestDoc_.createTextNode(trustProfileID));
+ requestElem_.appendChild(trustProfileIDElem);
+
+ } catch (Throwable t) {
+ throw new BuildException("builder.00", new Object[] { "VerifyXMLSignatureRequest" }, t);
+ }
+
+ return requestElem_;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/AuthenticationSession.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/AuthenticationSession.java
new file mode 100644
index 000000000..554b5012e
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/AuthenticationSession.java
@@ -0,0 +1,630 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.data;
+
+import iaik.x509.X509Certificate;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+
+import at.gv.egovernment.moa.id.auth.validator.InfoboxValidator;
+import at.gv.egovernment.moa.id.auth.validator.parep.ParepUtils;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.Constants;
+
+/**
+ * Session data to be stored between <code>AuthenticationServer</code> API calls.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class AuthenticationSession {
+
+ private static String TARGET_PREFIX_ = Constants.URN_PREFIX_CDID + "+";
+ private static String REGISTERANDORDNR_PREFIX_ = Constants.URN_PREFIX_WBPK + "+";
+
+ /**
+ * session ID
+ */
+ private String sessionID;
+ /**
+ * "Gesch&auml;ftsbereich" the online application belongs to; maybe <code>null</code>
+ * if the online application is a business application
+ */
+ private String target;
+ /**
+ * public online application URL requested
+ */
+ private String oaURLRequested;
+ /**
+ * public online application URL prefix
+ */
+ private String oaPublicURLPrefix;
+ /**
+ * URL of MOA ID authentication component
+ */
+ private String authURL;
+ /**
+ * HTML template URL
+ */
+ private String templateURL;
+ /**
+ * URL of the BKU
+ */
+ private String bkuURL;
+
+ /**
+ * Use mandate
+ */
+ private boolean useMandate;
+
+ /**
+ * SessionID for MIS
+ */
+ private String misSessionID;
+ /**
+ * identity link read from smartcard
+ */
+ private IdentityLink identityLink;
+ /**
+ * authentication block to be signed by the user
+ */
+ private String authBlock;
+ /**
+ * timestamp logging when authentication session has been created
+ */
+ private Date timestampStart;
+ /**
+ * timestamp logging when identity link has been received
+ */
+ private Date timestampIdentityLink;
+ /**
+ * Indicates whether the corresponding online application is a business
+ * service or not
+ */
+ private boolean businessService;
+
+ /**
+ * Signer certificate of the foreign citizen
+ */
+ private X509Certificate signerCertificate;
+ /**
+ * SAML attributes from an extended infobox validation to be appended
+ * to the SAML assertion delivered to the final online application.
+ */
+ private List extendedSAMLAttributesOA;
+
+ /**
+ * The boolean value for either a target or a wbPK is provided as
+ * SAML Attribute in the SAML Assertion or not.
+ */
+ private boolean samlAttributeGebeORwbpk;
+
+ /**
+ * SAML attributes from an extended infobox validation to be appended
+ * to the SAML assertion of the AUTHBlock.
+ */
+ private List extendedSAMLAttributesAUTH;
+
+ /**
+ * The issuing time of the AUTH-Block SAML assertion.
+ */
+ private String issueInstant;
+
+ /**
+ * If infobox validators are needed after signing, they can be stored in
+ * this list.
+ */
+ private List infoboxValidators;
+
+ /**
+ * The register and number in the register parameter in case of a business
+ * service application.
+ */
+ private String domainIdentifier;
+
+ /**
+ * This string contains all identifiers of infoboxes, the online application
+ * is configured to accept. The infobox identifiers are comma separated.
+ */
+ private String pushInfobox;
+
+ /**
+ * AppSpecificConfiguration entry of then mandates infobox-validator. Tells
+ * whether person data from the representative have to be exchanged by data
+ * from the mandate
+ */
+ private boolean mandateCompatibilityMode = false;
+
+
+
+ /**
+ * Constructor for AuthenticationSession.
+ *
+ * @param id Session ID
+ */
+ public AuthenticationSession(String id) {
+ sessionID = id;
+ setTimestampStart();
+ infoboxValidators = new ArrayList();
+ }
+
+ public X509Certificate getForeignSignerCertificate() {
+ return signerCertificate;
+ }
+
+ public void setForeignSignerCertificate(X509Certificate signerCertificate) {
+ this.signerCertificate = signerCertificate;
+ }
+
+ /**
+ * Returns the identityLink.
+ * @return IdentityLink
+ */
+ public IdentityLink getIdentityLink() {
+ return identityLink;
+ }
+
+ /**
+ * Returns the sessionID.
+ * @return String
+ */
+ public String getSessionID() {
+ return sessionID;
+ }
+
+ /**
+ * Sets the identityLink.
+ * @param identityLink The identityLink to set
+ */
+ public void setIdentityLink(IdentityLink identityLink) {
+ this.identityLink = identityLink;
+ }
+
+ /**
+ * Sets the sessionID.
+ * @param sessionId The sessionID to set
+ */
+ public void setSessionID(String sessionId) {
+ this.sessionID = sessionId;
+ }
+
+ /**
+ * Returns the oaURLRequested.
+ * @return String
+ */
+ public String getOAURLRequested() {
+ return oaURLRequested;
+ }
+
+ /**
+ * Returns the oaURLRequested.
+ * @return String
+ */
+ public String getPublicOAURLPrefix() {
+ return oaPublicURLPrefix;
+ }
+
+ /**
+ * Returns the BKU URL.
+ * @return String
+ */
+ public String getBkuURL() {
+ return bkuURL;
+ }
+
+ /**
+ * Returns the target.
+ * @return String
+ */
+ public String getTarget() {
+ return target;
+ }
+
+ /**
+ * Sets the oaURLRequested.
+ * @param oaURLRequested The oaURLRequested to set
+ */
+ public void setOAURLRequested(String oaURLRequested) {
+ this.oaURLRequested = oaURLRequested;
+ }
+
+ /**
+ * Sets the oaPublicURLPrefix
+ * @param oaPublicURLPrefix The oaPublicURLPrefix to set
+ */
+ public void setPublicOAURLPrefix(String oaPublicURLPrefix) {
+ this.oaPublicURLPrefix = oaPublicURLPrefix;
+ }
+
+ /**
+ * Sets the bkuURL
+ * @param bkuURL The BKU URL to set
+ */
+ public void setBkuURL(String bkuURL) {
+ this.bkuURL = bkuURL;
+ }
+
+ /**
+ * Sets the target. If the target includes the target prefix, the prefix will be stripped off.
+ * @param target The target to set
+ */
+ public void setTarget(String target) {
+ if (target != null && target.startsWith(TARGET_PREFIX_))
+ {
+ // If target starts with prefix "urn:publicid:gv.at:cdid+"; remove prefix
+ this.target = target.substring(TARGET_PREFIX_.length());
+ Logger.debug("Target prefix stripped off; resulting target: " + this.target);
+ }
+ else
+ {
+ this.target = target;
+ }
+ }
+
+ /**
+ * Returns the authURL.
+ * @return String
+ */
+ public String getAuthURL() {
+ return authURL;
+ }
+
+ /**
+ * Sets the authURL.
+ * @param authURL The authURL to set
+ */
+ public void setAuthURL(String authURL) {
+ this.authURL = authURL;
+ }
+
+ /**
+ * Returns the authBlock.
+ * @return String
+ */
+ public String getAuthBlock() {
+ return authBlock;
+ }
+
+ /**
+ * Sets the authBlock.
+ * @param authBlock The authBlock to set
+ */
+ public void setAuthBlock(String authBlock) {
+ this.authBlock = authBlock;
+ }
+
+ /**
+ * Returns the timestampIdentityLink.
+ * @return Date
+ */
+ public Date getTimestampIdentityLink() {
+ return timestampIdentityLink;
+ }
+
+ /**
+ * Returns the businessService.
+ * @return <code>true</code> if the corresponding online application is
+ * a business application, otherwise <code>false</code>
+ */
+ public boolean getBusinessService() {
+ return businessService;
+ }
+
+ /**
+ * Sets the businessService variable.
+ * @param businessService the value for setting the businessService variable.
+ */
+ public void setBusinessService(boolean businessService) {
+ this.businessService = businessService;
+ }
+
+ /**
+ * Returns the timestampStart.
+ * @return Date
+ */
+ public Date getTimestampStart() {
+ return timestampStart;
+ }
+
+ /**
+ * Sets the current date as timestampIdentityLink.
+ */
+ public void setTimestampIdentityLink() {
+ timestampIdentityLink = new Date();
+ }
+
+ /**
+ * Sets the current date as timestampStart.
+ */
+ public void setTimestampStart() {
+ timestampStart = new Date();
+ }
+
+ /**
+ * @return template URL
+ */
+ public String getTemplateURL() {
+ return templateURL;
+ }
+
+ /**
+ * @param string the template URL
+ */
+ public void setTemplateURL(String string) {
+ templateURL = string;
+ }
+
+ /**
+ * Returns the SAML Attributes to be appended to the AUTHBlock. Maybe <code>null</code>.
+ *
+ * @return The SAML Attributes to be appended to the AUTHBlock. Maybe <code>null</code>.
+ */
+ public List getExtendedSAMLAttributesAUTH() {
+ return extendedSAMLAttributesAUTH;
+ }
+
+ /**
+ * Sets the SAML Attributes to be appended to the AUTHBlock.
+ *
+ * @param extendedSAMLAttributesAUTH The SAML Attributes to be appended to the AUTHBlock.
+ */
+ public void setExtendedSAMLAttributesAUTH(
+ List extendedSAMLAttributesAUTH) {
+ this.extendedSAMLAttributesAUTH = extendedSAMLAttributesAUTH;
+ }
+
+ /**
+ * Returns the SAML Attributes to be appended to the SAML assertion
+ * delivered to the online application. Maybe <code>null</code>.
+ *
+ * @return The SAML Attributes to be appended to the SAML assertion
+ * delivered to the online application
+ */
+ public List getExtendedSAMLAttributesOA() {
+ return extendedSAMLAttributesOA;
+ }
+
+ /**
+ * Sets the SAML Attributes to be appended to the SAML assertion
+ * delivered to the online application.
+ *
+ * @param extendedSAMLAttributesOA The SAML Attributes to be appended to the SAML
+ * assertion delivered to the online application.
+ */
+ public void setExtendedSAMLAttributesOA(
+ List extendedSAMLAttributesOA) {
+ this.extendedSAMLAttributesOA = extendedSAMLAttributesOA;
+ }
+
+ /**
+ * Returns the boolean value for either a target or a wbPK is
+ * provided as SAML Attribute in the SAML Assertion or not.
+ *
+ * @return true either a target or a wbPK is provided as SAML Attribute
+ * in the SAML Assertion or false if not.
+ */
+ public boolean getSAMLAttributeGebeORwbpk() {
+ return this.samlAttributeGebeORwbpk;
+ }
+
+ /**
+ * Sets the boolean value for either a target or a wbPK is
+ * provided as SAML Attribute in the SAML Assertion or not.
+ *
+ * @param samlAttributeGebeORwbpk The boolean for value either a target or
+ * wbPK is provided as SAML Attribute in the SAML Assertion or not.
+ */
+ public void setSAMLAttributeGebeORwbpk(boolean samlAttributeGebeORwbpk) {
+ this.samlAttributeGebeORwbpk = samlAttributeGebeORwbpk;
+ }
+
+ /**
+ * Returns the issuing time of the AUTH-Block SAML assertion.
+ *
+ * @return The issuing time of the AUTH-Block SAML assertion.
+ */
+ public String getIssueInstant() {
+ return issueInstant;
+ }
+
+ /**
+ * Sets the issuing time of the AUTH-Block SAML assertion.
+ *
+ * @param issueInstant The issueInstant to set.
+ */
+ public void setIssueInstant(String issueInstant) {
+ this.issueInstant = issueInstant;
+ }
+
+ /**
+ * Returns the iterator to the stored infobox validators.
+ * @return Iterator
+ */
+ public Iterator getInfoboxValidatorIterator() {
+ if (infoboxValidators==null) return null;
+ return infoboxValidators.iterator();
+ }
+
+ /**
+ * Adds an infobox validator class to the stored infobox validators.
+ * @param infoboxIdentifier the identifier of the infobox the validator belongs to
+ * @param infoboxFriendlyName the friendly name of the infobox
+ * @param infoboxValidator the infobox validator to add
+ */
+ public Iterator addInfoboxValidator(String infoboxIdentifier, String infoboxFriendlyName, InfoboxValidator infoboxValidator) {
+ if (infoboxValidators==null) infoboxValidators = new ArrayList();
+ Vector v = new Vector(3);
+ v.add(infoboxIdentifier);
+ v.add(infoboxFriendlyName);
+ v.add(infoboxValidator);
+ infoboxValidators.add(v);
+ return infoboxValidators.iterator();
+ }
+
+ /**
+ * Tests for pending input events of the infobox validators.
+ * @return true if a validator has a form to show
+ */
+ public boolean isValidatorInputPending() {
+ boolean result = false;
+ Iterator iter = getInfoboxValidatorIterator();
+ if (iter != null) {
+ while (!result && iter.hasNext()) {
+ Vector infoboxValidatorVector = (Vector) iter.next();
+ InfoboxValidator infoboxvalidator = (InfoboxValidator) infoboxValidatorVector.get(2);
+ if (!ParepUtils.isEmpty(infoboxvalidator.getForm())) result=true;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Returns the first pending infobox validator.
+ * @return the infobox validator class
+ */
+ public InfoboxValidator getFirstPendingValidator() {
+ Iterator iter = getInfoboxValidatorIterator();
+ if (iter != null) {
+ while (iter.hasNext()) {
+ Vector infoboxValidatorVector = (Vector) iter.next();
+ InfoboxValidator infoboxvalidator = (InfoboxValidator) infoboxValidatorVector.get(2);
+ String form = infoboxvalidator.getForm();
+ if (!ParepUtils.isEmpty(form)) return infoboxvalidator;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the input form of the first pending infobox validator input processor.
+ * @return the form to show
+ */
+ public String getFirstValidatorInputForm() {
+ Iterator iter = getInfoboxValidatorIterator();
+ if (iter != null) {
+ while (iter.hasNext()) {
+ Vector infoboxValidatorVector = (Vector) iter.next();
+ InfoboxValidator infoboxvalidator = (InfoboxValidator) infoboxValidatorVector.get(2);
+ String form = infoboxvalidator.getForm();
+ if (!ParepUtils.isEmpty(form)) return form;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * @return the mandateCompatibilityMode
+ */
+ public boolean isMandateCompatibilityMode() {
+ return mandateCompatibilityMode;
+ }
+
+ /**
+ * @param mandateCompatibilityMode the mandateCompatibilityMode to set
+ */
+ public void setMandateCompatibilityMode(boolean mandateCompatibilityMode) {
+ this.mandateCompatibilityMode = mandateCompatibilityMode;
+ }
+
+ /**
+ * Returns domain identifier (the register and number in the register parameter).
+ * <code>null</code> in the case of not a business service.
+ *
+ * @return the domainIdentifier
+ */
+ public String getDomainIdentifier() {
+ return domainIdentifier;
+ }
+
+ /**
+ * Sets the register and number in the register parameter if the application
+ * is a business service.
+ * If the domain identifier includes the registerAndOrdNr prefix, the prefix
+ * will be stripped off.
+ *
+ * @param domainIdentifier the domain identifier to set
+ */
+ public void setDomainIdentifier(String domainIdentifier) {
+ if (domainIdentifier != null && domainIdentifier.startsWith(REGISTERANDORDNR_PREFIX_))
+ {
+ // If domainIdentifier starts with prefix "urn:publicid:gv.at:wbpk+"; remove this prefix
+ this.domainIdentifier = domainIdentifier.substring(REGISTERANDORDNR_PREFIX_.length());
+ Logger.debug("Register and ordernumber prefix stripped off; resulting register string: " + this.domainIdentifier);
+ }
+ else
+ {
+ this.domainIdentifier = domainIdentifier;
+ }
+ }
+
+ /**
+ * Gets all identifiers of infoboxes, the online application
+ * is configured to accept. The infobox identifiers are comma separated.
+ *
+ * @return the string containing infobox identifiers
+ */
+ public String getPushInfobox() {
+ if (pushInfobox==null) return "";
+ return pushInfobox;
+ }
+
+ /**
+ * @param pushInfobox the infobox identifiers to set (comma separated)
+ */
+ public void setPushInfobox(String pushInfobox) {
+ this.pushInfobox = pushInfobox;
+ }
+
+ /**
+ *
+ * @param useMandate indicates if mandate is used or not
+ */
+ public void setUseMandate(String useMandate) {
+ if (useMandate.compareToIgnoreCase("true") == 0)
+ this.useMandate = true;
+ else
+ this.useMandate = false;
+
+ }
+
+ /**
+ * Returns if mandate is used or not
+ * @return
+ */
+ public boolean getUseMandate() {
+ return this.useMandate;
+ }
+
+ /**
+ *
+ * @param misSessionID indicates the MIS session ID
+ */
+ public void setMISSessionID(String misSessionID) {
+ this.misSessionID = misSessionID;
+ }
+
+ /**
+ * Returns the MIS session ID
+ * @return
+ */
+ public String getMISSessionID() {
+ return this.misSessionID;
+ }
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/CreateXMLSignatureResponse.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/CreateXMLSignatureResponse.java
new file mode 100644
index 000000000..fc3831161
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/CreateXMLSignatureResponse.java
@@ -0,0 +1,88 @@
+package at.gv.egovernment.moa.id.auth.data;
+
+import org.w3c.dom.Element;
+
+/**
+ * This bean saves all information of the CreateXMLSignature-Response:
+ * a {@link SAMLAttribute} array, the SamlAssertion-Element and the
+ * saml NameIdentifier
+ *
+ * @author Stefan Knirsch
+ * @version $Id$
+ *
+ */
+public class CreateXMLSignatureResponse {
+ /** the samlNameIdentifier */
+private String samlNameIdentifier;
+ /** an array of saml-attributes */
+private SAMLAttribute[] samlAttributes;
+ /**
+ * the original saml:Assertion-Element
+ */
+ private Element samlAssertion;
+
+ /**
+ * the original dsig:Signature-Element
+ */
+ private Element dsigSignature;
+/**
+ * Returns the samlAssertion.
+ * @return Element
+ */
+public Element getSamlAssertion() {
+ return samlAssertion;
+}
+
+/**
+ * Returns the dsig:Signature
+ * @return Element
+ */
+public Element getDsigSignature() {
+ return dsigSignature;
+}
+
+/**
+ * Returns the samlAttribute.
+ * @return SAMLAttribute[]
+ */
+public SAMLAttribute[] getSamlAttributes() {
+ return samlAttributes;
+}
+
+/**
+ * Returns the samlNameIdentifier.
+ * @return String
+ */
+public String getSamlNameIdentifier() {
+ return samlNameIdentifier;
+}
+
+/**
+ * Sets the samlAssertion.
+ * @param samlAssertion The samlAssertion to set
+ */
+public void setSamlAssertion(Element samlAssertion) {
+ this.samlAssertion = samlAssertion;
+}
+
+public void setDsigSignature(Element dsigSignature) {
+ this.dsigSignature = dsigSignature;
+}
+
+/**
+ * Sets the samlAttribute.
+ * @param samlAttributes The samlAttributes to set
+ */
+public void setSamlAttributes(SAMLAttribute[] samlAttributes) {
+ this.samlAttributes = samlAttributes;
+}
+
+/**
+ * Sets the samlNameIdentifier.
+ * @param samlNameIdentifier The samlNameIdentifier to set
+ */
+public void setSamlNameIdentifier(String samlNameIdentifier) {
+ this.samlNameIdentifier = samlNameIdentifier;
+}
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/ExtendedSAMLAttribute.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/ExtendedSAMLAttribute.java
new file mode 100644
index 000000000..aa3c937b0
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/ExtendedSAMLAttribute.java
@@ -0,0 +1,88 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.data;
+
+/**
+ * A SAML-Attribute to be appended to the final SAML-Assertion
+ * that will be passed to the online application.
+ */
+public interface ExtendedSAMLAttribute {
+ /**
+ * Add this attribute only to the SAML-Assertion
+ * passed to the online application, but not to
+ * the AUTH-Block.
+ */
+ public final static int NOT_ADD_TO_AUTHBLOCK = 0;
+ /**
+ * Add this attribute to both, the AUTH-Block and the
+ * final SAML-Assertion passed to the online application.
+ */
+ public final static int ADD_TO_AUTHBLOCK = 1;
+ /**
+ * Add this attribute to only the AUTH-Block, but not
+ * to the final SAML-Assertion passed to the online application.
+ */
+ public final static int ADD_TO_AUTHBLOCK_ONLY = 2;
+
+ /**
+ * The value of the SAML-Attribute. This must be either a
+ * <code>org.w3c.Element</code> or a <code>java.lang.String</code>
+ * object. Each other type will be ignored. <br>
+ * If, for example, the type of the actual SAML-Attribute is a
+ * <code>&lt;xsd:boolean&gt;</code> the value must be either the String
+ * <code>&quot;true&quot;</code> or <code>&quot;false&quot;</code>.
+ * Or the <code>&lt;xsd:integer&gt;</code> number <code>273</code>
+ * has to be the String <code>&quot;273&quot;</code>.
+ *
+ * @return The value of the SAML-Attribute. Must not be <code>null</code>.
+ */
+ public Object getValue();
+
+ /**
+ * The name of the SAML-Attribute.
+ *
+ * @return The name of the SAML-Attribute. Must not be <code>null</code>.
+ */
+ public String getName();
+
+ /**
+ * The namespace of the SAML-Attribute.
+ * An application will use the context specific namespace URI for the attribute it returns.
+ * However, if the application cannot explicitely assign a namespace URI, the
+ * {@link at.gv.egovernment.moa.util.Constants#MOA_NS_URI default} MOA namespace URI
+ * should be used.
+ *
+ * @return The namespace of the SAML-Attribute. Must not be <code>null</code>.
+ */
+ public String getNameSpace();
+
+ /**
+ * Specifies if this SAML-Attribute should be added to the AUTH-Block.
+ * <br>
+ * Depending on the returned value, this SAML-Attribute should be only added to the
+ * final SAML-Assertion passed to the online application (0), to both, the final
+ * assertion and the AUTH-Block (1) or to the AUTH-Block only (2).
+ *
+ * @return <ul>
+ * <li>0 - add this SAML-Attribute to the final SAML-Assertion only</li>
+ * <li>1 - add this SAML-Attribute to both, the final SAML-Assertion and the
+ * AUTH-Block</li>
+ * <li>2 - add this SAML-Attribute to the AUTH-Block only
+ * </ul>
+ */
+ public int getAddToAUTHBlock();
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/ExtendedSAMLAttributeImpl.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/ExtendedSAMLAttributeImpl.java
new file mode 100644
index 000000000..2646377e3
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/ExtendedSAMLAttributeImpl.java
@@ -0,0 +1,152 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.data;
+
+/**
+ * This class contains SAML attributes to be appended to the SAML assertion delivered to
+ * the Online application.
+ *
+ * @author Harald Bratko
+ */
+public class ExtendedSAMLAttributeImpl implements ExtendedSAMLAttribute {
+
+ /**
+ * The value of this SAML attribute. Must be either of type <code>java.lang.String</code>
+ * or <code>org.w3c.Element</code>.
+ */
+ protected Object value_;
+
+ /**
+ * The name of this SAML attribute.
+ */
+ protected String name_;
+
+ /**
+ * The namespace URI of this SAML attribute.
+ */
+ protected String namespace_;
+
+ /**
+ * Specifies whether this SAML attribute should be appended to AUTH Block.
+ */
+ protected int addToAUTHBlock_;
+
+ /**
+ * Sets this ExtendedSAMLAttribute.
+ * @param name The name of this SAML Attribute.
+ * @param value The value of this SAML Attribute. Must be either of type
+ * <code>java.lang.String</code> or <code>org.w3c.dom.Element</code>.
+ * @param namespace The namespace of this SAML Attribute.
+ * @param addToAUTHBlock Specifies if this SAML Attribute should be added to the AUTHBlock.
+ * The following values are allowed:
+ * <ul>
+ * <li>
+ * {@link at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttribute#ADD_TO_AUTHBLOCK}
+ * </li>
+ * <li>
+ * {@link at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttribute#NOT_ADD_TO_AUTHBLOCK}
+ * </li>
+ * <li>
+ * {@link at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttribute#ADD_TO_AUTHBLOCK_ONLY}
+ * </li>
+ * </ul>
+ *
+ */
+ public ExtendedSAMLAttributeImpl(String name, Object value, String namespace, int addToAUTHBlock) {
+ name_ = name;
+ value_ = value;
+ namespace_ = namespace;
+ addToAUTHBlock_ = addToAUTHBlock;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttribute#getValue()
+ */
+ public Object getValue() {
+ return value_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttribute#getName()
+ */
+ public String getName() {
+ return name_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttribute#getNameSpace()
+ */
+ public String getNameSpace() {
+ return namespace_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttribute#getAddToAUTHBlock()
+ */
+ public int getAddToAUTHBlock() {
+ return addToAUTHBlock_;
+ }
+
+ /**
+ * Specifies if this SAML Attribute should be added to the AUTHBlock.
+ *
+ * @param addToAUTHBlock One of the following values:
+ * <ul>
+ * <li>
+ * {@link at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttribute#ADD_TO_AUTHBLOCK}
+ * </li>
+ * <li>
+ * {@link at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttribute#NOT_ADD_TO_AUTHBLOCK}
+ * </li>
+ * <li>
+ * {@link at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttribute#ADD_TO_AUTHBLOCK_ONLY}
+ * </li>
+ * </ul>
+ * {@link at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttribute#ADD_TO_AUTHBLOCK}
+ */
+ public void setAddToAUTHBlock(int addToAUTHBlock) {
+ addToAUTHBlock_ = addToAUTHBlock;
+ }
+
+ /**
+ * Sets the name of this SAML attribute.
+ *
+ * @param name The name of this SAML attribute.
+ */
+ public void setName(String name) {
+ name_ = name;
+ }
+
+ /**
+ * Sets the namespace of this SAML attribute.
+ *
+ * @param namespace The namespace to set.
+ */
+ public void setNamespace(String namespace) {
+ namespace_ = namespace;
+ }
+
+ /**
+ * Sets the value of this SAML attribute.
+ *
+ * @param value The value of this SAML Attribute. Must be either of type
+ * <code>java.lang.String</code> or <code>org.w3c.dom.Element</code>.
+ */
+ public void setValue(Object value) {
+ value_ = value;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/IdentityLink.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/IdentityLink.java
new file mode 100644
index 000000000..0c8dbc455
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/IdentityLink.java
@@ -0,0 +1,281 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.data;
+
+import java.io.IOException;
+import java.security.PublicKey;
+
+import javax.xml.transform.TransformerException;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.util.DOMUtils;
+
+
+/**
+ * Data contained in an identity link issued by BMI, relevant to the MOA ID component.
+ * <br><code>"IdentityLink"</code> is the translation of <code>"Personenbindung"</code>.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class IdentityLink {
+ /**
+ * <code>"identificationValue"</code> is the translation of <code>"Stammzahl"</code>.
+ */
+ private String identificationValue;
+ /**
+ * <code>"identificationType"</code> type of the identificationValue in the IdentityLink.
+ */
+ private String identificationType;
+ /**
+ * first name
+ */
+ private String givenName;
+ /**
+ * family name
+ */
+ private String familyName;
+
+ /**
+ * The name as (givenName + familyName)
+ */
+ private String name;
+ /**
+ * date of birth
+ */
+ private String dateOfBirth;
+ /**
+ * the original saml:Assertion-Element
+ */
+ private Element samlAssertion;
+ /**
+ * the serializes saml:Assertion
+ */
+ private String serializedSamlAssertion;
+ /**
+ * Element /saml:Assertion/saml:AttributeStatement/saml:Subject/saml:SubjectConfirmation/saml:SubjectConfirmationData/pr:Person
+ */
+ private Element prPerson;
+ /**
+ * we need for each dsig:Reference Element all
+ * transformation elements
+ */
+ private Element[] dsigReferenceTransforms;
+
+ /**
+ * The issuing time of the identity link SAML assertion.
+ */
+ private String issueInstant;
+
+ /**
+ * we need all public keys stored in
+ * the identity link
+ */
+ private PublicKey[] publicKey;
+
+ /**
+ * Constructor for IdentityLink
+ */
+ public IdentityLink() {
+ }
+
+ /**
+ * Returns the dateOfBirth.
+ * @return Calendar
+ */
+ public String getDateOfBirth() {
+ return dateOfBirth;
+ }
+
+ /**
+ * Returns the familyName.
+ * @return String
+ */
+ public String getFamilyName() {
+ return familyName;
+ }
+
+ /**
+ * Returns the givenName.
+ * @return String
+ */
+ public String getGivenName() {
+ return givenName;
+ }
+
+ /**
+ * Returns the name.
+ * @return The name.
+ */
+ public String getName() {
+ if (name == null) {
+ name = givenName + " " + familyName;
+ }
+ return name;
+ }
+
+ /**
+ * Returns the identificationValue.
+ * <code>"identificationValue"</code> is the translation of <code>"Stammzahl"</code>.
+ * @return String
+ */
+ public String getIdentificationValue() {
+ return identificationValue;
+ }
+
+ /**
+ * Returns the identificationType.
+ * <code>"identificationType"</code> type of the identificationValue in the IdentityLink.
+ * @return String
+ */
+ public String getIdentificationType() {
+ return identificationType;
+ }
+
+ /**
+ * Sets the dateOfBirth.
+ * @param dateOfBirth The dateOfBirth to set
+ */
+ public void setDateOfBirth(String dateOfBirth) {
+ this.dateOfBirth = dateOfBirth;
+ }
+
+ /**
+ * Sets the familyName.
+ * @param familyName The familyName to set
+ */
+ public void setFamilyName(String familyName) {
+ this.familyName = familyName;
+ }
+
+ /**
+ * Sets the givenName.
+ * @param givenName The givenName to set
+ */
+ public void setGivenName(String givenName) {
+ this.givenName = givenName;
+ }
+
+ /**
+ * Sets the identificationValue.
+ * <code>"identificationValue"</code> is the translation of <code>"Stammzahl"</code>.
+ * @param identificationValue The identificationValue to set
+ */
+ public void setIdentificationValue(String identificationValue) {
+ this.identificationValue = identificationValue;
+ }
+
+ /**
+ * Sets the Type of the identificationValue.
+ * @param identificationType The type of identificationValue to set
+ */
+ public void setIdentificationType(String identificationType) {
+ this.identificationType = identificationType;
+ }
+
+ /**
+ * Returns the samlAssertion.
+ * @return Element
+ */
+ public Element getSamlAssertion() {
+ return samlAssertion;
+ }
+
+ /**
+ * Returns the samlAssertion.
+ * @return Element
+ */
+ public String getSerializedSamlAssertion() {
+ return serializedSamlAssertion;
+ }
+
+ /**
+ * Sets the samlAssertion and the serializedSamlAssertion.
+ * @param samlAssertion The samlAssertion to set
+ */
+ public void setSamlAssertion(Element samlAssertion) throws TransformerException, IOException {
+ this.samlAssertion = samlAssertion;
+ this.serializedSamlAssertion = DOMUtils.serializeNode(samlAssertion);
+ }
+
+ /**
+ * Returns the dsigReferenceTransforms.
+ * @return Element[]
+ */
+ public Element[] getDsigReferenceTransforms() {
+ return dsigReferenceTransforms;
+ }
+
+ /**
+ * Sets the dsigReferenceTransforms.
+ * @param dsigReferenceTransforms The dsigReferenceTransforms to set
+ */
+ public void setDsigReferenceTransforms(Element[] dsigReferenceTransforms) {
+ this.dsigReferenceTransforms = dsigReferenceTransforms;
+ }
+
+ /**
+ * Returns the publicKey.
+ * @return PublicKey[]
+ */
+ public PublicKey[] getPublicKey() {
+ return publicKey;
+ }
+
+ /**
+ * Sets the publicKey.
+ * @param publicKey The publicKey to set
+ */
+ public void setPublicKey(PublicKey[] publicKey) {
+ this.publicKey = publicKey;
+ }
+
+ /**
+ * Returns the prPerson.
+ * @return Element
+ */
+ public Element getPrPerson() {
+ return prPerson;
+ }
+
+ /**
+ * Sets the prPerson.
+ * @param prPerson The prPerson to set
+ */
+ public void setPrPerson(Element prPerson) {
+ this.prPerson = prPerson;
+ }
+
+ /**
+ * Returns the issuing time of the identity link SAML assertion.
+ *
+ * @return The issuing time of the identity link SAML assertion.
+ */
+ public String getIssueInstant() {
+ return issueInstant;
+ }
+
+ /**
+ * Sets the issuing time of the identity link SAML assertion.
+ *
+ * @param issueInstant The issueInstant to set.
+ */
+ public void setIssueInstant(String issueInstant) {
+ this.issueInstant = issueInstant;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/InfoboxToken.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/InfoboxToken.java
new file mode 100644
index 000000000..88fb201ba
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/InfoboxToken.java
@@ -0,0 +1,80 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.data;
+
+import org.w3c.dom.Element;
+
+/**
+ * Contains an infobox token included in an <code>InfoboxReadResponse</code>.
+ * Depending on whether the token is extracted from an <code>XMLContent</code> or a
+ * <code>Base64Content</code> it is either returned as DOM element
+ * ({@link #getXMLToken()}) or base64 encoded string ({@link #getBase64Token()}).
+ *
+ * @author Harald Bratko
+ */
+public interface InfoboxToken {
+
+ /**
+ * The key of the corresponding infobox.
+ * This is the value of <code>Key</code> attribute of the <code>&lt;Pair&gt;</code> child
+ * element in an <code>&lt;AssocArrayData&gt;</code> content of an InfoboxReadResponse.
+ * Maybe <code>null</code> if the InfoboxReadResponse conatains <code>BinaryFileData</code>.
+ *
+ *
+ * @return The key identifier of the corresponding infobox.
+ */
+ public String getKey();
+
+ /**
+ * Specifies if this token is the first token (e.g in an array of tokens) included in an
+ * <code>InfoboxReadResponse</code>. If <code>true</code> this token is the token to be
+ * validated by a corresponding
+ * {@link at.gv.egovernment.moa.id.auth.validator.InfoboxValidator InfoboxValidator}.
+ * If <code>false</code> this token maybe needed to validate the primary token.
+ *
+ * @return <code>True</code> if this token is the first token.
+ */
+ public boolean isPrimary();
+
+ /**
+ * Returns the infobox token.
+ * Maybe <code>null</code> if the token is returned by method {@link #getBase64Token()}
+ * as base64 encoded string.
+ * <br>
+ * Note that this token is <code><i><b>not</b></i></code> validated against the
+ * application specific schema (e.g. Mandates schema in the mandates context).
+ * Thus the validating application <code><i><b>has to</b></i></code> validate the token
+ * against the appropriate schema.
+ *
+ * @return The infobox token. If <code>null</code> the token is returned by method
+ * {@link #getBase64Token()} as base64 encoded string.
+ */
+ public Element getXMLToken();
+
+ /**
+ * Returns the infobox token.
+ * Maybe <code>null</code> if the token is returned by method {@link #getXMLToken()}
+ * as a DOM element.
+ * <br>
+ * Note, that the base64 encoded string actually may include more than one infobox
+ * elements.
+ *
+ * @return The infobox token. If <code>null</code> the token is returned by method
+ * {@link #getBase64Token()} as base64 encoded string.
+ */
+ public String getBase64Token();
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/InfoboxTokenImpl.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/InfoboxTokenImpl.java
new file mode 100644
index 000000000..0f9e85eeb
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/InfoboxTokenImpl.java
@@ -0,0 +1,144 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.data;
+
+import org.w3c.dom.Element;
+
+/**
+ * This class contains an infobox token.
+ *
+ * @see at.gv.egovernment.moa.id.auth.data.InfoboxToken
+ *
+ * @author Harald Bratko
+ */
+public class InfoboxTokenImpl implements InfoboxToken {
+
+ /**
+ * The key of the infobox token.
+ */
+ private String key_;
+
+ /**
+ * Specifies whether this token is the primary (first in an array) token.
+ */
+ private boolean primary_;
+
+ /**
+ * The infobox token.
+ */
+ private Element xmlToken_;
+
+ /**
+ * The base64 encoded infobox token.
+ */
+ private String base64Token_;
+
+ /**
+ * Sets an XML infobox token.
+ *
+ * @param key The key of the infobox token.
+ * @param primary <code>True</code> this token is the primary (e.g .first in an array)
+ * token, otherwise <code>false</code>
+ * @param xmlToken The infobox token.
+ */
+ public InfoboxTokenImpl(String key, boolean primary, Element xmlToken) {
+ key_ = key;
+ primary_ = primary;
+ xmlToken_ = xmlToken;
+ base64Token_ = null;
+ }
+
+ /**
+ * Sets a base64 encoded infobox token.
+ *
+ * @param key The key of the infobox token.
+ * @param primary <code>True</code> this token is the primary (e.g .first in an array)
+ * token, otherwise <code>false</code>
+ * @param base64Token The base64 encoded infobox token.
+ */
+ public InfoboxTokenImpl(String key, boolean primary, String base64Token) {
+ key_ = key;
+ primary_ = primary;
+ base64Token_ = base64Token;
+ xmlToken_ = null;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.InfoboxToken#getKey()
+ */
+ public String getKey() {
+ return key_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.InfoboxToken#isPrimary()
+ */
+ public boolean isPrimary() {
+ return primary_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.InfoboxToken#getXMLToken()
+ */
+ public Element getXMLToken() {
+ return xmlToken_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.InfoboxToken#getBase64Token()
+ */
+ public String getBase64Token() {
+ return base64Token_;
+ }
+
+ /**
+ * Sets the key of the infobox token.
+ *
+ * @param key The key of the infobox token.
+ */
+ public void setKey(String key) {
+ key_ = key;
+ }
+
+ /**
+ * Specifies whether this token is the primary (e.g. first in an array) token.
+ *
+ * @param primary <code>True</code> this token is the primary (e.g .first in an array)
+ * token, otherwise <code>false</code>.
+ */
+ public void setPrimary(boolean primary) {
+ primary_ = primary;
+ }
+
+ /**
+ * Sets the base64 encoded token.
+ *
+ * @param base64Token The base64 encoded token.
+ */
+ public void setBase64Token(String base64Token) {
+ base64Token_ = base64Token;
+ }
+
+ /**
+ * Sets the infobox token.
+ *
+ * @param xmlToken The infobox token.
+ */
+ public void setXmlToken(Element xmlToken) {
+ xmlToken_ = xmlToken;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/InfoboxValidationResult.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/InfoboxValidationResult.java
new file mode 100644
index 000000000..4591d8bf8
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/InfoboxValidationResult.java
@@ -0,0 +1,72 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.data;
+
+
+/**
+ * Includes the result of an extended infobox validation.
+ *
+ * If validation succeeds, an array of
+ * {@link at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttribute ExtendedSAMLAttributes}
+ * maybe provided. Each of these SAML-Attributes will be either appended to the
+ * final SAML-Assertion passed to the online application or to the AUTH-Block,
+ * or to both.
+ * <br>
+ * If validation fails the implementing class has to provide a short error message.
+ *
+ * @author Harald Bratko
+ */
+public interface InfoboxValidationResult {
+
+ /**
+ * The method returns <code>true</code> if validation succeeds. In that case
+ * method {@link #getExtendedSamlAttributes()} may provide an array of
+ * {@link at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttribute
+ * ExtendedSAMLAttributes} that should be appended to the final SAML-Assertion or the
+ * AUTH-Block or to both.
+ * <br>
+ * The method returns <code>false</code> if validation fails. In that case
+ * method {@link #getErrorMessage()} has to provide a short error description.
+ *
+ * @return <code>True</code> if validation succeeds,
+ * otherwise <code>false</code>.
+ */
+ public boolean isValid();
+
+ /**
+ * Returns an array of {@link at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttribute
+ * ExtendedSAMLAttributes} that should be added to the SAML-Assertion
+ * provided to the online application.
+ * The SAML-Attributes in that array will be added to the final
+ * SAML-Assertion, the AUTH-Block, or both, exactly in the order as they are arranged
+ * in the array this method returns.
+ *
+ * @return An array of {@link at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttribute
+ * ExtendedSAMLAttributes} that should be added to the SAML-Assertion
+ * provided to the online application, the AUTH-Block, or both. If no attributes should
+ * be added this array maybe <code>null</code> or empty.
+ */
+ public ExtendedSAMLAttribute[] getExtendedSamlAttributes();
+
+ /**
+ * A short error description that should be displayed by MOA-ID if
+ * validation of the InfoBoxReadResponse fails.
+ *
+ * @return An short error message if validation fails.
+ */
+ public String getErrorMessage();
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/InfoboxValidationResultImpl.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/InfoboxValidationResultImpl.java
new file mode 100644
index 000000000..d2e7a2847
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/InfoboxValidationResultImpl.java
@@ -0,0 +1,116 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.data;
+
+
+/**
+ * Default implementation of the {@link InfoboxValidationResult} interface.
+ *
+ * @author Harald Bratko
+ */
+public class InfoboxValidationResultImpl implements InfoboxValidationResult {
+
+ /**
+ * Indicates whether the validation was successful or not.
+ */
+ protected boolean valid_;
+
+ /**
+ * The error message.
+ */
+ protected String errorMessage_;
+
+ /**
+ * The SAML attributes returned by the infobox validator.
+ */
+ protected ExtendedSAMLAttribute[] extendedSamlAttributes_;
+
+ /**
+ * Empty constructor.
+ */
+ public InfoboxValidationResultImpl() {
+ }
+
+ /**
+ * Constructor to set all values.
+ *
+ * @param valid Global validation result.
+ * @param extendedSamlAttributes SAML attributes that should be appended to the final
+ * <code>SAML Assertion</code> or to the <code>AUTH Block</code>
+ * or to both.
+ * @param errorMessage An error message if infobox validation fails.
+ */
+ public InfoboxValidationResultImpl(
+ boolean valid,
+ ExtendedSAMLAttribute[] extendedSamlAttributes,
+ String errorMessage)
+ {
+ valid_ = valid;
+ extendedSamlAttributes_ = extendedSamlAttributes;
+ errorMessage_ = errorMessage;
+ }
+
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.InfoboxValidationResult#getErrorMessage()
+ */
+ public String getErrorMessage() {
+ return errorMessage_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.InfoboxValidationResult#getExtendedSamlAttributes()
+ */
+ public ExtendedSAMLAttribute[] getExtendedSamlAttributes() {
+ return extendedSamlAttributes_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.InfoboxValidationResult#isValid()
+ */
+ public boolean isValid() {
+ return valid_;
+ }
+
+ /**
+ * Sets the error message if validation fails..
+ *
+ * @param errorMessage The error message to set.
+ */
+ public void setErrorMessage(String errorMessage) {
+ errorMessage_ = errorMessage;
+ }
+
+ /**
+ * Sets the SAML attributes returned by the infobox validatior..
+ *
+ * @param extendedSamlAttributes The SAML attributes returned by the infobox validator.
+ */
+ public void setExtendedSamlAttributes(ExtendedSAMLAttribute[] extendedSamlAttributes) {
+ extendedSamlAttributes_ = extendedSamlAttributes;
+ }
+
+ /**
+ * Sets validation result..
+ *
+ * @param valid <code>True</code> if the infobox could be validated successfully,
+ * otherwise <code>false</code>.
+ */
+ public void setValid(boolean valid) {
+ valid_ = valid;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/InfoboxValidatorParams.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/InfoboxValidatorParams.java
new file mode 100644
index 000000000..a52e57b13
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/InfoboxValidatorParams.java
@@ -0,0 +1,195 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.data;
+
+import java.security.PublicKey;
+import java.util.List;
+
+import org.w3c.dom.Element;
+
+/**
+ * Parameters for validating an infobox.
+ *
+ * This interface is used by MOA-ID to provide parameters to an
+ * {link at.gv.egovernment.moa.id.auth.validator.InfoboxValidator
+ * InfoboxValidator}.
+ *
+ * @author Harald Bratko
+ */
+public interface InfoboxValidatorParams {
+
+ /**
+ * Returns a list of {@link at.gv.egovernment.moa.id.auth.data.InfoboxToken InfoboxToken}
+ * objects. The first token in this list is the one to be validated. Each further token
+ * maybe needed to validate this first token.
+ *
+ * @return A list of {@link at.gv.egovernment.moa.id.auth.data.InfoboxToken InfoboxToken}
+ * objects.
+ */
+ public List getInfoboxTokenList();
+
+ /**
+ * Returns the ID of the trust profile to be used for validating
+ * certificates. Maybe ignored by a validator, if no certificates
+ * has to be validated.
+ *
+ * @return The ID of a trust profile.
+ */
+ public String getTrustProfileID();
+
+ /**
+ * Returns schema location URIs that may be needed by the
+ * validator to parse infobox tokens.
+ * Each entry in the list is a {@link Schema} specifying the location
+ * of an XML schema.
+ *
+ * @return A list of {@link Schema} objects each of them specifying the
+ * location of an XML schema.
+ */
+ public List getSchemaLocations();
+
+ /**
+ * Returns the URL of the BKU.
+ * Maybe needed by a validator.
+ *
+ * @return The url of the BKU.
+ */
+ public String getBkuURL();
+
+ /**
+ * Returns the target parameter.
+ * <code>null</code> in the case of a business service.
+ *
+ * @return The target parameter.
+ */
+ public String getTarget();
+
+ /**
+ * Returns the register and number in the register parameter.
+ * <code>null</code> in the case of not a business service.
+ *
+ * @return The register and number in the register parameter.
+ */
+ public String getDomainIdentifier();
+
+ /**
+ * Returns <code>true</code> if the application is a business
+ * service, otherwise <code>false</code>. This may be useful
+ * for the validating application.
+ *
+ * @return <code>True</code> if the application is a business
+ * service, otherwise <code>false</code>
+ */
+ public boolean getBusinessApplication();
+
+ /**
+ * Returns the family name from the identity link.
+ * Maybe needed by a validator.
+ *
+ * @return The family name from the identity link.
+ */
+ public String getFamilyName();
+
+ /**
+ * Returns the given name from the identity link.
+ * Maybe needed by a validator.
+ *
+ * @return The given name from the identity link.
+ */
+ public String getGivenName();
+
+ /**
+ * The date of birth from the identity link.
+ * The method returns the value of the <pr:DateOfBirth>
+ * element from the identity link.
+ * Maybe needed by a validator.
+ *
+ * @return The date of birth from the identity link.
+ */
+ public String getDateOfBirth();
+
+ /**
+ * Returns he identification value from the identity
+ * link. This may be the <code>Stammzahl</code>
+ * in the case of a public application or the
+ * <code>wbPK</code> in the case of a business
+ * application. This parameter is only returned
+ * if specified within the config file.
+ *
+ * @return The identification value from the identity link.
+ */
+ public String getIdentificationValue();
+
+ /**
+ * Returns the type of the identification value
+ * from the identity link. This may be
+ * especially of interest for business
+ * applications.
+ *
+ * @return The type of the identification value
+ * from the identity link.
+ */
+ public String getIdentificationType();
+
+ /**
+ * Returns the public keys from the identity link.
+ * Maybe needed by the application.
+ *
+ * @return PublicKey[] The public keys from the
+ * identity link.
+ */
+ public PublicKey[] getPublicKeys();
+
+ /**
+ * Returns the identity link.
+ * A validator may need other data from the identity link, than
+ * family name, given name, date of birth and identification value.
+ * The identity link element is only returned if specified within the
+ * config file.
+ *
+ * @return The identity link.
+ */
+ public Element getIdentityLink();
+
+ /**
+ * Indicates whether source pins (<code>Stammzahl</code>en) should be hidden or not.
+ * If an online application lying behind MOA-ID is not allowed to get source pins
+ * (<code>Stammzahl</code>en), any source pins within <code>SAML attributes</code>
+ * returned by the validator must suppressed:<br>
+ * If the parameter <code>getHideStammzahl</code> is <code>true</code>, then the validator
+ * <b>MUST</b> hide (replace by an empty string) any source pin (<code>Stammzahl</code>)
+ * that may be included in a <code>SAML attribute</code> returned by the validator.
+ *
+ * @return <code>true</code> if source pins (<code>Stammzahl</code>en) must be hidden,
+ * otherwise <code>false</code>.
+ */
+ public boolean getHideStammzahl();
+
+ /**
+ * Returns application specific parameters.
+ * Each child element of this element contains
+ * a validating application specific parameter. The
+ * element is passed as specified within the config
+ * file and its up to the implementing class to
+ * parse and interprete its children.
+ *
+ * @return Application specific parameters.
+ */
+ public Element getApplicationSpecificParams();
+
+}
+
+
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/InfoboxValidatorParamsImpl.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/InfoboxValidatorParamsImpl.java
new file mode 100644
index 000000000..e2acab73c
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/InfoboxValidatorParamsImpl.java
@@ -0,0 +1,384 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.data;
+
+import java.security.PublicKey;
+import java.util.List;
+
+import org.w3c.dom.Element;
+
+/**
+ * Parameters for validating an infobox.
+ *
+ * This interface is used by MOA-ID to provide parameters to an
+ * {link at.gv.egovernment.moa.id.auth.validator.InfoboxValidator
+ * InfoboxValidator}.
+ *
+ * @author Harald Bratko
+ */
+public class InfoboxValidatorParamsImpl implements InfoboxValidatorParams {
+
+ /**
+ * A list of {@link at.gv.egovernment.moa.id.auth.data.InfoboxToken InfoboxToken} objects.
+ * The first token in this list is the one to be validated. Each further token
+ * maybe needed to validate this first token.
+ */
+ protected List infoboxTokenList_;
+
+ /**
+ * The ID of the trust profile used for validating certificates.
+ */
+ protected String trustProfileID_;
+
+ /**
+ * The locations of schemas that maybe needed for validating infobox tokens.
+ */
+ protected List schemaLocations_;
+
+ /**
+ * The URL of the BKU.
+ */
+ protected String bkuURL_;
+
+ /**
+ * Specifies whether the current online application is a business or a public application.
+ */
+ protected boolean businessApplication_;
+
+ /**
+ * The target parameter.
+ */
+ protected String target_;
+
+ /**
+ * The domain identifier (register and number in the register parameter).
+ */
+ protected String domainIdentifier_;
+
+ /**
+ * The family name from the identity link.
+ */
+ protected String familyName_;
+
+ /**
+ * The given name from the identity link.
+ */
+ protected String givenName_;
+
+ /**
+ * The date of birth from the identity link.
+ */
+ protected String dateOfBirth_;
+
+ /**
+ * The date of identification value.
+ */
+ protected String identificationValue_;
+
+ /**
+ * The identification type.
+ */
+ protected String identificationType_;
+
+ /**
+ * The public keys from the identity link.
+ */
+ protected PublicKey[] publicKeys_;
+
+ /**
+ * The identity link.
+ */
+ protected Element identityLink_;
+
+ /**
+ * Indicates whether source pins (<code>Stammzahl</code>en) must be hidden or not.
+ */
+ protected boolean hideStammzahl_;
+
+ /**
+ * Application specific parameters.
+ */
+ protected Element applicationSpecificParams_;
+
+ /**
+ * Empty constructor.
+ */
+ public InfoboxValidatorParamsImpl() {
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.InfoboxValidatorParams#getInfoboxTokenList()
+ */
+ public List getInfoboxTokenList() {
+ return infoboxTokenList_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.InfoboxValidatorParams#getTrustProfileID()
+ */
+ public String getTrustProfileID() {
+ return trustProfileID_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.InfoboxValidatorParams#getSchemaLocations()
+ */
+ public List getSchemaLocations() {
+ return schemaLocations_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.InfoboxValidatorParams#getBkuURL()
+ */
+ public String getBkuURL() {
+ return bkuURL_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.InfoboxValidatorParams#getTarget()
+ */
+ public String getTarget() {
+ return target_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.InfoboxValidatorParams#getDomainIdentifier()
+ */
+ public String getDomainIdentifier() {
+ return domainIdentifier_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.InfoboxValidatorParams#getBusinessApplication()
+ */
+ public boolean getBusinessApplication() {
+ return businessApplication_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.InfoboxValidatorParams#getFamilyName()
+ */
+ public String getFamilyName() {
+ return familyName_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.InfoboxValidatorParams#getGivenName()
+ */
+ public String getGivenName() {
+ return givenName_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.InfoboxValidatorParams#getDateOfBirth()
+ */
+ public String getDateOfBirth() {
+ return dateOfBirth_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.InfoboxValidatorParams#getIdentificationValue()
+ */
+ public String getIdentificationValue() {
+ return identificationValue_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.InfoboxValidatorParams#getIdentificationType()
+ */
+ public String getIdentificationType() {
+ return identificationType_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.InfoboxValidatorParams#getPublicKeys()
+ */
+ public PublicKey[] getPublicKeys() {
+ return publicKeys_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.InfoboxValidatorParams#getIdentityLink()
+ */
+ public Element getIdentityLink() {
+ return identityLink_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.InfoboxValidatorParams#getHideStammzahl()
+ */
+ public boolean getHideStammzahl() {
+ return hideStammzahl_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.InfoboxValidatorParams#getApplicationSpecificParams()
+ */
+ public Element getApplicationSpecificParams() {
+ return applicationSpecificParams_;
+ }
+
+ /**
+ * Sets the application specific parameters.
+ *
+ * @param applicationSpecificParams The application specific parameters to set.
+ */
+ public void setApplicationSpecificParams(Element applicationSpecificParams) {
+ applicationSpecificParams_ = applicationSpecificParams;
+ }
+
+ /**
+ * Sets the bku URL.
+ *
+ * @param bkuURL The bku URL to set.
+ */
+ public void setBkuURL(String bkuURL) {
+ bkuURL_ = bkuURL;
+ }
+
+ /**
+ * Sets the business application parameter.
+ *
+ * @param businessApplication The business application parameter to set.
+ * (<code>True</code> if the application is a business
+ * application, otherwies <code>false</code>).
+ */
+ public void setBusinessApplication(boolean businessApplication) {
+ businessApplication_ = businessApplication;
+ }
+
+ /**
+ * Sets the date of birth.
+ *
+ * @param dateOfBirth The date of birth.
+ */
+ public void setDateOfBirth(String dateOfBirth) {
+ dateOfBirth_ = dateOfBirth;
+ }
+
+ /**
+ * Sets the family name.
+ *
+ * @param familyName The family name.
+ */
+ public void setFamilyName(String familyName) {
+ familyName_ = familyName;
+ }
+
+ /**
+ * Sets the given name.
+ *
+ * @param givenName The given name.
+ */
+ public void setGivenName(String givenName) {
+ givenName_ = givenName;
+ }
+
+ /**
+ * Sets the identification type.
+ *
+ * @param identificationType The identification type.
+ */
+ public void setIdentificationType(String identificationType) {
+ identificationType_ = identificationType;
+ }
+
+ /**
+ * Sets the identification value.
+ *
+ * @param identificationValue The identification value.
+ */
+ public void setIdentificationValue(String identificationValue) {
+ identificationValue_ = identificationValue;
+ }
+
+ /**
+ * Sets the identity link.
+ *
+ * @param identityLink The identity link.
+ */
+ public void setIdentityLink(Element identityLink) {
+ identityLink_ = identityLink;
+ }
+
+ /**
+ * Sets the infobox token to be validated.
+ *
+ * @param infoboxTokenList A list {@link at.gv.egovernment.moa.id.auth.data.InfoboxToken InfoboxToken}
+ * objects.
+ */
+ public void setInfoboxTokenList(List infoboxTokenList) {
+ infoboxTokenList_ = infoboxTokenList;
+ }
+
+ /**
+ * Sets the public Keys.
+ *
+ * @param publicKeys The public keys.
+ */
+ public void setPublicKeys(PublicKey[] publicKeys) {
+ publicKeys_ = publicKeys;
+ }
+
+ /**
+ * Sets the schema locations.
+ *
+ * @param schemaLocations The schema locations. A list of
+ * {@link Schema} objects.
+ */
+ public void setSchemaLocations(List schemaLocations) {
+ schemaLocations_ = schemaLocations;
+ }
+
+ /**
+ * Sets the target.
+ *
+ * @param target The target.
+ */
+ public void setTarget(String target) {
+ target_ = target;
+ }
+
+ /**
+ * Sets the domain identifier (register and number in the register parameter)
+ *
+ * @param domainIdentifier the domainIdentifier to set
+ */
+ public void setDomainIdentifier(String domainIdentifier) {
+ this.domainIdentifier_ = domainIdentifier;
+ }
+
+ /**
+ * Sets the ID of the trust profile used for validating certificates.
+ *
+ * @param trustProfileID the ID of the trust profile used for validating certificates.
+ */
+ public void setTrustProfileID(String trustProfileID) {
+ trustProfileID_ = trustProfileID;
+ }
+
+ /**
+ * Sets the {@link #hideStammzahl_} parameter. This indicates whether source pins
+ * (<code>Stammzahl</code>en) must be hidden or not.
+ *
+ * @param hideStammzahl <code>True</code> if source pins (<code>Stammzahl</code>en) should
+ * be hidden, otherwise <code>false</code>.
+ */
+ public void setHideStammzahl(boolean hideStammzahl) {
+ hideStammzahl_ = hideStammzahl;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/SAMLAttribute.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/SAMLAttribute.java
new file mode 100644
index 000000000..d0c2de8f8
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/SAMLAttribute.java
@@ -0,0 +1,94 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.data;
+
+/**
+ * This bean saves all data of a single SAMLAttribute:
+ * the name, value and namespace
+ *
+ * @author Stefan Knirsch
+ * @version $Id$
+ *
+ */
+public class SAMLAttribute {
+
+ /** the name to be stored */
+ private String name;
+ /** the namespace to be stored */
+ private String namespace;
+ /** the value to be stored */
+ private Object value;
+
+ /**
+ * Constructor for SAMLAttribute.
+ */
+ public SAMLAttribute(String name, String namespace, Object value) {
+
+ this.name = name;
+ this.namespace = namespace;
+ this.value = value;
+
+ }
+
+ /**
+ * Returns the name.
+ * @return String
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Returns the namespace.
+ * @return String
+ */
+ public String getNamespace() {
+ return namespace;
+ }
+
+ /**
+ * Returns the value.
+ * @return String
+ */
+ public Object getValue() {
+ return value;
+ }
+
+ /**
+ * Sets the name.
+ * @param name The name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Sets the namespace.
+ * @param namespace The namespace to set
+ */
+ public void setNamespace(String namespace) {
+ this.namespace = namespace;
+ }
+
+ /**
+ * Sets the value.
+ * @param value The value to set
+ */
+ public void setValue(Object value) {
+ this.value = value;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/Schema.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/Schema.java
new file mode 100644
index 000000000..9caed16b8
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/Schema.java
@@ -0,0 +1,41 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.data;
+
+/**
+ * Specifies the location of a schema.
+ *
+ * @author Harald Bratko
+ */
+public interface Schema {
+
+ /**
+ * The namespace URI of this schema.
+ *
+ * @return The namespace of this schema.
+ */
+ public String getNamespace();
+
+ /**
+ * The location URI of this schema.
+ * Relative paths have to be interpreted relative to the
+ * location of the MOA-ID config file.
+ *
+ * @return The location URI of this schema.
+ */
+ public String getSchemaLocation();
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/SchemaImpl.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/SchemaImpl.java
new file mode 100644
index 000000000..9cd2de975
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/SchemaImpl.java
@@ -0,0 +1,78 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.data;
+
+/**
+ * This class specifies the location of a schema.
+ *
+ * @author Harald Bratko
+ */
+public class SchemaImpl implements Schema {
+
+ /**
+ * The namespace of this schema.
+ */
+ protected String namespace_;
+
+ /**
+ * The location (URI) of this schema;
+ */
+ protected String schemaLocation_;
+
+ /**
+ * Sets the namespace and schema location URIS of this schema.
+ *
+ * @param namespace The namespace URI of this schema.
+ * @param schemaLocation The location URI of this schema.
+ */
+ public SchemaImpl(String namespace, String schemaLocation) {
+ namespace_ = namespace;
+ schemaLocation_ = schemaLocation;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.Schema#getNamespace()
+ */
+ public String getNamespace() {
+ return namespace_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.auth.data.Schema#getSchemaLocation()
+ */
+ public String getSchemaLocation() {
+ return schemaLocation_;
+ }
+
+ /**
+ * Sets the namespace.
+ *
+ * @param namespace The namespace to set.
+ */
+ public void setNamespace(String namespace) {
+ namespace_ = namespace;
+ }
+
+ /**
+ * Sets the location URI of this schema.
+ *
+ * @param schemaLocation The schemaLocation to set.
+ */
+ public void setSchemaLocation(String schemaLocation) {
+ schemaLocation_ = schemaLocation;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/VerifyXMLSignatureResponse.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/VerifyXMLSignatureResponse.java
new file mode 100644
index 000000000..881dbdf94
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/data/VerifyXMLSignatureResponse.java
@@ -0,0 +1,215 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.data;
+
+import iaik.x509.X509Certificate;
+
+/**
+ * This bean saves all information of the MOA-SP-Answer
+ * after the verification of any signature
+ *
+ * @author Stefan Knirsch
+ * @version $Id$
+ *
+ */
+public class VerifyXMLSignatureResponse {
+ /** The xmlDsigSubjectName to be stored */
+ private String xmlDsigSubjectName;
+ /** The signatureCheckCode to be stored */
+ private int signatureCheckCode;
+ /** The xmlDSIGManifestCheckCode to be stored */
+ private int xmlDSIGManifestCheckCode;
+ /** The xmlDSIGManigest to be stored */
+ private boolean xmlDSIGManigest;
+ /** The certificateCheckCode to be stored */
+ private int certificateCheckCode;
+ /** The publicAuthority to be stored */
+ private boolean publicAuthority;
+ /** The publicAuthorityCode to be stored */
+ private String publicAuthorityCode;
+ /** The qualifiedCertificate to be stored */
+ private boolean qualifiedCertificate;
+ /** The x509certificate to be stored */
+ private X509Certificate x509certificate;
+ /**
+ * The result of the signature manifest check. The default value <code>-1</code>
+ * indicates that the signature manifest has not been checked.
+ */
+ private int signatureManifestCheckCode = -1;
+
+ /**
+ * Returns the certificateCheckCode.
+ * @return int
+ */
+ public int getCertificateCheckCode() {
+ return certificateCheckCode;
+ }
+
+ /**
+ * Returns the signatureCheckCode.
+ * @return int
+ */
+ public int getSignatureCheckCode() {
+ return signatureCheckCode;
+ }
+
+ /**
+ * Returns the xmlDSIGManifestCheckCode.
+ * @return int
+ */
+ public int getXmlDSIGManifestCheckCode() {
+ return xmlDSIGManifestCheckCode;
+ }
+
+ /**
+ * Returns the xmlDsigSubjectName.
+ * @return String
+ */
+ public String getXmlDsigSubjectName() {
+ return xmlDsigSubjectName;
+ }
+
+ /**
+ * Sets the certificateCheckCode.
+ * @param certificateCheckCode The certificateCheckCode to set
+ */
+ public void setCertificateCheckCode(int certificateCheckCode) {
+ this.certificateCheckCode = certificateCheckCode;
+ }
+
+ /**
+ * Sets the signatureCheckCode.
+ * @param signatureCheckCode The signatureCheckCode to set
+ */
+ public void setSignatureCheckCode(int signatureCheckCode) {
+ this.signatureCheckCode = signatureCheckCode;
+ }
+
+ /**
+ * Sets the xmlDSIGManifestCheckCode.
+ * @param xmlDSIGManifestCheckCode The xmlDSIGManifestCheckCode to set
+ */
+ public void setXmlDSIGManifestCheckCode(int xmlDSIGManifestCheckCode) {
+ this.xmlDSIGManifestCheckCode = xmlDSIGManifestCheckCode;
+ }
+
+ /**
+ * Sets the xmlDsigSubjectName.
+ * @param xmlDsigSubjectName The xmlDsigSubjectName to set
+ */
+ public void setXmlDsigSubjectName(String xmlDsigSubjectName) {
+ this.xmlDsigSubjectName = xmlDsigSubjectName;
+ }
+
+ /**
+ * Returns the publicAuthorityCode.
+ * @return int
+ */
+ public String getPublicAuthorityCode() {
+ return publicAuthorityCode;
+ }
+
+ /**
+ * Sets the publicAuthorityCode.
+ * @param publicAuthorityCode The publicAuthorityCode to set
+ */
+ public void setPublicAuthorityCode(String publicAuthorityCode) {
+ this.publicAuthorityCode = publicAuthorityCode;
+ }
+
+ /**
+ * Returns the qualifiedCertificate.
+ * @return boolean
+ */
+ public boolean isQualifiedCertificate() {
+ return qualifiedCertificate;
+ }
+
+ /**
+ * Returns the x509certificate.
+ * @return X509Certificate
+ */
+ public X509Certificate getX509certificate() {
+ return x509certificate;
+ }
+
+ /**
+ * Sets the qualifiedCertificate.
+ * @param qualifiedCertificate The qualifiedCertificate to set
+ */
+ public void setQualifiedCertificate(boolean qualifiedCertificate) {
+ this.qualifiedCertificate = qualifiedCertificate;
+ }
+
+ /**
+ * Sets the x509certificate.
+ * @param x509certificate The x509certificate to set
+ */
+ public void setX509certificate(X509Certificate x509certificate) {
+ this.x509certificate = x509certificate;
+ }
+
+ /**
+ * Returns the xmlDSIGManigest.
+ * @return boolean
+ */
+ public boolean isXmlDSIGManigest() {
+ return xmlDSIGManigest;
+ }
+
+ /**
+ * Sets the xmlDSIGManigest.
+ * @param xmlDSIGManigest The xmlDSIGManigest to set
+ */
+ public void setXmlDSIGManigest(boolean xmlDSIGManigest) {
+ this.xmlDSIGManigest = xmlDSIGManigest;
+ }
+
+ /**
+ * Returns the publicAuthority.
+ * @return boolean
+ */
+ public boolean isPublicAuthority() {
+ return publicAuthority;
+ }
+
+ /**
+ * Sets the publicAuthority.
+ * @param publicAuthority The publicAuthority to set
+ */
+ public void setPublicAuthority(boolean publicAuthority) {
+ this.publicAuthority = publicAuthority;
+ }
+
+ /**
+ * Returns the the resulting code of the signature manifest check.
+ *
+ * @return The code of the sigature manifest check.
+ */
+ public int getSignatureManifestCheckCode() {
+ return signatureManifestCheckCode;
+ }
+
+ /**
+ * Sets the signatureManifestCode.
+ *
+ * @param signatureManifestCheckCode The signatureManifestCode to set.
+ */
+ public void setSignatureManifestCheckCode(int signatureManifestCheckCode) {
+ this.signatureManifestCheckCode = signatureManifestCheckCode;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationInvoker.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationInvoker.java
new file mode 100644
index 000000000..7042c7721
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationInvoker.java
@@ -0,0 +1,107 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.invoke;
+
+import java.util.Vector;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Call;
+import javax.xml.rpc.Service;
+import javax.xml.rpc.ServiceFactory;
+
+import org.apache.axis.message.SOAPBodyElement;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.id.ServiceException;
+import at.gv.egovernment.moa.id.config.ConnectionParameter;
+import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.spss.api.SignatureVerificationService;
+import at.gv.egovernment.moa.spss.api.xmlbind.VerifyXMLSignatureRequestParser;
+import at.gv.egovernment.moa.spss.api.xmlbind.VerifyXMLSignatureResponseBuilder;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse;
+
+/**
+ * Invoker of the <code>SignatureVerification</code> web service of MOA-SPSS.<br>
+ * Either invokes the web service, or calls the corresponding API, depending on configuration data.
+ *
+ * @author Stefan Knirsch
+ * @version $Id$
+ */
+public class SignatureVerificationInvoker {
+ /** This QName Object identifies the SignatureVerification endpoint of the web service */
+ private static final QName SERVICE_QNAME = new QName("SignatureVerification");
+
+ /**
+ * Method verifyXMLSignature.
+ * @param request to be sent
+ * @return Element with the answer
+ * @throws ServiceException if an error occurs
+ */
+ public Element verifyXMLSignature(Element request) throws ServiceException {
+ return doCall(SERVICE_QNAME, request);
+ }
+
+ /**
+ * Method doCall.
+ * @param serviceName the name of the service
+ * @param request the request to be sent
+ * @return Element the answer
+ * @throws ServiceException if an error occurs
+ */
+ protected Element doCall(QName serviceName, Element request) throws ServiceException {
+ ConnectionParameter authConnParam = null;
+ try {
+ Service service = ServiceFactory.newInstance().createService(serviceName);
+ Call call = service.createCall();
+ SOAPBodyElement body = new SOAPBodyElement(request);
+ SOAPBodyElement[] params = new SOAPBodyElement[] { body };
+ Vector responses;
+ SOAPBodyElement response;
+
+ String endPoint;
+ AuthConfigurationProvider authConfigProvider = AuthConfigurationProvider.getInstance();
+ authConnParam = authConfigProvider.getMoaSpConnectionParameter();
+ //If the ConnectionParameter do NOT exist, we try to get the api to work....
+ if (authConnParam != null) {
+ endPoint = authConnParam.getUrl();
+ call.setTargetEndpointAddress(endPoint);
+ responses = (Vector) call.invoke(serviceName, params);
+ response = (SOAPBodyElement) responses.get(0);
+ return response.getAsDOM();
+ }
+ else {
+ SignatureVerificationService svs = SignatureVerificationService.getInstance();
+ VerifyXMLSignatureRequest vsrequest = new VerifyXMLSignatureRequestParser().parse(request);
+
+ VerifyXMLSignatureResponse vsresponse = svs.verifyXMLSignature(vsrequest);
+ Document result = new VerifyXMLSignatureResponseBuilder().build(vsresponse);
+
+ Logger.setHierarchy("moa.id.auth");
+ return result.getDocumentElement();
+ }
+ }
+ catch (Exception ex) {
+ if (authConnParam != null) {
+ throw new ServiceException("service.00", new Object[] { ex.toString()}, ex);
+ } else {
+ throw new ServiceException("service.03", new Object[] { ex.toString()}, ex);
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/CreateXMLSignatureResponseParser.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/CreateXMLSignatureResponseParser.java
new file mode 100644
index 000000000..d5b6f9aa9
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/CreateXMLSignatureResponseParser.java
@@ -0,0 +1,234 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.parser;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.traversal.NodeIterator;
+
+import at.gv.egovernment.moa.id.AuthenticationException;
+import at.gv.egovernment.moa.id.ParseException;
+import at.gv.egovernment.moa.id.auth.data.CreateXMLSignatureResponse;
+import at.gv.egovernment.moa.id.auth.data.SAMLAttribute;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+/**
+ * Parses an <code>&lt;InfoboxReadResponse&gt;</code> returned from
+ * the security layer
+ *
+ * @author Stefan Knirsch
+ * @version $Id$
+ */
+
+public class CreateXMLSignatureResponseParser {
+ //
+ // XPath namespace prefix shortcuts
+ //
+
+ /** Xpath prefix for reaching SAML Namespaces */
+ private static final String SAML = Constants.SAML_PREFIX + ":";
+ /** Xpath prefix for reaching XML-DSIG Namespaces */
+ private static final String DSIG = Constants.DSIG_PREFIX + ":";
+ /** Xpath expression to the root element */
+ private static final String ROOT = ":CreateXMLSignatureResponse/";
+ /** Xpath expression to the SAML:Assertion element */
+ private static final String SAML_ASSERTION_XPATH = ROOT + SAML + "Assertion";
+ /** Xpath expression to the SAML:NameIdentifier element */
+ private static final String SAML_SUBJECT_NAME_IDENTIFIER_XPATH = SAML_ASSERTION_XPATH + "/" + SAML + "AttributeStatement/" + SAML + "Subject/" + SAML + "NameIdentifier";
+ /** Xpath expression to the AttributeStatement element */
+ private static final String SAML_ATTRIBUTE_XPATH = SAML_ASSERTION_XPATH + "/" + SAML + "AttributeStatement/" + SAML + "Attribute";
+ /** Xpath expression to the AttributeValue element */
+ private static final String SAML_ATTRIBUTE_VALUE_XPATH = SAML + "AttributeValue";
+
+
+ /** This is the root element of the CreateXMLsignatureResponse */
+ private Element sigResponse_;
+
+ /**
+ * Parses and validates the document given as string and extracts the
+ * root element.
+ *
+ * @param xmlResponse <code>&lt;CreateXMLSignatureResponse&gt;</code> as String
+ *
+ * @throws AuthenticationException if any authentication error occurs
+ * @throws ParseException if an element cannot be parsed
+ */
+ public CreateXMLSignatureResponseParser(String xmlResponse) throws AuthenticationException, ParseException {
+ try {
+ InputStream s = new ByteArrayInputStream(xmlResponse.getBytes("UTF-8"));
+ init(s);
+ }
+ catch (Throwable t) {
+ throw new ParseException("parser.01", new Object[] { t.toString()}, t);
+ }
+ }
+
+ /**
+ * Parses and validates the document given as stream and extracts the
+ * root element.
+ *
+ * @param is <code>&lt;InfoboxReadResponse&gt;</code> as InputStream
+ *
+ * @throws AuthenticationException If any authentication error occurs
+ * @throws ParseException If an element cannot be parsed
+ */
+ public CreateXMLSignatureResponseParser(InputStream is) throws AuthenticationException, ParseException {
+ init(is);
+ }
+
+ /**
+ * Constructor for CreateXMLSignatureResponseParser.
+ * The incoming Element will be used for further operations
+ * @param xmlResponse <code>&lt;InfoboxReadResponse&gt;</code> as InputStream
+ */
+ public CreateXMLSignatureResponseParser(Element xmlResponse) {
+ sigResponse_ = xmlResponse;
+ }
+
+ /**
+ * Initializes the parser.
+ * Parses and validates the document given as stream and extracts the
+ * root element.
+ *
+ * @param is The CreateXMLSignatureResponse as stream.
+ * @throws AuthenticationException if an authentication error occurs.
+ * @throws ParseException If an error occurs on parsing the the document.
+ */
+ private void init(InputStream is) throws AuthenticationException, ParseException {
+ try {
+
+ Element responseElem = DOMUtils.parseXmlValidating(is);
+
+ if ("CreateXMLSignatureResponse".equals(responseElem.getLocalName())) {
+ sigResponse_ = responseElem;
+ } else {
+ ErrorResponseParser erp = new ErrorResponseParser(responseElem);
+ throw new AuthenticationException("auth.08", new Object[] { erp.getErrorCode(), erp.getErrorInfo()});
+ }
+
+ } catch (Throwable t) {
+ throw new ParseException("parser.01", new Object[] { t.toString()}, t);
+ }
+ }
+
+ /**
+ * Unmarshalls the <@link sigResponse> to an
+ * <code>&lt;CreateXMLSignatureResponse&gt;</code> object.
+ *
+ * @return a <code>&lt;CreateXMLSignatureResponse&gt;</code> object
+ * @throws ParseException
+ */
+
+ public CreateXMLSignatureResponse parseResponseDsig() throws ParseException {
+ CreateXMLSignatureResponse cResp;
+ try {
+ cResp = new CreateXMLSignatureResponse();
+
+ NodeList list = sigResponse_.getElementsByTagNameNS(Constants.DSIG_NS_URI, "Signature");
+ Element dsigSignatureNode = (Element) list.item(0);
+
+ Element dsigSignatureElement = (Element) dsigSignatureNode;
+ cResp.setDsigSignature(dsigSignatureElement);
+ }
+ catch (Throwable t) {
+ throw new ParseException("parser.01", new Object[] { t.toString()}, t);
+ }
+ return cResp;
+ }
+
+ /**
+ * Unmarshalls the <@link sigResponse> to an
+ * <code>&lt;CreateXMLSignatureResponse&gt;</code> object.
+ *
+ * @return a <code>&lt;CreateXMLSignatureResponse&gt;</code> object
+ * @throws ParseException
+ */
+
+ public CreateXMLSignatureResponse parseResponse() throws ParseException {
+ CreateXMLSignatureResponse cResp;
+ try {
+ cResp = new CreateXMLSignatureResponse();
+ String slPrefix = XPathUtils.getSlPrefix(sigResponse_);
+ cResp.setSamlNameIdentifier(XPathUtils.getElementValue(sigResponse_, "/" + slPrefix + SAML_SUBJECT_NAME_IDENTIFIER_XPATH, null));
+ cResp.setSamlAssertion((Element) XPathUtils.selectSingleNode(sigResponse_, "/" + slPrefix + SAML_ASSERTION_XPATH));
+ NodeIterator attrIter = XPathUtils.selectNodeIterator(sigResponse_, "/" + slPrefix + SAML_ATTRIBUTE_XPATH);
+ Element samlAttr;
+ List samlAttributes = new ArrayList();
+ while ((samlAttr = (Element) attrIter.nextNode()) != null) {
+ String attrName = XPathUtils.getAttributeValue(samlAttr, "@AttributeName", "");
+ String attrNamespace = XPathUtils.getAttributeValue(samlAttr, "@AttributeNamespace", "");
+ Object attrValue;
+ Element attrValueElem = (Element)XPathUtils.selectSingleNode(samlAttr, SAML_ATTRIBUTE_VALUE_XPATH);
+ attrValue = DOMUtils.getElementFromNodeList(attrValueElem.getChildNodes());
+ if (attrValue == null) {
+ if (null!=attrValueElem.getFirstChild()) {
+ attrValue = attrValueElem.getFirstChild().getNodeValue();
+ } else {
+ attrValue = "";
+ }
+ }
+ samlAttributes.add(new SAMLAttribute(attrName, attrNamespace, attrValue));
+ }
+ SAMLAttribute[] result = new SAMLAttribute[samlAttributes.size()];
+ samlAttributes.toArray(result);
+ cResp.setSamlAttributes(result);
+ }
+ catch (Throwable t) {
+ throw new ParseException("parser.01", new Object[] { t.toString()}, t);
+ }
+ return cResp;
+ }
+
+// public CreateXMLSignatureResponse parseResponse() throws ParseException {
+// CreateXMLSignatureResponse cResp;
+// try {
+// cResp = new CreateXMLSignatureResponse();
+// Element samlAssertion = (Element)sigResponse.getElementsByTagNameNS(Constants.SAML_NS_URI, "Assertion").item(0);
+// cResp.setSamlAssertion(samlAssertion);
+// Element samlAttributeStatement = (Element)samlAssertion.getElementsByTagNameNS(Constants.SAML_NS_URI, "AttributeStatement").item(0);
+// Element samlSubject = (Element)samlAttributeStatement.getElementsByTagNameNS(Constants.SAML_NS_URI, "Subject").item(0);
+// Element samlNameIdentifier = (Element)samlSubject.getElementsByTagNameNS(Constants.SAML_NS_URI, "NameIdentifier").item(0);
+// cResp.setSamlNameIdentifier(samlNameIdentifier.getFirstChild().getNodeValue());
+// NodeList nl = samlAttributeStatement.getElementsByTagNameNS(Constants.SAML_NS_URI, "Attribute");
+// List samlAttributes = new ArrayList();
+// for (int i=0; i<nl.getLength(); i++) {
+// Element samlAttribute = (Element)nl.item(i);
+// String attrName = samlAttribute.getAttribute("AttributeName");
+// String attrNamespace = samlAttribute.getAttribute("AttributeNamespace");
+// String attrValue = ((Element)samlAttribute.getElementsByTagNameNS(Constants.SAML_NS_URI, "AttributeValue").item(0)).getFirstChild().getNodeValue();
+// samlAttributes.add(new SAMLAttribute(attrName, attrNamespace, attrValue));
+// }
+// SAMLAttribute[] result = new SAMLAttribute[samlAttributes.size()];
+// samlAttributes.toArray(result);
+// cResp.setSamlAttributes(result);
+// }
+// catch (Throwable t) {
+// throw new ParseException("parser.01", new Object[] { t.toString()}, t);
+// }
+// return cResp;
+// }
+
+
+
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/ErrorResponseParser.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/ErrorResponseParser.java
new file mode 100644
index 000000000..b2082786c
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/ErrorResponseParser.java
@@ -0,0 +1,87 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.parser;
+
+import java.util.List;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.id.ParseException;
+import at.gv.egovernment.moa.util.DOMUtils;
+
+/**
+ * Parses an <code>&lt;ErrorResponse&gt;</code>.
+ *
+ * @author Stefan Knirsch
+ * @version $Id$
+ */
+
+public class ErrorResponseParser {
+
+ /**
+ * The error code included in this error response.
+ * <code>1000</code> is used as default value, if some problems occur on
+ * evaluating the error response.
+ */
+ private String errorCode_ = "1000";
+
+ /**
+ * The error info included in this error response.
+ * <code>&lt;Unklassifizierter Fehler.&gt;</code> is used as default value,
+ * if some problems occur on evaluating the error response.
+ */
+ private String errorInfo_ = "Unklassifizierter Fehler.";
+
+
+ /**
+ * This Constructor extracts the error code and error info included in this
+ * error response.
+ *
+ * @param errorElement The error element. This is the root element of
+ * the error response.
+ */
+ public ErrorResponseParser(Element errorElement) throws ParseException {
+ if (errorElement != null) {
+ String namespace = errorElement.getNamespaceURI();
+ NodeList nl = errorElement.getElementsByTagNameNS(namespace, "ErrorCode");
+ if (nl.getLength() == 1) {
+ errorCode_ = ((Element)nl.item(0)).getFirstChild().getNodeValue();
+ }
+ nl = errorElement.getElementsByTagNameNS(namespace, "Info");
+ if (nl.getLength() == 1) {
+ errorInfo_ = ((Element)nl.item(0)).getFirstChild().getNodeValue();
+ }
+ }
+ }
+
+ /**
+ * Returns the error code included in this error response.
+ */
+ public String getErrorCode() {
+ return errorCode_ ;
+ }
+
+ /**
+ * Returns the information included in this error response.
+ * @return The error infomation String
+ */
+ public String getErrorInfo() {
+ return errorInfo_ ;
+ }
+
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/ExtendedInfoboxReadResponseParser.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/ExtendedInfoboxReadResponseParser.java
new file mode 100644
index 000000000..574dd811e
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/ExtendedInfoboxReadResponseParser.java
@@ -0,0 +1,172 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.parser;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.id.ParseException;
+import at.gv.egovernment.moa.id.auth.data.InfoboxToken;
+import at.gv.egovernment.moa.id.auth.data.InfoboxTokenImpl;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+
+/**
+ * Parses and unmarshales <code>InfoboxReadResponse<code>.
+ * This parser is especially used for parsing additional responses (additional to that
+ * one containing the <code>IdentityLink</code> retuned from the BKU as an answer of
+ * a <code>&lt;PushInfobox&gt;</code> request.
+ */
+public class ExtendedInfoboxReadResponseParser {
+
+ /**
+ * Hide default constructor.
+ */
+ private ExtendedInfoboxReadResponseParser() {
+ }
+
+ /**
+ * Parses and unmarshales the given <code>infoboxReadResponse</code> to a list of
+ * {@link at.gv.egovernment.moa.id.auth.data.InfoboxToken InfoboxToken} objects.
+ * The method parses the given <code>infoboxReadResponse</code>
+ *
+ * @param infoboxReadResponse The infobox read response to be unmarshaled.
+ * @param infoboxName The name of the infobox the reponse corresponds to.
+ *
+ * @return A list of {@link at.gv.egovernment.moa.id.auth.data.InfoboxToken InfoboxToken}
+ * objects. Maybe empty.
+ *
+ * @throws ParseException If an error occurs on parsing and unmarshaling the response.
+ */
+ public static List parseInfoboxReadResponse(String infoboxReadResponse, String infoboxName)
+ throws ParseException
+ {
+ Element infoboxReadResponseElem = null;
+ try {
+ Document doc =
+ DOMUtils.parseDocument(infoboxReadResponse, true, Constants.ALL_SCHEMA_LOCATIONS, null);
+ infoboxReadResponseElem = doc.getDocumentElement();
+ } catch (Exception e) {
+ Logger.error("InfoboxReadResponse for \"" + infoboxName +
+ "\"-infobox could not be parsed successfully: " + e.getMessage());
+ throw new ParseException("parser.01", new Object[] {infoboxName + "-InfoboxReadResponse"});
+ }
+
+ Vector infoboxTokenList = new Vector();
+
+ if (infoboxReadResponseElem != null) {
+ // avoid using namespace URI or prefix, because it might change within the response
+ // (e.g.: sl11-namespace, some child sl10-namespace
+ List infoboxReadResponseChildren = DOMUtils.getChildElements(infoboxReadResponseElem);
+ String key = null;
+ boolean primary = true;
+ Element infoboxReadResponseChild = (Element)infoboxReadResponseChildren.get(0);
+ String infoboxReadResponseChildName = infoboxReadResponseChild.getLocalName();
+ if (infoboxReadResponseChildName.equals("AssocArrayData")) {
+ // get the <Pair> child elements from the <AssocArrayData> element
+ List assocArrayPairs = DOMUtils.getChildElements(infoboxReadResponseChild);
+ Iterator assocArrayPairIt = assocArrayPairs.iterator();
+ int pairCount = 0;
+ // step through the <Pair> elemnts
+ while (assocArrayPairIt.hasNext()) {
+ Element assocArrayPair = (Element)assocArrayPairIt.next();
+ // check if the element actually a "Pair" element and not only a "key"
+ if (assocArrayPair.getLocalName().equals("Key")) {
+ // do not accept only a Key
+ throw new ParseException("parser.07", new Object[] {infoboxName});
+ }
+ key = assocArrayPair.getAttribute("Key");
+ if (pairCount > 0) {
+ primary = false;
+ }
+ pairCount++;
+ infoboxTokenList.addAll(getTokenFromXMLOrBase64Content(assocArrayPair, infoboxName, key, primary));
+ }
+
+ } else if (infoboxReadResponseChildName.equals("BinaryFileData")) {
+ infoboxTokenList.addAll(getTokenFromXMLOrBase64Content(infoboxReadResponseChild, infoboxName, null, true));
+ }
+ }
+ return infoboxTokenList;
+ }
+
+ /**
+ * Unmarshales the <code>&lt;XMLContent&gt;</code> or
+ * <code>&lt;Base64Content&gt;</code> child of the given element to a list of
+ * infobox token.
+ *
+ * @param contentParent The elment including the <code>&lt;XMLContent&gt;</code> or
+ * <code>&lt;Base64Content&gt;</code> child to unmarshal the
+ * infobox token from.
+ * @param infoboxName The name of the infobox.
+ * @param key The key of an <code>AssocArrayData-Pair</code>.
+ * Maybe <code>null</code>.
+ * @param primary Specifies whether this token is the first (e.g. in an
+ * AssocArrayData) token.
+ *
+ * @return A infobox token list.
+ *
+ * @throws ParseException If the <code>contentParent</code> has no <code>&lt;XMLContent&gt;</code>
+ * or <code>&lt;Base64Content&gt;</code> child or the
+ * <code>&lt;XMLContent&gt;</code> is empty.
+ */
+ public static List getTokenFromXMLOrBase64Content(
+ Element contentParent,
+ String infoboxName,
+ String key,
+ boolean primary)
+ throws ParseException
+ {
+ Vector tokenList = new Vector();
+ // get the <XMLContent> or <Base64Content>
+ List content = DOMUtils.getChildElements(contentParent);
+ if (content.size() == 1) {
+ Element contentElem = (Element)content.get(0);
+ if (contentElem.getLocalName().equals("XMLContent")) {
+ List xmlContentChildren = DOMUtils.getChildElements(contentElem);
+ if (xmlContentChildren.size() == 0) {
+ throw new ParseException("parser.06", new Object[] {infoboxName, "Inhalt", "XMLContent"});
+ }
+ int xmlCount = 0;
+ Iterator contentIt = xmlContentChildren.iterator();
+ while (contentIt.hasNext()) {
+ Element xmlToken = (Element)contentIt.next();
+ if (xmlCount > 0) {
+ primary = false;
+ }
+ InfoboxToken infoboxToken = new InfoboxTokenImpl(key, primary, xmlToken);
+ tokenList.add(infoboxToken);
+ xmlCount++;
+ }
+ } else {
+ String base64Token = contentElem.getFirstChild().getNodeValue();
+ InfoboxToken infoboxToken = new InfoboxTokenImpl(key, primary, base64Token);
+ tokenList.add(infoboxToken);
+ }
+ } else {
+ throw new ParseException("parser.06",
+ new Object[] {infoboxName, "XMLContent oder Base64Content", contentParent.getLocalName()});
+ }
+ return tokenList;
+ }
+
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/IdentityLinkAssertionParser.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/IdentityLinkAssertionParser.java
new file mode 100644
index 000000000..f9c268715
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/IdentityLinkAssertionParser.java
@@ -0,0 +1,334 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.parser;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.math.BigInteger;
+import java.security.PublicKey;
+import java.security.interfaces.RSAPublicKey;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.traversal.NodeIterator;
+
+import at.gv.egovernment.moa.id.ECDSAConverterException;
+import at.gv.egovernment.moa.id.ParseException;
+import at.gv.egovernment.moa.id.auth.data.IdentityLink;
+import at.gv.egovernment.moa.id.util.ECDSAKeyValueConverter;
+import at.gv.egovernment.moa.util.Base64Utils;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+/**
+ * Parses an identity link <code>&lt;saml:Assertion&gt;</code>
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class IdentityLinkAssertionParser {
+
+ //
+ // XPath namespace prefix shortcuts
+ //
+
+ /** Xpath prefix for reaching PersonData Namespaces */
+ private static final String PDATA = Constants.PD_PREFIX + ":";
+ /** Xpath prefix for reaching SAML Namespaces */
+ private static final String SAML = Constants.SAML_PREFIX + ":";
+ /** Xpath prefix for reaching XML-DSIG Namespaces */
+ private static final String DSIG = Constants.DSIG_PREFIX + ":";
+ /** Xpath prefix for reaching ECDS Namespaces */
+ private static final String ECDSA = Constants.ECDSA_PREFIX + ":";
+ /** Xpath expression to the root element */
+ private static final String ROOT = "";
+ /** Xpath expression to the SAMLSubjectConfirmationData element */
+ private static final String SAML_SUBJECT_CONFIRMATION_DATA_XPATH =
+ ROOT
+ + SAML
+ + "AttributeStatement/"
+ + SAML
+ + "Subject/"
+ + SAML
+ + "SubjectConfirmation/"
+ + SAML
+ + "SubjectConfirmationData";
+ /** Xpath expression to the PersonData element */
+ private static final String PERSON_XPATH =
+ SAML_SUBJECT_CONFIRMATION_DATA_XPATH
+ + "/"
+ + PDATA
+ + "Person";
+ /** Xpath expression to the PersonData GivenName element */
+ private static final String PERSON_GIVEN_NAME_XPATH =
+ PERSON_XPATH
+ + "/"
+ + PDATA
+ + "Name/"
+ + PDATA
+ + "GivenName";
+ /** Xpath expression to the PersonData FamilyName element */
+ private static final String PERSON_FAMILY_NAME_XPATH =
+ PERSON_XPATH
+ + "/"
+ + PDATA
+ + "Name/"
+ + PDATA
+ + "FamilyName";
+ /** Xpath expression to the PersonData DateOfBirth element */
+ private static final String PERSON_DATE_OF_BIRTH_XPATH =
+ PERSON_XPATH
+ + "/"
+ + PDATA
+ + "DateOfBirth";
+ /** Xpath expression to the Identification element */
+ private static final String PERSON_IDENT_XPATH =
+ PERSON_XPATH
+ + "/"
+ + PDATA
+ + "Identification";
+
+ /** Xpath expression to the Identification Value element */
+ public static final String PERSON_IDENT_VALUE_XPATH =
+ PERSON_XPATH
+ + "/"
+ + PDATA
+ + "Identification/"
+ + PDATA
+ + "Value";
+
+ /** Xpath expression to the Identification Value element */
+ private static final String PERSON_IDENT_TYPE_XPATH =
+ PERSON_XPATH
+ + "/"
+ + PDATA
+ + "Identification/"
+ + PDATA
+ + "Type";
+
+ /** Xpath expression to the RSAKeyValue element */
+ private static final String RSA_KEY_VALUE_XPATH =
+ ROOT
+ + SAML
+ + "AttributeStatement/"
+ + SAML
+ + "Attribute/"
+ + SAML
+ + "AttributeValue/"
+ + DSIG
+ + "RSAKeyValue";
+
+ /** Xpath expression to the ECKeyValue element */
+ private static final String ECDSA_KEY_VALUE_XPATH =
+ ROOT
+ + SAML
+ + "AttributeStatement/"
+ + SAML
+ + "Attribute/"
+ + SAML
+ + "AttributeValue/"
+ + ECDSA
+ + "ECDSAKeyValue";
+
+
+ /** Xpath expression to the RSA Modulus element */
+ private static final String RSA_KEY_MODULUS_XPATH = DSIG + "Modulus";
+ /** Xpath expression to the RSA Exponent element */
+ private static final String RSA_KEY_EXPONENT_XPATH = DSIG + "Exponent";
+ /** Xpath expression to the DSIG X509Certificate element */
+ private static final String DSIG_CERTIFICATES_XPATH =
+ ROOT
+ + DSIG
+ + "Signature/"
+ + DSIG
+ + "KeyInfo/"
+ + DSIG
+ + "X509Data/"
+ + DSIG
+ + "X509Certificate";
+ /** Xpath expression to the DSIG Transforms element */
+ private static final String DSIG_REFERENCE_TRANSFORMATION_XPATH =
+ ROOT
+ + DSIG
+ + "Signature/"
+ + DSIG
+ + "SignedInfo/"
+ + DSIG
+ + "Reference/"
+ + DSIG
+ + "Transforms";
+
+ /** The IssueInstant attribute of the SAML assertion */
+ private static final String ISSUE_INSTANT_ATTR = "IssueInstant";
+
+ /**This is the root element of the XML-Document provided by the Security Layer Card*/
+ private Element assertionElem;
+
+ /**
+ * Constructor for <code>IdentityLinkAssertionParser</code>.
+ * A DOM-representation of the incoming String will be created
+ * @param xmlAssertion <code>&lt;saml:Assertion&gt;</code> as String
+ * @throws ParseException on any parsing error
+ */
+ public IdentityLinkAssertionParser(String xmlAssertion) throws ParseException {
+ try {
+ InputStream s = new ByteArrayInputStream(xmlAssertion.getBytes("UTF-8"));
+ assertionElem = DOMUtils.parseXmlValidating(s);
+ }
+ catch (Throwable t) {
+ throw new ParseException("parser.01", new Object[] { t.toString()}, t);
+ }
+ }
+
+ /**
+ * Sets the <@link assertionElem>.
+ * @param xmlAssertion the assertion element
+ * @throws ParseException on any parsing error
+ */
+ public IdentityLinkAssertionParser(Element xmlAssertion) throws ParseException {
+ assertionElem = xmlAssertion;
+ }
+
+ /**
+ * Constructor for <code>IdentityLinkAssertionParser</code>.
+ * A DOM-representation of the incoming Inputstream will be created
+ * @param xmlAssertion <code>&lt;saml:Assertion&gt;</code> as InputStream
+ * @throws ParseException on any parsing error
+ */
+ public IdentityLinkAssertionParser(InputStream xmlAssertion) throws Exception {
+ try {
+ assertionElem = DOMUtils.parseXmlValidating(xmlAssertion);
+ }
+ catch (Throwable t) {
+ throw new ParseException("parser.01", new Object[] { t.toString() }, t);
+ }
+ }
+
+ /**
+ * Parses the identity link from the <code>&lt;saml:Assertion&gt;</code>
+ * @return Identity link
+ * @throws ParseException on any parsing error
+ */
+
+ public IdentityLink parseIdentityLink() throws ParseException {
+ IdentityLink identityLink;
+ try {
+ identityLink = new IdentityLink();
+ identityLink.setSamlAssertion(assertionElem);
+ identityLink.setIssueInstant(assertionElem.getAttribute(ISSUE_INSTANT_ATTR));
+ identityLink.setPrPerson((Element)
+ XPathUtils.selectSingleNode(assertionElem, PERSON_XPATH));
+ identityLink.setIdentificationValue(
+ XPathUtils.getElementValue(assertionElem, PERSON_IDENT_VALUE_XPATH, ""));
+ identityLink.setIdentificationType(
+ XPathUtils.getElementValue(assertionElem, PERSON_IDENT_TYPE_XPATH, ""));
+ identityLink.setGivenName(
+ XPathUtils.getElementValue(assertionElem, PERSON_GIVEN_NAME_XPATH, ""));
+ identityLink.setFamilyName(
+ XPathUtils.getElementValue(assertionElem, PERSON_FAMILY_NAME_XPATH, ""));
+ identityLink.setDateOfBirth(
+ XPathUtils.getElementValue(assertionElem, PERSON_DATE_OF_BIRTH_XPATH, ""));
+ NodeIterator dsigRefTransforms =
+ XPathUtils.selectNodeIterator(assertionElem, DSIG_REFERENCE_TRANSFORMATION_XPATH);
+ List transElems = new ArrayList();
+ Element transformsElem;
+ while ((transformsElem = (Element) dsigRefTransforms.nextNode()) != null) {
+ transElems.add(transformsElem);
+ }
+ Element[] result = new Element[transElems.size()];
+ transElems.toArray(result);
+ identityLink.setDsigReferenceTransforms(result);
+
+ identityLink.setPublicKey(getPublicKeys());
+
+ }
+ catch (Throwable t) {
+ throw new ParseException("parser.01", new Object[] { t.toString() }, t);
+ }
+
+ return identityLink;
+ }
+
+ /**
+ * Parses an array of Public Keys from the <code>&lt;InfoboxReadResponse&gt;</code>
+ * @return RSAPublicKey[]
+ * @throws IOException can occur when decoding the base64 values of the modulus and exponent
+ */
+ public PublicKey[] getPublicKeys() throws IOException, ECDSAConverterException{
+
+
+ List pubKeys = new ArrayList();
+ //Try to get RSA-Keys
+ NodeIterator rsaIter =
+ XPathUtils.selectNodeIterator(assertionElem, Constants.nSMap, RSA_KEY_VALUE_XPATH);
+ Element rsaElem;
+
+ while ((rsaElem = (Element) rsaIter.nextNode()) != null) {
+ String modulus =
+ XPathUtils.getElementValue(rsaElem, RSA_KEY_MODULUS_XPATH, "");
+ String exponent =
+ XPathUtils.getElementValue(rsaElem, RSA_KEY_EXPONENT_XPATH, "");
+
+ RSAPublicKey resPub =
+ new iaik.security.rsa.RSAPublicKey(
+ new BigInteger(1, Base64Utils.decode(modulus, true)),
+ new BigInteger(1, Base64Utils.decode(exponent, true)));
+ pubKeys.add(resPub);
+ }
+
+ //Try to get ECDSA-Keys
+ NodeIterator ecdsaIter =
+ XPathUtils.selectNodeIterator(assertionElem, Constants.nSMap, ECDSA_KEY_VALUE_XPATH);
+ Element ecdsaElem;
+ PublicKey ecPubKey = null;
+ while ((ecdsaElem = (Element) ecdsaIter.nextNode()) != null) {
+ try {
+ ecPubKey = ECDSAKeyValueConverter.element2ECDSAPublicKey(ecdsaElem);
+ pubKeys.add(ecPubKey);
+ }
+ catch(Exception e) {
+ throw new ECDSAConverterException("parser.03", new Object[] { e.toString() }, e);
+ }
+ }
+
+ PublicKey[] result = new PublicKey[pubKeys.size()];
+ pubKeys.toArray(result);
+ return result;
+
+ }
+ /**
+ * Parses a string array of decoded base64 certificates from
+ * the <code>&lt;InfoboxReadResponse&gt;</code> found in the dsig-signature
+ * @return String[] with raw-certificates from the dsig-signature keyinfo
+ * @throws Exception
+ */
+ public String[] getCertificates() throws Exception {
+ List certs = new ArrayList();
+ NodeIterator rsaIter =
+ XPathUtils.selectNodeIterator(assertionElem, DSIG_CERTIFICATES_XPATH);
+ Element certElem;
+ while ((certElem = (Element) rsaIter.nextNode()) != null) {
+ String content = DOMUtils.getText(certElem);
+ certs.add(new String(Base64Utils.decode(content, true)));
+ }
+ String[] result = new String[certs.size()];
+ certs.toArray(result);
+ return result;
+
+ }
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/InfoboxReadResponseParser.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/InfoboxReadResponseParser.java
new file mode 100644
index 000000000..b53a1a2dc
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/InfoboxReadResponseParser.java
@@ -0,0 +1,231 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.parser;
+
+import iaik.x509.X509Certificate;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.security.cert.CertificateException;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.TransformerException;
+
+import org.apache.axis.encoding.Base64;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.id.AuthenticationException;
+import at.gv.egovernment.moa.id.ParseException;
+import at.gv.egovernment.moa.id.auth.data.IdentityLink;
+import at.gv.egovernment.moa.id.auth.validator.parep.client.szrgw.SZRGWConstants;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+import com.sun.org.apache.xpath.internal.XPathAPI;
+
+/**
+ * Parses an <code>&lt;InfoboxReadResponse&gt;</code>.
+ *
+ * @author Stefan Knirsch
+ * @version $Id$
+ */
+
+public class InfoboxReadResponseParser {
+
+ /** This is the root element of the XML-Document provided by the Security Layer Card*/
+ private Element infoBoxElem_;
+
+ /**
+ * Parses and validates the document given as string and extracts the
+ * root element.
+ *
+ * @param xmlResponse <code>&lt;InfoboxReadResponse&gt;</code> as String
+ * @throws ParseException If an element cannot be parsed
+ * @throws AuthenticationException If any authentication error occurs
+ */
+ public InfoboxReadResponseParser(String xmlResponse) throws ParseException, AuthenticationException {
+
+ try {
+ InputStream s = new ByteArrayInputStream(xmlResponse.getBytes("UTF-8"));
+ init(s);
+ }
+ catch (Throwable t) {
+ throw new ParseException("parser.01", new Object[] { t.toString()}, t);
+ }
+ }
+
+ /**
+ * Parses and validates the document given as stream and extracts the
+ * root element.
+ *
+ * @param is <code>&lt;InfoboxReadResponse&gt;</code> as InputStream
+ * @throws ParseException If an element cannot be parsed
+ * @throws AuthenticationException If any authentication error occurs
+ */
+ public InfoboxReadResponseParser(InputStream is) throws ParseException, AuthenticationException {
+ init(is);
+ }
+
+ /**
+ * Initializes the parser.
+ * Parses and validates the document given as stream and extracts the
+ * root element.
+ *
+ * @param is The InfoBoxReadResponse as stream.
+ * @throws AuthenticationException If an authentication error occurs.
+ * @throws ParseException If an error occurs on parsing the the document.
+ */
+ private void init(InputStream is) throws AuthenticationException, ParseException {
+ try {
+
+ Element responseElem = DOMUtils.parseXmlValidating(is);
+
+ if ("InfoboxReadResponse".equals(responseElem.getLocalName())) {
+ infoBoxElem_ = responseElem;
+ } else {
+ ErrorResponseParser erp = new ErrorResponseParser(responseElem);
+ throw new AuthenticationException("auth.08", new Object[] { erp.getErrorCode(), erp.getErrorInfo()});
+ }
+
+ } catch (Throwable t) {
+ throw new ParseException("parser.01", new Object[] { t.toString()}, t);
+ }
+ }
+
+
+
+ /**
+ * Parses the embedded <code>&lt;saml:Assertion&gt;</code> element from <code>&lt;InfoboxReadResponse&gt;</code>
+ * @return <code>&lt;saml:Assertion&gt;</code> as String
+ * @throws ParseException on any parsing error
+ */
+// public String parseSAMLAssertion() throws ParseException {
+// try {
+//
+// String slPrefix = XPathUtils.getSlPrefix(infoBoxElem_);
+// StringBuffer sb = new StringBuffer("/");
+// sb.append(slPrefix);
+// sb.append(":InfoboxReadResponse/");
+// sb.append(slPrefix);
+// sb.append(":BinaryFileData/");
+// sb.append(slPrefix);
+// sb.append(":XMLContent/");
+// sb.append(Constants.SAML_PREFIX);
+// sb.append(":Assertion");
+// String samlAssertionXPath = sb.toString();
+// Element samlAssertion = (Element) XPathUtils.selectSingleNode(infoBoxElem_, samlAssertionXPath);
+// return DOMUtils.serializeNode(samlAssertion);
+//
+// }
+// catch (Throwable t) {
+// throw new ParseException("parser.01", new Object[] { t.toString()}, t);
+// }
+// }
+
+ /**
+ * Parses the embedded <code>&lt;saml:Assertion&gt;</code> element from <code>&lt;InfoboxReadResponse&gt;</code>
+ * @return <code>&lt;saml:Assertion&gt;</code> as String
+ * @throws ParseException on any parsing error
+ */
+ public Element parseSAMLAssertion() throws ParseException {
+ try {
+
+ String slPrefix = XPathUtils.getSlPrefix(infoBoxElem_);
+ StringBuffer sb = new StringBuffer("/");
+ sb.append(slPrefix);
+ sb.append(":InfoboxReadResponse/");
+ sb.append(slPrefix);
+ sb.append(":BinaryFileData/");
+ sb.append(slPrefix);
+ sb.append(":XMLContent/");
+ sb.append(Constants.SAML_PREFIX);
+ sb.append(":Assertion");
+ String samlAssertionXPath = sb.toString();
+ Element samlAssertion = (Element) XPathUtils.selectSingleNode(infoBoxElem_, samlAssertionXPath);
+ return samlAssertion;
+
+ }
+ catch (Throwable t) {
+ throw new ParseException("parser.01", new Object[] { t.toString()}, t);
+ }
+ }
+
+ /**
+ * Parses the identity link from the <code>&lt;saml:Assertion&gt;</code>
+ * @return Identity link
+ * @throws ParseException on any parsing error
+ */
+
+// public IdentityLink parseIdentityLink() throws ParseException {
+// String samlAssertionString = parseSAMLAssertion();
+// IdentityLinkAssertionParser ilParser = new IdentityLinkAssertionParser(samlAssertionString);
+// return ilParser.parseIdentityLink();
+// }
+
+ /**
+ * Parses the identity link from the <code>&lt;saml:Assertion&gt;</code>
+ * @return Identity link
+ * @throws ParseException on any parsing error
+ */
+ public IdentityLink parseIdentityLink() throws ParseException {
+ Element samlAssertion = parseSAMLAssertion();
+ IdentityLinkAssertionParser ilParser = new IdentityLinkAssertionParser(samlAssertion);
+ return ilParser.parseIdentityLink();
+ }
+
+ /**
+ * Returns the certificate given in the InfoboxReadResponse
+ * @return
+ * @throws ParseException
+ */
+ public X509Certificate parseCertificate() throws ParseException {
+ try {
+ DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ Document doc = builder.newDocument();
+
+ Element nameSpaceNode = doc.createElement("NameSpaceNode");
+ nameSpaceNode.setAttribute("xmlns:" + Constants.PD_PREFIX, Constants.PD_NS_URI);
+ nameSpaceNode.setAttribute("xmlns:" + Constants.DSIG_PREFIX, Constants.DSIG_NS_URI);
+ nameSpaceNode.setAttribute("xmlns:" + Constants.SL12_PREFIX, Constants.SL12_NS_URI);
+
+ Element base64ContentElement = (Element)XPathAPI.selectSingleNode(infoBoxElem_.getParentNode(), "//sl:Base64Content[1]", nameSpaceNode);
+
+ if (base64ContentElement == null) {
+ throw new ParseException("parser.01", new Object[] { "Could not find Base64Content for X509Certificate."});
+ }
+
+ String base64Content = DOMUtils.getText(base64ContentElement);
+
+ // Decode Base64 value to X509Certificate
+ byte[] content = Base64.decode(base64Content);
+ return new X509Certificate(content);
+
+ } catch (ParserConfigurationException e) {
+ throw new ParseException("parser.01", new Object[] { "Could not parse X509Certificate from InfoboxReadRequest."}, e);
+ } catch (TransformerException e) {
+ throw new ParseException("parser.01", new Object[] { "Could not parse X509Certificate from InfoboxReadRequest."}, e);
+ } catch (CertificateException e) {
+ throw new ParseException("parser.01", new Object[] { "Could not parse X509Certificate from InfoboxReadRequest."}, e);
+ }
+
+ }
+
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/SAMLArtifactParser.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/SAMLArtifactParser.java
new file mode 100644
index 000000000..c4a02676c
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/SAMLArtifactParser.java
@@ -0,0 +1,73 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.parser;
+
+import java.io.IOException;
+
+import at.gv.egovernment.moa.id.ParseException;
+import at.gv.egovernment.moa.util.Base64Utils;
+
+/**
+ * Parser for a SAML artifact.
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class SAMLArtifactParser {
+ /** byte array containing the SamlArtifact bytes */
+ private byte[] samlArtifactBytes;
+
+ /**
+ * Constructor
+ * @param samlArtifact as String
+ * @throws ParseException on any parsing error
+ */
+ public SAMLArtifactParser(String samlArtifact) throws ParseException {
+ try {
+ samlArtifactBytes = Base64Utils.decode(samlArtifact, false);
+ }
+ catch (IOException ex) {
+ throw new ParseException("parser.02", new Object[] {ex.toString()}, ex);
+ }
+ }
+ /**
+ * Parses the type code.
+ * @return type code
+ * @throws ParseException when SAML artifact is invalid
+ */
+ public byte[] parseTypeCode() throws ParseException {
+ try {
+ byte[] typeCode = new byte[] {samlArtifactBytes[0], samlArtifactBytes[1]};
+ return typeCode;
+ }
+ catch (Throwable ex) {
+ throw new ParseException("parser.02", new Object[] {ex.toString()}, ex);
+ }
+ }
+ /**
+ * Parses the assertion handle.
+ * @return assertion handle
+ * @throws ParseException when SAML artifact is invalid
+ */
+ public String parseAssertionHandle() throws ParseException {
+ try {
+ return new String(samlArtifactBytes, 22, 20);
+ }
+ catch (Throwable ex) {
+ throw new ParseException("parser.02", new Object[] {ex.toString()}, ex);
+ }
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/VerifyXMLSignatureResponseParser.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/VerifyXMLSignatureResponseParser.java
new file mode 100644
index 000000000..5e085b751
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/VerifyXMLSignatureResponseParser.java
@@ -0,0 +1,178 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.parser;
+
+import iaik.utils.Base64InputStream;
+import iaik.x509.X509Certificate;
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.id.*;
+import at.gv.egovernment.moa.id.auth.data.VerifyXMLSignatureResponse;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.OutputXML2File;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+/**
+ * Parses a <code>&lt;VerifyXMLSignatureResponse&gt;</code> returned by
+ * MOA-SPSS.
+ * This class implements the Singleton pattern
+ *
+ * @author Stefan Knirsch
+ * @version $Id$
+ */
+
+
+public class VerifyXMLSignatureResponseParser {
+ //
+ // XPath namespace prefix shortcuts
+ //
+ /** Xpath prefix for reaching MOA Namespaces */
+ private static final String MOA = Constants.MOA_PREFIX + ":";
+ /** Xpath prefix for reaching DSIG Namespaces */
+ private static final String DSIG = Constants.DSIG_PREFIX + ":";
+ /** Xpath expression to the root element */
+ private static final String ROOT = "/" + MOA + "VerifyXMLSignatureResponse/";
+
+ /** Xpath expression to the X509SubjectName element */
+ private static final String DSIG_SUBJECT_NAME_XPATH =
+ ROOT + MOA + "SignerInfo/" + DSIG + "X509Data/" +
+ DSIG + "X509SubjectName";
+ /** Xpath expression to the X509Certificate element */
+ private static final String DSIG_X509_CERTIFICATE_XPATH =
+ ROOT + MOA + "SignerInfo/" + DSIG + "X509Data/" +
+ DSIG + "X509Certificate";
+ /** Xpath expression to the PublicAuthority element */
+ private static final String PUBLIC_AUTHORITY_XPATH =
+ ROOT + MOA + "SignerInfo/" + DSIG + "X509Data/" +
+ MOA + "PublicAuthority";
+ /** Xpath expression to the PublicAuthorityCode element */
+ private static final String PUBLIC_AUTHORITY_CODE_XPATH =
+ PUBLIC_AUTHORITY_XPATH + "/" + MOA + "Code";
+ /** Xpath expression to the QualifiedCertificate element */
+ private static final String QUALIFIED_CERTIFICATE_XPATH =
+ ROOT + MOA + "SignerInfo/" + DSIG + "X509Data/" +
+ MOA + "QualifiedCertificate";
+
+ /** Xpath expression to the SignatureCheckCode element */
+ private static final String SIGNATURE_CHECK_CODE_XPATH =
+ ROOT + MOA + "SignatureCheck/" + MOA + "Code";
+ /** Xpath expression to the XMLDSIGManifestCheckCode element */
+ private static final String XMLDSIG_MANIFEST_CHECK_CODE_XPATH =
+ ROOT + MOA + "XMLDSIGManifestCheck/" + MOA + "Code";
+ /** Xpath expression to the SignatureManifestCheckCode element */
+ private static final String SIGNATURE_MANIFEST_CHECK_CODE_XPATH =
+ ROOT + MOA + "SignatureManifestCheck/" + MOA + "Code";
+ /** Xpath expression to the CertificateCheckCode element */
+ private static final String CERTIFICATE_CHECK_CODE_XPATH =
+ ROOT + MOA + "CertificateCheck/" + MOA + "Code";
+
+
+ /** This is the root element of the XML-Document provided by the Security Layer Card*/
+ private Element verifyXMLSignatureResponse;
+
+ /**
+ * Constructor for VerifyXMLSignatureResponseParser.
+ * A DOM-representation of the incoming String will be created
+ * @param xmlResponse <code>&lt;InfoboxReadResponse&gt;</code> as String
+ * @throws ParseException on any parsing error
+ */
+ public VerifyXMLSignatureResponseParser(String xmlResponse) throws ParseException{
+ try {
+ InputStream s = new ByteArrayInputStream(xmlResponse.getBytes("UTF-8"));
+
+ verifyXMLSignatureResponse = DOMUtils.parseXmlValidating(s);
+ }
+ catch (Throwable t) {
+ throw new ParseException("parser.01", new Object[] { t.toString() }, t);
+ }
+ }
+
+ /**
+ * Constructor for VerifyXMLSignatureResponseParser.
+ * A DOM-representation of the incoming Inputstream will be created
+ * @param xmlResponse <code>&lt;InfoboxReadResponse&gt;</code> as InputStream
+ * @throws Exception on any parsing error
+ */
+ public VerifyXMLSignatureResponseParser(InputStream xmlResponse) throws Exception
+ {
+ try {
+ verifyXMLSignatureResponse = DOMUtils.parseXmlValidating(xmlResponse);
+ }
+ catch (Throwable t) {
+ throw new ParseException("parser.01", null, t);
+ }
+ }
+
+ /**
+ * Constructor for VerifyXMLSignatureResponseParser.
+ * The incoming Element will be used for further operations
+ * @param xmlResponse <code>&lt;InfoboxReadResponse&gt;</code> as Element
+ */
+ public VerifyXMLSignatureResponseParser(Element xmlResponse)
+ {
+ verifyXMLSignatureResponse =xmlResponse;
+
+ }
+
+ /**
+ * Parse identity link from <code>&lt;InfoboxReadResponse&gt;</code>
+ * @return Identity link
+ * @throws ParseException on any parsing error
+ */
+
+ public VerifyXMLSignatureResponse parseData() throws ParseException {
+
+ VerifyXMLSignatureResponse respData=new VerifyXMLSignatureResponse();
+
+ try {
+ respData.setXmlDsigSubjectName(XPathUtils.getElementValue(verifyXMLSignatureResponse,DSIG_SUBJECT_NAME_XPATH,""));
+ Element e = (Element)XPathUtils.selectSingleNode(verifyXMLSignatureResponse,QUALIFIED_CERTIFICATE_XPATH);
+ respData.setQualifiedCertificate(e!=null);
+
+ Base64InputStream in = new Base64InputStream(new ByteArrayInputStream(XPathUtils.getElementValue(
+ verifyXMLSignatureResponse,DSIG_X509_CERTIFICATE_XPATH,"").getBytes("UTF-8")),true);
+
+ respData.setX509certificate(new X509Certificate(in));
+ Element publicAuthority = (Element)XPathUtils.selectSingleNode(verifyXMLSignatureResponse,PUBLIC_AUTHORITY_XPATH);
+ respData.setPublicAuthority(publicAuthority != null);
+ respData.setPublicAuthorityCode(XPathUtils.getElementValue(verifyXMLSignatureResponse,PUBLIC_AUTHORITY_CODE_XPATH,""));
+ respData.setSignatureCheckCode(new Integer(XPathUtils.getElementValue(verifyXMLSignatureResponse,SIGNATURE_CHECK_CODE_XPATH,"")).intValue());
+
+ String xmlDsigCheckCode = XPathUtils.getElementValue(verifyXMLSignatureResponse,XMLDSIG_MANIFEST_CHECK_CODE_XPATH,null);
+ if (xmlDsigCheckCode!=null) {
+ respData.setXmlDSIGManigest(true);
+ respData.setXmlDSIGManifestCheckCode(new Integer(xmlDsigCheckCode).intValue());
+ } else {
+ respData.setXmlDSIGManigest(false);
+ }
+ String signatureManifestCheckCode = XPathUtils.getElementValue(verifyXMLSignatureResponse,SIGNATURE_MANIFEST_CHECK_CODE_XPATH,null);
+ if (signatureManifestCheckCode != null) {
+ respData.setSignatureManifestCheckCode(new Integer(signatureManifestCheckCode).intValue());
+ }
+ respData.setCertificateCheckCode(new Integer(XPathUtils.getElementValue(verifyXMLSignatureResponse,CERTIFICATE_CHECK_CODE_XPATH,"")).intValue());
+ }
+ catch (Throwable t) {
+ throw new ParseException("parser.01", null, t);
+ }
+ return respData;
+ }
+
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AuthServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AuthServlet.java
new file mode 100644
index 000000000..109d17d11
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AuthServlet.java
@@ -0,0 +1,249 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.servlet;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.fileupload.FileItem;
+import org.apache.commons.fileupload.FileItemFactory;
+import org.apache.commons.fileupload.FileUploadException;
+import org.apache.commons.fileupload.disk.DiskFileItemFactory;
+import org.apache.commons.fileupload.servlet.ServletFileUpload;
+
+import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants;
+import at.gv.egovernment.moa.id.auth.WrongParametersException;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.URLDecoder;
+
+/**
+ * Base class for MOA-ID Auth Servlets, providing standard error handling
+ * and constant names.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class AuthServlet extends HttpServlet implements MOAIDAuthConstants {
+
+
+ /**
+ * Handles an error. <br>>
+ * <ul>
+ * <li>Logs the error</li>
+ * <li>Places error message and exception thrown into the request
+ * as request attributes (to be used by <code>"/errorpage-auth.jsp"</code>)</li>
+ * <li>Sets HTTP status 500 (internal server error)</li>
+ * </ul>
+ *
+ * @param errorMessage error message
+ * @param exceptionThrown exception thrown
+ * @param req servlet request
+ * @param resp servlet response
+ */
+ protected void handleError(
+ String errorMessage, Throwable exceptionThrown, HttpServletRequest req, HttpServletResponse resp) {
+
+
+ if(null != errorMessage) {
+ Logger.error(errorMessage);
+ req.setAttribute("ErrorMessage", errorMessage );
+ }
+
+
+ if (null != exceptionThrown) {
+ if(null == errorMessage) errorMessage = exceptionThrown.getMessage();
+ Logger.error(errorMessage, exceptionThrown);
+ req.setAttribute("ExceptionThrown", exceptionThrown);
+ }
+
+ if (Logger.isDebugEnabled()) {
+ req.setAttribute("LogLevel", "debug");
+ }
+
+ //forward this to errorpage-auth.jsp where the HTML error page is generated
+ ServletContext context = getServletContext();
+ RequestDispatcher dispatcher = context.getRequestDispatcher("/errorpage-auth.jsp");
+ try {
+
+ resp.setHeader(MOAIDAuthConstants.HEADER_EXPIRES,MOAIDAuthConstants.HEADER_VALUE_EXPIRES);
+ resp.setHeader(MOAIDAuthConstants.HEADER_PRAGMA,MOAIDAuthConstants.HEADER_VALUE_PRAGMA);
+ resp.setHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL);
+ resp.addHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL_IE);
+
+ dispatcher.forward(req, resp);
+ } catch (ServletException e) {
+ Logger.error(e);
+ } catch (IOException e) {
+ Logger.error(e);
+ }
+
+ }
+ /**
+ * Handles a <code>WrongParametersException</code>.
+ * @param req servlet request
+ * @param resp servlet response
+ */
+ protected void handleWrongParameters(WrongParametersException ex, HttpServletRequest req, HttpServletResponse resp) {
+ Logger.error(ex.toString());
+ req.setAttribute("WrongParameters", ex.getMessage());
+
+ // forward this to errorpage-auth.jsp where the HTML error page is generated
+ ServletContext context = getServletContext();
+ RequestDispatcher dispatcher = context.getRequestDispatcher("/errorpage-auth.jsp");
+ try {
+ resp.setHeader(MOAIDAuthConstants.HEADER_EXPIRES,MOAIDAuthConstants.HEADER_VALUE_EXPIRES);
+ resp.setHeader(MOAIDAuthConstants.HEADER_PRAGMA,MOAIDAuthConstants.HEADER_VALUE_PRAGMA);
+ resp.setHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL);
+ resp.addHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL_IE);
+
+ dispatcher.forward(req, resp);
+ } catch (ServletException e) {
+ Logger.error(e);
+ } catch (IOException e) {
+ Logger.error(e);
+ }
+ }
+
+ /**
+ * Logs all servlet parameters for debugging purposes.
+ */
+ protected void logParameters(HttpServletRequest req) {
+ for (Enumeration params = req.getParameterNames(); params.hasMoreElements(); ) {
+ String parname = (String)params.nextElement();
+ Logger.debug("Parameter " + parname + req.getParameter(parname));
+ }
+ }
+
+ /**
+ * Parses the request input stream for parameters, assuming parameters are encoded UTF-8
+ * (no standard exists how browsers should encode them).
+ *
+ * @param req servlet request
+ *
+ * @return mapping parameter name -> value
+ *
+ * @throws IOException if parsing request parameters fails.
+ *
+ * @throws FileUploadException if parsing request parameters fails.
+ */
+ protected Map getParameters(HttpServletRequest req)
+ throws IOException, FileUploadException {
+
+ Map parameters = new HashMap();
+
+
+ if (ServletFileUpload.isMultipartContent(req))
+ {
+ // request is encoded as mulitpart/form-data
+ FileItemFactory factory = new DiskFileItemFactory();
+ ServletFileUpload upload = null;
+ upload = new ServletFileUpload(factory);
+ List items = null;
+ items = upload.parseRequest(req);
+ for (int i = 0; i < items.size(); i++)
+ {
+ FileItem item = (FileItem) items.get(i);
+ if (item.isFormField())
+ {
+ // Process only form fields - no file upload items
+ String logString = item.getString("UTF-8");
+
+ // TODO use RegExp
+ String startS = "<pr:Identification><pr:Value>";
+ String endS = "</pr:Value><pr:Type>urn:publicid:gv.at:baseid</pr:Type>";
+ String logWithMaskedBaseid = logString;
+ int start = logString.indexOf(startS);
+ if (start > -1) {
+ int end = logString.indexOf(endS);
+ if (end > -1) {
+ logWithMaskedBaseid = logString.substring(0, start);
+ logWithMaskedBaseid += startS;
+ logWithMaskedBaseid += "xxxxxxxxxxxxxxxxxxxxxxxx";
+ logWithMaskedBaseid += logString.substring(end, logString.length());
+ }
+ }
+ parameters.put(item.getFieldName(), item.getString("UTF-8"));
+ Logger.debug("Processed multipart/form-data request parameter: \nName: " +
+ item.getFieldName() + "\nValue: " +
+ logWithMaskedBaseid);
+ }
+ }
+ }
+
+ else
+ {
+ // request is encoded as application/x-www-urlencoded
+ InputStream in = req.getInputStream();
+
+ String paramName;
+ String paramValueURLEncoded;
+ do {
+ paramName = new String(readBytesUpTo(in, '='));
+ if (paramName.length() > 0) {
+ paramValueURLEncoded = readBytesUpTo(in, '&');
+ String paramValue = URLDecoder.decode(paramValueURLEncoded, "UTF-8");
+ parameters.put(paramName, paramValue);
+ }
+ }
+ while (paramName.length() > 0);
+ in.close();
+ }
+
+ return parameters;
+ }
+
+ /**
+ * Reads bytes up to a delimiter, consuming the delimiter.
+ * @param in input stream
+ * @param delimiter delimiter character
+ * @return String constructed from the read bytes
+ * @throws IOException
+ */
+ protected String readBytesUpTo(InputStream in, char delimiter) throws IOException {
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ boolean done = false;
+ int b;
+ while (! done && (b = in.read()) >= 0) {
+ if (b == delimiter)
+ done = true;
+ else
+ bout.write(b);
+ }
+ return bout.toString();
+ }
+
+ /**
+ * Calls the web application initializer.
+ *
+ * @see javax.servlet.Servlet#init(ServletConfig)
+ */
+ public void init(ServletConfig servletConfig) throws ServletException {
+ super.init(servletConfig);
+ }
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/ConfigurationServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/ConfigurationServlet.java
new file mode 100644
index 000000000..a9082dd8e
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/ConfigurationServlet.java
@@ -0,0 +1,97 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.servlet;
+
+import java.io.IOException;
+import java.text.DateFormat;
+import java.util.Date;
+import java.util.Locale;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants;
+import at.gv.egovernment.moa.id.auth.MOAIDAuthInitializer;
+import at.gv.egovernment.moa.id.util.HTTPRequestJSPForwarder;
+import at.gv.egovernment.moa.id.util.MOAIDMessageProvider;
+import at.gv.egovernment.moa.logging.Logger;
+
+/**
+ * Servlet requested for updating the MOA-ID Auth configuration from configuration file
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class ConfigurationServlet extends HttpServlet {
+
+ /**
+ * Handle a HTTP GET request, used to indicated that the MOA
+ * configuration needs to be updated (reloaded).
+ *
+ * @see javax.servlet.http.HttpServlet#doGet(HttpServletRequest, HttpServletResponse)
+ */
+ public void doGet(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException {
+
+
+ response.setHeader(MOAIDAuthConstants.HEADER_EXPIRES,MOAIDAuthConstants.HEADER_VALUE_EXPIRES);
+ response.setHeader(MOAIDAuthConstants.HEADER_PRAGMA,MOAIDAuthConstants.HEADER_VALUE_PRAGMA);
+ response.setHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL);
+ response.addHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL_IE);
+
+ MOAIDMessageProvider msg = MOAIDMessageProvider.getInstance();
+
+ try {
+ MOAIDAuthInitializer.initialized=false;
+ MOAIDAuthInitializer.initialize();
+ String message = msg.getMessage("config.00", new Object[]
+ { DateFormat.getTimeInstance(DateFormat.MEDIUM, Locale.GERMAN).format(new Date())} );
+
+ Logger.info(message);
+ HTTPRequestJSPForwarder.forwardNamed(message, "/message-auth.jsp", getServletContext(), request, response);
+
+ } catch (Throwable t) {
+ String errorMessage = msg.getMessage("config.04", null);
+ Logger.error(errorMessage, t);
+ HTTPRequestJSPForwarder.forwardNamed(errorMessage, "/message-auth.jsp", getServletContext(), request, response);
+ }
+ }
+
+ /**
+ * Do the same as <code>doGet</code>.
+ *
+ * @see javax.servlet.http.HttpServlet#doPost(HttpServletRequest, HttpServletResponse)
+ */
+ public void doPost(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException {
+ doGet(request, response);
+ }
+
+ /**
+ * Calls the web application initializer.
+ *
+ * @see javax.servlet.Servlet#init(ServletConfig)
+ */
+ public void init(ServletConfig servletConfig) throws ServletException {
+ super.init(servletConfig);
+ }
+
+}
+
+
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GetAuthenticationDataService.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GetAuthenticationDataService.java
new file mode 100644
index 000000000..0e3aae185
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GetAuthenticationDataService.java
@@ -0,0 +1,150 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.servlet;
+
+import java.util.Calendar;
+
+import org.apache.axis.AxisFault;
+import org.w3c.dom.Element;
+
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.id.AuthenticationException;
+import at.gv.egovernment.moa.id.MOAIDException;
+import at.gv.egovernment.moa.id.auth.AuthenticationServer;
+import at.gv.egovernment.moa.id.auth.builder.SAMLResponseBuilder;
+import at.gv.egovernment.moa.id.data.AuthenticationData;
+import at.gv.egovernment.moa.id.util.MOAIDMessageProvider;
+import at.gv.egovernment.moa.id.util.Random;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.DateTimeUtils;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+/**
+ * Web service for picking up authentication data created in the MOA-ID Auth component.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ * @see at.gv.egovernment.moa.id.auth.AuthenticationServer#getAuthenticationData
+ */
+public class GetAuthenticationDataService implements Constants {
+
+ /**
+ * Constructor for GetAuthenticationDataService.
+ */
+ public GetAuthenticationDataService() {
+ super();
+ }
+
+ /**
+ * Takes a <code>lt;samlp:Request&gt;</code> containing a
+ * <code>SAML artifact</code> and returns the corresponding
+ * authentication data <code>lt;saml:Assertion&gt;</code>
+ * (obtained from the <code>AuthenticationServer</code>),
+ * enclosed in a <code>lt;samlp:Response&gt;</code>.
+ * <br/>Bad requests are mapped into various <code>lt;samlp:StatusCode&gt;</code>s,
+ * possibly containing enclosed sub-<code>lt;samlp:StatusCode&gt;</code>s.
+ * The status codes are defined in the SAML specification.
+ *
+ * @param requests request elements of type <code>lt;samlp:Request&gt;</code>;
+ * only 1 request element is allowed
+ * @return response element of type <code>lt;samlp:Response&gt;</code>,
+ * packed into an <code>Element[]</code>
+ * @throws AxisFault thrown when an error occurs in assembling the
+ * <code>lt;samlp:Response&gt;</code>
+ */
+ public Element[] Request(Element[] requests)
+ throws AxisFault {
+
+ Element request = requests[0];
+ Element[] responses = new Element[1];
+ String requestID = "";
+ String statusCode = "";
+ String subStatusCode = null;
+ String statusMessageCode = null;
+ String statusMessage = null;
+ String samlAssertion = "";
+ if (requests.length > 1) {
+ // more than 1 request given as parameter
+ statusCode = "samlp:Requester";
+ subStatusCode = "samlp:TooManyResponses";
+ statusMessageCode = "1201";
+ }
+ else {
+ try {
+ DOMUtils.validateElement(request, ALL_SCHEMA_LOCATIONS, null);
+ NodeList samlArtifactList = XPathUtils.selectNodeList(request, "samlp:AssertionArtifact");
+ if (samlArtifactList.getLength() == 0) {
+ // no SAML artifact given in request
+ statusCode = "samlp:Requester";
+ statusMessageCode = "1202";
+ }
+ else if (samlArtifactList.getLength() > 1) {
+ // too many SAML artifacts given in request
+ statusCode = "samlp:Requester";
+ subStatusCode = "samlp:TooManyResponses";
+ statusMessageCode = "1203";
+ }
+ else {
+ Element samlArtifactElem = (Element)samlArtifactList.item(0);
+ requestID = request.getAttribute("RequestID");
+ String samlArtifact = DOMUtils.getText(samlArtifactElem);
+ try {
+ AuthenticationData authData = AuthenticationServer.getInstance().
+ getAuthenticationData(samlArtifact);
+ // success
+ samlAssertion = authData.getSamlAssertion();
+ statusCode = "samlp:Success";
+ statusMessageCode = "1200";
+ }
+ catch (AuthenticationException ex) {
+ // no authentication data for given SAML artifact
+ statusCode = "samlp:Requester";
+ subStatusCode = "samlp:ResourceNotRecognized";
+ statusMessage = ex.toString();
+ }
+ }
+ }
+ catch (Throwable t) {
+ // invalid request format
+ statusCode = "samlp:Requester";
+ statusMessageCode = "1204";
+ }
+ }
+ try {
+ String responseID = Random.nextRandom();
+ String issueInstant = DateTimeUtils.buildDateTime(Calendar.getInstance());
+ if (statusMessage == null)
+ statusMessage = MOAIDMessageProvider.getInstance().getMessage(statusMessageCode, null);
+ responses[0] = new SAMLResponseBuilder().build(
+ responseID, requestID, issueInstant, statusCode, subStatusCode, statusMessage, samlAssertion);
+ }
+ catch (MOAIDException e) {
+ AxisFault fault = AxisFault.makeFault(e);
+ fault.setFaultDetail(new Element[] { e.toErrorResponse()});
+ throw fault;
+ }
+ catch (Throwable t) {
+ MOAIDException e = new MOAIDException("1299", null, t);
+ AxisFault fault = AxisFault.makeFault(e);
+ fault.setFaultDetail(new Element[] { e.toErrorResponse()});
+ throw fault;
+ }
+ return responses;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GetForeignIDServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GetForeignIDServlet.java
new file mode 100644
index 000000000..9a6670617
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GetForeignIDServlet.java
@@ -0,0 +1,309 @@
+package at.gv.egovernment.moa.id.auth.servlet;
+
+import iaik.pki.PKIException;
+
+import java.io.IOException;
+import java.security.GeneralSecurityException;
+import java.util.Map;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.transform.TransformerException;
+
+import org.apache.commons.fileupload.FileUploadException;
+import org.apache.commons.lang.StringEscapeUtils;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.id.MOAIDException;
+import at.gv.egovernment.moa.id.auth.AuthenticationServer;
+import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants;
+import at.gv.egovernment.moa.id.auth.WrongParametersException;
+import at.gv.egovernment.moa.id.auth.builder.DataURLBuilder;
+import at.gv.egovernment.moa.id.auth.data.AuthenticationSession;
+import at.gv.egovernment.moa.id.auth.data.CreateXMLSignatureResponse;
+import at.gv.egovernment.moa.id.auth.data.IdentityLink;
+import at.gv.egovernment.moa.id.auth.parser.CreateXMLSignatureResponseParser;
+import at.gv.egovernment.moa.id.auth.parser.IdentityLinkAssertionParser;
+import at.gv.egovernment.moa.id.auth.validator.parep.client.szrgw.CreateIdentityLinkResponse;
+import at.gv.egovernment.moa.id.auth.validator.parep.client.szrgw.SZRGWClient;
+import at.gv.egovernment.moa.id.auth.validator.parep.client.szrgw.SZRGWClientException;
+import at.gv.egovernment.moa.id.config.ConfigurationException;
+import at.gv.egovernment.moa.id.config.ConnectionParameter;
+import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
+import at.gv.egovernment.moa.id.util.MOAIDMessageProvider;
+import at.gv.egovernment.moa.id.util.ParamValidatorUtils;
+import at.gv.egovernment.moa.id.util.SSLUtils;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.URLEncoder;
+
+/**
+ * Servlet requested for getting the foreign eID
+ * provided by the security layer implementation.
+ * Utilizes the {@link AuthenticationServer}.
+ *
+ */
+public class GetForeignIDServlet extends AuthServlet {
+
+ /**
+ * Constructor for GetForeignIDServlet.
+ */
+ public GetForeignIDServlet() {
+ super();
+ }
+
+ /**
+ * GET requested by security layer implementation to verify
+ * that data URL resource is available.
+ * @see javax.servlet.http.HttpServlet#doGet(HttpServletRequest, HttpServletResponse)
+ */
+ protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws ServletException, IOException {
+
+ Logger.debug("GET GetForeignIDServlet");
+
+ resp.setHeader(MOAIDAuthConstants.HEADER_EXPIRES,MOAIDAuthConstants.HEADER_VALUE_EXPIRES);
+ resp.setHeader(MOAIDAuthConstants.HEADER_PRAGMA,MOAIDAuthConstants.HEADER_VALUE_PRAGMA);
+ resp.setHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL);
+ resp.addHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL_IE);
+
+
+ }
+
+ /**
+ * Verifies the identity link and responds with a new
+ * <code>CreateXMLSignatureRequest</code>.
+ * <br>
+ * Request parameters:
+ * <ul>
+ * <li>MOASessionID: ID of associated authentication session</li>
+ * <li>XMLResponse: <code>&lt;InfoboxReadResponse&gt;</code></li>
+ * </ul>
+ * Response:
+ * <ul>
+ * <li>Content type: <code>"text/xml"</code></li>
+ * <li>Content: see return value of {@link AuthenticationServer#verifyIdentityLink}</li>
+ * <li>Error status: <code>500</code>
+ * </ul>
+ * @see javax.servlet.http.HttpServlet#doPost(HttpServletRequest, HttpServletResponse)
+ */
+ protected void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws ServletException, IOException {
+
+ Logger.debug("POST GetForeignIDServlet");
+
+ resp.setHeader(MOAIDAuthConstants.HEADER_EXPIRES,MOAIDAuthConstants.HEADER_VALUE_EXPIRES);
+ resp.setHeader(MOAIDAuthConstants.HEADER_PRAGMA,MOAIDAuthConstants.HEADER_VALUE_PRAGMA);
+ resp.setHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL);
+ resp.addHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL_IE);
+
+ Map parameters;
+ try
+ {
+ parameters = getParameters(req);
+ } catch (FileUploadException e)
+ {
+ Logger.error("Parsing mulitpart/form-data request parameters failed: " + e.getMessage());
+ throw new IOException(e.getMessage());
+ }
+ String sessionID = req.getParameter(PARAM_SESSIONID);
+
+ // escape parameter strings
+ sessionID = StringEscapeUtils.escapeHtml(sessionID);
+
+ String redirectURL = null;
+ AuthenticationSession session = null;
+ try {
+ String xmlCreateXMLSignatureResponse = (String)parameters.get(PARAM_XMLRESPONSE);
+
+ // check parameter
+ if (!ParamValidatorUtils.isValidSessionID(sessionID))
+ throw new WrongParametersException("GetForeignID", PARAM_SESSIONID, "auth.12");
+ if (!ParamValidatorUtils.isValidXMLDocument(xmlCreateXMLSignatureResponse))
+ throw new WrongParametersException("GetForeignID", PARAM_XMLRESPONSE, "auth.12");
+
+ session = AuthenticationServer.getSession(sessionID);
+
+
+
+ Logger.debug(xmlCreateXMLSignatureResponse);
+
+ CreateXMLSignatureResponse csresp =
+ new CreateXMLSignatureResponseParser(xmlCreateXMLSignatureResponse).parseResponseDsig();
+
+ Element signature = csresp.getDsigSignature();
+
+ // make SZR request to the identity link
+ CreateIdentityLinkResponse response = getIdentityLink(signature);
+
+
+ if (response.isError()) {
+ throw new SZRGWClientException(response.getError());
+ }
+ else {
+
+ Element samlAssertion = response.getAssertion();
+
+// try {
+// System.out.println(DOMUtils.serializeNode(samlAssertion));
+// } catch (TransformerException e) {
+// // TODO Auto-generated catch block
+// e.printStackTrace();
+// }
+
+ IdentityLinkAssertionParser ilParser = new IdentityLinkAssertionParser(samlAssertion);
+ IdentityLink identitylink = ilParser.parseIdentityLink();
+ session.setIdentityLink(identitylink);
+
+ String samlArtifactBase64 =
+ AuthenticationServer.getInstance().getForeignAuthenticationData(sessionID);
+ if (!samlArtifactBase64.equals("Redirect to Input Processor")) {
+ redirectURL = session.getOAURLRequested();
+ if (!session.getBusinessService()) {
+ redirectURL = addURLParameter(redirectURL, PARAM_TARGET, URLEncoder.encode(session.getTarget(), "UTF-8"));
+ }
+ redirectURL = addURLParameter(redirectURL, PARAM_SAMLARTIFACT, URLEncoder.encode(samlArtifactBase64, "UTF-8"));
+ redirectURL = resp.encodeRedirectURL(redirectURL);
+ } else {
+ redirectURL = new DataURLBuilder().buildDataURL(session.getAuthURL(), AuthenticationServer.REQ_PROCESS_VALIDATOR_INPUT, session.getSessionID());
+ }
+ resp.setContentType("text/html");
+ resp.setStatus(302);
+ resp.addHeader("Location", redirectURL);
+ Logger.debug("REDIRECT TO: " + redirectURL);
+ }
+
+ }
+ catch (MOAIDException ex) {
+ handleError(null, ex, req, resp);
+ }
+ catch (SZRGWClientException ex) {
+ handleError(null, ex, req, resp);
+ }
+ }
+
+ /**
+ * Adds a parameter to a URL.
+ * @param url the URL
+ * @param paramname parameter name
+ * @param paramvalue parameter value
+ * @return the URL with parameter added
+ */
+ private static String addURLParameter(String url, String paramname, String paramvalue) {
+ String param = paramname + "=" + paramvalue;
+ if (url.indexOf("?") < 0)
+ return url + "?" + param;
+ else
+ return url + "&" + param;
+ }
+
+ /**
+ * Does the request to the SZR-GW
+ * @param signature XMLDSIG signature
+ * @return Identity link assertion
+ * @throws SZRGWClientException
+ */
+ private CreateIdentityLinkResponse getIdentityLink(Element signature) throws SZRGWClientException {
+
+ SZRGWClient client = new SZRGWClient();
+
+ try {
+ AuthConfigurationProvider authConf = AuthConfigurationProvider.getInstance();
+ ConnectionParameter connectionParameters = authConf.getForeignIDConnectionParameter();
+
+ client.setAddress(connectionParameters.getUrl());
+ if (connectionParameters.getUrl().toLowerCase().startsWith("https:")) {
+ Logger.debug("Initialisiere SSL Verbindung");
+ try {
+ client.setSSLSocketFactory(SSLUtils.getSSLSocketFactory(AuthConfigurationProvider.getInstance(), connectionParameters));
+ } catch (IOException e) {
+ Logger.error("Could not initialize SSL Factory", e);
+ throw new SZRGWClientException("Could not initialize SSL Factory");
+ } catch (GeneralSecurityException e) {
+ Logger.error("Could not initialize SSL Factory", e);
+ throw new SZRGWClientException("Could not initialize SSL Factory");
+ } catch (PKIException e) {
+ Logger.error("Could not initialize SSL Factory", e);
+ throw new SZRGWClientException("Could not initialize SSL Factory");
+ }
+ }
+ Logger.info("Starte Kommunikation mit dem Stammzahlenregister Gateway(" + connectionParameters.getUrl() + ")...");
+ }
+ catch (ConfigurationException e) {
+ Logger.warn(e);
+ Logger.warn(MOAIDMessageProvider.getInstance().getMessage("config.12", null ));
+ }
+
+ // create request
+ CreateIdentityLinkResponse response = null;
+ Element request = null;
+ try {
+ Document doc = client.buildGetIdentityLinkRequest(null, null, null, null, signature);
+ request = doc.getDocumentElement();
+
+ // send request
+ response = client.createIdentityLinkResponse(request);
+ } catch (SZRGWClientException e) {
+ // give him a second try - Nach dem Starten des Tomcat wird beim ersten Mal das Client-Zertifikat offenbar vom HTTPClient nicht mitgeschickt.
+ try {
+ response = client.createIdentityLinkResponse(request);
+ }
+ catch (SZRGWClientException e1) {
+ throw new SZRGWClientException(e1);
+ }
+ }
+
+
+ return response;
+
+ }
+
+ /**
+ * Builds the szrgw:GetIdentityLinkRequest für the SZR-GW
+ * @param givenname
+ * @param familyname
+ * @param birthday
+ * @return
+ */
+// private static Document buildGetIdentityLinkRequest(X509Certificate cert) {
+//
+// try {
+// byte[] certbyte = cert.getEncoded();
+// String certstring = Base64.encode(certbyte);
+//
+// DocumentBuilderFactory factory =DocumentBuilderFactory.newInstance();
+// factory.setNamespaceAware(true);
+// DocumentBuilder builder = factory.newDocumentBuilder();
+// Document doc = builder.newDocument();
+//
+// Element getIdentityLink = doc.createElementNS(SZRGWConstants.SZRGW_REQUEST_NS, "szrgw:GetIdentityLinkRequest");
+// getIdentityLink.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:szrgw", SZRGWConstants.SZRGW_REQUEST_NS);
+// doc.appendChild(getIdentityLink);
+//
+// Element x509certificate = doc.createElementNS(SZRGWConstants.SZRGW_REQUEST_NS, "szrgw:X509Certificate");
+// getIdentityLink.appendChild(x509certificate);
+// Text certbase64 = doc.createTextNode(certstring);
+// x509certificate.appendChild(certbase64);
+//
+// return doc;
+// } catch (ParserConfigurationException e) {
+// e.printStackTrace();
+// } catch (CertificateEncodingException e) {
+// e.printStackTrace();
+// }
+// return null;
+//
+// }
+//
+// /**
+// * Checks a parameter.
+// * @param param parameter
+// * @return true if the parameter is null or empty
+// */
+// private boolean isEmpty(String param) {
+// return param == null || param.length() == 0;
+// }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GetMISSessionIDServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GetMISSessionIDServlet.java
new file mode 100644
index 000000000..4c0abdb0f
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GetMISSessionIDServlet.java
@@ -0,0 +1,174 @@
+package at.gv.egovernment.moa.id.auth.servlet;
+
+import iaik.pki.PKIException;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.security.GeneralSecurityException;
+import java.util.List;
+import java.util.Map;
+
+import javax.net.ssl.SSLSocketFactory;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.fileupload.FileUploadException;
+import org.apache.commons.lang.StringEscapeUtils;
+
+import at.gv.egovernment.moa.id.BuildException;
+import at.gv.egovernment.moa.id.MOAIDException;
+import at.gv.egovernment.moa.id.auth.AuthenticationServer;
+import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants;
+import at.gv.egovernment.moa.id.auth.WrongParametersException;
+import at.gv.egovernment.moa.id.auth.builder.DataURLBuilder;
+import at.gv.egovernment.moa.id.auth.builder.GetIdentityLinkFormBuilder;
+import at.gv.egovernment.moa.id.auth.data.AuthenticationSession;
+import at.gv.egovernment.moa.id.config.ConnectionParameter;
+import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
+import at.gv.egovernment.moa.id.util.ParamValidatorUtils;
+import at.gv.egovernment.moa.id.util.SSLUtils;
+import at.gv.egovernment.moa.id.util.client.mis.simple.MISMandate;
+import at.gv.egovernment.moa.id.util.client.mis.simple.MISSimpleClient;
+import at.gv.egovernment.moa.id.util.client.mis.simple.MISSimpleClientException;
+import at.gv.egovernment.moa.logging.Logger;
+
+/**
+ * Servlet requested for getting the foreign eID
+ * provided by the security layer implementation.
+ * Utilizes the {@link AuthenticationServer}.
+ *
+ */
+public class GetMISSessionIDServlet extends AuthServlet {
+
+ /**
+ * Constructor for GetMISSessionIDServlet.
+ */
+ public GetMISSessionIDServlet() {
+ super();
+ }
+
+ /**
+ * GET requested by security layer implementation to verify
+ * that data URL resource is available.
+ * @see javax.servlet.http.HttpServlet#doGet(HttpServletRequest, HttpServletResponse)
+ */
+ protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws ServletException, IOException {
+
+ doPost(req, resp);
+
+// Logger.debug("GET GetMISSessionIDServlet");
+//
+// resp.setHeader(MOAIDAuthConstants.HEADER_EXPIRES,MOAIDAuthConstants.HEADER_VALUE_EXPIRES);
+// resp.setHeader(MOAIDAuthConstants.HEADER_PRAGMA,MOAIDAuthConstants.HEADER_VALUE_PRAGMA);
+// resp.setHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL);
+// resp.addHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL_IE);
+ }
+
+ /**
+ * Gets the signer certificate from the InfoboxReadRequest and
+ * responds with a new
+ * <code>CreateXMLSignatureRequest</code>.
+ * <br>
+ * Request parameters:
+ * <ul>
+ * <li>MOASessionID: ID of associated authentication session</li>
+ * <li>XMLResponse: <code>&lt;InfoboxReadResponse&gt;</code></li>
+ * </ul>
+ * @see javax.servlet.http.HttpServlet#doPost(HttpServletRequest, HttpServletResponse)
+ */
+ protected void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws ServletException, IOException {
+
+ Logger.debug("POST GetMISSessionIDServlet");
+
+ resp.setHeader(MOAIDAuthConstants.HEADER_EXPIRES,MOAIDAuthConstants.HEADER_VALUE_EXPIRES);
+ resp.setHeader(MOAIDAuthConstants.HEADER_PRAGMA,MOAIDAuthConstants.HEADER_VALUE_PRAGMA);
+ resp.setHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL);
+ resp.addHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL_IE);
+
+// Map parameters;
+// try
+// {
+// parameters = getParameters(req);
+// } catch (FileUploadException e)
+// {
+// Logger.error("Parsing mulitpart/form-data request parameters failed: " + e.getMessage());
+// throw new IOException(e.getMessage());
+// }
+
+ String sessionID = req.getParameter(PARAM_SESSIONID);
+
+ // escape parameter strings
+ sessionID = StringEscapeUtils.escapeHtml(sessionID);
+
+ AuthenticationSession session = null;
+ try {
+ // check parameter
+ if (!ParamValidatorUtils.isValidSessionID(sessionID))
+ throw new WrongParametersException("VerifyCertificate", PARAM_SESSIONID, "auth.12");
+
+ session = AuthenticationServer.getSession(sessionID);
+
+ String misSessionID = session.getMISSessionID();
+
+ //System.out.println("MIS Session ID (GetMISServlet): " + misSessionID);
+
+ AuthConfigurationProvider authConf= AuthConfigurationProvider.getInstance();
+ ConnectionParameter connectionParameters = authConf.getOnlineMandatesConnectionParameter();
+ SSLSocketFactory sslFactory = SSLUtils.getSSLSocketFactory(AuthConfigurationProvider.getInstance(), connectionParameters);
+
+ List list = MISSimpleClient.sendGetMandatesRequest(connectionParameters.getUrl(), misSessionID, sslFactory);
+
+ if (list == null) {
+ Logger.error("Keine Vollmacht gefunden.");
+ throw new MISSimpleClientException("Keine Vollmacht gefunden");
+ }
+ if (list.size() == 0) {
+ Logger.error("Keine Vollmacht gefunden.");
+ throw new MISSimpleClientException("Keine Vollmacht gefunden");
+ }
+
+ // for now: list contains only one element
+ MISMandate mandate = (MISMandate)list.get(0);
+
+ // verify mandate signature
+ String createXMLSignatureRequestOrRedirect = AuthenticationServer.getInstance().verifyMandate(sessionID, mandate);
+
+ String dataurl =
+ new DataURLBuilder().buildDataURL(
+ session.getAuthURL(),
+ REQ_VERIFY_AUTH_BLOCK,
+ session.getSessionID());
+
+ Logger.debug(createXMLSignatureRequestOrRedirect);
+
+ String request = getHTMLForm(createXMLSignatureRequestOrRedirect, session.getBkuURL(), dataurl);
+
+ resp.setContentType("text/html;charset=UTF-8");
+ PrintWriter out = new PrintWriter(resp.getOutputStream());
+ out.print(request);
+ out.flush();
+
+
+ }
+ catch (MOAIDException ex) {
+ handleError(null, ex, req, resp);
+ } catch (GeneralSecurityException ex) {
+ handleError(null, ex, req, resp);
+ } catch (PKIException e) {
+ handleError(null, e, req, resp);
+ } catch (MISSimpleClientException e) {
+ handleError(null, e, req, resp);
+ }
+ }
+
+ private static String getHTMLForm(String request, String bkuURI, String dataURL) throws BuildException {
+ return new GetIdentityLinkFormBuilder().buildCreateSignature(bkuURI, request, dataURL);
+
+ }
+
+
+
+ }
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/ProcessValidatorInputServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/ProcessValidatorInputServlet.java
new file mode 100644
index 000000000..b50a1edde
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/ProcessValidatorInputServlet.java
@@ -0,0 +1,249 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.servlet;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Map;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.fileupload.FileUploadException;
+import org.apache.commons.lang.StringEscapeUtils;
+
+import at.gv.egovernment.moa.id.AuthenticationException;
+import at.gv.egovernment.moa.id.MOAIDException;
+import at.gv.egovernment.moa.id.auth.AuthenticationServer;
+import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants;
+import at.gv.egovernment.moa.id.auth.WrongParametersException;
+import at.gv.egovernment.moa.id.auth.builder.DataURLBuilder;
+import at.gv.egovernment.moa.id.auth.builder.GetVerifyAuthBlockFormBuilder;
+import at.gv.egovernment.moa.id.auth.data.AuthenticationSession;
+import at.gv.egovernment.moa.id.auth.validator.InfoboxValidator;
+import at.gv.egovernment.moa.id.auth.validator.ValidateException;
+import at.gv.egovernment.moa.id.auth.validator.parep.ParepUtils;
+import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
+import at.gv.egovernment.moa.id.config.auth.OAAuthParameter;
+import at.gv.egovernment.moa.id.util.ParamValidatorUtils;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.FileUtils;
+
+/**
+ * Servlet requested for processing user input forms of infobox validators
+ *
+ * Utilizes the {@link AuthenticationServer}.
+ *
+ * @author <a href="mailto:peter.danner@egiz.gv.at">Peter Danner
+ * @version $Id: ProcessValidatorInputServlet.java 769 2007-01-10 15:37:52Z peter.danner $
+ */
+public class ProcessValidatorInputServlet extends AuthServlet {
+
+ public static final long serialVersionUID = 1;
+
+ /**
+ * Constructor for VerifyIdentityLinkServlet.
+ */
+ public ProcessValidatorInputServlet() {
+ super();
+ }
+
+ /**
+ * Shows the user input forms of infobox validators
+ *
+ * @see javax.servlet.http.HttpServlet#doGet(HttpServletRequest, HttpServletResponse)
+ */
+ protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws ServletException, IOException {
+
+ Logger.debug("GET ProcessInput");
+ resp.setHeader(MOAIDAuthConstants.HEADER_EXPIRES,MOAIDAuthConstants.HEADER_VALUE_EXPIRES);
+ resp.setHeader(MOAIDAuthConstants.HEADER_PRAGMA,MOAIDAuthConstants.HEADER_VALUE_PRAGMA);
+ resp.setHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL);
+ resp.addHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL_IE);
+
+ Map parameters;
+ try {
+ parameters = getParameters(req);
+ } catch (FileUploadException e) {
+ Logger.error("Parsing mulitpart/form-data request parameters failed: " + e.getMessage());
+ throw new IOException(e.getMessage());
+ }
+ String sessionID = req.getParameter(PARAM_SESSIONID);
+ if (sessionID==null) sessionID = (String) req.getAttribute(PARAM_SESSIONID);
+ if (sessionID==null) sessionID = (String) parameters.get(PARAM_SESSIONID);
+ if (sessionID==null) sessionID = (String) parameters.get(PARAM_SESSIONID+"_");
+
+ // escape parameter strings
+ sessionID = StringEscapeUtils.escapeHtml(sessionID);
+
+ try {
+
+ if (!ParamValidatorUtils.isValidSessionID(sessionID))
+ throw new WrongParametersException("ProcessInput", PARAM_SESSIONID, "auth.12");
+
+ AuthenticationSession session = AuthenticationServer.getSession(sessionID);
+ InfoboxValidator infoboxvalidator = session.getFirstPendingValidator();
+ String outputStream;
+ String dataURL = new DataURLBuilder().buildDataURL(
+ session.getAuthURL(), AuthenticationServer.REQ_PROCESS_VALIDATOR_INPUT, sessionID);
+ if (infoboxvalidator!=null) {
+ outputStream = infoboxvalidator.getForm();
+ // replace strings the validators can not know
+ outputStream = ParepUtils.replaceAll(outputStream, "<BASE_href>", session.getAuthURL());
+ outputStream = ParepUtils.replaceAll(outputStream, "<MOASessionID>", sessionID);
+ outputStream = ParepUtils.replaceAll(outputStream, "<BKU>", session.getBkuURL());
+ outputStream = ParepUtils.replaceAll(outputStream, "<DataURL>", dataURL);
+ outputStream = ParepUtils.replaceAll(outputStream, "<PushInfobox>", session.getPushInfobox());
+ } else {
+ throw new ValidateException("validator.65", null);
+ }
+ //resp.setStatus(200);
+ resp.setContentType("text/html;charset=UTF-8");
+ OutputStream out = resp.getOutputStream();
+ out.write(outputStream.getBytes("UTF-8"));
+ out.flush();
+ out.close();
+ Logger.debug("Finished GET ProcessInput");
+ }
+ catch (WrongParametersException ex) {
+ handleWrongParameters(ex, req, resp);
+ }
+ catch (MOAIDException ex) {
+ handleError(null, ex, req, resp);
+ }
+ }
+
+ /**
+ * Verifies the user input forms of infobox validators
+ *
+ * @see javax.servlet.http.HttpServlet#doPost(HttpServletRequest, HttpServletResponse)
+ */
+ protected void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws ServletException, IOException {
+
+ Logger.debug("POST ProcessInput");
+
+ resp.setHeader(MOAIDAuthConstants.HEADER_EXPIRES,MOAIDAuthConstants.HEADER_VALUE_EXPIRES);
+ resp.setHeader(MOAIDAuthConstants.HEADER_PRAGMA,MOAIDAuthConstants.HEADER_VALUE_PRAGMA);
+ resp.setHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL);
+ resp.addHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL_IE);
+
+ Map parameters;
+ try {
+ parameters = getParameters(req);
+ } catch (FileUploadException e) {
+ Logger.error("Parsing mulitpart/form-data request parameters failed: " + e.getMessage());
+ throw new IOException(e.getMessage());
+ }
+
+ String sessionID = req.getParameter(PARAM_SESSIONID);
+ if (sessionID==null) sessionID = (String) req.getAttribute(PARAM_SESSIONID);
+ if (sessionID==null) sessionID = (String) parameters.get(PARAM_SESSIONID);
+ if (sessionID==null) sessionID = (String) parameters.get(PARAM_SESSIONID+"_");
+
+ // escape parameter strings
+ sessionID = StringEscapeUtils.escapeHtml(sessionID);
+
+ try {
+
+ if (!ParamValidatorUtils.isValidSessionID(sessionID))
+ throw new WrongParametersException("ProcessInput", PARAM_SESSIONID, "auth.12");
+
+ AuthenticationSession session = AuthenticationServer.getSession(sessionID);
+ AuthenticationServer.processInput(session, parameters);
+ String createXMLSignatureRequestOrRedirect = AuthenticationServer.getInstance().getCreateXMLSignatureRequestAuthBlockOrRedirect(session, null, null);
+ if (!createXMLSignatureRequestOrRedirect.startsWith("Redirect")) {
+ // Now sign the AUTH Block
+ String dataURL = new DataURLBuilder().buildDataURL(
+ session.getAuthURL(), AuthenticationServer.REQ_VERIFY_AUTH_BLOCK, sessionID);
+
+ String htmlForm = null;
+
+ boolean doInputProcessorSign = false; // If sign process should be within an extra form, provide a parameter. Otherwise transport through security layer is assumed
+
+ String inputProcessorSignForm = req.getParameter("Sign_Form");
+ if (inputProcessorSignForm==null) inputProcessorSignForm = (String) req.getAttribute("Sign_Form");
+ if (inputProcessorSignForm==null) inputProcessorSignForm = (String) parameters.get("Sign_Form");
+ if (inputProcessorSignForm==null) inputProcessorSignForm = (String) parameters.get("Sign_Form_");
+ // escape parameter strings
+ inputProcessorSignForm = StringEscapeUtils.escapeHtml(inputProcessorSignForm);
+ if (!ParepUtils.isEmpty(inputProcessorSignForm)) doInputProcessorSign = inputProcessorSignForm.equalsIgnoreCase("true");
+ if (doInputProcessorSign) {
+ // Test if we have a user input form sign template
+
+ String inputProcessorSignTemplateURL = req.getParameter(PARAM_INPUT_PROCESSOR_SIGN_TEMPLATE);
+
+ if (!ParamValidatorUtils.isValidSignUrl(inputProcessorSignTemplateURL))
+ throw new WrongParametersException("ProcessInput", PARAM_INPUT_PROCESSOR_SIGN_TEMPLATE, "auth.12");
+
+ String inputProcessorSignTemplate = null;
+ OAAuthParameter oaParam =
+ AuthConfigurationProvider.getInstance().getOnlineApplicationParameter(session.getOAURLRequested());
+ // override template url by url from configuration file
+ if (oaParam.getInputProcessorSignTemplateURL() != null) {
+ inputProcessorSignTemplateURL = oaParam.getInputProcessorSignTemplateURL();
+ }
+ if (inputProcessorSignTemplateURL != null) {
+ try {
+ inputProcessorSignTemplate = new String(FileUtils.readURL(inputProcessorSignTemplateURL));
+ } catch (IOException ex) {
+ throw new AuthenticationException(
+ "auth.03",
+ new Object[] { inputProcessorSignTemplateURL, ex.toString()},
+ ex);
+ }
+ }
+
+ htmlForm = new GetVerifyAuthBlockFormBuilder().build(
+ inputProcessorSignTemplate, session.getBkuURL(), createXMLSignatureRequestOrRedirect, dataURL, session.getPushInfobox());
+ htmlForm = ParepUtils.replaceAll(htmlForm, "<BASE_href>", session.getAuthURL());
+ htmlForm = ParepUtils.replaceAll(htmlForm, "<MOASessionID>", sessionID);
+ htmlForm = ParepUtils.replaceAll(htmlForm, "<BKU>", session.getBkuURL());
+ htmlForm = ParepUtils.replaceAll(htmlForm, "<DataURL>", dataURL);
+ htmlForm = ParepUtils.replaceAll(htmlForm, "<PushInfobox>", session.getPushInfobox());
+ resp.setContentType("text/html;charset=UTF-8");
+ } else {
+ htmlForm = createXMLSignatureRequestOrRedirect;
+ resp.setStatus(307);
+ resp.addHeader("Location", dataURL);
+ //TODO test impact of explicit setting charset with older versions of BKUs (HotSign)
+ resp.setContentType("text/xml;charset=UTF-8");
+ }
+
+ OutputStream out = resp.getOutputStream();
+ out.write(htmlForm.getBytes("UTF-8"));
+ out.flush();
+ out.close();
+ Logger.debug("Finished POST ProcessInput");
+ } else {
+ String redirectURL = new DataURLBuilder().buildDataURL(session.getAuthURL(), AuthenticationServer.REQ_PROCESS_VALIDATOR_INPUT, session.getSessionID());
+ resp.setContentType("text/html");
+ resp.setStatus(302);
+ resp.addHeader("Location", redirectURL);
+ Logger.debug("REDIRECT TO: " + redirectURL);
+ }
+ }
+ catch (WrongParametersException ex) {
+ handleWrongParameters(ex, req, resp);
+ }
+ catch (MOAIDException ex) {
+ handleError(null, ex, req, resp);
+ }
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/SelectBKUServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/SelectBKUServlet.java
new file mode 100644
index 000000000..6e285a2c0
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/SelectBKUServlet.java
@@ -0,0 +1,145 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.servlet;
+
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.lang.StringEscapeUtils;
+
+import at.gv.egovernment.moa.id.auth.AuthenticationServer;
+import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants;
+import at.gv.egovernment.moa.id.auth.MOAIDAuthInitializer;
+import at.gv.egovernment.moa.id.auth.WrongParametersException;
+import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
+import at.gv.egovernment.moa.id.util.MOAIDMessageProvider;
+import at.gv.egovernment.moa.id.util.ParamValidatorUtils;
+import at.gv.egovernment.moa.logging.Logger;
+
+/**
+ * Servlet requested for selecting a BKU.
+ * <br>In case of {@link AuthConfigurationProvider#getBKUSelectionType}==HTMLComplete,
+ * the browser is redirected to the configured "BKU-Auswahl-URL".
+ * <br>In case of {@link AuthConfigurationProvider#getBKUSelectionType}==HTMLSelect,
+ * the list of available BKU's is fetched from a BKU-Auswahl server, and presented
+ * to the user in an HTML form.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class SelectBKUServlet extends AuthServlet {
+
+ /**
+ * Calls the web application initializer.
+ *
+ * @see javax.servlet.Servlet#init(ServletConfig)
+ */
+ public void init(ServletConfig servletConfig) throws ServletException {
+ try {
+ super.init(servletConfig);
+ MOAIDAuthInitializer.initialize();
+ Logger.debug("default platform file.encoding: " + System.getProperty("file.encoding"));
+ Logger.info(MOAIDMessageProvider.getInstance().getMessage("init.00", null));
+ }
+ catch (Exception ex) {
+ Logger.fatal(MOAIDMessageProvider.getInstance().getMessage("init.02", null), ex);
+ throw new ServletException(ex);
+ }
+ }
+
+ /**
+ * Responds with an HTML form which requests the user to choose a BKU.
+ */
+ protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws ServletException, IOException {
+
+ Logger.debug("GET SelectBKU");
+
+ resp.setHeader(MOAIDAuthConstants.HEADER_EXPIRES,MOAIDAuthConstants.HEADER_VALUE_EXPIRES);
+ resp.setHeader(MOAIDAuthConstants.HEADER_PRAGMA,MOAIDAuthConstants.HEADER_VALUE_PRAGMA);
+ resp.setHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL);
+ resp.addHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL_IE);
+
+ String authURL = req.getScheme() + "://" + req.getServerName();
+ if ((req.getScheme().equalsIgnoreCase("https") && req.getServerPort()!=443) || (req.getScheme().equalsIgnoreCase("http") && req.getServerPort()!=80)) {
+ authURL = authURL.concat(":" + req.getServerPort());
+ }
+ authURL = authURL.concat(req.getContextPath() + "/");
+
+ String target = req.getParameter(PARAM_TARGET);
+ String oaURL = req.getParameter(PARAM_OA);
+ String bkuSelectionTemplateURL = req.getParameter(PARAM_BKUTEMPLATE);
+ String templateURL = req.getParameter(PARAM_TEMPLATE);
+
+ // escape parameter strings
+ target = StringEscapeUtils.escapeHtml(target);
+ oaURL = StringEscapeUtils.escapeHtml(oaURL);
+ templateURL = StringEscapeUtils.escapeHtml(templateURL);
+ bkuSelectionTemplateURL = StringEscapeUtils.escapeHtml(bkuSelectionTemplateURL);
+
+
+ resp.setHeader(HEADER_EXPIRES,HEADER_VALUE_EXPIRES);
+ resp.setHeader(HEADER_PRAGMA,HEADER_VALUE_PRAGMA);
+ resp.setHeader(HEADER_CACHE_CONTROL,HEADER_VALUE_CACHE_CONTROL);
+ resp.addHeader(HEADER_CACHE_CONTROL,HEADER_VALUE_CACHE_CONTROL_IE);
+
+ try {
+
+ // check parameter
+ if (!ParamValidatorUtils.isValidTarget(target))
+ throw new WrongParametersException("SelectBKU", PARAM_TARGET, "auth.12");
+ if (!ParamValidatorUtils.isValidOA(oaURL))
+ throw new WrongParametersException("SelectBKU", PARAM_OA, "auth.12");
+ if (!ParamValidatorUtils.isValidTemplate(req, templateURL))
+ throw new WrongParametersException("SelectBKU", PARAM_TEMPLATE, "auth.12");
+ if (!ParamValidatorUtils.isValidTemplate(req, bkuSelectionTemplateURL))
+ throw new WrongParametersException("SelectBKU", PARAM_TEMPLATE, "auth.12");
+
+
+ String returnValue = AuthenticationServer.getInstance().selectBKU(
+ authURL, target, oaURL, bkuSelectionTemplateURL, templateURL);
+ String bkuSelectionType = AuthConfigurationProvider.getInstance().getBKUSelectionType();
+ if (bkuSelectionType.equals(AuthConfigurationProvider.BKU_SELECTION_TYPE_HTMLCOMPLETE)) {
+ // bkuSelectionType==HTMLComplete
+ String redirectURL = returnValue;
+ resp.setContentType("text/html");
+ resp.sendRedirect(redirectURL);
+ Logger.info("REDIRECT TO: " + redirectURL);
+ } else {
+ // bkuSelectionType==HTMLSelect
+ String htmlForm = returnValue;
+ resp.setContentType("text/html;charset=UTF-8");
+ Logger.debug("HTML-Form: " + htmlForm);
+ Writer out = new OutputStreamWriter(resp.getOutputStream(), "UTF8");
+ out.write(htmlForm);
+ out.flush();
+ Logger.debug("Finished GET SelectBKU");
+ }
+ }
+ catch (WrongParametersException ex) {
+ handleWrongParameters(ex, req, resp);
+ }
+ catch (Throwable ex) {
+ handleError(null, ex, req, resp);
+ }
+ }
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/StartAuthenticationServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/StartAuthenticationServlet.java
new file mode 100644
index 000000000..2e7d59fde
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/StartAuthenticationServlet.java
@@ -0,0 +1,165 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.servlet;
+
+import iaik.pki.PKIException;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.security.GeneralSecurityException;
+import java.util.List;
+
+import javax.net.ssl.SSLSocketFactory;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.lang.StringEscapeUtils;
+
+import at.gv.egovernment.moa.id.MOAIDException;
+import at.gv.egovernment.moa.id.auth.AuthenticationServer;
+import at.gv.egovernment.moa.id.auth.MOAIDAuthInitializer;
+import at.gv.egovernment.moa.id.auth.WrongParametersException;
+import at.gv.egovernment.moa.id.config.ConfigurationException;
+import at.gv.egovernment.moa.id.config.ConnectionParameter;
+import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
+import at.gv.egovernment.moa.id.util.MOAIDMessageProvider;
+import at.gv.egovernment.moa.id.util.ParamValidatorUtils;
+import at.gv.egovernment.moa.id.util.SSLUtils;
+import at.gv.egovernment.moa.id.util.client.mis.simple.MISSimpleClient;
+import at.gv.egovernment.moa.id.util.client.mis.simple.MISSimpleClientException;
+import at.gv.egovernment.moa.logging.Logger;
+
+/**
+ * Servlet requested for starting a MOA ID authentication session.
+ * Utilizes the {@link AuthenticationServer}.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ * @see AuthenticationServer#startAuthentication
+ */
+public class StartAuthenticationServlet extends AuthServlet {
+
+ /**
+ * Responds with an HTML form which upon submit requests the identity link
+ * from the security layer implementation.
+ * <br>
+ * Response:
+ * <ul>
+ * <li>Content type: <code>"text/html"</code></li>
+ * <li>Content: see return value of {@link AuthenticationServer#startAuthentication}</li>
+ * <li>Error status: <code>500</code>
+ * </ul>
+ * @see javax.servlet.http.HttpServlet#doGet(HttpServletRequest, HttpServletResponse)
+ */
+ protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws ServletException, IOException {
+
+ Logger.debug("GET StartAuthentication");
+ String authURL = req.getScheme() + "://" + req.getServerName();
+ if ((req.getScheme().equalsIgnoreCase("https") && req.getServerPort()!=443) || (req.getScheme().equalsIgnoreCase("http") && req.getServerPort()!=80)) {
+ authURL = authURL.concat(":" + req.getServerPort());
+ }
+ authURL = authURL.concat(req.getContextPath() + "/");
+
+ String target = req.getParameter(PARAM_TARGET);
+ String oaURL = req.getParameter(PARAM_OA);
+ String bkuURL = req.getParameter(PARAM_BKU);
+ String templateURL = req.getParameter(PARAM_TEMPLATE);
+ String sessionID = req.getParameter(PARAM_SESSIONID);
+ String useMandate = req.getParameter(PARAM_USEMANDATE);
+
+
+ // escape parameter strings
+ target = StringEscapeUtils.escapeHtml(target);
+ oaURL = StringEscapeUtils.escapeHtml(oaURL);
+ bkuURL = StringEscapeUtils.escapeHtml(bkuURL);
+ templateURL = StringEscapeUtils.escapeHtml(templateURL);
+ sessionID = StringEscapeUtils.escapeHtml(sessionID);
+ useMandate = StringEscapeUtils.escapeHtml(useMandate);
+
+ resp.setHeader(HEADER_EXPIRES,HEADER_VALUE_EXPIRES);
+ resp.setHeader(HEADER_PRAGMA,HEADER_VALUE_PRAGMA);
+ resp.setHeader(HEADER_CACHE_CONTROL,HEADER_VALUE_CACHE_CONTROL);
+ resp.addHeader(HEADER_CACHE_CONTROL,HEADER_VALUE_CACHE_CONTROL_IE);
+
+
+ try {
+ // check parameter
+ if (!ParamValidatorUtils.isValidTarget(target))
+ throw new WrongParametersException("StartAuthentication", PARAM_TARGET, "auth.12");
+ if (!ParamValidatorUtils.isValidOA(oaURL))
+ throw new WrongParametersException("StartAuthentication", PARAM_OA, "auth.12");
+ if (!ParamValidatorUtils.isValidBKUURI(bkuURL))
+ throw new WrongParametersException("StartAuthentication", PARAM_BKU, "auth.12");
+ if (!ParamValidatorUtils.isValidTemplate(req, templateURL))
+ throw new WrongParametersException("StartAuthentication", PARAM_TEMPLATE, "auth.12");
+ if (!ParamValidatorUtils.isValidSessionID(sessionID))
+ throw new WrongParametersException("StartAuthentication", PARAM_SESSIONID, "auth.12");
+ if (!ParamValidatorUtils.isValidUseMandate(useMandate))
+ throw new WrongParametersException("StartAuthentication", PARAM_USEMANDATE, "auth.12");
+
+
+
+
+ String getIdentityLinkForm =
+ AuthenticationServer.getInstance().startAuthentication(authURL, target, oaURL, templateURL, bkuURL, useMandate, sessionID, req.getScheme());
+
+ resp.setContentType("text/html;charset=UTF-8");
+ PrintWriter out = new PrintWriter(resp.getOutputStream());
+ out.print(getIdentityLinkForm);
+ out.flush();
+ Logger.debug("Finished GET StartAuthentication");
+
+ }
+ catch (WrongParametersException ex) {
+ handleWrongParameters(ex, req, resp);
+ }
+ catch (MOAIDException ex) {
+ handleError(null, ex, req, resp);
+ }
+ }
+
+
+ /**
+ * @see javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+ */
+ protected void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws ServletException, IOException {
+
+ doGet(req, resp);
+ }
+
+
+ /**
+ * Calls the web application initializer.
+ *
+ * @see javax.servlet.Servlet#init(ServletConfig)
+ */
+ public void init(ServletConfig servletConfig) throws ServletException {
+ try {
+ super.init(servletConfig);
+ MOAIDAuthInitializer.initialize();
+ Logger.info(MOAIDMessageProvider.getInstance().getMessage("init.00", null));
+ }
+ catch (Exception ex) {
+ Logger.fatal(MOAIDMessageProvider.getInstance().getMessage("init.02", null), ex);
+ throw new ServletException(ex);
+ }
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyAuthenticationBlockServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyAuthenticationBlockServlet.java
new file mode 100644
index 000000000..f1fb15be0
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyAuthenticationBlockServlet.java
@@ -0,0 +1,169 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.servlet;
+
+import java.io.IOException;
+import java.util.Map;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.fileupload.FileUploadException;
+import org.apache.commons.lang.StringEscapeUtils;
+
+import at.gv.egovernment.moa.id.MOAIDException;
+import at.gv.egovernment.moa.id.auth.AuthenticationServer;
+import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants;
+import at.gv.egovernment.moa.id.auth.WrongParametersException;
+import at.gv.egovernment.moa.id.auth.builder.DataURLBuilder;
+import at.gv.egovernment.moa.id.auth.data.AuthenticationSession;
+import at.gv.egovernment.moa.id.util.ParamValidatorUtils;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.URLEncoder;
+
+/**
+ * Servlet requested for verifying the signed authentication block
+ * provided by the security layer implementation.
+ * Utilizes the {@link AuthenticationServer}.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class VerifyAuthenticationBlockServlet extends AuthServlet {
+
+
+ /**
+ * Constructor for VerifyAuthenticationBlockServlet.
+ */
+ public VerifyAuthenticationBlockServlet() {
+ super();
+ }
+
+ /**
+ * GET requested by security layer implementation to verify
+ * that data URL resource is available.
+ * @see javax.servlet.http.HttpServlet#doGet(HttpServletRequest, HttpServletResponse)
+ */
+ protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws ServletException, IOException {
+
+ //doPost(req, resp);
+
+ Logger.debug("GET VerifyAuthenticationBlock");
+
+ resp.setHeader(MOAIDAuthConstants.HEADER_EXPIRES,MOAIDAuthConstants.HEADER_VALUE_EXPIRES);
+ resp.setHeader(MOAIDAuthConstants.HEADER_PRAGMA,MOAIDAuthConstants.HEADER_VALUE_PRAGMA);
+ resp.setHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL);
+ resp.addHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL_IE);
+
+ }
+
+ /**
+ * Verifies the signed authentication block and redirects the browser
+ * to the online application requested, adding a parameter needed for
+ * retrieving the authentication data.
+ * <br>
+ * Request parameters:
+ * <ul>
+ * <li>MOASessionID: ID of associated authentication session</li>
+ * <li>XMLResponse: <code>&lt;CreateXMLSignatureResponse&gt;</code></li>
+ * </ul>
+ * Response:
+ * <ul>
+ * <li>Status: <code>302</code></li>
+ * <li>Header <code>"Location"</code>: URL of the online application requested, with
+ * parameters <code>"Target"</code>(only if the online application is
+ * a public service) and <code>"SAMLArtifact"</code> added</li>
+ * <li>Error status: <code>500</code>
+ * </ul>
+ * @see AuthenticationServer#verifyAuthenticationBlock
+ * @see javax.servlet.http.HttpServlet#doPost(HttpServletRequest, HttpServletResponse)
+ */
+ protected void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws ServletException, IOException {
+
+ Logger.debug("POST VerifyAuthenticationBlock");
+
+ resp.setHeader(MOAIDAuthConstants.HEADER_EXPIRES,MOAIDAuthConstants.HEADER_VALUE_EXPIRES);
+ resp.setHeader(MOAIDAuthConstants.HEADER_PRAGMA,MOAIDAuthConstants.HEADER_VALUE_PRAGMA);
+ resp.setHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL);
+ resp.addHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL_IE);
+
+ Map parameters;
+ try
+ {
+ parameters = getParameters(req);
+ } catch (FileUploadException e)
+ {
+ Logger.error("Parsing mulitpart/form-data request parameters failed: " + e.getMessage());
+ throw new IOException(e.getMessage());
+ }
+ String sessionID = req.getParameter(PARAM_SESSIONID);
+ String createXMLSignatureResponse = (String)parameters.get(PARAM_XMLRESPONSE);
+
+ // escape parameter strings
+ sessionID = StringEscapeUtils.escapeHtml(sessionID);
+
+ String redirectURL = null;
+ try {
+ // check parameter
+ if (!ParamValidatorUtils.isValidSessionID(sessionID))
+ throw new WrongParametersException("VerifyAuthenticationBlock", PARAM_SESSIONID, "auth.12");
+ if (!ParamValidatorUtils.isValidXMLDocument(createXMLSignatureResponse))
+ throw new WrongParametersException("VerifyAuthenticationBlock", PARAM_XMLRESPONSE, "auth.12");
+
+
+ AuthenticationSession session = AuthenticationServer.getSession(sessionID);
+ String samlArtifactBase64 =
+ AuthenticationServer.getInstance().verifyAuthenticationBlock(sessionID, createXMLSignatureResponse);
+ if (!samlArtifactBase64.equals("Redirect to Input Processor")) {
+ redirectURL = session.getOAURLRequested();
+ if (!session.getBusinessService()) {
+ redirectURL = addURLParameter(redirectURL, PARAM_TARGET, URLEncoder.encode(session.getTarget(), "UTF-8"));
+ }
+ redirectURL = addURLParameter(redirectURL, PARAM_SAMLARTIFACT, URLEncoder.encode(samlArtifactBase64, "UTF-8"));
+ redirectURL = resp.encodeRedirectURL(redirectURL);
+ } else {
+ redirectURL = new DataURLBuilder().buildDataURL(session.getAuthURL(), AuthenticationServer.REQ_PROCESS_VALIDATOR_INPUT, session.getSessionID());
+ }
+ resp.setContentType("text/html");
+ resp.setStatus(302);
+ resp.addHeader("Location", redirectURL);
+ Logger.debug("REDIRECT TO: " + redirectURL);
+ }
+
+ catch (MOAIDException ex) {
+ handleError(null, ex, req, resp);
+ }
+
+ }
+ /**
+ * Adds a parameter to a URL.
+ * @param url the URL
+ * @param paramname parameter name
+ * @param paramvalue parameter value
+ * @return the URL with parameter added
+ */
+ private static String addURLParameter(String url, String paramname, String paramvalue) {
+ String param = paramname + "=" + paramvalue;
+ if (url.indexOf("?") < 0)
+ return url + "?" + param;
+ else
+ return url + "&" + param;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyCertificateServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyCertificateServlet.java
new file mode 100644
index 000000000..0014d2647
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyCertificateServlet.java
@@ -0,0 +1,337 @@
+package at.gv.egovernment.moa.id.auth.servlet;
+
+import iaik.pki.PKIException;
+import iaik.x509.X509Certificate;
+
+import java.io.IOException;
+import java.security.GeneralSecurityException;
+import java.security.cert.CertificateEncodingException;
+import java.util.Map;
+
+import javax.net.ssl.SSLSocketFactory;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.TransformerException;
+
+import org.apache.axis.encoding.Base64;
+import org.apache.commons.fileupload.FileUploadException;
+import org.apache.commons.lang.StringEscapeUtils;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Text;
+
+import at.gv.egovernment.moa.id.AuthenticationException;
+import at.gv.egovernment.moa.id.MOAIDException;
+import at.gv.egovernment.moa.id.auth.AuthenticationServer;
+import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants;
+import at.gv.egovernment.moa.id.auth.WrongParametersException;
+import at.gv.egovernment.moa.id.auth.builder.DataURLBuilder;
+import at.gv.egovernment.moa.id.auth.data.AuthenticationSession;
+import at.gv.egovernment.moa.id.auth.validator.parep.client.szrgw.SZRGWConstants;
+import at.gv.egovernment.moa.id.config.ConnectionParameter;
+import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
+import at.gv.egovernment.moa.id.config.auth.OAAuthParameter;
+import at.gv.egovernment.moa.id.util.ParamValidatorUtils;
+import at.gv.egovernment.moa.id.util.SSLUtils;
+import at.gv.egovernment.moa.id.util.ServletUtils;
+import at.gv.egovernment.moa.id.util.client.mis.simple.MISSessionId;
+import at.gv.egovernment.moa.id.util.client.mis.simple.MISSimpleClient;
+import at.gv.egovernment.moa.id.util.client.mis.simple.MISSimpleClientException;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.DOMUtils;
+
+/**
+ * Servlet requested for getting the foreign eID
+ * provided by the security layer implementation.
+ * Utilizes the {@link AuthenticationServer}.
+ *
+ */
+public class VerifyCertificateServlet extends AuthServlet {
+
+ /**
+ * Constructor for VerifyCertificateServlet.
+ */
+ public VerifyCertificateServlet() {
+ super();
+ }
+
+ /**
+ * GET requested by security layer implementation to verify
+ * that data URL resource is available.
+ * @see javax.servlet.http.HttpServlet#doGet(HttpServletRequest, HttpServletResponse)
+ */
+ protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws ServletException, IOException {
+
+ Logger.debug("GET VerifyCertificateServlet");
+
+ resp.setHeader(MOAIDAuthConstants.HEADER_EXPIRES,MOAIDAuthConstants.HEADER_VALUE_EXPIRES);
+ resp.setHeader(MOAIDAuthConstants.HEADER_PRAGMA,MOAIDAuthConstants.HEADER_VALUE_PRAGMA);
+ resp.setHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL);
+ resp.addHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL_IE);
+ }
+
+ /**
+ * Gets the signer certificate from the InfoboxReadRequest and
+ * responds with a new
+ * <code>CreateXMLSignatureRequest</code>.
+ * <br>
+ * Request parameters:
+ * <ul>
+ * <li>MOASessionID: ID of associated authentication session</li>
+ * <li>XMLResponse: <code>&lt;InfoboxReadResponse&gt;</code></li>
+ * </ul>
+ * @see javax.servlet.http.HttpServlet#doPost(HttpServletRequest, HttpServletResponse)
+ */
+ protected void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws ServletException, IOException {
+
+ Logger.debug("POST VerifyCertificateServlet");
+
+ resp.setHeader(MOAIDAuthConstants.HEADER_EXPIRES,MOAIDAuthConstants.HEADER_VALUE_EXPIRES);
+ resp.setHeader(MOAIDAuthConstants.HEADER_PRAGMA,MOAIDAuthConstants.HEADER_VALUE_PRAGMA);
+ resp.setHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL);
+ resp.addHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL_IE);
+
+ Map parameters;
+ try
+ {
+ parameters = getParameters(req);
+ } catch (FileUploadException e)
+ {
+ Logger.error("Parsing mulitpart/form-data request parameters failed: " + e.getMessage());
+ throw new IOException(e.getMessage());
+ }
+ String sessionID = req.getParameter(PARAM_SESSIONID);
+
+ // escape parameter strings
+ sessionID = StringEscapeUtils.escapeHtml(sessionID);
+
+ AuthenticationSession session = null;
+ try {
+ // check parameter
+ if (!ParamValidatorUtils.isValidSessionID(sessionID))
+ throw new WrongParametersException("VerifyCertificate", PARAM_SESSIONID, "auth.12");
+
+ session = AuthenticationServer.getSession(sessionID);
+
+
+ X509Certificate cert = AuthenticationServer.getInstance().getCertificate(sessionID, parameters);
+ if (cert == null) {
+ Logger.error("Certificate could not be read.");
+ throw new AuthenticationException("auth.14", null);
+ }
+
+ boolean useMandate = session.getUseMandate();
+ if (useMandate) {
+ // Mandate Modus
+ // make request to MIS
+
+ AuthConfigurationProvider authConf= AuthConfigurationProvider.getInstance();
+ ConnectionParameter connectionParameters = authConf.getOnlineMandatesConnectionParameter();
+ SSLSocketFactory sslFactory = SSLUtils.getSSLSocketFactory(AuthConfigurationProvider.getInstance(), connectionParameters);
+
+ // get identitity link as byte[]
+ Element elem = session.getIdentityLink().getSamlAssertion();
+ String s = DOMUtils.serializeNode(elem);
+// byte[] idl = DOMUtils.nodeToByteArray(elem);
+// String s = new String(idl);
+ byte[] idl = s.getBytes();
+
+ // redirect url
+ // build redirect(to the GetMISSessionIdSerlvet)
+ String redirectURL =
+ new DataURLBuilder().buildDataURL(
+ session.getAuthURL(),
+ GET_MIS_SESSIONID,
+ session.getSessionID());
+
+ String oaURL = session.getOAURLRequested();
+ OAAuthParameter oaParam = authConf.getOnlineApplicationParameter(oaURL);
+ String profiles = oaParam.getMandateProfiles();
+
+ if (profiles == null) {
+ Logger.error("No Mandate/Profile for OA configured.");
+ throw new AuthenticationException("auth.16", new Object[] { GET_MIS_SESSIONID});
+ }
+
+ String profilesArray[] = profiles.split(",");
+ for(int i = 0; i < profilesArray.length; i++) {
+ profilesArray[i] = profilesArray[i].trim();
+ }
+
+ MISSessionId misSessionID = MISSimpleClient.sendSessionIdRequest(connectionParameters.getUrl(), idl, cert.getEncoded(), redirectURL, profilesArray, sslFactory);
+ String redirectMISGUI = misSessionID.getRedirectURL();
+
+ if (misSessionID == null) {
+ Logger.error("Fehler bei Anfrage an Vollmachten Service. MIS Session ID ist null.");
+ throw new MISSimpleClientException("Fehler bei Anfrage an Vollmachten Service.");
+ }
+
+ session.setMISSessionID(misSessionID.getSessiondId());
+
+ resp.setStatus(302);
+ resp.addHeader("Location", redirectMISGUI);
+ Logger.debug("REDIRECT TO: " + redirectURL);
+
+ }
+ else {
+ // Foreign Identities Modus
+
+ String createXMLSignatureRequest = AuthenticationServer.getInstance().createXMLSignatureRequestForeignID(sessionID, cert);
+ // build dataurl (to the GetForeignIDSerlvet)
+ String dataurl =
+ new DataURLBuilder().buildDataURL(
+ session.getAuthURL(),
+ REQ_GET_FOREIGN_ID,
+ session.getSessionID());
+
+ ServletUtils.writeCreateXMLSignatureRequest(resp, session, createXMLSignatureRequest, AuthenticationServer.REQ_PROCESS_VALIDATOR_INPUT, "GetForeignID", dataurl);
+
+
+ Logger.debug("Send CreateXMLSignatureRequest to BKU");
+ }
+
+
+ }
+ catch (MOAIDException ex) {
+ handleError(null, ex, req, resp);
+ } catch (GeneralSecurityException ex) {
+ handleError(null, ex, req, resp);
+ } catch (PKIException e) {
+ handleError(null, e, req, resp);
+ } catch (MISSimpleClientException e) {
+ handleError(null, e, req, resp);
+ } catch (TransformerException e) {
+ handleError(null, e, req, resp);
+ }
+ }
+
+ /**
+ * Adds a parameter to a URL.
+ * @param url the URL
+ * @param paramname parameter name
+ * @param paramvalue parameter value
+ * @return the URL with parameter added
+ */
+ private static String addURLParameter(String url, String paramname, String paramvalue) {
+ String param = paramname + "=" + paramvalue;
+ if (url.indexOf("?") < 0)
+ return url + "?" + param;
+ else
+ return url + "&" + param;
+ }
+
+ /**
+ * Does the request to the SZR-GW
+ * @param givenname
+ * @param familyname
+ * @param dateofbirth
+ * @return Identity link assertion
+ * @throws SZRGWClientException
+ */
+ /*private Element getIdentityLink(Element signature) throws SZRGWClientException {*/
+// private Element getIdentityLink(X509Certificate cert) throws SZRGWClientException {
+//
+// SZRGWClient client = new SZRGWClient();
+//
+// try {
+// AuthConfigurationProvider authConf = AuthConfigurationProvider.getInstance();
+// ConnectionParameter connectionParameters = authConf.getForeignIDConnectionParameter();
+// //url = "http://localhost:8081/szr-gateway/services/IdentityLinkCreation";
+// Logger.debug("Connection Parameters: " + connectionParameters);
+// client.setAddress(connectionParameters.getUrl());
+// if (connectionParameters.getUrl().toLowerCase().startsWith("https:")) {
+// Logger.debug("Initialisiere SSL Verbindung");
+// try {
+// client.setSSLSocketFactory(SSLUtils.getSSLSocketFactory(AuthConfigurationProvider.getInstance(), connectionParameters));
+// } catch (IOException e) {
+// // TODO Auto-generated catch block
+// e.printStackTrace();
+// } catch (GeneralSecurityException e) {
+// // TODO Auto-generated catch block
+// e.printStackTrace();
+// } catch (PKIException e) {
+// // TODO Auto-generated catch block
+// e.printStackTrace();
+// }
+// }
+//
+// Logger.info("Starte Kommunikation mit dem Stammzahlenregister Gateway(" + connectionParameters.getUrl() + ")...");
+//
+//
+// }
+// catch (ConfigurationException e) {
+// Logger.warn(e);
+// Logger.warn(MOAIDMessageProvider.getInstance().getMessage("config.12", null ));
+//
+// }
+// // create request
+// Document doc = buildGetIdentityLinkRequest(cert);
+// Element request = doc.getDocumentElement();
+// CreateIdentityLinkResponse response = null;
+//
+// //try {
+// response = client.createIdentityLinkResponse(request);
+// //} catch (SZRGWClientException e) {
+// // give him a second try - Nach dem Starten des Tomcat wird beim ersten Mal das Client-Zertifikat offenbar vom HTTPClient nicht mitgeschickt.
+// // client = new SZRGWClient(url);
+// // response = client.createIdentityLinkResponse(request);
+// // }
+//
+//
+// return response.getAssertion();
+//
+// }
+
+ /**
+ * Builds the szrgw:GetIdentityLinkRequest für the SZR-GW
+ * @param givenname
+ * @param familyname
+ * @param birthday
+ * @return
+ */
+ private static Document buildGetIdentityLinkRequest(X509Certificate cert) {
+
+ try {
+ byte[] certbyte = cert.getEncoded();
+ String certstring = Base64.encode(certbyte);
+
+ DocumentBuilderFactory factory =DocumentBuilderFactory.newInstance();
+ factory.setNamespaceAware(true);
+ DocumentBuilder builder = factory.newDocumentBuilder();
+ Document doc = builder.newDocument();
+
+ Element getIdentityLink = doc.createElementNS(SZRGWConstants.SZRGW_REQUEST_NS, "szrgw:GetIdentityLinkRequest");
+ getIdentityLink.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:szrgw", SZRGWConstants.SZRGW_REQUEST_NS);
+ doc.appendChild(getIdentityLink);
+
+ Element x509certificate = doc.createElementNS(SZRGWConstants.SZRGW_REQUEST_NS, "szrgw:X509Certificate");
+ getIdentityLink.appendChild(x509certificate);
+ Text certbase64 = doc.createTextNode(certstring);
+ x509certificate.appendChild(certbase64);
+
+ return doc;
+ } catch (ParserConfigurationException e) {
+ e.printStackTrace();
+ } catch (CertificateEncodingException e) {
+ e.printStackTrace();
+ }
+ return null;
+
+ }
+
+ /**
+ * Checks a parameter.
+ * @param param parameter
+ * @return true if the parameter is null or empty
+ */
+ private boolean isEmpty(String param) {
+ return param == null || param.length() == 0;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyIdentityLinkServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyIdentityLinkServlet.java
new file mode 100644
index 000000000..740c85942
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/VerifyIdentityLinkServlet.java
@@ -0,0 +1,203 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.servlet;
+
+import java.io.IOException;
+import java.util.Map;
+
+import javax.net.ssl.SSLSocketFactory;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.fileupload.FileUploadException;
+import org.apache.commons.lang.StringEscapeUtils;
+
+import at.gv.egovernment.moa.id.AuthenticationException;
+import at.gv.egovernment.moa.id.MOAIDException;
+import at.gv.egovernment.moa.id.ParseException;
+import at.gv.egovernment.moa.id.auth.AuthenticationServer;
+import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants;
+import at.gv.egovernment.moa.id.auth.WrongParametersException;
+import at.gv.egovernment.moa.id.auth.builder.DataURLBuilder;
+import at.gv.egovernment.moa.id.auth.builder.InfoboxReadRequestBuilderCertificate;
+import at.gv.egovernment.moa.id.auth.data.AuthenticationSession;
+import at.gv.egovernment.moa.id.config.ConnectionParameter;
+import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
+import at.gv.egovernment.moa.id.util.ParamValidatorUtils;
+import at.gv.egovernment.moa.id.util.SSLUtils;
+import at.gv.egovernment.moa.id.util.ServletUtils;
+import at.gv.egovernment.moa.logging.Logger;
+
+/**
+ * Servlet requested for verifying the identity link
+ * provided by the security layer implementation.
+ * Utilizes the {@link AuthenticationServer}.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class VerifyIdentityLinkServlet extends AuthServlet {
+
+ /**
+ * Constructor for VerifyIdentityLinkServlet.
+ */
+ public VerifyIdentityLinkServlet() {
+ super();
+ }
+
+ /**
+ * GET requested by security layer implementation to verify
+ * that data URL resource is available.
+ * @see javax.servlet.http.HttpServlet#doGet(HttpServletRequest, HttpServletResponse)
+ */
+ protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws ServletException, IOException {
+
+ Logger.debug("GET VerifyIdentityLink");
+
+ resp.setHeader(MOAIDAuthConstants.HEADER_EXPIRES,MOAIDAuthConstants.HEADER_VALUE_EXPIRES);
+ resp.setHeader(MOAIDAuthConstants.HEADER_PRAGMA,MOAIDAuthConstants.HEADER_VALUE_PRAGMA);
+ resp.setHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL);
+ resp.addHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL_IE);
+ }
+
+ /**
+ * Verifies the identity link and responds with a new
+ * <code>CreateXMLSignatureRequest</code> or a new <code>
+ * InfoboxReadRequest</code> (in case of a foreign eID card).
+ * <br>
+ * Request parameters:
+ * <ul>
+ * <li>MOASessionID: ID of associated authentication session</li>
+ * <li>XMLResponse: <code>&lt;InfoboxReadResponse&gt;</code></li>
+ * </ul>
+ * Response:
+ * <ul>
+ * <li>Content type: <code>"text/xml"</code></li>
+ * <li>Content: see return value of {@link AuthenticationServer#verifyIdentityLink}</li>
+ * <li>Error status: <code>500</code>
+ * </ul>
+ * @see javax.servlet.http.HttpServlet#doPost(HttpServletRequest, HttpServletResponse)
+ */
+ protected void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws ServletException, IOException {
+
+ Logger.debug("POST VerifyIdentityLink");
+
+ Map parameters;
+ try
+ {
+ parameters = getParameters(req);
+ } catch (FileUploadException e)
+ {
+ Logger.error("Parsing mulitpart/form-data request parameters failed: " + e.getMessage());
+ throw new IOException(e.getMessage());
+ }
+ String sessionID = req.getParameter(PARAM_SESSIONID);
+
+
+ // escape parameter strings
+ sessionID = StringEscapeUtils.escapeHtml(sessionID);
+
+ resp.setHeader(MOAIDAuthConstants.HEADER_EXPIRES,MOAIDAuthConstants.HEADER_VALUE_EXPIRES);
+ resp.setHeader(MOAIDAuthConstants.HEADER_PRAGMA,MOAIDAuthConstants.HEADER_VALUE_PRAGMA);
+ resp.setHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL);
+ resp.addHeader(MOAIDAuthConstants.HEADER_CACHE_CONTROL,MOAIDAuthConstants.HEADER_VALUE_CACHE_CONTROL_IE);
+
+
+ try {
+ // check parameter
+ if (!ParamValidatorUtils.isValidSessionID(sessionID))
+ throw new WrongParametersException("VerifyIdentityLink", PARAM_SESSIONID, "auth.12");
+
+ AuthenticationSession session = AuthenticationServer.getSession(sessionID);
+ String createXMLSignatureRequestOrRedirect = AuthenticationServer.getInstance().verifyIdentityLink(sessionID, parameters);
+
+ Logger.debug(createXMLSignatureRequestOrRedirect);
+
+ if (createXMLSignatureRequestOrRedirect == null) {
+ // no identity link found
+
+ boolean useMandate = session.getUseMandate();
+ if (useMandate) {
+ Logger.error("Online-Mandate Mode for foreign citizencs not supported.");
+ throw new AuthenticationException("auth.13", null);
+ }
+
+ try {
+
+ Logger.debug("Send InfoboxReadRequest to BKU to get signer certificate.");
+
+ // create the InfoboxReadRequest to get the certificate
+ String infoboxReadRequest = new InfoboxReadRequestBuilderCertificate().build(true);
+
+ // build dataurl (to the GetForeignIDSerlvet)
+ String dataurl =
+ new DataURLBuilder().buildDataURL(
+ session.getAuthURL(),
+ REQ_VERIFY_CERTIFICATE,
+ session.getSessionID());
+
+
+ ServletUtils.writeCreateXMLSignatureRequest(resp, session, infoboxReadRequest, AuthenticationServer.REQ_PROCESS_VALIDATOR_INPUT, "VerifyIdentityLink", dataurl);
+
+
+ }
+ catch(Exception e) {
+ handleError(null, e, req, resp);
+ }
+
+ }
+ else {
+ boolean useMandate = session.getUseMandate();
+ if (useMandate) { // Mandate modus
+ // read certificate and set dataurl to VerifyCertificateForMandatesServlet
+
+ Logger.debug("Send InfoboxReadRequest to BKU to get signer certificate.");
+
+ String infoboxReadRequest = new InfoboxReadRequestBuilderCertificate().build(true);
+
+ // build dataurl (to the GetForeignIDSerlvet)
+ String dataurl =
+ new DataURLBuilder().buildDataURL(
+ session.getAuthURL(),
+ REQ_VERIFY_CERTIFICATE,
+ session.getSessionID());
+
+
+ //Logger.debug("ContentType set to: application/x-www-form-urlencoded (ServletUtils)");
+ //ServletUtils.writeCreateXMLSignatureRequestURLEncoded(resp, session, infoboxReadRequest, AuthenticationServer.REQ_PROCESS_VALIDATOR_INPUT, "VerifyIdentityLink", dataurl);
+ Logger.debug("ContentType set to: text/xml;charset=UTF-8 (ServletUtils)");
+ ServletUtils.writeCreateXMLSignatureRequest(resp, session, infoboxReadRequest, AuthenticationServer.REQ_PROCESS_VALIDATOR_INPUT, "VerifyIdentityLink", dataurl);
+
+ }
+ else {
+ ServletUtils.writeCreateXMLSignatureRequestOrRedirect(resp, session, createXMLSignatureRequestOrRedirect, AuthenticationServer.REQ_PROCESS_VALIDATOR_INPUT, "VerifyIdentityLink");
+ }
+ }
+
+ }
+ catch (ParseException ex) {
+ handleError(null, ex, req, resp);
+ }
+
+ catch (MOAIDException ex) {
+ handleError(null, ex, req, resp);
+ }
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/CreateXMLSignatureResponseValidator.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/CreateXMLSignatureResponseValidator.java
new file mode 100644
index 000000000..072b6c48f
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/CreateXMLSignatureResponseValidator.java
@@ -0,0 +1,293 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.validator;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.id.auth.builder.AuthenticationBlockAssertionBuilder;
+import at.gv.egovernment.moa.id.auth.data.AuthenticationSession;
+import at.gv.egovernment.moa.id.auth.data.CreateXMLSignatureResponse;
+import at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttribute;
+import at.gv.egovernment.moa.id.auth.data.IdentityLink;
+import at.gv.egovernment.moa.id.auth.data.SAMLAttribute;
+import at.gv.egovernment.moa.id.config.TargetToSectorNameMapper;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.StringUtils;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+/**
+ *
+ * This class is used to validate an {@link CreateXMLSignatureResponse}
+ * returned by the security layer.
+ * This class implements the Singleton pattern.
+ * @author Stefan Knirsch
+ * @version $Id$
+ */
+public class CreateXMLSignatureResponseValidator {
+
+
+ /** Xpath expression to the dsig:Signature element */
+ private static final String SIGNATURE_XPATH = Constants.DSIG_PREFIX + ":Signature";
+
+
+ /** Singleton instance. <code>null</code>, if none has been created. */
+ private static CreateXMLSignatureResponseValidator instance;
+
+ /**
+ * Constructor for a singleton CreateXMLSignatureResponseValidator.
+ * @return an instance of CreateXMLSignatureResponseValidator
+ * @throws ValidateException if no instance can be created
+ */
+ public static synchronized CreateXMLSignatureResponseValidator getInstance()
+ throws ValidateException {
+ if (instance == null) {
+ instance = new CreateXMLSignatureResponseValidator();
+ }
+ return instance;
+ }
+
+
+ /**
+ * The Method validate is used for validating an explicit {@link CreateXMLSignatureResponse}
+ * @param createXMLSignatureResponse
+ * @param session
+ * @throws ValidateException
+ */
+ public void validate(CreateXMLSignatureResponse createXMLSignatureResponse, AuthenticationSession session)
+ throws ValidateException {
+
+ // A3.056: more then one /saml:Assertion/saml:AttributeStatement/saml:Subject/saml:NameIdentifier
+
+ String gbTarget = session.getTarget();
+ String oaURL = session.getPublicOAURLPrefix();
+ boolean businessService = session.getBusinessService();
+
+ IdentityLink identityLink = session.getIdentityLink();
+
+ Element samlAssertion = createXMLSignatureResponse.getSamlAssertion();
+ String issuer = samlAssertion.getAttribute("Issuer");
+ if (issuer == null) {
+ // should not happen, because parser would dedect this
+ throw new ValidateException("validator.32", null);
+ }
+ String issueInstant = samlAssertion.getAttribute("IssueInstant");
+ if (!issueInstant.equals(session.getIssueInstant())) {
+ throw new ValidateException("validator.39", new Object[] {issueInstant, session.getIssueInstant()});
+ }
+
+ String name = identityLink.getName();
+ if (!issuer.equals(name)) {
+ throw new ValidateException("validator.33", new Object[] {issuer, name});
+ }
+
+ SAMLAttribute[] samlAttributes = createXMLSignatureResponse.getSamlAttributes();
+
+ boolean foundOA = false;
+ boolean foundGB = false;
+ boolean foundWBPK = false;
+ int offset = 0;
+
+ // check number of SAML aatributes
+ List extendedSAMLAttributes = session.getExtendedSAMLAttributesAUTH();
+ int extendedSAMLAttributesNum = 0;
+ if (extendedSAMLAttributes != null) {
+ extendedSAMLAttributesNum = extendedSAMLAttributes.size();
+ }
+ int expectedSAMLAttributeNumber =
+ AuthenticationBlockAssertionBuilder.NUM_OF_SAML_ATTRIBUTES + extendedSAMLAttributesNum;
+ if (!session.getSAMLAttributeGebeORwbpk()) expectedSAMLAttributeNumber--;
+ int actualSAMLAttributeNumber = samlAttributes.length;
+ if (actualSAMLAttributeNumber != expectedSAMLAttributeNumber) {
+ Logger.error("Wrong number of SAML attributes in CreateXMLSignatureResponse: expected " +
+ expectedSAMLAttributeNumber + ", but was " + actualSAMLAttributeNumber);
+ throw new ValidateException(
+ "validator.36",
+ new Object[] {String.valueOf(actualSAMLAttributeNumber), String.valueOf(expectedSAMLAttributeNumber)});
+ }
+
+ SAMLAttribute samlAttribute;
+ if (session.getSAMLAttributeGebeORwbpk()) {
+ // check the first attribute ("Geschaeftsbereich" or "wbPK")
+ samlAttribute = samlAttributes[0];
+ if (businessService) {
+ if (!samlAttribute.getName().equals("wbPK")) {
+ if (samlAttribute.getName().equals("Geschaeftsbereich")) {
+ throw new ValidateException("validator.26", null);
+ } else {
+ throw new ValidateException(
+ "validator.37",
+ new Object[] {samlAttribute.getName(), "wbPK", String.valueOf(1)});
+ }
+ }
+ if (samlAttribute.getNamespace().equals("http://reference.e-government.gv.at/namespace/moa/20020822#")) {
+ foundWBPK = true;
+ try {
+ Element attrValue = (Element)samlAttribute.getValue();
+ String value = ((Element)attrValue.getElementsByTagNameNS(Constants.PD_NS_URI, "Value").item(0)).getFirstChild().getNodeValue();
+ String type = ((Element)attrValue.getElementsByTagNameNS(Constants.PD_NS_URI, "Type").item(0)).getFirstChild().getNodeValue();
+ if (!value.equals(identityLink.getIdentificationValue())) {
+ throw new ValidateException("validator.28", null);
+ }
+ if (!type.equals(identityLink.getIdentificationType())) {
+ throw new ValidateException("validator.28", null);
+ }
+ } catch (Exception ex) {
+ throw new ValidateException("validator.29", null);
+ }
+ } else {
+ throw new ValidateException("validator.30", null);
+ }
+ } else {
+ if (!samlAttribute.getName().equals("Geschaeftsbereich")) {
+ if (samlAttribute.getName().equals("wbPK")) {
+ throw new ValidateException("validator.26", null);
+ } else {
+ throw new ValidateException(
+ "validator.37",
+ new Object[] {samlAttribute.getName(), "Geschaeftsbereich", String.valueOf(1)});
+ }
+ }
+ if (samlAttribute.getNamespace().equals("http://reference.e-government.gv.at/namespace/moa/20020822#")) {
+ foundGB = true;
+ //BZ..
+ gbTarget = gbTarget + " (" + TargetToSectorNameMapper.getSectorNameViaTarget(gbTarget) + ")";
+ //..BZ
+ if (!gbTarget.equals((String)samlAttribute.getValue())) {
+ throw new ValidateException("validator.13", null);
+ }
+ } else {
+ throw new ValidateException("validator.12", null);
+ }
+ }
+ } else {
+ offset--;
+ }
+
+ // check the second attribute (must be "OA")
+ samlAttribute = samlAttributes[1 + offset];
+ if (!samlAttribute.getName().equals("OA")) {
+ throw new ValidateException(
+ "validator.37",
+ new Object[] {samlAttribute.getName(), "OA", String.valueOf(2)});
+ }
+ if (samlAttribute.getNamespace().equals("http://reference.e-government.gv.at/namespace/moa/20020822#")) {
+ foundOA = true;
+ if (!oaURL.equals((String)samlAttribute.getValue())) { // CHECKS für die AttributeVALUES fehlen noch
+ throw new ValidateException("validator.16", new Object[] {":gefunden wurde '" + oaURL + "', erwartet wurde '" + samlAttribute.getValue()});
+ }
+ } else {
+ throw new ValidateException("validator.15", null);
+ }
+
+ // check the third attribute (must be "Geburtsdatum")
+ samlAttribute = samlAttributes[2 + offset];
+ if (!samlAttribute.getName().equals("Geburtsdatum")) {
+ throw new ValidateException(
+ "validator.37",
+ new Object[] {samlAttribute.getName(), "Geburtsdatum", String.valueOf(3)});
+ }
+ if (samlAttribute.getNamespace().equals("http://reference.e-government.gv.at/namespace/moa/20020822#")) {
+ String samlDateOfBirth = (String)samlAttribute.getValue();
+ String dateOfBirth = identityLink.getDateOfBirth();
+ if (!samlDateOfBirth.equals(dateOfBirth)) {
+ throw new ValidateException("validator.34", new Object[] {samlDateOfBirth, dateOfBirth});
+ }
+ } else {
+ throw new ValidateException("validator.35", null);
+ }
+
+ // now check the extended SAML attributes
+ int i = AuthenticationBlockAssertionBuilder.NUM_OF_SAML_ATTRIBUTES + offset;
+ if (extendedSAMLAttributes != null) {
+ Iterator it = extendedSAMLAttributes.iterator();
+ while (it.hasNext()) {
+ ExtendedSAMLAttribute extendedSAMLAttribute = (ExtendedSAMLAttribute)it.next();
+ samlAttribute = samlAttributes[i];
+ String actualName = samlAttribute.getName();
+ String expectedName = extendedSAMLAttribute.getName();
+ if (!actualName.equals(expectedName)) {
+ throw new ValidateException(
+ "validator.38",
+ new Object[] {"Name", String.valueOf((i+1)), actualName, actualName, expectedName });
+ }
+ String actualNamespace = samlAttribute.getNamespace();
+ String expectedNamespace = extendedSAMLAttribute.getNameSpace();
+ if (!actualNamespace.equals(expectedNamespace)) {
+ throw new ValidateException(
+ "validator.38",
+ new Object[] {"Namespace", String.valueOf((i+1)), actualName, actualNamespace, expectedNamespace, });
+ }
+ Object expectedValue = extendedSAMLAttribute.getValue();
+ Object actualValue = samlAttribute.getValue();
+ try {
+ if (expectedValue instanceof String) {
+ // replace \r\n because text might be base64-encoded
+ String expValue = StringUtils.replaceAll((String)expectedValue,"\r","");
+ expValue = StringUtils.replaceAll(expValue,"\n","");
+ String actValue = StringUtils.replaceAll((String)actualValue,"\r","");
+ actValue = StringUtils.replaceAll(actValue,"\n","");
+ if (!expValue.equals(actValue)) {
+ throw new ValidateException(
+ "validator.38",
+ new Object[] {"Wert", String.valueOf((i+1)), actualName, actualValue, expectedValue });
+ }
+ } else if (expectedValue instanceof Element) {
+ // only check the name of the element
+ String actualElementName = ((Element)actualValue).getNodeName();
+ String expectedElementName = ((Element)expectedValue).getNodeName();
+ if (!(expectedElementName.equals(actualElementName))){
+ throw new ValidateException(
+ "validator.38",
+ new Object[] {"Wert", String.valueOf((i+1)), actualName, actualElementName, expectedElementName});
+ }
+ } else {
+ // should not happen
+ throw new ValidateException(
+ "validator.38",
+ new Object[] {"Typ", String.valueOf((i+1)), expectedName, "java.lang.String oder org.wrc.dom.Element", expectedValue.getClass().getName()});
+ }
+ } catch (ClassCastException e) {
+ throw new ValidateException(
+ "validator.38",
+ new Object[] {"Typ", String.valueOf((i+1)), expectedName, expectedValue.getClass().getName(), actualValue.getClass().getName()});
+ }
+ i++;
+ }
+ }
+
+
+ if (!foundOA) throw new ValidateException("validator.14", null);
+ if (businessService) {
+ if (session.getSAMLAttributeGebeORwbpk() && !foundWBPK) throw new ValidateException("validator.31", null);
+ } else {
+ if (!foundGB) throw new ValidateException("validator.11", null);
+ }
+
+ //Check if dsig:Signature exists
+// NodeList nl = createXMLSignatureResponse.getSamlAssertion().getElementsByTagNameNS(Constants.DSIG_NS_URI, "Signature");
+// if (nl.getLength() != 1) {
+// throw new ValidateException("validator.05", null);
+// }
+ Element dsigSignature = (Element) XPathUtils.selectSingleNode(samlAssertion, SIGNATURE_XPATH);
+ if (dsigSignature == null) {
+ throw new ValidateException("validator.05", new Object[] {"im AUTHBlock"}) ;
+ }
+ }
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/IdentityLinkValidator.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/IdentityLinkValidator.java
new file mode 100644
index 000000000..baaa21db2
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/IdentityLinkValidator.java
@@ -0,0 +1,177 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.validator;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.id.auth.data.IdentityLink;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+/**
+ * This class is used to validate an {@link IdentityLink}
+ * returned by the security layer
+ *
+ * @author Stefan Knirsch
+ * @version $Id$
+ */
+public class IdentityLinkValidator implements Constants {
+
+ //
+ // XPath namespace prefix shortcuts
+ //
+ /** Xpath prefix for reaching PersonData Namespaces */
+ private static final String PDATA = PD_PREFIX + ":";
+ /** Xpath prefix for reaching SAML Namespaces */
+ private static final String SAML = SAML_PREFIX + ":";
+ /** Xpath prefix for reaching XML-DSIG Namespaces */
+ private static final String DSIG = DSIG_PREFIX + ":";
+ /** Xpath prefix for reaching ECDSA Namespaces */
+ private static final String ECDSA = ECDSA_PREFIX + ":";
+ /** Xpath expression to the root element */
+ private static final String ROOT = "";
+ /** Xpath expression to the SAML:SubjectConfirmationData element */
+ private static final String SAML_SUBJECT_CONFIRMATION_DATA_XPATH =
+ ROOT
+ + SAML
+ + "AttributeStatement/"
+ + SAML
+ + "Subject/"
+ + SAML
+ + "SubjectConfirmation/"
+ + SAML
+ + "SubjectConfirmationData";
+/** Xpath expression to the PersonData:Person element */
+ private static final String PERSON_XPATH =
+ SAML_SUBJECT_CONFIRMATION_DATA_XPATH + "/" + PDATA + "Person";
+ /** Xpath expression to the SAML:Attribute element */
+ private static final String ATTRIBUTE_XPATH =
+ ROOT + SAML + "AttributeStatement/" + SAML + "Attribute";
+ /** Xpath expression to the SAML:AttributeName attribute */
+ private static final String ATTRIBUTE_NAME_XPATH =
+ ROOT + SAML + "AttributeStatement/" + SAML + "Attribute/@AttributeName";
+ /** Xpath expression to the SAML:AttributeNamespace attribute */
+ private static final String ATTRIBUTE_NAMESPACE_XPATH =
+ ROOT
+ + SAML
+ + "AttributeStatement/"
+ + SAML
+ + "Attribute/@AttributeNamespace";
+ /** Xpath expression to the SAML:AttributeValue element */
+ private static final String ATTRIBUTE_VALUE_XPATH =
+ ROOT
+ + SAML
+ + "AttributeStatement/"
+ + SAML
+ + "Attribute/"
+ + SAML
+ + "AttributeValue";
+
+ /** Singleton instance. <code>null</code>, if none has been created. */
+ private static IdentityLinkValidator instance;
+
+ /**
+ * Constructor for a singleton IdentityLinkValidator.
+ * @return a new IdentityLinkValidator instance
+ * @throws ValidateException if no instance can be created
+ */
+ public static synchronized IdentityLinkValidator getInstance()
+ throws ValidateException {
+ if (instance == null) {
+ instance = new IdentityLinkValidator();
+ }
+ return instance;
+ }
+
+ /**
+ * Method validate. Validates the {@link IdentityLink}
+ * @param identityLink The identityLink to validate
+ * @throws ValidateException on any validation error
+ */
+ public void validate(IdentityLink identityLink) throws ValidateException {
+
+ Element samlAssertion = identityLink.getSamlAssertion();
+ //Search the SAML:ASSERTION Object (A2.054)
+ if (samlAssertion == null) {
+ throw new ValidateException("validator.00", null);
+ }
+
+ // Check how many saml:Assertion/saml:AttributeStatement/
+ // saml:Subject/ saml:SubjectConfirmation/
+ // saml:SubjectConfirmationData/pr:Person of type
+ // PhysicalPersonType exist (A2.056)
+ NodeList nl = XPathUtils.selectNodeList(samlAssertion, PERSON_XPATH);
+ // If we have just one Person-Element we don't need to check the attributes
+ int counterPhysicalPersonType = 0;
+ if (nl.getLength() > 1)
+ for (int i = 0; i < nl.getLength(); i++) {
+ String xsiType =
+ ((Element) nl.item(i))
+ .getAttributeNodeNS(
+ "http://www.w3.org/2001/XMLSchema-instance",
+ "type")
+ .getNodeValue();
+ // We have to check if xsiType contains "PhysicalPersonType"
+ // An equal-check will fail because of the Namespace-prefix of the attribute value
+ if (xsiType.indexOf("PhysicalPersonType") > -1)
+ counterPhysicalPersonType++;
+ }
+ if (counterPhysicalPersonType > 1)
+ throw new ValidateException("validator.01", null);
+
+ //Check the SAML:ATTRIBUTES
+ nl = XPathUtils.selectNodeList(samlAssertion, ATTRIBUTE_XPATH);
+ for (int i = 0; i < nl.getLength(); i++) {
+ String attributeName =
+ XPathUtils.getAttributeValue(
+ (Element) nl.item(i),
+ "@AttributeName",
+ null);
+ String attributeNS =
+ XPathUtils.getAttributeValue(
+ (Element) nl.item(i),
+ "@AttributeNamespace",
+ null);
+ if (attributeName.equals("CitizenPublicKey")) {
+
+ if (attributeNS.equals("http://www.buergerkarte.at/namespaces/personenbindung/20020506#") ||
+ attributeNS.equals("urn:publicid:gv.at:namespaces:identitylink:1.2")) {
+ Element attributeValue =
+ (Element) XPathUtils.selectSingleNode((Element) nl.item(i),nSMap, SAML + "AttributeValue/" + DSIG + "RSAKeyValue");
+ if (attributeValue==null)
+ attributeValue =
+ (Element) XPathUtils.selectSingleNode((Element)nl.item(i), nSMap, SAML + "AttributeValue/" + ECDSA + "ECDSAKeyValue");
+ if (attributeValue==null)
+ attributeValue =
+ (Element) XPathUtils.selectSingleNode((Element)nl.item(i), nSMap, SAML + "AttributeValue/" + DSIG + "DSAKeyValue");
+ if (attributeValue == null)
+ throw new ValidateException("validator.02", null);
+
+ }
+ else
+ throw new ValidateException("validator.03", new Object [] {attributeNS} );
+ }
+ else
+ throw new ValidateException("validator.04", new Object [] {attributeName} );
+ }
+
+ //Check if dsig:Signature exists
+ Element dsigSignature = (Element) XPathUtils.selectSingleNode(samlAssertion,ROOT + DSIG + "Signature");
+ if (dsigSignature==null) throw new ValidateException("validator.05", new Object[] {"in der Personenbindung"});
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/InfoboxValidator.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/InfoboxValidator.java
new file mode 100644
index 000000000..e6b05d852
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/InfoboxValidator.java
@@ -0,0 +1,96 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.validator;
+
+import java.util.Map;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.id.auth.data.InfoboxValidationResult;
+import at.gv.egovernment.moa.id.auth.data.InfoboxValidatorParams;
+
+/**
+ * Validates an InfoboxReadResponse.
+ * An implementing class has to validate the content of the InfoboxReadResponse
+ * according to the type specific rules and guidelines of the underlying
+ * application.
+ */
+public interface InfoboxValidator {
+
+ /**
+ * This method validates an InfoboxReadResponse.
+ * The method validates the content of the passed <code>infoboxReadResponse</code>
+ * according to the type specific rules and guidelines of the underlying
+ * application.
+ *
+ * @param params {@link at.gv.egovernment.moa.id.auth.data.InfoboxValidatorParams
+ * Parameters} needed by the validator.
+ *
+ * @return InfoboxValidationResult structure (@link at.gv.egovernment.moa.id.auth.data.InfoboxValidationResult}
+ *
+ * @throws ValidateException If an error occurs on validating the
+ * InfoboxReadResponse.
+ */
+ public InfoboxValidationResult validate (InfoboxValidatorParams params)
+ throws ValidateException;
+
+ /**
+ * This method is used to do intermediate processing before signing the auth block.
+ * If a infobox validator threw a form to gather user input, this method is used
+ * to validate this input. In no further input is needed the form must be empty to
+ * proceed, and also a valid <code>InfoboxValidationResult</code> is necessary.
+ * If more input is needed, the validator can build a new form and it is then shown
+ * to the citizen.
+ * The implementation of <code>InfoboxValidator</code> must hold its necessary
+ * data and configuration internally, if this method is called - the class is
+ * reused at this call
+ *
+ * @param parameters the parameters got returned by the input fields
+ *
+ * @return InfoboxValidationResult structure (@link at.gv.egovernment.moa.id.auth.data.InfoboxValidationResult}
+ *
+ * @throws ValidateException If an error occurs on validating the
+ * InfoboxReadResponse.
+ */
+ public InfoboxValidationResult validate (Map parameters)
+ throws ValidateException;
+
+ /**
+ * This method is used to do post processing after signing the auth block.
+ * The method validates the content of the <code>infoboxReadResponse</code
+ * against the passed <code>samlAssertion</code> if needed.
+ * The implementation of <code>InfoboxValidator</code> must hold its necessary
+ * data and configuration internally, if this method is called - the class is
+ * reused at this call
+ *
+ * @param samlAssertion the SAML assertion needed by the validator
+ *
+ * @return InfoboxValidationResult structure (@link at.gv.egovernment.moa.id.auth.data.InfoboxValidationResult}
+ *
+ * @throws ValidateException If an error occurs on validating the
+ * InfoboxReadResponse.
+ */
+ public InfoboxValidationResult validate (Element samlAssertion)
+ throws ValidateException;
+
+ /**
+ * form for user interaction for intermediate processing of infobox validation
+ *
+ * @return answer form of the servlet request.
+ */
+ public String getForm();
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/ValidateException.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/ValidateException.java
new file mode 100644
index 000000000..abb430450
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/ValidateException.java
@@ -0,0 +1,50 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.validator;
+
+import at.gv.egovernment.moa.id.MOAIDException;
+
+/**
+ * Exception thrown while validating an incoming XML structure
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class ValidateException extends MOAIDException {
+
+ /**
+ * Constructor for ValidateException.
+ * @param messageId
+ * @param parameters
+ */
+ public ValidateException(String messageId, Object[] parameters) {
+ super(messageId, parameters);
+ }
+
+ /**
+ * Constructor for ValidateException.
+ * @param messageId
+ * @param parameters
+ * @param wrapped
+ */
+ public ValidateException(
+ String messageId,
+ Object[] parameters,
+ Throwable wrapped) {
+ super(messageId, parameters, wrapped);
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/VerifyXMLSignatureResponseValidator.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/VerifyXMLSignatureResponseValidator.java
new file mode 100644
index 000000000..affa95c2b
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/VerifyXMLSignatureResponseValidator.java
@@ -0,0 +1,196 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.validator;
+
+import iaik.asn1.structures.Name;
+import iaik.security.ecc.ecdsa.ECPublicKey;
+import iaik.utils.RFC2253NameParserException;
+import iaik.x509.X509Certificate;
+import iaik.x509.X509ExtensionInitException;
+
+import java.security.PublicKey;
+import java.security.interfaces.RSAPublicKey;
+import java.util.List;
+
+import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants;
+import at.gv.egovernment.moa.id.auth.data.IdentityLink;
+import at.gv.egovernment.moa.id.auth.data.VerifyXMLSignatureResponse;
+import at.gv.egovernment.moa.id.util.MOAIDMessageProvider;
+import at.gv.egovernment.moa.logging.Logger;
+
+/**
+ * This class is used to validate an {@link VerifyXMLSignatureResponse}
+ * returned by MOA-SPSS
+ *
+ * @author Stefan Knirsch
+ * @version $Id$
+ */
+public class VerifyXMLSignatureResponseValidator {
+
+ /** Identification string for checking identity link */
+ public static final String CHECK_IDENTITY_LINK = "IdentityLink";
+ /** Identification string for checking authentication block */
+ public static final String CHECK_AUTH_BLOCK = "AuthBlock";
+
+ /** Singleton instance. <code>null</code>, if none has been created. */
+ private static VerifyXMLSignatureResponseValidator instance;
+
+ /**
+ * Constructor for a singleton VerifyXMLSignatureResponseValidator.
+ */
+ public static synchronized VerifyXMLSignatureResponseValidator getInstance()
+ throws ValidateException {
+ if (instance == null) {
+ instance = new VerifyXMLSignatureResponseValidator();
+ }
+ return instance;
+ }
+
+ /**
+ * Validates a {@link VerifyXMLSignatureResponse} returned by MOA-SPSS.
+ *
+ * @param verifyXMLSignatureResponse the <code>&lt;VerifyXMLSignatureResponse&gt;</code>
+ * @param identityLinkSignersSubjectDNNames subject names configured
+ * @param whatToCheck is used to identify whether the identityLink or the Auth-Block is validated
+ * @param ignoreManifestValidationResult specifies whether the validation result of the
+ * manifest has to be ignored (identityLink validation if
+ * the OA is a business service) or not
+ * @throws ValidateException on any validation error
+ */
+ public void validate(VerifyXMLSignatureResponse verifyXMLSignatureResponse,
+ List identityLinkSignersSubjectDNNames,
+ String whatToCheck,
+ boolean ignoreManifestValidationResult)
+ throws ValidateException {
+
+ if (verifyXMLSignatureResponse.getSignatureCheckCode() != 0)
+ throw new ValidateException("validator.06", null);
+
+ if (verifyXMLSignatureResponse.getCertificateCheckCode() != 0) {
+ String checkFailedReason ="";
+ if (verifyXMLSignatureResponse.getCertificateCheckCode() == 1)
+ checkFailedReason = MOAIDMessageProvider.getInstance().getMessage("validator.21", null);
+ if (verifyXMLSignatureResponse.getCertificateCheckCode() == 2)
+ checkFailedReason = MOAIDMessageProvider.getInstance().getMessage("validator.22", null);
+ if (verifyXMLSignatureResponse.getCertificateCheckCode() == 3)
+ checkFailedReason = MOAIDMessageProvider.getInstance().getMessage("validator.23", null);
+ if (verifyXMLSignatureResponse.getCertificateCheckCode() == 4)
+ checkFailedReason = MOAIDMessageProvider.getInstance().getMessage("validator.24", null);
+ if (verifyXMLSignatureResponse.getCertificateCheckCode() == 5)
+ checkFailedReason = MOAIDMessageProvider.getInstance().getMessage("validator.25", null);
+
+ if (whatToCheck.equals(CHECK_IDENTITY_LINK))
+ throw new ValidateException("validator.07", new Object[] { checkFailedReason } );
+ else
+ throw new ValidateException("validator.19", new Object[] { checkFailedReason } );
+ }
+
+ if (ignoreManifestValidationResult) {
+ Logger.debug("OA type is business service, thus ignoring DSIG manifest validation result");
+ } else {
+ if (verifyXMLSignatureResponse.isXmlDSIGManigest())
+ if (verifyXMLSignatureResponse.getXmlDSIGManifestCheckCode() != 0)
+ throw new ValidateException("validator.08", null);
+ }
+
+
+ // Check the signature manifest only when verifying the signed AUTHBlock
+ if (whatToCheck.equals(CHECK_AUTH_BLOCK)) {
+ if (verifyXMLSignatureResponse.getSignatureManifestCheckCode() > 0) {
+ throw new ValidateException("validator.50", null);
+ }
+ }
+
+ //Check whether the returned X509 SubjectName is in the MOA-ID configuration or not
+ if (identityLinkSignersSubjectDNNames != null) {
+ String subjectDN = "";
+ X509Certificate x509Cert = verifyXMLSignatureResponse.getX509certificate();
+ try {
+ subjectDN = ((Name) x509Cert.getSubjectDN()).getRFC2253String();
+ }
+ catch (RFC2253NameParserException e) {
+ throw new ValidateException("validator.17", null);
+ }
+ System.out.println("subjectDN: " + subjectDN);
+ // check the authorisation to sign the identity link
+ if (!identityLinkSignersSubjectDNNames.contains(subjectDN)) {
+ // subject DN check failed, try OID check:
+ try {
+ if (x509Cert.getExtension(MOAIDAuthConstants.IDENTITY_LINK_SIGNER_OID) == null) {
+ throw new ValidateException("validator.18", new Object[] { subjectDN });
+ } else {
+ Logger.debug("Identity link signer cert accepted for signing identity link: " +
+ "subjectDN check failed, but OID check successfully passed.");
+ }
+ } catch (X509ExtensionInitException e) {
+ throw new ValidateException("validator.49", null);
+ }
+ } else {
+ Logger.debug("Identity link signer cert accepted for signing identity link: " +
+ "subjectDN check successfully passed.");
+ }
+
+ }
+ }
+
+ /**
+ * Method validateCertificate.
+ * @param verifyXMLSignatureResponse The VerifyXMLSignatureResponse
+ * @param idl The Identitylink
+ * @throws ValidateException
+ */
+ public void validateCertificate(
+ VerifyXMLSignatureResponse verifyXMLSignatureResponse,
+ IdentityLink idl)
+ throws ValidateException {
+
+ X509Certificate x509Response = verifyXMLSignatureResponse.getX509certificate();
+ PublicKey[] pubKeysIdentityLink = (PublicKey[]) idl.getPublicKey();
+
+ PublicKey pubKeySignature = x509Response.getPublicKey();
+
+ boolean found = false;
+ for (int i = 0; i < pubKeysIdentityLink.length; i++) {
+
+ //compare RSAPublicKeys
+ if ((idl.getPublicKey()[i] instanceof java.security.interfaces.RSAPublicKey) &&
+ (pubKeySignature instanceof java.security.interfaces.RSAPublicKey)) {
+
+ RSAPublicKey rsaPubKeySignature = (RSAPublicKey) pubKeySignature;
+ RSAPublicKey rsakey = (RSAPublicKey) pubKeysIdentityLink[i];
+
+ if (rsakey.getModulus().equals(rsaPubKeySignature.getModulus())
+ && rsakey.getPublicExponent().equals(rsaPubKeySignature.getPublicExponent()))
+ found = true;
+ }
+
+ //compare ECDSAPublicKeys
+ if((idl.getPublicKey()[i] instanceof iaik.security.ecc.ecdsa.ECPublicKey) &&
+ (pubKeySignature instanceof iaik.security.ecc.ecdsa.ECPublicKey)) {
+
+ ECPublicKey ecdsaPubKeySignature = (ECPublicKey) pubKeySignature;
+ ECPublicKey ecdsakey = (ECPublicKey) pubKeysIdentityLink[i];
+
+ if(ecdsakey.equals(ecdsaPubKeySignature))
+ found = true;
+ }
+ }
+
+ if (!found)
+ throw new ValidateException("validator.09", null);
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepInputProcessor.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepInputProcessor.java
new file mode 100644
index 000000000..5fb30d1ed
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepInputProcessor.java
@@ -0,0 +1,83 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.validator.parep;
+
+import java.util.Map;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.id.auth.data.InfoboxValidationResult;
+import at.gv.egovernment.moa.id.auth.data.InfoboxValidatorParams;
+import at.gv.egovernment.moa.id.auth.validator.ValidateException;
+import at.gv.egovernment.moa.id.auth.validator.parep.client.szrgw.CreateMandateRequest;
+import at.gv.egovernment.moa.id.auth.validator.parep.config.ParepConfiguration;
+
+/**
+ * Input processor for infobox validators.
+ */
+public interface ParepInputProcessor {
+
+ /**
+ * Initialize user input processing. This function must initialize the
+ * processor to remember its state. Fixed values for the current authentication
+ * session are set here.
+ *
+ * @param representationID The id of the provided standardized mandate
+ * @param parepConfiguration The configuration of the party representation validator
+ * @param rpFamilyName The family name of the representative
+ * @param rpGivenName
+ * @param rpDateOfBirth
+ * @param request CreateMandateRequest containing the representative and the mandator
+ */
+
+ public void initialize(
+ String representationID, ParepConfiguration parepConfiguration,
+ String rpFamilyName, String rpGivenName, String rpDateOfBirth,
+ CreateMandateRequest request);
+
+ /**
+ * Starting point of user input processing. This function must initialize the
+ * processor and remember its state.
+ *
+ * @param physical Is person a physical person selected
+ * @param familyName The family name of the mandator
+ * @param givenName
+ * @param dateOfBirth
+ * @param streetName The address of the physical person
+ * @param buildingNumber
+ * @param unit
+ * @param postalCode
+ * @param municipality
+ * @param cbFullName
+ * @param cbIdentificationType
+ * @param cbIdentificationValue
+ * @return The initial user input form
+ */
+ public String start(
+ boolean physical, String familyName, String givenName, String dateOfBirth,
+ String streetName, String buildingNumber, String unit, String postalCode, String municipality,
+ String cbFullName, String cbIdentificationType, String cbIdentificationValue);
+
+ /**
+ * Validation after the user submitted form
+ *
+ * @param parameters Returned input field values
+ * @param extErrortext Error text from SZR-gateway to throw error page or form to correct user input data
+ * @return User input form if needed, or empty form if everything is ok with the user input. Returns null on error.
+ */
+ public String validate(Map parameters, String extErrortext);
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepInputProcessorImpl.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepInputProcessorImpl.java
new file mode 100644
index 000000000..6d46a9a1a
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepInputProcessorImpl.java
@@ -0,0 +1,314 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+/**
+ *
+ */
+package at.gv.egovernment.moa.id.auth.validator.parep;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Map;
+
+import at.gv.egovernment.moa.id.auth.validator.parep.client.szrgw.CreateMandateRequest;
+import at.gv.egovernment.moa.id.auth.validator.parep.client.szrgw.SZRGWClientException;
+import at.gv.egovernment.moa.id.auth.validator.parep.config.ParepConfiguration;
+import at.gv.egovernment.moa.logging.Logger;
+
+/**
+ * Implements the standard party representation infobox validator input processor
+ *
+ * @author <a href="mailto:peter.danner@egiz.gv.at">Peter Danner</a>
+ *
+ */
+public class ParepInputProcessorImpl implements ParepInputProcessor{
+
+ /** the requested representation ID (currently * or OID) */
+ private String representationID;
+
+ /** contains the configuration of the owning validator */
+ private ParepConfiguration parepConfiguration;
+
+ /** Family name of the representative */
+ private String rpFamilyName;
+
+ /** Given name of the representative */
+ private String rpGivenName;
+
+ /** The representatives date of birth */
+ private String rpDateOfBirth;
+
+ /** The current CreateMandateRequest to the SZR-gateway */
+ private CreateMandateRequest request;
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see at.gv.egovernment.moa.id.auth.validator.parep.ParepInputProcessor#initialize(String, ParepConfiguration, String, String, String, CreateMandateRequest)
+ */
+ public void initialize(
+ String representationID, ParepConfiguration parepConfiguration,
+ String rpFamilyName, String rpGivenName, String rpDateOfBirth,
+ CreateMandateRequest request)
+ {
+ // Initialization
+ this.representationID = representationID;
+ this.parepConfiguration = parepConfiguration;
+ this.rpFamilyName = rpFamilyName;
+ this.rpGivenName = rpGivenName;
+ this.rpDateOfBirth = rpDateOfBirth;
+ this.request = request;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see at.gv.egovernment.moa.id.auth.validator.parep.ParepInputProcessor#start(boolean, String, String, String, String, String, String, String, String, String, String, String)
+ */
+ public String start(
+ boolean physical, String familyName, String givenName, String dateOfBirth,
+ String streetName, String buildingNumber, String unit, String postalCode, String municipality,
+ String cbFullName, String cbIdentificationType, String cbIdentificationValue)
+ {
+ // Load the form
+ String form = loadForm(
+ physical, familyName, givenName, dateOfBirth,
+ streetName, buildingNumber, unit, postalCode, municipality,
+ cbFullName, cbIdentificationType, cbIdentificationValue, "");
+ try {
+ request.setMandator(familyName, givenName, dateOfBirth, postalCode, municipality, streetName, buildingNumber, unit, physical, cbFullName,
+ cbIdentificationType, cbIdentificationValue);
+ } catch (SZRGWClientException e) {
+ //e.printStackTrace();
+ Logger.info(e);
+ return null;
+ }
+ return form;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see at.gv.egovernment.moa.id.auth.validator.parep.ParepInputProcessor#validate(Map, String)
+ */
+ public String validate(Map parameters, String extErrortext)
+ {
+
+ // Process the gotten parameters
+ String form = null;
+ boolean formNecessary = false;
+ if (!ParepUtils.isEmpty(extErrortext)) formNecessary = true;
+ String locErrortext = "Folgende Parameter fehlen: ";
+
+ String familyName = (String) parameters.get("familyname_");
+ if (null == familyName) familyName ="";
+ String givenName = (String) parameters.get("givenname_");
+ if (null == givenName) givenName ="";
+ boolean physical = "true".equals(parameters.get("physical_"));
+ String dobday = (String) parameters.get("dobday_");
+ if (null!=dobday && dobday.equalsIgnoreCase("TT")) dobday="";
+ String dobmonth = (String) parameters.get("dobmonth_");
+ if (null!=dobmonth && dobmonth.equalsIgnoreCase("MM")) dobmonth="";
+ String dobyear = (String) parameters.get("dobyear_");
+ if (null!=dobyear && dobyear.equalsIgnoreCase("JJJJ")) dobyear="";
+ String dateOfBirth = "";
+ dobyear = (" ".substring(0, 4-dobyear.length()) + dobyear);
+ dobmonth = (" ".substring(0, 2-dobmonth.length()) + dobmonth);
+ dobday = (" ".substring(0, 2-dobday.length()) + dobday);
+ dateOfBirth = dobyear + "-" + dobmonth + "-" + dobday;
+ String cbFullName = (String) parameters.get("fullname_");
+ if (null == cbFullName) cbFullName ="";
+ String cbIdentificationType = (String) parameters.get("cbidentificationtype_");
+ if (null == cbIdentificationType) cbIdentificationType ="";
+ String cbIdentificationValue = (String) parameters.get("cbidentificationvalue_");
+ if (null == cbIdentificationValue) cbIdentificationValue ="";
+ String postalCode = (String) parameters.get("postalcode_");
+ if (null == postalCode) postalCode ="";
+ String municipality = (String) parameters.get("municipality_");
+ if (null == municipality) municipality ="";
+ String streetName = (String) parameters.get("streetname_");
+ if (null == streetName) streetName ="";
+ String buildingNumber = (String) parameters.get("buildingnumber_");
+ if (null == buildingNumber) buildingNumber ="";
+ String unit = (String) parameters.get("unit_");
+ if (null == unit) unit ="";
+
+ if (physical) {
+ if (ParepUtils.isEmpty(familyName)) {
+ formNecessary = true;
+ locErrortext = locErrortext + "Familienname";
+ }
+ if (ParepUtils.isEmpty(givenName)) {
+ formNecessary = true;
+ if (!locErrortext.endsWith(": ")) locErrortext = locErrortext + ", ";
+ locErrortext = locErrortext + "Vorname";
+ }
+ // Auf existierendes Datum prüfen
+ SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+ format.setLenient(false); // Wir wollen keine künstliche Pareserintelligenz, nur Datum prüfen
+ try {
+ format.parse(dateOfBirth);
+ }
+ catch(ParseException pe)
+ {
+ formNecessary = true;
+ if (!locErrortext.endsWith("fehlen: ")) locErrortext = locErrortext + ", ";
+ locErrortext = locErrortext + "korrektes Geburtsdatum";
+ }
+ } else {
+ if (ParepUtils.isEmpty(cbFullName) || ParepUtils.isEmpty(cbIdentificationType) || ParepUtils.isEmpty(cbIdentificationValue)) {
+ formNecessary = true;
+ if (ParepUtils.isEmpty(cbFullName)) {
+ locErrortext = locErrortext + "Name der Organisation";
+ }
+ if (ParepUtils.isEmpty(cbIdentificationType)) {
+ if (!locErrortext.endsWith("fehlen: ")) locErrortext = locErrortext + ", ";
+ locErrortext = locErrortext + "Auswahl des Registers";
+ }
+ if (ParepUtils.isEmpty(cbIdentificationValue)) {
+ if (!locErrortext.endsWith("fehlen: ")) locErrortext = locErrortext + ", ";
+ locErrortext = locErrortext + "Ordnungsnummer im ausgewählten Register";
+ }
+ }
+ }
+ try {
+ request.setMandator(familyName, givenName, dateOfBirth, postalCode, municipality, streetName, buildingNumber, unit, physical, cbFullName,
+ cbIdentificationType, cbIdentificationValue);
+ if (formNecessary) {
+ // Daten noch nicht vollständig oder anderer Fehler
+ if (locErrortext.endsWith("fehlen: ")) locErrortext ="";
+ String error = "";
+ if (!ParepUtils.isEmpty(extErrortext)) {
+ error = extErrortext;
+ if (!ParepUtils.isEmpty(locErrortext)) error = error + "; ";
+ }
+ if (!ParepUtils.isEmpty(locErrortext)) error = error + locErrortext;
+ if (!ParepUtils.isEmpty(error)) {
+ error = "<div class=\"errortext\"> <img alt=\"Rufezeichen\" src=\"img/rufezeichen.gif\" width=\"10\" height=\"16\" />&nbsp; " + error + "</div>";
+ }
+ form = loadForm(physical, familyName, givenName, dateOfBirth, streetName, buildingNumber, unit, postalCode, municipality, cbFullName, cbIdentificationType, cbIdentificationValue, error);
+ if (form == null) {
+ return null;
+ }
+ } else {
+ return ""; // everything is ok
+ }
+ } catch (Exception e) {
+ //e.printStackTrace();
+ Logger.info(e);
+ return null;
+ }
+ return form;
+ }
+
+ /**
+ * Loads the empty user input form and replaces tag occurences with given variables
+ *
+ * @param physical
+ * @param familyName
+ * @param givenName
+ * @param dateOfBirth
+ * @param streetName
+ * @param buildingNumber
+ * @param unit
+ * @param postalCode
+ * @param municipality
+ * @param cbFullName
+ * @param cbIdentificationType
+ * @param cbIdentificationValue
+ * @param errorText
+ * @return
+ */
+ private String loadForm(
+ boolean physical, String familyName, String givenName, String dateOfBirth,
+ String streetName, String buildingNumber, String unit, String postalCode, String municipality,
+ String cbFullName, String cbIdentificationType, String cbIdentificationValue, String errorText)
+ {
+ String form = "";
+ try {
+ String fileName = parepConfiguration.getInputProcessorTemplate(representationID);
+ InputStream instream = null;
+ File file = new File(fileName);
+ if (file.exists()) {
+ //if this resolves to a file, load it
+ instream = new FileInputStream(fileName);
+ } else {
+ fileName = parepConfiguration.getFullDirectoryName(fileName);
+ if (fileName.startsWith("file:\\")) fileName = fileName.substring(6);
+ file = new File(fileName);
+ if (file.exists()) {
+ //if this resolves to a file, load it
+ instream = new FileInputStream(fileName);
+ } else {
+ //else load a named resource in our classloader.
+ instream = this.getClass().getResourceAsStream(parepConfiguration.getInputProcessorTemplate(representationID));
+ if (instream == null) {
+ Logger.error("Form Prozessor Input Template \"" + fileName + "\" fehlt");
+ return null;
+ }
+ }
+ }
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ ParepUtils.dumpInputOutputStream(instream, bos);
+ form = bos.toString("UTF-8");
+ } catch(Exception e) {
+ Logger.error("Fehler beim Einlesen des Input-Templates.", e);
+ }
+
+ if (!ParepUtils.isEmpty(form)) {
+ boolean cbEnabled = parepConfiguration.isRepresentingCorporateParty(representationID);
+ boolean physEnabled = parepConfiguration.isRepresentingPhysicalParty(representationID);
+ boolean reducedSelection = (!physEnabled || !cbEnabled);
+ if (reducedSelection) {
+ physical = !cbEnabled;//wird somit umgesetzt falls jur. Person nicht vetretbar
+ }
+ if (ParepUtils.isEmpty(dateOfBirth)) dateOfBirth = "JJJJ-MM-TT";
+ form = ParepUtils.replaceAll(form, "<rpgivenname>", rpGivenName);
+ form = ParepUtils.replaceAll(form, "<rpfamilyname>", rpFamilyName);
+ form = ParepUtils.replaceAll(form, "<rpdobyear>", rpDateOfBirth.substring(0,4));
+ form = ParepUtils.replaceAll(form, "<rpdobmonth>", rpDateOfBirth.substring(5,7));
+ form = ParepUtils.replaceAll(form, "<rpdobday>", rpDateOfBirth.substring(8,10));
+ //darf zw. phys. und jur. Person gewählt werden:
+ //form = replaceAll(form, "seldisabled=\"\"", reducedSelection ? "disabled=\"true\"" : "");
+ form = ParepUtils.replaceAll(form, "physdisabled=\"\"", physEnabled ? "" : "disabled=\"true\"");
+ form = ParepUtils.replaceAll(form, "physselected=\"\"", physical ? "checked=\"checked\"" : "");
+ form = ParepUtils.replaceAll(form, "<givenname>", givenName);
+ form = ParepUtils.replaceAll(form, "<familyname>", familyName);
+ form = ParepUtils.replaceAll(form, "<dobyear>", dateOfBirth.substring(0,4).trim());
+ form = ParepUtils.replaceAll(form, "<dobmonth>", dateOfBirth.substring(5,7).trim());
+ form = ParepUtils.replaceAll(form, "<dobday>", dateOfBirth.substring(8,10).trim());
+ form = ParepUtils.replaceAll(form, "<streetname>", streetName);
+ form = ParepUtils.replaceAll(form, "<buildingnumber>", buildingNumber);
+ form = ParepUtils.replaceAll(form, "<unit>", unit);
+ form = ParepUtils.replaceAll(form, "<postalcode>", postalCode);
+ form = ParepUtils.replaceAll(form, "<municipality>", municipality);
+ form = ParepUtils.replaceAll(form, "cbdisabled=\"\"", cbEnabled ? "" : "disabled=\"true\"");
+ form = ParepUtils.replaceAll(form, "<fullname>", cbFullName);
+ form = ParepUtils.replaceAll(form, "cbseldisabled=\"\"", cbEnabled ? "" : "disabled=\"disabled\"");
+ form = ParepUtils.replaceAll(form, "cbselected=\"\"", physical ? "" : "checked=\"checked\"");
+ form = ParepUtils.replaceAll(form, "fnselected=\"\"", cbIdentificationType.equals("urn:publicid:gv.at:baseid+XFN") ? "selected=\"selected\"" : "");
+ form = ParepUtils.replaceAll(form, "vrselected=\"\"", cbIdentificationType.equals("urn:publicid:gv.at:baseid+XVR") ? "selected=\"selected\"" : "");
+ form = ParepUtils.replaceAll(form, "ersbselected=\"\"", cbIdentificationType.equals("urn:publicid:gv.at:baseid+XERSB") ? "selected=\"selected\"" : "");
+ form = ParepUtils.replaceAll(form, "<cbidentificationvalue>", cbIdentificationValue);
+ form = ParepUtils.replaceAll(form, "<errortext>", errorText);
+ }
+ return form;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepUtils.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepUtils.java
new file mode 100644
index 000000000..51551834e
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepUtils.java
@@ -0,0 +1,733 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.validator.parep;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.apache.xml.serialize.OutputFormat;
+import org.apache.xml.serialize.XMLSerializer;
+import org.apache.xpath.XPathAPI;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.id.BuildException;
+import at.gv.egovernment.moa.id.ParseException;
+import at.gv.egovernment.moa.id.auth.builder.BPKBuilder;
+import at.gv.egovernment.moa.id.auth.validator.ValidateException;
+import at.gv.egovernment.moa.id.auth.validator.parep.client.szrgw.SZRGWClientException;
+import at.gv.egovernment.moa.id.auth.validator.parep.client.szrgw.SZRGWConstants;
+import at.gv.egovernment.moa.id.config.ConfigurationException;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.BoolUtils;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.StringUtils;
+
+/**
+ * This class implements a set of utility methods.
+ *
+ * @author <a href="mailto:peter.danner@egiz.gv.at">Peter Danner</a>
+ */
+public class ParepUtils {
+
+ /**
+ * Determines whether a string is null or empty
+ *
+ * @param str the string to check.
+ * @return <code>true</code> if the string is null or empty,
+ * <code>false</code> otherwise.
+ */
+ public static boolean isEmpty(String str) {
+ return str == null || "".equals(str);
+ }
+
+ /**
+ * Reads a XML document from an input stream (namespace-aware).
+ *
+ * @param is
+ * the input stream to read from.
+ * @return the read XML document.
+ * @throws SZRGWClientException
+ * if an error occurs reading the document from the input stream.
+ */
+ public static Document readDocFromIs(InputStream is) throws SZRGWClientException {
+ try {
+ DocumentBuilderFactory f = DocumentBuilderFactory.newInstance();
+ f.setNamespaceAware(true);
+ return f.newDocumentBuilder().parse(is);
+ } catch (Exception e) {
+ throw new SZRGWClientException(e);
+ }
+ }
+
+ /*
+ *
+ */
+ public static String extractRepresentativeID(Element mandate) throws ValidateException {
+ try {
+ Element nameSpaceNode = mandate.getOwnerDocument().createElement("NameSpaceNode");
+ nameSpaceNode.setAttribute("xmlns:md", SZRGWConstants.MANDATE_NS);
+ Node resultNode = XPathAPI.selectSingleNode(mandate, "//md:Mandate/attribute::MandateID", nameSpaceNode);
+ if (resultNode != null) {
+ // because following line is not ready for JDK 1.4.x we need to get the childnode;
+ // return resultNode.getTextContent();
+ Node textNode = resultNode.getFirstChild();
+ if (textNode != null) {
+ return textNode.getNodeValue();
+ }
+ }
+ return null;
+ } catch (Exception e) {
+ throw new ValidateException("validator.62", null);
+ }
+ }
+
+ // TODO: remove unreferenced
+
+ /**
+ * Dumps all bytes from an input stream to the given output stream.
+ *
+ * @param is
+ * the input stream to dump from.
+ * @param os
+ * the output stream to dump to.
+ * @throws IOException
+ * if an error occurs while dumping.
+ */
+ public static void dumpInputOutputStream(InputStream is, OutputStream os) throws IOException {
+ if (is == null) {
+ return;
+ }
+ int ch;
+ while ((ch = is.read()) != -1) {
+ os.write(ch);
+ }
+ }
+
+ /**
+ * Gets a string that represents the date a mandate was issued.
+ *
+ * @param mandate
+ * the mandate to extract the issuing date from.
+ * @return the issuing date of the given mandate.
+ * @throws SZRGWClientException
+ * if an exception occurs extracting the issuing date of the
+ * mandate.
+ */
+ public static String getMandateIssuedDate(Element mandate) throws SZRGWClientException {
+ try {
+ Element nameSpaceNode = mandate.getOwnerDocument().createElement("NameSpaceNode");
+ nameSpaceNode.setAttribute("xmlns:md", SZRGWConstants.MANDATE_NS);
+
+ Node dateNode = XPathAPI.selectSingleNode(mandate, "//md:Issued/md:Date/text()", nameSpaceNode);
+
+ if (dateNode == null) {
+ throw new Exception("Date in Mandate-Issued not found.");
+ }
+ return dateNode.getNodeValue();
+ } catch (Exception e) {
+ throw new SZRGWClientException(e);
+ }
+ }
+
+ /**
+ * Gets a string that represents the place a mandate was issued.
+ *
+ * @param mandate
+ * the mandate to extract the issuing place from.
+ * @return the issuing place of the given mandate.
+ * @throws SZRGWClientException
+ * if an exception occurs extracting the issuing place of the
+ * mandate.
+ */
+ public static String getMandateIssuedPlace(Element mandate) throws SZRGWClientException {
+ try {
+ Element nameSpaceNode = mandate.getOwnerDocument().createElement("NameSpaceNode");
+ nameSpaceNode.setAttribute("xmlns:md", SZRGWConstants.MANDATE_NS);
+
+ Node placeNode = XPathAPI.selectSingleNode(mandate, "//md:Issued/md:Place/text()", nameSpaceNode);
+
+ if (placeNode == null) {
+ throw new Exception("Place in Mandate-Issued not found.");
+ }
+ return placeNode.getNodeValue();
+ } catch (Exception e) {
+ throw new SZRGWClientException(e);
+ }
+ }
+
+ /**
+ * Extracts the textual description of the mandate.
+ *
+ * @param mandate
+ * the mandate to extract the textual description from.
+ * @return the textual description of the mandate.
+ * @throws SZRGWClientException
+ * if an exception occurs extracting the textual description.
+ */
+ public static String getMandateContent(Element mandate) throws SZRGWClientException {
+ try {
+ Element nameSpaceNode = mandate.getOwnerDocument().createElement("NameSpaceNode");
+ nameSpaceNode.setAttribute("xmlns:md", SZRGWConstants.MANDATE_NS);
+
+ Node contentNode = XPathAPI.selectSingleNode(mandate, "//md:SimpleMandateContent/md:TextualDescription/text()", nameSpaceNode);
+
+ if (contentNode == null) {
+ throw new Exception("Content in Mandate not found.");
+ }
+ return contentNode.getNodeValue();
+ } catch (Exception e) {
+ throw new SZRGWClientException(e);
+ }
+ }
+
+ /**
+ * Extracts the md:Mandator element from a XML mandate element.
+ *
+ * @param mandate
+ * the md:Mandate element to extract the md:Mandator from.
+ * @return the md:Mandator element.
+ * @throws SZRGWClientException
+ * if an error occurs extracting the md:Mandator element.
+ */
+ public static Element extractMandator(Element mandate) throws ParseException {
+ try {
+
+ Element nameSpaceNode = mandate.getOwnerDocument().createElement("NameSpaceNode");
+ nameSpaceNode.setAttribute("xmlns" + SZRGWConstants.MANDATE_POSTFIX, SZRGWConstants.MANDATE_NS);
+ Element mandator = (Element) XPathAPI.selectSingleNode(mandate, "//" + SZRGWConstants.MANDATE_PREFIX + SZRGWConstants.MANDATOR, nameSpaceNode);
+ if (mandator == null) {
+ // if we got the Mandator itself
+ if (mandate.getLocalName().equals(SZRGWConstants.MANDATOR)) return mandate;
+ }
+ if (mandator == null)
+ return null;
+ String nsPrefix = mandator.getPrefix();
+ String nsUri = mandator.getNamespaceURI();
+ Element mandatorClone = (Element) mandator.cloneNode(true);
+ mandatorClone.setAttribute("xmlns:" + nsPrefix, nsUri);
+ return mandatorClone;
+ } catch (Exception e) {
+ throw new ParseException(e.toString(), null);
+ }
+ }
+
+ /**
+ * Tells wether a mandator is a physical person or not.
+ *
+ * @param mandator
+ * the XML md:Mandator element to extract from.
+ * @return <code>true<code> if the mandator is a physical person, <code>false</code> otherwise.
+ */
+ public static boolean isPhysicalPerson(Element mandator) {
+ try {
+ Element nameSpaceNode = mandator.getOwnerDocument().createElement("NameSpaceNode");
+ nameSpaceNode.setAttribute("xmlns" + SZRGWConstants.PD_POSTFIX, Constants.PD_NS_URI);
+
+ String s = DOMUtils.serializeNode(mandator);
+
+ // check if physical person
+ Element physicalPerson = (Element) XPathAPI.selectSingleNode(mandator, "descendant-or-self::pr:PhysicalPerson", nameSpaceNode);
+
+
+ // Element physicalPerson = (Element)XPathAPI.selectSingleNode(mandator,
+ // "descendant-or-self::pr:CorporateBody", nameSpaceNode);
+ return physicalPerson != null;
+ } catch (Exception e) {
+ e.printStackTrace();
+ return false;
+ }
+ }
+
+ /**
+ * Extracts the <code>pr:PhysicalPerson</code> or <code>pr:CorporateBody</code>
+ * element from a XML mandate element.
+ *
+ * @param mandate
+ * the md:Mandate element to extract the person from.
+ * @return the <code>pr:PhysicalPerson</code> or <code>pr:CorporateBody</code> element.
+ * @throws ParseException
+ * if an error occurs extracting the element.
+ */
+ public static Element extractPersonOfMandate(Element mandate) throws ParseException {
+ try {
+
+ Element nameSpaceNode = mandate.getOwnerDocument().createElement("NameSpaceNode");
+ nameSpaceNode.setAttribute("xmlns" + SZRGWConstants.MANDATE_POSTFIX, SZRGWConstants.MANDATE_NS);
+ nameSpaceNode.setAttribute("xmlns" + SZRGWConstants.PD_POSTFIX, Constants.PD_NS_URI);
+ Element person = (Element) XPathAPI.selectSingleNode(mandate, "//" + SZRGWConstants.MANDATE_PREFIX + SZRGWConstants.MANDATOR + "/pr:PhysicalPerson", nameSpaceNode);
+ if (person == null) {
+ person = (Element) XPathAPI.selectSingleNode(mandate, "//" + SZRGWConstants.MANDATE_PREFIX + SZRGWConstants.MANDATOR + "/pr:CorporateBody", nameSpaceNode);
+ }
+ if (person == null) return null;
+ String nsPrefix = person.getPrefix();
+ String nsUri = person.getNamespaceURI();
+ Element personClone = (Element) person.cloneNode(true);
+ personClone.setAttribute("xmlns:" + nsPrefix, nsUri);
+ return personClone;
+ } catch (Exception e) {
+ //e.printStackTrace();
+ throw new ParseException(e.toString(), null);
+ }
+ }
+
+ /**
+ * Benerates the </code>pr:Person</code> element form a
+ * <code>pr:PhysicalPerson</code> or <code>pr:CorporateBody</code>
+ * element of a XML mandate element.
+ *
+ * @param mandate
+ * the md:Mandate element to extract the person from.
+ * @return the <code>pr:Person</code> element.
+ * @throws ParseException
+ * if an error occurs extracting the element.
+ */
+ public static Element extractPrPersonOfMandate(Element mandate) throws ParseException {
+
+ try {
+ Document document = ParepUtils.createEmptyDocument();
+ Element root = document.createElement(SZRGWConstants.PD_PREFIX + SZRGWConstants.PERSON);
+ root.setAttribute("xmlns" + SZRGWConstants.PD_POSTFIX, Constants.PD_NS_URI);
+ root.setAttribute("xmlns:" + Constants.XSI_PREFIX, Constants.XSI_NS_URI);
+
+ Element nameSpaceNode = mandate.getOwnerDocument().createElement("NameSpaceNode");
+ nameSpaceNode.setAttribute("xmlns" + SZRGWConstants.MANDATE_POSTFIX, SZRGWConstants.MANDATE_NS);
+ nameSpaceNode.setAttribute("xmlns" + SZRGWConstants.PD_POSTFIX, Constants.PD_NS_URI);
+ Element person = (Element) XPathAPI.selectSingleNode(mandate, "//"
+ + SZRGWConstants.MANDATE_PREFIX + SZRGWConstants.MANDATOR + "/" + SZRGWConstants.PD_PREFIX + SZRGWConstants.PHYSICALPERSON, nameSpaceNode);
+ if (person == null) {
+ person = (Element) XPathAPI.selectSingleNode(mandate, "//"
+ + SZRGWConstants.MANDATE_PREFIX + SZRGWConstants.MANDATOR + "/" + SZRGWConstants.PD_PREFIX + SZRGWConstants.CORPORATEBODY, nameSpaceNode);
+ }
+ if (person != null) {
+ root.setAttribute(Constants.XSI_PREFIX + ":type", SZRGWConstants.PD_PREFIX + person.getLocalName());
+ if (person != null) {
+ NodeList nl = person.getChildNodes();
+ for (int i = 0; i < nl.getLength(); i++) {
+ Node testNode = nl.item(i);
+ if (Node.ELEMENT_NODE == testNode.getNodeType()) {
+ root.appendChild(document.importNode(testNode, true));
+ }
+ }
+ }
+ }
+
+ return root;
+ } catch (Exception e) {
+ //e.printStackTrace();
+ throw new ParseException(e.toString(), null);
+ }
+ }
+
+ /**
+ * Extracts the name of the mandator as a string representation.
+ *
+ * @param mandator
+ * the XML md:Mandator element to extract from.
+ * @return the mandator name as a string.
+ */
+ public static String extractMandatorName(Element mandator) {
+ try {
+ Element nameSpaceNode = mandator.getOwnerDocument().createElement("NameSpaceNode");
+ nameSpaceNode.setAttribute("xmlns" + SZRGWConstants.PD_POSTFIX, Constants.PD_NS_URI);
+
+ // first check if physical person
+ Element name = (Element) XPathAPI.selectSingleNode(mandator, "descendant-or-self::pr:Name/pr:GivenName", nameSpaceNode);
+ if (name != null) {
+ String givenName = XPathAPI.selectSingleNode(mandator, "descendant-or-self::pr:Name/pr:GivenName/text()", nameSpaceNode).getNodeValue();
+ String familyName = XPathAPI.selectSingleNode(mandator, "descendant-or-self::pr:Name/pr:FamilyName/text()", nameSpaceNode).getNodeValue();
+
+ return givenName + " " + familyName;
+ }
+
+ // check if corporate body
+ Node fullName = XPathAPI.selectSingleNode(mandator, "descendant-or-self::pr:FullName/text()", nameSpaceNode);
+ if (fullName != null) {
+ return fullName.getNodeValue();
+ }
+ return "";
+ } catch (Exception e) {
+ //e.printStackTrace();
+ return "";
+ }
+ }
+
+ /**
+ * Extracts specific text of an element of a given md:Mandator element.
+ *
+ * @param mandator
+ * the XML md:Mandator to extract from.
+ * @return the resulting text of the mandator element.
+ */
+ public static String extractText(Element mandator, String xpath) {
+ try {
+ Element nameSpaceNode = mandator.getOwnerDocument().createElement("NameSpaceNode");
+ nameSpaceNode.setAttribute("xmlns" + SZRGWConstants.PD_POSTFIX, Constants.PD_NS_URI);
+
+ Node textNode = XPathAPI.selectSingleNode(mandator, xpath, nameSpaceNode);
+ if (textNode == null)
+ return null;
+ return textNode.getNodeValue();
+ } catch (Exception e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+ /**
+ * Extracts the date of birth of the mandator of a given md:Mandator element.
+ *
+ * @param mandator
+ * the XML md:Mandator to extract from.
+ * @return the dob of the mandator.
+ */
+ public static String extractMandatorDateOfBirth(Element mandator) {
+ try {
+ Element nameSpaceNode = mandator.getOwnerDocument().createElement("NameSpaceNode");
+ nameSpaceNode.setAttribute("xmlns" + SZRGWConstants.PD_POSTFIX, Constants.PD_NS_URI);
+
+ Node dobName = XPathAPI.selectSingleNode(mandator, "descendant-or-self::pr:DateOfBirth/text()", nameSpaceNode);
+ if (dobName == null)
+ return null;
+ return dobName.getNodeValue();
+ } catch (Exception e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+ /**
+ * Extracts the full name of the mandators corporate body of a given
+ * md:Mandator element.
+ *
+ * @param mandator
+ * the XML md:Mandator to extract from.
+ * @return the full name of the mandator.
+ */
+ public static String extractMandatorFullName(Element mandator) {
+ try {
+ Element nameSpaceNode = mandator.getOwnerDocument().createElement("NameSpaceNode");
+ nameSpaceNode.setAttribute("xmlns" + SZRGWConstants.PD_POSTFIX, Constants.PD_NS_URI);
+
+ Node fullName = XPathAPI.selectSingleNode(mandator, "descendant-or-self::pr:CorporateBody/pr:FullName/text()", nameSpaceNode);
+ if (fullName == null)
+ return null;
+ return fullName.getNodeValue();
+ } catch (Exception e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+ /**
+ * Extracts the identification value of the mandator of a given mandate.
+ *
+ * @param mandator
+ * the XML md:Mandator element.
+ * @return the identification value.
+ */
+ public static String extractMandatorWbpk(Element mandator) {
+ try {
+ Element nameSpaceNode = mandator.getOwnerDocument().createElement("NameSpaceNode");
+ nameSpaceNode.setAttribute("xmlns" + SZRGWConstants.PD_POSTFIX, Constants.PD_NS_URI);
+
+ Node idValue = XPathAPI.selectSingleNode(mandator, "descendant-or-self::pr:Identification/pr:Value/text()", nameSpaceNode);
+ if (idValue != null) {
+ return idValue.getNodeValue();
+ }
+ return "";
+ } catch (Exception e) {
+ e.printStackTrace();
+ return "";
+ }
+ }
+
+ /**
+ * Extracts the identification type of the mandator of a given mandate.
+ *
+ * @param mandator
+ * the XML md:Mandator element.
+ * @return the identification type.
+ */
+ public static String extractMandatorIdentificationType(Element mandator) {
+ try {
+ Element nameSpaceNode = mandator.getOwnerDocument().createElement("NameSpaceNode");
+ nameSpaceNode.setAttribute("xmlns" + SZRGWConstants.PD_POSTFIX, Constants.PD_NS_URI);
+
+ Node idType = XPathAPI.selectSingleNode(mandator, "descendant-or-self::pr:Identification/pr:Type/text()", nameSpaceNode);
+ if (idType != null) {
+ return idType.getNodeValue();
+ }
+ return "";
+ } catch (Exception e) {
+ e.printStackTrace();
+ return "";
+ }
+ }
+
+ /*
+ *
+ */
+ public static String getIdentification(Element personElement, String element) throws ParseException {
+ try {
+
+ Element nameSpaceNode = personElement.getOwnerDocument().createElement("NameSpaceNode");
+ nameSpaceNode.setAttribute("xmlns" + SZRGWConstants.PD_POSTFIX, Constants.PD_NS_URI);
+
+ return XPathAPI.selectSingleNode(personElement, "descendant-or-self::pr:Identification/pr:" + element + "/text()", nameSpaceNode)
+ .getNodeValue();
+ } catch (Exception e) {
+ throw new ParseException(e.toString(), null);
+ }
+ }
+
+ /*
+ *
+ */
+ private static Element extractRepresentative(Element mandate) throws SZRGWClientException {
+ try {
+ Element nameSpaceNode = mandate.getOwnerDocument().createElement("NameSpaceNode");
+ nameSpaceNode.setAttribute("xmlns:md", SZRGWConstants.MANDATE_NS);
+ Element mandator = (Element) XPathAPI.selectSingleNode(mandate, "//md:Representative/child::*[1]", nameSpaceNode);
+ String nsPrefix = mandator.getPrefix();
+ String nsUri = mandator.getNamespaceURI();
+
+ Element mandatorClone = (Element) mandator.cloneNode(true);
+ mandatorClone.setAttribute("xmlns:" + nsPrefix, nsUri);
+
+ return mandatorClone;
+ } catch (Exception e) {
+ throw new SZRGWClientException(e);
+ }
+ }
+
+ /**
+ * Serializes a XML element to a given output stream.
+ *
+ * @param element
+ * the XML element to serialize.
+ * @param out
+ * the output streamt o serialize to.
+ * @throws IOException
+ * if an I/O error occurs during serialization.
+ */
+ public static void serializeElement(Element element, OutputStream out) throws IOException {
+ OutputFormat format = new OutputFormat();
+ format.setOmitXMLDeclaration(true);
+ format.setEncoding("UTF-8");
+ format.setPreserveSpace(true);
+ XMLSerializer serializer = new XMLSerializer(new OutputStreamWriter(out, "UTF-8"), format);
+ serializer.serialize(element);
+ }
+
+ public static void serializeElementAsDocument(Element element, OutputStream out) throws IOException {
+ OutputFormat format = new OutputFormat();
+ format.setOmitXMLDeclaration(false);
+ format.setEncoding("UTF-8");
+ format.setPreserveSpace(true);
+ XMLSerializer serializer = new XMLSerializer(new OutputStreamWriter(out, "UTF-8"), format);
+ serializer.serialize(element);
+ }
+
+ public static void serializeElementWithoutEncoding(Element element, OutputStream out) throws IOException {
+ OutputFormat format = new OutputFormat();
+ format.setOmitXMLDeclaration(true);
+ format.setEncoding("UTF-8");
+ format.setPreserveSpace(true);
+ XMLSerializer serializer = new XMLSerializer(new OutputStreamWriter(out), format);
+ serializer.serialize(element);
+ }
+
+ public static void saveStringToFile(String str, File file) throws IOException {
+ FileOutputStream fos = new FileOutputStream(file);
+ fos.write(str.getBytes());
+ fos.flush();
+ fos.close();
+ }
+
+ public static void saveBytesToFile(byte[] str, File file) throws IOException {
+ FileOutputStream fos = new FileOutputStream(file);
+ fos.write(str);
+ fos.flush();
+ fos.close();
+ }
+
+ public static void saveElementToFile(Element elem, File file) throws IOException {
+ FileOutputStream fos = new FileOutputStream(file);
+ serializeElementWithoutEncoding(elem, fos);
+ fos.flush();
+ fos.close();
+ }
+
+ /**
+ * Creates an empty XML document.
+ *
+ * @return a newly created empty XML document.
+ * @throws SZRGWClientException
+ * if an error occurs creating the empty document.
+ */
+ public static Document createEmptyDocument() throws SZRGWClientException {
+ try {
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ factory.setNamespaceAware(true);
+ return factory.newDocumentBuilder().newDocument();
+ } catch (Exception e) {
+ throw new SZRGWClientException(e);
+ }
+ }
+
+
+ /**
+ * Tells if the Validator of an Infobox is enabled. If the corresponding application
+ * specific configuration element <code>EnableInfoboxValidator</code> is missing, a default value <code>true</code> is assumed
+ *
+ * @param applicationSpecificParams
+ * the XML element of the infobox configuration.
+ * @return the boolean value of the determination.
+ * @throws ConfigurationException
+ * if an error occurs reading the configuration.
+ */
+ public static boolean isValidatorEnabled(Element applicationSpecificParams) throws ConfigurationException {
+ try {
+ Element nameSpaceNode = applicationSpecificParams.getOwnerDocument().createElement("NameSpaceNode");
+ nameSpaceNode.setAttribute("xmlns:" + Constants.MOA_ID_CONFIG_PREFIX, Constants.MOA_ID_CONFIG_NS_URI);
+
+ //ParepUtils.serializeElement(applicationSpecificParams, System.out);
+ Node validatorEnabledNode = XPathAPI.selectSingleNode(applicationSpecificParams, Constants.MOA_ID_CONFIG_PREFIX
+ + ":EnableInfoboxValidator/text()", nameSpaceNode);
+ if (validatorEnabledNode != null) {
+ return BoolUtils.valueOf(validatorEnabledNode.getNodeValue());
+ }
+ return true;
+ } catch (Exception e) {
+ // e.printStackTrace();
+ throw new ConfigurationException("config.02", null);
+ }
+ }
+
+ /**
+ * Delivers a String with the description of the register which is described
+ * through the identification Type of a corporate body of the persondata schema
+ *
+ * @param identificationType
+ * the identification type.
+ * @return the register description.
+ */
+ public static String getRegisterString(String identificationType) {
+ String corporateBase = Constants.URN_PREFIX_BASEID + "+";
+ if (ParepUtils.isEmpty(identificationType) || !identificationType.startsWith(corporateBase)) return null;
+ String register = identificationType.substring(corporateBase.length());
+ if (ParepUtils.isEmpty(register)) return null;
+ if (register.equals("FN") || register.equals("XFN")) return "Firmenbuchnummer";
+ if (register.equals("VR") || register.equals("XZVR") || register.equals("XVR") || register.equals("ZVR")) return "Nummer im Vereinsregister";
+ if (register.equals("ERSB") || register.equals("XERSB")) return "Nummer im Ergänzungsregister für sonstige Betroffene";
+ return null;
+ }
+
+ /**
+ * Hides Stammzahlen in the given element
+ *
+ * @param hideElement The element where Stammzahlen should be replaced.
+ * @param businessApplication For decision whether to calc a bPK or wbPK.
+ * @param target Target for calculating a bPK.
+ * @param registerID Necessary string for calculating a wbPK (example <code>FN+4096i</code>).
+ * @param blank Switch for behaviour.
+ * <code>true</code> if Stammzahlen are blinded. All occurences will be replaced by empty strings.
+ * <code>false</code> calculates (w)bPKs and changes also the <code>pr:Identifivation/pr:Type</code> elements.
+ * @return The element where Stammzahlen are hidden.
+ */
+ public static Element HideStammZahlen(Element hideElement, boolean businessApplication, String target, String registerID, boolean blank)
+ throws BuildException {
+ try {
+ if (hideElement != null) {
+ Element nameSpaceNode = hideElement.getOwnerDocument().createElement("NameSpaceNode");
+ nameSpaceNode.setAttribute("xmlns" + SZRGWConstants.PD_POSTFIX, Constants.PD_NS_URI);
+ NodeList identifications = XPathAPI.selectNodeList(hideElement, "descendant-or-self::pr:Identification", nameSpaceNode);
+ for (int i = 0; i < identifications.getLength(); i++) {
+ Element identificationElement = (Element) identifications.item(i);
+ Node idTypeNode = XPathAPI.selectSingleNode(identificationElement, "descendant-or-self::pr:Identification/pr:Type/text()", nameSpaceNode);
+ if (idTypeNode != null && Constants.URN_PREFIX_BASEID.equals(idTypeNode.getNodeValue())) {
+ Node idValueNode = XPathAPI.selectSingleNode(identificationElement, "descendant-or-self::pr:Identification/pr:Value/text()", nameSpaceNode);
+ if (idValueNode == null || ParepUtils.isEmpty(idValueNode.getNodeValue())) {
+ Logger.error("HideStammZahlen: Problem beim Parsen des erhaltenen Elements - Value Element(-Inhalt) von pr:Identification nicht vorhanden.");
+ throw new BuildException("builder.02", null);
+ }
+ if (blank) {
+ idValueNode.setNodeValue("");
+ } else {
+ String idValue = idValueNode.getNodeValue();
+ if (businessApplication) {
+ // wbPK berechnen
+ idTypeNode.setNodeValue(Constants.URN_PREFIX_WBPK + "+" + registerID);
+ String bpkBase64 = new BPKBuilder().buildWBPK(idValueNode.getNodeValue(), registerID);
+ idValueNode.setNodeValue(bpkBase64);
+
+ } else {
+ // bPK berechnen
+ idTypeNode.setNodeValue(Constants.URN_PREFIX_BPK);
+ String bpkBase64 = new BPKBuilder().buildBPK(idValueNode.getNodeValue(), target);
+ idValueNode.setNodeValue(bpkBase64);
+ }
+ }
+ }
+ }
+ }
+ } catch (Exception e) {
+ throw new BuildException("builder.02", null);
+ }
+ return hideElement;
+ }
+
+ /**
+ * Replaces each substring of string <code>s</code> that matches the given
+ * <code>search</code> string by the given <code>replace</code> string.
+ *
+ * @param s The string where the replacement should take place.
+ * @param search The pattern that should be replaced.
+ * @param replace The string that should replace all each <code>search</code>
+ * string within <code>s</code>.
+ * @return A string where all occurrence of <code>search</code> are
+ * replaced with <code>replace</code>.
+ */
+ public static String replaceAll (String s, String search, String replace) {
+ if (replace==null) replace = "";
+ return StringUtils.replaceAll(s, search, replace);
+ }
+
+
+// public static void main(String[] args) throws Exception {
+// Document mandate = readDocFromIs(new FileInputStream("c:/Doku/work/Organwalter/schemas/Vertretung_OW_Max_Mustermann.xml"));
+// Document mandate = readDocFromIs(new FileInputStream("c:/mandator.xml"));
+// Document mandate = readDocFromIs(new FileInputStream("c:/vertetervollmacht_1.2.40.0.10.3.1.xml"));
+// Element mandatorElement = extractMandator(mandate.getDocumentElement());
+// System.out.println(extractMandatorName(mandatorElement));
+// System.out.println(extractMandatorDateOfBirth(mandatorElement));
+// System.out.println(extractMandatorWbpk(mandatorElement));
+// //serializeElement(mandatorElement, System.out);
+// serializeElement((extractPrPersonOfMandate(mandate.getDocumentElement())), System.out);
+// }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepValidator.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepValidator.java
new file mode 100644
index 000000000..9d5c0f7cf
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepValidator.java
@@ -0,0 +1,598 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.validator.parep;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants;
+import at.gv.egovernment.moa.id.auth.builder.BPKBuilder;
+import at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttribute;
+import at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttributeImpl;
+import at.gv.egovernment.moa.id.auth.data.InfoboxToken;
+import at.gv.egovernment.moa.id.auth.data.InfoboxValidationResult;
+import at.gv.egovernment.moa.id.auth.data.InfoboxValidationResultImpl;
+import at.gv.egovernment.moa.id.auth.data.InfoboxValidatorParams;
+import at.gv.egovernment.moa.id.auth.validator.InfoboxValidator;
+import at.gv.egovernment.moa.id.auth.validator.ValidateException;
+import at.gv.egovernment.moa.id.auth.validator.parep.client.szrgw.CreateMandateRequest;
+import at.gv.egovernment.moa.id.auth.validator.parep.client.szrgw.CreateMandateResponse;
+import at.gv.egovernment.moa.id.auth.validator.parep.client.szrgw.SZRGWClient;
+import at.gv.egovernment.moa.id.auth.validator.parep.client.szrgw.SZRGWClientException;
+import at.gv.egovernment.moa.id.auth.validator.parep.client.szrgw.SZRGWConstants;
+import at.gv.egovernment.moa.id.auth.validator.parep.config.ParepConfiguration;
+import at.gv.egovernment.moa.id.config.ConfigurationException;
+import at.gv.egovernment.moa.id.config.ConnectionParameter;
+import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
+import at.gv.egovernment.moa.id.util.SSLUtils;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.Constants;
+
+/**
+ * This class implements a MOA-ID Infobox Validator for validating
+ * a standardized XML mandate using the SZR-gateway.
+ *
+ * @author <a href="mailto:peter.danner@egiz.gv.at">Peter Danner
+ */
+public class ParepValidator implements InfoboxValidator {
+
+ /** activates debug settings */
+ private boolean PAREP_DEBUG = false;
+
+ /** contains the parameters the validator initially was called with */
+ private InfoboxValidatorParams params = null;
+
+ /** contains the configuration of the validator */
+ private ParepConfiguration parepConfiguration = null;
+
+ /** the requested representation ID (currently * or OID) */
+ private String representationID = null;
+
+ /** holds the information of the SZR-request */
+ private CreateMandateRequest request = null;
+
+ /** List of extended SAML attributes. */
+ private Vector extendedSamlAttributes = new Vector();
+
+ /** the class which processes the user input */
+ private ParepInputProcessor inputProcessor = null;
+
+ /** The form if user input is necessary */
+ private String form = null;
+
+ /** unspecified error of parep-validator (must not know more about)*/
+ private final static String COMMON_ERROR = "Es ist ein Fehler bei der Überprüfung für berufsmäßige Parteienvetretung aufgetreten";
+
+ /** Default class to gather remaining mandator data. */
+ public final static String PAREP_INPUT_PROCESSOR = "at.gv.egovernment.moa.id.auth.validator.parep.ParepInputProcessorImpl";
+
+ /** Default template to gather remaining mandator data. */
+ public final static String PAREP_INPUT_TEMPLATE = "/resources/templates/ParepMinTemplate.html";
+
+ /** kind of representation text in AUTH block*/
+ public final static String STANDARD_REPRESENTATION_TEXT = "berufsmäßige(r) Parteienvertreter(in)";
+
+ /** Names of the produced SAML-attributes. */
+ public final static String EXT_SAML_MANDATE_RAW = "Mandate";
+ public final static String EXT_SAML_MANDATE_NAME = "MandatorName";
+ public final static String EXT_SAML_MANDATE_DOB = "MandatorDateOfBirth";
+ public final static String EXT_SAML_MANDATE_WBPK = "MandatorWbpk";
+ public final static String EXT_SAML_MANDATE_REPRESENTATIONTYPE = "RepresentationType";
+ public final static String EXT_SAML_MANDATE_OIDTEXTUALDESCRIPTION = "OIDTextualDescription";
+
+ /** */
+ public final static String EXT_SAML_MANDATE_REPRESENTATIONTEXT = "Vollmachtsvertreter";
+
+ /** register and register number for non physical persons - the domain identifier for business applications*/
+ public final static String EXT_SAML_MANDATE_CB_BASE_ID = "MandatorDomainIdentifier";
+
+ /**
+ * Parses the XML configuration element and creates the validators configuration
+ * Use this function if you want to preconfigure the validator.
+ *
+ * @param configElem
+ * the XML configuration element to parse.
+ * @throws ConfigurationException
+ * if an error occurs during the configuration process
+ */
+ public void Configure(Element configElem) throws ConfigurationException {
+ if (this.parepConfiguration == null) {
+ Logger.debug("Lade Konfiguration.");
+ parepConfiguration = new ParepConfiguration(configElem);
+ Logger.debug("Konfiguration erfolgreich geladen.");
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see at.gv.egovernment.moa.id.auth.validator.InfoboxValidator#validate(at.gv.egovernment.moa.id.auth.data.InfoboxValidatorParams)
+ */
+ public InfoboxValidationResult validate(InfoboxValidatorParams params) throws ValidateException {
+
+ InfoboxValidationResultImpl validationResult = new InfoboxValidationResultImpl(false, null, null);
+
+ try {
+ Logger.debug("Starte Organwalter-/berufsmäßige Parteienvertreterprüfung.");
+ this.params = params;
+
+ Element mandate = extractPrimaryToken(this.params.getInfoboxTokenList());
+ // ParepUtils.serializeElement(mandate, System.out);
+ this.representationID = ParepUtils.extractRepresentativeID(mandate);
+ if (ParepUtils.isEmpty(representationID)) {
+ validationResult.setErrorMessage("Fehlende oder falsche MandateID in standardisierter Vollmacht");
+ return validationResult;
+ }
+
+ // Überprüfen der Identifikation (Type/Value).
+ String identificationType = this.params.getIdentificationType();
+ String identificationValue = this.params.getIdentificationValue();
+ if (this.params.getBusinessApplication()) {
+ if (representationID.startsWith(MOAIDAuthConstants.PARTY_ORGAN_REPRESENTATION_OID_NUMBER)) {
+ validationResult.setErrorMessage("Eine Vertretung durch Organwalter im privatwirtschaftlichen Bereich ist nicht vorgesehen.");
+ return validationResult;
+
+ } else {
+ Logger.debug("Parteienvertreter wird mit wbPK identifiziert");
+ }
+ } else {
+ if (representationID.startsWith(MOAIDAuthConstants.PARTY_ORGAN_REPRESENTATION_OID_NUMBER)) {
+ //Für Organwalter wird die Stammzahl zur Berechnung der Organwalter-bPK benötigt
+ if (!Constants.URN_PREFIX_BASEID.equals(this.params.getIdentificationType())) {
+ Logger.error("Für eine Vertretung durch Organwalter ist es notwendig dessen Stammzahl an das Stammzahlenregister-Gateway zu übermitteln. In der MOA-ID Konfiguration muss die Übermittlung Stammzahl aktiviert sein.");
+ validationResult.setErrorMessage("Die standardisierte Vollmacht wird von diesem Server nicht akzeptiert.");
+ return validationResult;
+ } else {
+ Logger.debug("Organwalter wird mit Stammzahl identifiziert");
+ }
+ } else {
+ if (Constants.URN_PREFIX_BASEID.equals(this.params.getIdentificationType())) {
+ // bPK berechnen, da dem SZR-Gateway das Target nicht bekannt ist
+ identificationType = Constants.URN_PREFIX_CDID;
+ String bpkBase64 = new BPKBuilder().buildBPK(this.params.getIdentificationValue(), this.params.getTarget());
+ identificationValue = bpkBase64;
+ Logger.debug("bPK für Parteienvertreter wurde berechnet. Parteienvertreter wird mit bPK identifiziert");
+ } else {
+ Logger.debug("Parteienvertreter wird mit bPK identifiziert");
+ }
+ }
+ }
+
+ Configure(this.params.getApplicationSpecificParams());
+ // check if we have a configured party representative for that
+ if (!parepConfiguration.isPartyRepresentative(representationID)) {
+ Logger.info("Kein berufsmäßiger Parteienvertreter für MandateID \"" + representationID + "\" konfiguriert.");
+ validationResult.setErrorMessage("Die standardisierte Vollmacht wird von diesem Server nicht akzeptiert.");
+ return validationResult;
+ }
+
+ // Vertreter
+ this.request = new CreateMandateRequest();
+ request.setRepresentative(this.params, identificationType, identificationValue);
+ // ParepUtils.serializeElement(request.getRepresentative(), System.out);
+ //ParepUtils.saveElementToFile(request.getRepresentative(), new File("c:/representative.xml"));
+
+ Logger.debug("Prüfe vorausgefüllte Daten...");
+ boolean physical = true;
+ String familyName = "";
+ String givenName = "";
+ String dateOfBirth = "";
+ String cbFullName = "";
+ String cbIdentificationType = "";
+ String cbIdentificationValue = "";
+ String postalCode = "";
+ String municipality = "";
+ String streetName = "";
+ String buildingNumber = "";
+ String unit = "";
+
+ boolean formNecessary = false;
+ // Vertretener (erstes Vorkommen)
+ Element mandator = ParepUtils.extractMandator(mandate);
+ if (mandator != null) {
+ // ParepUtils.serializeElement(mandator, System.out);
+ // ParepUtils.saveElementToFile(mandator, new File("c:/mandator.xml"));
+ if (ParepUtils.isPhysicalPerson(mandator)) {
+ familyName = ParepUtils.extractText(mandator, "descendant-or-self::pr:Name/pr:FamilyName/text()");
+ givenName = ParepUtils.extractText(mandator, "descendant-or-self::pr:Name/pr:GivenName/text()");
+ dateOfBirth = ParepUtils.extractMandatorDateOfBirth(mandator);
+ } else {
+ physical = false;
+ cbFullName = ParepUtils.extractMandatorFullName(mandator);
+ cbIdentificationType = ParepUtils.getIdentification(mandator, "Type");
+ cbIdentificationValue = ParepUtils.extractMandatorWbpk(mandator);
+ }
+ postalCode = ParepUtils.extractText(mandator, "descendant-or-self::pr:PostalAddress/pr:PostalCode/text()");
+ municipality = ParepUtils.extractText(mandator, "descendant-or-self::pr:PostalAddress/pr:Municipality/text()");
+ streetName = ParepUtils.extractText(mandator, "descendant-or-self::pr:PostalAddress/pr:DeliveryAddress/pr:StreetName/text()");
+ buildingNumber = ParepUtils.extractText(mandator, "descendant-or-self::pr:PostalAddress/pr:DeliveryAddress/pr:BuildingNumber/text()");
+ unit = ParepUtils.extractText(mandator, "descendant-or-self::pr:PostalAddress/pr:DeliveryAddress/pr:Unit/text()");
+
+ }
+ if (physical) {
+ if (!parepConfiguration.isRepresentingPhysicalParty(representationID)) {
+ validationResult.setErrorMessage("Vertretung von natürlichen Personen für diese standardisierte Vollmacht nicht erlaubt.");
+ return validationResult;
+ }
+ if (ParepUtils.isEmpty(familyName) || ParepUtils.isEmpty(givenName) || ParepUtils.isEmpty(dateOfBirth)) {
+ formNecessary = true;
+ }
+ } else {
+ if (!parepConfiguration.isRepresentingCorporateParty(representationID)) {
+ validationResult.setErrorMessage("Vertretung von juristischen Personen für diese standardisierte Vollmacht nicht erlaubt.");
+ return validationResult;
+ }
+ if (ParepUtils.isEmpty(cbFullName) || ParepUtils.isEmpty(cbIdentificationType) || ParepUtils.isEmpty(cbIdentificationValue)) {
+ formNecessary = true;
+ }
+ }
+
+ //Zeigen wir, dass die Daten übernommen wurden:
+ if (parepConfiguration.isAlwaysShowForm()) formNecessary=true;
+
+ // Input processor
+ this.form = "";
+ if (formNecessary) {
+ ParepInputProcessor inputProcessor= getInputProcessor();
+ this.form = inputProcessor.start(
+ physical, familyName, givenName, dateOfBirth, streetName, buildingNumber, unit, postalCode, municipality,
+ cbFullName, cbIdentificationType, cbIdentificationValue);
+ if (this.form == null) {
+ validationResult.setErrorMessage(ParepValidator.COMMON_ERROR);
+ return validationResult;
+ }
+ } else {
+ // Request vorbereiten mit vorgegebenen Daten
+ request.setMandator(familyName, givenName, dateOfBirth, postalCode, municipality, streetName, buildingNumber, unit, physical, cbFullName,
+ cbIdentificationType, cbIdentificationValue);
+ }
+
+
+ // ParepUtils.serializeElement(request.getMandator(), System.out);
+ // ParepUtils.saveElementToFile(request.getMandator(), new File("c:/mandator.xml"));
+
+ addAuthBlockExtendedSamlAttributes();
+ validationResult.setExtendedSamlAttributes(getExtendedSamlAttributes());
+ Logger.debug("Überprüfung der vertretenen Partei erfolgreich beendet");
+ validationResult.setValid(true);
+ return validationResult;
+ } catch (Exception e) {
+ e.printStackTrace();
+ Logger.info(e);
+ validationResult.setErrorMessage(ParepValidator.COMMON_ERROR);
+ return validationResult;
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see at.gv.egovernment.moa.id.auth.validator.InfoboxValidator#validate(java.util.Map)
+ */
+ public InfoboxValidationResult validate(Map parameters) throws ValidateException {
+
+ InfoboxValidationResultImpl validationResult = new InfoboxValidationResultImpl(false, null, null);
+ Logger.debug("Intermediate processing von Organwalter-/berufsmäßige Parteienvertreterprüfung");
+ Logger.debug("Prüfe im Formular ausgefüllte Daten...");
+ if (PAREP_DEBUG) Logger.debug("Got parameters from user input form: " + parameters.toString());
+
+ // Input processor
+ ParepInputProcessor inputProcessor= getInputProcessor();
+ this.form = inputProcessor.validate(parameters, null);
+ if (this.form == null) {
+ validationResult.setErrorMessage(ParepValidator.COMMON_ERROR);
+ return validationResult;
+ }
+
+ addAuthBlockExtendedSamlAttributes();
+ validationResult.setExtendedSamlAttributes(getExtendedSamlAttributes());
+ validationResult.setValid(true);
+ Logger.debug("Intermediate processing von Organwalter-/berufsmäßige Parteienvertreterprüfung erfolgreich beendet");
+ return validationResult;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see at.gv.egovernment.moa.id.auth.validator.InfoboxValidator#validate(org.w3c.dom.Element)
+ */
+ public InfoboxValidationResult validate(Element samlAssertion) throws ValidateException {
+
+ InfoboxValidationResultImpl validationResult = new InfoboxValidationResultImpl(false, null, null);
+ Logger.debug("Post processing von Organwalter-/berufsmäßige Parteienvertreterprüfung");
+ this.form = "";
+ try {
+
+ // TODO: Frage ob OID im Zertifikat zu prüfen ist (macht derzeit das SZR-gateway). Dies würde aber zu eine Performanceeinbuße führen.
+
+ request.setSignature(samlAssertion);
+
+//DPO debug
+// Element mandate = (ParepUtils.readDocFromIs(new FileInputStream("c:/vertetervollmacht_1.2.40.0.10.3.1_origin-fixed.xml"))).getDocumentElement();
+// String id = representationID;
+// CreateMandateResponse response;
+// if (true) {
+// if (this.params.getHideStammzahl()) {
+// if (PAREP_DEBUG) ParepUtils.saveElementToFile(mandate, new File("c:/vertetervollmacht_"+ id +"_origin.xml"));
+// // Achtung: Es wird hier nicht spezifikationskonform vorgegangen, damit im Kompatibilitätsmodus Personendaten ersetzt werden können.
+// // Würden die Stammzahlen gelöscht (geblindet) werden, würde der Identifikationswert des Vertretenen gänzlich fehlen.
+// // Im Falle einen business Anwendung berechnet MOA-ID nach Rückkehr das wbPK
+// ParepUtils.HideStammZahlen(mandate, this.params.getBusinessApplication(), this.params.getTarget(), this.params.getDomainIdentifier(), false);
+// }
+// if (PAREP_DEBUG) ParepUtils.saveElementToFile(mandate, new File("c:/vertetervollmacht_"+ id +".xml"));
+
+ //ParepUtils.serializeElement(request.toElement(), System.out);
+ if (PAREP_DEBUG) ParepUtils.saveElementToFile(request.toElement(), new File("c:/gwrequest.xml"));
+
+ // configure szrgw client
+ Logger.debug("Lade SZR-GW Client.");
+ SZRGWClient client = new SZRGWClient();
+ // System.out.println("Parameters: " + cfg.getConnectionParameters());
+ Logger.debug("Initialisiere Verbindung...");
+ ConnectionParameter connectionParameters = parepConfiguration.getConnectionParameters(representationID);
+ // Logger.debug("Connection Parameters: " + connectionParameters);
+ Logger.debug("SZR-GW URL: " + connectionParameters.getUrl());
+ client.setAddress(connectionParameters.getUrl());
+ if (connectionParameters.getUrl().toLowerCase().startsWith("https:")) {
+ Logger.debug("Initialisiere SSL Verbindung");
+ client.setSSLSocketFactory(SSLUtils.getSSLSocketFactory(AuthConfigurationProvider.getInstance(), connectionParameters));
+ }
+
+ Logger.debug("Starte Kommunikation mit dem Stammzahlenregister Gateway...");
+ CreateMandateResponse response;
+ Element requ = request.toElement();
+ try {
+ response = client.createMandateResponse(requ);
+ } catch (SZRGWClientException e) {
+ // give him a second try - Nach dem Starten des Tomcat wird beim ersten Mal das Client-Zertifikat offenbar vom HTTPClient nicht mitgeschickt.
+ client = new SZRGWClient(connectionParameters.getUrl());
+ if (connectionParameters.getUrl().toLowerCase().startsWith("https:")) client.setSSLSocketFactory(SSLUtils.getSSLSocketFactory(AuthConfigurationProvider.getInstance(), connectionParameters));
+ response = client.createMandateResponse(requ);
+ }
+ Logger.debug("SZR-Gateway Response Code: " + response.getResultCode()+ " " + response.getInfo()!=null ? response.getInfo():"");
+ if (response.getResultCode()==2000) {
+ if(response.getMandate()==null) {
+ Logger.error("Keine Vollmacht vom SZR-Gateway erhalten");
+ validationResult.setErrorMessage(ParepValidator.COMMON_ERROR);
+ return validationResult;
+ }
+
+
+ //DPO debug output (2lines)
+ String id = representationID;
+ if (id.equals("*")) id="standardisiert";
+
+ Element mandate = response.getMandate();
+ // Replace Stammzahlen
+ if (PAREP_DEBUG) ParepUtils.saveElementToFile(response.getMandate(), new File("c:/vertetervollmacht_"+ id +"_origin.xml"));
+ if (this.params.getHideStammzahl()) {
+ ParepUtils.HideStammZahlen(mandate, this.params.getBusinessApplication(), this.params.getTarget(), this.params.getDomainIdentifier(), false);
+ if (PAREP_DEBUG) ParepUtils.saveElementToFile(mandate, new File("c:/vertetervollmacht_"+ id +"_hideStammzahl.xml"));
+ }
+
+ extendedSamlAttributes.clear();
+ // Vollmacht
+ extendedSamlAttributes.add(new ExtendedSAMLAttributeImpl(ParepValidator.EXT_SAML_MANDATE_RAW, mandate, SZRGWConstants.MANDATE_NS, ExtendedSAMLAttribute.NOT_ADD_TO_AUTHBLOCK));
+
+ validationResult.setExtendedSamlAttributes(getExtendedSamlAttributes());
+ validationResult.setValid(true);
+ Logger.debug("Post processing von Organwalter-/berufsmäßige Parteienvertreterprüfung erfolgreich beendet");
+ } else {
+ String errorMsg = "Fehler " + response.getResultCode() + " bei Stammzahlenregister-Gateway Anfrage";
+ String responseInfo = response.getInfo();
+ if (response.getResultCode()>=4000 && response.getResultCode()<4999) {
+ if (!ParepUtils.isEmpty(responseInfo)) errorMsg = errorMsg + ": " + responseInfo;
+ validationResult.setErrorMessage(errorMsg);
+ } else if (response.getResultCode()>=5000 && response.getResultCode()<=5999) {
+ // Person not found
+ ParepInputProcessor inputProcessor= getInputProcessor();
+ switch (response.getResultCode()) {
+ case 5230:
+ errorMsg = "Keine mit den Eingaben &uuml;bereinstimmende Person vorhanden. Bitte erg&auml;nzen/&auml;ndern Sie ihre Angaben.";
+ break;
+ case 5231:
+ errorMsg = "Die Person konnte nicht eindeutig identifiziert werden. Es existieren mehrere Personen zu Ihrer Suchanfrage. Bitte erg&auml;nzen/&auml;ndern Sie ihre Angaben.";
+ break;
+ default:
+ if (!ParepUtils.isEmpty(responseInfo)) errorMsg = errorMsg + ": " + responseInfo;
+ }
+ this.form = inputProcessor.validate(generateParameters(), errorMsg);
+ if (this.form == null) {
+ validationResult.setErrorMessage(ParepValidator.COMMON_ERROR);
+ return validationResult;
+ }
+ validationResult.setValid(true);
+ } else {
+ // Do not inform the user too much
+ Logger.error(errorMsg);
+ validationResult.setErrorMessage(ParepValidator.COMMON_ERROR);
+ }
+
+ }
+ return validationResult;
+ } catch (Exception e) {
+ e.printStackTrace();
+ Logger.info(e);
+ validationResult.setErrorMessage(ParepValidator.COMMON_ERROR);
+ return validationResult;
+ }
+ }
+
+ /**
+ * provides the primary infobox token of the given list.
+ *
+ * @param infoBoxTokens
+ * the list of infobox tokens.
+ * @return
+ * the XML element of the primary token.
+ * @throws ValidateException
+ * if an error occurs or list is not suitable.
+ */
+ public static Element extractPrimaryToken(List infoBoxTokens) throws ValidateException {
+ if (infoBoxTokens == null || infoBoxTokens.size() == 0) {
+ throw new ValidateException("validator.62", null);
+ }
+ for (int i = 0; i < infoBoxTokens.size(); i++) {
+ InfoboxToken token = (InfoboxToken) infoBoxTokens.get(i);
+ if (token.isPrimary()) {
+ return token.getXMLToken();
+ }
+ }
+ throw new ValidateException("validator.62", null);
+ }
+
+ /*
+ * @see at.gv.egovernment.moa.id.auth.validator.InfoboxValidator#getExtendedSamlAttributes()
+ */
+ public ExtendedSAMLAttribute[] getExtendedSamlAttributes() {
+ ExtendedSAMLAttribute[] ret = new ExtendedSAMLAttribute[extendedSamlAttributes.size()];
+ extendedSamlAttributes.copyInto(ret);
+ Logger.debug("ParepValidator ExtendedSAML Attributes: " + ret.length);
+ return ret;
+ }
+
+
+ /**
+ * @return The next pending user input form, which is "" if no form is to be shown, and null on errors.
+ */
+ public String getForm() {
+ return this.form;
+ }
+
+ /**
+ * Gets the user form input processor (class) assigned to the current party representative
+ * If the method is called for the first time it initializes the input processor.
+ *
+ * @return The user form input processor
+ */
+ private ParepInputProcessor getInputProcessor() {
+
+ if (this.inputProcessor!=null) return inputProcessor;
+ String inputProcessorName = parepConfiguration.getInputProcessorClass(representationID);
+ ParepInputProcessor inputProcessor = null;
+ try {
+ Class inputProcessorClass = Class.forName(inputProcessorName);
+ inputProcessor= (ParepInputProcessor) inputProcessorClass.newInstance();
+ inputProcessor.initialize(representationID, parepConfiguration, this.params.getFamilyName(), this.params.getGivenName(), this.params.getDateOfBirth(), request);
+ } catch (Exception e) {
+ Logger.error("Could not load input processor class \"" + inputProcessorName + "\": " + e.getMessage());
+ }
+ this.inputProcessor = inputProcessor;
+ return inputProcessor;
+ }
+
+ /**
+ * Generates the parameter list, which is needed to simulate a return from
+ * an user form.
+ *
+ * @return the form parameters
+ */
+ private Map generateParameters() {
+ Map parameters = new HashMap();
+ boolean physical = true;
+ String familyName = "";
+ String givenName = "";
+ String dateOfBirth = "";
+ String cbFullName = "";
+ String cbIdentificationType = "";
+ String cbIdentificationValue = "";
+ String postalCode = "";
+ String municipality = "";
+ String streetName = "";
+ String buildingNumber = "";
+ String unit = "";
+
+ try {
+ // Vertretener (erstes Vorkommen)
+ Element mandator = request.getMandator();
+ if (mandator != null) {
+ if (ParepUtils.isPhysicalPerson(mandator)) {
+ familyName = ParepUtils.extractText(mandator, "descendant-or-self::pr:Name/pr:FamilyName/text()");
+ givenName = ParepUtils.extractText(mandator, "descendant-or-self::pr:Name/pr:GivenName/text()");
+ dateOfBirth = ParepUtils.extractMandatorDateOfBirth(mandator);
+ } else {
+ physical = false;
+ cbFullName = ParepUtils.extractMandatorFullName(mandator);
+ cbIdentificationType = ParepUtils.getIdentification(mandator, "Type");
+ cbIdentificationValue = ParepUtils.extractMandatorWbpk(mandator);
+ }
+ postalCode = ParepUtils.extractText(mandator, "descendant-or-self::pr:PostalAddress/pr:PostalCode/text()");
+ municipality = ParepUtils.extractText(mandator, "descendant-or-self::pr:PostalAddress/pr:Municipality/text()");
+ streetName = ParepUtils.extractText(mandator, "descendant-or-self::pr:PostalAddress/pr:DeliveryAddress/pr:StreetName/text()");
+ buildingNumber = ParepUtils.extractText(mandator, "descendant-or-self::pr:PostalAddress/pr:DeliveryAddress/pr:BuildingNumber/text()");
+ unit = ParepUtils.extractText(mandator, "descendant-or-self::pr:PostalAddress/pr:DeliveryAddress/pr:Unit/text()");
+ }
+ } catch (Exception e) {
+ Logger.error("Could not extract Mandator form SZR-gateway request");
+ }
+ parameters.put("familyname_", familyName);
+ parameters.put("givenname_", givenName);
+ parameters.put("dateofbirth_", dateOfBirth);
+ parameters.put("dobyear_", dateOfBirth.substring(0,4));
+ parameters.put("dobmonth_", dateOfBirth.substring(5,7));
+ parameters.put("dobday_", dateOfBirth.substring(8,10));
+ parameters.put("physical_", physical ? "true" : "false");
+ parameters.put("fullname_", cbFullName);
+ parameters.put("cbidentificationtype_", cbIdentificationType);
+ parameters.put("cbidentificationvalue_", cbIdentificationValue);
+ parameters.put("postalcode_", postalCode);
+ parameters.put("municipality_", municipality);
+ parameters.put("streetname_", streetName);
+ parameters.put("buildingnumber_", buildingNumber);
+ parameters.put("unit_", unit);
+ return parameters;
+ }
+
+ /**
+ * Adds the AUTH block related SAML attributes to the validation result.
+ * This is needed always before the AUTH block is to be signed, because the
+ * name of the mandator has to be set
+ */
+ private void addAuthBlockExtendedSamlAttributes() {
+ extendedSamlAttributes.clear();
+ extendedSamlAttributes.add(new ExtendedSAMLAttributeImpl(ParepValidator.EXT_SAML_MANDATE_REPRESENTATIONTYPE, parepConfiguration.getRepresentationText(representationID), SZRGWConstants.MANDATE_NS, ExtendedSAMLAttribute.ADD_TO_AUTHBLOCK_ONLY));
+ Element mandator = request.getMandator();
+ // Name
+ String name = ParepUtils.extractMandatorName(mandator);
+ extendedSamlAttributes.add(new ExtendedSAMLAttributeImpl(ParepValidator.EXT_SAML_MANDATE_NAME, name, SZRGWConstants.MANDATE_NS, ExtendedSAMLAttribute.ADD_TO_AUTHBLOCK_ONLY));
+ // Geburtsdatum
+ String dob = ParepUtils.extractMandatorDateOfBirth(mandator);
+ if (dob != null && !"".equals(dob)) {
+ extendedSamlAttributes.add(new ExtendedSAMLAttributeImpl(ParepValidator.EXT_SAML_MANDATE_DOB, dob, SZRGWConstants.MANDATE_NS, ExtendedSAMLAttribute.ADD_TO_AUTHBLOCK_ONLY));
+ }
+ // (w)bpk
+ String wbpk = ParepUtils.extractMandatorWbpk(mandator);
+ if (!ParepUtils.isEmpty(wbpk)) {
+ if (!ParepUtils.isPhysicalPerson(mandator)){
+ String idType = ParepUtils.extractMandatorIdentificationType(mandator);
+ if (!ParepUtils.isEmpty(idType) && idType.startsWith(Constants.URN_PREFIX_BASEID + "+X")) {
+ extendedSamlAttributes.add(new ExtendedSAMLAttributeImpl(ParepValidator.EXT_SAML_MANDATE_CB_BASE_ID, ParepUtils.getRegisterString(idType) + ": " + wbpk, SZRGWConstants.MANDATE_NS, ExtendedSAMLAttribute.ADD_TO_AUTHBLOCK_ONLY));
+ }
+ } else if (this.params.getBusinessApplication()) {
+ extendedSamlAttributes.add(new ExtendedSAMLAttributeImpl(ParepValidator.EXT_SAML_MANDATE_WBPK, wbpk, SZRGWConstants.MANDATE_NS, ExtendedSAMLAttribute.ADD_TO_AUTHBLOCK_ONLY));
+ }
+ }
+ }
+
+// public static void main(String[] args) throws Exception {
+// }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/PartyRepresentative.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/PartyRepresentative.java
new file mode 100644
index 000000000..641bfaad4
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/PartyRepresentative.java
@@ -0,0 +1,174 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+/**
+ *
+ */
+package at.gv.egovernment.moa.id.auth.validator.parep;
+
+import at.gv.egovernment.moa.id.config.ConnectionParameter;
+
+/**
+ * @author <a href="mailto:peter.danner@egiz.gv.at">Peter Danner</a>
+ *
+ */
+public class PartyRepresentative {
+
+ /** Object Identifier **/
+ private String oid;
+
+ private boolean representPhysicalParty;
+
+ private boolean representCorporateParty;
+
+ /**
+ * Text for representation description in SAML Assertion (Auth-Block)
+ * */
+ private String representationText;
+
+ /**
+ * SZR-GW connection parameters.
+ */
+ private ConnectionParameter connectionParameters = null;
+
+ private String inputProcessorClass = null;
+ private String inputProcessorTemplate = null;
+
+ /**
+ * Constructor
+ */
+public PartyRepresentative() {
+ this.oid = null;
+ this.representPhysicalParty = false;
+ this.representCorporateParty = false;
+ this.connectionParameters = null;
+ this.representationText = null;
+}
+
+/**
+ * Constructor
+ */
+ public PartyRepresentative(boolean representPhysicalParty, boolean representCorporateParty) {
+ this.oid = null;
+ this.representPhysicalParty = representPhysicalParty;
+ this.representCorporateParty = representCorporateParty;
+ this.connectionParameters = null;
+ this.representationText = null;
+ this.inputProcessorClass = null;
+ this.inputProcessorTemplate = null;
+ }
+
+ /**
+ * @return the oid
+ */
+ public String getOid() {
+ return oid;
+ }
+
+ /**
+ * @param oid the oid to set
+ */
+ public void setOid(String oid) {
+ this.oid = oid;
+ }
+
+ /**
+ * @return the representPhysicalParty
+ */
+ public boolean isRepresentingPhysicalParty() {
+ return representPhysicalParty;
+ }
+
+ /**
+ * @param representPhysicalParty the representPhysicalParty to set
+ */
+ public void setRepresentingPhysicalParty(boolean representPhysicalParty) {
+ this.representPhysicalParty = representPhysicalParty;
+ }
+
+ /**
+ * @return the representCorporateParty
+ */
+ public boolean isRepresentingCorporateParty() {
+ return representCorporateParty;
+ }
+
+ /**
+ * @param representCorporateParty the representCorporateParty to set
+ */
+ public void setRepresentingCorporateParty(boolean representCorporateParty) {
+ this.representCorporateParty = representCorporateParty;
+ }
+
+ /**
+ * @return the connectionParameters
+ */
+ public ConnectionParameter getConnectionParameters() {
+ return connectionParameters;
+ }
+
+ /**
+ * @param connectionParameters the connectionParameters to set
+ */
+ public void setConnectionParameters(ConnectionParameter connectionParameters) {
+ this.connectionParameters = connectionParameters;
+ }
+
+
+ /**
+ * @return the representationText
+ */
+ public String getRepresentationText() {
+ return representationText;
+ }
+
+
+ /**
+ * @param representationText the representationText to set
+ */
+ public void setRepresentationText(String representationText) {
+ this.representationText = representationText;
+ }
+
+ /**
+ * @return the inputProcessorClass
+ */
+ public String getInputProcessorClass() {
+ return inputProcessorClass;
+ }
+
+ /**
+ * @param inputProcessorClass the inputProcessorClass to set
+ */
+ public void setInputProcessorClass(String inputProcessorClass) {
+ this.inputProcessorClass = inputProcessorClass;
+ }
+
+ /**
+ * @return the inputProcessorTemplate
+ */
+ public String getInputProcessorTemplate() {
+ return inputProcessorTemplate;
+ }
+
+ /**
+ * @param inputProcessorTemplate the inputProcessorTemplate to set
+ */
+ public void setInputProcessorTemplate(String inputProcessorTemplate) {
+ this.inputProcessorTemplate = inputProcessorTemplate;
+ }
+
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/CreateIdentityLinkResponse.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/CreateIdentityLinkResponse.java
new file mode 100644
index 000000000..aa6ed32d2
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/CreateIdentityLinkResponse.java
@@ -0,0 +1,41 @@
+package at.gv.egovernment.moa.id.auth.validator.parep.client.szrgw;
+
+
+import org.apache.xpath.XPathAPI;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+
+/**
+ * This class implements a SZR-gateway GetIdentityLink Response.
+ *
+ */
+public class CreateIdentityLinkResponse {
+
+ private Element assertion;
+ private String error;
+ private boolean isError;
+
+ public Element getAssertion() {
+ return assertion;
+ }
+ public String getError() {
+ return error;
+ }
+
+ public void setAssertion(Element assertion) {
+ isError = false;
+ this.assertion = assertion;
+ }
+ public void setError(String error) {
+ isError = true;
+ this.error = error;
+ }
+
+ public boolean isError() {
+ return isError;
+ }
+
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/CreateMandateRequest.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/CreateMandateRequest.java
new file mode 100644
index 000000000..b856ee988
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/CreateMandateRequest.java
@@ -0,0 +1,272 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.validator.parep.client.szrgw;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.xpath.XPathAPI;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+import at.gv.egovernment.moa.id.auth.data.InfoboxValidatorParams;
+import at.gv.egovernment.moa.id.auth.validator.parep.ParepUtils;
+import at.gv.egovernment.moa.util.Constants;
+
+/**
+ * This class implements a detailed CreateMandateRequest that
+ * will be sent to SZR-gateway.
+ *
+ * @author <a href="mailto:peter.danner@egiz.gv.at">Peter Danner</a>
+ */
+public class CreateMandateRequest {
+
+ /**
+ * The Request.
+ */
+ private Document document;
+
+ /**
+ * List of mandate representatives as XML element.
+ */
+ private List representatives;
+
+ /**
+ * The mandator.
+ */
+ private Element mandator;
+
+ /**
+ * The representative.
+ */
+ private Element representative;
+
+ /**
+ * The signature to verify by the SZR-gateway
+ */
+ private Element signature;
+
+
+
+ /**
+ * Creates the CreateMandateRequest element that will
+ * be sent to SZR-gateway
+ *
+ * @return the CreateMandateRequest element.
+ */
+ public Element toElement() throws SZRGWClientException{
+
+ this.document = ParepUtils.createEmptyDocument();
+ Element root = this.document.createElement(SZRGWConstants.SZRGW_PREFIX + SZRGWConstants.CREATE_MANDATE_REQUEST);
+ root.setAttribute("xmlns" + SZRGWConstants.SZRGW_POSTFIX, SZRGWConstants.SZRGW_REQUEST_NS);
+ root.setAttribute("xmlns" + SZRGWConstants.PD_POSTFIX, Constants.PD_NS_URI);
+ if (this.representative!=null) root.appendChild(this.document.importNode(this.representative, true));
+ if (this.mandator!=null) root.appendChild(this.document.importNode(this.mandator, true));
+ if (this.signature!=null) root.appendChild(this.document.importNode(this.signature, true));
+
+ return root;
+ }
+
+ /**
+ * Adds a representative.
+ *
+ * @param representative an XML representative to add.
+ */
+ public void addRepresentative(Element representative) {
+ if (representatives == null) {
+ representatives = new ArrayList();
+ }
+ representatives.add(representative);
+ }
+
+ /**
+ * Gets the representative.
+ *
+ * @return the representative.
+ */
+ public Element getRepresentative() {
+ return representative;
+ }
+
+ /**
+ * Gets the mandator.
+ *
+ * @return the mandator.
+ */
+ public Element getMandator() {
+ return mandator;
+ }
+
+ /**
+ * Sets the mandator.
+ *
+ * @param mandator the mandator.
+ */
+ public void setMandator(Element mandator) {
+ this.mandator = mandator;
+ }
+
+ /**
+ * Sets the Mandator.
+ *
+ * @param familyName the family name of the mandator.
+ */
+ public void setMandator(String familyName, String givenName, String dateOfBirth,
+ String postalCode, String municipality, String streetName, String buildingNumber, String unit,
+ boolean physical, String cbFullName, String cbIdentificationType, String cbIdentificationValue) throws SZRGWClientException {
+
+ Document mandatorDocument = ParepUtils.createEmptyDocument();
+
+ Element mandatorElem = mandatorDocument.createElementNS(SZRGWConstants.SZRGW_REQUEST_NS, SZRGWConstants.SZRGW_PREFIX + SZRGWConstants.MANDATOR);
+// mandatorElem.setAttribute("xmlns" + SZRGWConstants.PD_POSTFIX, Constants.PD_NS_URI);
+/// mandatorElem.setAttribute("xmlns" + SZRGWConstants.SZRGW_POSTFIX, SZRGWConstants.SZRGW_REQUEST_NS);
+
+ if (physical) {
+ Element physicalPersonElem = mandatorDocument.createElementNS(Constants.PD_NS_URI, SZRGWConstants.PD_PREFIX + SZRGWConstants.PHYSICALPERSON);
+ physicalPersonElem.appendChild(createNameElem(mandatorDocument, givenName, familyName));
+ physicalPersonElem.appendChild(createPersonDataElem(mandatorDocument, SZRGWConstants.DATEOFBIRTH, dateOfBirth));
+ mandatorElem.appendChild(physicalPersonElem);
+ Element postalAddressElement = createPostalAddressElem(mandatorDocument, postalCode, municipality, streetName, buildingNumber, unit);
+ if (null!=postalAddressElement) mandatorElem.appendChild(postalAddressElement);
+ } else {
+ Element corporateBodyElem = mandatorDocument.createElementNS(Constants.PD_NS_URI, SZRGWConstants.PD_PREFIX + SZRGWConstants.CORPORATEBODY);
+ corporateBodyElem.appendChild(createIdentificationElem(mandatorDocument, cbIdentificationType, cbIdentificationValue));
+ corporateBodyElem.appendChild(createPersonDataElem(mandatorDocument, SZRGWConstants.FULLNAME, cbFullName));
+ mandatorElem.appendChild(corporateBodyElem);
+ }
+
+
+ this.mandator = mandatorElem;
+ }
+
+ private Element createPersonDataElem(Document document, String elementName, String elementValue) {
+ Element elem = document.createElementNS(Constants.PD_NS_URI, SZRGWConstants.PD_PREFIX + elementName);
+ Node value = document.createTextNode(elementValue);
+ elem.appendChild(value);
+ return elem;
+ }
+
+ private Element createIdentificationElem(Document document, String identificationType, String identificationValue) {
+ Element identificationElem = document.createElementNS(Constants.PD_NS_URI, SZRGWConstants.PD_PREFIX + SZRGWConstants.IDENTIFICATION);
+ identificationElem.appendChild(createPersonDataElem(document, SZRGWConstants.VALUE, identificationValue));
+ identificationElem.appendChild(createPersonDataElem(document, SZRGWConstants.TYPE, identificationType));
+ return identificationElem;
+ }
+ private Element createNameElem(Document document, String givenName, String familyName) {
+ Element nameElem = document.createElementNS(Constants.PD_NS_URI, SZRGWConstants.PD_PREFIX + SZRGWConstants.NAME);
+ nameElem.appendChild(createPersonDataElem(document, SZRGWConstants.GIVENNAME, givenName));
+ nameElem.appendChild(createPersonDataElem(document, SZRGWConstants.FAMILYNAME, familyName));
+ return nameElem;
+ }
+ private Element createPostalAddressElem(Document document, String postalCode, String municipality, String streetName, String buildingNumber, String unit) {
+
+ if (ParepUtils.isEmpty(postalCode) && ParepUtils.isEmpty(municipality) && ParepUtils.isEmpty(streetName)
+ && ParepUtils.isEmpty(buildingNumber) && ParepUtils.isEmpty(unit)) return null;
+ Element postalAddressElem = document.createElementNS(Constants.PD_NS_URI, SZRGWConstants.PD_PREFIX + SZRGWConstants.POSTALADDRESS);
+
+ if (!ParepUtils.isEmpty(postalCode)) {
+ postalAddressElem.appendChild(createPersonDataElem(document, SZRGWConstants.POSTALCODE, postalCode));
+ }
+ if (!ParepUtils.isEmpty(municipality)) {
+ postalAddressElem.appendChild(createPersonDataElem(document, SZRGWConstants.MUNICIPALITY, municipality));
+ }
+ if (!ParepUtils.isEmpty(streetName) || !ParepUtils.isEmpty(buildingNumber) || !ParepUtils.isEmpty(unit)) {
+ Element deliveryAddressElem = document.createElementNS(Constants.PD_NS_URI, SZRGWConstants.PD_PREFIX + SZRGWConstants.DELIVERYADDRESS);
+
+ if (!ParepUtils.isEmpty(streetName)) {
+ deliveryAddressElem.appendChild(createPersonDataElem(document, SZRGWConstants.STREETNAME, streetName));
+ }
+ if (!ParepUtils.isEmpty(buildingNumber)) {
+ deliveryAddressElem.appendChild(createPersonDataElem(document, SZRGWConstants.BUILDINGNUMBER, buildingNumber));
+ }
+ if (!ParepUtils.isEmpty(unit)) {
+ deliveryAddressElem.appendChild(createPersonDataElem(document, SZRGWConstants.UNIT, unit));
+ }
+ postalAddressElem.appendChild(deliveryAddressElem);
+ }
+ return postalAddressElem;
+ }
+
+
+
+ /**
+ * Sets the Representative.
+ *
+ * @param params InfoboxValidatorParams contain the data of the representative.
+ * @param identificationType the type of the identification of the representative (has to be urn:publicid:gv.at:cdid).
+ * @param identificationValue the identification value (bPK).
+ */
+ public void setRepresentative(InfoboxValidatorParams params, String identificationType, String identificationValue) throws SZRGWClientException {
+
+ Document representativeDocument = ParepUtils.createEmptyDocument();
+
+ Element representativeElem = representativeDocument.createElementNS(SZRGWConstants.SZRGW_REQUEST_NS, SZRGWConstants.SZRGW_PREFIX + SZRGWConstants.REPRESENTATIVE);
+// representativeElem.setAttribute("xmlns" + SZRGWConstants.PD_POSTFIX, Constants.PD_NS_URI);
+// representativeElem.setAttribute("xmlns" + SZRGWConstants.SZRGW_POSTFIX, SZRGWConstants.SZRGW_REQUEST_NS);
+
+ //Old Version 0.0.1 of SZR-Gateway
+// representativeElem.appendChild(createIdentificationElem(representativeDocument, identificationType, identificationValue));
+// representativeElem.appendChild(createNameElem(representativeDocument, params.getGivenName(), params.getFamilyName()));
+// representativeElem.appendChild(createPersonDataElem(representativeDocument, SZRGWConstants.DATEOFBIRTH, params.getDateOfBirth()));
+
+ //New since version 0.0.2 of SZR-Gateway:
+ // we need to send an identity link and must replace its identification value
+ representativeElem.appendChild(representativeElem.getOwnerDocument().importNode(params.getIdentityLink(), true));
+ try {
+ Element nameSpaceNode = representativeElem.getOwnerDocument().createElement("NameSpaceNode");
+ nameSpaceNode.setAttribute("xmlns" + SZRGWConstants.PD_POSTFIX, Constants.PD_NS_URI);
+ nameSpaceNode.setAttribute("xmlns" + SZRGWConstants.SAML_POSTFIX, Constants.SAML_NS_URI);
+ nameSpaceNode.setAttribute("xmlns" + SZRGWConstants.SZRGW_POSTFIX, SZRGWConstants.SZRGW_REQUEST_NS);
+ Node identificationValueNode = XPathAPI.selectSingleNode(representativeElem, "descendant-or-self::" + SZRGWConstants.SZRGW_PREFIX + SZRGWConstants.REPRESENTATIVE + "/" +SZRGWConstants.SAML_PREFIX + "Assertion/saml:AttributeStatement/saml:Subject/saml:SubjectConfirmation/saml:SubjectConfirmationData/pr:Person/pr:Identification/pr:Value/text()", nameSpaceNode);
+ if (identificationValueNode != null) {
+ identificationValueNode.setNodeValue(identificationValue);
+ } else {
+ throw new SZRGWClientException("validator.63", null);
+ }
+ Node identificationTypeNode = XPathAPI.selectSingleNode(representativeElem, "descendant-or-self::" + SZRGWConstants.SZRGW_PREFIX + SZRGWConstants.REPRESENTATIVE + "/" +SZRGWConstants.SAML_PREFIX + "Assertion/saml:AttributeStatement/saml:Subject/saml:SubjectConfirmation/saml:SubjectConfirmationData/pr:Person/pr:Identification/pr:Type/text()", nameSpaceNode);
+ if (identificationTypeNode != null) {
+ identificationTypeNode.setNodeValue(identificationType);
+ } else {
+ throw new SZRGWClientException("validator.63", null);
+ }
+ } catch (Exception e) {
+ throw new SZRGWClientException("validator.63", null);
+ }
+ this.representative = representativeElem;
+ }
+
+ /**
+ * @return the signature
+ */
+ public Element getSignature() {
+ return signature;
+ }
+
+ /**
+ * @param signature the signature to set
+ */
+ public void setSignature(Element signature) throws SZRGWClientException{
+ Document signatureDocument = ParepUtils.createEmptyDocument();
+ Element signatureElem = signatureDocument.createElementNS(SZRGWConstants.SZRGW_REQUEST_NS, SZRGWConstants.SZRGW_PREFIX + "Signature");
+ //SZR-gateway takes the first Signature
+ //signatureElem.setAttribute("SignatureLocation", "//saml:Assertion/dsig:Signature");
+ signatureElem.appendChild(signatureDocument.importNode(signature, true));
+ this.signature = signatureElem;
+ }
+
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/CreateMandateResponse.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/CreateMandateResponse.java
new file mode 100644
index 000000000..dcc3161e7
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/CreateMandateResponse.java
@@ -0,0 +1,135 @@
+package at.gv.egovernment.moa.id.auth.validator.parep.client.szrgw;
+
+
+import org.apache.xpath.XPathAPI;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+
+/**
+ * This class implements a SZR-gateway CreateMandate Response.
+ *
+ * @author <a href="mailto:peter.danner@egiz.gv.at">Peter Danner</a>
+ */
+public class CreateMandateResponse {
+
+ /**
+ * Result code of the request.
+ */
+ private int resultCode;
+
+ /**
+ * Description of the result.
+ */
+ private String resultInfo;
+
+ /**
+ * The returned mandate.
+ */
+ private Element mandate;
+
+ /**
+ * @return the resultCode
+ */
+ public int getResultCode() {
+ return resultCode;
+ }
+
+ /**
+ * @param resultCode the resultCode to set
+ */
+ public void setResultCode(String resultCode) {
+ if (resultCode!=null) {
+ this.resultCode = Integer.parseInt(resultCode);
+ } else {
+ this.resultCode = 0;
+ }
+ }
+
+ /**
+ * @return the resultInfo
+ */
+ public String getInfo() {
+ return resultInfo;
+ }
+
+ /**
+ * @param resultInfo the resultInfo to set
+ */
+ public void setInfo(String resultInfo) {
+ this.resultInfo = resultInfo;
+ }
+
+ /**
+ * @return the mandate
+ */
+ public Element getMandate() {
+ return mandate;
+ }
+
+ /**
+ * @param mandate the mandate to set
+ */
+ public void setMandate(Element mandate) {
+ this.mandate = mandate;
+ }
+
+
+ /**
+ * Parses the SZR-gateway response.
+ *
+ * @param response the SZR-gateway response.
+ * @throws SZRGWClientException if an error occurs.
+ */
+ public void parse(Element response) throws SZRGWClientException {
+ try {
+
+ // first check if response is a soap error
+ NodeList list = response.getElementsByTagName("faultstring");
+ if (list.getLength() > 0) {
+ String faultCode = "";
+ String faultString = "";
+ Element snameSpaceNode = response.getOwnerDocument().createElement("NameSpaceNode");
+ snameSpaceNode.setAttribute("xmlns" + SOAPConstants.SOAP_ENV_POSTFIX, SOAPConstants.SOAP_ENV_NS);
+ Node faultCodeNode = XPathAPI.selectSingleNode(response, SOAPConstants.XPATH_SOAP_FAULTCODE, snameSpaceNode);
+ Node faultStringNode = XPathAPI.selectSingleNode(response, SOAPConstants.XPATH_SOAP_FAULTSTRING, snameSpaceNode);
+ if (faultCodeNode!=null) faultCode = faultCodeNode.getNodeValue();
+ if (faultStringNode!=null) faultString = faultStringNode.getNodeValue();
+ throw new SZRGWClientException("Fehler bei SZR-Gateway (SOAP-Error " + faultCode + "): " + faultString);
+ }
+
+ this.mandate = null;
+ this.resultCode = 2000;
+ this.resultInfo = null;
+ // parse single SZR-gateway results
+ Element nameSpaceNode = response.getOwnerDocument().createElement("NameSpaceNode");
+ nameSpaceNode.setAttribute("xmlns" + SZRGWConstants.SZRGW_POSTFIX, SZRGWConstants.SZRGW_REQUEST_NS);
+ nameSpaceNode.setAttribute("xmlns" + SZRGWConstants.MANDATE_POSTFIX, SZRGWConstants.MANDATE_NS);
+ Node mandateNode = XPathAPI.selectSingleNode(response, "//" + SZRGWConstants.SZRGW_PREFIX + SZRGWConstants.CREATE_MANDATE_RESPONSE + "/" + SZRGWConstants.MANDATE_PREFIX + SZRGWConstants.MANDATE, nameSpaceNode);
+ if (mandateNode!=null) {
+ this.mandate = (Element) mandateNode;
+ } else {
+ String errorResponse = "//" + SZRGWConstants.SZRGW_PREFIX + SZRGWConstants.CREATE_MANDATE_RESPONSE + "/" + SZRGWConstants.SZRGW_PREFIX + SZRGWConstants.ERROR_RESPONSE + "/";
+ Node errorCode = XPathAPI.selectSingleNode(response, errorResponse + SZRGWConstants.SZRGW_PREFIX + "ErrorCode/text()", nameSpaceNode);
+ if (errorCode!=null) setResultCode(errorCode.getNodeValue());
+ Node errorInfo = XPathAPI.selectSingleNode(response, errorResponse + SZRGWConstants.SZRGW_PREFIX + "Info/text()", nameSpaceNode);
+ this.setInfo(errorInfo.getNodeValue());
+ }
+ } catch(Exception e) {
+ e.printStackTrace();
+ throw new SZRGWClientException(e);
+ }
+ }
+
+ public static void main(String[] args) throws Exception {
+// CreateMandateResponse resp = new CreateMandateResponse();
+// Document doc = ParepUtils.readDocFromIs(new FileInputStream("c:/response2.xml"));
+// Element response = doc.getDocumentElement();
+// resp.parse(response);
+// System.out.println(resp.getResultCode());
+// System.out.println(resp.getInfo());
+// if (resp.getMandate()!=null) ParepUtils.serializeElement(resp.getMandate(), System.out);
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/SOAPConstants.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/SOAPConstants.java
new file mode 100644
index 000000000..026632589
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/SOAPConstants.java
@@ -0,0 +1,32 @@
+package at.gv.egovernment.moa.id.auth.validator.parep.client.szrgw;
+
+
+/**
+ * SOAP Envelope Constants.
+ *
+ * @author <a href="mailto:arne.tauber@egiz.gv.at">Arne Tauber</a>
+ * @version $ $
+ **/
+public interface SOAPConstants {
+
+ /*
+ * Namespaces and namespace prefixes for SOAP message handling
+ */
+ public static final String SOAP_ENV_NS = "http://schemas.xmlsoap.org/soap/envelope/";
+ public static final String SOAP_ENV_ENCODING_STYLE = "http://schemas.xmlsoap.org/soap/encoding/";
+ public static final String SOAP_ENV_PREFIX = "soapenv:";
+ public static final String SOAP_ENV_POSTFIX = ":soapenv";
+
+ public static final String ENVELOPE = "Envelope";
+ public static final String BODY = "Body";
+ public static final String FAULT = "Fault";
+ public static final String ENCODING_STYLE = "encodingStyle";
+
+ public static final String XPATH_SOAP_FAULT = "/" + SOAP_ENV_PREFIX + ENVELOPE + "/" + SOAP_ENV_PREFIX + BODY + "/" + SOAP_ENV_PREFIX + FAULT;
+ public static final String XPATH_SOAP_FAULTCODE = XPATH_SOAP_FAULT + "/faultcode/text()";
+ public static final String XPATH_SOAP_FAULTSTRING = XPATH_SOAP_FAULT + "/faultstring/text()";
+
+
+
+}
+
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/SZRGWClient.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/SZRGWClient.java
new file mode 100644
index 000000000..9cb7c7ab4
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/SZRGWClient.java
@@ -0,0 +1,387 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+package at.gv.egovernment.moa.id.auth.validator.parep.client.szrgw;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+
+import javax.net.ssl.SSLSocketFactory;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.methods.PostMethod;
+import org.apache.commons.httpclient.protocol.Protocol;
+import org.apache.xpath.XPathAPI;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Text;
+
+import at.gv.egovernment.moa.id.auth.validator.parep.ParepUtils;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+
+
+
+/**
+ * This class implements a client for communication with the SZR-gateway
+ * <p>
+ * Two types of requests are supported
+ * <ol>
+ * <li>Basic Request</li>
+ * <li>Detailed Request</li>
+ * </ol>
+ *
+ * @author <a href="mailto:peter.danner@egiz.gv.at">Peter Danner</a>
+ */
+public class SZRGWClient {
+ /**
+ * The URL of the SZR-gateway webservice.
+ */
+ private String address;
+
+ /**
+ * The SSL socket factory when using a secure connection.
+ */
+ private SSLSocketFactory sSLSocketFactory;
+
+ /**
+ * Constructor
+ */
+ public SZRGWClient() {
+ }
+
+ /**
+ * Constructor
+ *
+ * @param address the URL of the SZR-gateway webservice.
+ */
+ public SZRGWClient(String address) {
+ this.address = address;
+ }
+ /**
+ * Sets the SSL socket factory.
+ *
+ * @param factory the SSL socket factory.
+ */
+ public void setSSLSocketFactory(SSLSocketFactory factory) {
+ this.sSLSocketFactory = factory;
+ }
+
+ /**
+ * Sets the SZR webservice URL
+ *
+ * @param address the URL of the SZR-gateway webservice.
+ */
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+ /**
+ * Creates a mandate.
+ *
+ * @param reqElem the request.
+ * @return a SZR-gateway response containing the result
+ * @throws SZRGWException when an error occurs creating the mandate.
+ */
+ public CreateMandateResponse createMandateResponse(Element reqElem) throws SZRGWClientException {
+ //Logger.info("Connecting to SZR-gateway.");
+ try {
+ if (address == null) {
+ throw new NullPointerException("Address (SZR-gateway ServiceURL) must not be null.");
+ }
+ HttpClient client = new HttpClient();
+ PostMethod method = new PostMethod(address);
+ method.setRequestHeader("SOAPAction", "");
+
+
+ // ssl settings
+ if (sSLSocketFactory != null) {
+ SZRGWSecureSocketFactory fac = new SZRGWSecureSocketFactory(sSLSocketFactory);
+ Protocol.registerProtocol("https", new Protocol("https", fac, 443));
+ }
+
+ // create soap body
+ Element soapBody = getSOAPBody();
+ Document doc = soapBody.getOwnerDocument();
+ soapBody.appendChild(doc.importNode(reqElem, true));
+ Element requestElement = soapBody.getOwnerDocument().getDocumentElement();
+
+ //ParepUtils.saveElementToFile(requestElement, new File("c:/temp/szrRequest.xml"));
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ ParepUtils.serializeElementAsDocument(requestElement, bos);
+
+ method.setRequestBody(new ByteArrayInputStream(bos.toByteArray()));
+ client.executeMethod(method);
+ CreateMandateResponse response = new CreateMandateResponse();
+
+ bos = new ByteArrayOutputStream();
+ doc = ParepUtils.readDocFromIs(method.getResponseBodyAsStream());
+
+ //ParepUtils.saveElementToFile(doc.getDocumentElement(), new File("c:/temp/szrResponse.xml"));
+ response.parse(doc.getDocumentElement());
+
+
+ return response;
+ } catch(Exception e) {
+ //e.printStackTrace();
+ throw new SZRGWClientException(e);
+ }
+ }
+
+ /**
+ * Gets a identity link.
+ *
+ * @param reqElem the request.
+ * @return a SZR-gateway response containing the result
+ * @throws SZRGWException when an error occurs creating the mandate.
+ */
+ public CreateIdentityLinkResponse createIdentityLinkResponse(Element reqElem) throws SZRGWClientException {
+
+ try {
+ if (address == null) {
+ throw new NullPointerException("Address (SZR-gateway ServiceURL) must not be null.");
+ }
+ HttpClient client = new HttpClient();
+ PostMethod method = new PostMethod(address);
+ method.setRequestHeader("SOAPAction", "");
+
+
+ // ssl settings
+ if (sSLSocketFactory != null) {
+ SZRGWSecureSocketFactory fac = new SZRGWSecureSocketFactory(sSLSocketFactory);
+ Protocol.registerProtocol("https", new Protocol("https", fac, 443));
+ }
+
+ // create soap body
+ Element soapBody = getSOAPBody();
+ Document doc = soapBody.getOwnerDocument();
+ soapBody.appendChild(doc.importNode(reqElem, true));
+ Element requestElement = soapBody.getOwnerDocument().getDocumentElement();
+
+ //ParepUtils.saveElementToFile(requestElement, new File("c:/temp/szrRequest.xml"));
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ ParepUtils.serializeElementAsDocument(requestElement, bos);
+
+ method.setRequestBody(new ByteArrayInputStream(bos.toByteArray()));
+ client.executeMethod(method);
+ CreateIdentityLinkResponse response = new CreateIdentityLinkResponse();
+
+ bos = new ByteArrayOutputStream();
+ doc = ParepUtils.readDocFromIs(method.getResponseBodyAsStream());
+ //ParepUtils.saveElementToFile(doc.getDocumentElement(), new File("c:/temp/szrResponse.xml"));
+
+ NodeList list = doc.getElementsByTagNameNS(SZRGWConstants.SZRGW_REQUEST_NS, "ErrorResponse");
+ if (list.getLength() > 0) {
+ // set error response
+ list = doc.getElementsByTagNameNS(SZRGWConstants.SZRGW_REQUEST_NS, "Info");
+ String error = DOMUtils.getText(list.item(0));
+
+ response.setError(error);
+ }
+ else {
+ // set assertion
+ DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ Document newdoc = builder.newDocument();
+
+ Element nameSpaceNode = newdoc.createElement("NameSpaceNode");
+ nameSpaceNode.setAttribute("xmlns:" + Constants.DSIG_PREFIX, Constants.DSIG_NS_URI);
+ nameSpaceNode.setAttribute("xmlns:" + Constants.SAML_PREFIX, Constants.SAML_NS_URI);
+
+ Element samlAssertion = (Element)XPathAPI.selectSingleNode(doc, "//saml:Assertion[1]", nameSpaceNode);
+
+ if (samlAssertion == null)
+ throw new SZRGWClientException("Could not found a saml:Assertion element in response.");
+ else
+ response.setAssertion(samlAssertion);
+ }
+
+ return response;
+
+ } catch(Exception e) {
+ throw new SZRGWClientException(e);
+ }
+ }
+
+
+ /*
+ * builds an XML soap envelope
+ */
+ private Element getSOAPBody() throws SZRGWClientException {
+ Document doc_;
+ try {
+ doc_ = ParepUtils.createEmptyDocument();
+ Element root = doc_.createElementNS(SOAPConstants.SOAP_ENV_NS, SOAPConstants.SOAP_ENV_PREFIX + SOAPConstants.ENVELOPE);
+ doc_.appendChild(root);
+
+ root.setAttribute("xmlns" + SOAPConstants.SOAP_ENV_POSTFIX, SOAPConstants.SOAP_ENV_NS);
+ //root.setAttribute(SOAPConstants.SOAP_ENV_PREFIX + SOAPConstants.ENCODING_STYLE, SOAPConstants.SOAP_ENV_ENCODING_STYLE);
+ root.setAttribute("xmlns:xsd", "http://www.w3.org/2001/XMLSchema");
+ root.setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
+
+ Element body = doc_.createElementNS(SOAPConstants.SOAP_ENV_NS, SOAPConstants.SOAP_ENV_PREFIX + SOAPConstants.BODY);
+ root.appendChild(body);
+
+ return body;
+ } catch (SZRGWClientException e) {
+ throw new SZRGWClientException(e);
+ }
+
+ }
+
+ public Document buildGetIdentityLinkRequest(String PEPSIdentifier, String PEPSFirstname, String PEPSFamilyname, String PEPSDateOfBirth, Element signature) throws SZRGWClientException {
+
+ String SZRGW_NS = "http://reference.e-government.gv.at/namespace/szrgw/20070807#";
+ try {
+ DocumentBuilderFactory factory =DocumentBuilderFactory.newInstance();
+ factory.setNamespaceAware(true);
+ DocumentBuilder builder = factory.newDocumentBuilder();
+ Document doc = builder.newDocument();
+
+ Element getIdentityLink = doc.createElementNS(SZRGW_NS, "szrgw:GetIdentityLinkRequest");
+ getIdentityLink.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:szrgw", SZRGW_NS);
+ doc.appendChild(getIdentityLink);
+
+ if ( (PEPSIdentifier != null) || (PEPSFirstname != null) || (PEPSFamilyname != null) || (PEPSDateOfBirth != null) ) {
+
+ Element pepsDataElem = doc.createElementNS(SZRGW_NS, "szrgw:PEPSData");
+ getIdentityLink.appendChild(pepsDataElem);
+
+ if (PEPSIdentifier != null) {
+ Element elem = doc.createElementNS(SZRGW_NS, "szrgw:Identifier");
+ pepsDataElem.appendChild(elem);
+ Text text= doc.createTextNode(PEPSIdentifier);
+ elem.appendChild(text);
+ }
+ if (PEPSFirstname != null) {
+ Element elem = doc.createElementNS(SZRGW_NS, "szrgw:Firstname");
+ pepsDataElem.appendChild(elem);
+ Text text= doc.createTextNode(PEPSFirstname);
+ elem.appendChild(text);
+ }
+
+ if (PEPSFamilyname != null) {
+ Element elem = doc.createElementNS(SZRGW_NS, "szrgw:Familyname");
+ pepsDataElem.appendChild(elem);
+ Text text= doc.createTextNode(PEPSFamilyname);
+ elem.appendChild(text);
+ }
+
+ if (PEPSDateOfBirth != null) {
+ Element elem = doc.createElementNS(SZRGW_NS, "szrgw:DateOfBirth");
+ pepsDataElem.appendChild(elem);
+ Text text= doc.createTextNode(PEPSDateOfBirth);
+ elem.appendChild(text);
+ }
+ }
+
+ if (signature == null)
+ throw new SZRGWClientException("Signature element must not be null!");
+ else {
+ Element sig = doc.createElementNS(SZRGW_NS, "szrgw:Signature");
+ Element xmlcontent = doc.createElementNS(SZRGW_NS, "szrgw:XMLContent");
+ sig.appendChild(xmlcontent);
+ Node n = doc.importNode(signature, true);
+ getIdentityLink.appendChild(sig);
+ xmlcontent.appendChild(n);
+ }
+
+
+ return doc;
+ } catch (ParserConfigurationException e) {
+ throw new SZRGWClientException(e);
+ } /*catch (CertificateEncodingException e) {
+ throw new SZRGWClientException(e);
+ }*/
+
+
+ }
+
+ public Document buildGetIdentityLinkRequest(String PEPSIdentifier, String PEPSFirstname, String PEPSFamilyname, String PEPSDateOfBirth, String signature) throws SZRGWClientException {
+
+ String SZRGW_NS = "http://reference.e-government.gv.at/namespace/szrgw/20070807#";
+
+ try {
+ DocumentBuilderFactory factory =DocumentBuilderFactory.newInstance();
+ factory.setNamespaceAware(true);
+ DocumentBuilder builder = factory.newDocumentBuilder();
+ Document doc = builder.newDocument();
+
+ Element getIdentityLink = doc.createElementNS(SZRGW_NS, "szrgw:GetIdentityLinkRequest");
+ getIdentityLink.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:szrgw", SZRGW_NS);
+ doc.appendChild(getIdentityLink);
+
+ if ( (PEPSIdentifier != null) || (PEPSFirstname != null) || (PEPSFamilyname != null) || (PEPSDateOfBirth != null) ) {
+
+ Element pepsDataElem = doc.createElementNS(SZRGW_NS, "szrgw:PEPSData");
+ getIdentityLink.appendChild(pepsDataElem);
+
+ if (PEPSIdentifier != null) {
+ Element elem = doc.createElementNS(SZRGW_NS, "szrgw:Identifier");
+ pepsDataElem.appendChild(elem);
+ Text text= doc.createTextNode(PEPSIdentifier);
+ elem.appendChild(text);
+ }
+ if (PEPSFirstname != null) {
+ Element elem = doc.createElementNS(SZRGW_NS, "szrgw:Firstname");
+ pepsDataElem.appendChild(elem);
+ Text text= doc.createTextNode(PEPSFirstname);
+ elem.appendChild(text);
+ }
+
+ if (PEPSFamilyname != null) {
+ Element elem = doc.createElementNS(SZRGW_NS, "szrgw:Familyname");
+ pepsDataElem.appendChild(elem);
+ Text text= doc.createTextNode(PEPSFamilyname);
+ elem.appendChild(text);
+ }
+
+ if (PEPSDateOfBirth != null) {
+ Element elem = doc.createElementNS(SZRGW_NS, "szrgw:DateOfBirth");
+ pepsDataElem.appendChild(elem);
+ Text text= doc.createTextNode(PEPSDateOfBirth);
+ elem.appendChild(text);
+ }
+ }
+
+ if (signature == null)
+ throw new SZRGWClientException("Signature element must not be null!");
+ else {
+ Element sig = doc.createElementNS(SZRGW_NS, "szrgw:Signature");
+ Element base64content = doc.createElementNS(SZRGW_NS, "szrgw:Base64Content");
+ sig.appendChild(base64content);
+ getIdentityLink.appendChild(sig);
+ Text text= doc.createTextNode(signature);
+ base64content.appendChild(text);
+ }
+
+ return doc;
+ } catch (ParserConfigurationException e) {
+ throw new SZRGWClientException(e);
+ } /*catch (CertificateEncodingException e) {
+ throw new SZRGWClientException(e);
+ }*/
+
+
+ }
+
+}
+
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/SZRGWClientException.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/SZRGWClientException.java
new file mode 100644
index 000000000..a70ccef90
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/SZRGWClientException.java
@@ -0,0 +1,52 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.validator.parep.client.szrgw;
+
+/**
+ * This class implements the basic exception type for the SZR-gateway client
+ *
+ * @author <a href="mailto:peter.danner@egiz.gv.at">Peter Danner</a>
+ */
+public class SZRGWClientException extends Exception {
+
+ /*
+ * see super constructor.
+ */
+ public SZRGWClientException() {
+ super();
+ }
+
+ /*
+ * see super constructor.
+ */
+ public SZRGWClientException(String arg0) {
+ super(arg0);
+ }
+
+ /*
+ * see super construction.
+ */
+ public SZRGWClientException(Throwable arg0) {
+ super(arg0);
+ }
+
+ /*
+ * see super constructor
+ */
+ public SZRGWClientException(String arg0, Throwable arg1) {
+ super(arg0, arg1);
+ }
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/SZRGWConstants.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/SZRGWConstants.java
new file mode 100644
index 000000000..4e6f6fa1b
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/SZRGWConstants.java
@@ -0,0 +1,69 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.validator.parep.client.szrgw;
+
+/**
+ * This interface specifies all the constants needed for the communication with the SZR-gateway.
+ *
+ * @author <a href="mailto:peter.danner@egiz.gv.at">Peter Danner</a>
+ */
+public interface SZRGWConstants {
+
+ //PersonData
+ public static final String PD_PREFIX = "pr:";
+ public static final String PD_POSTFIX = ":pr";
+ public static final String PERSON = "Person";
+ public static final String PHYSICALPERSON = "PhysicalPerson";
+ public static final String CORPORATEBODY = "CorporateBody";
+ public static final String IDENTIFICATION = "Identification";
+ public static final String VALUE = "Value";
+ public static final String TYPE = "Type";
+ public static final String NAME = "Name";
+ public static final String GIVENNAME = "GivenName";
+ public static final String FAMILYNAME = "FamilyName";
+ public static final String DATEOFBIRTH = "DateOfBirth";
+ public static final String FULLNAME = "FullName";
+ public static final String ORGANIZATION = "Organization";
+
+ public static final String POSTALADDRESS = "PostalAddress";
+ public static final String DELIVERYADDRESS = "DeliveryAddress";
+ public static final String MUNICIPALITY = "Municipality";
+ public static final String POSTALCODE = "PostalCode";
+ public static final String STREETNAME = "StreetName";
+ public static final String BUILDINGNUMBER = "BuildingNumber";
+ public static final String UNIT = "Unit";
+ //String ADDRESS = "Address";
+ //String COUNTRYCODE = "CountryCode";
+ //String DOORNUMBER = "DoorNumber";
+
+ // SZR-gateway constants
+ public static final String SZRGW_REQUEST_NS = "http://reference.e-government.gv.at/namespace/szrgw/20070807#";
+ public static final String MANDATE_NS = "http://reference.e-government.gv.at/namespace/mandates/20040701#";
+ public static final String SZRGW_PREFIX = "sgw:";
+ public static final String SZRGW_POSTFIX = ":sgw";
+ public static final String CREATE_MANDATE_REQUEST = "CreateMandateRequest";
+ public static final String CREATE_MANDATE_RESPONSE = "CreateMandateResponse";
+ public static final String ERROR_RESPONSE = "ErrorResponse";
+ public static final String MANDATOR = "Mandator";
+ public static final String REPRESENTATIVE = "Representative";
+ public static final String MANDATE = "Mandate";
+ public static final String MANDATE_PREFIX = "md:";
+ public static final String MANDATE_POSTFIX = ":md";
+
+ public static final String SAML_PREFIX = "saml:";
+ public static final String SAML_POSTFIX = ":saml";
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/SZRGWSecureSocketFactory.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/SZRGWSecureSocketFactory.java
new file mode 100644
index 000000000..bd0595524
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/client/szrgw/SZRGWSecureSocketFactory.java
@@ -0,0 +1,139 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.validator.parep.client.szrgw;
+
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.Socket;
+import java.net.UnknownHostException;
+
+import javax.net.ssl.SSLSocketFactory;
+
+import org.apache.commons.httpclient.params.HttpConnectionParams;
+import org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory;
+
+/**
+ * This class implements a secure protocol socket factory
+ * for the Apache HTTP client.
+ *
+ * @author <a href="mailto:peter.danner@egiz.gv.at">Peter Danner</a>
+ */
+public class SZRGWSecureSocketFactory implements SecureProtocolSocketFactory {
+
+ /**
+ * The SSL socket factory.
+ */
+ private SSLSocketFactory factory;
+
+ /**
+ * Creates a new Secure socket factory for the
+ * Apache HTTP client.
+ *
+ * @param factory the SSL socket factory to use.
+ */
+ public SZRGWSecureSocketFactory(SSLSocketFactory factory) {
+ this.factory = factory;
+ }
+
+
+ /**
+ * @see SecureProtocolSocketFactory#createSocket(java.lang.String,int,java.net.InetAddress,int)
+ */
+ public Socket createSocket(
+ String host,
+ int port,
+ InetAddress clientHost,
+ int clientPort)
+ throws IOException, UnknownHostException {
+
+ return this.factory.createSocket(
+ host,
+ port,
+ clientHost,
+ clientPort
+ );
+ }
+
+ /**
+ * @see SecureProtocolSocketFactory#createSocket(java.lang.String,int)
+ */
+ public Socket createSocket(String host, int port)
+ throws IOException, UnknownHostException {
+ return this.factory.createSocket(
+ host,
+ port
+ );
+ }
+
+ /**
+ * @see SecureProtocolSocketFactory#createSocket(java.net.Socket,java.lang.String,int,boolean)
+ */
+ public Socket createSocket(
+ Socket socket,
+ String host,
+ int port,
+ boolean autoClose)
+ throws IOException, UnknownHostException {
+ return this.factory.createSocket(
+ socket,
+ host,
+ port,
+ autoClose
+ );
+ }
+
+ /**
+ * @see SecureProtocolSocketFactory#createSocket(java.lang.String,int,java.net.InetAddress,int,org.apache.commons.httpclient.params.HttpConnectionParams)
+ */
+ public Socket createSocket(
+ String host,
+ int port,
+ InetAddress clientHost,
+ int clientPort,
+ HttpConnectionParams params)
+ throws IOException, UnknownHostException, org.apache.commons.httpclient.ConnectTimeoutException {
+
+ Socket socket = createSocket(host, port, clientHost, clientPort);
+ if (socket != null) {
+ // socket.setKeepAlive(false);
+ if (params.getReceiveBufferSize() >= 0)
+ socket.setReceiveBufferSize(params.getReceiveBufferSize());
+ if (params.getSendBufferSize() >= 0)
+ socket.setSendBufferSize(params.getSendBufferSize());
+ socket.setReuseAddress(true);
+ if (params.getSoTimeout() >= 0)
+ socket.setSoTimeout(params.getSoTimeout());
+ }
+ return socket;
+
+ }
+
+ /**
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ public boolean equals(Object obj) {
+ return ((obj != null) && obj.getClass().equals(SZRGWSecureSocketFactory.class));
+ }
+
+ /**
+ * @see java.lang.Object#hashCode()
+ */
+ public int hashCode() {
+ return SZRGWSecureSocketFactory.class.hashCode();
+ }
+
+}
+
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/config/ParepConfiguration.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/config/ParepConfiguration.java
new file mode 100644
index 000000000..de3496374
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/config/ParepConfiguration.java
@@ -0,0 +1,427 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.auth.validator.parep.config;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.util.HashMap;
+
+import org.apache.xpath.XPathAPI;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.id.auth.validator.parep.ParepUtils;
+import at.gv.egovernment.moa.id.auth.validator.parep.ParepValidator;
+import at.gv.egovernment.moa.id.auth.validator.parep.PartyRepresentative;
+import at.gv.egovernment.moa.id.auth.validator.parep.client.szrgw.SZRGWConstants;
+import at.gv.egovernment.moa.id.config.ConfigurationException;
+import at.gv.egovernment.moa.id.config.ConfigurationProvider;
+import at.gv.egovernment.moa.id.config.ConnectionParameter;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.BoolUtils;
+import at.gv.egovernment.moa.util.Constants;
+
+/**
+ * This class implements the Configuration.
+ *
+ * @author <a href="mailto:peter.danner@egiz.gv.at">Peter Danner</a>
+ */
+public class ParepConfiguration {
+
+ /**
+ * System property for config file.
+ */
+ public final static String PAREP_VALIDATOR_CONFIG = "parep.validator.config";
+
+ /**
+ * SZR-GW connection parameters.
+ */
+ private ConnectionParameter standardConnectionParameters;
+
+ /**
+ * Input field processor.
+ */
+ private String standardInputProcessorClass;
+
+ /**
+ * Input field processor template.
+ */
+ private String standardInputProcessorTemplate;
+
+ /**
+ * Configured party representatives.
+ */
+ private HashMap partyRepresentatives;
+
+ /**
+ * The configuration element.
+ */
+ private Element configElement = null;
+
+ /**
+ * Defines whether the user input form must be shown on each
+ * request or not (also predefined mandates)
+ */
+ private boolean alwaysShowForm = false;
+
+ /**
+ * The configuration base directory.
+ */
+ private String baseDir_;
+
+ /**
+ * Gets the SZR-GW connection parameters.
+ *
+ * @return the connection parameters.
+ */
+ public ConnectionParameter getConnectionParameters(String representationID) {
+ if (partyRepresentatives == null || "*".equals(representationID))
+ return standardConnectionParameters;
+ PartyRepresentative pr = (PartyRepresentative) partyRepresentatives.get(representationID);
+ ConnectionParameter connectionParameters = pr.getConnectionParameters();
+ if (connectionParameters==null) connectionParameters = standardConnectionParameters;
+ return connectionParameters;
+ }
+
+ /**
+ * Sets the SZR-GW connection parameters for standard connection.
+ *
+ * @param connectionParameters
+ * the connection parameters.
+ */
+ public void setStandardConnectionParameters(ConnectionParameter connectionParameters) {
+ this.standardConnectionParameters = connectionParameters;
+ }
+
+ /*
+ *
+ */
+ public String getFullDirectoryName(String fileString) {
+ return makeAbsoluteURL(fileString, baseDir_);
+ }
+
+ /*
+ *
+ */
+ private static String makeAbsoluteURL(String url, String root) {
+ // if url is relative to rootConfigFileDirName make it absolute
+
+ File keyFile;
+ String newURL = url;
+
+ if (null == url)
+ return null;
+
+ if (url.startsWith("http:/") || url.startsWith("https:/") || url.startsWith("ftp:/") || url.startsWith("file:/") || url.startsWith("file:\\")) {
+ return url;
+ } else {
+ // check if absolute - if not make it absolute
+ keyFile = new File(url);
+ if (!keyFile.isAbsolute()) {
+ keyFile = new File(root, url);
+ newURL = keyFile.getPath();
+ }
+ return newURL;
+ }
+ }
+
+ /**
+ * Initializes the configuration with a given XML configuration element found
+ * in the MOA-ID configuration.
+ *
+ * @param configElem
+ * the configuration element.
+ * @throws ConfigurationException
+ * if an error occurs initializing the configuration.
+ */
+ public ParepConfiguration(Element configElem) throws ConfigurationException {
+
+ partyRepresentatives = new HashMap();
+ partyRepresentatives.put("*", new PartyRepresentative(true, true));
+
+ String fileName = System.getProperty(ConfigurationProvider.CONFIG_PROPERTY_NAME);
+
+ try {
+
+ baseDir_ = (new File(fileName)).getParentFile().toURL().toString();
+ Logger.trace("Config base directory: " + baseDir_);
+ // check for configuration in system properties
+ if (System.getProperty(PAREP_VALIDATOR_CONFIG) != null) {
+ Document doc = ParepUtils.readDocFromIs(new FileInputStream(System.getProperty(PAREP_VALIDATOR_CONFIG)));
+ this.configElement = doc.getDocumentElement();
+ } else {
+ this.configElement = configElem;
+ }
+ } catch (Exception e) {
+ throw new ConfigurationException("Allgemeiner Fehler beim Einlesen der ParepValidatorConfiguration", null, e);
+ }
+ load();
+ }
+
+ /*
+ *
+ */
+ private void load() throws ConfigurationException {
+ Logger.debug("Parse ParepValidator Konfiguration");
+ try {
+ Element nameSpaceNode = configElement.getOwnerDocument().createElement("NameSpaceNode");
+ nameSpaceNode.setAttribute("xmlns:" + Constants.MOA_ID_CONFIG_PREFIX, Constants.MOA_ID_CONFIG_NS_URI);
+ // nameSpaceNode.setAttribute("xmlns:sgw",
+ // SZRGWConstants.SZRGW_PROFILE_NS);
+
+ Node inputProcessorNode = XPathAPI.selectSingleNode(configElement, Constants.MOA_ID_CONFIG_PREFIX + ":PartyRepresentation/"
+ + Constants.MOA_ID_CONFIG_PREFIX + ":InputProcessor", nameSpaceNode);
+ if (inputProcessorNode != null) {
+ this.standardInputProcessorTemplate = ((Element) inputProcessorNode).getAttribute("template");
+ Node inputProcessorClassNode = XPathAPI.selectSingleNode(configElement, Constants.MOA_ID_CONFIG_PREFIX + ":PartyRepresentation/"
+ + Constants.MOA_ID_CONFIG_PREFIX + ":InputProcessor/text()", nameSpaceNode);
+ if (inputProcessorClassNode != null) {
+ this.standardInputProcessorClass = inputProcessorClassNode.getNodeValue();
+ }
+ }
+ Node alwaysShowFormNode = XPathAPI.selectSingleNode(configElement, Constants.MOA_ID_CONFIG_PREFIX + ":PartyRepresentation/"
+ + Constants.MOA_ID_CONFIG_PREFIX + ":AlwaysShowForm/text()", nameSpaceNode);
+ if (alwaysShowFormNode != null) {
+ this.setAlwaysShowForm(alwaysShowFormNode.getNodeValue());
+ }
+
+ // load connection parameters
+ Logger.debug("Lade SZR-Gateway Standard Verbindungsparameter");
+ Element connectionParamElement = (Element) XPathAPI.selectSingleNode(configElement, Constants.MOA_ID_CONFIG_PREFIX + ":PartyRepresentation/"
+ + Constants.MOA_ID_CONFIG_PREFIX + ":ConnectionParameter", nameSpaceNode);
+ if (connectionParamElement != null) {
+ // parse connection parameters
+ // ParepUtils.serializeElement(connectionParamElement, System.out);
+ this.standardConnectionParameters = buildConnectionParameter(connectionParamElement, nameSpaceNode);
+ }
+
+ Logger.trace("Lade Konfiguration der Parteienvertreter");
+ NodeList partyRepresentativeNodeList = XPathAPI.selectNodeList(configElement, Constants.MOA_ID_CONFIG_PREFIX + ":PartyRepresentation/"
+ + Constants.MOA_ID_CONFIG_PREFIX + ":PartyRepresentative", nameSpaceNode);
+ for (int i = 0; i < partyRepresentativeNodeList.getLength(); i++) {
+
+ PartyRepresentative partyRepresentative = new PartyRepresentative();
+
+ Element partyRepresentativeElement = (Element) partyRepresentativeNodeList.item(i);
+ boolean representPhysicalParty = partyRepresentativeElement.getAttribute("representPhysicalParty").equalsIgnoreCase("true") ? true : false;
+ boolean representCorporateParty = partyRepresentativeElement.getAttribute("representCorporateParty").equalsIgnoreCase("true") ? true : false;
+ partyRepresentative.setOid(partyRepresentativeElement.getAttribute("oid"));
+ partyRepresentative.setRepresentingPhysicalParty(representPhysicalParty);
+ partyRepresentative.setRepresentingCorporateParty(representCorporateParty);
+ partyRepresentative.setRepresentationText(partyRepresentativeElement.getAttribute("representationText"));
+
+ Node inputProcessorSubNode = XPathAPI.selectSingleNode(partyRepresentativeElement, Constants.MOA_ID_CONFIG_PREFIX + ":InputProcessor", nameSpaceNode);
+ if (inputProcessorSubNode != null) {
+ partyRepresentative.setInputProcessorTemplate(((Element) inputProcessorSubNode).getAttribute("template"));
+ Node inputProcessorClassSubNode = XPathAPI.selectSingleNode(partyRepresentativeElement, Constants.MOA_ID_CONFIG_PREFIX
+ + ":InputProcessor/text()", nameSpaceNode);
+ if (inputProcessorClassSubNode != null) {
+ partyRepresentative.setInputProcessorClass(inputProcessorClassSubNode.getNodeValue());
+ }
+ }
+
+ Element connectionParamSubElement = (Element) XPathAPI.selectSingleNode(partyRepresentativeElement, Constants.MOA_ID_CONFIG_PREFIX
+ + ":ConnectionParameter", nameSpaceNode);
+ if (connectionParamSubElement == null) {
+ if (this.standardConnectionParameters == null) {
+ throw new ConfigurationException("Fehler beim Parsen der ParepValidatorConfiguration: SZR-GW Verbindungsparameter zu Parteienvetreter "
+ + partyRepresentative.getOid() + " fehlen.", null, null);
+ }
+ } else {
+ // parse connection parameters
+ // ParepUtils.serializeElement(connectionParamSubElement, System.out);
+ partyRepresentative.setConnectionParameters(buildConnectionParameter(connectionParamSubElement, nameSpaceNode));
+ }
+ partyRepresentatives.put(partyRepresentative.getOid(), partyRepresentative);
+ Logger.debug("Parteienvertreter: " + partyRepresentative.getOid() + " erfolgreich konfiguriert (representPhysicalParty="
+ + partyRepresentative.isRepresentingPhysicalParty() + ", representCorporateParty=" + partyRepresentative.isRepresentingCorporateParty()
+ + ", representationText=" + partyRepresentative.getRepresentationText()
+ + ")");
+ }
+
+ Logger.debug("ParepValidator Konfiguration erfolgreich geparst.");
+ } catch (Exception e) {
+ throw new ConfigurationException("Allgemeiner Fehler beim Parsen der MandateValidatorConfiguration", null, e);
+ }
+ }
+
+ /*
+ *
+ */
+ private ConnectionParameter buildConnectionParameter(Element connParamElement, Element nameSpaceNode) throws ConfigurationException {
+ try {
+ ConnectionParameter connectionParameter = new ConnectionParameter();
+
+ // parse connection url
+ String URL = connParamElement.getAttribute("URL");
+ connectionParameter.setUrl(URL);
+
+ // accepted server certificates
+ Node accServerCertsNode = XPathAPI.selectSingleNode(connParamElement, Constants.MOA_ID_CONFIG_PREFIX + ":AcceptedServerCertificates/text()",
+ nameSpaceNode);
+ if (accServerCertsNode != null) {
+
+ String serverCertsDir = getFullDirectoryName(accServerCertsNode.getNodeValue());
+ Logger.debug("Full directory name of accepted server certificates: " + serverCertsDir);
+ connectionParameter.setAcceptedServerCertificates(serverCertsDir);
+ }
+
+ // client key store
+ Node clientKeyStoreNode = XPathAPI.selectSingleNode(connParamElement, Constants.MOA_ID_CONFIG_PREFIX + ":ClientKeyStore/text()", nameSpaceNode);
+ if (clientKeyStoreNode != null) {
+ String clientKeystore = getFullDirectoryName(clientKeyStoreNode.getNodeValue());
+ connectionParameter.setClientKeyStore(clientKeystore);
+ }
+
+ // client key store password
+ Node clientKeyStorePasswordNode = XPathAPI.selectSingleNode(connParamElement, Constants.MOA_ID_CONFIG_PREFIX + ":ClientKeyStore/@password",
+ nameSpaceNode);
+ if (clientKeyStorePasswordNode != null) {
+ connectionParameter.setClientKeyStorePassword(clientKeyStorePasswordNode.getNodeValue());
+ }
+
+ return connectionParameter;
+ } catch (Exception e) {
+ throw new ConfigurationException("Allgemeiner Fehler beim Parsen der ParepValidator ConnectionParameter.", null, e);
+ }
+ }
+
+ public boolean isPartyRepresentative(String representationID) {
+ if (partyRepresentatives == null)
+ return false;
+ PartyRepresentative pr = (PartyRepresentative) partyRepresentatives.get(representationID);
+ return pr != null;
+ }
+
+ public boolean isRepresentingCorporateParty(String representationID) {
+ if (partyRepresentatives == null) return false;
+ PartyRepresentative pr = (PartyRepresentative) partyRepresentatives.get(representationID);
+ if (pr == null) return false;
+ return pr.isRepresentingCorporateParty();
+ }
+
+ public boolean isRepresentingPhysicalParty(String representationID) {
+ if (partyRepresentatives == null) return false;
+ PartyRepresentative pr = (PartyRepresentative) partyRepresentatives.get(representationID);
+ if (pr == null) return false;
+ return pr.isRepresentingPhysicalParty();
+ }
+
+ public String getRepresentationText(String representationID) {
+ String result = ParepValidator.STANDARD_REPRESENTATION_TEXT;
+ if (partyRepresentatives != null) {
+ PartyRepresentative pr = (PartyRepresentative) partyRepresentatives.get(representationID);
+ if (pr != null) {
+ if (!ParepUtils.isEmpty(pr.getRepresentationText())) result = pr.getRepresentationText();
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @return the input processor classname corresponding to <code>representationID</code>
+ * @param representationID
+ * the representation ID.
+ */
+ public String getInputProcessorClass(String representationID) {
+ String inputProcessorClass = standardInputProcessorClass;
+ if (ParepUtils.isEmpty(inputProcessorClass)) inputProcessorClass = ParepValidator.PAREP_INPUT_PROCESSOR;
+ if (!(partyRepresentatives == null || "*".equals(representationID))) {
+ PartyRepresentative pr = (PartyRepresentative) partyRepresentatives.get(representationID);
+ if (pr!=null) {
+ String prInputProcessorClass = pr.getInputProcessorClass();
+ if (!ParepUtils.isEmpty(prInputProcessorClass)) inputProcessorClass = prInputProcessorClass;
+ }
+ }
+ return inputProcessorClass;
+ }
+
+ /**
+ * @param standardInputProcessorClass the standardInputProcessorClass to set
+ */
+ public void setStandardInputProcessorClass(String standardInputProcessorClass) {
+ this.standardInputProcessorClass = standardInputProcessorClass;
+ }
+
+ /**
+ * @return the InputProcessorTemplate
+ */
+ public String getInputProcessorTemplate(String representationID) {
+ String inputProcessorTemplate = standardInputProcessorTemplate;
+ if (ParepUtils.isEmpty(inputProcessorTemplate)) inputProcessorTemplate = ParepValidator.PAREP_INPUT_TEMPLATE;
+ if (!(partyRepresentatives == null || "*".equals(representationID))) {
+ PartyRepresentative pr = (PartyRepresentative) partyRepresentatives.get(representationID);
+ if (pr!=null) {
+ String prInputProcessorTemplate = pr.getInputProcessorTemplate();
+ if (!ParepUtils.isEmpty(prInputProcessorTemplate)) inputProcessorTemplate = prInputProcessorTemplate;
+ }
+ }
+ return inputProcessorTemplate;
+ }
+
+ /**
+ * @param standardInputProcessorTemplate the standardInputProcessorTemplate to set
+ */
+ public void setStandardInputProcessorTemplate(String standardInputProcessorTemplate) {
+ this.standardInputProcessorTemplate = standardInputProcessorTemplate;
+ }
+
+ /**
+ * @return the alwaysShowForm
+ */
+ public boolean isAlwaysShowForm() {
+ return alwaysShowForm;
+ }
+
+ /**
+ * @param alwaysShowForm the alwaysShowForm to set
+ */
+ public void setAlwaysShowForm(String alwaysShowForm) {
+ if (ParepUtils.isEmpty(alwaysShowForm)) {
+ this.alwaysShowForm = false;
+ } else {
+ this.alwaysShowForm = alwaysShowForm.equalsIgnoreCase("true");
+ }
+ }
+
+ public static boolean isMandateCompatibilityMode(Element configElement) throws ConfigurationException {
+ try {
+ if (configElement==null) return false;
+ Element nameSpaceNode = configElement.getOwnerDocument().createElement("NameSpaceNode");
+ nameSpaceNode.setAttribute("xmlns:" + Constants.MOA_ID_CONFIG_PREFIX, Constants.MOA_ID_CONFIG_NS_URI);
+ Node mandateCompatibilityNode = XPathAPI.selectSingleNode(configElement, Constants.MOA_ID_CONFIG_PREFIX + ":CompatibilityMode/text()", nameSpaceNode);
+ if (mandateCompatibilityNode != null && !ParepUtils.isEmpty(mandateCompatibilityNode.getNodeValue())) {
+ return mandateCompatibilityNode.getNodeValue().equalsIgnoreCase("true");
+ }
+ return false;
+ } catch (Exception e) {
+ throw new ConfigurationException("Allgemeiner Fehler beim Parsen des CompatibilityMode Parameters.", null, e);
+ }
+
+ }
+
+
+// public static void main(String[] args) throws Exception {
+// System.setProperty(PAREP_VALIDATOR_CONFIG, "c:/Doku/work/Organwalter/ConfigurationSnippetAppSpecific.xml");
+// System.setProperty("moa.id.configuration", "c:/workspace33moa/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/conf/moa-id/SampleMOAWIDConfiguration_withTestBKsProxy.xml");
+// System.setProperty("log4j.configuration", "file:c:/workspace33moa/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/conf/moa-id/log4j.properties");
+// Configuration cfg = new Configuration(null);
+// System.out.println(cfg.getInputProcessorClass("1.2.40.0.10.3.110"));
+//}
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationBuilder.java
new file mode 100644
index 000000000..b5275cdd5
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationBuilder.java
@@ -0,0 +1,989 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.config;
+
+import iaik.pki.pathvalidation.ChainingModes;
+import iaik.utils.RFC2253NameParser;
+import iaik.utils.RFC2253NameParserException;
+
+import java.math.BigInteger;
+import java.security.Principal;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.traversal.NodeIterator;
+
+import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants;
+import at.gv.egovernment.moa.id.auth.data.Schema;
+import at.gv.egovernment.moa.id.auth.data.SchemaImpl;
+import at.gv.egovernment.moa.id.config.auth.OAAuthParameter;
+import at.gv.egovernment.moa.id.config.auth.VerifyInfoboxParameter;
+import at.gv.egovernment.moa.id.config.auth.VerifyInfoboxParameters;
+import at.gv.egovernment.moa.id.data.IssuerAndSerial;
+import at.gv.egovernment.moa.id.util.MOAIDMessageProvider;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.BoolUtils;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.FileUtils;
+import at.gv.egovernment.moa.util.StringUtils;
+import at.gv.egovernment.moa.util.XPathException;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+/**
+ * A class that builds configuration data from a DOM based representation.
+ *
+ * @author Patrick Peck
+ * @author Stefan Knirsch
+ * @version $Id$
+ */
+public class ConfigurationBuilder {
+
+ //
+ // XPath namespace prefix shortcuts
+ //
+ /** an XPATH-Expression */
+ protected static final String CONF = Constants.MOA_ID_CONFIG_PREFIX + ":";
+ /** an XPATH-Expression */
+ protected static final String DSIG = Constants.DSIG_PREFIX + ":";
+
+ //
+ // chaining mode constants appearing in the configuration file
+ //
+ /** an XPATH-Expression */
+ protected static final String CM_CHAINING = "chaining";
+ /** an XPATH-Expression */
+ protected static final String CM_PKIX = "pkix";
+ /** an XPATH-Expression */
+ protected static final String DEFAULT_ENCODING = "UTF-8";
+
+ //
+ // XPath expressions to select certain parts of the configuration
+ //
+ /** an XPATH-Expression */
+ protected static final String ROOT = "/" + CONF + "MOA-IDConfiguration/";
+
+ /** an XPATH-Expression */
+ protected static final String AUTH_BKU_XPATH =
+ ROOT + CONF + "AuthComponent/" + CONF + "BKUSelection";
+ /** an XPATH-Expression */
+ protected static final String AUTH_BKUSELECT_TEMPLATE_XPATH =
+ ROOT + CONF + "AuthComponent/" + CONF + "Templates/" + CONF + "BKUSelectionTemplate/@URL";
+ /** an XPATH-Expression */
+ protected static final String AUTH_TEMPLATE_XPATH =
+ ROOT + CONF + "AuthComponent/" + CONF + "Templates/" + CONF + "Template/@URL";
+ /** an XPATH-Expression */
+ protected static final String INPUT_PROCESSOR_TEMPLATE_XPATH =
+ ROOT + CONF + "AuthComponent/" + CONF + "Templates/" + CONF + "InputProcessorSignTemplate/@URL";
+ /** an XPATH-Expression */
+ public static final String AUTH_SECLAYER_TRANSFORMS_INFO_FILENAME_XPATH =
+ ROOT + CONF + "AuthComponent/" + CONF + "SecurityLayer/" + CONF + "TransformsInfo/@filename";
+ /** an XPATH-Expression */
+ protected static final String AUTH_MOA_SP_XPATH =
+ ROOT + CONF + "AuthComponent/" + CONF + "MOA-SP";
+ /** an XPATH-Expression */
+ protected static final String AUTH_MOA_SP_VERIFY_IDENTITY_TRUST_ID_XPATH =
+ ROOT + CONF + "AuthComponent/" + CONF + "MOA-SP/" + CONF + "VerifyIdentityLink/" + CONF + "TrustProfileID";
+ /** an XPATH-Expression */
+ protected static final String AUTH_MOA_SP_VERIFY_AUTH_TRUST_ID_XPATH =
+ ROOT + CONF + "AuthComponent/" + CONF + "MOA-SP/" + CONF + "VerifyAuthBlock/" + CONF + "TrustProfileID";
+ /** an XPATH-Expression */
+ protected static final String AUTH_MOA_SP_VERIFY_AUTH_VERIFY_ID_XPATH =
+ ROOT + CONF + "AuthComponent/" + CONF + "MOA-SP/" + CONF + "VerifyAuthBlock/" + CONF + "VerifyTransformsInfoProfileID";
+
+ /** an XPATH-Expression */
+ protected static final String AUTH_IDENTITY_LINK_X509SUBJECTNAME_XPATH =
+ ROOT + CONF + "AuthComponent/" + CONF + "IdentityLinkSigners/" + CONF + "X509SubjectName";
+
+ /** an XPATH-Expression */
+ public static final String AUTH_VERIFY_INFOBOXES_XPATH =
+ ROOT + CONF + "AuthComponent/" + CONF + "VerifyInfoboxes";
+
+ /** an XPATH-Expression */
+ public static final String AUTH_FOREIGN_IDENTITIES_XPATH =
+ ROOT + CONF + "AuthComponent/" + CONF + "ForeignIdentities";
+
+ /** an XPATH-Expression */
+ public static final String AUTH_ONLINEMANDATES_XPATH =
+ ROOT + CONF + "AuthComponent/" + CONF + "OnlineMandates";
+
+
+
+ /** an XPATH-Expression */
+ protected static final String OA_XPATH = ROOT + CONF + "OnlineApplication";
+ /** an XPATH-Expression */
+ protected static final String OA_LOGIN_XPATH = ROOT + CONF + "OnlineApplication/@loginURL";
+ /** an XPATH-Expression */
+ protected static final String OA_AUTH_COMPONENT_XPATH = CONF + "AuthComponent";
+ /** an XPATH-Expression */
+ protected static final String OA_AUTH_COMPONENT_IDENT_NUMBER_XPATH = CONF + "IdentificationNumber";
+ /** an XPATH-Expression */
+ protected static final String OA_AUTH_COMPONENT_BKUSELECT_TEMPLATE_XPATH =
+ CONF + "Templates/" + CONF + "BKUSelectionTemplate/@URL";
+ /** an XPATH-Expression */
+ protected static final String OA_AUTH_COMPONENT_TEMPLATE_XPATH =
+ CONF + "Templates/" + CONF + "Template/@URL";
+ /** an XPATH-Expression */
+ protected static final String OA_AUTH_COMPONENT_TRANSFORMS_INFO_FILENAME_XPATH = CONF + "TransformsInfo/@filename";
+ /** an XPATH-Expression */
+ protected static final String OA_AUTH_COMPONENT_VERIFY_INFOBOXES_XPATH = CONF + "VerifyInfoboxes";
+ /** an XPATH-Expression */
+ protected static final String OA_AUTH_COMPONENT_MANDATES_PROFILES_XPATH = CONF + "Mandates" + "/" + CONF + "Profiles";
+ /** an XPATH-Expression */
+ protected static final String CONNECTION_PARAMETER_URL_XPATH =
+ CONF + "ConnectionParameter/@URL";
+ /** an XPATH-Expression */
+ protected static final String CONNECTION_PARAMETER_ACCEPTED_CERTS_XPATH =
+ CONF + "ConnectionParameter/" + CONF + "AcceptedServerCertificates";
+ /** an XPATH-Expression */
+ protected static final String CONNECTION_PARAMETERN_KEYSTORE_XPATH =
+ CONF + "ConnectionParameter/" + CONF + "ClientKeyStore";
+ /** an XPATH-Expression */
+ protected static final String CONNECTION_PARAMETER_KEYSTORE_PASS_XPATH =
+ CONNECTION_PARAMETERN_KEYSTORE_XPATH + "/@password";
+ /** an XPATH-Expression */
+ protected static final String GENERIC_CONFIGURATION_XPATH =
+ ROOT + CONF + "GenericConfiguration";
+
+ /** an XPATH-Expression */
+ protected static final String TRUSTED_BKUS =
+ ROOT + CONF + "TrustedBKUs/" + CONF + "BKUURL";
+
+ /** an XPATH-Expression */
+ protected static final String CHAINING_MODES_XPATH =
+ ROOT + CONF + "ChainingModes";
+ /** an XPATH-Expression */
+ protected static final String CHAINING_MODES_DEFAULT_XPATH =
+ CHAINING_MODES_XPATH + "/@systemDefaultMode";
+ /** an XPATH-Expression */
+ protected static final String TRUST_ANCHOR_XPATH =
+ ROOT + CONF + "ChainingModes/" + CONF + "TrustAnchor";
+ /** an XPATH-Expression */
+ protected static final String ISSUER_XPATH = DSIG + "X509IssuerName";
+ /** an XPATH-Expression */
+ protected static final String SERIAL_XPATH = DSIG + "X509SerialNumber";
+ /** an XPATH-Expression */
+ protected static final String TRUSTED_CA_CERTIFICATES_XPATH =
+ ROOT + CONF + "TrustedCACertificates";
+
+ /** an XPATH-Expression */
+ protected static final String VERIFY_INFOBOXES_DEFAULT_TRUST_PROFILE_XPATH = CONF + "DefaultTrustProfile";
+ /** an XPATH-Expression */
+ protected static final String VERIFY_INFOBOXES_TRUST_PROFILE_ID_XPATH = CONF + "TrustProfileID";
+ /** an XPATH-Expression */
+ protected static final String VERIFY_INFOBOXES_INFOBOX_XPATH = CONF + "Infobox";
+
+
+
+
+ /**
+ * main configuration file directory name used to configure MOA-ID
+ */
+ protected String rootConfigFileDir_;
+
+ /** The root element of the MOA-ID configuration */
+ protected Element configElem_;
+
+ /**
+ * Creates a new <code>MOAConfigurationProvider</code>.
+ *
+ * @param configElem The root element of the MOA-ID configuration.
+ */
+ public ConfigurationBuilder(Element configElem, String rootConfigDir) {
+ configElem_ = configElem;
+ rootConfigFileDir_ = rootConfigDir;
+ }
+
+ /**
+ * Returns the root element of the MOA-ID configuration.
+ *
+ * @return The root element of the MOA-ID configuration.
+ */
+ public Element getConfigElem() {
+ return configElem_;
+ }
+
+ /**
+ * Build a ConnectionParameter object containing all information
+ * of the moa-sp element in the authentication component
+ * @return ConnectionParameter of the authentication component moa-sp element
+ */
+ public ConnectionParameter buildAuthBKUConnectionParameter() {
+
+ Element authBKU = (Element) XPathUtils.selectSingleNode(configElem_, AUTH_BKU_XPATH);
+ if (authBKU==null) return null;
+ return buildConnectionParameter(authBKU);
+ }
+
+ /**
+ * Build a ConnectionParameter containing all information
+ * of the foreignid element in the authentication component
+ * @return ConnectionParameter of the authentication component foreignid element
+ */
+ public ConnectionParameter buildForeignIDConnectionParameter() {
+ Element foreignid = (Element)XPathUtils.selectSingleNode(configElem_, AUTH_FOREIGN_IDENTITIES_XPATH);
+ if (foreignid==null) return null;
+ return buildConnectionParameter(foreignid);
+
+ }
+
+ /**
+ * Build a ConnectionParameter containing all information
+ * of the OnlineMandates element in the authentication component
+ * @return ConnectionParameter of the authentication component OnlineMandates element
+ */
+ public ConnectionParameter buildOnlineMandatesConnectionParameter() {
+ Element onlinemandates = (Element)XPathUtils.selectSingleNode(configElem_, AUTH_ONLINEMANDATES_XPATH);
+ if (onlinemandates==null) return null;
+ return buildConnectionParameter(onlinemandates);
+
+ }
+
+ /**
+ * Method buildAuthBKUSelectionType.
+ *
+ * Build a string with the configuration value of BKUSelectionAlternative
+ *
+ * @return String
+ */
+ public String buildAuthBKUSelectionType() {
+
+ Element authBKU = (Element) XPathUtils.selectSingleNode(configElem_, AUTH_BKU_XPATH);
+ if (authBKU==null) return null;
+ return (authBKU).getAttribute("BKUSelectionAlternative");
+ }
+
+ /**
+ * Build a string array with all filenames leading
+ * to the Transforms Information for the Security Layer
+ * @param contextNode The node from which should be searched
+ * @param xpathExpr The XPATH expression for the search
+ * @return String[] of filenames to the Security Layer Transforms Information
+ * or <code>null</code> if no transforms are included
+ */
+ public String[] buildTransformsInfoFileNames(Node contextNode, String xpathExpr) {
+
+ List transformsInfoFileNames = new ArrayList();
+
+ try {
+ NodeIterator tiIter = XPathUtils.selectNodeIterator(contextNode, xpathExpr);
+
+ Attr tiElem;
+ while ((tiElem = (Attr) tiIter.nextNode()) != null) {
+ String tiFileName = tiElem.getNodeValue();
+ transformsInfoFileNames.add(tiFileName);
+ }
+
+ String[] result = new String[transformsInfoFileNames.size()];
+ transformsInfoFileNames.toArray(result);
+
+ return result;
+ } catch (XPathException xpe) {
+ return new String[0];
+ }
+ }
+
+
+ /**
+ * Loads the <code>transformsInfos</code> from files.
+ * @throws Exception on any exception thrown
+ */
+ public String[] loadTransformsInfos(String[] transformsInfoFileNames) throws Exception {
+
+ String[] transformsInfos = new String[transformsInfoFileNames.length];
+ for (int i = 0; i < transformsInfoFileNames.length; i++) {
+ String fileURL = transformsInfoFileNames[i];
+
+ //if fileURL is relative to rootConfigFileDir make it absolute
+ fileURL = FileUtils.makeAbsoluteURL(fileURL, rootConfigFileDir_);
+ String transformsInfo = FileUtils.readURL(fileURL, DEFAULT_ENCODING);
+ transformsInfos[i] = transformsInfo;
+ }
+ return transformsInfos;
+ }
+
+ /**
+ * Build a ConnectionParameter bean containing all information
+ * of the authentication component moa-sp element
+ * @return ConnectionParameter of the authentication component moa-sp element
+ */
+ public ConnectionParameter buildMoaSpConnectionParameter() {
+
+ Element connectionParameter = (Element) XPathUtils.selectSingleNode(configElem_, AUTH_MOA_SP_XPATH);
+ if (connectionParameter==null) return null;
+ return buildConnectionParameter(connectionParameter);
+ }
+
+ /**
+ * Return a string with a url-reference to the VerifyIdentityLink trust
+ * profile id within the moa-sp part of the authentication component
+ * @return String with a url-reference to the VerifyIdentityLink trust profile ID
+ */
+ public String getMoaSpIdentityLinkTrustProfileID() {
+ return XPathUtils.getElementValue(
+ configElem_,
+ AUTH_MOA_SP_VERIFY_IDENTITY_TRUST_ID_XPATH,
+ "");
+ }
+ /**
+ * Return a string representation of an URL pointing to trusted CA Certificates
+ * @return String representation of an URL pointing to trusted CA Certificates
+ */
+ public String getTrustedCACertificates() {
+ return XPathUtils.getElementValue(
+ configElem_,
+ TRUSTED_CA_CERTIFICATES_XPATH,null);
+ }
+
+ /**
+ * Return a string with a url-reference to the VerifyAuthBlock trust
+ * profile id within the moa-sp part of the authentication component
+ * @return String with a url-reference to the VerifyAuthBlock trust profile ID
+ */
+ public String getMoaSpAuthBlockTrustProfileID() {
+ return XPathUtils.getElementValue(
+ configElem_,
+ AUTH_MOA_SP_VERIFY_AUTH_TRUST_ID_XPATH,
+ "");
+ }
+ /**
+ * Build a string array with references to all verify transform info
+ * IDs within the moa-sp part of the authentication component
+ * @return A string array containing all urls to the
+ * verify transform info IDs
+ */
+ public String[] buildMoaSpAuthBlockVerifyTransformsInfoIDs() {
+
+ List verifyTransformsInfoIDs = new ArrayList();
+ NodeIterator vtIter =
+ XPathUtils.selectNodeIterator(
+ configElem_,
+ AUTH_MOA_SP_VERIFY_AUTH_VERIFY_ID_XPATH);
+ Element vtElem;
+
+ while ((vtElem = (Element) vtIter.nextNode()) != null) {
+
+ String vtInfoIDs = DOMUtils.getText(vtElem);
+ verifyTransformsInfoIDs.add(vtInfoIDs);
+ }
+ String[] result = new String[verifyTransformsInfoIDs.size()];
+ verifyTransformsInfoIDs.toArray(result);
+
+ return result;
+ }
+
+ public List getTrustedBKUs() {
+
+ List trustedBKUs = new ArrayList();
+
+ NodeIterator bkuIter = XPathUtils.selectNodeIterator(configElem_, TRUSTED_BKUS);
+
+ Element vtElem;
+
+ while ((vtElem = (Element) bkuIter.nextNode()) != null) {
+ String bkuURL = DOMUtils.getText(vtElem);
+ trustedBKUs.add(bkuURL);
+ }
+
+ return trustedBKUs;
+
+ }
+
+ /**
+ * Returns a list containing all X509 Subject Names
+ * of the Identity Link Signers
+ * @return a list containing the configured identity-link signer X509 subject names
+ */
+ public List getIdentityLink_X509SubjectNames() {
+
+ Vector x509SubjectNameList = new Vector();
+ NodeIterator x509Iter =
+ XPathUtils.selectNodeIterator(
+ configElem_,
+ AUTH_IDENTITY_LINK_X509SUBJECTNAME_XPATH);
+ Element x509Elem;
+
+ while ((x509Elem = (Element) x509Iter.nextNode()) != null) {
+ String vtInfoIDs = DOMUtils.getText(x509Elem);
+ x509SubjectNameList.add(vtInfoIDs);
+ }
+
+ // now add the default identity link signers
+ String[] identityLinkSignersWithoutOID = MOAIDAuthConstants.IDENTITY_LINK_SIGNERS_WITHOUT_OID;
+ for (int i=0; i<identityLinkSignersWithoutOID.length; i++) {
+ String identityLinkSigner = identityLinkSignersWithoutOID[i];
+ if (!x509SubjectNameList.contains(identityLinkSigner)) {
+ x509SubjectNameList.add(identityLinkSigner);
+ }
+ }
+
+ return x509SubjectNameList;
+ }
+
+ /**
+ * Build an array of the OnlineApplication Parameters containing information
+ * about the authentication component
+ *
+ * @param defaultVerifyInfoboxParameters Default parameters for verifying additional
+ * infoboxes. Maybe <code>null</code>.
+ * @param 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.
+ *
+ * @return An OAProxyParameter array containing beans
+ * with all relevant information for the authentication component of the online
+ * application
+ */
+ public OAAuthParameter[] buildOnlineApplicationAuthParameters(
+ VerifyInfoboxParameters defaultVerifyInfoboxParameters, String moaSpIdentityLinkTrustProfileID)
+ throws ConfigurationException
+ {
+
+ String bkuSelectionTemplateURL =
+ XPathUtils.getAttributeValue(configElem_, AUTH_BKUSELECT_TEMPLATE_XPATH, null);
+ String templateURL =
+ XPathUtils.getAttributeValue(configElem_, AUTH_TEMPLATE_XPATH, null);
+ String inputProcessorSignTemplateURL =
+ XPathUtils.getAttributeValue(configElem_, INPUT_PROCESSOR_TEMPLATE_XPATH, null);
+
+ List OA_set = new ArrayList();
+ NodeList OAIter = XPathUtils.selectNodeList(configElem_, OA_XPATH);
+
+ for (int i = 0; i < OAIter.getLength(); i++) {
+ Element oAElem = (Element) OAIter.item(i);
+ Element authComponent =
+ (Element) XPathUtils.selectSingleNode(oAElem, OA_AUTH_COMPONENT_XPATH);
+
+ OAAuthParameter oap = new OAAuthParameter();
+ String publicURLPrefix = oAElem.getAttribute("publicURLPrefix");
+ oap.setPublicURLPrefix(publicURLPrefix);
+ oap.setKeyBoxIdentier(oAElem.getAttribute("keyBoxIdentifier"));
+ oap.setFriendlyName(oAElem.getAttribute("friendlyName"));
+
+ // get the type of the online application
+ String oaType = oAElem.getAttribute("type");
+ oap.setOaType(oaType);
+ String slVersion = "1.1";
+ if ("businessService".equalsIgnoreCase(oaType)) {
+ if (authComponent==null) {
+ Logger.error("Missing \"AuthComponent\" for OA of type \"businessService\"");
+ throw new ConfigurationException("config.02", null);
+ }
+ Element identificationNumberElem =
+ (Element) XPathUtils.selectSingleNode(authComponent, OA_AUTH_COMPONENT_IDENT_NUMBER_XPATH);
+ if (identificationNumberElem==null) {
+ Logger.error("Missing \"IdentificationNumber\" for OA of type \"businessService\"");
+ throw new ConfigurationException("config.02", null);
+ }
+ Element identificationNumberChild = DOMUtils.getElementFromNodeList(identificationNumberElem.getChildNodes());
+ if (identificationNumberChild == null) {
+ Logger.error("Missing \"IdentificationNumber\" for OA of type \"businessService\"");
+ throw new ConfigurationException("config.02", null);
+ }
+ if ("false".equalsIgnoreCase(oAElem.getAttribute("calculateHPI"))) {
+ oap.setIdentityLinkDomainIdentifier(buildIdentityLinkDomainIdentifier(identificationNumberChild));
+ //BZ.., setting type of IdLinkDomainIdentifier
+ oap.setIdentityLinkDomainIdentifierType(identificationNumberChild.getLocalName());
+ //..BZ
+ } else {
+ // If we have business service and want to dealt with GDA, the security layer can be advised to calulate
+ // the Health Professional Identifier HPI instead of the wbPK
+ Logger.info("OA uses HPI for Identification");
+ oap.setIdentityLinkDomainIdentifier(Constants.URN_PREFIX_HPI);
+ }
+
+ // if OA type is "businessSErvice" set slVersion to 1.2 and ignore parameter in config file
+ Logger.info("OA type is \"businessService\"; setting Security Layer version to 1.2");
+ slVersion = "1.2";
+
+ } else {
+
+ if (authComponent!=null) {
+ slVersion = authComponent.getAttribute("slVersion");
+ }
+
+ }
+ oap.setSlVersion(slVersion);
+ //Check if there is an Auth-Block to read from configuration
+
+ if (authComponent!=null)
+ {
+ oap.setProvideStammzahl(BoolUtils.valueOf(authComponent.getAttribute("provideStammzahl")));
+ oap.setProvideAuthBlock(BoolUtils.valueOf(authComponent.getAttribute("provideAUTHBlock")));
+ oap.setProvideIdentityLink(BoolUtils.valueOf(authComponent.getAttribute("provideIdentityLink")));
+ oap.setProvideCertificate(BoolUtils.valueOf(authComponent.getAttribute("provideCertificate")));
+ oap.setBkuSelectionTemplateURL(buildTemplateURL(authComponent, OA_AUTH_COMPONENT_BKUSELECT_TEMPLATE_XPATH, bkuSelectionTemplateURL));
+ oap.setTemplateURL(buildTemplateURL(authComponent, OA_AUTH_COMPONENT_TEMPLATE_XPATH, templateURL));
+ oap.setInputProcessorSignTemplateURL(buildTemplateURL(authComponent, INPUT_PROCESSOR_TEMPLATE_XPATH, inputProcessorSignTemplateURL));
+ // load OA specific transforms if present
+ String[] transformsInfoFileNames = buildTransformsInfoFileNames(authComponent, OA_AUTH_COMPONENT_TRANSFORMS_INFO_FILENAME_XPATH);
+ try {
+ oap.setTransformsInfos(loadTransformsInfos(transformsInfoFileNames));
+ } catch (Exception ex) {
+ Logger.error("Error loading transforms specified for OA \"" + publicURLPrefix + "\"; using default transforms.");
+ }
+ Node verifyInfoboxParamtersNode = XPathUtils.selectSingleNode(authComponent, OA_AUTH_COMPONENT_VERIFY_INFOBOXES_XPATH);
+ oap.setVerifyInfoboxParameters(buildVerifyInfoboxParameters(
+ verifyInfoboxParamtersNode, defaultVerifyInfoboxParameters, moaSpIdentityLinkTrustProfileID));
+
+ Node mandateProfilesNode = XPathUtils.selectSingleNode(authComponent, OA_AUTH_COMPONENT_MANDATES_PROFILES_XPATH);
+ if (mandateProfilesNode != null) {
+ if ("businessService".equalsIgnoreCase(oaType)) {
+ Logger.error("No Online Mandate Modus for OA of type \"businessService\" allowed.");
+ throw new ConfigurationException("config.02", null);
+ }
+ else {
+ String profiles = DOMUtils.getText(mandateProfilesNode);
+ oap.setMandateProfiles(profiles);
+ }
+ }
+ }
+ OA_set.add(oap);
+ }
+ OAAuthParameter[] result =
+ new OAAuthParameter[OA_set.size()];
+ OA_set.toArray(result);
+
+ return result;
+
+ }
+
+ /**
+ * Builds the URL for a BKUSelectionTemplate or a Template. The method selects
+ * the uri string from the MOA ID configuration file via the given xpath expression
+ * and returns either this string or the default value.
+ *
+ * @param oaAuthComponent The AuthComponent element to get the template from.
+ * @param xpathExpr The xpath expression for selecting the template uri.
+ * @param defaultURL The default template url.
+ * @return The template url. This may either the via xpath selected uri
+ * or, if no template is specified within the online appliacation,
+ * the default url. Both may be <code>null</code>.
+ */
+ protected String buildTemplateURL(Element oaAuthComponent, String xpathExpr, String defaultURL) {
+ String templateURL = XPathUtils.getAttributeValue(oaAuthComponent, xpathExpr, defaultURL);
+ if (templateURL != null) {
+ templateURL = FileUtils.makeAbsoluteURL(templateURL, rootConfigFileDir_);
+ }
+ return templateURL;
+ }
+
+
+ /**
+ * Method buildConnectionParameter: internal Method for creating a
+ * ConnectionParameter object with all data found in the incoming element
+ * @param root This Element contains the ConnectionParameter
+ * @return ConnectionParameter
+ */
+ protected ConnectionParameter buildConnectionParameter(Element root)
+ {
+ ConnectionParameter result = new ConnectionParameter();
+ result.setAcceptedServerCertificates(
+ XPathUtils.getElementValue(root,CONNECTION_PARAMETER_ACCEPTED_CERTS_XPATH,null));
+
+ result.setAcceptedServerCertificates(FileUtils.makeAbsoluteURL(
+ result.getAcceptedServerCertificates(), rootConfigFileDir_));
+
+ result.setUrl(
+ XPathUtils.getAttributeValue(root, CONNECTION_PARAMETER_URL_XPATH, ""));
+ result.setClientKeyStore(
+ XPathUtils.getElementValue(root,CONNECTION_PARAMETERN_KEYSTORE_XPATH,null));
+
+ result.setClientKeyStore(FileUtils.makeAbsoluteURL(
+ result.getClientKeyStore(), rootConfigFileDir_));
+
+ result.setClientKeyStorePassword(
+ XPathUtils.getAttributeValue(root,CONNECTION_PARAMETER_KEYSTORE_PASS_XPATH,""));
+
+ if ((result.getAcceptedServerCertificates()==null)
+ && (result.getUrl()=="")
+ && (result.getClientKeyStore()==null)
+ && (result.getClientKeyStorePassword()==""))
+ return null;
+
+ return result;
+ }
+
+
+ /**
+ * Build the mapping of generic configuration properties.
+ *
+ * @return a {@link Map} of generic configuration properties (a name to value
+ * mapping) from the configuration.
+ */
+ public Map buildGenericConfiguration() {
+
+ Map genericConfiguration = new HashMap();
+ NodeIterator gcIter =
+ XPathUtils.selectNodeIterator(
+ configElem_,
+ GENERIC_CONFIGURATION_XPATH);
+ Element gcElem;
+
+ while ((gcElem = (Element) gcIter.nextNode()) != null) {
+ String gcName = gcElem.getAttribute("name");
+ String gcValue = gcElem.getAttribute("value");
+
+ genericConfiguration.put(gcName, gcValue);
+ }
+
+ return genericConfiguration;
+ }
+
+
+ /**
+ * Returns the default chaining mode from the configuration.
+ *
+ * @return The default chaining mode.
+ */
+ public String getDefaultChainingMode() {
+ String defaultChaining =
+ XPathUtils.getAttributeValue(
+ configElem_,
+ CHAINING_MODES_DEFAULT_XPATH,
+ CM_CHAINING);
+
+ return translateChainingMode(defaultChaining);
+
+ }
+ /**
+ * Build the chaining modes for all configured trust anchors.
+ *
+ * @return The mapping from trust anchors to chaining modes.
+ */
+ public Map buildChainingModes() {
+ Map chainingModes = new HashMap();
+ NodeIterator trustIter =
+ XPathUtils.selectNodeIterator(configElem_, TRUST_ANCHOR_XPATH);
+ Element trustAnchorElem;
+
+ while ((trustAnchorElem = (Element) trustIter.nextNode()) != null) {
+ IssuerAndSerial issuerAndSerial = buildIssuerAndSerial(trustAnchorElem);
+ String mode = trustAnchorElem.getAttribute("mode");
+
+ if (issuerAndSerial != null) {
+ chainingModes.put(issuerAndSerial, translateChainingMode(mode));
+ }
+ }
+
+ return chainingModes;
+ }
+
+ /**
+ * Build an <code>IssuerAndSerial</code> from the DOM representation.
+ *
+ * @param root The root element (being of type <code>dsig:
+ * X509IssuerSerialType</code>.
+ * @return The issuer and serial number contained in the <code>root</code>
+ * element or <code>null</code> if could not be built for any reason.
+ */
+ protected IssuerAndSerial buildIssuerAndSerial(Element root) {
+ String issuer = XPathUtils.getElementValue(root, ISSUER_XPATH, null);
+ String serial = XPathUtils.getElementValue(root, SERIAL_XPATH, null);
+
+ if (issuer != null && serial != null) {
+ try {
+ RFC2253NameParser nameParser = new RFC2253NameParser(issuer);
+ Principal issuerDN = nameParser.parse();
+
+ return new IssuerAndSerial(issuerDN, new BigInteger(serial));
+ } catch (RFC2253NameParserException e) {
+ warn("config.09", new Object[] { issuer, serial }, e);
+ return null;
+ } catch (NumberFormatException e) {
+ warn("config.09", new Object[] { issuer, serial }, e);
+ return null;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Translate the chaining mode from the configuration file to one used in the
+ * IAIK MOA API.
+ *
+ * @param chainingMode The chaining mode from the configuration.
+ * @return The chaining mode as provided by the <code>ChainingModes</code>
+ * interface.
+ * @see iaik.pki.pathvalidation.ChainingModes
+ */
+ protected String translateChainingMode(String chainingMode) {
+ if (chainingMode.equals(CM_CHAINING)) {
+ return ChainingModes.CHAIN_MODE;
+ } else if (chainingMode.equals(CM_PKIX)) {
+ return ChainingModes.PKIX_MODE;
+ } else {
+ return ChainingModes.CHAIN_MODE;
+ }
+ }
+
+ /**
+ * Builds the IdentityLinkDomainIdentifier as needed for providing it to the
+ * SecurityLayer for computation of the wbPK.
+ * <p>e.g.:<br>
+ * input element:
+ * <br>
+ * <code>&lt;pr:Firmenbuchnummer Identifier="FN"&gt;000468 i&lt;/pr:Firmenbuchnummer&gt;</code>
+ * <p>
+ * return value: <code>urn:publicid:gv.at+wbpk+FN468i</code>
+ *
+ * @param number The element holding the identification number of the business
+ * company.
+ * @return The domain identifier
+ */
+ protected String buildIdentityLinkDomainIdentifier(Element number) {
+ if (number == null) {
+ return null;
+ }
+ String identificationNumber = number.getFirstChild().getNodeValue();
+ String identifier = number.getAttribute("Identifier");
+ // remove all blanks
+ identificationNumber = StringUtils.removeBlanks(identificationNumber);
+ if (number.getLocalName().equals("Firmenbuchnummer") || identifier.equalsIgnoreCase("fn") || identifier.equalsIgnoreCase("xfn")) {
+ // delete zeros from the beginning of the number
+ identificationNumber = StringUtils.deleteLeadingZeros(identificationNumber);
+ // remove hyphens
+ identificationNumber = StringUtils.removeToken(identificationNumber, "-");
+ }
+ StringBuffer identityLinkDomainIdentifier = new StringBuffer(Constants.URN_PREFIX_WBPK);
+ identityLinkDomainIdentifier.append("+");
+ if (!identificationNumber.startsWith(identifier)) {
+ identityLinkDomainIdentifier.append(identifier);
+ }
+ identityLinkDomainIdentifier.append("+");
+ identityLinkDomainIdentifier.append(identificationNumber);
+ return identityLinkDomainIdentifier.toString();
+ }
+
+ /**
+ * Builds the parameters for verifying additional infoboxes (additional to the
+ * IdentityLink infobox).
+ *
+ * @param verifyInfoboxesElem The <code>VerifyInfoboxes</code> element from the
+ * config file. This maybe the global element or the
+ * elment from an Online application.
+ * @param defaultVerifyInfoboxParameters Default parameters to be used, if no
+ * <code>VerifyInfoboxes</code> element is present.
+ * This only applies to parameters
+ * of an specific online application and is set to
+ * <code>null</code> when building the global parameters.
+ * @param 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.
+ *
+ * @return A {@link at.gv.egovernment.moa.id.config.auth.VerifyInfoboxParameters VerifyInfoboxParameters}
+ * object needed for verifying additional infoboxes.
+ *
+ * @throws ConfigurationException If the trust profile for validating the identity link
+ * signer certificate is used for validating another infobox.
+ */
+ public VerifyInfoboxParameters buildVerifyInfoboxParameters(
+ Node verifyInfoboxesElem,
+ VerifyInfoboxParameters defaultVerifyInfoboxParameters,
+ String moaSpIdentityLinkTrustProfileID)
+ throws ConfigurationException
+ {
+
+ if ((verifyInfoboxesElem == null) && (defaultVerifyInfoboxParameters == null)) {
+ return null;
+ }
+ Vector identifiers = new Vector();
+ List defaultIdentifiers = null;
+ Map defaultInfoboxParameters = null;
+ if (defaultVerifyInfoboxParameters != null) {
+ defaultIdentifiers = defaultVerifyInfoboxParameters.getIdentifiers();
+ defaultInfoboxParameters = defaultVerifyInfoboxParameters.getInfoboxParameters();
+ }
+ Hashtable infoboxParameters = new Hashtable();
+ if (verifyInfoboxesElem != null) {
+ // get the DefaultTrustProfileID
+ String defaultTrustProfileID = null;
+ Node defaultTrustProfileNode =
+ XPathUtils.selectSingleNode(verifyInfoboxesElem, VERIFY_INFOBOXES_DEFAULT_TRUST_PROFILE_XPATH);
+ if (defaultTrustProfileNode != null) {
+ Node trustProfileIDNode =
+ XPathUtils.selectSingleNode(defaultTrustProfileNode, VERIFY_INFOBOXES_TRUST_PROFILE_ID_XPATH);
+ defaultTrustProfileID = trustProfileIDNode.getFirstChild().getNodeValue();
+ if (defaultTrustProfileID.equals(moaSpIdentityLinkTrustProfileID)) {
+ throw new ConfigurationException("config.15", new Object[] {moaSpIdentityLinkTrustProfileID});
+ }
+ }
+ // get the Infoboxes
+ NodeList infoboxes =
+ XPathUtils.selectNodeList(verifyInfoboxesElem, VERIFY_INFOBOXES_INFOBOX_XPATH);
+ for (int i=0; i<infoboxes.getLength(); i++) {
+ Element infoBoxElem = (Element)infoboxes.item(i);
+ // get the identifier of the infobox
+ String identifier = infoBoxElem.getAttribute("Identifier");
+ identifiers.add(identifier);
+ VerifyInfoboxParameter verifyInfoboxParameter = new VerifyInfoboxParameter(identifier);
+ verifyInfoboxParameter.setFriendlyName(identifier);
+ // get the attributes
+ // (1) required: override global value in any case
+ verifyInfoboxParameter.setRequired(BoolUtils.valueOf(
+ infoBoxElem.getAttribute("required")));
+ // (2) provideStammzahl: override global value in any case
+ verifyInfoboxParameter.setProvideStammzahl(BoolUtils.valueOf(
+ infoBoxElem.getAttribute("provideStammzahl")));
+ // (3) proviedIdentityLink: override global value in any case
+ verifyInfoboxParameter.setProvideIdentityLink(BoolUtils.valueOf(
+ infoBoxElem.getAttribute("provideIdentityLink")));
+ // set default trustprofileID
+ if (defaultTrustProfileID != null) {
+ verifyInfoboxParameter.setTrustProfileID(defaultTrustProfileID);
+ }
+ // get the parameter elements
+ boolean localValidatorClass = false;
+ boolean localFriendlyName = false;
+ List params = DOMUtils.getChildElements(infoBoxElem);
+ Iterator it = params.iterator();
+ while (it.hasNext()) {
+ Element paramElem = (Element)it.next();
+ String paramName = paramElem.getLocalName();
+ if (paramName.equals("FriendlyName")) {
+ verifyInfoboxParameter.setFriendlyName(paramElem.getFirstChild().getNodeValue());
+ localFriendlyName = true;
+ } else if (paramName.equals("TrustProfileID")) {
+ String trustProfileID = paramElem.getFirstChild().getNodeValue();
+ if (trustProfileID != null) {
+ if (trustProfileID.equals(moaSpIdentityLinkTrustProfileID)) {
+ throw new ConfigurationException("config.15", new Object[] {moaSpIdentityLinkTrustProfileID});
+ }
+ verifyInfoboxParameter.setTrustProfileID(trustProfileID);
+ }
+ } else if (paramName.equals("ValidatorClass")) {
+ String validatorClassName = paramElem.getFirstChild().getNodeValue();
+ if (validatorClassName != null) {
+ verifyInfoboxParameter.setValidatorClassName(validatorClassName);
+ localValidatorClass = true;
+ }
+ } else if (paramName.equals("SchemaLocations")) {
+ List schemaElems = DOMUtils.getChildElements(paramElem);
+ List schemaLocations = new Vector(schemaElems.size());
+ Iterator schemaIterator = schemaElems.iterator();
+ while (schemaIterator.hasNext()) {
+ Element schemaElem = (Element)schemaIterator.next();
+ String namespace = schemaElem.getAttribute("namespace");
+ String schemaLocation = schemaElem.getAttribute("schemaLocation");
+ // avoid adding the same schema twice
+ Iterator schemaLocationIterator = schemaLocations.iterator();
+ boolean add = true;
+ while (schemaLocationIterator.hasNext()) {
+ String existingNamespace = ((Schema)schemaLocationIterator.next()).getNamespace();
+ if (namespace.equals(existingNamespace)) {
+ Logger.warn("Multiple schemas specified for namespace \"" + namespace +
+ "\"; only using the first one.");
+ add = false;
+ break;
+ }
+ }
+ if (add) {
+ schemaLocations.add(new SchemaImpl(namespace, schemaLocation));
+ }
+ }
+ verifyInfoboxParameter.setSchemaLocations(schemaLocations);
+ } else if (paramName.equals("ApplicationSpecificParameters")) {
+ verifyInfoboxParameter.setApplicationSpecificParams(paramElem);
+ } else if (paramName.equals("ParepSpecificParameters")) {
+ verifyInfoboxParameter.appendParepSpecificParams(paramElem);
+ }
+ }
+ // use default values for those parameters not yet set by local configuration
+ if (defaultInfoboxParameters != null) {
+ Object defaultVerifyIP = defaultInfoboxParameters.get(identifier);
+ if (defaultVerifyIP != null) {
+ VerifyInfoboxParameter defaultVerifyInfoboxParameter =
+ (VerifyInfoboxParameter)defaultVerifyIP;
+ // if no friendly is set, use default
+ if (!localFriendlyName) {
+ verifyInfoboxParameter.setFriendlyName(
+ defaultVerifyInfoboxParameter.getFriendlyName());
+ }
+ // if no TrustProfileID is set, use default, if available
+ if (verifyInfoboxParameter.getTrustProfileID() == null) {
+ verifyInfoboxParameter.setTrustProfileID(
+ defaultVerifyInfoboxParameter.getTrustProfileID());
+ }
+ // if no local validator class is set, use default
+ if (!localValidatorClass) {
+ verifyInfoboxParameter.setValidatorClassName(
+ defaultVerifyInfoboxParameter.getValidatorClassName());
+ }
+ // if no schema locations set, use default
+ if (verifyInfoboxParameter.getSchemaLocations() == null) {
+ verifyInfoboxParameter.setSchemaLocations(
+ defaultVerifyInfoboxParameter.getSchemaLocations());
+ }
+ // if no application specific parameters set, use default
+ if (verifyInfoboxParameter.getApplicationSpecificParams() == null) {
+ verifyInfoboxParameter.setApplicationSpecificParams(
+ defaultVerifyInfoboxParameter.getApplicationSpecificParams());
+ }
+ }
+ }
+ infoboxParameters.put(identifier, verifyInfoboxParameter);
+ }
+ // add the infobox identifiers not present within the local configuration to the
+ // identifier list
+ if (defaultIdentifiers != null) {
+ Iterator identifierIterator = defaultIdentifiers.iterator();
+ while (identifierIterator.hasNext()) {
+ String defaultIdentifier = (String)identifierIterator.next();
+ if (!identifiers.contains(defaultIdentifier)) {
+ identifiers.add(defaultIdentifier);
+ }
+ }
+ }
+ return new VerifyInfoboxParameters(identifiers, infoboxParameters);
+ } else {
+ return new VerifyInfoboxParameters(defaultIdentifiers, infoboxParameters);
+ }
+ }
+
+ /**
+ * Method warn.
+ * @param messageId to identify a country-specific message
+ * @param parameters for the logger
+ */
+ //
+ // various utility methods
+ //
+
+ protected static void warn(String messageId, Object[] parameters) {
+ Logger.warn(MOAIDMessageProvider.getInstance().getMessage(messageId, parameters));
+ }
+
+ /**
+ * Method warn.
+ * @param messageId to identify a country-specific message
+ * @param args for the logger
+ * @param t as throwabl
+ */
+ protected static void warn(String messageId, Object[] args, Throwable t) {
+ Logger.warn(MOAIDMessageProvider.getInstance().getMessage(messageId, args), t);
+ }
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationException.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationException.java
new file mode 100644
index 000000000..e5e6c1f55
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationException.java
@@ -0,0 +1,46 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.config;
+
+import at.gv.egovernment.moa.id.MOAIDException;
+
+/**
+ * Exception signalling an error in the configuration.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ConfigurationException extends MOAIDException {
+
+ /**
+ * Create a <code>MOAConfigurationException</code>.
+ */
+ public ConfigurationException(String messageId, Object[] parameters) {
+ super(messageId, parameters);
+ }
+
+ /**
+ * Create a <code>MOAConfigurationException</code>.
+ */
+ public ConfigurationException(
+ String messageId,
+ Object[] parameters,
+ Throwable wrapped) {
+
+ super(messageId, parameters, wrapped);
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationProvider.java
new file mode 100644
index 000000000..3c1612ef6
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationProvider.java
@@ -0,0 +1,143 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.config;
+
+import java.math.BigInteger;
+import java.security.Principal;
+import java.security.cert.X509Certificate;
+import java.util.Map;
+
+import at.gv.egovernment.moa.id.data.IssuerAndSerial;
+
+/**
+ * Base class for <code>AuthConfigurationProvider</code> and <code>ProxyConfigurationProvider</code>,
+ * providing functions common to both of them.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class ConfigurationProvider {
+
+ /**
+ * Constructor
+ */
+ public ConfigurationProvider() {
+ super();
+ }
+
+ /**
+ * The name of the system property which contains the file name of the
+ * configuration file.
+ */
+ public static final String CONFIG_PROPERTY_NAME =
+ "moa.id.configuration";
+
+ /**
+ * The name of the generic configuration property giving the certstore directory path.
+ */
+ public static final String DIRECTORY_CERTSTORE_PARAMETER_PROPERTY =
+ "DirectoryCertStoreParameters.RootDir";
+
+ /**
+ * The name of the generic configuration property switching the ssl revocation checking on/off
+ */
+ public static final String TRUST_MANAGER_REVOCATION_CHECKING =
+ "TrustManager.RevocationChecking";
+
+
+ /**
+ * A <code>Map</code> which contains generic configuration information. Maps a
+ * configuration name (a <code>String</code>) to a configuration value (also a
+ * <code>String</code>).
+ */
+ protected Map genericConfiguration;
+
+ /** The default chaining mode. */
+ protected String defaultChainingMode;
+
+ /**
+ * A <code>Map</code> which contains the <code>IssuerAndSerial</code> to
+ * chaining mode (a <code>String</code>) mapping.
+ */
+ protected Map chainingModes;
+
+ /**
+ * the URL for the trusted CA Certificates
+ */
+ protected String trustedCACertificates;
+
+ /**
+ * main configuration file directory name used to configure MOA-ID
+ */
+ protected String rootConfigFileDir;
+
+ /**
+ * Returns the main configuration file directory used to configure MOA-ID
+ *
+ * @return the directory
+ */
+ public String getRootConfigFileDir() {
+ return rootConfigFileDir;
+ }
+
+ /**
+ * Returns the mapping of generic configuration properties.
+ *
+ * @return The mapping of generic configuration properties (a name to value
+ * mapping) from the configuration.
+ */
+ public Map getGenericConfiguration() {
+ return genericConfiguration;
+ }
+
+ /**
+ * Returns the value of a parameter from the generic configuration section.
+ *
+ * @return the parameter value; <code>null</code> if no such parameter
+ */
+ public String getGenericConfigurationParameter(String parameter) {
+ if (! genericConfiguration.containsKey(parameter))
+ return null;
+ return (String)genericConfiguration.get(parameter);
+ }
+
+ /**
+ * Return the chaining mode for a given trust anchor.
+ *
+ * @param trustAnchor The trust anchor for which the chaining mode should be
+ * returned.
+ * @return The chaining mode for the given trust anchor. If the trust anchor
+ * has not been configured separately, the system default will be returned.
+ */
+ public String getChainingMode(X509Certificate trustAnchor) {
+ Principal issuer = trustAnchor.getIssuerDN();
+ BigInteger serial = trustAnchor.getSerialNumber();
+ IssuerAndSerial issuerAndSerial = new IssuerAndSerial(issuer, serial);
+
+ String mode = (String) chainingModes.get(issuerAndSerial);
+ return mode != null ? mode : defaultChainingMode;
+ }
+
+ /**
+ * Returns the trustedCACertificates.
+ * @return String
+ */
+ public String getTrustedCACertificates() {
+
+ return trustedCACertificates;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConnectionParameter.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConnectionParameter.java
new file mode 100644
index 000000000..9193a591e
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConnectionParameter.java
@@ -0,0 +1,121 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.config;
+
+/**
+ * This bean class is used to store data for various connectionParameter
+ * within the MOA-ID configuration
+ *
+ * @author Stefan Knirsch
+ * @version $Id$
+ */
+public class ConnectionParameter {
+
+ /**
+ * Server URL
+ */
+ private String url;
+ /**
+ * File URL for a directory containing PKCS#12 server SSL certificates.
+ * From these certificates, a X509 trust store will be assembled for use
+ * by a JSSE <code>TrustManager</code>.
+ * This field will only be used in case of an HTTPS URL.
+ */
+ private String acceptedServerCertificates;
+ /**
+ * File URL of a X509 key store containing the private key to be used
+ * for an HTTPS connection when the server requires client authentication.
+ * This field will only be used in case of an HTTPS URL.
+ */
+ private String clientKeyStore;
+ /**
+ * Password protecting the client key store.
+ */
+ private String clientKeyStorePassword;
+
+ /**
+ * Checks whether the URL scheme is <code>"https"</code>.
+ * @return true in case of an URL starting with <code>"https"</code>
+ */
+ public boolean isHTTPSURL() {
+ return getUrl().indexOf("https") == 0;
+ }
+
+ /**
+ * Returns the url.
+ * @return String
+ */
+ public String getUrl() {
+ return url;
+ }
+
+ /**
+ * Returns the acceptedServerCertificates.
+ * @return String
+ */
+ public String getAcceptedServerCertificates() {
+ return acceptedServerCertificates;
+ }
+
+ /**
+ * Sets the acceptedServerCertificates.
+ * @param acceptedServerCertificates The acceptedServerCertificates to set
+ */
+ public void setAcceptedServerCertificates(String acceptedServerCertificates) {
+ this.acceptedServerCertificates = acceptedServerCertificates;
+ }
+
+ /**
+ * Sets the url.
+ * @param url The url to set
+ */
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ /**
+ * Returns the clientKeyStore.
+ * @return String
+ */
+ public String getClientKeyStore() {
+ return clientKeyStore;
+ }
+
+ /**
+ * Returns the clientKeyStorePassword.
+ * @return String
+ */
+ public String getClientKeyStorePassword() {
+ return clientKeyStorePassword;
+ }
+
+ /**
+ * Sets the clientKeyStore.
+ * @param clientKeyStore The clientKeyStore to set
+ */
+ public void setClientKeyStore(String clientKeyStore) {
+ this.clientKeyStore = clientKeyStore;
+ }
+
+ /**
+ * Sets the clientKeyStorePassword.
+ * @param clientKeyStorePassword The clientKeyStorePassword to set
+ */
+ public void setClientKeyStorePassword(String clientKeyStorePassword) {
+ this.clientKeyStorePassword = clientKeyStorePassword;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/OAParameter.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/OAParameter.java
new file mode 100644
index 000000000..f5aa9225a
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/OAParameter.java
@@ -0,0 +1,115 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.config;
+
+/**
+ * Configuration parameters belonging to an online application,
+ * to be used within both, the MOA ID Auth and the
+ * MOA ID PROXY component.
+ *
+ * @author Harald Bratko
+ */
+public class OAParameter {
+
+ /**
+ * type of the online application (maybe "PublicService" or "BusinessService")
+ */
+ private String oaType;
+
+ /**
+ * specifies whether the online application is a business application or not
+ * (<code>true</code> if value of {@link #oaType} is "businessService"
+ */
+ private boolean businessService;
+
+ /**
+ * public URL prefix of the online application
+ */
+ private String publicURLPrefix;
+
+ /**
+ * specifies a human readable name of the Online Application
+ */
+ private String friendlyName;
+
+ /**
+ * Returns the type of the online application.
+ * @return the type of the online application.
+ */
+ public String getOaType() {
+ return oaType;
+ }
+
+ /**
+ * Returns <code>true</code> is the OA is a businss application, otherwise
+ * <code>false</code>.
+ * @return <code>true</code> is the OA is a businss application, otherwise
+ * <code>false</code>
+ */
+ public boolean getBusinessService() {
+ return this.businessService;
+ }
+
+ /**
+ * Returns the publicURLPrefix.
+ * @return String
+ */
+ public String getPublicURLPrefix() {
+ return publicURLPrefix;
+ }
+
+ /**
+ *
+ * Sets the type of the online application.
+ * If the type is "businessService" the value of <code>businessService</code>
+ * ({@link #getBusinessService()}) is also set to <code>true</code>
+ * @param oaType The type of the online application.
+ */
+ public void setOaType(String oaType) {
+ this.oaType = oaType;
+ if ("businessService".equalsIgnoreCase(oaType)) {
+ this.businessService = true;
+ }
+ }
+
+ /**
+ * Sets the publicURLPrefix.
+ * @param publicURLPrefix The publicURLPrefix to set
+ */
+ public void setPublicURLPrefix(String publicURLPrefix) {
+ this.publicURLPrefix = publicURLPrefix;
+ }
+
+
+ /**
+ * Gets the friendly name of the OA
+ * @return Friendly Name of the OA
+ */
+ public String getFriendlyName() {
+ return friendlyName;
+ }
+
+ /**
+ * Sets the friendly name of the OA
+ * @param friendlyName
+ */
+ public void setFriendlyName(String friendlyName) {
+ this.friendlyName = friendlyName;
+ }
+
+
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/TargetToSectorNameMapper.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/TargetToSectorNameMapper.java
new file mode 100644
index 000000000..af28be56a
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/TargetToSectorNameMapper.java
@@ -0,0 +1,67 @@
+/**
+ *
+ */
+package at.gv.egovernment.moa.id.config;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author bzwattendorfer
+ *
+ */
+public class TargetToSectorNameMapper implements TargetsAndSectorNames {
+
+ private static Map targetMap = new HashMap(41);
+
+ static {
+ targetMap.put(TARGET_AR, TARGET_AR_SECTOR);
+ targetMap.put(TARGET_AS, TARGET_AS_SECTOR);
+ targetMap.put(TARGET_BF, TARGET_BF_SECTOR);
+ targetMap.put(TARGET_BR, TARGET_BR_SECTOR);
+ targetMap.put(TARGET_BW, TARGET_BW_SECTOR);
+ targetMap.put(TARGET_EA, TARGET_EA_SECTOR);
+ targetMap.put(TARGET_EF, TARGET_EF_SECTOR);
+ targetMap.put(TARGET_GH, TARGET_GH_SECTOR);
+ targetMap.put(TARGET_GS, TARGET_GS_SECTOR);
+ targetMap.put(TARGET_GS_RE, TARGET_GS_RE_SECTOR);
+ targetMap.put(TARGET_HR, TARGET_HR_SECTOR);
+ targetMap.put(TARGET_JR, TARGET_JR_SECTOR);
+ targetMap.put(TARGET_KI, TARGET_KI_SECTOR);
+ targetMap.put(TARGET_KL, TARGET_KL_SECTOR);
+ targetMap.put(TARGET_KU, TARGET_KU_SECTOR);
+ targetMap.put(TARGET_LF, TARGET_LF_SECTOR);
+ targetMap.put(TARGET_LV, TARGET_LV_SECTOR);
+ targetMap.put(TARGET_OI, TARGET_OI_SECTOR);
+ targetMap.put(TARGET_PV, TARGET_PV_SECTOR);
+ targetMap.put(TARGET_RD, TARGET_RD_SECTOR);
+ targetMap.put(TARGET_RT, TARGET_RT_SECTOR);
+ targetMap.put(TARGET_SA, TARGET_SA_SECTOR);
+ targetMap.put(TARGET_SF, TARGET_SF_SECTOR);
+ targetMap.put(TARGET_SO, TARGET_SO_SECTOR);
+ targetMap.put(TARGET_SO_VR, TARGET_SO_VR_SECTOR);
+ targetMap.put(TARGET_SR_RG, TARGET_SR_RG_SECTOR);
+ targetMap.put(TARGET_SV, TARGET_SV_SECTOR);
+ targetMap.put(TARGET_UW, TARGET_UW_SECTOR);
+ targetMap.put(TARGET_VT, TARGET_VT_SECTOR);
+ targetMap.put(TARGET_VV, TARGET_VV_SECTOR);
+ targetMap.put(TARGET_WT, TARGET_WT_SECTOR);
+ targetMap.put(TARGET_ZP, TARGET_ZP_SECTOR);
+ targetMap.put(TARGET_BR, TARGET_BR_SECTOR);
+ targetMap.put(TARGET_HR, TARGET_HR_SECTOR);
+ targetMap.put(TARGET_KI, TARGET_KI_SECTOR);
+ targetMap.put(TARGET_OI, TARGET_OI_SECTOR);
+ targetMap.put(TARGET_PV, TARGET_PV_SECTOR);
+ targetMap.put(TARGET_RD, TARGET_RD_SECTOR);
+ targetMap.put(TARGET_VS, TARGET_VS_SECTOR);
+ targetMap.put(TARGET_VS_RG, TARGET_VS_RG_SECTOR);
+ targetMap.put(TARGET_ZU, TARGET_ZU_SECTOR);
+
+ }
+
+ public static String getSectorNameViaTarget(String target) {
+
+ return targetMap.get(target) != null ? (String) targetMap.get(target) : "";
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/TargetsAndSectorNames.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/TargetsAndSectorNames.java
new file mode 100644
index 000000000..c30e7b2b6
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/TargetsAndSectorNames.java
@@ -0,0 +1,194 @@
+/**
+ *
+ */
+package at.gv.egovernment.moa.id.config;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * This interface contains all actual possible targets in Austria (shortcuts and friendly names)
+ * Bereichskennung and Tätigkeitsbereich
+ * @author bzwattendorfer
+ *
+ */
+public interface TargetsAndSectorNames {
+
+ /** Bereichskennung AR */
+ public static String TARGET_AR = "AR";
+ /** Tätigkeitsbereich AR */
+ public static String TARGET_AR_SECTOR = "Arbeit";
+
+ /** Bereichskennung AS */
+ public static String TARGET_AS = "AS";
+ /** Tätigkeitsbereich AS */
+ public static String TARGET_AS_SECTOR = "Amtliche Statistik";
+
+ /** Bereichskennung BF */
+ public static String TARGET_BF = "BF";
+ /** Tätigkeitsbereich BF */
+ public static String TARGET_BF_SECTOR = "Bildung und Forschung";
+
+ /** Bereichskennung BW */
+ public static String TARGET_BW = "BW";
+ /** Tätigkeitsbereich BW */
+ public static String TARGET_BW_SECTOR = "Bauen und Wohnen";
+
+ /** Bereichskennung EA */
+ public static String TARGET_EA = "EA";
+ /** Tätigkeitsbereich EA */
+ public static String TARGET_EA_SECTOR = "EU und Auswärtige Angelegenheiten";
+
+ /** Bereichskennung EF */
+ public static String TARGET_EF = "EF";
+ /** Tätigkeitsbereich EF */
+ public static String TARGET_EF_SECTOR = "Ein- und Ausfuhr";
+
+ /** Bereichskennung GH */
+ public static String TARGET_GH = "GH";
+ /** Tätigkeitsbereich GH */
+ public static String TARGET_GH_SECTOR = "Gesundheit";
+
+ /** Bereichskennung GS */
+ public static String TARGET_GS = "GS";
+ /** Tätigkeitsbereich GS */
+ public static String TARGET_GS_SECTOR = "Gesellschaft und Soziales";
+
+ /** Bereichskennung GS-RE */
+ public static String TARGET_GS_RE = "GS-RE";
+ /** Tätigkeitsbereich GS-RE */
+ public static String TARGET_GS_RE_SECTOR = "Restitution";
+
+ /** Bereichskennung JR */
+ public static String TARGET_JR = "JR";
+ /** Tätigkeitsbereich JR */
+ public static String TARGET_JR_SECTOR = "Justiz/Zivilrechtswesen";
+
+ /** Bereichskennung KL */
+ public static String TARGET_KL = "KL";
+ /** Tätigkeitsbereich KL */
+ public static String TARGET_KL_SECTOR = "Kultus";
+
+ /** Bereichskennung KU */
+ public static String TARGET_KU = "KU";
+ /** Tätigkeitsbereich KU */
+ public static String TARGET_KU_SECTOR = "Kunst und Kultur";
+
+ /** Bereichskennung LF */
+ public static String TARGET_LF = "LF";
+ /** Tätigkeitsbereich LF */
+ public static String TARGET_LF_SECTOR = "Land- und Forstwirtschaft";
+
+ /** Bereichskennung LV */
+ public static String TARGET_LV = "LV";
+ /** Tätigkeitsbereich LV */
+ public static String TARGET_LV_SECTOR = "Landesverteidigung";
+
+ /** Bereichskennung RT */
+ public static String TARGET_RT = "RT";
+ /** Tätigkeitsbereich RT */
+ public static String TARGET_RT_SECTOR = "Rundfunk und sonstige " +
+ "Medien sowie Telekommunikation";
+
+ /** Bereichskennung SA */
+ public static String TARGET_SA = "SA";
+ /** Tätigkeitsbereich SA */
+ public static String TARGET_SA_SECTOR = "Steuern und Abgaben";
+
+ /** Bereichskennung SF */
+ public static String TARGET_SF = "SF";
+ /** Tätigkeitsbereich SF */
+ public static String TARGET_SF_SECTOR = "Sport und Freizeit";
+
+ /** Bereichskennung SO */
+ public static String TARGET_SO = "SO";
+ /** Tätigkeitsbereich SO */
+ public static String TARGET_SO_SECTOR = "Sicherheit und Ordnung";
+
+ /** Bereichskennung SO-VR */
+ public static String TARGET_SO_VR = "SO-VR";
+ /** Tätigkeitsbereich SO-VR */
+ public static String TARGET_SO_VR_SECTOR = "Vereinsregister";
+
+ /** Bereichskennung SR-RG */
+ public static String TARGET_SR_RG = "SR-RG";
+ /** Tätigkeitsbereich SR-RG */
+ public static String TARGET_SR_RG_SECTOR = "Strafregister";
+
+ /** Bereichskennung SV */
+ public static String TARGET_SV = "SV";
+ /** Tätigkeitsbereich SV */
+ public static String TARGET_SV_SECTOR = "Sozialversicherung";
+
+ /** Bereichskennung UW */
+ public static String TARGET_UW = "UW";
+ /** Tätigkeitsbereich UW */
+ public static String TARGET_UW_SECTOR = "Umwelt";
+
+ /** Bereichskennung VT */
+ public static String TARGET_VT = "VT";
+ /** Tätigkeitsbereich VT */
+ public static String TARGET_VT_SECTOR = "Verkehr und Technik";
+
+ /** Bereichskennung VV */
+ public static String TARGET_VV = "VV";
+ /** Tätigkeitsbereich VV */
+ public static String TARGET_VV_SECTOR = "Vermögensverwaltung";
+
+ /** Bereichskennung WT */
+ public static String TARGET_WT = "WT";
+ /** Tätigkeitsbereich WT */
+ public static String TARGET_WT_SECTOR = "Wirtschaft";
+
+ /** Bereichskennung ZP */
+ public static String TARGET_ZP = "ZP";
+ /** Tätigkeitsbereich ZP */
+ public static String TARGET_ZP_SECTOR = "Personenidentität und Bürgerrechte (zur Person)";
+
+ /** Bereichskennung BR */
+ public static String TARGET_BR = "BR";
+ /** Tätigkeitsbereich BR */
+ public static String TARGET_BR_SECTOR = "Bereichsübergreifender Rechtsschutz";
+
+ /** Bereichskennung HR */
+ public static String TARGET_HR = "HR";
+ /** Tätigkeitsbereich HR */
+ public static String TARGET_HR_SECTOR = "Zentrales Rechnungswesen";
+
+ /** Bereichskennung KI */
+ public static String TARGET_KI = "KI";
+ /** Tätigkeitsbereich KI */
+ public static String TARGET_KI_SECTOR = "Auftraggeberinterne allgemeine Kanzleiindizes";
+
+ /** Bereichskennung OI */
+ public static String TARGET_OI = "OI";
+ /** Tätigkeitsbereich OI */
+ public static String TARGET_OI_SECTOR = "Öffentlichkeitsarbeit";
+
+ /** Bereichskennung PV */
+ public static String TARGET_PV = "PV";
+ /** Tätigkeitsbereich PV */
+ public static String TARGET_PV_SECTOR = "Personalverwaltung";
+
+ /** Bereichskennung RD */
+ public static String TARGET_RD = "RD";
+ /** Tätigkeitsbereich RD */
+ public static String TARGET_RD_SECTOR = "Zentraler Rechtsdienst";
+
+ /** Bereichskennung VS */
+ public static String TARGET_VS = "VS";
+ /** Tätigkeitsbereich VS */
+ public static String TARGET_VS_SECTOR = "Zentrale Durchführung von Verwaltungsstrafverfahren";
+
+ /** Bereichskennung VS-RG */
+ public static String TARGET_VS_RG = "VS-RG";
+ /** Tätigkeitsbereich VS-RG */
+ public static String TARGET_VS_RG_SECTOR = "Zentrales Verwaltungsstrafregister";
+
+ /** Bereichskennung ZU */
+ public static String TARGET_ZU = "ZU";
+ /** Tätigkeitsbereich ZU */
+ public static String TARGET_ZU_SECTOR = "Zustellungen";
+
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java
new file mode 100644
index 000000000..ceb047280
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfigurationProvider.java
@@ -0,0 +1,478 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.config.auth;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.util.List;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+import at.gv.egovernment.moa.id.config.ConfigurationBuilder;
+import at.gv.egovernment.moa.id.config.ConfigurationException;
+import at.gv.egovernment.moa.id.config.ConfigurationProvider;
+import at.gv.egovernment.moa.id.config.ConnectionParameter;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.FileUtils;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+/**
+ * A class providing access to the Auth Part of the MOA-ID configuration data.
+ *
+ * <p>Configuration data is read from an XML file, whose location is given by
+ * the <code>moa.id.configuration</code> system property.</p>
+ * <p>This class implements the Singleton pattern. The <code>reload()</code>
+ * method can be used to update the configuration data. Therefore, it is not
+ * guaranteed that consecutive calls to <code>getInstance()</code> will return
+ * the same <code>AuthConfigurationProvider</code> all the time. During the
+ * processing of a web service request, the current
+ * <code>TransactionContext</code> should be used to obtain the
+ * <code>AuthConfigurationProvider</code> local to that request.</p>
+ *
+ * @author Patrick Peck
+ * @author Stefan Knirsch
+ *
+ * @version $Id$
+ */
+public class AuthConfigurationProvider extends ConfigurationProvider {
+
+ /** DEFAULT_ENCODING is "UTF-8" */
+ private static final String DEFAULT_ENCODING="UTF-8";
+ /**
+ * The name of the generic configuration property giving the authentication session time out.
+ */
+ public static final String AUTH_SESSION_TIMEOUT_PROPERTY =
+ "AuthenticationSession.TimeOut";
+ /**
+ * The name of the generic configuration property giving the authentication data time out.
+ */
+ public static final String AUTH_DATA_TIMEOUT_PROPERTY =
+ "AuthenticationData.TimeOut";
+
+ /**
+ * BKUSelectionType HTMLComplete, according to schema type <code>BKUSelectionType</code>
+ */
+ public static final String BKU_SELECTION_TYPE_HTMLCOMPLETE =
+ "HTMLComplete";
+
+ /**
+ * BKUSelectionType HTMLSelect, according to schema type <code>BKUSelectionType</code>
+ */
+ public static final String BKU_SELECTION_TYPE_HTMLSELECT =
+ "HTMLSelect";
+
+ /**
+ * The name of the generic configuration property allowing https connection to
+ * the user frontend servlets ("StartAuthentication" and "SelectBKU" servlets)
+ */
+ public static final String FRONTEND_SERVLETS_ENABLE_HTTP_CONNECTION_PROPERTY =
+ "FrontendServlets.EnableHTTPConnection";
+
+ /**
+ * The name of the generic configuration property allowing to set a individual
+ * DATA URL used to communicate with the BKU (SecurityLayer)
+ */
+ public static final String INDIVIDUAL_DATA_URL_PREFIX =
+ "FrontendServlets.DataURLPrefix";
+
+ /** Singleton instance. <code>null</code>, if none has been created. */
+ private static AuthConfigurationProvider instance;
+
+ //
+ // configuration data
+ //
+
+ /**
+ * configuration files containing transformations for rendering in the
+ * secure viewer of the security layer implementation;
+ * multiple files can be given for different mime types
+ */
+ private String[] transformsInfoFileNames;
+
+ /**
+ * transformations for rendering in the secure viewer of the security layer implementation,
+ * read from {@link transformsInfoFileNames};
+ * multiple transformation can be given for different mime types
+ */
+ private String[] transformsInfos;
+
+ /**
+ * parameters for connection to MOA SP component
+ */
+ private ConnectionParameter moaSpConnectionParameter;
+
+
+ /**
+ * trust profile ID to be used for verifying the identity link signature via MOA ID SP
+ */
+ private String moaSpIdentityLinkTrustProfileID;
+ /**
+ * trust profile ID to be used for verifying the AUTH block signature via MOA ID SP
+ */
+ private String moaSpAuthBlockTrustProfileID;
+ /**
+ * transformations to be used for verifying the AUTH block signature via MOA ID SP
+ */
+ private String[] moaSpAuthBlockVerifyTransformsInfoIDs;
+ /**
+ * X509 SubjectNames which will be trusted
+ */
+ private List identityLinkX509SubjectNames;
+ /**
+ * default parameters for verifying additional infoboxes.
+ */
+ private VerifyInfoboxParameters defaultVerifyInfoboxParameters;
+
+ /**
+ * configuration parameters for online applications
+ */
+ private OAAuthParameter[] onlineApplicationAuthParameters;
+ /**
+ * the Selection Type of the bku Selection Element
+ */
+ private String bKUSelectionType;
+ /**
+ * is the bku Selection Element present?
+ */
+ private boolean bKUSelectable;
+ /**
+ * the bku Selection Connection Parameters
+ */
+ private ConnectionParameter bKUConnectionParameter;
+
+ /**
+ * parameter for connection to SZR-GW GetIdentityLink
+ */
+ private ConnectionParameter foreignIDConnectionParameter;
+
+ /**
+ * parameter for connection to OnlineMandates Service
+ */
+ private ConnectionParameter onlineMandatesConnectionParameter;
+
+ /**
+ * Parameter for trusted BKUs
+ */
+ private List trustedBKUs;
+
+ /**
+ * Return the single instance of configuration data.
+ *
+ * @return AuthConfigurationProvider The current configuration data.
+ * @throws ConfigurationException
+ */
+ public static synchronized AuthConfigurationProvider getInstance()
+ throws ConfigurationException {
+
+ if (instance == null) {
+ reload();
+ }
+ return instance;
+ }
+
+ /**
+ * Reload the configuration data and set it if successful.
+ *
+ * @return AuthConfigurationProvider The loaded configuration data.
+ * @throws ConfigurationException Failure to load the configuration data.
+ */
+ public static synchronized AuthConfigurationProvider reload()
+ throws ConfigurationException {
+ String fileName = System.getProperty(ConfigurationProvider.CONFIG_PROPERTY_NAME);
+ if (fileName == null) {
+ throw new ConfigurationException("config.01", null);
+ }
+ Logger.info("Loading MOA-ID-AUTH configuration " + fileName);
+
+ instance = new AuthConfigurationProvider(fileName);
+ return instance;
+ }
+
+ /**
+ * Constructor for AuthConfigurationProvider.
+ * @param fileName
+ * @throws ConfigurationException
+ */
+ public AuthConfigurationProvider(String fileName)
+ throws ConfigurationException {
+
+ load(fileName);
+ }
+
+ /**
+ * Load the configuration data from XML file with the given name and build
+ * the internal data structures representing the MOA ID configuration.
+ *
+ * @param fileName The name of the XML file to load.
+ * @throws ConfigurationException The MOA configuration could not be
+ * read/built.
+ */
+ private void load(String fileName) throws ConfigurationException {
+ InputStream stream = null;
+ Element configElem;
+ ConfigurationBuilder builder;
+
+ try {
+ // load the main config file
+ stream = new BufferedInputStream(new FileInputStream(fileName));
+ configElem = DOMUtils.parseXmlValidating(stream);
+ } catch (Throwable t) {
+ throw new ConfigurationException("config.03", null, t);
+ }
+ finally {
+ try {
+ if (stream != null) {
+ stream.close();
+ }
+ } catch (IOException e) {
+ }
+ }
+ try {
+ // determine the directory of the root config file
+ rootConfigFileDir = new File(fileName).getParent();
+ try {
+ rootConfigFileDir = new File(rootConfigFileDir).toURL().toString();
+ } catch (MalformedURLException t) {
+ throw new ConfigurationException("config.03", null, t);
+ }
+
+ // build the internal datastructures
+ builder = new ConfigurationBuilder(configElem, rootConfigFileDir);
+ bKUConnectionParameter = builder.buildAuthBKUConnectionParameter();
+ bKUSelectable = (bKUConnectionParameter!=null);
+ bKUSelectionType = builder.buildAuthBKUSelectionType();
+ genericConfiguration = builder.buildGenericConfiguration();
+ transformsInfoFileNames = builder.buildTransformsInfoFileNames(builder.getConfigElem(), ConfigurationBuilder.AUTH_SECLAYER_TRANSFORMS_INFO_FILENAME_XPATH);
+ transformsInfos = builder.loadTransformsInfos(transformsInfoFileNames);
+ moaSpConnectionParameter = builder.buildMoaSpConnectionParameter();
+ moaSpIdentityLinkTrustProfileID = builder.getMoaSpIdentityLinkTrustProfileID();
+ moaSpAuthBlockTrustProfileID = builder.getMoaSpAuthBlockTrustProfileID();
+ moaSpAuthBlockVerifyTransformsInfoIDs = builder.buildMoaSpAuthBlockVerifyTransformsInfoIDs();
+ defaultVerifyInfoboxParameters = null;
+ Node defaultVerifyInfoboxParamtersElem = XPathUtils.selectSingleNode(configElem, ConfigurationBuilder.AUTH_VERIFY_INFOBOXES_XPATH);
+ if (defaultVerifyInfoboxParamtersElem != null) {
+ defaultVerifyInfoboxParameters =
+ builder.buildVerifyInfoboxParameters((Element)defaultVerifyInfoboxParamtersElem, null, moaSpIdentityLinkTrustProfileID);
+ }
+
+
+ foreignIDConnectionParameter = builder.buildForeignIDConnectionParameter();
+ onlineMandatesConnectionParameter = builder.buildOnlineMandatesConnectionParameter();
+ onlineApplicationAuthParameters = builder.buildOnlineApplicationAuthParameters(defaultVerifyInfoboxParameters, moaSpIdentityLinkTrustProfileID);
+ identityLinkX509SubjectNames = builder.getIdentityLink_X509SubjectNames();
+ defaultChainingMode = builder.getDefaultChainingMode();
+ chainingModes = builder.buildChainingModes();
+ trustedCACertificates = builder.getTrustedCACertificates();
+ trustedCACertificates = FileUtils.makeAbsoluteURL(trustedCACertificates, rootConfigFileDir);
+ trustedBKUs = builder.getTrustedBKUs();
+
+ } catch (Throwable t) {
+ throw new ConfigurationException("config.02", null, t);
+ }
+ }
+
+ /**
+ * Loads the <code>transformsInfos</code> from files.
+ * @throws Exception on any exception thrown
+ */
+// private void loadTransformsInfos() throws Exception {
+//
+// transformsInfos = new String[transformsInfoFileNames.length];
+// for (int i = 0; i < transformsInfoFileNames.length; i++) {
+// String fileURL = transformsInfoFileNames[i];
+//
+// //if fileURL is relative to rootConfigFileDir make it absolute
+// fileURL = FileUtils.makeAbsoluteURL(fileURL, rootConfigFileDir);
+// String transformsInfo = FileUtils.readURL(fileURL, DEFAULT_ENCODING);
+// transformsInfos[i] = transformsInfo;
+// }
+// }
+
+ /**
+ * Loads the <code>transformsInfos</code> from files.
+ * @throws Exception on any exception thrown
+ */
+ private String[] loadTransformsInfos(String[] transformsInfoFileNames) throws Exception {
+
+ String[] transformsInfos = new String[transformsInfoFileNames.length];
+ for (int i = 0; i < transformsInfoFileNames.length; i++) {
+ String fileURL = transformsInfoFileNames[i];
+
+ //if fileURL is relative to rootConfigFileDir make it absolute
+ fileURL = FileUtils.makeAbsoluteURL(fileURL, rootConfigFileDir);
+ String transformsInfo = FileUtils.readURL(fileURL, DEFAULT_ENCODING);
+ transformsInfos[i] = transformsInfo;
+ }
+ return transformsInfos;
+ }
+ /**
+ * Return a string array with all filenames leading
+ * to the Transforms Information for the Security Layer
+ * @return String[] of filenames to the Security Layer Transforms Information
+ */
+ public String[] getTransformsInfoFileNames() {
+ return transformsInfoFileNames;
+ }
+
+ /**
+ * Build an array of the OnlineApplication Parameters containing information
+ * about the authentication component
+ * @return An OAProxyParameter array containing beans
+ * with all relevant information for theauthentication component of the online
+ * application
+ */
+ public OAAuthParameter[] getOnlineApplicationParameters() {
+ return onlineApplicationAuthParameters;
+ }
+
+ /**
+ * Provides configuration information regarding the online application behind
+ * the given URL, relevant to the MOA-ID Auth component.
+ *
+ * @param oaURL URL requested for an online application
+ * @return an <code>OAAuthParameter</code>, or <code>null</code>
+ * if none is applicable
+ */
+ public OAAuthParameter getOnlineApplicationParameter(String oaURL) {
+ OAAuthParameter[] oaParams = getOnlineApplicationParameters();
+ for (int i = 0; i < oaParams.length; i++) {
+ OAAuthParameter oaParam = oaParams[i];
+ if (oaURL.indexOf(oaParam.getPublicURLPrefix()) == 0)
+ return oaParam;
+ }
+ return null;
+ }
+
+ /**
+ * Return a string with a url-reference to the VerifyAuthBlock trust
+ * profile id within the moa-sp part of the authentication component
+ *
+ * @return String with a url-reference to the VerifyAuthBlock trust profile ID
+ */
+ public String getMoaSpAuthBlockTrustProfileID() {
+ return moaSpAuthBlockTrustProfileID;
+ }
+
+ /**
+ * Return a string array with references to all verify transform info
+ * IDs within the moa-sp part of the authentication component
+ * @return A string array containing all urls to the
+ * verify transform info IDs
+ */
+ public String[] getMoaSpAuthBlockVerifyTransformsInfoIDs() {
+ return moaSpAuthBlockVerifyTransformsInfoIDs;
+ }
+
+ /**
+ * Return a ConnectionParameter bean containing all information
+ * of the authentication component moa-sp element
+ * @return ConnectionParameter of the authentication component moa-sp element
+ */
+ public ConnectionParameter getMoaSpConnectionParameter() {
+ return moaSpConnectionParameter;
+ }
+
+ /**
+ * Return a ConnectionParameter bean containing all information
+ * of the authentication component foreigid element
+ * @return ConnectionParameter of the authentication component foreignid element
+ */
+ public ConnectionParameter getForeignIDConnectionParameter() {
+ return foreignIDConnectionParameter;
+ }
+
+ /**
+ * Return a ConnectionParameter bean containing all information
+ * of the authentication component OnlineMandates element
+ * @return ConnectionParameter of the authentication component OnlineMandates element
+ */
+ public ConnectionParameter getOnlineMandatesConnectionParameter() {
+ return onlineMandatesConnectionParameter;
+ }
+
+ /**
+ * Return a string with a url-reference to the VerifyIdentityLink trust
+ * profile id within the moa-sp part of the authentication component
+ * @return String with a url-reference to the VerifyIdentityLink trust profile ID
+ */
+ public String getMoaSpIdentityLinkTrustProfileID() {
+ return moaSpIdentityLinkTrustProfileID;
+ }
+ /**
+ * Returns the transformsInfos.
+ * @return String[]
+ */
+ public String[] getTransformsInfos() {
+ return transformsInfos;
+ }
+
+ /**
+ * Returns the identityLinkX509SubjectNames.
+ * @return List
+ */
+ public List getIdentityLinkX509SubjectNames() {
+ return identityLinkX509SubjectNames;
+ }
+
+ /**
+ * Returns the trustBKUs.
+ * @return List
+ */
+ public List getTrustedBKUs() {
+ return this.trustedBKUs;
+ }
+
+
+ /**
+ * Returns the bKUConnectionParameter.
+ * @return ConnectionParameter
+ */
+ public ConnectionParameter getBKUConnectionParameter() {
+ return bKUConnectionParameter;
+ }
+
+ /**
+ * Returns the bKUSelectable.
+ * @return boolean
+ */
+ public boolean isBKUSelectable() {
+ return bKUSelectable;
+ }
+
+ /**
+ * Returns the bKUSelectionType.
+ * @return String
+ */
+ public String getBKUSelectionType() {
+ return bKUSelectionType;
+ }
+
+ /**
+ * Returns the defaultVerifyInfoboxParameters.
+ *
+ * @return The defaultVerifyInfoboxParameters.
+ */
+ public VerifyInfoboxParameters getDefaultVerifyInfoboxParameters() {
+ return defaultVerifyInfoboxParameters;
+ }
+
+} \ No newline at end of file
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameter.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameter.java
new file mode 100644
index 000000000..aa5aa21a3
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/OAAuthParameter.java
@@ -0,0 +1,350 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.config.auth;
+
+import at.gv.egovernment.moa.id.config.OAParameter;
+
+/**
+ * Configuration parameters belonging to an online application,
+ * to use with the MOA ID Auth component.
+ *
+ * @author Stefan Knirsch
+ * @version $Id$
+ */
+/**
+ *
+ *
+ * @author Harald Bratko
+ */
+public class OAAuthParameter extends OAParameter {
+ /**
+ * Sercurity Layer version
+ */
+ private String slVersion;
+ /**
+ * true, if the Security Layer version is version 1.2, otherwise false
+ */
+ private boolean slVersion12;
+ /**
+ * identityLinkDomainIdentifier
+ * (e.g <code>urn:publicid:gv.at+wbpk+FN468i</code> for a "Firmenbuchnummer")
+ * <br>
+ * only used within a business application context for providing it to the
+ * security layer as input for wbPK computation
+ */
+ private String identityLinkDomainIdentifier;
+ /**
+ * key box Identifier (e.g. CertifiedKeypair, SecureSignatureKeypair)
+ */
+ private String keyBoxIdentifier;
+ /**
+ * transformations for rendering in the secure viewer of the security layer
+ * implementation; multiple transformation can be given for different mime types
+ */
+ private String[] transformsInfos;
+ /**
+ * determines whether "Stammzahl" is to be included in the authentication data
+ */
+ private boolean provideStammzahl;
+ /**
+ * determines whether AUTH block is to be included in the authentication data
+ */
+ private boolean provideAuthBlock;
+ /**
+ * determines whether identity link is to be included in the authentication data
+ */
+ private boolean provideIdentityLink;
+ /**
+ * determines whether the certificate is to be included in the authentication data
+ */
+ private boolean provideCertificate;
+ /**
+ * url to a template for web page "Auswahl der B&uuml;rgerkartenumgebung"
+ */
+ private String bkuSelectionTemplateURL;
+ /**
+ * template for web page "Anmeldung mit B&uuml;rgerkarte"
+ */
+ private String templateURL;
+ /**
+ * template for web page "Signatur der Anmeldedaten"
+ */
+ private String inputProcessorSignTemplateURL;
+ /**
+ * Parameters for verifying infoboxes.
+ */
+ private VerifyInfoboxParameters verifyInfoboxParameters;
+
+ /**
+ * Parameter for Mandate profiles
+ */
+ private String mandateProfiles;
+
+ /**
+ * BZ
+ * Type for authentication number (e.g. Firmenbuchnummer)
+ */
+ private String identityLinkDomainIdentifierType;
+
+ /**
+ * Returns <code>true</code> if the Security Layer version is version 1.2,
+ * otherwise <code>false</code>.
+ * @return <code>true</code> if the Security Layer version is version 1.2,
+ * otherwise <code>false</code>
+ */
+ public boolean getSlVersion12() {
+ return slVersion12;
+ }
+
+ /**
+ * Returns the security layer version.
+ * @return the security layer version.
+ */
+ public String getSlVersion() {
+ return slVersion;
+ }
+
+ /**
+ * Returns the identityLinkDomainIdentifier.
+ * @return the identityLinkDomainIdentifier.
+ */
+ public String getIdentityLinkDomainIdentifier() {
+ return identityLinkDomainIdentifier;
+ }
+
+ /**
+ * Returns the transformsInfos.
+ * @return the transformsInfos.
+ */
+ public String[] getTransformsInfos() {
+ return transformsInfos;
+ }
+
+ /**
+ * Returns the provideAuthBlock.
+ * @return String
+ */
+ public boolean getProvideAuthBlock() {
+ return provideAuthBlock;
+ }
+
+ /**
+ * Returns the provideIdentityLink.
+ * @return String
+ */
+ public boolean getProvideIdentityLink() {
+ return provideIdentityLink;
+ }
+
+ /**
+ * Returns the provideStammzahl.
+ * @return String
+ */
+ public boolean getProvideStammzahl() {
+ return provideStammzahl;
+ }
+
+ /**
+ * Returns <code>true</code> if the certificate should be provided within the
+ * authentication data, otherwise <code>false</code>.
+ * @return <code>true</code> if the certificate should be provided,
+ * otherwise <code>false</code>
+ */
+ public boolean getProvideCertifcate() {
+ return provideCertificate;
+ }
+
+ /**
+ * Returns the key box identifier.
+ * @return String
+ */
+ public String getKeyBoxIdentifier() {
+ return keyBoxIdentifier;
+ }
+
+ /**
+ * Returns the BkuSelectionTemplate url.
+ * @return The BkuSelectionTemplate url or <code>null</code> if no url for
+ * a BkuSelectionTemplate is set.
+ */
+ public String getBkuSelectionTemplateURL() {
+ return bkuSelectionTemplateURL;
+ }
+
+ /**
+ * Returns the TemplateURL url.
+ * @return The TemplateURL url or <code>null</code> if no url for
+ * a Template is set.
+ */
+ public String getTemplateURL() {
+ return templateURL;
+ }
+
+ /**
+ * Returns the inputProcessorSignTemplateURL url.
+ * @return The inputProcessorSignTemplateURL url or <code>null</code> if no url for
+ * a input processor sign template is set.
+ */
+ public String getInputProcessorSignTemplateURL() {
+ return inputProcessorSignTemplateURL;
+ }
+
+ /**
+ * Returns the parameters for verifying additional infoboxes.
+ *
+ * @return The parameters for verifying additional infoboxes.
+ * Maybe <code>null</code>.
+ */
+ public VerifyInfoboxParameters getVerifyInfoboxParameters() {
+ return verifyInfoboxParameters;
+ }
+
+ /**
+ * Sets the security layer version.
+ * Also sets <code>slVersion12</code> ({@link #getSlVersion12()})
+ * to <code>true</code> if the Security Layer version is 1.2.
+ * @param slVersion The security layer version to be used.
+ */
+ public void setSlVersion(String slVersion) {
+ this.slVersion = slVersion;
+ if ("1.2".equals(slVersion)) {
+ this.slVersion12 = true;
+ }
+ }
+ /**
+ * Sets the IdentityLinkDomainIdentifier.
+ * @param identityLinkDomainIdentifier The IdentityLinkDomainIdentifiern number of the online application.
+ */
+ public void setIdentityLinkDomainIdentifier(String identityLinkDomainIdentifier) {
+ this.identityLinkDomainIdentifier = identityLinkDomainIdentifier;
+ }
+ /**
+ * Sets the transformsInfos.
+ * @param transformsInfos The transformsInfos to be used.
+ */
+ public void setTransformsInfos(String[] transformsInfos) {
+ this.transformsInfos = transformsInfos;
+ }
+ /**
+ * Sets the provideAuthBlock.
+ * @param provideAuthBlock The provideAuthBlock to set
+ */
+ public void setProvideAuthBlock(boolean provideAuthBlock) {
+ this.provideAuthBlock = provideAuthBlock;
+ }
+
+ /**
+ * Sets the provideIdentityLink.
+ * @param provideIdentityLink The provideIdentityLink to set
+ */
+ public void setProvideIdentityLink(boolean provideIdentityLink) {
+ this.provideIdentityLink = provideIdentityLink;
+ }
+
+ /**
+ * Sets the provideStammzahl.
+ * @param provideStammzahl The provideStammzahl to set
+ */
+ public void setProvideStammzahl(boolean provideStammzahl) {
+ this.provideStammzahl = provideStammzahl;
+ }
+
+ /**
+ * Sets the provideCertificate variable.
+ * @param provideCertificate The provideCertificate value to set
+ */
+ public void setProvideCertificate(boolean provideCertificate) {
+ this.provideCertificate = provideCertificate;
+ }
+
+ /**
+ * Sets the key box identifier.
+ * @param keyBoxIdentifier to set
+ */
+ public void setKeyBoxIdentier(String keyBoxIdentifier) {
+ this.keyBoxIdentifier = keyBoxIdentifier;
+ }
+
+ /**
+ * Sets the BkuSelectionTemplate url.
+ * @param bkuSelectionTemplateURL The url string specifying the location
+ * of a BkuSelectionTemplate.
+ */
+ public void setBkuSelectionTemplateURL(String bkuSelectionTemplateURL) {
+ this.bkuSelectionTemplateURL = bkuSelectionTemplateURL;
+ }
+
+ /**
+ * Sets the Template url.
+ * @param templateURL The url string specifying the location
+ * of a Template.
+ */
+ public void setTemplateURL(String templateURL) {
+ this.templateURL = templateURL;
+ }
+
+ /**
+ * Sets the input processor sign form template url.
+ *
+ * @param inputProcessorSignTemplateURL The url string specifying the
+ * location of the input processor sign form
+ */
+ public void setInputProcessorSignTemplateURL(String inputProcessorSignTemplateURL) {
+ this.inputProcessorSignTemplateURL = inputProcessorSignTemplateURL;
+ }
+
+ /**
+ * Sets the parameters for verifying additonal (to the identitylink infobox) infoboxes.
+ *
+ * @param verifyInfoboxParameters The verifyInfoboxParameters to set.
+ */
+ public void setVerifyInfoboxParameters(VerifyInfoboxParameters verifyInfoboxParameters) {
+ this.verifyInfoboxParameters = verifyInfoboxParameters;
+ }
+
+ /**
+ * Gets the IdentityLinkDomainIdentifier (e.g. Firmenbuchnummer)
+ * @return IdentityLinkDomainIdentifier (e.g. Firmenbuchnummer)
+ */
+ public String getIdentityLinkDomainIdentifierType() {
+ return identityLinkDomainIdentifierType;
+ }
+
+ /**
+ * Sets the IdentityLinkDomainIdentifier (e.g. Firmenbuchnummer)
+ * @param identityLinkDomainIdentifierType The IdentityLinkDomainIdentifier to set (e.g. Firmenbuchnummer)
+ */
+ public void setIdentityLinkDomainIdentifierType(String identityLinkDomainIdentifierType) {
+ this.identityLinkDomainIdentifierType = identityLinkDomainIdentifierType;
+ }
+
+ /**
+ * Sets the Mandate/Profiles
+ * @param profiles
+ */
+ public void setMandateProfiles(String profiles) {
+ this.mandateProfiles = profiles;
+ }
+
+ /**
+ * Returns the Mandates/Profiles
+ * @return
+ */
+ public String getMandateProfiles() {
+ return this.mandateProfiles;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/VerifyInfoboxParameter.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/VerifyInfoboxParameter.java
new file mode 100644
index 000000000..114b5b0fd
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/VerifyInfoboxParameter.java
@@ -0,0 +1,402 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.config.auth;
+
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.xml.transform.TransformerException;
+
+import org.apache.xpath.XPathAPI;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.id.auth.data.Schema;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.StringUtils;
+
+/**
+ * This class is a container for parameters that maybe needed for verifying an infobox.
+ *
+ * @author Harald Bratko
+ */
+public class VerifyInfoboxParameter {
+
+ /**
+ * The default package name (first part) of a infobox validator class.
+ */
+ public static final String DEFAULT_PACKAGE_TRUNK = "at.gv.egovernment.moa.id.auth.validator.";
+
+ /**
+ * The identifier of the infobox to be verified. This identifier must exactly the
+ * identifier of the infobox returned by BKU.
+ */
+ protected String identifier_;
+
+ /**
+ * The friendly name of the infobox.
+ * This name is used within browser messages, thus it should be the german equivalent of
+ * the {@link #identifier_ infobox identifier} (e.g. &quot;<code>Stellvertretungen</code>&quot;
+ * for &quot;<code>Mandates</code>&quot; or &quot;<code>GDAToken</code>&quot; for
+ * &quot;<code>EHSPToken</code>&quot;.
+ * <br>If not specified within the config file the {@link #identifier_ infobox identifier}
+ * will be used.
+ */
+ protected String friendlyName_;
+
+ /**
+ * The Id of the TrustProfile to be used for validating certificates.
+ */
+ protected String trustProfileID_;
+
+ /**
+ * The full name of the class to be used for verifying the infobox.
+ */
+ protected String validatorClassName_;
+
+ /**
+ * Schema location URIs that may be needed by the
+ * validator to parse infobox tokens.
+ * Each entry in the list is a {@link at.gv.egovernment.moa.id.auth.data.Schema Schema}
+ * specifying the location of an XML schema.
+ */
+ protected List schemaLocations_;
+
+ /**
+ * Application specific parameters that may be needed for verifying an infobox.
+ */
+ protected Element applicationSpecificParams_;
+
+ /**
+ * Specifies if the infobox is be required to be returned by the BKU.
+ */
+ protected boolean required_;
+
+ /**
+ * Specifies whether the <code>Stammzahl</code> should be passed to the verifying
+ * application or not.
+ */
+ protected boolean provideStammzahl_;
+
+ /**
+ * Specifies whether the <code>identity link</code> should be passed to the verifying
+ * application or not.
+ */
+ protected boolean provideIdentityLink_;
+
+ /**
+ * Initializes this VerifiyInfoboxParamater with the given identifier and a default
+ * validator class name.
+ *
+ * @param identifier The identifier of the infobox to be verified.
+ */
+ public VerifyInfoboxParameter(String identifier) {
+ identifier_ = identifier;
+ StringBuffer sb = new StringBuffer(DEFAULT_PACKAGE_TRUNK);
+ sb.append(identifier.toLowerCase());
+ sb.append(".");
+ sb.append(identifier.substring(0, 1).toUpperCase());
+ sb.append(identifier.substring(1));
+ sb.append("Validator");
+ validatorClassName_ = sb.toString();
+ }
+
+ /**
+ * Returns application specific parameters.
+ * Each child element of this element contains a verifying application specific parameter. {@link #applicationSpecificParams_}
+ *
+ * @see #applicationSpecificParams_
+ *
+ * @return Application specific parameters.
+ */
+ public Element getApplicationSpecificParams() {
+ return applicationSpecificParams_;
+ }
+
+ /**
+ * Sets the application specific parameters.
+ *
+ * @see #applicationSpecificParams_
+ *
+ * @param applicationSpecificParams The application specific parameters to set.
+ */
+ public void setApplicationSpecificParams(Element applicationSpecificParams) {
+ applicationSpecificParams_ = applicationSpecificParams;
+ }
+
+ /**
+ * Appends special application specific parameters for party representation.
+ *
+ * @param applicationSpecificParams The application specific parameters for party representation to set.
+ */
+ public void appendParepSpecificParams(Element applicationSpecificParams) {
+ try {
+ if (applicationSpecificParams_==null) {
+ applicationSpecificParams_ = applicationSpecificParams.getOwnerDocument().createElement("ApplicationSpecificParameters");
+ }
+ Element nameSpaceNode = applicationSpecificParams.getOwnerDocument().createElement("NameSpaceNode");
+ nameSpaceNode.setAttribute("xmlns:" + Constants.MOA_ID_CONFIG_PREFIX, Constants.MOA_ID_CONFIG_NS_URI);
+ NodeList nodeList = XPathAPI.selectNodeList(applicationSpecificParams, "*", nameSpaceNode);
+ if (null!=nodeList) {
+ for (int i=0; i<nodeList.getLength(); i++) {
+ applicationSpecificParams_.appendChild((Node) nodeList.item(i));
+ }
+ }
+ } catch (TransformerException e) {
+ //Do nothing
+ }
+ }
+
+ /**
+ * Returns the friendly name.
+ *
+ * @see #friendlyName_
+ *
+ * @return The friendly name.
+ */
+ public String getFriendlyName() {
+ return friendlyName_;
+ }
+
+ /**
+ * Sets the friendly name.
+ *
+ * @param friendlyName The friendly name to set.
+ */
+ public void setFriendlyName(String friendlyName) {
+ friendlyName_ = friendlyName;
+ }
+
+ /**
+ * Returns the infobox identifier.
+ *
+ * @see #identifier_
+ *
+ * @return The infobox identifier.
+ */
+ public String getIdentifier() {
+ return identifier_;
+ }
+
+ /**
+ * Sets the the infobox identifier.
+ *
+ * @see #identifier_
+ *
+ * @param identifier The infobox identifier to set.
+ */
+ public void setIdentifier(String identifier) {
+ identifier_ = identifier;
+ }
+
+ /**
+ * Specifies whether the identity link should be passed to the verifying application
+ * or not.
+ *
+ * @return <code>True</code> if the identity link should be passed to the verifying
+ * application, otherwise <code>false</code>.
+ */
+ public boolean getProvideIdentityLink() {
+ return provideIdentityLink_;
+ }
+
+ /**
+ * Sets the {@link #provideIdentityLink_} parameter.
+ *
+ * @param provideIdentityLink <code>True</code> if the identity link should be passed to
+ * the verifying application, otherwise <code>false</code>.
+ */
+ public void setProvideIdentityLink(boolean provideIdentityLink) {
+ provideIdentityLink_ = provideIdentityLink;
+ }
+
+ /**
+ * Specifies whether the <code>Stammzahl</code> should be passed to the verifying
+ * application or not.
+ *
+ * @return <code>True</code> if the <code>Stammzahl</code> should be passed to the
+ * verifying application, otherwise <code>false</code>.
+ */
+ public boolean getProvideStammzahl() {
+ return provideStammzahl_;
+ }
+
+ /**
+ * Sets the {@link #provideStammzahl_} parameter.
+ *
+ * @param provideStammzahl <code>True</code> if the <code>Stammzahl</code> should be
+ * passed to the verifying application, otherwise <code>false</code>.
+ */
+ public void setProvideStammzahl(boolean provideStammzahl) {
+ provideStammzahl_ = provideStammzahl;
+ }
+
+ /**
+ * Specifies whether the infobox is required or not.
+ *
+ * @return <code>True</code> if the infobox is required to be returned by the BKU,
+ * otherwise <code>false</code>.
+ */
+ public boolean isRequired() {
+ return required_;
+ }
+
+ /**
+ * Sets the {@link #required_} parameter.
+ *
+ * @param required <code>True</code> if the infobox is required to be returned by the
+ * BKU, otherwise <code>false</code>.
+ */
+ public void setRequired(boolean required) {
+ required_ = required;
+ }
+
+ /**
+ * Schema location URIs that may be needed by the
+ * validator to parse infobox tokens.
+ * Each entry in the list is a {@link at.gv.egovernment.moa.id.auth.data.Schema Schema}
+ * specifying the location of an XML schema.
+ *
+ * @return A list of {@link at.gv.egovernment.moa.id.auth.data.Schema Schema} objects
+ * each of them specifying the location of an XML schema.
+ */
+ public List getSchemaLocations() {
+ return schemaLocations_;
+ }
+
+ /**
+ * Sets the schema locations.
+ *
+ * @see #schemaLocations_
+ *
+ * @param schemaLocations The schema location list to be set.
+ */
+ public void setSchemaLocations(List schemaLocations) {
+ schemaLocations_ = schemaLocations;
+ }
+
+ /**
+ * Returns the ID of the trust profile to be used for verifying certificates.
+ *
+ * @return The ID of the trust profile to be used for verifying certificates.
+ * Maybe <code>null</code>.
+ */
+ public String getTrustProfileID() {
+ return trustProfileID_;
+ }
+
+ /**
+ * Sets the ID of the trust profile to be used for verifying certificates.
+ *
+ * @param trustProfileID The ID of the trust profile to be used for verifying certificates.
+ */
+ public void setTrustProfileID(String trustProfileID) {
+ trustProfileID_ = trustProfileID;
+ }
+
+ /**
+ * Returns the name of the class to be used for verifying this infobox.
+ *
+ * @return The name of the class to be used for verifying this infobox.
+ */
+ public String getValidatorClassName() {
+ return validatorClassName_;
+ }
+
+ /**
+ * Sets the name of the class to be used for verifying this infobox.
+ *
+ * @param validatorClassName The name of the class to be used for verifying this infobox.
+ */
+ public void setValidatorClassName(String validatorClassName) {
+ validatorClassName_ = validatorClassName;
+ }
+
+ /**
+ * Get a string representation of this object.
+ * This method is for debugging purposes only.
+ *
+ * @return A string representation of this object.
+ */
+ public String toString() {
+
+ StringBuffer buffer = new StringBuffer(1024);
+
+ buffer.append(" <Infobox Identifier=\"");
+ buffer.append(identifier_);
+ buffer.append("\" required=\"");
+ buffer.append(required_);
+ buffer.append("\" provideStammzahl=\"");
+ buffer.append(provideStammzahl_);
+ buffer.append("\" provideIdentityLink=\"");
+ buffer.append(provideIdentityLink_);
+ buffer.append("\">");
+ buffer.append("\n");
+ if (friendlyName_ != null) {
+ buffer.append(" <FriendlyName>");
+ buffer.append(friendlyName_);
+ buffer.append("</FriendlyName>");
+ buffer.append("\n");
+ }
+ if (trustProfileID_ != null) {
+ buffer.append(" <TrustProfileID>");
+ buffer.append(trustProfileID_);
+ buffer.append("</TrustProfileID>");
+ buffer.append("\n");
+ }
+ if (validatorClassName_ != null) {
+ buffer.append(" <ValidatorClass>");
+ buffer.append(validatorClassName_);
+ buffer.append("</ValidatorClass>");
+ buffer.append("\n");
+ }
+ if (schemaLocations_ != null) {
+ buffer.append(" <SchemaLocations>");
+ buffer.append("\n");
+ Iterator it = schemaLocations_.iterator();
+ while (it.hasNext()) {
+ buffer.append(" <Schema namespace=\"");
+ Schema schema = (Schema)it.next();
+ buffer.append(schema.getNamespace());
+ buffer.append("\" schemaLocation=\"");
+ buffer.append(schema.getSchemaLocation());
+ buffer.append("\"/>\n");
+ }
+ buffer.append(" </SchemaLocations>");
+ buffer.append("\n");
+ }
+ if (applicationSpecificParams_ != null) {
+ try {
+ String applicationSpecificParams = DOMUtils.serializeNode(applicationSpecificParams_);
+ buffer.append(" ");
+ buffer.append(StringUtils.removeXMLDeclaration(applicationSpecificParams));
+ buffer.append("\n");
+ } catch (TransformerException e) {
+ // do nothing
+ } catch (IOException e) {
+ // do nothing
+ }
+ }
+ buffer.append(" </Infobox>");
+
+
+ return buffer.toString() ;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/VerifyInfoboxParameters.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/VerifyInfoboxParameters.java
new file mode 100644
index 000000000..fae42f100
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/VerifyInfoboxParameters.java
@@ -0,0 +1,150 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.config.auth;
+
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * This class contains the parameters for verifying all the infoboxes configured for an
+ * online application.
+ *
+ * @author Harald Bratko
+ */
+public class VerifyInfoboxParameters {
+
+ /**
+ * A map of {@link VerifyInfoboxParameter} objects.
+ * Each of these objects contains parameters that maybe needed for validating an
+ * infobox.
+ */
+ protected Map infoboxParameters_;
+
+ /**
+ * A list of the identifiers of the infoboxes supported by this
+ * VerifyInfoboxParameters;
+ */
+ protected List identifiers_;
+
+ /**
+ * Holds the (comma separated) identifiers of those infoboxes MOA-IF is able to validate
+ * in the context of the actual online application.
+ * The string will be added as value of the <code>PushInfobox</code> parameter in the
+ * HTML form used for reading the infoboxes from the BKU.
+ */
+ protected String pushInfobox_;
+
+ /**
+ * Initializes this VerifyInfoboxParameters with an empty {@link #infoboxParameters_}
+ * map.
+ */
+ public VerifyInfoboxParameters() {
+ infoboxParameters_ = new Hashtable();
+ pushInfobox_ = "";
+ }
+
+ /**
+ * Initializes this VerifyInfoboxParameters with the given
+ * <code>infoboxParameters</code> map and builds the {@link #pushInfobox_} string
+ * from the keys of the given map.
+ */
+ public VerifyInfoboxParameters(List identifiers, Map infoboxParameters) {
+ identifiers_ = identifiers;
+ infoboxParameters_ = infoboxParameters;
+ // build the pushInfobox string
+ if ((identifiers != null) && (!identifiers.isEmpty())) {
+ StringBuffer identifiersSB = new StringBuffer();
+ int identifiersNum = identifiers.size();
+ int i = 1;
+ Iterator it = identifiers.iterator();
+ while (it.hasNext()) {
+ identifiersSB.append((String)it.next());
+ if (i != identifiersNum) {
+ identifiersSB.append(",");
+ }
+ i++;
+ }
+ pushInfobox_ = identifiersSB.toString();
+ } else {
+ pushInfobox_ = "";
+ }
+ }
+
+ /**
+ * Returns the (comma separated) identifiers of the infoboxes configured for the actual
+ * online application.
+ *
+ * @see #pushInfobox_
+ *
+ * @return The (comma separated) identifiers of the infoboxes configured for the actual
+ * online application.
+ */
+ public String getPushInfobox() {
+ return pushInfobox_;
+ }
+
+ /**
+ * Sets the {@link #pushInfobox_} string.
+ *
+ * @param pushInfobox The pushInfobox string to be set.
+ */
+ public void setPushInfobox(String pushInfobox) {
+ pushInfobox_ = pushInfobox;
+ }
+
+ /**
+ * Returns map of {@link VerifyInfoboxParameter} objects.
+ * Each of these objects contains parameters that maybe needed for validating an
+ * infobox.
+ *
+ * @return The map of {@link VerifyInfoboxParameter} objects.
+ */
+ public Map getInfoboxParameters() {
+ return infoboxParameters_;
+ }
+
+ /**
+ * Sets the map of {@link VerifyInfoboxParameter} objects.
+ *
+ * @see #infoboxParameters_
+ *
+ * @param infoboxParameters The infoboxParameters to set.
+ */
+ public void setInfoboxParameters(Map infoboxParameters) {
+ infoboxParameters_ = infoboxParameters;
+ }
+
+ /**
+ * Returns the identifiers of the supported infoboxes.
+ *
+ * @return The identifiers.
+ */
+ public List getIdentifiers() {
+ return identifiers_;
+ }
+
+ /**
+ * Sets the identifiers.
+ *
+ * @param identifiers The identifiers to set.
+ */
+ public void setIdentifiers(List identifiers) {
+ identifiers_ = identifiers;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/proxy/OAConfiguration.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/proxy/OAConfiguration.java
new file mode 100644
index 000000000..b7ed82977
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/proxy/OAConfiguration.java
@@ -0,0 +1,188 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.config.proxy;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Holds configuration data concerning an online application for use by the MOA-ID Proxy component.
+ * These include the login type (stateful or stateless), the HTTP authentication type,
+ * and information needed to add authentication parameters or headers for a URL connection
+ * to the remote online application.
+ * @see <code>MOAIDConfiguration-1.1.xsd</code>, element <code>Configuration</code>
+ *
+ * @author Stefan Knirsch
+ * @version $Id$
+ */
+public class OAConfiguration {
+
+ /** Constant for an login method */
+ public static final String LOGINTYPE_STATEFUL = "stateful";
+ /** Constant for an login method */
+ public static final String LOGINTYPE_STATELESS = "stateless";
+
+ /** Constant for an auth method */
+ public static final String BASIC_AUTH = "basic";
+ /** Constant for an auth method */
+ public static final String HEADER_AUTH = "header";
+ /** Constant for an auth method */
+ public static final String PARAM_AUTH = "param";
+
+
+ /** Constant for binding */
+ public static final String BINDUNG_USERNAME = "userName";
+ /** Constant for binding */
+ public static final String BINDUNG_FULL = "full";
+ /** Constant for binding */
+ public static final String BINDUNG_NONE = "none";
+ /** Constant for binding */
+ public static final String BINDUNG_NOMATCH = "noMatch";
+
+ /** login type: stateful or stateless */
+ String loginType;
+ /** authentication type: basic, header, or param */
+ String authType;
+ /**
+ * mapping of parameter names to AuthenticationData field names
+ * in case of authentication type <code>"header-auth"</code>
+ */
+ Map paramAuthMapping;
+ /**
+ * mapping of parameter names to AuthenticationData field names
+ * in case of authentication type <code>"param-auth"</code>
+ */
+ Map headerAuthMapping;
+ /** mapping for user ID to be used in case of authentication type <code>"basic-auth"</code> */
+ String basicAuthUserIDMapping;
+ /** mapping for password to be used in case of authentication type <code>"basic-auth"</code> */
+ String basicAuthPasswordMapping;
+ /** Binding for basic authentication */
+ String binding;
+
+ /**
+ * Returns the basicAuthPasswordMapping.
+ * @return String
+ */
+ public String getBasicAuthPasswordMapping() {
+ return basicAuthPasswordMapping;
+ }
+
+ /**
+ * Returns the basicAuthUserIDMapping.
+ * @return String
+ */
+ public String getBasicAuthUserIDMapping() {
+ return basicAuthUserIDMapping;
+ }
+
+ /**
+ * Returns the headerAuthMapping.
+ * @return HashMap
+ */
+ public Map getHeaderAuthMapping() {
+ return headerAuthMapping;
+ }
+
+ /**
+ * Returns the loginType.
+ * @return String
+ */
+ public String getLoginType() {
+ return loginType;
+ }
+
+ /**
+ * Returns the paramAuthMapping.
+ * @return HashMap
+ */
+ public Map getParamAuthMapping() {
+ return paramAuthMapping;
+ }
+
+ /**
+ * Returns the binding.
+ * @return String
+ */
+ public String getBinding() {
+ return binding;
+ }
+
+ /**
+ * Sets the basicAuthPasswordMapping.
+ * @param basicAuthPassword The basicAuthPasswordMapping to set
+ */
+ public void setBasicAuthPasswordMapping(String basicAuthPassword) {
+ this.basicAuthPasswordMapping = basicAuthPassword;
+ }
+
+ /**
+ * Sets the basicAuthUserIDMapping.
+ * @param basicAuthUserID The basicAuthUserIDMapping to set
+ */
+ public void setBasicAuthUserIDMapping(String basicAuthUserID) {
+ this.basicAuthUserIDMapping = basicAuthUserID;
+ }
+
+ /**
+ * Sets the headerAuthMapping.
+ * @param headerAuth The headerAuthMapping to set
+ */
+ public void setHeaderAuthMapping(HashMap headerAuth) {
+ this.headerAuthMapping = headerAuth;
+ }
+
+ /**
+ * Sets the loginType.
+ * @param loginType The loginType to set
+ */
+ public void setLoginType(String loginType) {
+ this.loginType = loginType;
+ }
+
+ /**
+ * Sets the paramAuthMapping.
+ * @param paramAuth The paramAuthMapping to set
+ */
+ public void setParamAuthMapping(HashMap paramAuth) {
+ this.paramAuthMapping = paramAuth;
+ }
+
+ /**
+ * Returns the authType.
+ * @return String
+ */
+ public String getAuthType() {
+ return authType;
+ }
+
+ /**
+ * Sets the authType.
+ * @param authLoginType The authType to set
+ */
+ public void setAuthType(String authLoginType) {
+ this.authType = authLoginType;
+ }
+
+ /**
+ * Sets the binding.
+ * @param binding The binding to be set.
+ */
+ public void setBinding (String binding) {
+ this.binding = binding;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/proxy/OAProxyParameter.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/proxy/OAProxyParameter.java
new file mode 100644
index 000000000..2f8691f70
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/proxy/OAProxyParameter.java
@@ -0,0 +1,199 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.config.proxy;
+
+import at.gv.egovernment.moa.id.config.ConnectionParameter;
+import at.gv.egovernment.moa.id.config.OAParameter;
+
+/**
+ * Configuration parameters belonging to an online application,
+ * to use with the MOA ID Proxy component.
+ *
+ * @author Stefan Knirsch
+ * @version $Id$
+ */
+public class OAProxyParameter extends OAParameter {
+
+// /**
+// * public URL prefix of the online application
+// */
+// private String publicURLPrefix;
+ /**
+ * URL of online application configuration file;
+ * defaults to relative URL <code>/moaconfig.xml</code>
+ */
+ private String configFileURL;
+ /**
+ * implementation of {@link at.gv.egovernment.moa.id.proxy.LoginParameterResolver} interface
+ * to be used for authenticating the online application;
+ * defaults to {@link at.gv.egovernment.moa.id.proxy.DefaultLoginParameterResolver}
+ */
+ private String loginParameterResolverImpl;
+
+ /**
+ * Configuration Parameter of LoginParameterResolver
+ */
+ private String loginParameterResolverConfiguration;
+
+ /**
+ * implementation of {@link at.gv.egovernment.moa.id.proxy.ConnectionBuilder} interface
+ * to be used for connecting to the online application;
+ * defaults to {@link at.gv.egovernment.moa.id.proxy.DefaultConnectionBuilder}
+ */
+ private String connectionBuilderImpl;
+ /**
+ * session time out to be used in case of a stateless online application
+ */
+ private int sessionTimeOut;
+ /**
+ * parameters regarding the connection from the proxy to the online application
+ */
+ private ConnectionParameter connectionParameter;
+ /**
+ * parameters for logging into the online application
+ */
+ private OAConfiguration oaConfiguration;
+
+
+ /**
+ * Returns the configFileURL.
+ * @return String
+ */
+ public String getConfigFileURL() {
+ return configFileURL;
+ }
+
+ /**
+ * Returns the sessionTimeOut.
+ * @return int
+ */
+ public int getSessionTimeOut() {
+ return sessionTimeOut;
+ }
+
+ /**
+ * Returns the connectionParameter.
+ * @return ConnectionParameter
+ */
+ public ConnectionParameter getConnectionParameter() {
+ return connectionParameter;
+ }
+
+ /**
+ * Sets the configFileURL for the proxy.
+ * @param oaProxyConfigFileURL The configFileURL to set
+ */
+ public void setConfigFileURL(String oaProxyConfigFileURL) {
+ this.configFileURL = oaProxyConfigFileURL;
+ }
+
+ /**
+ * Sets the sessionTimeOut for the proxy.
+ * @param oaProxySessionTimeOut The sessionTimeOut to set
+ */
+ public void setSessionTimeOut(int oaProxySessionTimeOut) {
+ this.sessionTimeOut = oaProxySessionTimeOut;
+ }
+
+ /**
+ * Sets the connectionParameter for the proxy.
+ * @param proxyConnectionParameter The connectionParameter to set
+ */
+ public void setConnectionParameter(ConnectionParameter proxyConnectionParameter) {
+ this.connectionParameter = proxyConnectionParameter;
+ }
+
+// /**
+// * Returns the publicURLPrefix.
+// * @return String
+// */
+// public String getPublicURLPrefix() {
+// return publicURLPrefix;
+// }
+//
+// /**
+// * Sets the publicURLPrefix.
+// * @param publicURLPrefix The publicURLPrefix to set
+// */
+// public void setPublicURLPrefix(String url) {
+// this.publicURLPrefix = url;
+// }
+
+ /**
+ * Returns the connectionBuilderImpl.
+ * @return String
+ */
+ public String getConnectionBuilderImpl() {
+ return connectionBuilderImpl;
+ }
+
+ /**
+ * Returns the loginParameterResolverImpl.
+ * @return String
+ */
+ public String getLoginParameterResolverImpl() {
+ return loginParameterResolverImpl;
+ }
+
+ /**
+ * Returns the loginParameterResolverConfiguration.
+ * @return String
+ */
+ public String getLoginParameterResolverConfiguration() {
+ return loginParameterResolverConfiguration;
+ }
+
+ /**
+ * Sets the connectionBuilderImpl for the proxy.
+ * @param connectionBuilderImpl The connectionBuilderImpl to set
+ */
+ public void setConnectionBuilderImpl(String connectionBuilderImpl) {
+ this.connectionBuilderImpl = connectionBuilderImpl;
+ }
+
+ /**
+ * Sets the loginParameterResolverImpl for the proxy.
+ * @param loginParameterResolverImpl The loginParameterResolverImpl to set
+ */
+ public void setLoginParameterResolverImpl(String loginParameterResolverImpl) {
+ this.loginParameterResolverImpl = loginParameterResolverImpl;
+ }
+
+ /**
+ * Sets the loginParameterResolverConfiguration for the proxy.
+ * @param loginParameterResolverConfiguration The loginParameterResolverImpl to set
+ */
+ public void setLoginParameterResolverConfiguration(String loginParameterResolverConfiguration) {
+ this.loginParameterResolverConfiguration = loginParameterResolverConfiguration;
+ }
+
+ /**
+ * Returns the oaConfiguration.
+ * @return OAConfiguration
+ */
+ public OAConfiguration getOaConfiguration() {
+ return oaConfiguration;
+ }
+
+ /**
+ * Sets the oaConfiguration.
+ * @param oaConfiguration The oaConfiguration to set
+ */
+ public void setOaConfiguration(OAConfiguration oaConfiguration) {
+ this.oaConfiguration = oaConfiguration;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/proxy/ProxyConfigurationBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/proxy/ProxyConfigurationBuilder.java
new file mode 100644
index 000000000..f67349a18
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/proxy/ProxyConfigurationBuilder.java
@@ -0,0 +1,256 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.config.proxy;
+
+import java.io.ByteArrayInputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.traversal.NodeIterator;
+
+import at.gv.egovernment.moa.id.config.ConfigurationBuilder;
+import at.gv.egovernment.moa.id.config.ConfigurationException;
+import at.gv.egovernment.moa.id.config.ConnectionParameter;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.FileUtils;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+/**
+ * Builds the configuration for MOA-ID Proxy.
+ */
+public class ProxyConfigurationBuilder extends ConfigurationBuilder {
+
+ /**
+ * Default online application configuration file name
+ * (used when <code>/OnlineApplication/ProxyComponent@configFileURL</code> is <code>null</code>).
+ */
+ public static final String DEFAULT_OA_CONFIG_FILENAME = "MOAConfig.xml";
+
+ /** an XPATH-Expression */
+ private static final String PROXY_AUTH_XPATH =
+ ROOT + CONF + "ProxyComponent/" + CONF + "AuthComponent";
+ /** an XPATH-Expression */
+ protected static final String ROOTOA = "/" + CONF + "Configuration/";
+ /** an XPATH-Expression */
+ private static final String OA_PROXY_COMPONENT_XPATH = CONF + "ProxyComponent";
+ /** an XPATH-Expression */
+ private static final String OA_PROXY_COMPONENT_ABSOLUTE_XPATH = ROOT + CONF + "OnlineApplication/" + CONF + "ProxyComponent";
+ /** an XPATH-Expression */
+ private static final String OA_PROXY_URL_XPATH = CONF + "ProxyComponent/@configFileURL";
+ /** an XPATH-Expression */
+ private static final String OA_PROXY_SESSION_TIMEOUT_XPATH = CONF + "ProxyComponent/@sessionTimeOut";
+ /** an XPATH-Expression */
+ private static final String OA_PROXY_LOGIN_PARA_XPATH = CONF + "ProxyComponent/@loginParameterResolverImpl";
+ /** an XPATH-Expression */
+ private static final String OA_PROXY_LOGIN_PARA_CONF_XPATH = CONF + "ProxyComponent/@loginParameterResolverConfiguration";
+ /** an XPATH-Expression */
+ private static final String OA_PROXY_CONNECTION_BUILDER_XPATH = CONF + "ProxyComponent/@connectionBuilderImpl";
+ /** an XPATH-Expression */
+ protected static final String OACONF_LOGIN_TYPE_XPATH =
+ ROOTOA + CONF + "LoginType";
+ /** an XPATH-Expression */
+ protected static final String OACONF_BINDING_TYPE_XPATH =
+ ROOTOA + CONF + "Binding";
+ /** an XPATH-Expression */
+ protected static final String OACONF_PARAM_AUTH_PARAMETER_XPATH =
+ ROOTOA + CONF + "ParamAuth/" + CONF + "Parameter";
+ /** an XPATH-Expression */
+ protected static final String OACONF_USER_ID_XPATH =
+ ROOTOA + CONF + "BasicAuth/" + CONF + "UserID";
+ /** an XPATH-Expression */
+ protected static final String OACONF_PASSWORD_XPATH =
+ ROOTOA + CONF + "BasicAuth/" + CONF + "Password";
+ /** an XPATH-Expression */
+ protected static final String OACONF_HEADER_AUTH_HEADER_XPATH =
+ ROOTOA + CONF + "HeaderAuth/" + CONF + "Header";
+
+ /**
+ * Creates a new <code>MOAConfigurationProvider</code>.
+ *
+ * @param configElem The root element of the MOA-ID configuration.
+ */
+ public ProxyConfigurationBuilder(Element configElem, String rootConfigDir) {
+ super(configElem, rootConfigDir);
+ }
+
+ /**
+ * Method buildOAConfiguration.
+ *
+ * Build an {@link OAConfiguration} Object from the given configuration DOM element
+ *
+ * @param root
+ * @return OAConfiguration
+ * @throws ConfigurationException
+ */
+ public OAConfiguration buildOAConfiguration(Element root) throws ConfigurationException{
+
+ OAConfiguration oaConfiguration = new OAConfiguration();
+
+ //The LoginType hast to be "stateless" or "stateful" to be valid
+
+ oaConfiguration.setLoginType(
+ XPathUtils.getElementValue(root, OACONF_LOGIN_TYPE_XPATH, null));
+
+ oaConfiguration.setBinding(
+ XPathUtils.getElementValue(root, OACONF_BINDING_TYPE_XPATH, OAConfiguration.BINDUNG_FULL));
+
+ //Try to build the Parameter Auth Parameters
+ NodeIterator paramAuthIter =
+ XPathUtils.selectNodeIterator(
+ root,
+ OACONF_PARAM_AUTH_PARAMETER_XPATH);
+ Element paramAuthElem;
+ HashMap paramAuthMap = new HashMap();
+ while ((paramAuthElem = (Element) paramAuthIter.nextNode()) != null) {
+ String name = XPathUtils.getAttributeValue(paramAuthElem, "@Name", null);
+ String value = XPathUtils.getAttributeValue(paramAuthElem, "@Value", null);
+ if (paramAuthMap.containsKey(name))
+ throw new ConfigurationException("config.06", new Object[]{"Doppelter Wert für Parameter per HeaderAuthentication"});
+ paramAuthMap.put(name, value);
+ }
+ oaConfiguration.setParamAuthMapping(paramAuthMap);
+ // Try to build the BasicAuthParameters
+ oaConfiguration.setBasicAuthUserIDMapping(
+ XPathUtils.getElementValue(root, OACONF_USER_ID_XPATH, null));
+ oaConfiguration.setBasicAuthPasswordMapping(
+ XPathUtils.getElementValue(root, OACONF_PASSWORD_XPATH, null));
+
+ //Try to build the Parameter Auth Parameters
+ NodeIterator headerAuthIter = XPathUtils.selectNodeIterator(root,OACONF_HEADER_AUTH_HEADER_XPATH);
+
+ Element headerAuthElem;
+ HashMap headerAuthMap = new HashMap();
+ while ((headerAuthElem = (Element) headerAuthIter.nextNode()) != null) {
+ String name =
+ XPathUtils.getAttributeValue(headerAuthElem, "@Name", null);
+ String value =
+ XPathUtils.getAttributeValue(headerAuthElem, "@Value", null);
+ // Contains Key (Neue Config-Exception: doppelte werte)
+ if (headerAuthMap.containsKey(name))
+ throw new ConfigurationException("config.06", new Object[]{"Doppelter Wert für Parameter per HeaderAuthentication"});
+ headerAuthMap.put(name, value);
+ }
+ oaConfiguration.setHeaderAuthMapping(headerAuthMap);
+
+ if (paramAuthMap.size() == 0) {
+ if (oaConfiguration.getBasicAuthUserIDMapping() == null) {
+ oaConfiguration.setAuthType(OAConfiguration.HEADER_AUTH);
+ }
+ else
+ oaConfiguration.setAuthType(OAConfiguration.BASIC_AUTH);
+ }
+ else
+ oaConfiguration.setAuthType(OAConfiguration.PARAM_AUTH);
+
+ return oaConfiguration;
+ }
+
+
+ /**
+ * Build an array of OnlineApplication Parameter Beans containing information
+ * about the proxy component
+ * @return An OAProxyParameter array containing beans
+ * with all relevant information for the proxy component of the online
+ * application
+ */
+ public OAProxyParameter[] buildOnlineApplicationProxyParameters() throws ConfigurationException{
+
+ List oA_list = new ArrayList();
+ NodeList OAIter = XPathUtils.selectNodeList(configElem_, OA_XPATH);
+
+ for (int i = 0; i < OAIter.getLength(); i++) {
+ Element oAElem = (Element) OAIter.item(i);
+
+ Element proxyComponentElem = (Element) XPathUtils.selectSingleNode(oAElem,OA_PROXY_COMPONENT_XPATH);
+ if (proxyComponentElem != null) {
+ OAProxyParameter oap = new OAProxyParameter();
+
+ oap.setPublicURLPrefix(oAElem.getAttribute("publicURLPrefix"));
+ oap.setOaType(oAElem.getAttribute("type"));
+ oap.setConfigFileURL(XPathUtils.getAttributeValue(oAElem, OA_PROXY_URL_XPATH, null));
+ oap.setConfigFileURL(FileUtils.makeAbsoluteURL(oap.getConfigFileURL(), rootConfigFileDir_));
+ // default session time out: 3600 sec = 1 h
+ oap.setSessionTimeOut(new Integer(XPathUtils.getAttributeValue(oAElem,OA_PROXY_SESSION_TIMEOUT_XPATH,"3600")).intValue());
+ oap.setLoginParameterResolverImpl(XPathUtils.getAttributeValue(oAElem, OA_PROXY_LOGIN_PARA_XPATH, null));
+ oap.setLoginParameterResolverConfiguration(XPathUtils.getAttributeValue(oAElem, OA_PROXY_LOGIN_PARA_CONF_XPATH, null));
+ oap.setLoginParameterResolverConfiguration(FileUtils.makeAbsoluteURL(oap.getLoginParameterResolverConfiguration(), rootConfigFileDir_));
+ oap.setConnectionBuilderImpl(XPathUtils.getAttributeValue(oAElem,OA_PROXY_CONNECTION_BUILDER_XPATH, null));
+
+ ConnectionParameter conPara = buildConnectionParameter(proxyComponentElem);
+ oap.setConnectionParameter(conPara);
+
+ OAConfiguration oaConf = buildOAConfiguration(getOAConfigElement(oap));
+ oap.setOaConfiguration(oaConf);
+
+ oA_list.add(oap);
+ }
+ }
+ OAProxyParameter[] result =
+ new OAProxyParameter[oA_list.size()];
+ oA_list.toArray(result);
+
+ return result;
+
+ }
+
+ /**
+ * Reads the configuration file of the online application, and creates a DOM tree from it.
+ * If <code>/OnlineApplication/ProxyComponent@configFileURL</code> is not given,
+ * uses default configuration file location.
+ *
+ * @param oap configuration data of online application, meant for use by MOA-ID-PROXY
+ * @return Element DOM tree root element
+ * @throws ConfigurationException on any exception thrown
+ */
+ private Element getOAConfigElement(OAProxyParameter oap) throws ConfigurationException
+ {
+ try {
+ String configFileURL = oap.getConfigFileURL();
+ if (configFileURL == null) {
+ // use default config file URL, when config file URL is not given
+ configFileURL = oap.getConnectionParameter().getUrl();
+ if (configFileURL.charAt(configFileURL.length() - 1) != '/')
+ configFileURL += "/";
+ configFileURL += DEFAULT_OA_CONFIG_FILENAME;
+ }
+ Logger.info("Loading MOA-OA configuration " + configFileURL);
+ Element configElem = DOMUtils.parseXmlValidating(
+ new ByteArrayInputStream(FileUtils.readURL(configFileURL)));
+ return configElem;
+ }
+ catch (Throwable t) {
+ throw new ConfigurationException("config.03", new Object[] {"OAConfiguration"} , t);
+ }
+ }
+
+ /**
+ * Build a bean containing all information about the ProxyComponent
+ * @return The ConnectionParameter for the Proxy Component
+ */
+ public ConnectionParameter buildAuthComponentConnectionParameter()
+ {
+
+ Element connectionParameter = (Element) XPathUtils.selectSingleNode(configElem_, PROXY_AUTH_XPATH);
+ if (connectionParameter==null) return null;
+ return buildConnectionParameter(connectionParameter);
+
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/proxy/ProxyConfigurationProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/proxy/ProxyConfigurationProvider.java
new file mode 100644
index 000000000..fbd6474bb
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/proxy/ProxyConfigurationProvider.java
@@ -0,0 +1,203 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.config.proxy;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.net.MalformedURLException;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.id.config.ConfigurationException;
+import at.gv.egovernment.moa.id.config.ConfigurationProvider;
+import at.gv.egovernment.moa.id.config.ConnectionParameter;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.FileUtils;
+
+/**
+ * A class providing access to the Proxy Part of the MOA-ID configuration data.
+ *
+ * <p>Configuration data is read from an XML file, whose location is given by
+ * the <code>moa.id.configuration</code> system property.</p>
+ * <p>This class implements the Singleton pattern. The <code>reload()</code>
+ * method can be used to update the configuration data. Therefore, it is not
+ * guaranteed that consecutive calls to <code>getInstance()</code> will return
+ * the same <code>ProxyConfigurationProvider</code> all the time. During the
+ * processing of a web service request, the current
+ * <code>TransactionContext</code> should be used to obtain the
+ * <code>ProxyConfigurationProvider</code> local to that request.</p>
+ *
+ * @author Stefan Knirsch
+ */
+public class ProxyConfigurationProvider extends ConfigurationProvider {
+
+ /** Singleton instance. <code>null</code>, if none has been created. */
+ private static ProxyConfigurationProvider instance;
+
+
+ //
+ // configuration data
+ //
+ /**
+ * connection parameters for connection to MOA ID Auth component
+ */
+ private ConnectionParameter authComponentConnectionParameter;
+ /**
+ * configuration parameters for online applications
+ */
+ private OAProxyParameter[] onlineApplicationProxyParameter;
+
+ /**
+ * Return the single instance of configuration data.
+ *
+ * @return ProxyConfigurationProvider The current configuration data.
+ * @throws ConfigurationException
+ */
+ public static synchronized ProxyConfigurationProvider getInstance()
+ throws ConfigurationException {
+
+ if (instance == null) {
+ reload();
+ }
+ return instance;
+ }
+
+ /**
+ * Reload the configuration data and set it if successful.
+ *
+ * @return ProxyConfigurationProvider The loaded configuration data.
+ * @throws ConfigurationException Failure to load the configuration data.
+ */
+ public static synchronized ProxyConfigurationProvider reload()
+ throws ConfigurationException {
+ String fileName = System.getProperty(CONFIG_PROPERTY_NAME);
+ if (fileName == null) {
+ throw new ConfigurationException("config.01", null);
+ }
+ Logger.info("Loading MOA-ID-PROXY configuration " + fileName);
+
+ instance = new ProxyConfigurationProvider(fileName);
+ return instance;
+ }
+
+ /**
+ * Constructor for ProxyConfigurationProvider.
+ */
+ public ProxyConfigurationProvider(String fileName)
+ throws ConfigurationException {
+
+ load(fileName);
+ }
+
+ /**
+ * Load the configuration data from XML file with the given name and build
+ * the internal data structures representing the MOA configuration.
+ *
+ * @param fileName The name of the XML file to load.
+ * @throws ConfigurationException The MOA configuration could not be
+ * read/built.
+ */
+ private void load(String fileName) throws ConfigurationException {
+ FileInputStream stream = null;
+ Element configElem;
+ ProxyConfigurationBuilder builder;
+
+ try {
+ // load the main config file
+ stream = new FileInputStream(fileName);
+ configElem = DOMUtils.parseXmlValidating(stream);
+ }
+ catch (Throwable t) {
+ throw new ConfigurationException("config.03", null, t);
+ }
+ finally {
+ try {
+ if (stream != null) {
+ stream.close();
+ }
+ }
+ catch (IOException e) {
+ }
+ }
+ try {
+ // determine the directory of the root config file
+ rootConfigFileDir = new File(fileName).getParent();
+ try {
+ rootConfigFileDir = new File(rootConfigFileDir).toURL().toString();
+ } catch (MalformedURLException t) {
+ throw new ConfigurationException("config.03", null, t);
+ }
+
+ // build the internal datastructures
+ builder = new ProxyConfigurationBuilder(configElem, rootConfigFileDir);
+ authComponentConnectionParameter = builder.buildAuthComponentConnectionParameter();
+
+ onlineApplicationProxyParameter = builder.buildOnlineApplicationProxyParameters();
+ for(int i = 0; i < onlineApplicationProxyParameter.length; i++) {
+ onlineApplicationProxyParameter[i].setConfigFileURL(FileUtils.makeAbsoluteURL(onlineApplicationProxyParameter[i].getConfigFileURL(), rootConfigFileDir));
+ }
+
+ genericConfiguration = builder.buildGenericConfiguration();
+ defaultChainingMode = builder.getDefaultChainingMode();
+ chainingModes = builder.buildChainingModes();
+ trustedCACertificates = builder.getTrustedCACertificates();
+ trustedCACertificates = FileUtils.makeAbsoluteURL(trustedCACertificates, rootConfigFileDir);
+
+ }
+ catch (Throwable t) {
+ throw new ConfigurationException("config.02", null, t);
+ }
+ }
+
+ /**
+ * Return a bean containing all information about the ProxyComponent
+ * @return The ConnectionParameter for the Proxy Component
+ */
+ public ConnectionParameter getAuthComponentConnectionParameter() {
+ return authComponentConnectionParameter;
+ }
+
+ /**
+ * Build an array of OnlineApplication Parameter Beans containing all
+ * information about the proxy component of the online application
+ * @return An OAProxyParameter array containing beans
+ * with all relevant information for the proxy component of the online
+ * application
+ */
+ public OAProxyParameter[] getOnlineApplicationParameters() {
+ return onlineApplicationProxyParameter;
+ }
+ /**
+ * Provides configuration information regarding the online application behind
+ * the given URL, relevant to the MOA-ID Proxy component.
+ *
+ * @param oaURL URL requested for an online application
+ * @return an <code>OAProxyParameter</code>, or <code>null</code>
+ * if none is applicable
+ */
+ public OAProxyParameter getOnlineApplicationParameter(String oaURL) {
+ OAProxyParameter[] oaParams = getOnlineApplicationParameters();
+ for (int i = 0; i < oaParams.length; i++) {
+ OAProxyParameter oaParam = oaParams[i];
+ if (oaURL.startsWith(oaParam.getPublicURLPrefix()))
+ return oaParam;
+ }
+ return null;
+ }
+
+} \ No newline at end of file
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/AuthenticationData.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/AuthenticationData.java
new file mode 100644
index 000000000..ad1944211
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/AuthenticationData.java
@@ -0,0 +1,409 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.data;
+
+import java.util.Date;
+
+/**
+ * Encapsulates authentication data contained in a <code>&lt;saml:Assertion&gt;</code>.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+
+public class AuthenticationData {
+ /**
+ * major version number of the SAML assertion
+ */
+ private int majorVersion;
+ /**
+ * minor version number of the SAML assertion
+ */
+ private int minorVersion;
+ /**
+ * identifier for this assertion
+ */
+ private String assertionID;
+ /**
+ * URL of the MOA-ID Auth component issueing this assertion
+ */
+ private String issuer;
+ /**
+ * time instant of issue of this assertion
+ */
+ private String issueInstant;
+ /**
+ * user identification value (Stammzahl); <code>null</code>,
+ * if the authentication module is configured not to return this data
+ */
+ private String identificationValue;
+ /**
+ * user identification type
+ */
+ private String identificationType;
+ /**
+ * application specific user identifier (bPK)
+ */
+ private String bPK;
+ /**
+ * private sector-specific personal identifier (wbPK)
+ */
+ private String wbPK;
+ /**
+ * given name of the user
+ */
+ private String givenName;
+ /**
+ * family name of the user
+ */
+ private String familyName;
+ /**
+ * date of birth of the user
+ */
+ private String dateOfBirth;
+ /**
+ * says whether the certificate is a qualified certificate or not
+ */
+ private boolean qualifiedCertificate;
+ /**
+ * says whether the certificate is a public authority or not
+ */
+ private boolean publicAuthority;
+ /**
+ * public authority code (Beh&ouml;rdenkennzeichen - BKZ)
+ */
+ private String publicAuthorityCode;
+ /**
+ * The base64 encoded signer certificate.
+ */
+ private String signerCertificate;
+ /**
+ * URL of the BKU
+ */
+ private String bkuURL;
+ /**
+ * the corresponding <code>lt;saml:Assertion&gt;</code>
+ */
+ private String samlAssertion;
+ /**
+ * creation timestamp
+ */
+ Date timestamp;
+
+ /**
+ * Constructor for AuthenticationData.
+ */
+ public AuthenticationData() {
+ timestamp = new Date();
+ }
+
+ /**
+ * Returns the minorVersion.
+ * @return int
+ */
+ public int getMinorVersion() {
+ return minorVersion;
+ }
+
+ /**
+ * Returns the publicAuthority.
+ * @return boolean
+ */
+ public boolean isPublicAuthority() {
+ return publicAuthority;
+ }
+
+ /**
+ * Returns the publicAuthorityCode.
+ * @return String
+ */
+ public String getPublicAuthorityCode() {
+ return publicAuthorityCode;
+ }
+
+ /**
+ * Returns the qualifiedCertificate.
+ * @return boolean
+ */
+ public boolean isQualifiedCertificate() {
+ return qualifiedCertificate;
+ }
+
+ /**
+ * Returns the bPK.
+ * @return String
+ */
+ public String getBPK() {
+ return bPK;
+ }
+
+ /**
+ * Returns the wbPK.
+ * @return String the wbPK.
+ */
+ public String getWBPK() {
+ return wbPK;
+ }
+
+ /**
+ * Sets the minorVersion.
+ * @param minorVersion The minorVersion to set
+ */
+ public void setMinorVersion(int minorVersion) {
+ this.minorVersion = minorVersion;
+ }
+
+ /**
+ * Sets the publicAuthority.
+ * @param publicAuthority The publicAuthority to set
+ */
+ public void setPublicAuthority(boolean publicAuthority) {
+ this.publicAuthority = publicAuthority;
+ }
+
+ /**
+ * Sets the publicAuthorityCode.
+ * @param publicAuthorityIdentification The publicAuthorityCode to set
+ */
+ public void setPublicAuthorityCode(String publicAuthorityIdentification) {
+ this.publicAuthorityCode = publicAuthorityIdentification;
+ }
+
+ /**
+ * Sets the qualifiedCertificate.
+ * @param qualifiedCertificate The qualifiedCertificate to set
+ */
+ public void setQualifiedCertificate(boolean qualifiedCertificate) {
+ this.qualifiedCertificate = qualifiedCertificate;
+ }
+
+ /**
+ * Sets the bPK.
+ * @param bPK The bPK to set
+ */
+ public void setBPK(String bPK) {
+ this.bPK = bPK;
+ }
+
+ /**
+ * Sets the wbPK.
+ * @param wbPK The wbPK to set
+ */
+ public void setWBPK(String wbPK) {
+ this.wbPK = wbPK;
+ }
+
+ /**
+ * Returns the assertionID.
+ * @return String
+ */
+ public String getAssertionID() {
+ return assertionID;
+ }
+
+ /**
+ * Returns the dateOfBirth.
+ * @return String
+ */
+ public String getDateOfBirth() {
+ return dateOfBirth;
+ }
+
+ /**
+ * Returns the familyName.
+ * @return String
+ */
+ public String getFamilyName() {
+ return familyName;
+ }
+
+ /**
+ * Returns the givenName.
+ * @return String
+ */
+ public String getGivenName() {
+ return givenName;
+ }
+
+ /**
+ * Returns the identificationValue.
+ * @return String
+ */
+ public String getIdentificationValue() {
+ return identificationValue;
+ }
+
+ /**
+ * Returns the identificationType
+ * @return String
+ */
+ public String getIdentificationType() {
+ return identificationType;
+ }
+
+ /**
+ * Returns the issueInstant.
+ * @return String
+ */
+ public String getIssueInstant() {
+ return issueInstant;
+ }
+
+ /**
+ * Returns the issuer.
+ * @return String
+ */
+ public String getIssuer() {
+ return issuer;
+ }
+
+ /**
+ * Returns the majorVersion.
+ * @return int
+ */
+ public int getMajorVersion() {
+ return majorVersion;
+ }
+
+ /**
+ * Returns the BKU URL.
+ * @return String
+ */
+ public String getBkuURL() {
+ return bkuURL;
+ }
+
+ /**
+ * Returns the signer certificate.
+ * @return String
+ */
+ public String getSignerCertificate() {
+ return signerCertificate;
+ }
+
+ /**
+ * Sets the assertionID.
+ * @param assertionID The assertionID to set
+ */
+ public void setAssertionID(String assertionID) {
+ this.assertionID = assertionID;
+ }
+
+ /**
+ * Sets the dateOfBirth.
+ * @param dateOfBirth The dateOfBirth to set
+ */
+ public void setDateOfBirth(String dateOfBirth) {
+ this.dateOfBirth = dateOfBirth;
+ }
+
+ /**
+ * Sets the familyName.
+ * @param familyName The familyName to set
+ */
+ public void setFamilyName(String familyName) {
+ this.familyName = familyName;
+ }
+
+ /**
+ * Sets the givenName.
+ * @param givenName The givenName to set
+ */
+ public void setGivenName(String givenName) {
+ this.givenName = givenName;
+ }
+
+ /**
+ * Sets the identificationValue.
+ * @param identificationValue The identificationValue to set
+ */
+ public void setIdentificationValue(String identificationValue) {
+ this.identificationValue = identificationValue;
+ }
+
+ /**
+ * Sets the identificationType.
+ * @param identificationType The identificationType to set
+ */
+ public void setIdentificationType(String identificationType) {
+ this.identificationType = identificationType;
+ }
+
+ /**
+ * Sets the issueInstant.
+ * @param issueInstant The issueInstant to set
+ */
+ public void setIssueInstant(String issueInstant) {
+ this.issueInstant = issueInstant;
+ }
+
+ /**
+ * Sets the issuer.
+ * @param issuer The issuer to set
+ */
+ public void setIssuer(String issuer) {
+ this.issuer = issuer;
+ }
+
+ /**
+ * Sets the majorVersion.
+ * @param majorVersion The majorVersion to set
+ */
+ public void setMajorVersion(int majorVersion) {
+ this.majorVersion = majorVersion;
+ }
+
+ /**
+ * Sets the bkuURL
+ * @param url The BKU URL to set
+ */
+ public void setBkuURL(String url) {
+ this.bkuURL = url;
+ }
+
+ /**
+ * Sets the signer certificate
+ * @param signerCertificate The signer certificate
+ */
+ public void setSignerCertificate(String signerCertificate) {
+ this.signerCertificate = signerCertificate;
+ }
+
+ /**
+ * Returns the samlAssertion.
+ * @return String
+ */
+ public String getSamlAssertion() {
+ return samlAssertion;
+ }
+
+ /**
+ * Sets the samlAssertion.
+ * @param samlAssertion The samlAssertion to set
+ */
+ public void setSamlAssertion(String samlAssertion) {
+ this.samlAssertion = samlAssertion;
+ }
+
+ /**
+ * Returns the timestamp.
+ * @return Date
+ */
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/Cookie.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/Cookie.java
new file mode 100644
index 000000000..81eb59652
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/Cookie.java
@@ -0,0 +1,134 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.data;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.StringTokenizer;
+
+import at.gv.egovernment.moa.logging.Logger;
+
+/**
+ * The Cookie-class provides methods to save and return cookies for
+ * each single session
+ *
+ * @author Stefan Knirsch
+ * @version $Id$
+ *
+ */
+public class Cookie {
+ /** A HahsMap containing all our cookies */
+ HashMap cookies = new HashMap();
+ /** A HashMap to temporarely store 'Set-Cookie' values from the OnlineApplication
+ * to send them back to the client/browser as soon as possible */
+ HashMap cookies401 = new HashMap();
+
+ /**
+ * Adds a Cookie from a response with response-code 401 to the cookie-pool
+ * for sending it back to the browser / client
+ * @param cookieString The complete 'Set-Cookie' - String
+ */
+ public void add401(String cookieString)
+ {
+ cookies401.put(getKey(cookieString),cookieString);
+ }
+
+ /**
+ * Get the HashMap containing all cookies to be sent to the browser / client
+ * @return HashMap with all cookies
+ */
+ public HashMap get401()
+ {
+ return cookies401;
+ }
+
+ /**
+ * Clear the 401 cookie-pool
+ */
+ public void clear401()
+ {
+ cookies401.clear();
+ }
+
+ /**
+ * Set a cookie that comes from the Online-Application
+ * and save it in our "normal" cookie-pool
+ * @param value The complete "Set-Cookie" - String from the Online-Application
+ */
+ public void setCookie(String value) {
+ cookies.put(getKey(value), getValue(value));
+ }
+
+ /**
+ * Method saveOldCookies.
+ * @param value The complete "Set-Cookie" - String from the Online-Application
+ */
+ public void saveOldCookies(String value) {
+ StringTokenizer st = new StringTokenizer(value,";");
+ while (st.hasMoreTokens())
+ {
+ // We have to trim because the Tokenizer returns cookies including spaces at the beginning
+ StringTokenizer st2 = new StringTokenizer(st.nextToken().trim(),"=");
+ String cookieKey = st2.nextToken().trim();
+ if (st2.hasMoreTokens())
+ {
+ String cookieValue = st2.nextToken().trim();
+ if (!cookies.containsKey(cookieKey))
+ cookies.put(cookieKey , cookieValue);
+ }
+ }
+ Logger.debug("Found these cookies: " + getCookies());
+ }
+
+ /**
+ * Get a String containing all cookies saved in that session seperated by '; '
+ * to be sent back to the Online-Application
+ * @return String containing all cookies saved in that session seperated by '; '
+ */
+ public String getCookies() {
+ String result = "";
+ if (cookies.size()==0)
+ return null;
+ Iterator i = cookies.keySet().iterator();
+ while (i.hasNext()) {
+ String key = (String) i.next();
+ result += key + "=" + (String)cookies.get(key) + "; ";
+ }
+ return result.substring(0, result.length() - 2);
+ }
+
+ /**
+ * Returns the key of a key-value-pair of a cookie
+ * getKey("CookieA=1234") returns CookieA
+ * @param String the complete "Set-cookie" String containing a key-value-pair of a cookie
+ * @return String the key of a key-value-pair of a cookie
+ */
+ private String getKey(String input) {
+ return input.substring(0, input.indexOf("="));
+ }
+
+ /**
+ * Returns the value of a key-value-pair of a cookie
+ * getKey("CookieA=1234") returns 1234
+ * @param String the complete "Set-cookie" String containing a key-value-pair of a cookie
+ * @return String the value of a key-value-pair of a cookie
+ */
+ private String getValue(String input) {
+ if (input.indexOf(";") == -1)
+ return input.substring(input.indexOf("=") + 1, input.getBytes().length);
+ return input.substring(input.indexOf("=") + 1, input.indexOf(";"));
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/CookieManager.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/CookieManager.java
new file mode 100644
index 000000000..9c67b4ca0
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/CookieManager.java
@@ -0,0 +1,129 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.data;
+
+import java.util.HashMap;
+
+/**
+ * The CookieManager is a singleton to manage a Cookie-Object for
+ * each session
+ * @author Stefan Knirsch
+ * @version $Id$
+ *
+ */
+public class CookieManager {
+ /** the singleton instance of the CookieManager */
+ private static CookieManager instance;
+ /** a HashMap to bind a Cookie-object to every single session*/
+ private static HashMap cookies = new HashMap();
+
+ /**
+ * Create a singleton of the CookieManager
+ * @return CookieManager
+ */
+ public static CookieManager getInstance()
+ {
+ if(instance==null) instance=new CookieManager();
+ return instance;
+ }
+
+ /**
+ * Save a cookie to a specified session-id
+ * @param id The session id
+ * @param cookie_string The complete 'Set-Cookie' String from the OnlineApplication
+ */
+ public void saveCookie(String id, String cookie_string)
+ {
+ getCookieWithID(id).setCookie(cookie_string);
+ }
+
+ /**
+ * Method saveOldCookies.
+ * @param id
+ * @param cookie_string
+ */
+ public void saveOldCookies(String id,String cookie_string)
+ {
+ getCookieWithID(id).saveOldCookies(cookie_string);
+ }
+
+ /**
+ * Get a Cookie-Object for a specified session-id
+ * @param id The session id
+ * @return Cookie object containing all saved cookies for this session
+ */
+ public Cookie getCookieWithID(String id)
+ {
+ Cookie c = null;
+ if(cookies.containsKey(id))
+ c = (Cookie)cookies.get(id);
+ else
+ {
+ c = new Cookie();
+ cookies.put(id,c);
+ }
+ return c;
+ }
+
+
+ /**
+ * Get a String containing all cookies of a specified session-id
+ * saved in that session seperated by '; ' to be sent back to
+ * the Online-Application
+ * @param id the session-id
+ * @return String containing all cookies saved in that session seperated by '; '
+ */
+ public String getCookie(String id)
+ {
+ Cookie result = (Cookie)cookies.get((String)id);
+ if (result==null)
+ return null;
+ return result.getCookies();
+
+ }
+
+ /**
+ * Adds a Cookie for a special session from a response with
+ * response-code 401 to the cookie-pool for sending it back
+ * to the browser / client
+ * @param id The session-id
+ * @param value The complete 'Set-Cookie' - String
+ */
+ public void add401(String id,String value)
+ {
+ getCookieWithID(id).add401(value);
+ }
+
+ /**
+ * Clear the 401 cookie-pool of a session
+ * @param id the session-id
+ */
+ public void clear401(String id)
+ {
+ getCookieWithID(id).clear401();
+ }
+
+ /**
+ * Get the HashMap containing all cookies of a session to be sent to the browser / client
+ * @param id the session-id
+ * @return HashMap with all cookies
+ */
+ public HashMap get401(String id)
+ {
+ return getCookieWithID(id).get401();
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/IssuerAndSerial.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/IssuerAndSerial.java
new file mode 100644
index 000000000..fa718341c
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/IssuerAndSerial.java
@@ -0,0 +1,126 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.data;
+
+import java.math.BigInteger;
+import java.security.Principal;
+
+import iaik.asn1.structures.Name;
+import iaik.utils.RFC2253NameParser;
+import iaik.utils.RFC2253NameParserException;
+
+/**
+ * A class containing the issuer and serial number of a certificate, which can
+ * be used to uniquely identify the certificate.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class IssuerAndSerial {
+ /** store the issuer as String*/
+ private String issuerDN;
+ /** store the serial as BigInteger*/
+ private BigInteger serial;
+
+ /**
+ * Create an <code>IssuerAndSerial</code> object.
+ *
+ * The name of the issuer is converted to RFC2253. If it cannot be parsed, the
+ * DN contained in the <code>issuer</code> is set.
+ *
+ * @param issuer The isser of a certificate.
+ * @param serial The serial number of the certificate.
+ */
+ public IssuerAndSerial(Principal issuer, BigInteger serial) {
+ RFC2253NameParser parser = new RFC2253NameParser(issuer.getName());
+
+ try {
+ this.issuerDN = ((Name) parser.parse()).getRFC2253String();
+ } catch (RFC2253NameParserException e) {
+ this.issuerDN = issuer.getName();
+ }
+ this.serial = serial;
+ }
+
+ /**
+ * Create an <code>IssuerAndSerial</code> object.
+ *
+ * @param issuerDN The issuer distinguished name. Should be an RFC2253 name.
+ * @param serial The serial number of the certificate.
+ */
+ public IssuerAndSerial(String issuerDN, BigInteger serial) {
+ this.issuerDN = issuerDN;
+ this.serial = serial;
+ }
+
+ /**
+ * Return the issuer DN in RFC2253 format.
+ *
+ * @return The issuer part of this object.
+ */
+ public String getIssuerDN() {
+ return issuerDN;
+ }
+
+ /**
+ * Return the serial number.
+ *
+ * @return The serial number of this object.
+ */
+ public BigInteger getSerial() {
+ return serial;
+ }
+
+ /**
+ * Compare this <code>IssuerAndSerial</code> to another object.
+ *
+ * @return <code>true</code>, if <code>other</code> is an
+ * <code>IssuerAndSerial</code> object and the <code>issuer</code> and
+ * <code>serial</code> fields are both equal. <code>false</code> otherwise.
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ public boolean equals(Object other) {
+ if (other instanceof IssuerAndSerial) {
+ IssuerAndSerial ias = (IssuerAndSerial) other;
+ return getIssuerDN().equals(ias.getIssuerDN())
+ && getSerial().equals(ias.getSerial());
+ }
+ return false;
+ }
+
+ /**
+ * Return the hash code of this <code>IssuerAndSerial</code>.
+ *
+ * @return The hash code of this <code>IssuerAndSerial</code>.
+ * @see java.lang.Object#hashCode()
+ */
+ public int hashCode() {
+ return issuerDN.hashCode() ^ serial.hashCode();
+ }
+
+ /**
+ * Return a <code>String</code> representation of this
+ * <code>IssuerAndSerial</code> object.
+ *
+ * @return The <code>String</code> representation.
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ return ("(IssuerAndSerial - Issuer<" + getIssuerDN())
+ + ("> Serial<" + serial.toString() + ">)");
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/SAMLStatus.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/SAMLStatus.java
new file mode 100644
index 000000000..43c0c4405
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/SAMLStatus.java
@@ -0,0 +1,74 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.data;
+
+/**
+ * Data contained in a <code>&lt;samlp:Status&gt;</code>
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class SAMLStatus {
+
+ /** main status code */
+ private String statusCode;
+ /** sub status code */
+ private String subStatusCode;
+ /** status message */
+ private String statusMessage;
+
+ /**
+ * @return status code
+ */
+ public String getStatusCode() {
+ return statusCode;
+ }
+
+ /**
+ * @return status message
+ */
+ public String getStatusMessage() {
+ return statusMessage;
+ }
+
+ /**
+ * @return enclosed sub-status code
+ */
+ public String getSubStatusCode() {
+ return subStatusCode;
+ }
+
+ /**
+ * @param string the status code
+ */
+ public void setStatusCode(String string) {
+ statusCode = string;
+ }
+
+ /**
+ * @param string the status message
+ */
+ public void setStatusMessage(String string) {
+ statusMessage = string;
+ }
+
+ /**
+ * @param string the enclosed sub-status code
+ */
+ public void setSubStatusCode(String string) {
+ subStatusCode = string;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/config/CertStoreConfigurationImpl.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/config/CertStoreConfigurationImpl.java
new file mode 100644
index 000000000..56c567890
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/config/CertStoreConfigurationImpl.java
@@ -0,0 +1,111 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.iaik.config;
+
+import java.io.File;
+
+import at.gv.egovernment.moa.id.config.ConfigurationException;
+import at.gv.egovernment.moa.id.config.ConfigurationProvider;
+import at.gv.egovernment.moa.id.iaik.servertools.observer.ObservableImpl;
+import at.gv.egovernment.moa.util.FileUtils;
+import iaik.pki.store.certstore.CertStoreConfiguration;
+import iaik.pki.store.certstore.CertStoreParameters;
+import iaik.pki.store.certstore.CertStoreTypes;
+import iaik.pki.store.certstore.directory.DirectoryCertStoreParameters;
+
+/**
+ * Implementation of interface needed to initialize an IAIK JSSE <code>TrustManager</code>
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class CertStoreConfigurationImpl extends ObservableImpl
+ implements CertStoreConfiguration, DirectoryCertStoreParameters {
+ /** identifies the rootDirectory */
+ private String rootDirectory;
+ /** ConfigurationProvider */
+ private ConfigurationProvider conf;
+ /** Array for storing all CertStoreParameters */
+ private CertStoreParameters[] parameters;
+
+ /**
+ * Create a new <code>CertStoreConfigurationImpl</code>.
+ *
+ * @param conf The MOA configuration from which the configuration data is
+ * @throws ConfigurationException an any config-error
+ * being read.
+ */
+ public CertStoreConfigurationImpl(ConfigurationProvider conf) throws ConfigurationException {
+ this.conf=conf;
+ String paramName = ConfigurationProvider.DIRECTORY_CERTSTORE_PARAMETER_PROPERTY;
+ String certStoreRootDirParam = conf.getGenericConfigurationParameter(paramName);
+ if (certStoreRootDirParam == null)
+ throw new ConfigurationException(
+ "config.08", new Object[] {paramName});
+
+ rootDirectory = FileUtils.makeAbsoluteURL(certStoreRootDirParam, conf.getRootConfigFileDir());
+ if(rootDirectory.startsWith("file:")) rootDirectory = rootDirectory.substring(6);
+ File f = new File(rootDirectory);
+ if (!f.isDirectory())
+ throw new ConfigurationException(
+ "config.05", new Object[] {paramName});
+
+ parameters = new CertStoreParameters[] { this };
+ }
+
+ /**
+ * @see iaik.pki.store.certstore.CertStoreConfiguration#getParameters()
+ */
+ public CertStoreParameters[] getParameters() {
+ return parameters;
+ }
+
+ /**
+ * @see iaik.pki.store.certstore.directory.DirectoryCertStoreParameters#getRootDirectory()
+ */
+ public String getRootDirectory() {
+ return rootDirectory;
+ }
+
+ /**
+ * @see iaik.pki.store.certstore.directory.DirectoryCertStoreParameters#createNew()
+ */
+ public boolean createNew() {
+ return false;
+ }
+
+ /**
+ * @see iaik.pki.store.certstore.CertStoreParameters#getId()
+ */
+ public String getId() {
+ return "MOA ID Directory CertStore";
+ }
+
+ /**
+ * @see iaik.pki.store.certstore.CertStoreParameters#isReadOnly()
+ */
+ public boolean isReadOnly() {
+ return false;
+ }
+
+ /**
+ * @return <code>CertStoreTypes.DIRECTORY</code>
+ * @see iaik.pki.store.certstore.CertStoreParameters#getType()
+ */
+ public String getType() {
+ return CertStoreTypes.DIRECTORY;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/config/LoggerConfigImpl.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/config/LoggerConfigImpl.java
new file mode 100644
index 000000000..311a18feb
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/config/LoggerConfigImpl.java
@@ -0,0 +1,66 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.iaik.config;
+
+import iaik.logging.LogConfigurationException;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Properties;
+
+/**
+ * Implementation of interface <needed to initialize an IAIK JSSE <code>TrustManager</code>
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class LoggerConfigImpl implements iaik.logging.LoggerConfig {
+
+ /** logging properties **/
+ private Properties loggingProperties;
+
+ /**
+ * Constructor
+ */
+ public LoggerConfigImpl(String propertyFileURL) throws IOException {
+ InputStream in = new URL(propertyFileURL).openStream();
+ loggingProperties = new Properties();
+ loggingProperties.load(in);
+ in.close();
+ }
+
+ /**
+ * @see iaik.logging.LoggerConfig#getFactory()
+ */
+ public String getFactory() {
+ return "iaik.logging.impl.Log4jFactory";
+ }
+
+ /**
+ * @see iaik.logging.LoggerConfig#getProperties()
+ */
+ public Properties getProperties() throws LogConfigurationException {
+ return loggingProperties;
+ }
+
+ /**
+ * @see iaik.logging.LoggerConfig#getNodeId()
+ */
+ public String getNodeId() {
+ return "iaik";
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/config/PKIConfigurationImpl.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/config/PKIConfigurationImpl.java
new file mode 100644
index 000000000..327503355
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/config/PKIConfigurationImpl.java
@@ -0,0 +1,81 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.iaik.config;
+
+import at.gv.egovernment.moa.id.config.ConfigurationException;
+import at.gv.egovernment.moa.id.config.ConfigurationProvider;
+import iaik.pki.PKIConfiguration;
+import iaik.pki.pathvalidation.ValidationConfiguration;
+import iaik.pki.revocation.RevocationConfiguration;
+import iaik.pki.store.certstore.CertStoreConfiguration;
+import iaik.pki.store.revocation.archive.ArchiveConfiguration;
+
+/**
+ * Implementation of interface <code>PKIConfiguration</code> needed to
+ * initialize an IAIK JSSE <code>TrustManager</code>
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class PKIConfigurationImpl implements PKIConfiguration {
+ /** The configuration for the CertStore */
+ private CertStoreConfiguration certStoreConfiguration;
+ /** The configuration for the RevocationChecks */
+ private RevocationConfiguration revocationConfiguration;
+ /** The configuration for the Validation */
+ private ValidationConfiguration validationConfiguration;
+
+ /**
+ * Constructor
+ * @param conf the Configuration for the PKIConfig
+ * @throws ConfigurationException for any config error
+ */
+ public PKIConfigurationImpl(ConfigurationProvider conf) throws ConfigurationException {
+
+ certStoreConfiguration = new CertStoreConfigurationImpl(conf);
+ revocationConfiguration = new RevocationConfigurationImpl();
+ validationConfiguration = new ValidationConfigurationImpl(conf);
+ }
+
+ /**
+ * @see iaik.pki.PKIConfiguration#getCertStoreConfiguration()
+ */
+ public CertStoreConfiguration getCertStoreConfiguration() {
+ return certStoreConfiguration;
+ }
+
+ /**
+ * @see iaik.pki.PKIConfiguration#getRevocationConfiguration()
+ */
+ public RevocationConfiguration getRevocationConfiguration() {
+ return revocationConfiguration;
+ }
+
+ /**
+ * @see iaik.pki.PKIConfiguration#getArchiveConfiguration()
+ */
+ public ArchiveConfiguration getArchiveConfiguration() {
+ return null;
+ }
+
+ /**
+ * @see iaik.pki.PKIConfiguration#getValidationConfiguration()
+ */
+ public ValidationConfiguration getValidationConfiguration() {
+ return validationConfiguration;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/config/RevocationConfigurationImpl.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/config/RevocationConfigurationImpl.java
new file mode 100644
index 000000000..cedaf2ccc
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/config/RevocationConfigurationImpl.java
@@ -0,0 +1,55 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.iaik.config;
+
+import iaik.pki.revocation.RevocationConfiguration;
+
+import java.security.cert.X509Certificate;
+import java.util.Collections;
+import java.util.Date;
+import java.util.Set;
+
+import at.gv.egovernment.moa.id.iaik.servertools.observer.ObservableImpl;
+
+/**
+ * Implementation of interface needed to initialize an IAIK JSSE <code>TrustManager</code>
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class RevocationConfigurationImpl extends ObservableImpl implements RevocationConfiguration {
+
+ /**
+ * @see iaik.pki.revocation.RevocationConfiguration#getAlternativeDistributionPoints(java.security.cert.X509Certificate, java.security.cert.X509Certificate, java.util.Date)
+ */
+ public Set getAlternativeDistributionPoints(
+ X509Certificate arg0,
+ X509Certificate arg1,
+ Date arg2) {
+ return Collections.EMPTY_SET;
+ }
+
+ /**
+ * @see iaik.pki.revocation.RevocationConfiguration#archiveRevocationInfo(java.lang.String, java.lang.String)
+ */
+ public boolean archiveRevocationInfo(String arg0, String arg1) {
+ return false;
+ }
+
+ public Integer getCrlRetentionInterval(String arg0) {
+ return null;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/config/ValidationConfigurationImpl.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/config/ValidationConfigurationImpl.java
new file mode 100644
index 000000000..9bb1f8ed7
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/config/ValidationConfigurationImpl.java
@@ -0,0 +1,66 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.iaik.config;
+
+import iaik.pki.pathvalidation.ValidationConfiguration;
+
+import java.security.cert.X509Certificate;
+import java.security.spec.AlgorithmParameterSpec;
+
+import at.gv.egovernment.moa.id.config.ConfigurationProvider;
+import at.gv.egovernment.moa.id.iaik.servertools.observer.ObservableImpl;
+
+/**
+ * Implementation of interface needed to initialize an IAIK JSSE <code>TrustManager</code>
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class ValidationConfigurationImpl extends ObservableImpl
+ implements ValidationConfiguration {
+ /** The ConfigurationProvider for the validation*/
+ private ConfigurationProvider conf;
+
+ /**
+ * Constructor
+ * @param conf with the configuration
+ */
+ public ValidationConfigurationImpl(ConfigurationProvider conf) {
+ this.conf = conf;
+ }
+
+ /**
+ * @see iaik.pki.pathvalidation.ValidationConfiguration#getChainingMode(java.security.cert.X509Certificate)
+ */
+ public String getChainingMode(X509Certificate trustAnchor) {
+ String chainingMode = conf.getChainingMode(trustAnchor);
+ return chainingMode;
+ }
+
+ /**
+ * @see iaik.pki.pathvalidation.ValidationConfiguration#getPublicKeyParamsAsSpec(java.security.cert.X509Certificate)
+ */
+ public AlgorithmParameterSpec getPublicKeyParamsAsSpec(X509Certificate arg0) {
+ return null;
+ }
+
+ /**
+ * @see iaik.pki.pathvalidation.ValidationConfiguration#getPublicKeyParamsAsCert(java.security.cert.X509Certificate)
+ */
+ public X509Certificate getPublicKeyParamsAsCert(X509Certificate arg0) {
+ return null;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/pki/PKIProfileImpl.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/pki/PKIProfileImpl.java
new file mode 100644
index 000000000..16101571e
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/pki/PKIProfileImpl.java
@@ -0,0 +1,201 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.iaik.pki;
+
+import java.security.cert.X509Certificate;
+import java.util.Collections;
+import java.util.Set;
+
+import iaik.pki.PKIProfile;
+import iaik.pki.pathvalidation.ValidationProfile;
+import iaik.pki.revocation.RevocationProfile;
+import iaik.pki.revocation.RevocationSourceTypes;
+import iaik.pki.store.truststore.TrustStoreProfile;
+import iaik.pki.store.truststore.TrustStoreTypes;
+
+import at.gv.egovernment.moa.id.iaik.servertools.observer.ObservableImpl;
+
+/**
+ * Implementation of the <code>PKIProfile</code> interface and subinterfaces
+ * providing information needed for certificate path validation.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class PKIProfileImpl extends ObservableImpl
+ implements PKIProfile, RevocationProfile, TrustStoreProfile, ValidationProfile {
+
+ /**
+ * URI to the truststore
+ */
+ private String trustStoreURI;
+
+ /**
+ * revocation checking;
+ */
+ private boolean revocationChecking;
+
+ /**
+ * The trust profile identifier.
+ */
+ private String id;
+
+
+ /**
+ * Create a new <code>PKIProfileImpl</code>.
+ *
+ * @param trustStoreURI trust store URI
+ */
+ public PKIProfileImpl(String trustStoreURI, boolean revocationChecking) {
+ this.trustStoreURI = trustStoreURI;
+ this.revocationChecking = revocationChecking;
+ String id = String.valueOf(System.currentTimeMillis());
+ setId("id-" + id);
+ }
+
+ /**
+ * @see iaik.pki.PKIProfile#autoAddCertificates()
+ */
+ public boolean autoAddCertificates() {
+ return true;
+ }
+
+ /**
+ * @see iaik.pki.PKIProfile#getRevocationProfile()
+ */
+ public RevocationProfile getRevocationProfile() {
+ return this;
+ }
+
+ /**
+ * @see iaik.pki.PKIProfile#getTrustStoreProfile()
+ */
+ public TrustStoreProfile getTrustStoreProfile() {
+ return this;
+ }
+
+ /**
+ * @see iaik.pki.PKIProfile#getValidationProfile()
+ */
+ public ValidationProfile getValidationProfile() {
+ return this;
+ }
+
+ /**
+ * @see iaik.pki.PKIProfile#useAuthorityInfoAccess()
+ */
+ public boolean useAuthorityInfoAccess() {
+ return true;
+ }
+
+ /**
+ * @see iaik.pki.revocation.RevocationProfile#getMaxRevocationAge(java.lang.String)
+ */
+ public long getMaxRevocationAge(String arg0) {
+ return 0;
+ }
+
+ /**
+ * @see iaik.pki.revocation.RevocationProfile#getOCSPRequestHashAlgorithm()
+ */
+ public String getOCSPRequestHashAlgorithm() {
+ return null;
+ }
+
+ /**
+ * @see iaik.pki.revocation.RevocationProfile#getPreferredServiceOrder(java.security.cert.X509Certificate)
+ */
+ public String[] getPreferredServiceOrder(X509Certificate arg0) {
+ return new String[] {RevocationSourceTypes.CRL};
+ }
+
+ /**
+ * @see iaik.pki.store.truststore.TrustStoreProfile#getType()
+ */
+ public String getType() {
+ return TrustStoreTypes.DIRECTORY;
+ }
+
+ /**
+ * @see iaik.pki.store.truststore.TrustStoreProfile#getURI()
+ */
+ public String getURI() {
+ return trustStoreURI;
+ }
+
+ /**
+ * @see iaik.pki.pathvalidation.ValidationProfile#getInitialAnyPolicyInhibit()
+ */
+ public boolean getInitialAnyPolicyInhibit() {
+ return false;
+ }
+
+ /**
+ * @see iaik.pki.pathvalidation.ValidationProfile#getInitialExplicitPolicy()
+ */
+ public boolean getInitialExplicitPolicy() {
+ return false;
+ }
+
+ /**
+ * @see iaik.pki.pathvalidation.ValidationProfile#getInitialPolicyMappingInhibit()
+ */
+ public boolean getInitialPolicyMappingInhibit() {
+ return false;
+ }
+
+ /**
+ * @see iaik.pki.pathvalidation.ValidationProfile#getInitialPolicySet()
+ */
+ public Set getInitialPolicySet() {
+ return Collections.EMPTY_SET;
+ }
+
+ /**
+ * @see iaik.pki.pathvalidation.ValidationProfile#getNameConstraintsProcessing()
+ */
+ public boolean getNameConstraintsProcessing() {
+ return false;
+ }
+
+ /**
+ * @see iaik.pki.pathvalidation.ValidationProfile#getPolicyProcessing()
+ */
+ public boolean getPolicyProcessing() {
+ return false;
+ }
+
+ /**
+ * @see iaik.pki.pathvalidation.ValidationProfile#getRevocationChecking()
+ */
+ public boolean getRevocationChecking() {
+ return this.revocationChecking;
+ }
+
+ /**
+ * @see iaik.pki.store.truststore.TrustStoreProfile#getId()
+ */
+ public String getId() {
+ return id;
+ }
+ /**
+ * Sets the trust profile identifier.
+ * @param id The id to set.
+ */
+ public void setId(String id) {
+ this.id = id;
+ }
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/pki/jsse/MOAIDTrustManager.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/pki/jsse/MOAIDTrustManager.java
new file mode 100644
index 000000000..15634ef84
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/pki/jsse/MOAIDTrustManager.java
@@ -0,0 +1,134 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.iaik.pki.jsse;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.net.URL;
+import java.security.GeneralSecurityException;
+import java.security.cert.CertificateFactory;
+import java.security.cert.X509Certificate;
+import java.util.ArrayList;
+import java.util.List;
+
+import at.gv.egovernment.moa.id.util.MOAIDMessageProvider;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.logging.LoggingContext;
+import at.gv.egovernment.moa.logging.LoggingContextManager;
+
+import iaik.pki.jsse.IAIKX509TrustManager;
+
+/**
+ * <code>TrustManager</code> implementation featuring CRL checking (inherited from
+ * <code>IAIKX509TrustManager</code>), plus server-end-SSL-certificate checking.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class MOAIDTrustManager extends IAIKX509TrustManager {
+
+ /** an x509Certificate array containing all accepted server certificates*/
+ private X509Certificate[] acceptedServerCertificates;
+
+ /**
+ * Constructor
+ * @param acceptedServerCertificateStoreURL the url leading to the acceptedServer cert store
+ * @throws GeneralSecurityException occurs on security errors
+ * @throws IOException occurs on IO errors
+ */
+ public MOAIDTrustManager(String acceptedServerCertificateStoreURL)
+ throws IOException, GeneralSecurityException {
+
+ if (acceptedServerCertificateStoreURL != null)
+ buildAcceptedServerCertificates(acceptedServerCertificateStoreURL);
+ else
+ acceptedServerCertificates = null;
+ }
+
+
+ /**
+ * Initializes the LoggingContextManager logging context.
+ * Fixes a bug occuring in the case MOA-SP is called by API.
+ * In this case, IAIKX509TrustManager uses the LogginConfig of MOA-SP.
+ * This method must be called before a MOAIDTrustManager is constructed,
+ * from every thread.
+ */
+ public static void initializeLoggingContext() {
+ if (LoggingContextManager.getInstance().getLoggingContext() == null)
+ LoggingContextManager.getInstance().setLoggingContext(
+ new LoggingContext(Thread.currentThread().getName()));
+ }
+
+
+ /**
+ * Builds an Array of accepted server certificates from an URL,
+ * and stores it in <code>acceptedServerCertificates</code>.
+ * @param acceptedServerCertificateStoreURL file URL pointing to the directory
+ * containing accepted server X509 certificates
+ * @throws GeneralSecurityException on security errors
+ * @throws IOException on any IO errors
+ */
+ private void buildAcceptedServerCertificates(String acceptedServerCertificateStoreURL)
+ throws IOException, GeneralSecurityException {
+
+ List certList = new ArrayList();
+ URL storeURL = new URL(acceptedServerCertificateStoreURL);
+ File storeDir = new File(storeURL.getFile());
+ // list certificate files in directory
+ File[] certFiles = storeDir.listFiles();
+ for (int i = 0; i < certFiles.length; i++) {
+ // for each: create an X509Certificate and store it in list
+ File certFile = certFiles[i];
+ FileInputStream fis = new FileInputStream(certFile.getPath());
+ CertificateFactory certFact = CertificateFactory.getInstance("X.509");
+ X509Certificate cert = (X509Certificate)certFact.generateCertificate(fis);
+ fis.close();
+ certList.add(cert);
+ }
+ // store acceptedServerCertificates
+ acceptedServerCertificates = (X509Certificate[]) certList.toArray(new X509Certificate[0]);
+ }
+
+ /**
+ * Does additional server-end-SSL-certificate checking.
+ * @see com.sun.net.ssl.X509TrustManager#isServerTrusted(java.security.cert.X509Certificate[])
+ */
+ public boolean isServerTrusted(X509Certificate[] certChain) {
+ boolean trusted = super.isServerTrusted(certChain);
+ if (! trusted || acceptedServerCertificates == null)
+ return trusted;
+ else {
+ // check server-end-SSL-certificate with acceptedServerCertificates
+ X509Certificate serverCert = certChain[0];
+ for (int i = 0; i < acceptedServerCertificates.length; i++) {
+ X509Certificate acceptedServerCert = acceptedServerCertificates[i];
+ if (serverCert.equals(acceptedServerCert))
+ return true;
+ }
+ Logger.warn(MOAIDMessageProvider.getInstance().getMessage("ssl.01", null));
+ return false;
+ }
+ }
+ /**
+ * In rare cases, this method is being called although it should not be.
+ * @see com.sun.net.ssl.X509TrustManager#isClientTrusted(X509Certificate[])
+ */
+ public boolean isClientTrusted(java.security.cert.X509Certificate arg0[])
+ {
+ return true;
+ }
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/servertools/observer/ObservableImpl.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/servertools/observer/ObservableImpl.java
new file mode 100644
index 000000000..2165816f6
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/servertools/observer/ObservableImpl.java
@@ -0,0 +1,61 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.iaik.servertools.observer;
+
+import iaik.pki.store.observer.NotificationData;
+import iaik.pki.store.observer.Observable;
+import iaik.pki.store.observer.Observer;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+
+/**
+ * Implementation of interface <needed to initialize an IAIK JSSE <code>TrustManager</code>
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class ObservableImpl implements Observable {
+ /** a List for all observers */
+ private List observers = new ArrayList();
+
+ /**
+ * @see iaik.pki.store.observer.Observable#addObserver(iaik.pki.store.observer.Observer)
+ */
+ public void addObserver(Observer observer) {
+ observers.add(observer);
+ }
+
+ /**
+ * @see iaik.pki.store.observer.Observable#removeObserver(iaik.pki.store.observer.Observer)
+ */
+ public boolean removeObserver(Observer observer) {
+ return observers.remove(observer);
+ }
+
+ /**
+ * @see iaik.pki.store.observer.Observable#notify(iaik.pki.store.observer.NotificationData)
+ */
+ public void notify(NotificationData data) {
+ Iterator iter = observers.iterator();
+ for (iter = observers.iterator(); iter.hasNext();) {
+ Observer observer = (Observer) iter.next();
+ observer.notify(data);
+ }
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/ConnectionBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/ConnectionBuilder.java
new file mode 100644
index 000000000..8a8a55442
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/ConnectionBuilder.java
@@ -0,0 +1,79 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.proxy;
+
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.util.Vector;
+
+import javax.net.ssl.SSLSocketFactory;
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * Builder for {@link java.net.URLConnection} objects used to forward requests
+ * to the remote online application.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+
+public interface ConnectionBuilder {
+
+ /**
+ * Builds an HttpURLConnection to a {@link java.net.URL} which is derived
+ * from an {@link HttpServletRequest} URL, by substitution of a
+ * public URL prefix for the real URL prefix.<br>
+ * The HttpURLConnection has been created by {@link java.net.URL#openConnection}, but
+ * it has not yet been connected to by {@link java.net.URLConnection#connect}.<br>
+ * The field settings of the HttpURLConnection are:
+ * <ul>
+ * <li><code>allowUserInteraction = false</code></li>
+ * <li><code>doInput = true</code></li>
+ * <li><code>doOutput = true</code></li>
+ * <li><code>requestMethod = request.getMethod()</code></li>
+ * <li><code>useCaches = false</code></li>
+ * </ul>
+ *
+ * @param request the incoming request which shall be forwarded
+ * @param publicURLPrefix the public URL prefix to be substituted by the real URL prefix
+ * @param realURLPrefix the URL prefix to substitute the public URL prefix
+ * @param sslSocketFactory factory to be used for creating an SSL socket in case
+ * of a URL for scheme <code>"https:"</code>;
+ * <br>if <code>null</code>, the default SSL socket factory would be used
+ * @param parameters parameters to be forwarded
+ * @return a URLConnection created by {@link java.net.URL#openConnection}, connecting to
+ * the requested URL with <code>publicURLPrefix</code> substituted by <code>realURLPrefix</code>
+ * @throws IOException if an I/O exception occurs during opening the connection
+ * @see java.net.URL#openConnection()
+ * @see com.sun.net.ssl.HttpsURLConnection#getDefaultSSLSocketFactory()
+ */
+ public HttpURLConnection buildConnection(
+ HttpServletRequest request,
+ String publicURLPrefix,
+ String realURLPrefix,
+ SSLSocketFactory sslSocketFactory,
+ Vector parameters) throws IOException;
+
+
+ /**
+ * Disconnects the HttpURLConnection if necessary.
+ * The implementation of the Connectionbuilder decides wether
+ * if this should be happen or not.
+ *
+ * @param con the HttpURLConnection which is normaly to be closed
+ */
+ public void disconnect(HttpURLConnection con);
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/ConnectionBuilderFactory.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/ConnectionBuilderFactory.java
new file mode 100644
index 000000000..5ea2c1f86
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/ConnectionBuilderFactory.java
@@ -0,0 +1,83 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.proxy;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import at.gv.egovernment.moa.id.config.ConfigurationException;
+import at.gv.egovernment.moa.id.config.proxy.OAProxyParameter;
+import at.gv.egovernment.moa.id.config.proxy.ProxyConfigurationProvider;
+
+/**
+ * Factory delivering a {@link ConnectionBuilder} implementation for
+ * an online application, initialized from configuration data.
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class ConnectionBuilderFactory {
+
+ /** default connection builder to be used for online application
+ * where no special implementation of the <code>ConnectionBuilder</code>
+ * interface is configured
+ */
+ private static ConnectionBuilder defaultConnectionBuilder;
+ /** mapping from online application public URL prefix to an implementation
+ * of the <code>ConnectionBuilder</code> interface to be used;
+ * if no mapping is given for an online application, the
+ * <code>DefaultConnectionBuilder</code> will be used */
+ private static Map connectionBuilderMap;
+
+ /**
+ * Initializes the <code>ConnectionBuilder</code> map from the configuration data.
+ * @throws ConfigurationException when the configuration cannot be read,
+ * or when a class name configured cannot be instantiated
+ */
+ public static void initialize() throws ConfigurationException {
+ defaultConnectionBuilder = new DefaultConnectionBuilder();
+ connectionBuilderMap = new HashMap();
+ ProxyConfigurationProvider proxyConf = ProxyConfigurationProvider.getInstance();
+ for (int i = 0; i < proxyConf.getOnlineApplicationParameters().length; i++) {
+ OAProxyParameter oaParam = proxyConf.getOnlineApplicationParameters()[i];
+ String publicURLPrefix = oaParam.getPublicURLPrefix();
+ String className = oaParam.getConnectionBuilderImpl();
+ if (className != null) {
+ try {
+ ConnectionBuilder cb = (ConnectionBuilder)Class.forName(className).newInstance();
+ connectionBuilderMap.put(publicURLPrefix, cb);
+ }
+ catch (Throwable ex) {
+ throw new ConfigurationException("config.07", new Object[] {publicURLPrefix}, ex);
+ }
+ }
+ }
+ }
+
+ /**
+ * Gets the <code>ConnectionBuilder</code> implementation to be used for the given
+ * online application.
+ * @param publicURLPrefix public URL prefix of the online application
+ * @return <code>ConnectionBuilder</code> implementation
+ */
+ public static ConnectionBuilder getConnectionBuilder(String publicURLPrefix) {
+ ConnectionBuilder cb = (ConnectionBuilder) connectionBuilderMap.get(publicURLPrefix);
+ if (cb == null)
+ return defaultConnectionBuilder;
+ else
+ return cb;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/DefaultConnectionBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/DefaultConnectionBuilder.java
new file mode 100644
index 000000000..8a7b2a8bd
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/DefaultConnectionBuilder.java
@@ -0,0 +1,196 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.proxy;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.Iterator;
+import java.util.Vector;
+
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLSession;
+import javax.net.ssl.SSLSocketFactory;
+import javax.servlet.http.HttpServletRequest;
+
+import at.gv.egovernment.moa.id.config.ConfigurationException;
+import at.gv.egovernment.moa.id.config.proxy.ProxyConfigurationProvider;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.BoolUtils;
+import at.gv.egovernment.moa.util.URLEncoder;
+
+
+
+/**
+ * Defaultimplementierung von <code>ConnectionBuilder</code>.
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class DefaultConnectionBuilder implements ConnectionBuilder {
+
+ /** a boolean to disable the HostnameVerification (default = false)*/
+ private static boolean cbDisableHostnameVerification = false;
+
+ /**
+ * Constructor for DefaultConnectionBuilder.
+ * @throws ConfigurationException on any config error
+ */
+ public DefaultConnectionBuilder() throws ConfigurationException {
+ cbDisableHostnameVerification = BoolUtils.valueOf(
+ ProxyConfigurationProvider.getInstance().getGenericConfigurationParameter(
+ "ProxyComponent.DisableHostnameVerification"));
+ //TODO MOA-ID BRZ undocumented feature
+ if (cbDisableHostnameVerification)
+ Logger.warn("ProxyComponent.DisableHostnameVerification: " + cbDisableHostnameVerification);
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.proxy.ConnectionBuilder#buildConnection
+ */
+ public HttpURLConnection buildConnection(
+ HttpServletRequest req,
+ String publicURLPrefix,
+ String realURLPrefix,
+ SSLSocketFactory sslSocketFactory,
+ Vector parameters)
+ throws IOException {
+
+ // Bug [#540]
+ //String requestedURL = req.getRequestURL().toString();
+ String requestedURL = escapeUrl(req.getRequestURL().toString());
+
+ // check whether requested URL starts with publicURLPrefix
+
+ //Temporary allow http:// urls instead of the https:// in publicURLPrefix
+ //if (req.getSession().getAttribute("authorizationkey")==null) {
+ // if (! requestedURL.startsWith(publicURLPrefix))
+ // throw new IOException(MOAIDMessageProvider.getInstance().getMessage(
+ // "proxy.01", new Object[] {requestedURL, publicURLPrefix}));
+ //}
+
+ // in case of GET request, append query string to requested URL;
+ // otherwise, HttpURLConnection would perform a POST request
+ if ("get".equalsIgnoreCase(req.getMethod()) && ! parameters.isEmpty()) {
+ requestedURL = appendQueryString(requestedURL, parameters);
+ }
+ // build real URL in online application
+ String realURLString = realURLPrefix + requestedURL.substring(publicURLPrefix.length());
+ URL url = new URL(realURLString);
+ Logger.debug("OA Request: " + req.getMethod() + " " + url.toString());
+
+ HttpURLConnection conn = (HttpURLConnection)url.openConnection();
+ conn.setRequestMethod(req.getMethod());
+ conn.setDoInput(true);
+ conn.setDoOutput(true);
+ //conn.setUseCaches(false);
+ //conn.setAllowUserInteraction(true);
+ conn.setInstanceFollowRedirects(false);
+
+ // JSSE Abhängigkeit
+ if (conn instanceof HttpsURLConnection && sslSocketFactory != null) {
+ HttpsURLConnection httpsConn = (HttpsURLConnection) conn;
+ httpsConn.setSSLSocketFactory(sslSocketFactory);
+ if (cbDisableHostnameVerification)
+ httpsConn.setHostnameVerifier(new HostnameNonVerifier());
+ }
+
+ return conn;
+ }
+
+ private static String escapeUrl(String unescapedUrlString) throws RuntimeException {
+ try {
+ URL unescapedUrl = new URL(unescapedUrlString);
+ String protocol = unescapedUrl.getProtocol();
+ String fragment = unescapedUrl.getRef();
+ String ssp = unescapedUrlString.substring(protocol.length() + 1, unescapedUrlString.length() - ((fragment == null) ? 0 : fragment.length() + 1));
+
+ URL url2 = new URI(protocol, ssp, fragment).toURL();
+ return url2.toExternalForm();
+ } catch (MalformedURLException e) {
+ throw new RuntimeException(e);
+ } catch (URISyntaxException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+
+ /**
+ * Disconnects the HttpURLConnection if necessary.
+ * The implementation of the Connectionbuilder decides wether
+ * if this should be happen or not.
+ *
+ * @param conn the HttpURLConnection which is normaly to be closed
+ */
+ public void disconnect(HttpURLConnection conn) {
+ conn.disconnect();
+ }
+
+
+ /**
+ * @param requestedURL
+ * @param parameters
+ * @return
+ */
+ private String appendQueryString(String requestedURL, Vector parameters) {
+ String newURL = requestedURL;
+ String parameter[] = new String[2];
+ String paramValue ="";
+ String paramName ="";
+ String paramString ="";
+ for (Iterator iter = parameters.iterator(); iter.hasNext();) {
+ try {
+ parameter = (String[]) iter.next();
+ //next two lines work not with OWA-SSL-Login-form
+ paramName = URLEncoder.encode((String) parameter[0], "UTF-8");
+ paramValue = URLEncoder.encode((String) parameter[1], "UTF-8");
+
+ } catch (UnsupportedEncodingException e) {
+ //UTF-8 should be supported
+ }
+ paramString = "&" + paramName + "=" + paramValue + paramString;
+ }
+ if (paramString.length()>0) newURL = newURL + "?" + paramString.substring(1);
+ return newURL;
+ }
+
+ /**
+ * @author Stefan Knirsch
+ * @version $Id$
+ * A private class to change the standard HostName verifier to disable the
+ * Hostname Verification Check
+ */
+
+ // JSSE Abhängigkeit
+ private class HostnameNonVerifier implements HostnameVerifier {
+
+ public boolean verify(String hostname, SSLSession session) {
+ return true;
+ }
+
+ /**
+ * @see com.sun.net.ssl.HostnameVerifier#verify(String, String)
+ */
+ /*public boolean verify(String arg0, String arg1) {
+ return true;
+ }*/
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/DefaultLoginParameterResolver.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/DefaultLoginParameterResolver.java
new file mode 100644
index 000000000..badee38ac
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/DefaultLoginParameterResolver.java
@@ -0,0 +1,158 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.proxy;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import at.gv.egovernment.moa.id.config.proxy.OAConfiguration;
+import at.gv.egovernment.moa.id.data.AuthenticationData;
+import at.gv.egovernment.moa.util.Base64Utils;
+import at.gv.egovernment.moa.util.URLEncoder;
+
+/**
+ * Implementation of interface <code>LoginParameterResolver</code>
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class DefaultLoginParameterResolver implements LoginParameterResolver {
+
+ /**
+ * Constructor
+ */
+ //public DefaultLoginParameterResolver() {
+ //}
+ //@TODO: Änderung von 1.4.4
+
+ /**
+ * Configuration mehtod (not used)
+ */
+ public void configure(String configuration, Boolean businessService) throws LoginParameterResolverException {
+ }
+
+
+ /**
+ * @see at.gv.egovernment.moa.id.proxy.LoginParameterResolver#getAuthenticationHeaders(OAConfiguration, AuthenticationData, String, boolean, String)
+ */
+ public Map getAuthenticationHeaders(
+ OAConfiguration oaConf,
+ AuthenticationData authData,
+ String clientIPAddress,
+ boolean businessService,
+ String publicURLPrefix) {
+
+ Map result = new HashMap();
+
+ if (oaConf.getAuthType().equals(OAConfiguration.BASIC_AUTH)) {
+ String useridPredicate = oaConf.getBasicAuthUserIDMapping();
+ String userid = resolveValue(useridPredicate, authData, clientIPAddress);
+ String passwordPredicate = oaConf.getBasicAuthPasswordMapping();
+ String password = resolveValue(passwordPredicate, authData, clientIPAddress);
+
+ try {
+ String userIDPassword = userid + ":" + password;
+ String credentials = Base64Utils.encode(userIDPassword.getBytes());
+ result.put("Authorization", "Basic " + credentials);
+ }
+ catch (IOException ignore) {
+ }
+ }
+ else if (oaConf.getAuthType().equals(OAConfiguration.HEADER_AUTH)) {
+ for (Iterator iter = oaConf.getHeaderAuthMapping().keySet().iterator(); iter.hasNext();) {
+ String key = (String) iter.next();
+ String predicate = (String) oaConf.getHeaderAuthMapping().get(key);
+ String resolvedValue = resolveValue(predicate, authData, clientIPAddress);
+ result.put(key, resolvedValue);
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.proxy.LoginParameterResolver#getAuthenticationParameters(OAConfiguration, AuthenticationData, String, boolean, String)
+ */
+ public Map getAuthenticationParameters(
+ OAConfiguration oaConf,
+ AuthenticationData authData,
+ String clientIPAddress,
+ boolean businessService,
+ String publicURLPrefix) {
+
+ Map result = new HashMap();
+
+ if (oaConf.getAuthType().equals(OAConfiguration.PARAM_AUTH)) {
+ for (Iterator iter = oaConf.getParamAuthMapping().keySet().iterator(); iter.hasNext();) {
+ String key = (String) iter.next();
+ String predicate = (String) oaConf.getParamAuthMapping().get(key);
+ String resolvedValue;
+ try {
+ resolvedValue =
+ URLEncoder.encode(resolveValue(predicate, authData, clientIPAddress), "ISO-8859-1");
+ } catch (UnsupportedEncodingException e) {
+ //ISO-8859-1 is supported
+ resolvedValue = null;
+ }
+ result.put(key, resolvedValue);
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Resolves a login header or parameter value.
+ * @param predicate header or parameter predicate name from online application configuration
+ * @param authData authentication data for current login
+ * @param clientIPAddress client IP address
+ * @return header or parameter value resolved; <code>null</code> if unknown name is given
+ */
+ private static String resolveValue(String predicate, AuthenticationData authData, String clientIPAddress) {
+ if (predicate.equals(MOAGivenName))
+ return authData.getGivenName();
+ if (predicate.equals(MOAFamilyName))
+ return authData.getFamilyName();
+ if (predicate.equals(MOADateOfBirth))
+ return authData.getDateOfBirth();
+ if (predicate.equals(MOABPK))
+ return authData.getBPK();
+ if (predicate.equals(MOAWBPK))
+ return authData.getWBPK();
+ if (predicate.equals(MOAPublicAuthority))
+ if (authData.isPublicAuthority())
+ return "true";
+ else
+ return "false";
+ if (predicate.equals(MOABKZ))
+ return authData.getPublicAuthorityCode();
+ if (predicate.equals(MOAQualifiedCertificate))
+ if (authData.isQualifiedCertificate())
+ return "true";
+ else
+ return "false";
+ if (predicate.equals(MOAStammzahl))
+ return authData.getIdentificationValue();
+ if (predicate.equals(MOAIdentificationValueType))
+ return authData.getIdentificationType();
+ if (predicate.equals(MOAIPAddress))
+ return clientIPAddress;
+ else return null;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/ElakConnectionBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/ElakConnectionBuilder.java
new file mode 100644
index 000000000..f3527055d
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/ElakConnectionBuilder.java
@@ -0,0 +1,273 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.proxy;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLStreamHandler;
+import java.util.Iterator;
+import java.util.StringTokenizer;
+import java.util.Vector;
+
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLSession;
+import javax.net.ssl.SSLSocketFactory;
+import javax.servlet.http.HttpServletRequest;
+
+import at.gv.egovernment.moa.id.config.ConfigurationException;
+import at.gv.egovernment.moa.id.config.proxy.ProxyConfigurationProvider;
+import at.gv.egovernment.moa.id.util.MOAIDMessageProvider;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.BoolUtils;
+import at.gv.egovernment.moa.util.URLEncoder;
+
+import com.ibm.webdav.protocol.http.WebDAVURLConnection;
+
+
+/**
+ * Defaultimplementierung von <code>ConnectionBuilder</code>.
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class ElakConnectionBuilder implements ConnectionBuilder {
+
+ /** a boolean to disable the HostnameVerification (default = false)*/
+ private static boolean cbDisableHostnameVerification = false;
+
+ /** a boolean to indicat if webdav protocol handler was already set */
+ private static boolean webdavPHSet = false;
+
+ /**
+ * The system property name used to register a protocol handler.
+ */
+ public final static String PROTOCOL_HANDLER_PROPERTY_NAME = "java.protocol.handler.pkgs";
+
+ /**
+ * The package providing the ldap protocol handler.
+ */
+ public final static String WEBDAV_PROTOCOL_HANDLER = "com.ibm.webdav.protocol";
+
+ /**
+ * The pipe character used to sepearte different protocol handlers.
+ */
+ public final static char PIPE_CHAR = '|';
+
+
+
+
+
+ /**
+ * Constructor for ElakConnectionBuilder.
+ * @throws ConfigurationException on any config error
+ */
+ public ElakConnectionBuilder() throws ConfigurationException {
+ cbDisableHostnameVerification = BoolUtils.valueOf(
+ ProxyConfigurationProvider.getInstance().getGenericConfigurationParameter(
+ "ProxyComponent.DisableHostnameVerification"));
+ //TODO MOA-ID BRZ undocumented feature
+ if (cbDisableHostnameVerification)
+ Logger.warn("ProxyComponent.DisableHostnameVerification: " + cbDisableHostnameVerification);
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.proxy.ConnectionBuilder#buildConnection
+ */
+ public HttpURLConnection buildConnection(
+ HttpServletRequest req,
+ String publicURLPrefix,
+ String realURLPrefix,
+ SSLSocketFactory sslSocketFactory,
+ Vector parameters)
+ throws IOException {
+
+ String requestedURL = req.getRequestURL().toString();
+ // check whether requested URL starts with publicURLPrefix
+ if (! requestedURL.startsWith(publicURLPrefix))
+ throw new IOException(MOAIDMessageProvider.getInstance().getMessage(
+ "proxy.01", new Object[] {requestedURL, publicURLPrefix}));
+
+
+
+ // in case of GET request, append query string to requested URL;
+ // otherwise, HttpURLConnection would perform a POST request
+ //FIXME right parameters
+ /*
+ if ("get".equalsIgnoreCase(req.getMethod()) && ! parameters.isEmpty()) {
+ requestedURL = appendQueryString(requestedURL, parameters);
+ }
+ */
+ //TODO RSCH check functionality
+ if (null != req.getQueryString() && 0 != req.getQueryString().length() ) {
+ String query = req.getQueryString();
+ requestedURL = requestedURL + "?" + query;
+
+ String parameter[] = new String[2];
+ for (Iterator iter = parameters.iterator(); iter.hasNext();) {
+ parameter = (String[]) iter.next();
+
+ if(query.indexOf(parameter[0]) >= 0) iter.remove();
+ }
+ }
+
+ // build real URL in online application
+ String realURLString = realURLPrefix + requestedURL.substring(publicURLPrefix.length());
+
+
+ Logger.info("Registering WebDAV protocol handler");
+ String protocolHandlers = System.getProperty(ElakConnectionBuilder.PROTOCOL_HANDLER_PROPERTY_NAME);
+ if (protocolHandlers == null) {
+ protocolHandlers = ElakConnectionBuilder.WEBDAV_PROTOCOL_HANDLER;
+ System.setProperty(ElakConnectionBuilder.PROTOCOL_HANDLER_PROPERTY_NAME, protocolHandlers);
+ } else {
+ // check, if WEBDAV protocol handler is already configured
+ boolean isConfigured = false;
+ StringTokenizer tokenizer = new StringTokenizer(protocolHandlers, "| ");
+ while (tokenizer.hasMoreTokens()) {
+ String protocolHandler = tokenizer.nextToken();
+ if (protocolHandler.equals(ElakConnectionBuilder.WEBDAV_PROTOCOL_HANDLER)) {
+ isConfigured = true;
+ break;
+ }
+ }
+ // if it has not been configured yet, configure it
+ if (!isConfigured) {
+ protocolHandlers = ElakConnectionBuilder.WEBDAV_PROTOCOL_HANDLER + ElakConnectionBuilder.PIPE_CHAR + protocolHandlers;
+ System.setProperty(ElakConnectionBuilder.PROTOCOL_HANDLER_PROPERTY_NAME, protocolHandlers);
+ }
+ }
+ Logger.info("Registered protocol handlers: " + protocolHandlers);
+ Class webdavSH = null;
+ try
+ {
+ webdavSH = Class.forName(ElakConnectionBuilder.WEBDAV_PROTOCOL_HANDLER + ".http.Handler");
+ }
+ catch (ClassNotFoundException e)
+ {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ URLStreamHandler urlStreamHandler = null;
+ try
+ {
+ urlStreamHandler = (URLStreamHandler) webdavSH.newInstance();
+ }
+ catch (InstantiationException e1)
+ {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
+ catch (IllegalAccessException e1)
+ {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
+ //URL testURL = new URL("http", realURLString.substring("http://localhost:82".length()), 82, "", urlStreamHandler);
+ //WebDAVURLConnection webDavTest = (WebDAVURLConnection) testURL.openConnection();
+
+
+ URL testURL = new URL(realURLString);
+ Logger.debug("TEST URL ist von der Klasse: " + testURL.getClass().getName());
+
+ //URL url = new URL(realURLString);
+ URL testURL2 = new URL(realURLString);
+
+ URL url = new URL("http", "localhost", 82, realURLString.substring("http://localhost:82".length()), urlStreamHandler);
+
+ Logger.debug("OA Request: " + req.getMethod() + " " + url.toString());
+ WebDAVURLConnection webDavConn = (WebDAVURLConnection) url.openConnection();
+ HttpURLConnection conn = (HttpURLConnection)webDavConn;
+ webDavConn.setRequestMethod(req.getMethod());
+ webDavConn.setDoInput(true);
+ webDavConn.setDoOutput(true);
+ //conn.setUseCaches(false);
+ webDavConn.setAllowUserInteraction(true);
+ webDavConn.setInstanceFollowRedirects(false);
+ // JSSE Abhängigkeit
+ if (conn instanceof HttpsURLConnection && sslSocketFactory != null) {
+ HttpsURLConnection httpsConn = (HttpsURLConnection) conn;
+ httpsConn.setSSLSocketFactory(sslSocketFactory);
+ if (cbDisableHostnameVerification)
+ httpsConn.setHostnameVerifier(new HostnameNonVerifier());
+ }
+ return conn;
+ }
+
+ /**
+ * Disconnects the HttpURLConnection if necessary.
+ * The implementation of the Connectionbuilder decides wether
+ * if this should be happen or not.
+ *
+ * @param conn the HttpURLConnection which is normaly to be closed
+ */
+ public void disconnect(HttpURLConnection conn) {
+ conn.disconnect();
+ }
+
+ /**
+ * @param requestedURL
+ * @param parameters
+ * @return
+ */
+ private String appendQueryString(String requestedURL, Vector parameters) {
+ String newURL = requestedURL;
+ String parameter[] = new String[2];
+ String paramValue ="";
+ String paramName ="";
+ String paramString ="";
+ for (Iterator iter = parameters.iterator(); iter.hasNext();) {
+ try {
+ parameter = (String[]) iter.next();
+ //Following two lines do not work with OWA-SSL-Login-form
+ paramName = URLEncoder.encode((String) parameter[0], "UTF-8");
+ paramValue = URLEncoder.encode((String) parameter[1], "UTF-8");
+
+ } catch (UnsupportedEncodingException e) {
+ //UTF-8 should be supported
+ }
+ paramString = "&" + paramName + "=" + paramValue + paramString;
+ }
+ if (paramString.length()>0) newURL = newURL + "?" + paramString.substring(1);
+ return newURL;
+ }
+
+ /**
+ * @author Stefan Knirsch
+ * @version $Id$
+ * A private class to change the standard HostName verifier to disable the
+ * Hostname Verification Check
+ */
+//JSSE Abhängigkeit
+ private class HostnameNonVerifier implements HostnameVerifier {
+
+
+ public boolean verify(String hostname, SSLSession session) {
+ // TODO Auto-generated method stub
+ return true;
+ }
+ /**
+ * @see com.sun.net.ssl.HostnameVerifier#verify(String, String)
+ */
+// public boolean verify(String arg0, String arg1) {
+// return true;
+// }
+
+
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/EnhancedConnectionBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/EnhancedConnectionBuilder.java
new file mode 100644
index 000000000..7e27082a0
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/EnhancedConnectionBuilder.java
@@ -0,0 +1,232 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.proxy;
+
+import java.io.IOException;
+import java.net.URL;
+import java.net.URLStreamHandler;
+import java.util.Iterator;
+import java.util.Vector;
+
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.SSLSession;
+import javax.net.ssl.SSLSocketFactory;
+import javax.servlet.http.HttpServletRequest;
+
+import HTTPClient.HTTPConnection;
+import HTTPClient.HttpURLConnection;
+import at.gv.egovernment.moa.id.config.ConfigurationException;
+import at.gv.egovernment.moa.id.config.proxy.ProxyConfigurationProvider;
+import at.gv.egovernment.moa.id.util.MOAIDMessageProvider;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.BoolUtils;
+
+
+/**
+ * Outlook Web Access (OWA) Implementierung von <code>ConnectionBuilder</code>.
+ * uses the HTTP(s)Client from Ronald Tschalär.
+ * origin version (without https support) is available at http://www.innovation.ch/java/HTTPClient/
+ *
+ * @author pdanner
+ */
+public class EnhancedConnectionBuilder implements ConnectionBuilder {
+
+ /** a boolean to disable the HostnameVerification (default = false)*/
+ private static boolean cbDisableHostnameVerification = false;
+ /** Name of the Parameter for the Target */
+ private static final String PARAM_TARGET = "Target";
+ /** Name of the Parameter for the SAMLArtifact */
+ private static final String PARAM_SAMLARTIFACT = "SAMLArtifact";
+ /** Name of the Attribute for marking the session as authenticated*/
+ private static final String ATT_AUTHDATAFETCHED = "AuthDataFetched";
+
+ static {
+ HTTPConnection.setDefaultTimeout(0);
+ try {
+ HTTPConnection.removeDefaultModule(Class.forName("HTTPClient.AuthorizationModule"));
+ HTTPConnection.removeDefaultModule(Class.forName("HTTPClient.RedirectionModule"));
+ HTTPConnection.removeDefaultModule(Class.forName("HTTPClient.CookieModule"));
+ //HTTPConnection.removeDefaultModule(Class.forName("HTTPClient.RetryModule"));
+ } catch (ClassNotFoundException e) {
+
+ }
+ }
+
+ /**
+ * Constructor for OWAConnectionBuilder.
+ * @throws ConfigurationException on any config error
+ */
+ public EnhancedConnectionBuilder() throws ConfigurationException {
+ cbDisableHostnameVerification = BoolUtils.valueOf(
+ ProxyConfigurationProvider.getInstance().getGenericConfigurationParameter(
+ "ProxyComponent.DisableHostnameVerification"));
+ //TODO MOA-ID BRZ undocumented feature
+ if (cbDisableHostnameVerification)
+ Logger.warn("ProxyComponent.DisableHostnameVerification: " + cbDisableHostnameVerification);
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.proxy.ConnectionBuilder#buildConnection
+ */
+ public java.net.HttpURLConnection buildConnection(HttpServletRequest req, String publicURLPrefix, String realURLPrefix, SSLSocketFactory sslSocketFactory, Vector parameters) throws IOException {
+
+ String requestedURL = req.getRequestURL().toString();
+ // check whether requested URL starts with publicURLPrefix
+
+ if (! requestedURL.startsWith(publicURLPrefix.substring(0,5)))
+ throw new IOException(MOAIDMessageProvider.getInstance().getMessage(
+ "proxy.01", new Object[] {requestedURL, publicURLPrefix}));
+
+ String query = req.getQueryString();
+ if (req.getSession().getAttribute(ATT_AUTHDATAFETCHED)!=null) {
+ query = removeParameter(query, PARAM_SAMLARTIFACT);
+ query = removeParameter(query, PARAM_TARGET);
+ req.getSession().removeAttribute(ATT_AUTHDATAFETCHED);
+ }
+ if (null != query && 0 != query.length() ) {
+ requestedURL = requestedURL + "?" + query;
+
+ String parameter[] = new String[2];
+ for (Iterator iter = parameters.iterator(); iter.hasNext();) {
+ parameter = (String[]) iter.next();
+ if(query.indexOf(parameter[0]) >= 0) iter.remove();
+ }
+ }
+
+ // build real URL in online application
+ String realURLString = realURLPrefix + requestedURL.substring(publicURLPrefix.length());
+
+ // build real URL in online application
+ URLStreamHandler urlStreamHandler = null;
+
+ //URL url = new URL(realURLString);
+ if (realURLString.startsWith("https")) {
+ urlStreamHandler = new HTTPClient.https.Handler();
+ } else{
+ urlStreamHandler = new HTTPClient.http.Handler();
+ }
+ URL url = new URL(null, realURLString, urlStreamHandler);
+ Logger.debug("OA Request: " + req.getMethod() + " " + url.toString());
+
+ HttpURLConnection conn = (HttpURLConnection)url.openConnection();
+
+ conn.setRequestMethod(req.getMethod());
+ conn.setDoInput(true);
+ conn.setDoOutput(true);
+ //conn.setUseCaches(false);
+ //conn.setAllowUserInteraction(true);
+ conn.setInstanceFollowRedirects(false);
+
+ if (realURLString.startsWith("https") && sslSocketFactory != null) {
+ conn.setSSLSocketFactory(sslSocketFactory);
+ //Not available in HTTPClient
+ //if (cbDisableHostnameVerification)
+ // conn.setHostnameVerifier(new HostnameNonVerifier());
+ }
+
+ return conn;
+
+ }
+
+ /**
+ * Disconnects the HttpURLConnection if necessary.
+ * The implementation of the Connectionbuilder decides wether
+ * if this should be happen or not.
+ *
+ * @param conn the HttpURLConnection which is normaly to be closed
+ */
+ public void disconnect(java.net.HttpURLConnection conn) {
+ // In HTTPClient there must not be an diconnect!
+ // conn.disconnect();
+ }
+
+ /**
+ * @author Stefan Knirsch
+ * @version $Id$
+ * A private class to change the standard HostName verifier to disable the
+ * Hostname Verification Check
+ */
+ // JSSE Abhängigkeit
+ private class HostnameNonVerifier implements HostnameVerifier {
+
+
+ public boolean verify(String hostname, SSLSession session) {
+ return true;
+ }
+
+ /**
+ * @see com.sun.net.ssl.HostnameVerifier#verify(String, String)
+ */
+// public boolean verify(String arg0, String arg1) {
+// return true;
+// }
+
+ }
+
+ /**
+ * Removes parameters from the query-URL recursively
+ *
+ * @param query the query from which the parameter is to be removed
+ * @param parameter the parameter to be removed
+ * @return the parameterclean query
+ */
+ private String removeParameter(String query, String parameter) {
+ return removeParameter(query, parameter, true);
+ }
+
+ /**
+ * Removes one parameter from the query-URL recursively
+ *
+ * @param query the query from which the parameter is to be removed
+ * @param parameter the parameter to be removed
+ * @param remove. Boolean value wether a parameter was removed in last call or not. In initial call set to true to check for new occurrences
+ * @return the parameterclean query
+ */
+ private String removeParameter(String query, String parameter, boolean remove) {
+ String result = query;
+ if (remove && query!=null && !query.equals("") && parameter!=null && !parameter.equals("")) {
+ String param = parameter;
+ int capEnd=0;
+ if (!param.endsWith("=")) param=param+"=";
+ if (query.startsWith(param)) {
+ //remove leading
+ result="";
+ } else {
+ if (!param.startsWith("&")) param="&"+param;
+ capEnd = query.indexOf(param);
+ if (capEnd!=-1) {
+ //leading part
+ result=query.substring(0, capEnd);
+ }
+ }
+ if (capEnd!=-1) {
+ //trailing part
+ capEnd += param.length();
+ int capBegin = -1;
+ if (capEnd <query.length()) capBegin = query.indexOf("&", capEnd);
+ if (capBegin!=-1) {
+ if (capBegin<query.length()) {
+ result=result + query.substring(capBegin);
+ if (result.startsWith("&")) result = result.substring(1); //if now is leading part
+ }
+ }
+ }
+ result = removeParameter(result, parameter, !query.equals(result));
+ }
+ return result;
+ }
+
+ }
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/LoginParameterResolver.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/LoginParameterResolver.java
new file mode 100644
index 000000000..2b087ff1f
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/LoginParameterResolver.java
@@ -0,0 +1,101 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.proxy;
+
+import java.util.Map;
+
+import at.gv.egovernment.moa.id.config.proxy.OAConfiguration;
+import at.gv.egovernment.moa.id.data.AuthenticationData;
+
+/**
+ * Determines authentication parameters and headers to be added to a {@link java.net.URLConnection}
+ * to the remote online application.
+ * Utilizes {@link OAConfiguration} and {@link AuthenticationData}.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public interface LoginParameterResolver {
+
+ /** Constants used in <code>MOAIDConfiguration-1.2.xsd</code>, type <code>MOAAuthDataType</code>,
+ * naming predicates used by the <code>LoginParameterResolver</code>. */
+ public static final String MOAGivenName = "MOAGivenName";
+ /** Constant used in <code>MOAIDConfiguration-1.2.xsd</code>, type <code>MOAAuthDataType</code> */
+ public static final String MOAFamilyName = "MOAFamilyName";
+ /** Constant used in <code>MOAIDConfiguration-1.2.xsd</code>, type <code>MOAAuthDataType</code> */
+ public static final String MOADateOfBirth = "MOADateOfBirth";
+ /** Constant used in <code>MOAIDConfiguration-1.2.xsd</code>, type <code>MOAAuthDataType</code> */
+ public static final String MOABPK = "MOABPK";
+ /** Constant used in <code>MOAIDConfiguration-1.3.xsd</code>, type <code>MOAAuthDataType</code> */
+ public static final String MOAWBPK = "MOAWBPK";
+ /** Constant used in <code>MOAIDConfiguration-1.2.xsd</code>, type <code>MOAAuthDataType</code> */
+ public static final String MOAPublicAuthority = "MOAPublicAuthority";
+ /** Constant used in <code>MOAIDConfiguration-1.2.xsd</code>, type <code>MOAAuthDataType</code> */
+ public static final String MOABKZ = "MOABKZ";
+ /** Constant used in <code>MOAIDConfiguration-1.2.xsd</code>, type <code>MOAAuthDataType</code> */
+ public static final String MOAQualifiedCertificate = "MOAQualifiedCertificate";
+ /** Constant used in <code>MOAIDConfiguration-1.2.xsd</code>, type <code>MOAAuthDataType</code> */
+ public static final String MOAStammzahl = "MOAStammzahl";
+ /** Constant used in <code>MOAIDConfiguration-1.2.xsd</code>, type <code>MOAAuthDataType</code> */
+ public static final String MOAIdentificationValueType = "MOAIdentificationValueType";
+ /** Constant used in <code>MOAIDConfiguration-1.2.xsd</code>, type <code>MOAAuthDataType</code> */
+ public static final String MOAIPAddress = "MOAIPAddress";
+
+ /**
+ * Returns authentication headers to be added to a URLConnection.
+ *
+ * @param oaConf configuration data
+ * @param authData authentication data
+ * @param clientIPAddress client IP address
+ * @param businessService boolean value for recognizing (w)bPK-mode
+ * @param publicURLPrefix to distinguish different online applications
+ * @return A map, the keys being header names and values being corresponding header values.
+ * <br>In case of authentication type <code>"basic-auth"</code>, header fields
+ * <code>username</code> and <code>password</code>.
+ * <br>In case of authentication type <code>"header-auth"</code>, header fields
+ * derived from parameter mapping and authentication data provided.
+ * <br>Otherwise, an empty map.
+ */
+ public Map getAuthenticationHeaders(
+ OAConfiguration oaConf,
+ AuthenticationData authData,
+ String clientIPAddress,
+ boolean businessService,
+ String publicURLPrefix) throws LoginParameterResolverException, NotAllowedException;
+
+ /**
+ * Returns request parameters to be added to a URLConnection.
+ *
+ * @param oaConf configuration data
+ * @param authData authentication data
+ * @param clientIPAddress client IP address
+ * @param businessService boolean value for recognizing (w)bPK-mode
+ * @param publicURLPrefix to distinguish different online applications
+ * @return A map, the keys being parameter names and values being corresponding parameter values.
+ * <br>In case of authentication type <code>"param-auth"</code>, parameters
+ * derived from parameter mapping and authentication data provided.
+ * <br>Otherwise, an empty map.
+ */
+ public Map getAuthenticationParameters(
+ OAConfiguration oaConf,
+ AuthenticationData authData,
+ String clientIPAddress,
+ boolean businessService,
+ String publicURLPrefix) throws LoginParameterResolverException, NotAllowedException;
+
+ public void configure(String configuration, Boolean businessService) throws LoginParameterResolverException;
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/LoginParameterResolverException.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/LoginParameterResolverException.java
new file mode 100644
index 000000000..7f42a64fb
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/LoginParameterResolverException.java
@@ -0,0 +1,52 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.proxy;
+
+import at.gv.egovernment.moa.id.MOAIDException;
+
+/**
+ * Exception thrown while proxying a request to the online application
+ *
+ * @author Rudolf Schamberger
+ * @version $Id$
+ */
+public class LoginParameterResolverException extends MOAIDException {
+
+ /**
+ * Constructor for LoginParameterResolverException.
+ * @param messageId
+ * @param parameters
+ */
+ public LoginParameterResolverException(
+ String messageId,
+ Object[] parameters) {
+ super(messageId, parameters);
+ }
+
+ /**
+ * Constructor for LoginParameterResolverException.
+ * @param messageId
+ * @param parameters
+ * @param wrapped
+ */
+ public LoginParameterResolverException(
+ String messageId,
+ Object[] parameters,
+ Throwable wrapped) {
+ super(messageId, parameters, wrapped);
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/LoginParameterResolverFactory.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/LoginParameterResolverFactory.java
new file mode 100644
index 000000000..ff7451143
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/LoginParameterResolverFactory.java
@@ -0,0 +1,97 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.proxy;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.Map;
+
+import at.gv.egovernment.moa.id.config.ConfigurationException;
+import at.gv.egovernment.moa.id.config.proxy.OAProxyParameter;
+import at.gv.egovernment.moa.id.config.proxy.ProxyConfigurationProvider;
+
+/**
+ * Factory delivering a {@link LoginParameterResolver} implementation for
+ * an online application, initialized from configuration data.
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class LoginParameterResolverFactory {
+
+ /** default login parameter resolver to be used for online application
+ * where no special implementation of the <code>LoginParameterResolver</code>
+ * interface is configured
+ */
+ private static LoginParameterResolver defaultLoginParameterResolver;
+ /** mapping from online application public URL prefix to an implementation
+ * of the <code>LoginParameterResolver</code> interface to be used;
+ * if no mapping is given for an online application, the
+ * <code>DefaultLoginParameterResolver</code> will be used */
+ private static Map loginParameterResolverMap;
+
+ /**
+ * Initializes the <code>LoginParameterResolver</code> map from the configuration data.
+ * @throws ConfigurationException when the configuration cannot be read,
+ * or when a class name configured cannot be instantiated
+ */
+ public static void initialize() throws ConfigurationException {
+ defaultLoginParameterResolver = new DefaultLoginParameterResolver();
+ loginParameterResolverMap = new HashMap();
+ ProxyConfigurationProvider proxyConf = ProxyConfigurationProvider.getInstance();
+ for (int i = 0; i < proxyConf.getOnlineApplicationParameters().length; i++) {
+ OAProxyParameter oaParam = proxyConf.getOnlineApplicationParameters()[i];
+ String publicURLPrefix = oaParam.getPublicURLPrefix();
+ String className = oaParam.getLoginParameterResolverImpl();
+ String configuration = oaParam.getLoginParameterResolverConfiguration();
+ if (className != null) {
+ try {
+ Class lprClass = Class.forName(className);
+ LoginParameterResolver lpr = (LoginParameterResolver)Class.forName(className).newInstance();
+
+ Class[] argumentTypes = { String.class, Boolean.class };
+ Method confMethod = lprClass.getMethod( "configure", argumentTypes );
+
+ Object[] arguments = { new String(configuration), new Boolean(oaParam.getBusinessService()) };
+ confMethod.invoke( lpr, arguments );
+
+ loginParameterResolverMap.put(publicURLPrefix, lpr);
+ }
+ catch (InvocationTargetException lpex) {
+ throw new ConfigurationException("config.11", new Object[] {className}, lpex);
+ }
+ catch (Throwable ex) {
+ throw new ConfigurationException("config.07", new Object[] {publicURLPrefix}, ex);
+ }
+ }
+ }
+ }
+
+ /**
+ * Gets the <code>LoginParameterResolver</code> implementation to be used for the given
+ * online application.
+ * @param publicURLPrefix public URL prefix of the online application
+ * @return <code>LoginParameterResolver</code> implementation
+ */
+ public static LoginParameterResolver getLoginParameterResolver(String publicURLPrefix) {
+ LoginParameterResolver lpr = (LoginParameterResolver) loginParameterResolverMap.get(publicURLPrefix);
+ if (lpr == null)
+ return defaultLoginParameterResolver;
+ else
+ return lpr;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/MOAIDProxyInitializer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/MOAIDProxyInitializer.java
new file mode 100644
index 000000000..f34da55b5
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/MOAIDProxyInitializer.java
@@ -0,0 +1,110 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.proxy;
+
+import iaik.pki.PKIException;
+import iaik.pki.jsse.IAIKX509TrustManager;
+
+import java.io.IOException;
+import java.security.GeneralSecurityException;
+
+import javax.net.ssl.SSLSocketFactory;
+
+import at.gv.egovernment.moa.id.config.ConfigurationException;
+import at.gv.egovernment.moa.id.config.ConnectionParameter;
+import at.gv.egovernment.moa.id.config.proxy.OAProxyParameter;
+import at.gv.egovernment.moa.id.config.proxy.ProxyConfigurationProvider;
+import at.gv.egovernment.moa.id.iaik.config.LoggerConfigImpl;
+import at.gv.egovernment.moa.id.util.AxisSecureSocketFactory;
+import at.gv.egovernment.moa.id.util.MOAIDMessageProvider;
+import at.gv.egovernment.moa.id.util.SSLUtils;
+import at.gv.egovernment.moa.logging.Logger;
+
+/**
+ * Web application initializer
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class MOAIDProxyInitializer {
+
+ /**
+ * Initializes the web application components which need initialization:
+ * logging, JSSE, MOA-ID Auth configuration, Axis, session cleaner.
+ */
+ public static void initialize()
+ throws ConfigurationException, IOException, GeneralSecurityException, PKIException {
+
+ Logger.setHierarchy("moa.id.proxy");
+
+ // Restricts TLS cipher suites
+ System.setProperty("https.cipherSuites", "SSL_RSA_WITH_RC4_128_SHA,SSL_RSA_WITH_RC4_128_MD5,SSL_RSA_WITH_3DES_EDE_CBC_SHA");
+
+ // load some jsse classes so that the integrity of the jars can be verified
+ // before the iaik jce is installed as the security provider
+ // this workaround is only needed when sun jsse is used in conjunction with
+ // iaik-jce (on jdk1.3)
+ ClassLoader cl = MOAIDProxyInitializer.class.getClassLoader();
+ try {
+ cl.loadClass("javax.security.cert.Certificate"); // from jcert.jar
+ }
+ catch (ClassNotFoundException e) {
+ Logger.warn(MOAIDMessageProvider.getInstance().getMessage("init.01", null), e);
+ }
+
+ // Initializes the SSLSocketFactory store
+ SSLUtils.initialize();
+
+ // Initializes IAIKX509TrustManager logging
+ String log4jConfigURL = System.getProperty("log4j.configuration");
+ if (log4jConfigURL != null) {
+ IAIKX509TrustManager.initLog(new LoggerConfigImpl(log4jConfigURL));
+ }
+
+ // Loads the configuration
+ ProxyConfigurationProvider proxyConf = ProxyConfigurationProvider.reload();
+
+ // Initializes the Axis secure socket factory for use in calling the MOA-Auth web service,
+ // using configuration data
+ ConnectionParameter connParamAuth = proxyConf.getAuthComponentConnectionParameter();
+ if (connParamAuth!=null) {
+ if (connParamAuth.isHTTPSURL()) {
+ SSLSocketFactory ssf = SSLUtils.getSSLSocketFactory(proxyConf, connParamAuth);
+ AxisSecureSocketFactory.initialize(ssf);
+ }
+ } else {
+ throw new ConfigurationException("config.16", null);
+ }
+
+ // Initializes the Axis secure socket factories for use in calling the online applications,
+ // using configuration data
+ OAProxyParameter[] oaParams = proxyConf.getOnlineApplicationParameters();
+ for (int i = 0; i < oaParams.length; i++) {
+ OAProxyParameter oaParam = oaParams[i];
+ ConnectionParameter oaConnParam = oaParam.getConnectionParameter();
+ if (oaConnParam.isHTTPSURL())
+ SSLUtils.getSSLSocketFactory(proxyConf, oaConnParam);
+ }
+
+ // Initializes the ConnectionBuilderFactory from configuration data
+ ConnectionBuilderFactory.initialize();
+
+ // Initializes the LoginParameterResolverFactory from configuration data
+ LoginParameterResolverFactory.initialize();
+
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/NotAllowedException.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/NotAllowedException.java
new file mode 100644
index 000000000..aff4e3a78
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/NotAllowedException.java
@@ -0,0 +1,54 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.proxy;
+
+import at.gv.egovernment.moa.id.MOAIDException;
+
+/**
+ * Exception thrown while proxying a request to the online application
+ * Reason for this exception: the dedicated LoginParameterResolver does
+ * not allow access to the desired ressource.
+ *
+ * @author Rudolf Schamberger
+ * @version $Id$
+ */
+public class NotAllowedException extends MOAIDException {
+
+ /**
+ * Constructor for NotAllowedException.
+ * @param messageId
+ * @param parameters
+ */
+ public NotAllowedException(
+ String messageId,
+ Object[] parameters) {
+ super(messageId, parameters);
+ }
+
+ /**
+ * Constructor for NotAllowedException.
+ * @param messageId
+ * @param parameters
+ * @param wrapped
+ */
+ public NotAllowedException(
+ String messageId,
+ Object[] parameters,
+ Throwable wrapped) {
+ super(messageId, parameters, wrapped);
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/XMLLoginParameterResolverEncryptedData.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/XMLLoginParameterResolverEncryptedData.java
new file mode 100644
index 000000000..b16bd417f
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/XMLLoginParameterResolverEncryptedData.java
@@ -0,0 +1,693 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.proxy;
+
+import iaik.security.provider.IAIK;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.Key;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.Security;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.crypto.BadPaddingException;
+import javax.crypto.Cipher;
+import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.spec.IvParameterSpec;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+import at.gv.egovernment.moa.id.config.ConfigurationProvider;
+import at.gv.egovernment.moa.id.config.proxy.OAConfiguration;
+import at.gv.egovernment.moa.id.data.AuthenticationData;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.Base64Utils;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.FileUtils;
+import at.gv.egovernment.moa.util.URLEncoder;
+
+/**
+ * XMLLoginParameterResolver an implementation of implementation of interface
+ * <code>LoginParameterResolver</code>
+ * This implementation used to map identities stored in an XML file to parameters
+ * which are given to OAs.
+ *
+ * @author Rudolf Schamberger
+ * @version $Id$
+ */
+public class XMLLoginParameterResolverEncryptedData implements LoginParameterResolver {
+
+ //file which is parsed and interpreted for paremeter resolving.
+ private String identityFile;
+
+ private Cipher blowfishCipher;
+ private Key key;
+ /**
+ * inner class used to store mapped parameters
+ */
+ class LPRParams {
+
+ /**
+ * getter method for parameter Enabled.
+ * Parameter Enabled decides if mapped parameters should be used by XMLLoginParameterResolver
+ */
+ public boolean getEnabled() {
+ return enabled.booleanValue();
+ }
+
+ /**
+ * getter method for parameter UN (username)
+ * @return Parameter UN or <code>null</code> not set.
+ */
+ public String getUN() {
+ return UN;
+ }
+
+ /**
+ * getter method for parameter UN (username)
+ * @return Parameter UN or <code>null</code> not set.
+ */
+ //TODO XMLLPR decrypt
+ public String getPlainUN() {
+ //Security.addProvider();
+
+
+ return UN;
+ }
+
+
+ /**
+ * getter method for parameter PW (password)
+ * @return Parameter PW or <code>null</code> not set.
+ */
+ public String getPW() {
+ return PW;
+ }
+
+ /**
+ * getter method for generic parameter Param1
+ * @return Parameter Param1 or <code>null</code> not set.
+ */
+ public String getParam1() {
+ return Param1;
+ }
+
+ /**
+ * getter method for generic parameter Param2
+ * @return Parameter Param2 or <code>null</code> not set.
+ */
+ public String getParam2() {
+ return Param2;
+ }
+
+ /**
+ * getter method for generic parameter Param3
+ * @return Parameter Param3 or <code>null</code> not set.
+ */
+ public String getParam3() {
+ return Param3;
+ }
+
+ /**
+ * Returns a string representation of LPRParams
+ *
+ * @return a <code>String</code> representation of this object.
+ * @see XMLLoginParameterResolver.LPRParams
+ */
+ public String toString() {
+ return "Enabled: "
+ + enabled.toString()
+ + "UN: '"
+ + UN
+ + "' PW: '"
+ + PW
+ + "' Param1: '"
+ + Param1
+ + "' Param2: '"
+ + Param2
+ + "' Param3: '"
+ + Param3
+ + "'\n";
+ }
+
+ //private member variables used to store the parameters
+ private Boolean enabled = null;
+ private String UN = null;
+ private String PW = null;
+ private String Param1 = null;
+ private String Param2 = null;
+ private String Param3 = null;
+
+ /**
+ * Constructs a newly allocated <code>XMLLoginParameterResolver.LPRParams</code> object.
+ *
+ * @param enabled enable user mapping to parameter set for the parameter set.
+ * @param UN username used in HTTP 401 - BasicAuthentication
+ * @param PW password used in HTTP 401 - BasicAuthentication
+ * @param Param1 generic parameter1 used in HeaderAuthentication and ParameterAuthentication
+ * @param Param2 generic parameter2 used in HeaderAuthentication and ParameterAuthentication
+ * @param Param3 generic parameter3 used in HeaderAuthentication and ParameterAuthentication
+ **/
+ LPRParams(boolean enabled, String UN, String PW, String Param1, String Param2, String Param3) {
+ this.enabled = new Boolean(enabled);
+ this.UN = UN;
+ this.PW = PW;
+ this.Param1 = Param1;
+ this.Param2 = Param2;
+ this.Param3 = Param3;
+ }
+
+ /**
+ * Constructs a newly allocated <code>XMLLoginParameterResolver.LPRParams</code> object.
+ *
+ * @param enabled enable user mapping to parameter set for the parameter set.
+ * @param UN username used in HTTP 401 - BasicAuthentication
+ * @param PW password used in HTTP 401 - BasicAuthentication
+ **/
+ LPRParams(boolean enabled, String UN, String PW) {
+ this(enabled, UN, PW, null, null, null);
+ }
+ }
+
+ /**
+ * Constructs a newly allocated <code>XMLLoginParameterResolver</code> object.
+ **/
+ public XMLLoginParameterResolverEncryptedData() {
+ bPKMap = new HashMap();
+ namedMap = new HashMap();
+ }
+
+ /**
+ * configuration method
+ * @param configuration enabled enable user mapping to parameter set for the parameter set.
+ */
+ public void configure(String configuration, Boolean businessService) throws LoginParameterResolverException {
+ File idFile;
+ Element rootElement;
+
+ Security.addProvider(new IAIK());
+ try {
+ blowfishCipher = Cipher.getInstance("Blowfish/CBC/PKCS5Padding", "IAIK");
+
+ } catch (NoSuchPaddingException e) {
+ throw new LoginParameterResolverException("config.11",
+ new Object[] { "XMLLoginParameterResolver: NoSuchPaddingException \n" + e.toString()});
+ } catch (NoSuchProviderException e) {
+ throw new LoginParameterResolverException("config.11",
+ new Object[] { "XMLLoginParameterResolver: NoSuchProviderException \n" + e.toString()});
+ } catch (NoSuchAlgorithmException e) {
+ throw new LoginParameterResolverException("config.11",
+ new Object[] { "XMLLoginParameterResolver: NoSuchAlgorithmException \n" + e.toString()});
+ }
+
+ String plaintext = "start";
+ String encrypted = encryptData(plaintext, "1234567890123456", "123hochgeheim");
+ String decrypted = decryptData(encrypted, "1234567890123456", "123hochgeheim");
+ Logger.debug("plaintext: " + plaintext);
+ Logger.debug("encrypted: " + encrypted);
+ Logger.debug("decrypted: " + decrypted);
+
+ //make file name absolut (if it is relative to main config file)
+ //TODO MOAID XMLLPR check
+ String moaIDConfigFileName = System.getProperty(ConfigurationProvider.CONFIG_PROPERTY_NAME);
+ String rootConfigFileDir = new File(moaIDConfigFileName).getParent();
+ this.identityFile = FileUtils.makeAbsoluteURL(configuration, rootConfigFileDir);
+
+ if (null == identityFile || false == (idFile = new File(identityFile)).canRead()) {
+ throw new LoginParameterResolverException("config.11",
+ new Object[] { "XMLLoginParameterResolver: could not read '" + identityFile + "' " });
+ }
+ try {
+ rootElement = readXMLFile(identityFile);
+ } catch (IOException lex) {
+ Logger.error(lex.toString());
+ throw new LoginParameterResolverException("config.11",
+ new Object[] { "XMLLoginParameterResolver: could not read '" + identityFile + "' " });
+
+ } catch (SAXException sex) {
+ Logger.error(sex.toString());
+ throw new LoginParameterResolverException("config.11",
+ new Object[] { "XMLLoginParameterResolver: parsing problem in file:'" + identityFile + "' ", sex.toString() });
+ } catch (ParserConfigurationException e) {
+ // TODO XMLPR Auto-generated catch block
+ Logger.error(e.toString());
+ throw new LoginParameterResolverException("config.11",
+ new Object[] { "XMLLoginParameterResolver: parsing problem in file:'" + identityFile + "' ", e.toString() });
+ }
+ buildInfo(rootElement, businessService.booleanValue());
+ isConfigured = true;
+ }
+
+ /**
+ * encryptData method uses parameters masterSecret and bPK as key information to encrypt plaintext
+ * @param plaintext
+ * @param bPK
+ * @param masterSecret
+ * @return encrypted data (blowfish encrypted, base64 encoded)
+ * @throws LoginParameterResolverException
+ */
+ public String encryptData(String plaintext, String bPK, String masterSecret) throws LoginParameterResolverException
+ {
+ try {
+ String keyString = bPK + masterSecret;
+ key = new iaik.security.cipher.SecretKey(keyString.getBytes("UTF-8"), "Blowfish");
+ IvParameterSpec param = new IvParameterSpec(new byte [] {0,0,0,0,0,0,0,0});
+
+ blowfishCipher.init(Cipher.ENCRYPT_MODE, key, param);
+ byte [] cipherText = blowfishCipher.doFinal(plaintext.getBytes("UTF-8"));
+ return Base64Utils.encode(cipherText);
+ } catch (UnsupportedEncodingException e) {
+ throw new LoginParameterResolverException("config.14", new Object [] {"Blowfish: " + e.toString()});
+ } catch (InvalidKeyException e) {
+ throw new LoginParameterResolverException("config.14", new Object [] {"Blowfish: " + e.toString()});
+ } catch (BadPaddingException e) {
+ throw new LoginParameterResolverException("config.14", new Object [] {"Blowfish: " + e.toString()});
+ } catch (IllegalBlockSizeException e) {
+ throw new LoginParameterResolverException("config.14", new Object [] {"Blowfish: " + e.toString()});
+ } catch (IllegalStateException e) {
+ throw new LoginParameterResolverException("config.14", new Object [] {"Blowfish: " + e.toString()});
+ } catch (InvalidAlgorithmParameterException e) {
+ throw new LoginParameterResolverException("config.14", new Object [] {"Blowfish: " + e.toString()});
+ } catch (IOException e) {
+ throw new LoginParameterResolverException("config.14", new Object [] {"Blowfish: " + e.toString()});
+ }
+ }
+
+
+ /**
+ * encryptData method uses parameters masterSecret and bPK as key information to decrypt ciphertext
+ * @param ciphertext (blowfish encrypted, base64encoded)
+ * @param bPK
+ * @param masterSecret
+ * @return decrypted Data (plaintext)
+ * @throws LoginParameterResolverException
+ */
+ public String decryptData(String ciphertext, String bPK, String masterSecret) throws LoginParameterResolverException
+ {
+ try {
+ String keyString = bPK + masterSecret;
+ key = new iaik.security.cipher.SecretKey(keyString.getBytes("UTF-8"), "Blowfish");
+ IvParameterSpec param = new IvParameterSpec(new byte [] {0,0,0,0,0,0,0,0});
+ blowfishCipher.init(Cipher.DECRYPT_MODE, key, param);
+ byte [] plaintext = blowfishCipher.doFinal(Base64Utils.decode(ciphertext, true));
+ return new String(plaintext);
+ } catch (UnsupportedEncodingException e) {
+ throw new LoginParameterResolverException("config.14", new Object [] {"Blowfish: " + e.toString()});
+ } catch (InvalidKeyException e) {
+ throw new LoginParameterResolverException("config.14", new Object [] {"Blowfish: " + e.toString()});
+ } catch (BadPaddingException e) {
+ throw new LoginParameterResolverException("config.14", new Object [] {"Blowfish: " + e.toString()});
+ } catch (IllegalBlockSizeException e) {
+ throw new LoginParameterResolverException("config.14", new Object [] {"Blowfish: " + e.toString()});
+ } catch (IllegalStateException e) {
+ throw new LoginParameterResolverException("config.14", new Object [] {"Blowfish: " + e.toString()});
+ } catch (InvalidAlgorithmParameterException e) {
+ throw new LoginParameterResolverException("config.14", new Object [] {"Blowfish: " + e.toString()});
+ } catch (IOException e) {
+ throw new LoginParameterResolverException("config.14", new Object [] {"Blowfish: " + e.toString()});
+ }
+ }
+
+
+
+ /**
+ * @see at.gv.egovernment.moa.id.proxy.LoginParameterResolver#getAuthenticationHeaders(OAConfiguration, AuthenticationData, String, boolean, String)
+ */
+ public Map getAuthenticationHeaders(
+ OAConfiguration oaConf,
+ AuthenticationData authData,
+ String clientIPAddress,
+ boolean businessService,
+ String publicURLPrefix) throws LoginParameterResolverException, NotAllowedException {
+ Map result = new HashMap();
+
+ if (!isConfigured) {
+ //TODO XMLLPR
+ throw new LoginParameterResolverException("XMLLoginParameterResolver with configuration '" +
+ identityFile + "' is not configured!", null);
+ }
+
+ //get the Identity of the user
+ String famName = resolveValue("MOAFamilyName", authData, clientIPAddress);
+ String givenName = resolveValue("MOAGivenName", authData, clientIPAddress);
+ String dateOfBirth = resolveValue("MOADateOfBirth", authData, clientIPAddress);
+ String bPK ="";
+ String wType= "";
+ if (businessService) {
+ bPK = resolveValue(MOAWBPK, authData, clientIPAddress);
+ wType = "w";
+ } else {
+ bPK = resolveValue(MOABPK, authData, clientIPAddress);
+ }
+ String userid = "";
+ String password = "";
+ LPRParams params = null;
+ boolean userFound = false;
+
+ //try (w)bPK and named search
+ params = bPKIdentitySearch(bPK, wType);
+
+ if (null == params)
+ params = namedIdentitySearch(famName, givenName, dateOfBirth);
+
+ //if both searches failed, report error.
+ if(null == params)
+ throw new NotAllowedException("User:_" + wType + "bPK:'" +bPK+ ", " + famName + ", " + givenName + "' not authorized.", null);
+
+ //HTTP 401 - Basic Authentication
+ if (oaConf.getAuthType().equals("basic")) {
+ userid = (null != params.getUN()) ? params.getUN() : "";
+ password = (null != params.getPW()) ? params.getPW() : "";
+
+ try {
+ String userIDPassword = userid + ":" + password;
+ String credentials = Base64Utils.encode(userIDPassword.getBytes("UTF-8"));
+ Logger.debug("XMLLoginParameterResolver: calculated credentials: " + credentials);
+ result.put("Authorization", "Basic " + credentials);
+ } catch (IOException ignore) {
+ throw new LoginParameterResolverException("config.14", new Object[] {"internal error while encoding in Base64"});
+ }
+ } else if (oaConf.getAuthType().equals("header")) { //HTTP Authentication
+ String key;
+ String resolvedValue;
+ //TODO MOAID XMLLPR select value through OA-ConfigFile;
+ if(null != params.getUN()) result.put("UN", params.getUN());
+ if(null != params.getPW()) result.put("UN", params.getPW());
+ if(null != params.getParam1()) result.put("UN", params.getParam1());
+ if(null != params.getParam2()) result.put("UN", params.getParam2());
+ if(null != params.getParam3()) result.put("UN", params.getParam3());
+
+ } else {
+ throw new LoginParameterResolverException("config.14", new Object[] {"AuthType not supported"});
+ }
+
+ return result;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.id.proxy.LoginParameterResolver#getAuthenticationParameters(OAConfiguration, AuthenticationData, String, boolean, String)
+ */
+ public Map getAuthenticationParameters(
+ OAConfiguration oaConf,
+ AuthenticationData authData,
+ String clientIPAddress,
+ boolean businessService,
+ String publicURLPrefix) throws LoginParameterResolverException, NotAllowedException {
+
+ Map result = new HashMap();
+
+ if (!isConfigured) {
+ Logger.warn("XMLLoginParameterResolver with configuration '" + identityFile + " is not configured");
+ return result;
+ }
+
+ String famName = resolveValue("MOAFamilyName", authData, clientIPAddress);
+ String givenName = resolveValue("MOAGivenName", authData, clientIPAddress);
+ String dateOfBirth = resolveValue("MOADateOfBirth", authData, clientIPAddress);
+ String bPK ="";
+ String wType= "";
+ if (businessService) {
+ bPK = resolveValue(MOAWBPK, authData, clientIPAddress);
+ wType = "w";
+ } else {
+ bPK = resolveValue(MOABPK, authData, clientIPAddress);
+ }
+ String userid = "";
+ String password = "";
+ LPRParams params = null;
+
+ //try (w)bPK and named search
+ params = bPKIdentitySearch(bPK, wType);
+
+ if (null == params)
+ params = namedIdentitySearch(famName, givenName, dateOfBirth);
+
+ //if both searches failed, report error.
+ if(null == params)
+ throw new NotAllowedException("User:_" + wType + "bPK:'" +bPK+ ", " + famName + ", " + givenName + "' not authorized.", null);
+
+ //TODO MOAID XMLLPR URLEncoder.encode
+ if (oaConf.getAuthType().equals("param")) {
+ try {
+ if(null != params.getUN()) result.put(XSD_UNATTR, URLEncoder.encode(params.getUN(),"ISO-8859-1"));
+ if(null != params.getPW()) result.put(XSD_PWATTR, URLEncoder.encode(params.getPW(),"ISO-8859-1"));
+ if(null != params.getParam1()) result.put(XSD_PARAM1ATTR, URLEncoder.encode(params.getParam1(),"ISO-8859-1"));
+ if(null != params.getParam2()) result.put(XSD_PARAM2ATTR, URLEncoder.encode(params.getParam2(),"ISO-8859-1"));
+ if(null != params.getParam3()) result.put(XSD_PARAM3ATTR, URLEncoder.encode(params.getParam3(),"ISO-8859-1"));
+ } catch (UnsupportedEncodingException e) {
+ // ISO-8859-1 is supported
+ throw new LoginParameterResolverException("URLEncoder error", null);
+ }
+ } else {
+ throw new LoginParameterResolverException("AuthType not supported", null);
+ }
+ return result;
+ }
+
+ /**
+ * Resolves a login header or parameter value.
+ * @param predicate header or parameter predicate name from online application configuration
+ * @param authData authentication data for current login
+ * @param clientIPAddress client IP address
+ * @return header or parameter value resolved; <code>null</code> if unknown name is given
+ */
+ private static String resolveValue(
+ String predicate,
+ AuthenticationData authData,
+ String clientIPAddress) {
+ if (predicate.equals("MOAGivenName"))
+ return authData.getGivenName();
+ if (predicate.equals("MOAFamilyName"))
+ return authData.getFamilyName();
+ if (predicate.equals("MOADateOfBirth"))
+ return authData.getDateOfBirth();
+ if (predicate.equals("MOABPK"))
+ return authData.getBPK();
+ if (predicate.equals("MOAWBPK"))
+ return authData.getWBPK();
+ if (predicate.equals("MOAPublicAuthority"))
+ if (authData.isPublicAuthority())
+ return "true";
+ else
+ return "false";
+ if (predicate.equals("MOABKZ"))
+ return authData.getPublicAuthorityCode();
+ if (predicate.equals("MOAQualifiedCertificate"))
+ if (authData.isQualifiedCertificate())
+ return "true";
+ else
+ return "false";
+ if (predicate.equals("MOAStammzahl"))
+ return authData.getIdentificationValue();
+ if (predicate.equals(MOAIdentificationValueType))
+ return authData.getIdentificationType();
+ if (predicate.equals("MOAIPAddress"))
+ return clientIPAddress;
+ else
+ return null;
+ }
+
+ /**
+ * reads, parses the configuration file of XMLLoginParameterResolver and returns the document element.
+ * @param fileName of the configuration file.
+ */
+ private Element readXMLFile(String fileName) throws ParserConfigurationException, SAXException, IOException {
+ Logger.info("XMLLoginParameterResolver: Loading and parsing XMLPLoginParameterConfiguration configuration: " + fileName);
+
+ InputStream stream = null;
+ Element configElem;
+
+ stream = new BufferedInputStream(new FileInputStream(fileName));
+ configElem = DOMUtils.parseDocument(stream, true, Constants.ALL_SCHEMA_LOCATIONS, null).getDocumentElement();
+ return configElem;
+ }
+
+ /**
+ * buildInfo builds up the internal data mapping between the "Identities" and the "Parameters" from the parsed XML file.
+ * @param root document root element.
+ */
+ private void buildInfo(Element root, boolean businessService) {
+ NodeList idList = root.getElementsByTagName(XSD_IDELEM);
+ NodeList paramList = root.getElementsByTagName(XSD_PARAMELEM);
+ String wType ="";
+ if (businessService) wType = "w";
+ for (int i = 0; i < idList.getLength(); i++)
+ Logger.debug("XMLLoginParameterResolver: LocalName idList: " + idList.item(i).getLocalName());
+
+ for (int i = 0; i < paramList.getLength(); i++)
+ Logger.debug("XMLLoginParameterResolver: LocalName paramList: " + paramList.item(i).getLocalName());
+
+ for (int i = 0; i < idList.getLength(); i++) {
+ Element tmpElem = (Element) idList.item(i);
+ NodeList tmpList = tmpElem.getElementsByTagName(XSD_NAMEDIDELEM);
+ for (int j = 0; j < tmpList.getLength(); j++)
+ Logger.debug("XMLLoginParameterResolver: LocalName tmp: " + tmpList.item(j).getLocalName());
+
+ //Search for NamedIdentity Elements
+ if (1 == tmpList.getLength()) {
+ tmpElem = (Element) tmpList.item(0);
+ String tmpStr = tmpElem.getAttribute(XSD_SURNAMEATTR) + "," +
+ tmpElem.getAttribute(XSD_GIVENNAMEATTR) + "," +
+ tmpElem.getAttribute(XSD_BIRTHDATEATTR);
+ boolean tmpBool = false;
+ if (tmpElem.getFirstChild() != null
+ && "1".compareTo(tmpElem.getFirstChild().getNodeValue()) == 0)
+ tmpBool = true;
+ //TODO XMLLPR remove
+ Logger.debug("XMLLoginParameterResolver: tmpStr: " + tmpStr + " value: " + (new Boolean(tmpBool)).toString());
+ tmpElem = (Element) paramList.item(i);
+ Logger.debug("XMLLoginParameterResolver: attribute UN: " + tmpElem.getAttribute(XSD_UNATTR) +
+ " attribute PW: " + tmpElem.getAttribute(XSD_PWATTR) +
+ " attribute Param1: " + tmpElem.getAttribute(XSD_PARAM1ATTR) +
+ " attribute Param2: " + tmpElem.getAttribute(XSD_PARAM2ATTR) +
+ " attribute Param3: " + tmpElem.getAttribute(XSD_PARAM3ATTR) );
+ namedMap.put(tmpStr, new LPRParams(tmpBool, tmpElem.getAttribute(XSD_UNATTR), tmpElem.getAttribute(XSD_PWATTR),
+ tmpElem.getAttribute(XSD_PARAM1ATTR), tmpElem.getAttribute(XSD_PARAM2ATTR),
+ tmpElem.getAttribute(XSD_PARAM3ATTR)) );
+ } else {
+
+ //(w)bPKIdentity Elements
+ if (businessService) {
+ tmpList = tmpElem.getElementsByTagName(XSD_WBPKIDELEM);
+ } else {
+ tmpList = tmpElem.getElementsByTagName(XSD_BPKIDELEM);
+ }
+ if (1 == tmpList.getLength()) {
+ tmpElem = (Element) tmpList.item(0);
+ String tmpStr = "";
+ if (businessService) {
+ tmpStr = tmpElem.getAttribute(XSD_WBPKATTR);
+ } else {
+ tmpStr = tmpElem.getAttribute(XSD_BPKATTR);
+ }
+ boolean tmpBool = false;
+ if (tmpElem.getFirstChild() != null
+ && "1".compareTo(tmpElem.getFirstChild().getNodeValue()) == 0)
+ tmpBool = true;
+ Logger.debug("XMLLoginParameterResolver: tmpStr: " + tmpStr + " value: " + (new Boolean(tmpBool)).toString());
+ tmpElem = (Element) paramList.item(i);
+ Logger.debug("XMLLoginParameterResolver: attribute UN: " + tmpElem.getAttribute(XSD_UNATTR) +
+ " attribute PW: " + tmpElem.getAttribute(XSD_PWATTR) +
+ " attribute Param1: " + tmpElem.getAttribute(XSD_PARAM1ATTR) +
+ " attribute Param2: " + tmpElem.getAttribute(XSD_PARAM2ATTR) +
+ " attribute Param3: " + tmpElem.getAttribute(XSD_PARAM3ATTR) );
+ namedMap.put(tmpStr, new LPRParams(tmpBool, tmpElem.getAttribute(XSD_UNATTR), tmpElem.getAttribute(XSD_PWATTR),
+ tmpElem.getAttribute(XSD_PARAM1ATTR), tmpElem.getAttribute(XSD_PARAM2ATTR),
+ tmpElem.getAttribute(XSD_PARAM3ATTR)) );
+ } else {
+ if (businessService) {
+ Logger.warn("XMLLoginParameterResolver: wrong format no Elements " + XSD_NAMEDIDELEM + " or " + XSD_WBPKIDELEM + " found");
+ } else {
+ Logger.warn("XMLLoginParameterResolver: wrong format no Elements " + XSD_NAMEDIDELEM + " or " + XSD_BPKIDELEM + " found");
+ }
+ }
+ }
+ }
+
+ Logger.debug("namedMap:" + namedMap.toString());
+ Logger.debug(wType + "bPKMap:" + bPKMap.toString());
+ }
+
+
+
+
+ /**
+ * searches for a given bPK and returns the appropriate LPRParams structure
+ * @param bPK search argument
+ * @return LPRParams if bPK could be found in internal mappings or null otherwise.
+ */
+ LPRParams bPKIdentitySearch(String bPK, String wType) {
+ //search for mapping with (w)bPK of the user
+ Logger.info("XMLLoginParameterResolver: search for login data mapped to " + wType + "bPK:" + bPK);
+ LPRParams params = (LPRParams) bPKMap.get(bPK);
+ if (null == params) {
+ Logger.info("XMLLoginParameterResolver: params for " + wType + "bPK: " + bPK + " not found!");
+ return null;
+ } else if (params.getEnabled()) {
+ Logger.info("XMLLoginParameterResolver: " + wType + "bPK: " + bPK + "found in list; user is enabled");
+ Logger.debug("XMLLoginParameterResolver: using: " + params.toString());
+ return params;
+ }
+ Logger.info("XMLLoginParameterResolver: " + wType + "bPK: " + bPK + "found in list but user is NOT enabled");
+ return null;
+ }
+
+ /**
+ * searches for a given namedIdentity and returns the appropriate LPRParams structure
+ * @param surName surname search argument
+ * @param givenName givenname search argument
+ * @param dateOfBirth dateofbirth search argument
+ * @return LPRParams if (w)bPK could be found in internal mappings or null otherwise.
+ */
+ LPRParams namedIdentitySearch(String surName, String givenName, String dateOfBirth) {
+ Logger.info("XMLLoginParameterResolver: search for login data for SurName:" + surName + " GivenName: " + givenName + " DateOfBirth" + dateOfBirth);
+ //try first a search with surname, givenname and birthdate
+ LPRParams params = (LPRParams) namedMap.get(surName + "," + givenName + "," + dateOfBirth);
+ if (null == params) {
+ Logger.debug("XMLLoginParameterResolver: params for Surname: " + surName + " GivenName: " + givenName + "BirthDate: " + dateOfBirth + " not found!");
+ //try a search with surname, givenname only
+ params = (LPRParams) namedMap.get(surName + "," + givenName + "," + XSD_BIRTHDATEBLANKATTR);
+ if(null == params) {
+ Logger.debug("XMLLoginParameterResolver: params for Surname: " + surName + " GivenName: " + givenName + " not found!");
+ return null;
+ }
+ }
+
+ if (params.getEnabled()) {
+ Logger.info("XMLLoginParameterResolver: Surname:" + surName + " GivenName: " + givenName + " found in list; user is enabled");
+ Logger.debug("XMLLoginParameterResolver: using: " + params.toString());
+ return params;
+ }
+ Logger.info("XMLLoginParameterResolver: SurName:" + surName + " GivenName: " + givenName + "found in list; user is NOT enabled");
+ return null;
+ }
+
+ //public static final String XSD_MAPPING = "Mapping";
+ //public static final String XSD_DOCELEM = "MOAIdentities";
+ public static final String XSD_IDELEM = "Identity";
+ public static final String XSD_NAMEDIDELEM = "NamedIdentity";
+ public static final String XSD_BPKIDELEM = "bPKIdentity";
+ public static final String XSD_WBPKIDELEM = "wbPKIdentity";
+ public static final String XSD_PARAMELEM = "Parameters";
+ public static final String XSD_SURNAMEATTR = "SurName";
+ public static final String XSD_GIVENNAMEATTR = "GivenName";
+ public static final String XSD_BIRTHDATEATTR = "BirthDate";
+ public static final String XSD_BIRTHDATEBLANKATTR = "any";
+ public static final String XSD_BPKATTR = "bPK";
+ public static final String XSD_WBPKATTR = "wbPK";
+ public static final String XSD_UNATTR = "UN";
+ public static final String XSD_PWATTR = "PW";
+ public static final String XSD_PARAM1ATTR = "Param1";
+ public static final String XSD_PARAM2ATTR = "Param2";
+ public static final String XSD_PARAM3ATTR = "Param3";
+ private Map bPKMap;
+ private Map namedMap;
+ private boolean isConfigured = false;
+} \ No newline at end of file
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/XMLLoginParameterResolverPlainData.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/XMLLoginParameterResolverPlainData.java
new file mode 100644
index 000000000..2183278c3
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/XMLLoginParameterResolverPlainData.java
@@ -0,0 +1,437 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.proxy;
+
+import at.gv.egovernment.moa.id.config.proxy.OAConfiguration;
+import at.gv.egovernment.moa.id.data.AuthenticationData;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.Base64Utils;
+import java.io.IOException;
+import java.util.*;
+import org.apache.xerces.parsers.DOMParser;
+import org.w3c.dom.*;
+
+// Referenced classes of package at.gv.egovernment.moa.id.proxy:
+//
+// TODO MOA-ID test full functionality
+
+public class XMLLoginParameterResolverPlainData
+ implements LoginParameterResolver
+{
+ private String configuration;
+
+ /**
+ * inner class used to store mapped parameters
+ */
+ class LPRParams {
+
+ /**
+ * getter method for parameter Enabled.
+ * Parameter Enabled decides if mapped parameters should be used by XMLLoginParameterResolver
+ */
+ public boolean getEnabled() {
+ return enabled.booleanValue();
+ }
+
+ /**
+ * getter method for parameter UN (username)
+ * @return Parameter UN or <code>null</code> not set.
+ */
+ public String getUN() {
+ return UN;
+ }
+
+ /**
+ * getter method for parameter UN (username)
+ * @return Parameter UN or <code>null</code> not set.
+ */
+ public String getPlainUN() {
+ return UN;
+ }
+
+
+ /**
+ * getter method for parameter PW (password)
+ * @return Parameter PW or <code>null</code> not set.
+ */
+ public String getPW() {
+ return PW;
+ }
+
+ /**
+ * getter method for generic parameter Param1
+ * @return Parameter Param1 or <code>null</code> not set.
+ */
+ public String getParam1() {
+ return Param1;
+ }
+
+ /**
+ * getter method for generic parameter Param2
+ * @return Parameter Param2 or <code>null</code> not set.
+ */
+ public String getParam2() {
+ return Param2;
+ }
+
+ /**
+ * getter method for generic parameter Param3
+ * @return Parameter Param3 or <code>null</code> not set.
+ */
+ public String getParam3() {
+ return Param3;
+ }
+
+ /**
+ * Returns a string representation of LPRParams
+ *
+ * @return a <code>String</code> representation of this object.
+ * @see XMLLoginParameterResolver.LPRParams
+ */
+ public String toString() {
+ return "Enabled: "
+ + enabled.toString()
+ + "UN: '"
+ + UN
+ + "' PW: '"
+ + PW
+ + "' Param1: '"
+ + Param1
+ + "' Param2: '"
+ + Param2
+ + "' Param3: '"
+ + Param3
+ + "'\n";
+ }
+
+ //private member variables used to store the parameters
+ private Boolean enabled = null;
+ private String UN = null;
+ private String PW = null;
+ private String Param1 = null;
+ private String Param2 = null;
+ private String Param3 = null;
+
+ /**
+ * Constructs a newly allocated <code>XMLLoginParameterResolver.LPRParams</code> object.
+ *
+ * @param enabled enable user mapping to parameter set for the parameter set.
+ * @param UN username used in HTTP 401 - BasicAuthentication
+ * @param PW password used in HTTP 401 - BasicAuthentication
+ * @param Param1 generic parameter1 used in HeaderAuthentication and ParameterAuthentication
+ * @param Param2 generic parameter2 used in HeaderAuthentication and ParameterAuthentication
+ * @param Param3 generic parameter3 used in HeaderAuthentication and ParameterAuthentication
+ **/
+ LPRParams(boolean enabled, String UN, String PW, String Param1, String Param2, String Param3) {
+ this.enabled = new Boolean(enabled);
+ this.UN = UN;
+ this.PW = PW;
+ this.Param1 = Param1;
+ this.Param2 = Param2;
+ this.Param3 = Param3;
+ }
+
+ /**
+ * Constructs a newly allocated <code>XMLLoginParameterResolver.LPRParams</code> object.
+ *
+ * @param enabled enable user mapping to parameter set for the parameter set.
+ * @param UN username used in HTTP 401 - BasicAuthentication
+ * @param PW password used in HTTP 401 - BasicAuthentication
+ **/
+ LPRParams(boolean enabled, String UN, String PW) {
+ this(enabled, UN, PW, null, null, null);
+ }
+ }
+
+ //TODO document
+ public XMLLoginParameterResolverPlainData()
+ {
+ bPKMap = new HashMap();
+ namedMap = new HashMap();
+
+ }
+
+ //TODO document
+ public Map getAuthenticationHeaders(OAConfiguration oaConf, AuthenticationData authData, String clientIPAddress, boolean businessService, String publicURLPrefix) throws NotAllowedException
+ {
+ Map result = new HashMap();
+ if(oaConf.getAuthType().equals("basic"))
+ {
+ String famName = resolveValue(MOAFamilyName, authData, clientIPAddress);
+ String givenName = resolveValue(MOAGivenName, authData, clientIPAddress);
+ String dateOfBirth = resolveValue(MOADateOfBirth, authData, clientIPAddress);
+ String bPK ="";
+ String wType= "";
+ if (businessService) {
+ bPK = resolveValue(MOAWBPK, authData, clientIPAddress);
+ wType = "w";
+ } else {
+ bPK = resolveValue(MOABPK, authData, clientIPAddress);
+ }
+ String userid = "";
+ String password = "";
+ String param1 = "";
+ String param2 = "";
+ String param3 = "";
+
+ LPRParams params = null;
+ boolean userFound = false;
+
+ //first step: search for (w)bPK entry in user list
+ Logger.debug("XMLLoginParameterResolverPlainData: search for automatic login data for "+ wType + "bPK:" + bPK);
+ params = (LPRParams)bPKMap.get(bPK);
+ if(params == null)
+ Logger.debug("XMLLoginParameterResolverPlainData: params for "+ wType + "bPK: " + bPK + " not found in file!");
+ else
+ if(params.getEnabled())
+ { //if user is enabled: get related parameters
+ Logger.debug("XMLLoginParameterResolverPlainData: "+ wType + "bPK: " + bPK + " found in list; user is enabled");
+ Logger.debug("XMLLoginParameterResolverPlainData: using: " + params.toString());
+ userid = params.getUN();
+ password = params.getPW();
+ param1 = params.getParam1();
+ param2 = params.getParam2();
+ param3 = params.getParam3();
+ userFound = true;
+ } else
+ {
+ Logger.info("XMLLoginParameterResolverPlainData: "+ wType + "bPK: " + bPK + " found in list; user is NOT enabled");
+ }
+ if(!userFound) //secound step: search for name entry in user list
+ {
+ Logger.debug("XMLLoginParameterResolverPlainData: search for automatic login data for SurName:" + famName + " GivenName: " + givenName + " DateOfBirth: " + dateOfBirth);
+ params = (LPRParams)namedMap.get(famName + "," + givenName + "," + dateOfBirth);
+ if(params == null) {
+ Logger.debug("XMLLoginParameterResolverPlainData: params for Surname: " + famName + " GivenName: " + givenName + " DateOfBirth: " + dateOfBirth + " not found in file!");
+ //try also with wildcard ("*") birthdate
+ params = (LPRParams)namedMap.get(famName + "," + givenName + "," + "*");
+ if(params != null) Logger.debug("XMLLoginParameterResolverPlainData: params for Surname: " + famName + " GivenName: " + givenName + " DateOfBirth: " + "*" + " found!");
+ }
+
+ if(null != params && params.getEnabled())
+ {
+ Logger.debug("XMLLoginParameterResolverPlainData: SurName:" + famName + " GivenName: " + givenName + " DateOfBirth: " + dateOfBirth + " found in file; user is enabled");
+ Logger.debug("XMLLoginParameterResolverPlainData: using: " + params.toString());
+ userid = params.getUN();
+ password = params.getPW();
+ param1 = params.getParam1();
+ param2 = params.getParam2();
+ param3 = params.getParam3();
+ userFound = true;
+ }
+ }
+ if(!userFound) //third step: search for default user in user list
+ {
+ //third step: search for (w)bPK for the default user entry in user list
+ Logger.debug("XMLLoginParameterResolverPlainData: search for automatic login data for default user");
+ params = (LPRParams)bPKMap.get("default");
+ if(params == null)
+ Logger.debug("XMLLoginParameterResolverPlainData: params for default user not found in file!");
+ else
+ if(params.getEnabled())
+ { //if user is enabled: get related parameters
+ Logger.debug("XMLLoginParameterResolverPlainData: default user found in list; user is enabled");
+ Logger.debug("XMLLoginParameterResolverPlainData: using: " + params.toString());
+ userid = params.getUN();
+ password = params.getPW();
+ param1 = params.getParam1();
+ param2 = params.getParam2();
+ param3 = params.getParam3();
+ userFound = true;
+ } else
+ {
+ Logger.info("XMLLoginParameterResolverPlainData: default user found in list; user is NOT enabled");
+ }
+ }
+
+ if(!userFound) //if user is not found then throw NotAllowedException exception
+ {
+ //TODO MOA-ID proove this with testcases!
+ Logger.info("XMLLoginParameterResolverPlainData: Person is not allowed No automatic login");
+ throw new NotAllowedException("XMLLoginParameterResolverPlainData: Person is not allowed No automatic login ", new Object[] { });
+ }
+ try //if user was found: generate Authorization header entry with associated credemtials
+ {
+ String userIDPassword = userid + ":" + password;
+ String credentials = Base64Utils.encode(userIDPassword.getBytes());
+ Logger.debug("XMLLoginParameterResolverPlainData: calculated credentials: " + credentials);
+ result.put("Authorization", "Basic " + credentials);
+ }
+ catch(IOException ignore) { }
+ } else
+ if(oaConf.getAuthType().equals("header"))
+ {
+ String key;
+ String resolvedValue;
+ for(Iterator iter = oaConf.getHeaderAuthMapping().keySet().iterator(); iter.hasNext(); result.put(key, resolvedValue))
+ {
+ key = (String)iter.next();
+ String predicate = (String)oaConf.getHeaderAuthMapping().get(key);
+ resolvedValue = resolveValue(predicate, authData, clientIPAddress);
+ }
+
+ }
+ return result;
+ }
+
+ public Map getAuthenticationParameters(OAConfiguration oaConf, AuthenticationData authData, String clientIPAddress, boolean businessService, String publicURLPrefix)
+ {
+ Map result = new HashMap();
+ if(oaConf.getAuthType().equals("param"))
+ {
+ String key;
+ String resolvedValue;
+ for(Iterator iter = oaConf.getParamAuthMapping().keySet().iterator(); iter.hasNext(); result.put(key, resolvedValue))
+ {
+ key = (String)iter.next();
+ String predicate = (String)oaConf.getParamAuthMapping().get(key);
+ resolvedValue = resolveValue(predicate, authData, clientIPAddress);
+ }
+
+ }
+ return result;
+ }
+
+ private static String resolveValue(String predicate, AuthenticationData authData, String clientIPAddress)
+ {
+ if(predicate.equals(MOAGivenName))
+ return authData.getGivenName();
+ if(predicate.equals(MOAFamilyName))
+ return authData.getFamilyName();
+ if(predicate.equals(MOADateOfBirth))
+ return authData.getDateOfBirth();
+ if(predicate.equals(MOABPK))
+ return authData.getBPK();
+ if(predicate.equals(MOAWBPK))
+ return authData.getWBPK();
+ if(predicate.equals(MOAPublicAuthority))
+ if(authData.isPublicAuthority())
+ return "true";
+ else
+ return "false";
+ if(predicate.equals(MOABKZ))
+ return authData.getPublicAuthorityCode();
+ if(predicate.equals(MOAQualifiedCertificate))
+ if(authData.isQualifiedCertificate())
+ return "true";
+ else
+ return "false";
+ if(predicate.equals(MOAStammzahl))
+ return authData.getIdentificationValue();
+ if (predicate.equals(MOAIdentificationValueType))
+ return authData.getIdentificationType();
+ if(predicate.equals(MOAIPAddress))
+ return clientIPAddress;
+ else
+ return null;
+ }
+
+ private Document readXMLFile(String fileName) throws LoginParameterResolverException
+ {
+ Logger.info("XMLLoginParameterResolverPlainData: Loading MOA-OA configuration " + fileName);
+ DOMParser parser = new DOMParser();
+ try
+ {
+ parser.setFeature("http://xml.org/sax/features/validation", true);
+ parser.setFeature("http://apache.org/xml/features/validation/schema", true);
+ parser.parse(fileName);
+ return parser.getDocument();
+ }
+ catch(Exception e)
+ {
+ String msg = e.toString();
+ throw new LoginParameterResolverException("proxy.13", new Object[] {"<noURL>: XMLLoginParameterResolverPlainData: Error parsing file " + fileName, "detail problem: " + msg});
+ }
+ }
+
+ private void buildInfo(Document doc, boolean businessService)
+ {
+ Element root = doc.getDocumentElement();
+ NodeList idList = root.getElementsByTagName("Identity");
+ NodeList paramList = root.getElementsByTagName("Parameters");
+ String wType ="";
+ if (businessService) wType = "w";
+ for(int i = 0; i < idList.getLength(); i++)
+ Logger.debug("XMLLoginParameterResolverPlainData: LocalName idList: " + idList.item(i).getLocalName());
+
+ for(int i = 0; i < paramList.getLength(); i++)
+ Logger.debug("XMLLoginParameterResolverPlainData: LocalName paramList: " + paramList.item(i).getLocalName());
+
+ for(int i = 0; i < idList.getLength(); i++)
+ {
+ Element tmpElem = (Element)idList.item(i);
+ NodeList tmpList = tmpElem.getElementsByTagName("NamedIdentity");
+ for(int j = 0; j < tmpList.getLength(); j++)
+ Logger.debug("XMLLoginParameterResolverPlainData: LocalName tmp: " + tmpList.item(j).getLocalName());
+
+ if(1 == tmpList.getLength())
+ {
+ tmpElem = (Element)tmpList.item(0);
+ String tmpStr = tmpElem.getAttribute("SurName") + "," + tmpElem.getAttribute("GivenName") + "," + tmpElem.getAttribute("BirthDate");
+ boolean tmpBool = false;
+ if(tmpElem.getFirstChild() != null && "1".compareTo(tmpElem.getFirstChild().getNodeValue()) == 0)
+ tmpBool = true;
+ Logger.debug("XMLLoginParameterResolverPlainData: tmpStr: " + tmpStr + " value: " + (new Boolean(tmpBool)).toString());
+ tmpElem = (Element)paramList.item(i);
+ Logger.debug("XMLLoginParameterResolverPlainData: attribute UN: " + tmpElem.getAttribute("UN") + " attribute PW: " + tmpElem.getAttribute("PW"));
+ namedMap.put(tmpStr, new LPRParams(tmpBool, tmpElem.getAttribute("UN"), tmpElem.getAttribute("PW")));
+ } else
+ {
+ tmpList = tmpElem.getElementsByTagName(wType + "bPKIdentity");
+ if(1 == tmpList.getLength())
+ {
+ tmpElem = (Element)tmpList.item(0);
+ String tmpStr = tmpElem.getAttribute(wType + "bPK");
+ boolean tmpBool = false;
+ if(tmpElem.getFirstChild() != null && "1".compareTo(tmpElem.getFirstChild().getNodeValue()) == 0)
+ tmpBool = true;
+ Logger.debug("XMLLoginParameterResolverPlainData: tmpStr: " + tmpStr + " value: " + (new Boolean(tmpBool)).toString());
+ tmpElem = (Element)paramList.item(i);
+ Logger.debug("XMLLoginParameterResolverPlainData: attribute UN: " + tmpElem.getAttribute("UN") + " attribute PW: " + tmpElem.getAttribute("PW") + " attribute Param1: " + tmpElem.getAttribute("Param1"));
+ bPKMap.put(tmpStr, new LPRParams(tmpBool, tmpElem.getAttribute("UN"), tmpElem.getAttribute("PW")));
+ } else
+ {
+ Logger.warn("XMLLoginParameterResolverPlainData: wrong format or incorrect mode; no NamedIdentity or " + wType + "bPKIdentity found");
+ }
+ }
+ }
+
+ Logger.debug("namedMap:" + namedMap.toString());
+ Logger.debug(wType + "bPKMap:" + bPKMap.toString());
+ }
+
+ //public static final String XSD_DOCELEM = "MOAIdentities";
+ //public static final String XSD_IDELEM = "Identity";
+ //public static final String XSD_NAMEDIDELEM = "NamedIdentity";
+ //public static final String XSD_BPKIDELEM = "bPKIdentity";
+ //public static final String XSD_PARAMELEM = "Parameters";
+ //public static final String XML_LPR_CONFIG_PROPERTY_NAME1 = "moa.id.xmllpr1.configuration";
+ private Map bPKMap;
+ private Map namedMap;
+
+
+ public void configure(String configuration, Boolean businessService) throws LoginParameterResolverException {
+ Logger.info("XMLLoginParameterResolverPlainData: initialization string: " + configuration);
+ this.configuration = configuration;
+ String fileName = configuration;
+ if(fileName == null) {
+ fileName = "file:conf/moa-id/Identities.xml";
+ Logger.info("XMLLoginParameterResolverPlainData: used file name string: " + fileName);
+ }
+ Document doc = readXMLFile(fileName);
+ buildInfo(doc, businessService.booleanValue() );
+ }
+} \ No newline at end of file
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/builder/SAMLRequestBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/builder/SAMLRequestBuilder.java
new file mode 100644
index 000000000..28bf04e6f
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/builder/SAMLRequestBuilder.java
@@ -0,0 +1,70 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.proxy.builder;
+
+import java.text.MessageFormat;
+import java.util.Calendar;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.id.BuildException;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.DateTimeUtils;
+
+/**
+ * Builder for the <code>&lt;samlp:Request&gt;</code> used for querying
+ * the authentication data <code>&lt;saml:Assertion&gt;</code>.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class SAMLRequestBuilder implements Constants {
+ /** samlp-Request template */
+ private static final String REQUEST =
+ "<samlp:Request xmlns:samlp=\"urn:oasis:names:tc:SAML:1.0:protocol\" RequestID=\"{0}\" MajorVersion=\"1\" MinorVersion=\"0\" IssueInstant=\"{1}\">" +
+ "<samlp:AssertionArtifact>{2}</samlp:AssertionArtifact>" +
+ "</samlp:Request>";
+
+ /**
+ * Constructor for SAMLRequestBuilder.
+ */
+ public SAMLRequestBuilder() {
+ super();
+ }
+
+ /**
+ * Builds the <code>&lt;samlp:Request&gt;</code>.
+ * @param requestID request ID
+ * @param samlArtifactBase64 SAML artifact, encoded BASE64
+ * @return the DOM element
+ */
+ public Element build(String requestID, String samlArtifactBase64) throws BuildException {
+ try {
+ String issueInstant = DateTimeUtils.buildDateTime(Calendar.getInstance());
+ String request = MessageFormat.format(REQUEST, new Object[] {requestID, issueInstant, samlArtifactBase64});
+ Element requestElem = DOMUtils.parseDocument(request, false, ALL_SCHEMA_LOCATIONS, null).getDocumentElement();
+ return requestElem;
+ }
+ catch (Throwable ex) {
+ throw new BuildException(
+ "builder.00",
+ new Object[] {"samlp:Request", ex.toString()},
+ ex);
+ }
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/invoke/GetAuthenticationDataInvoker.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/invoke/GetAuthenticationDataInvoker.java
new file mode 100644
index 000000000..3b6ea273f
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/invoke/GetAuthenticationDataInvoker.java
@@ -0,0 +1,158 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.proxy.invoke;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Vector;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Call;
+import javax.xml.rpc.Service;
+import javax.xml.rpc.ServiceFactory;
+
+import org.apache.axis.message.SOAPBodyElement;
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.id.AuthenticationException;
+import at.gv.egovernment.moa.id.BuildException;
+import at.gv.egovernment.moa.id.ParseException;
+import at.gv.egovernment.moa.id.ServiceException;
+import at.gv.egovernment.moa.id.config.ConfigurationException;
+import at.gv.egovernment.moa.id.config.ConnectionParameter;
+import at.gv.egovernment.moa.id.config.proxy.ProxyConfigurationProvider;
+import at.gv.egovernment.moa.id.data.AuthenticationData;
+import at.gv.egovernment.moa.id.data.SAMLStatus;
+import at.gv.egovernment.moa.id.proxy.builder.SAMLRequestBuilder;
+import at.gv.egovernment.moa.id.proxy.parser.SAMLResponseParser;
+import at.gv.egovernment.moa.id.proxy.servlet.ProxyException;
+import at.gv.egovernment.moa.id.util.Random;
+
+/**
+ * Invoker of
+ * <ul>
+ * <li>either the GetAuthenticationData web service of MOA-ID Auth</li>
+ * <li>or the API call {@link at.gv.egovernment.moa.id.auth.AuthenticationServer#getAuthenticationData},</li>
+ * </ul>
+ * depending of the configuration.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class GetAuthenticationDataInvoker {
+ /** Create a new QName object for the webservice endpoint */
+ private static final QName SERVICE_QNAME = new QName("GetAuthenticationData");
+
+ /** invoked object for API call of MOA-ID Auth */
+ private static Object apiServer = null;
+ /** invoked method for API call of MOA-ID Auth */
+ private static Method apiMethod = null;
+
+ /**
+ * Invokes the service passing domain model objects.
+ * @param samlArtifact SAML artifact
+ * @return AuthenticationData object
+ * @throws ServiceException on any exception thrown
+ */
+ /**
+ * Get authentication data from the MOA-ID Auth component,
+ * either via API call or via web service call.
+ * @param samlArtifact SAML artifact to be used as a parameter
+ * @return AuthenticationData
+ */
+ public AuthenticationData getAuthenticationData(String samlArtifact)
+ throws ConfigurationException, ProxyException, BuildException, ServiceException, ParseException, AuthenticationException {
+
+ ConnectionParameter authConnParam =
+ ProxyConfigurationProvider.getInstance().getAuthComponentConnectionParameter();
+ if (authConnParam == null) {
+ try {
+ if (apiServer == null) {
+ Class serverClass = Class.forName("at.gv.egovernment.moa.id.auth.AuthenticationServer");
+ Method getInstanceMethod = serverClass.getMethod("getInstance", (Class[]) null);
+ apiServer = getInstanceMethod.invoke(null, (Object[]) null);
+ apiMethod = serverClass.getMethod(
+ "getAuthenticationData", new Class[] {String.class});
+ }
+ AuthenticationData authData = (AuthenticationData)apiMethod.invoke(apiServer, new Object[] {samlArtifact});
+ return authData;
+ }
+ catch (InvocationTargetException ex) {
+ Throwable targetEx = ex.getTargetException();
+ if (targetEx instanceof AuthenticationException)
+ throw (AuthenticationException) targetEx;
+ else
+ throw new ProxyException("proxy.09", new Object[] {targetEx.toString()});
+ }
+ catch (Throwable ex) {
+ throw new ProxyException("proxy.09", new Object[] {ex.toString()});
+ }
+ }
+ else {
+ Element samlpRequest = new SAMLRequestBuilder().build(Random.nextRandom(), samlArtifact);
+ Element samlpResponse = getAuthenticationData(samlpRequest);
+ SAMLResponseParser srp = new SAMLResponseParser(samlpResponse);
+ SAMLStatus status = srp.parseStatusCode();
+ if (! "samlp:Success".equals(status.getStatusCode())) {
+ // on error status throw exception
+ String code = status.getStatusCode();
+ if (status.getSubStatusCode() != null && status.getSubStatusCode().length() > 0)
+ code += "(" + status.getSubStatusCode() + ")";
+ throw new ServiceException("service.02", new Object[] {code, status.getStatusMessage()});
+ }
+ return srp.parseAuthenticationData();
+ }
+ }
+
+ /**
+ * Invokes the service passing DOM elements.
+ * @param request request DOM element
+ * @return response DOM element
+ * @throws ServiceException on any exception thrown
+ */
+ public Element getAuthenticationData(Element request) throws ServiceException {
+ try {
+ Service service = ServiceFactory.newInstance().createService(SERVICE_QNAME);
+ Call call = service.createCall();
+ SOAPBodyElement body =
+ new SOAPBodyElement(request);
+ SOAPBodyElement[] params = new SOAPBodyElement[] {body};
+ Vector responses;
+ SOAPBodyElement response;
+
+ String endPoint;
+ ConnectionParameter authConnParam =
+ ProxyConfigurationProvider.getInstance().getAuthComponentConnectionParameter();
+
+ //If the ConnectionParameter do NOT exist, we throw an exception ....
+ if (authConnParam!=null) {
+ endPoint = authConnParam.getUrl();
+ call.setTargetEndpointAddress(endPoint);
+ responses = (Vector) call.invoke(SERVICE_QNAME, params);
+ response = (SOAPBodyElement) responses.get(0);
+ return response.getAsDOM();
+ }
+ else
+ {
+ throw new ServiceException("service.01", null);
+ }
+ }
+ catch (Exception ex) {
+ throw new ServiceException("service.00", new Object[] {ex.toString()}, ex);
+ }
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/parser/AuthenticationDataAssertionParser.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/parser/AuthenticationDataAssertionParser.java
new file mode 100644
index 000000000..b051fe182
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/parser/AuthenticationDataAssertionParser.java
@@ -0,0 +1,173 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.proxy.parser;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.id.ParseException;
+import at.gv.egovernment.moa.id.auth.builder.BPKBuilder;
+import at.gv.egovernment.moa.id.data.AuthenticationData;
+import at.gv.egovernment.moa.util.BoolUtils;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+/**
+ * Parser for the <code>&lt;saml:Assertion&gt;</code> returned by the
+ * <code>GetAuthenticationData</code> web service.
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class AuthenticationDataAssertionParser implements Constants {
+
+ /** Prefix for SAML-Xpath-expressions */
+ private static String SAML = SAML_PREFIX + ":";
+ /** Prefix for PersonData-Xpath-expressions */
+ private static String PR = PD_PREFIX + ":";
+ /** Prefix for Attribute MajorVersion in an Xpath-expression */
+ private static String MAJOR_VERSION_XPATH =
+ "@MajorVersion";
+ /** Prefix for Attribute MinorVersion in an Xpath-expression */
+ private static String MINOR_VERSION_XPATH =
+ "@MinorVersion";
+ /** Prefix for Attribute AssertionID in an Xpath-expression */
+ private static String ASSERTION_ID_XPATH =
+ "@AssertionID";
+ /** Prefix for Attribute Issuer in an Xpath-expression */
+ private static String ISSUER_XPATH =
+ "@Issuer";
+ /** Prefix for Attribute IssueInstant in an Xpath-expression */
+ private static String ISSUE_INSTANT_XPATH =
+ "@IssueInstant";
+ /** Prefix for Element AttributeStatement in an Xpath-expression */
+ private static String ATTRIBUTESTATEMENT_XPATH =
+ SAML + "AttributeStatement/";
+ /** Prefix for Element NameIdentifier in an Xpath-expression */
+ private static String PK_XPATH =
+ ATTRIBUTESTATEMENT_XPATH +
+ SAML + "Subject/" +
+ SAML + "NameIdentifier";
+ private static String NAME_QUALIFIER_XPATH =
+ PK_XPATH + "/@NameQualifier";
+ /** Prefix for Element Person in an Xpath-expression */
+ private static String PERSONDATA_XPATH =
+ ATTRIBUTESTATEMENT_XPATH +
+ SAML + "Attribute[@AttributeName=\"PersonData\"]/" +
+ SAML + "AttributeValue/" +
+ PR + "Person/";
+ /** Prefix for Element Value in an Xpath-expression */
+ private static String IDENTIFICATION_VALUE_XPATH =
+ PERSONDATA_XPATH +
+ PR + "Identification/" +
+ PR + "Value";
+ private static String IDENTIFICATION_TYPE_XPATH =
+ PERSONDATA_XPATH +
+ PR + "Identification/" +
+ PR + "Type";
+ /** Prefix for Element GivenName in an Xpath-expression */
+ private static String GIVEN_NAME_XPATH =
+ PERSONDATA_XPATH +
+ PR + "Name/" +
+ PR + "GivenName";
+ /** Prefix for Element FamilyName in an Xpath-expression */
+ private static String FAMILY_NAME_XPATH =
+ PERSONDATA_XPATH +
+ PR + "Name/" +
+ PR + "FamilyName";
+ /** Prefix for Element DateOfBirth in an Xpath-expression */
+ private static String DATE_OF_BIRTH_XPATH =
+ PERSONDATA_XPATH +
+ PR + "DateOfBirth";
+ /** Prefix for Element AttributeValue in an Xpath-expression */
+ private static String IS_QUALIFIED_CERT_XPATH =
+ ATTRIBUTESTATEMENT_XPATH +
+ SAML + "Attribute[@AttributeName=\"isQualifiedCertificate\"]/" +
+ SAML + "AttributeValue";
+ /** Prefix for Element AttributeValue in an Xpath-expression */
+ private static String PUBLIC_AUTHORITY_XPATH =
+ ATTRIBUTESTATEMENT_XPATH +
+ SAML + "Attribute[@AttributeName=\"isPublicAuthority\"]/" +
+ SAML + "AttributeValue";
+ /** Element samlAssertion represents the SAML:Assertion */
+ private Element samlAssertion;
+
+ /**
+ * Constructor
+ * @param samlAssertion samlpResponse the <code>&lt;samlp:Response&gt;</code> as a DOM element
+ */
+ public AuthenticationDataAssertionParser(Element samlAssertion) {
+ this.samlAssertion = samlAssertion;
+ }
+
+ /**
+ * Parses the <code>&lt;saml:Assertion&gt;</code>.
+ * @return <code>AuthenticationData</code> object
+ * @throws ParseException on any error
+ */
+ public AuthenticationData parseAuthenticationData()
+ throws ParseException {
+
+ try {
+ AuthenticationData authData = new AuthenticationData();
+ //ÄNDERN: NUR der Identification-Teil
+ authData.setSamlAssertion(DOMUtils.serializeNode(samlAssertion));
+ authData.setMajorVersion(new Integer(
+ XPathUtils.getAttributeValue(samlAssertion, MAJOR_VERSION_XPATH, "-1")).intValue());
+ authData.setMinorVersion(new Integer(
+ XPathUtils.getAttributeValue(samlAssertion, MINOR_VERSION_XPATH, "-1")).intValue());
+ authData.setAssertionID(
+ XPathUtils.getAttributeValue(samlAssertion, ASSERTION_ID_XPATH, ""));
+ authData.setIssuer(
+ XPathUtils.getAttributeValue(samlAssertion, ISSUER_XPATH, ""));
+ authData.setIssueInstant(
+ XPathUtils.getAttributeValue(samlAssertion, ISSUE_INSTANT_XPATH, ""));
+ String pkValue = XPathUtils.getElementValue(samlAssertion, PK_XPATH, "");
+ if (XPathUtils.getAttributeValue(samlAssertion, NAME_QUALIFIER_XPATH, "").equalsIgnoreCase(URN_PREFIX_BPK)) {
+ authData.setBPK(pkValue);
+ } else {
+ authData.setWBPK(pkValue);
+ }
+ authData.setIdentificationValue(
+ XPathUtils.getElementValue(samlAssertion, IDENTIFICATION_VALUE_XPATH, ""));
+ authData.setIdentificationType(
+ XPathUtils.getElementValue(samlAssertion, IDENTIFICATION_TYPE_XPATH, ""));
+ authData.setGivenName(
+ XPathUtils.getElementValue(samlAssertion, GIVEN_NAME_XPATH, ""));
+ authData.setFamilyName(
+ XPathUtils.getElementValue(samlAssertion, FAMILY_NAME_XPATH, ""));
+ authData.setDateOfBirth(
+ XPathUtils.getElementValue(samlAssertion, DATE_OF_BIRTH_XPATH, ""));
+ authData.setQualifiedCertificate(BoolUtils.valueOf(
+ XPathUtils.getElementValue(samlAssertion, IS_QUALIFIED_CERT_XPATH, "")));
+ String publicAuthority =
+ XPathUtils.getElementValue(samlAssertion, PUBLIC_AUTHORITY_XPATH, null);
+ if (publicAuthority == null) {
+ authData.setPublicAuthority(false);
+ authData.setPublicAuthorityCode("");
+ }
+ else {
+ authData.setPublicAuthority(true);
+ if (! publicAuthority.equalsIgnoreCase("true"))
+ authData.setPublicAuthorityCode(publicAuthority);
+ }
+ return authData;
+ }
+ catch (Throwable t) {
+ throw new ParseException("parser.01", new Object[] { t.toString() }, t);
+ }
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/parser/SAMLResponseParser.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/parser/SAMLResponseParser.java
new file mode 100644
index 000000000..9c50990cd
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/parser/SAMLResponseParser.java
@@ -0,0 +1,115 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.proxy.parser;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.id.ParseException;
+import at.gv.egovernment.moa.id.data.AuthenticationData;
+import at.gv.egovernment.moa.id.data.SAMLStatus;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+/**
+ * Parser for the <code>&lt;samlp:Response&gt;</code> returned by the
+ * <code>GetAuthenticationData</code> web service.
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class SAMLResponseParser implements Constants {
+ /** Element containing the samlResponse */
+ private Element samlResponse;
+ /** Xpath prefix for reaching SAMLP Namespaces */
+ private static String SAMLP = SAMLP_PREFIX + ":";
+ /** Xpath prefix for reaching SAML Namespaces */
+ private static String SAML = SAML_PREFIX + ":";
+ /** Xpath prefix for reaching PersonData Namespaces */
+ private static String PR = PD_PREFIX + ":";
+ /** Xpath expression for reaching the SAMLP:Response element */
+ private static final String ROOT =
+ "/" + SAMLP + "Response/";
+ /** Xpath expression for reaching the SAMLP:Status element */
+ private static final String STATUS_XPATH =
+ ROOT +
+ SAMLP + "Status/";
+ /** Xpath expression for reaching the SAMLP:StatusCode_Value attribute */
+ private static final String STATUSCODE_XPATH =
+ STATUS_XPATH +
+ SAMLP + "StatusCode/@Value";
+ /** Xpath expression for reaching the SAMLP:SubStatusCode_Value attribute */
+ private static final String SUBSTATUSCODE_XPATH =
+ STATUS_XPATH +
+ SAMLP + "StatusCode/" +
+ SAMLP + "StatusCode/@Value";
+ /** Xpath expression for reaching the SAMLP:StatusMessage element */
+ private static final String STATUSMESSAGE_XPATH =
+ STATUS_XPATH +
+ SAMLP + "StatusMessage";
+ /** Xpath expression for reaching the SAML:Assertion element */
+ private static String ASSERTION_XPATH =
+ ROOT +
+ SAML + "Assertion";
+
+ /**
+ * Constructor
+ * @param samlResponse the <code>&lt;samlp:Response&gt;</code> as a DOM element
+ */
+ public SAMLResponseParser(Element samlResponse) {
+ this.samlResponse = samlResponse;
+ }
+
+ /**
+ * Parses the <code>&lt;samlp:StatusCode&gt;</code> from the <code>&lt;samlp:Response&gt;</code>.
+ * @return <code>AuthenticationData</code> object
+ * @throws ParseException on any parsing error
+ */
+ public SAMLStatus parseStatusCode()
+ throws ParseException {
+
+ SAMLStatus status = new SAMLStatus();
+ try {
+ status.setStatusCode(
+ XPathUtils.getAttributeValue(samlResponse, STATUSCODE_XPATH, ""));
+ status.setSubStatusCode(
+ XPathUtils.getAttributeValue(samlResponse, SUBSTATUSCODE_XPATH, ""));
+ status.setStatusMessage(
+ XPathUtils.getElementValue(samlResponse, STATUSMESSAGE_XPATH, ""));
+ }
+ catch (Throwable t) {
+ throw new ParseException("parser.01", new Object[] { t.toString() }, t);
+ }
+ return status;
+ }
+
+ /**
+ * Parses the <code>&lt;saml:Assertion&gt;</code> from the <code>&lt;samlp:Response&gt;</code>.
+ * @return <code>AuthenticationData</code> object
+ * @throws ParseException on any parsing error
+ */
+ public AuthenticationData parseAuthenticationData()
+ throws ParseException {
+
+ Element samlAssertion;
+ try {
+ samlAssertion = (Element)XPathUtils.selectSingleNode(samlResponse, ASSERTION_XPATH);
+ }
+ catch (Throwable t) {
+ throw new ParseException("parser.01", new Object[] { t.toString() }, t);
+ }
+ return new AuthenticationDataAssertionParser(samlAssertion).parseAuthenticationData();
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/servlet/ConfigurationServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/servlet/ConfigurationServlet.java
new file mode 100644
index 000000000..38db17f10
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/servlet/ConfigurationServlet.java
@@ -0,0 +1,86 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.proxy.servlet;
+
+import java.io.IOException;
+import java.text.DateFormat;
+import java.util.Date;
+import java.util.Locale;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import at.gv.egovernment.moa.id.proxy.MOAIDProxyInitializer;
+import at.gv.egovernment.moa.id.util.HTTPRequestJSPForwarder;
+import at.gv.egovernment.moa.id.util.MOAIDMessageProvider;
+import at.gv.egovernment.moa.logging.Logger;
+
+/**
+ * Servlet requested for updating the MOA-ID Auth configuration from configuration file
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class ConfigurationServlet extends HttpServlet {
+
+ /**
+ * Handle a HTTP GET request, used to indicated that the MOA
+ * configuration needs to be updated (reloaded).
+ *
+ * @see javax.servlet.http.HttpServlet#doGet(HttpServletRequest, HttpServletResponse)
+ */
+ public void doGet(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException {
+
+ MOAIDMessageProvider msg = MOAIDMessageProvider.getInstance();
+ try {
+ MOAIDProxyInitializer.initialize();
+
+ String message = msg.getMessage("config.00", new Object[]
+ { DateFormat.getTimeInstance(DateFormat.MEDIUM, Locale.GERMAN).format(new Date())} );
+ Logger.info(message);
+
+ HTTPRequestJSPForwarder.forwardNamed(message, "/message-proxy.jsp", getServletContext(), request, response);
+ } catch (Throwable t) {
+ String errorMessage = msg.getMessage("config.04", null);
+ Logger.error(errorMessage, t);
+ HTTPRequestJSPForwarder.forwardNamed(errorMessage, "/message-proxy.jsp", getServletContext(), request, response);
+ }
+ }
+
+ /**
+ * Do the same as <code>doGet</code>.
+ *
+ * @see javax.servlet.http.HttpServlet#doPost(HttpServletRequest, HttpServletResponse)
+ */
+ public void doPost(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException {
+ doGet(request, response);
+ }
+
+/**
+ * Calls the web application initializer.
+ *
+ * @see javax.servlet.Servlet#init(ServletConfig)
+ */
+public void init(ServletConfig servletConfig) throws ServletException {
+ super.init(servletConfig);
+}
+
+} \ No newline at end of file
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/servlet/ProxyException.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/servlet/ProxyException.java
new file mode 100644
index 000000000..993f4b935
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/servlet/ProxyException.java
@@ -0,0 +1,50 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.proxy.servlet;
+
+import at.gv.egovernment.moa.id.MOAIDException;
+
+/**
+ * Exception thrown while proxying a request to the online application
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class ProxyException extends MOAIDException {
+
+ /**
+ * Constructor for ProxyException.
+ * @param messageId
+ * @param parameters
+ */
+ public ProxyException(String messageId, Object[] parameters) {
+ super(messageId, parameters);
+ }
+
+ /**
+ * Constructor for ProxyException.
+ * @param messageId
+ * @param parameters
+ * @param wrapped
+ */
+ public ProxyException(
+ String messageId,
+ Object[] parameters,
+ Throwable wrapped) {
+ super(messageId, parameters, wrapped);
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/servlet/ProxyServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/servlet/ProxyServlet.java
new file mode 100644
index 000000000..6802005f1
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/servlet/ProxyServlet.java
@@ -0,0 +1,901 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.proxy.servlet;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Vector;
+
+import javax.net.ssl.SSLSocketFactory;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.apache.commons.lang.StringEscapeUtils;
+
+import at.gv.egovernment.moa.id.AuthenticationException;
+import at.gv.egovernment.moa.id.BuildException;
+import at.gv.egovernment.moa.id.MOAIDException;
+import at.gv.egovernment.moa.id.ParseException;
+import at.gv.egovernment.moa.id.ServiceException;
+import at.gv.egovernment.moa.id.config.ConfigurationException;
+import at.gv.egovernment.moa.id.config.ConnectionParameter;
+import at.gv.egovernment.moa.id.config.proxy.ProxyConfigurationProvider;
+import at.gv.egovernment.moa.id.config.proxy.OAConfiguration;
+import at.gv.egovernment.moa.id.config.proxy.OAProxyParameter;
+import at.gv.egovernment.moa.id.data.AuthenticationData;
+import at.gv.egovernment.moa.id.data.CookieManager;
+import at.gv.egovernment.moa.id.proxy.ConnectionBuilder;
+import at.gv.egovernment.moa.id.proxy.ConnectionBuilderFactory;
+import at.gv.egovernment.moa.id.proxy.LoginParameterResolver;
+import at.gv.egovernment.moa.id.proxy.LoginParameterResolverException;
+import at.gv.egovernment.moa.id.proxy.LoginParameterResolverFactory;
+import at.gv.egovernment.moa.id.proxy.MOAIDProxyInitializer;
+import at.gv.egovernment.moa.id.proxy.NotAllowedException;
+import at.gv.egovernment.moa.id.proxy.invoke.GetAuthenticationDataInvoker;
+import at.gv.egovernment.moa.id.util.MOAIDMessageProvider;
+import at.gv.egovernment.moa.id.util.SSLUtils;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.Base64Utils;
+
+/**
+ * Servlet requested for logging in at an online application,
+ * and then for proxying requests to the online application.
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class ProxyServlet extends HttpServlet {
+ /** Name of the Parameter for the Target */
+ private static final String PARAM_TARGET = "Target";
+ /** Name of the Parameter for the SAMLArtifact */
+ private static final String PARAM_SAMLARTIFACT = "SAMLArtifact";
+
+ /** Name of the Attribute for marking the session as authenticated*/
+ private static final String ATT_AUTHDATAFETCHED = "AuthDataFetched";
+ /** Name of the Attribute for the PublicURLPrefix */
+ private static final String ATT_PUBLIC_URLPREFIX = "PublicURLPrefix";
+ /** Name of the Attribute for the RealURLPrefix */
+ private static final String ATT_REAL_URLPREFIX = "RealURLPrefix";
+ /** Name of the Attribute for the SSLSocketFactory */
+ private static final String ATT_SSL_SOCKET_FACTORY = "SSLSocketFactory";
+ /** Name of the Attribute for the LoginHeaders */
+ private static final String ATT_LOGIN_HEADERS = "LoginHeaders";
+ /** Name of the Attribute for the LoginParameters */
+ private static final String ATT_LOGIN_PARAMETERS = "LoginParameters";
+ /** Name of the Attribute for the SAMLARTIFACT */
+ private static final String ATT_SAML_ARTIFACT = "SamlArtifact";
+ /** Name of the Attribute for the state of the browser request for login dialog*/
+ private static final String ATT_BROWSERREQU = "BrowserLoginRequest";
+ /** Name of the Attribute for the state of the browser request for login dialog*/
+ private static final String ATT_OA_CONF = "oaConf";
+ /** Name of the Attribute for the Logintype of the OnlineApplication*/
+ private static final String ATT_OA_LOGINTYPE = "LoginType";
+ /** Name of the Attribute for the number of the try to login into the OnlineApplication*/
+ private static final String ATT_OA_LOGINTRY = "LoginTry";
+ /** Maximum permitted login tries */
+ private static final int MAX_OA_LOGINTRY = 3;
+ /** Name of the Attribute for authorization value for further connections*/
+ private static final String ATT_OA_AUTHORIZATION_HEADER = "authorizationkey";
+ /** Name of the Attribute for user binding */
+ private static final String ATT_OA_USER_BINDING = "UserBinding";
+ /** For extended internal debug messages */
+ private static final boolean INTERNAL_DEBUG = false;
+ /** Message to be given if browser login failed */
+ private static final String RET_401_MSG = "<html><head><title>Ein Fehler ist aufgetreten</title></head><body><h1>Fehler bei der Anmeldung</h1><p>Bei der Anmeldung ist ein Fehler aufgetreten.</p><p>Fehler bei der Anmeldung. <br>Pr&uuml;fen Sie bitte ihre Berechtigung.<br><b>Abbruch durch den Benutzer.</b><br></p></body></html>";
+
+ /**
+ * @see javax.servlet.http.HttpServlet#service(HttpServletRequest, HttpServletResponse)
+ */
+ protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
+
+ Logger.debug("getRequestURL:" + req.getRequestURL().toString());
+
+ String artifact = req.getParameter(PARAM_SAMLARTIFACT);
+ artifact = StringEscapeUtils.escapeHtml(artifact);
+
+ try {
+ if (artifact != null) {
+ // check if SAML Artifact was already used in this session (in case of page reload)
+ HttpSession session = req.getSession();
+ if (null != session && artifact.equals(session.getAttribute(ATT_SAML_ARTIFACT))) {
+ if (session.getAttribute(ATT_BROWSERREQU)==null) {
+ tunnelRequest(req, resp);
+ }else{
+ login(req, resp); //login after browser login dialog
+ }
+ } else
+ // it is the first time that the SAML Artifact was used
+ login(req, resp);
+ }
+ else
+ tunnelRequest(req, resp);
+ }
+ catch (MOAIDException ex) {
+ handleError(ex.getMessage(), ex, req, resp);
+ }
+ catch (Throwable ex) {
+ handleError(ex.getMessage(), ex, req, resp);
+ }
+ }
+
+ /**
+ * Login to online application at first call of servlet for a user session.<br/>
+ * <ul>
+ * <li>Acquires authentication data from the MOA-ID Auth component.</li>
+ * <li>Reads configuration data for the online application.</li>
+ * <li>Resolves login parameters.</li>
+ * <li>Sets up an SSLSocketFactory in case of a secure connection to the online application.</li>
+ * <li>For a stateless online application, stores data in the HttpSession.</li>
+ * <li>Tunnels the request to the online application.</li>
+ * </ul>
+ * @param req
+ * @param resp
+ * @throws ConfigurationException when wrong configuration is encountered
+ * @throws ProxyException when wrong configuration is encountered
+ * @throws BuildException while building the request for MOA-ID Auth
+ * @throws ServiceException while invoking MOA-ID Auth
+ * @throws ParseException while parsing the response from MOA-ID Auth
+ */
+ private void login(HttpServletRequest req, HttpServletResponse resp) throws ConfigurationException, ProxyException, BuildException, ServiceException, ParseException, AuthenticationException {
+
+ HttpSession session = req.getSession();
+ String samlArtifact = "";
+ Map loginHeaders = null;
+ Map loginParameters = null;
+ String publicURLPrefix = "";
+ String realURLPrefix = "";
+ SSLSocketFactory ssf = null;
+ String urlRequested = req.getRequestURL().toString();
+ OAConfiguration oaConf = null;
+ String loginType = "";
+ String binding = "";
+
+ if (session.getAttribute(ATT_BROWSERREQU)==null) {
+
+ //@TODO Parameter
+ samlArtifact = req.getParameter(PARAM_SAMLARTIFACT);
+ Logger.debug("moa-id-proxy login " + PARAM_SAMLARTIFACT + ": " + samlArtifact);
+ // String target = req.getParameter(PARAM_TARGET); parameter given but not processed
+ // boolean targetprovided = req.getParameter(PARAM_TARGET) != null;
+
+ // get authentication data from the MOA-ID Auth component
+ AuthenticationData authData;
+ try {
+ authData = new GetAuthenticationDataInvoker().getAuthenticationData(samlArtifact);
+ } catch (ServiceException ex) {
+ throw new ProxyException("proxy.14", new Object[] {ex.getMessage()}, ex);
+ } catch (ProxyException ex) {
+ throw new ProxyException("proxy.14", new Object[] {ex.getMessage()}, ex);
+ }
+ session.setAttribute(ATT_AUTHDATAFETCHED, "true");
+
+ // read configuration data
+ ProxyConfigurationProvider proxyConf = ProxyConfigurationProvider.getInstance();
+ OAProxyParameter oaParam = proxyConf.getOnlineApplicationParameter(urlRequested);
+ if (oaParam == null) {
+ throw new ProxyException("proxy.02", new Object[] { urlRequested });
+ }
+ publicURLPrefix = oaParam.getPublicURLPrefix();
+ Logger.debug("OA: " + publicURLPrefix);
+ oaConf = oaParam.getOaConfiguration();
+ ConnectionParameter oaConnParam = oaParam.getConnectionParameter();
+ realURLPrefix = oaConnParam.getUrl();
+
+ // resolve login parameters to be forwarded to online application
+ LoginParameterResolver lpr = LoginParameterResolverFactory.getLoginParameterResolver(publicURLPrefix);
+ String clientIPAddress = req.getRemoteAddr();
+ boolean businessService = oaParam.getBusinessService();
+ try {
+ if (oaConf.getAuthType().equals(OAConfiguration.PARAM_AUTH)) {
+ loginParameters = lpr.getAuthenticationParameters(oaConf, authData, clientIPAddress, businessService, publicURLPrefix);
+ } else {
+ loginHeaders = lpr.getAuthenticationHeaders(oaConf, authData, clientIPAddress, businessService, publicURLPrefix);
+ for (Iterator iter = loginHeaders.keySet().iterator(); iter.hasNext();) {
+ //extract user-defined bindingValue
+ String headerKey = (String) iter.next();
+ String headerKeyValue = (String) loginHeaders.get(headerKey);
+ if (headerKey.equalsIgnoreCase("binding")) {
+ binding = (String) loginHeaders.get(headerKey);
+ }
+ for (int i = 1; i <= 3; i++) {
+ if (headerKey.equalsIgnoreCase("param" + i)) {
+ int sep = headerKeyValue.indexOf("=");
+ if (sep>-1) {
+ if (sep>0) {
+ String value = "";
+ if (headerKeyValue.length()>sep+1) value = headerKeyValue.substring(sep+1);
+ if (loginParameters == null) loginParameters = new HashMap();
+ loginParameters.put(headerKeyValue.substring(0,sep) , value);
+ }
+ } else {
+ loginParameters.put(headerKey, "");
+ }
+ }
+ }
+ }
+ loginHeaders.remove("binding");
+ loginHeaders.remove("param1");
+ loginHeaders.remove("param2");
+ loginHeaders.remove("param3");
+ }
+ } catch (LoginParameterResolverException ex) {
+ throw new ProxyException("proxy.13", new Object[] { publicURLPrefix });
+ } catch (NotAllowedException e) {
+ throw new ProxyException("proxy.15", new Object[] { });
+ }
+
+ // setup SSLSocketFactory for communication with the online application
+ if (oaConnParam.isHTTPSURL()) {
+ try {
+ ssf = SSLUtils.getSSLSocketFactory(proxyConf, oaConnParam);
+ } catch (Throwable ex) {
+ throw new ProxyException(
+ "proxy.05",
+ new Object[] { oaConnParam.getUrl(), ex.toString()},
+ ex);
+ }
+ }
+
+ // for stateless online application, store data in HttpSession
+ loginType = oaConf.getLoginType();
+ if ("".equalsIgnoreCase(binding)) {
+ binding = oaConf.getBinding();
+ if ("".equalsIgnoreCase(binding)) binding = "full";
+ }
+ Logger.debug("Login type: " + loginType);
+ if (loginType.equals(OAConfiguration.LOGINTYPE_STATELESS)) {
+ int sessionTimeOut = oaParam.getSessionTimeOut();
+ if (sessionTimeOut == 0)
+ sessionTimeOut = 60 * 60; // default 1 h
+
+ session.setMaxInactiveInterval(sessionTimeOut);
+ session.setAttribute(ATT_PUBLIC_URLPREFIX, publicURLPrefix);
+ session.setAttribute(ATT_REAL_URLPREFIX, realURLPrefix);
+ session.setAttribute(ATT_SSL_SOCKET_FACTORY, ssf);
+ session.setAttribute(ATT_LOGIN_HEADERS, loginHeaders);
+ session.setAttribute(ATT_LOGIN_PARAMETERS, loginParameters);
+ session.setAttribute(ATT_SAML_ARTIFACT, samlArtifact);
+ session.setAttribute(ATT_OA_CONF, oaConf);
+ session.setAttribute(ATT_OA_LOGINTYPE, loginType);
+ session.setAttribute(ATT_OA_USER_BINDING, binding);
+ session.removeAttribute(ATT_BROWSERREQU);
+ session.removeAttribute(ATT_OA_AUTHORIZATION_HEADER);
+ session.removeAttribute(ATT_OA_LOGINTRY);
+ Logger.debug("moa-id-proxy: HTTPSession " + session.getId() + " angelegt");
+ }
+
+ } else {
+ loginHeaders = (Map) session.getAttribute(ATT_LOGIN_HEADERS);
+ publicURLPrefix = (String) session.getAttribute(ATT_PUBLIC_URLPREFIX);
+ realURLPrefix = (String) session.getAttribute(ATT_REAL_URLPREFIX);
+ ssf = (SSLSocketFactory) session.getAttribute(ATT_SSL_SOCKET_FACTORY);
+ loginHeaders = (Map) session.getAttribute(ATT_LOGIN_HEADERS);
+ loginParameters = (Map) session.getAttribute(ATT_LOGIN_PARAMETERS);
+ samlArtifact = (String) session.getAttribute(ATT_SAML_ARTIFACT);
+ oaConf = (OAConfiguration) session.getAttribute(ATT_OA_CONF);
+ loginType = (String) session.getAttribute(ATT_OA_LOGINTYPE);
+ binding = (String) session.getAttribute(ATT_OA_USER_BINDING);
+ session.removeAttribute(ATT_BROWSERREQU);
+ Logger.debug("moa-id-proxy: HTTPSession " + session.getId() + " aufgenommen");
+ }
+
+ try {
+ int respcode = 0;
+
+ // tunnel request to the online application
+ respcode = tunnelRequest(req, resp, loginHeaders, loginParameters, publicURLPrefix, realURLPrefix, ssf, binding);
+ if (respcode == 401) {
+ if (OAConfiguration.BINDUNG_FULL.equals(binding) && oaConf.getLoginType().equals(OAConfiguration.LOGINTYPE_STATELESS)) {
+ throw new ProxyException("proxy.12", new Object[] { realURLPrefix });
+ }
+ }
+ } catch (ProxyException ex) {
+ throw new ProxyException("proxy.12", new Object[] { realURLPrefix });
+ } catch (Throwable ex) {
+ throw new ProxyException("proxy.04", new Object[] { urlRequested, ex.toString()}, ex);
+ }
+ }
+
+ /**
+ * Tunnels a request to the stateless online application using data stored in the HTTP session.
+ * @param req HTTP request
+ * @param resp HTTP response
+ * @throws IOException if an I/O error occurs
+ */
+ private void tunnelRequest(HttpServletRequest req, HttpServletResponse resp) throws ProxyException, IOException {
+
+ //Logger.debug("Tunnel request (stateless)");
+ HttpSession session = req.getSession(false);
+
+ if (session == null)
+ throw new ProxyException("proxy.07", null);
+ String publicURLPrefix = (String) session.getAttribute(ATT_PUBLIC_URLPREFIX);
+ //A session is automatically created when forwarded 1st time to errorpage-proxy.jsp (with the handleError method)
+ //additional check if publicURLPrefix is OK, if not throw an Exception
+ if (publicURLPrefix == null)
+ throw new ProxyException("proxy.07", null);
+
+ String realURLPrefix = (String) session.getAttribute(ATT_REAL_URLPREFIX);
+ SSLSocketFactory ssf = (SSLSocketFactory) session.getAttribute(ATT_SSL_SOCKET_FACTORY);
+ Map loginHeaders = (Map) session.getAttribute(ATT_LOGIN_HEADERS);
+ Map loginParameters = (Map) session.getAttribute(ATT_LOGIN_PARAMETERS);
+ String binding = (String) session.getAttribute(ATT_OA_USER_BINDING);
+ if (publicURLPrefix == null || realURLPrefix == null)
+ throw new ProxyException("proxy.08", new Object[] { req.getRequestURL().toString()});
+
+ int respcode = tunnelRequest(req, resp, loginHeaders, loginParameters, publicURLPrefix, realURLPrefix, ssf, binding);
+ if (respcode == -401) // #tries to login exceeded
+ throw new ProxyException("proxy.16", new Object[] {realURLPrefix, Integer.toString(MAX_OA_LOGINTRY)});
+ }
+
+/**
+ * Tunnels a request to the online application using given URL mapping and SSLSocketFactory.
+ * This method returns the ResponseCode of the request to the online application.
+ * @param req HTTP request
+ * @param resp HTTP response
+ * @param loginHeaders header field/values to be inserted for purposes of authentication;
+ * may be <code>null</code>
+ * @param loginParameters parameter name/values to be inserted for purposes of authentication;
+ * may be <code>null</code>
+ * @param publicURLPrefix prefix of request URL to be substituted for the <code>realURLPrefix</code>
+ * @param realURLPrefix prefix of online application URL to substitute the <code>publicURLPrefix</code>
+ * @param ssf SSLSocketFactory to use
+ * @throws IOException if an I/O error occurs
+ */
+private int tunnelRequest(HttpServletRequest req, HttpServletResponse resp, Map loginHeaders, Map loginParameters, String publicURLPrefix, String realURLPrefix, SSLSocketFactory ssf, String binding)
+ throws IOException {
+
+ String originBinding = binding;
+ String browserUserID = "";
+ String browserPassword = "";
+ //URL url = new URL(realURLPrefix);
+ //String realURLHost = url.getHost();
+ if (INTERNAL_DEBUG && !binding.equals("")) Logger.debug("Binding: " + binding);
+
+ // collect headers from request
+ Map headers = new HashMap();
+ for (Enumeration enu = req.getHeaderNames(); enu.hasMoreElements();) {
+ String headerKey = (String) enu.nextElement();
+ String headerKeyValue = req.getHeader(headerKey);
+ if (INTERNAL_DEBUG) Logger.debug("Incoming:" + headerKey + "=" + headerKeyValue);
+ //Analyze Basic-Auth-Headers from the client
+ if (headerKey.equalsIgnoreCase("Authorization")) {
+ if (headerKeyValue.substring(0,6).equalsIgnoreCase("Basic ")) {
+ String credentials = headerKeyValue.substring(6);
+ byte [] bplaintextcredentials = Base64Utils. decode(credentials, true);
+ String plaintextcredentials = new String(bplaintextcredentials);
+ browserUserID = plaintextcredentials.substring(0,plaintextcredentials.indexOf(":"));
+ browserPassword = plaintextcredentials.substring(plaintextcredentials.indexOf(":")+1);
+ //deactivate following line for security
+ //if (INTERNAL_DEBUG) Logger.debug("Analyzing authorization-header from browser: " + headerKeyValue + "gives UN:PW=" + browserUserID + ":" + browserPassword );
+ }
+ if (headerKeyValue.substring(0,9).equalsIgnoreCase("Negotiate")) {
+ //deactivate following line for security
+ //if (INTERNAL_DEBUG) Logger.debug("Analyzing authorization-header from browser: Found NTLM Aut.: " + headerKeyValue + "gives UN:PW=" + browserUserID + ":" + browserPassword );
+ }
+ }
+ else
+ {
+ /* Headers MUST NOT be repaced according to our Spec.
+ if (headerKey.equalsIgnoreCase("Host")) {
+ headerKeyValue = realURLHost;
+ //headerKeyValue= realURLPrefix.substring(hoststartpos);
+ if (INTERNAL_DEBUG) Logger.debug("replaced:" + headerKey + "=" + headerKeyValue);
+ }
+ */
+ headers.put(headerKey, headerKeyValue);
+ }
+ }
+
+
+ // collect login headers, possibly overwriting headers from request
+ String authorizationvalue="";
+ if (req.getSession().getAttribute(ATT_OA_AUTHORIZATION_HEADER)==null) {
+
+ if (OAConfiguration.BINDUNG_NOMATCH.equals(binding)) {
+ int loginTry = getLoginTry(req);
+ Logger.debug("Binding: mode = " + OAConfiguration.BINDUNG_NOMATCH + "(try #" + Integer.toString(loginTry) + ")");
+ if (loginTry==1) {
+ binding = OAConfiguration.BINDUNG_FULL;
+ } else {
+ binding = OAConfiguration.BINDUNG_USERNAME;
+ }
+ }
+
+ /* Soll auch bei anderen bindings zuerst ein passwort probiert werden können:
+ //if we have the first Login-Try and we have Binding to Username and a predefined Password we try this one first
+ // full binding will be covered by next block
+ if (loginTry==1 && !OAConfiguration.BINDUNG_FULL.equals(binding)) {
+ //1st try: if we have a password, try this one first
+ for (Iterator iter = loginHeaders.keySet().iterator(); iter.hasNext();) {
+ String headerKey = (String) iter.next();
+ String headerKeyValue = (String) loginHeaders.get(headerKey);
+ if (isBasicAuthenticationHeader(headerKey, headerKeyValue)) {
+ String credentials = headerKeyValue.substring(6);
+ byte [] bplaintextcredentials = Base64Utils.decode(credentials, true);
+ String plaintextcredentials = new String(bplaintextcredentials);
+ String password = plaintextcredentials.substring(plaintextcredentials.indexOf(":")+1);
+ if (password!=null && !password.equals("")) {
+ Logger.debug("Binding: found predefined password. Trying full binding first");
+ binding = OAConfiguration.BINDUNG_FULL;
+ break;
+ }
+ }
+ }
+ }
+ */
+
+
+
+ //we have a connection with not having logged on
+ if (loginHeaders != null && (browserPassword.length()!=0 || browserUserID.length()!=0 || OAConfiguration.BINDUNG_FULL.equals(binding))) {
+ for (Iterator iter = loginHeaders.keySet().iterator(); iter.hasNext();) {
+ String headerKey = (String) iter.next();
+ String headerKeyValue = (String) loginHeaders.get(headerKey);
+ //customize loginheaders if necessary
+ if (isBasicAuthenticationHeader(headerKey, headerKeyValue))
+ {
+ if (OAConfiguration.BINDUNG_FULL.equals(binding)) {
+ authorizationvalue = headerKeyValue;
+ Logger.debug("Binding: full binding to user established");
+ } else {
+ String credentials = headerKeyValue.substring(6);
+ byte [] bplaintextcredentials = Base64Utils.decode(credentials, true);
+ String plaintextcredentials = new String(bplaintextcredentials);
+ String userID = plaintextcredentials.substring(0,plaintextcredentials.indexOf(":"));
+ String password = plaintextcredentials.substring(plaintextcredentials.indexOf(":")+1);
+ String userIDPassword = ":";
+ if (OAConfiguration.BINDUNG_USERNAME.equals(binding)) {
+ Logger.debug("Binding: Access with necessary binding to user");
+ userIDPassword = userID + ":" + browserPassword;
+ } else if (OAConfiguration.BINDUNG_NONE.equals(binding)) {
+ Logger.debug("Binding: Access without binding to user");
+ //If first time
+ if (browserUserID.length()==0) browserUserID = userID;
+ if (browserPassword.length()==0) browserPassword = password;
+ userIDPassword = browserUserID + ":" + browserPassword;
+ } else {
+ userIDPassword = userID + ":" + password;
+ }
+ credentials = Base64Utils.encode(userIDPassword.getBytes());
+ authorizationvalue = "Basic " + credentials;
+ headerKeyValue = authorizationvalue;
+ }
+ }
+ headers.put(headerKey, headerKeyValue);
+ }
+ }
+ }else{
+ //if OA needs Authorization header in each further request
+ authorizationvalue = (String) req.getSession().getAttribute(ATT_OA_AUTHORIZATION_HEADER);
+ if (loginHeaders != null) headers.put("Authorization", authorizationvalue);
+ }
+
+
+ Vector parameters = new Vector();
+ for (Enumeration enu = req.getParameterNames(); enu.hasMoreElements();) {
+ String paramName = (String) enu.nextElement();
+ if (!(paramName.equals(PARAM_SAMLARTIFACT) || paramName.equals(PARAM_TARGET))) {
+ if (INTERNAL_DEBUG) Logger.debug("Req Parameter-put: " + paramName + ":" + req.getParameter(paramName));
+ String parameter[] = new String[2];
+ parameter[0]= paramName;
+ parameter[1]= req.getParameter(paramName);
+ parameters.add(parameter);
+ }
+ }
+ // collect login parameters, possibly overwriting parameters from request
+ if (loginParameters != null) {
+ for (Iterator iter = loginParameters.keySet().iterator(); iter.hasNext();) {
+ String paramName = (String) iter.next();
+ if (!(paramName.equals(PARAM_SAMLARTIFACT) || paramName.equals(PARAM_TARGET))) {
+ if (INTERNAL_DEBUG) Logger.debug("Req Login-Parameter-put: " + paramName + ":" + loginParameters.get(paramName));
+ String parameter[] = new String[2];
+ parameter[0]= paramName;
+ parameter[1]= (String) loginParameters.get(paramName);
+ parameters.add(parameter);
+ }
+ }
+ }
+
+ ConnectionBuilder cb = ConnectionBuilderFactory.getConnectionBuilder(publicURLPrefix);
+ HttpURLConnection conn = cb.buildConnection(req, publicURLPrefix, realURLPrefix, ssf, parameters);
+
+ // set headers as request properties of URLConnection
+ for (Iterator iter = headers.keySet().iterator(); iter.hasNext();) {
+ String headerKey = (String) iter.next();
+ String headerValue = (String) headers.get(headerKey);
+ String LogStr = "Req header " + headerKey + ": " + headers.get(headerKey);
+ if (isBasicAuthenticationHeader(headerKey, headerValue)) {
+ String credentials = headerValue.substring(6);
+ byte [] bplaintextcredentials = Base64Utils. decode(credentials, true);
+ String plaintextcredentials = new String(bplaintextcredentials);
+ String uid = plaintextcredentials.substring(0,plaintextcredentials.indexOf(":"));
+ String pwd = plaintextcredentials.substring(plaintextcredentials.indexOf(":")+1);
+ //Sollte AuthorizationInfo vom HTTPClient benutzt werden: cb.addBasicAuthorization(publicURLPrefix, uid, pwd);
+ //deactivate following line for security
+ //if (INTERNAL_DEBUG && Logger.isDebugEnabled()) LogStr = LogStr + " >UserID:Password< >" + uid + ":" + pwd + "<";
+ }
+ conn.setRequestProperty(headerKey, headerValue);
+ if (INTERNAL_DEBUG) Logger.debug(LogStr);
+ }
+
+ StringWriter sb = new StringWriter();
+
+ // Write out parameters into output stream of URLConnection.
+ // On GET request, do not send parameters in any case,
+ // otherwise HttpURLConnection would send a POST.
+ if (!"get".equalsIgnoreCase(req.getMethod()) && !parameters.isEmpty()) {
+ boolean firstParam = true;
+ String parameter[] = new String[2];
+ for (Iterator iter = parameters.iterator(); iter.hasNext();) {
+ parameter = (String[]) iter.next();
+ String paramName = parameter[0];
+ String paramValue = parameter[1];
+ if (firstParam)
+ firstParam = false;
+ else
+ sb.write("&");
+ sb.write(paramName);
+ sb.write("=");
+ sb.write(paramValue);
+ if (INTERNAL_DEBUG) Logger.debug("Req param " + paramName + ": " + paramValue);
+ }
+ }
+
+ // For WebDAV and POST: copy content
+ if (!"get".equalsIgnoreCase(req.getMethod())) {
+ if (INTERNAL_DEBUG && !"post".equalsIgnoreCase(req.getMethod())) Logger.debug("---- WEBDAV ---- copying content");
+ try {
+ OutputStream out = conn.getOutputStream();
+ InputStream in = req.getInputStream();
+ if (!parameters.isEmpty()) out.write(sb.toString().getBytes()); //Parameter nicht mehr mittels Printwriter schreiben
+ copyStream(in, out, null, req.getMethod());
+ out.flush();
+ out.close();
+ } catch (IOException e) {
+ if (!"post".equalsIgnoreCase(req.getMethod()))
+ Logger.debug("---- WEBDAV ---- streamcopy problem");
+ else
+ Logger.debug("---- POST ---- streamcopy problem");
+ }
+ }
+
+ // connect
+ if (INTERNAL_DEBUG) Logger.debug("Connect Request");
+ conn.connect();
+ if (INTERNAL_DEBUG) Logger.debug("Connect Response");
+
+ // check login tries
+ if (conn.getResponseCode()==HttpURLConnection.HTTP_UNAUTHORIZED) {
+ int loginTry = getLoginTry(req);
+ req.getSession().setAttribute(ATT_OA_LOGINTRY, Integer.toString(loginTry));
+ if (loginTry > MAX_OA_LOGINTRY) {
+ Logger.debug("Found 401 UNAUTHORIZED, maximum tries exceeded; leaving...");
+ cb.disconnect(conn);
+ return -401;
+ }
+ }
+
+
+
+ if (conn.getResponseCode()==HttpURLConnection.HTTP_UNAUTHORIZED && OAConfiguration.BINDUNG_FULL.equals(originBinding)) {
+ Logger.debug("Found 401 UNAUTHORIZED, leaving...");
+ cb.disconnect(conn);
+ return conn.getResponseCode();
+ }
+
+
+ resp.setStatus(conn.getResponseCode());
+ //Issue by Gregor Karlinger - content type was annotated twice
+ //resp.setContentType(conn.getContentType());
+
+ if (loginHeaders != null && (conn.getResponseCode()==HttpURLConnection.HTTP_OK || conn.getResponseCode()==HttpURLConnection.HTTP_MOVED_TEMP) && req.getSession().getAttribute(ATT_OA_AUTHORIZATION_HEADER)==null) {
+ req.getSession().setAttribute(ATT_OA_AUTHORIZATION_HEADER, authorizationvalue);
+ Logger.debug("Login OK. Saving authorization header to remember in further requests");
+ }
+
+ // Read response headers
+ // Omit response header "content-length" if response header "Transfer-encoding: chunked" is set.
+ // Otherwise, the connection will not be kept alive, resulting in subsequent missing requests.
+ // See JavaDoc of javax.servlet.http.HttpServlet:
+ // When using HTTP 1.1 chunked encoding (which means that the response has a Transfer-Encoding header), do not set the Content-Length header.
+ Vector respHeaders = new Vector();
+
+ boolean chunked = false;
+ String contentLengthKey = null;
+ String transferEncodingKey = null;
+ int i = 1;
+ String headerKey;
+ String loginType = (String) req.getSession().getAttribute(ATT_OA_LOGINTYPE);
+ while ((headerKey = conn.getHeaderFieldKey(i)) != null) {
+ String headerValue = conn.getHeaderField(i);
+ // Überschrift im Browser-Passworteingabedialog setzen (sonst ist der reale host eingetragen)
+ if (headerKey.equalsIgnoreCase("WWW-Authenticate") && headerValue.startsWith("Basic realm=\"")) {
+ headerValue = "Basic realm=\"" + publicURLPrefix + "\"";
+ if (OAConfiguration.BINDUNG_USERNAME.equals(originBinding) || OAConfiguration.BINDUNG_NOMATCH.equals(originBinding)) {
+ headerValue = "Basic realm=\"Bitte Passwort eingeben\"";
+ } else if (OAConfiguration.BINDUNG_NONE.equals(originBinding)) {
+ headerValue = "Basic realm=\"Bitte Benutzername und Passwort eingeben\"";
+ }
+ }
+ String respHeader[] = new String[2];
+ if ((conn.getResponseCode()==HttpURLConnection.HTTP_UNAUTHORIZED) && headerKey.equalsIgnoreCase("content-length")) {
+ //alter the unauthorized message with template for login
+ //TODO: supply a special login form on unauthorized messages with bindings!=full
+ headerValue = Integer.toString(RET_401_MSG.length());
+ }
+ respHeader[0]= headerKey;
+ respHeader[1]= headerValue;
+
+ if (!(OAConfiguration.BINDUNG_FULL.equals(originBinding) && OAConfiguration.LOGINTYPE_STATELESS.equals(loginType) && headerKey.equalsIgnoreCase("WWW-Authenticate") && headerValue.startsWith("Basic realm=\""))) {
+ respHeaders.add(respHeader);
+ if (INTERNAL_DEBUG) Logger.debug("Resp header " + headerKey + ": " + headerValue);
+ } else {
+ Logger.debug("Resp header ---REMOVED--- " + headerKey + ": " + headerValue);
+ }
+ if (isTransferEncodingChunkedHeader(headerKey, headerValue) || "content-length".equalsIgnoreCase(headerKey)) {
+ respHeaders.remove(respHeader);
+ Logger.debug("Resp header " + headerKey + " REMOVED");
+ }
+
+ i++;
+ }
+
+
+ String headerValue;
+ String respHeader[] = new String[2];
+
+ //write out all Responseheaders
+ for (Iterator iter = respHeaders.iterator(); iter.hasNext();) {
+ respHeader = (String[]) iter.next();
+ headerKey = respHeader[0];
+ headerValue = respHeader[1];
+ resp.addHeader(headerKey, headerValue);
+ }
+
+ //Logger.debug(">>>> Copy Content");
+ //Logger.debug(" from ()" + conn.getURL());
+ //Logger.debug(" to (" + req.getRemoteAddr() + ":"+ ") " +req.getRequestURL());
+
+ // read response stream
+ Logger.debug("Resp from " + conn.getURL().toString() + ": status " + conn.getResponseCode());
+ // Load content unless the server lets us know that the content is NOT MODIFIED...
+ if (conn.getResponseCode()!=HttpURLConnection.HTTP_NOT_MODIFIED ) {
+ BufferedInputStream respIn = new BufferedInputStream(conn.getInputStream());
+ //Logger.debug("Got Inputstream");
+ BufferedOutputStream respOut = new BufferedOutputStream(resp.getOutputStream());
+ //Logger.debug("Got Outputstream");
+
+ byte [] buffer = new byte[4096];
+ if (respOut != null) {
+ int bytesRead;
+ while ((bytesRead = respIn.read(buffer)) >= 0) {
+ if (conn.getResponseCode()!=HttpURLConnection.HTTP_UNAUTHORIZED) respOut.write(buffer, 0, bytesRead);
+ }
+ } else {
+ while (respIn.read(buffer) >= 0);
+ }
+
+
+ /*
+ int ch;
+ StringBuffer strBuf = new StringBuffer("");
+ while ((ch = respIn.read()) >= 0) {
+ if (conn.getResponseCode()!=HttpURLConnection.HTTP_UNAUTHORIZED) respOut.write(ch);
+ strBuf.append((char)ch);
+ }
+ Logger.debug("Resp Content:");
+ if (strBuf.toString().length()>500)
+ Logger.debug(strBuf.toString().substring(0,500));
+ else
+ Logger.debug(strBuf.toString());
+ */
+
+
+ if (conn.getResponseCode()==HttpURLConnection.HTTP_UNAUTHORIZED) {
+ respOut.write(RET_401_MSG.getBytes());
+ }
+ respOut.flush();
+ respOut.close();
+ respIn.close();
+ if (conn.getResponseCode()==HttpURLConnection.HTTP_UNAUTHORIZED) {
+ Logger.debug("Found 401 UNAUTHORIZED...");
+ cb.disconnect(conn);
+ return conn.getResponseCode();
+ }
+ } else {
+ //if (conn.getResponseCode()==HttpURLConnection.HTTP_NOT_MODIFIED)
+ Logger.debug("Found 304 NOT MODIFIED...");
+ }
+
+ cb.disconnect(conn);
+ Logger.debug("Request done");
+
+ return conn.getResponseCode();
+}
+
+/**
+ * Gets the current amount of the login try at the online application
+ *
+ * @param req the HttpServletRequest
+ * @return the number off the current login try
+ */
+private int getLoginTry(HttpServletRequest req) {
+ String oa_loginTry = (String) req.getSession().getAttribute(ATT_OA_LOGINTRY);
+ int loginTry = 1;
+ if (oa_loginTry!=null) loginTry = Integer.parseInt(oa_loginTry)+1;
+ return loginTry;
+}
+/**
+ * Determines whether a HTTP header is a basic authentication header of the kind "Authorization: Basic ..."
+ *
+ * @param headerKey header name
+ * @param headerValue header value
+ * @return true for a basic authentication header
+ */
+private boolean isBasicAuthenticationHeader(String headerKey, String headerValue) {
+ if (!"authorization".equalsIgnoreCase(headerKey))
+ return false;
+ if (headerValue.length() < "basic".length())
+ return false;
+ String authenticationSchema = headerValue.substring(0, "basic".length());
+ return "basic".equalsIgnoreCase(authenticationSchema);
+}
+/**
+ * Determines whether a basic authentication header of the kind "Authorization: Basic ..."
+ * is included in a HTTP request
+ * @param req HTTP request
+ * @return true for a basic authentication header provided
+ */
+private boolean isBasicAuthenticationHeaderProvided(HttpServletRequest req) {
+ for (Enumeration enu = req.getHeaderNames(); enu.hasMoreElements();) {
+ String headerKey = (String) enu.nextElement();
+ String headerValue = req.getHeader(headerKey);
+ if (isBasicAuthenticationHeader(headerKey, headerValue))
+ return true;
+ }
+ return false;
+}
+/**
+ * Determines whether a HTTP header is "Transfer-encoding" header with value containing "chunked"
+ *
+ * @param headerKey header name
+ * @param headerValue header value
+ * @return true for a "Transfer-encoding: chunked" header
+ */
+private boolean isTransferEncodingChunkedHeader(String headerKey, String headerValue) {
+ if (!"transfer-encoding".equalsIgnoreCase(headerKey))
+ return false;
+ return headerValue.indexOf("chunked") >= 0 || headerValue.indexOf("Chunked") >= 0 || headerValue.indexOf("CHUNKED") >= 0;
+}
+
+/**
+ * Calls the web application initializer.
+ *
+ * @see javax.servlet.Servlet#init(ServletConfig)
+ */
+public void init(ServletConfig servletConfig) throws ServletException {
+ super.init(servletConfig);
+ try {
+ MOAIDProxyInitializer.initialize();
+ Logger.info(MOAIDMessageProvider.getInstance().getMessage("proxy.00", null));
+ }
+ catch (Exception ex) {
+ Logger.fatal(MOAIDMessageProvider.getInstance().getMessage("proxy.06", null), ex);
+ throw new ServletException(ex);
+ }
+}
+
+/**
+ * Handles an error. <br>
+ * <ul>
+ * <li>Logs the error</li>
+ * <li>Places error message and exception thrown into the request
+ * as request attributes (to be used by <code>"/errorpage-proxy.jsp"</code>)</li>
+ * <li>Sets HTTP status 500 (internal server error)</li>
+ * </ul>
+ *
+ * @param errorMessage error message
+ * @param exceptionThrown exception thrown
+ * @param req servlet request
+ * @param resp servlet response
+ */
+protected void handleError(
+ String errorMessage, Throwable exceptionThrown, HttpServletRequest req, HttpServletResponse resp) {
+
+
+ if(null != errorMessage) {
+ Logger.error(errorMessage);
+ req.setAttribute("ErrorMessage", errorMessage );
+ }
+
+ if (null != exceptionThrown) {
+ if(null == errorMessage) errorMessage = exceptionThrown.getMessage();
+ Logger.error(errorMessage, exceptionThrown);
+ //req.setAttribute("ExceptionThrown", exceptionThrown);
+ }
+
+ if (Logger.isDebugEnabled()) {
+ req.setAttribute("LogLevel", "debug");
+ }
+
+ //forward this to errorpage-proxy.jsp where the HTML error page is generated
+ ServletContext context = getServletContext();
+ RequestDispatcher dispatcher = context.getRequestDispatcher("/errorpage-proxy.jsp");
+ try {
+ dispatcher.forward(req, resp);
+ } catch (ServletException e) {
+ Logger.error(e);
+ } catch (IOException e) {
+ Logger.error(e);
+ }
+
+}
+
+
+// * taken from iaik.utils.util.copyStream:
+/**
+ * Reads all data (until EOF is reached) from the given source to the
+ * destination stream. If the destination stream is null, all data is dropped.
+ * It uses the given buffer to read data and forward it. If the buffer is
+ * null, this method allocates a buffer.
+ *
+ * @param source The stream providing the data.
+ * @param destination The stream that takes the data. If this is null, all
+ * data from source will be read and discarded.
+ * @param buffer The buffer to use for forwarding. If it is null, the method
+ * allocates a buffer.
+ * @exception IOException If reading from the source or writing to the
+ * destination fails.
+ */
+private static void copyStream(InputStream source, OutputStream destination, byte[] buffer, String method) throws IOException {
+ if (source == null) {
+ throw new NullPointerException("Argument \"source\" must not be null.");
+ }
+ if (buffer == null) {
+ buffer = new byte[4096];
+ }
+
+ if (destination != null) {
+ int bytesRead;
+ while ((bytesRead = source.read(buffer)) >= 0) {
+ destination.write(buffer, 0, bytesRead);
+ //if (method.equalsIgnoreCase("POST")) Logger.debug(buffer.toString());
+ }
+ } else {
+ while (source.read(buffer) >= 0);
+ }
+}
+
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/AxisSecureSocketFactory.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/AxisSecureSocketFactory.java
new file mode 100644
index 000000000..201f6df19
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/AxisSecureSocketFactory.java
@@ -0,0 +1,227 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.util;
+
+import java.io.BufferedWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.net.Socket;
+import java.security.GeneralSecurityException;
+import java.util.Hashtable;
+
+import javax.net.ssl.SSLSocket;
+import javax.net.ssl.SSLSocketFactory;
+
+import org.apache.axis.components.net.BooleanHolder;
+import org.apache.axis.components.net.DefaultSocketFactory;
+import org.apache.axis.components.net.SecureSocketFactory;
+import org.apache.axis.components.net.TransportClientProperties;
+import org.apache.axis.components.net.TransportClientPropertiesFactory;
+import org.apache.axis.utils.Messages;
+import org.apache.axis.utils.XMLUtils;
+
+import at.gv.egovernment.moa.logging.Logger;
+
+/**
+ * Secure socket factory for Axis webs service clients of the MOA-ID component,
+ * which are the MOA-SP calls from MOA-ID Auth,
+ * and the MOA-ID Auth calls from MOA-ID Proxy.
+ * <br/>Use this initialization code:<br/>
+ * <code> // ConnectionParameter connParam = ... get from ConfigurationProvider
+ * AxisSecureSocketFactory.initialize(connParam);</code>
+ * <br/>See the Apache Axis documentation on how to configure this class
+ * as the default secure socket factory to be used by Axis.
+ * <br/>
+ * This code has been copied from <code>JSSESocketFactory</code>, the
+ * method <code>initialize()</code> has been added.
+ *
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class AxisSecureSocketFactory
+ extends DefaultSocketFactory implements SecureSocketFactory {
+
+ /** Field sslFactory */
+ private static SSLSocketFactory sslFactory;
+
+ /**
+ * Constructor for AxisSecureSocketFactory.
+ * @param attributes ???
+ */
+ public AxisSecureSocketFactory(Hashtable attributes) {
+ super(attributes);
+ }
+ /**
+ * Initializes the factory by setting the connection parameters to be used for
+ * setting the secure socket factory, and by setting the system property
+ * <code>axis.socketSecureFactory</code>.
+ * @param ssf <code>SSLSocketFactory</code> to initialize with
+ */
+ public static void initialize(SSLSocketFactory ssf)
+ throws IOException, GeneralSecurityException {
+
+ Logger.debug("Initialize AxisSecureSocketFactory");
+ sslFactory = ssf;
+ }
+
+ /**
+ * creates a secure socket
+ *
+ * @param host
+ * @param port
+ * @param otherHeaders
+ * @param useFullURL
+ *
+ * @return Socket
+ * @throws Exception
+ */
+ public Socket create(
+ String host,
+ int port,
+ StringBuffer otherHeaders,
+ BooleanHolder useFullURL)
+ throws Exception {
+ if (port == -1) {
+ port = 443;
+ }
+
+ TransportClientProperties tcp =
+ TransportClientPropertiesFactory.create("https");
+
+ boolean hostInNonProxyList =
+ isHostInNonProxyList(host, tcp.getNonProxyHosts());
+
+ Socket sslSocket = null;
+ if (tcp.getProxyHost().length() == 0 || hostInNonProxyList) {
+ // direct SSL connection
+ sslSocket = sslFactory.createSocket(host, port);
+ }
+ else {
+
+ // Default proxy port is 80, even for https
+ int tunnelPort =
+ (tcp.getProxyPort().length() != 0)
+ ? Integer.parseInt(tcp.getProxyPort())
+ : 80;
+ if (tunnelPort < 0)
+ tunnelPort = 80;
+
+ // Create the regular socket connection to the proxy
+ Socket tunnel = new Socket(tcp.getProxyHost(), tunnelPort);
+
+ // The tunnel handshake method (condensed and made reflexive)
+ OutputStream tunnelOutputStream = tunnel.getOutputStream();
+ PrintWriter out =
+ new PrintWriter(
+ new BufferedWriter(new OutputStreamWriter(tunnelOutputStream)));
+
+ // More secure version... engage later?
+ // PasswordAuthentication pa =
+ // Authenticator.requestPasswordAuthentication(
+ // InetAddress.getByName(tunnelHost),
+ // tunnelPort, "SOCK", "Proxy","HTTP");
+ // if(pa == null){
+ // printDebug("No Authenticator set.");
+ // }else{
+ // printDebug("Using Authenticator.");
+ // tunnelUser = pa.getUserName();
+ // tunnelPassword = new String(pa.getPassword());
+ // }
+ out.print(
+ "CONNECT "
+ + host
+ + ":"
+ + port
+ + " HTTP/1.0\r\n"
+ + "User-Agent: AxisClient");
+ if (tcp.getProxyUser().length() != 0
+ && tcp.getProxyPassword().length() != 0) {
+
+ // add basic authentication header for the proxy
+ String encodedPassword =
+ XMLUtils.base64encode(
+ (tcp.getProxyUser() + ":" + tcp.getProxyPassword()).getBytes());
+
+ out.print("\nProxy-Authorization: Basic " + encodedPassword);
+ }
+ out.print("\nContent-Length: 0");
+ out.print("\nPragma: no-cache");
+ out.print("\r\n\r\n");
+ out.flush();
+ InputStream tunnelInputStream = tunnel.getInputStream();
+
+ if (log.isDebugEnabled()) {
+ log.debug(
+ Messages.getMessage(
+ "isNull00",
+ "tunnelInputStream",
+ "" + (tunnelInputStream == null)));
+ }
+ String replyStr = "";
+
+ // Make sure to read all the response from the proxy to prevent SSL negotiation failure
+ // Response message terminated by two sequential newlines
+ int newlinesSeen = 0;
+ boolean headerDone = false; /* Done on first newline */
+
+ while (newlinesSeen < 2) {
+ int i = tunnelInputStream.read();
+
+ if (i < 0) {
+ throw new IOException("Unexpected EOF from proxy");
+ }
+ if (i == '\n') {
+ headerDone = true;
+ ++newlinesSeen;
+ }
+ else if (i != '\r') {
+ newlinesSeen = 0;
+ if (!headerDone) {
+ replyStr += String.valueOf((char) i);
+ }
+ }
+ }
+ if (!replyStr.startsWith("HTTP/1.0 200")
+ && !replyStr.startsWith("HTTP/1.1 200")) {
+ throw new IOException(
+ Messages.getMessage(
+ "cantTunnel00",
+ new String[] { tcp.getProxyHost(), "" + tunnelPort, replyStr }));
+ }
+
+ // End of condensed reflective tunnel handshake method
+ sslSocket = sslFactory.createSocket(tunnel, host, port, true);
+ if (log.isDebugEnabled()) {
+ log.debug(
+ Messages.getMessage(
+ "setupTunnel00",
+ tcp.getProxyHost(),
+ "" + tunnelPort));
+ }
+ }
+
+ ((SSLSocket) sslSocket).startHandshake();
+ if (log.isDebugEnabled()) {
+ log.debug(Messages.getMessage("createdSSL00"));
+ }
+ return sslSocket;
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ECDSAConstants.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ECDSAConstants.java
new file mode 100644
index 000000000..565442335
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ECDSAConstants.java
@@ -0,0 +1,51 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+/*
+ * Created on 20.01.2005
+ *
+ * @author rschamberger
+ * $ID$
+ */
+package at.gv.egovernment.moa.id.util;
+
+
+/**
+ * Class used to define Constants used in Class ECDSAKeyValueConverter
+ *
+ * * @author rschamberger
+ */
+public class ECDSAConstants {
+
+ /* ECDSA Namespace
+ */
+ static String NAMESPACE_ECDSAKEYVALUE_ = "http://www.w3.org/2001/04/xmldsig-more#";
+
+ /* Schema instance NS
+ */
+ static String NAMESPACE_XSI_ = "http://www.w3.org/2001/XMLSchema-instance";
+
+ /* ecdsa prefix value
+ */
+ static String NS_PREFIX_ECDSAKEYVALUE_ = "ecdsa";
+
+ /* namespace namespace
+ */
+ static String NAMESPACE_NAMESPACES_ = "http://www.w3.org/XML/1998/namespace";
+
+ /* si prefix value
+ */
+ static String NS_PREFIX_XSI_ = "si";
+};
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ECDSAKeyValueConverter.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ECDSAKeyValueConverter.java
new file mode 100644
index 000000000..d1beaab98
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ECDSAKeyValueConverter.java
@@ -0,0 +1,587 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.util;
+
+import iaik.security.ecc.ecdsa.ECDSAParameter;
+import iaik.security.ecc.ecdsa.ECPublicKey;
+import iaik.security.ecc.math.ecgroup.AffineCoordinate;
+import iaik.security.ecc.math.ecgroup.Coordinate;
+import iaik.security.ecc.math.ecgroup.CoordinateTypes;
+import iaik.security.ecc.math.ecgroup.ECGroupFactory;
+import iaik.security.ecc.math.ecgroup.ECPoint;
+import iaik.security.ecc.math.ecgroup.EllipticCurve;
+import iaik.security.ecc.math.field.Field;
+import iaik.security.ecc.math.field.FieldElement;
+import iaik.security.ecc.math.field.PrimeField;
+import iaik.security.ecc.parameter.ECCParameterFactory;
+import iaik.security.ecc.spec.ECCParameterSpec;
+
+import java.math.BigInteger;
+import java.security.PublicKey;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Vector;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+public class ECDSAKeyValueConverter
+{
+
+
+ //TODO enhance javadoc
+
+ /**
+ * converter class which can be used to convert ECDSA keys encoded in XML
+ * to a PublicKey data structure
+ * @param keyValueElem ECDSAKeyValue Element
+ * @return ECPublicKey encoded in PublicKey data structure
+ * @throws Exception
+ */
+ public static PublicKey element2ECDSAPublicKey(Element keyValueElem) throws Exception
+ {
+ String ecdsaNS = ECDSAConstants.NAMESPACE_ECDSAKEYVALUE_;
+
+ // Domain parameters
+ Element domainParams = getChildElement(keyValueElem, ecdsaNS, "DomainParameters", 1);
+ if (domainParams == null) throw new Exception("Domain parameters must not be implicit.");
+
+ Element namedCurve = getChildElement(domainParams, ecdsaNS, "NamedCurve", 1);
+ ECCParameterSpec eccParameterSpec;
+
+ if (namedCurve != null)
+ {
+ // URL curveNameURN = new URL(namedCurve.getAttributeNS(null, "URN"));
+ String curveNameOID = namedCurve.getAttributeNS(null, "URN").substring(8);
+ ECCParameterFactory eccParamFactory = ECCParameterFactory.getInstance();
+ // eccParameterSpec = eccParamFactory.getParameterByOID(curveNameURN.getPath().substring(4));
+ eccParameterSpec = eccParamFactory.getParameterByOID(curveNameOID);
+ }
+ else
+ {
+ Element excplicitParams = getChildElement(domainParams, ecdsaNS, "ExplicitParams", 1);
+ Element fieldParams = getChildElement(excplicitParams, ecdsaNS, "FieldParams", 1);
+ Element curveParams = getChildElement(excplicitParams, ecdsaNS, "CurveParams", 1);
+ Element basePointParams = getChildElement(excplicitParams, ecdsaNS, "BasePointParams", 1);
+
+ // Field parameters
+ String fieldParamsTypeStr = fieldParams.getAttributeNS(ECDSAConstants.NAMESPACE_XSI_, "type");
+ String ecdsaNSPrefix = getECDSANSPrefix(fieldParams);
+ BigInteger p = null;
+ int fieldParamsType = 0;
+ final int FIELD_TYPE_PRIME = 1;
+ final int FIELD_TYPE_TNB = 2;
+ final int FIELD_TYPE_PNB = 3;
+ int m = -1, k = -1, k1 = -1, k2 = -1, k3 = -1;
+ if (fieldParamsTypeStr.equals(ecdsaNSPrefix + ":PrimeFieldParamsType"))
+ {
+ fieldParamsType = FIELD_TYPE_PRIME;
+ String pStr = getChildElementText(fieldParams, ecdsaNS, "P", 1);
+ p = new BigInteger(pStr, 10);
+ }
+ else if (fieldParamsTypeStr.equals(ecdsaNSPrefix + ":TnBFieldParamsType"))
+ {
+ fieldParamsType = FIELD_TYPE_TNB;
+ String mStr = getChildElementText(fieldParams, ecdsaNS, "M", 1);
+ m = Integer.parseInt(mStr);
+ String kStr = getChildElementText(fieldParams, ecdsaNS, "K", 1);
+ k = Integer.parseInt(kStr);
+ }
+ else if (fieldParamsTypeStr.equals(ecdsaNSPrefix + ":PnBFieldParamsType"))
+ {
+ fieldParamsType = FIELD_TYPE_PNB;
+ String mStr = getChildElementText(fieldParams, ecdsaNS, "M", 1);
+ m = Integer.parseInt(mStr);
+ String k1Str = getChildElementText(fieldParams, ecdsaNS, "K1", 1);
+ k1 = Integer.parseInt(k1Str);
+ String k2Str = getChildElementText(fieldParams, ecdsaNS, "K2", 1);
+ k2 = Integer.parseInt(k2Str);
+ String k3Str = getChildElementText(fieldParams, ecdsaNS, "K3", 1);
+ k3 = Integer.parseInt(k3Str);
+ }
+ else throw new Exception("Unknown field parameters.");
+
+ // Curve parameters
+ Element aElem = getChildElement(curveParams, ecdsaNS, "A", 1);
+ String aStr = aElem.getAttributeNS(null, "Value");
+ Element bElem = getChildElement(curveParams, ecdsaNS, "B", 1);
+ String bStr = bElem.getAttributeNS(null, "Value");
+ String seedStr = getChildElementText(curveParams, ecdsaNS, "Seed", 1);
+ BigInteger seed = (seedStr != null) ? new BigInteger(seedStr, 10) : null;
+
+ // Base point parameters
+ Element basePoint = getChildElement(basePointParams, ecdsaNS, "BasePoint", 1);
+ Element basePointXElem = getChildElement(basePoint, ecdsaNS, "X", 1);
+ String basePointXStr = basePointXElem.getAttributeNS(null, "Value");
+ Element basePointYElem = getChildElement(basePoint, ecdsaNS, "Y", 1);
+ String basePointYStr = basePointYElem.getAttributeNS(null, "Value");
+ String orderStr = getChildElementText(basePointParams, ecdsaNS, "Order", 1);
+ BigInteger order = new BigInteger(orderStr, 10);
+ String cofactorStr = getChildElementText(basePointParams, ecdsaNS, "Cofactor", 1);
+ BigInteger cofactor = (cofactorStr != null) ? new BigInteger(cofactorStr, 10) : null;
+
+ if (fieldParamsType == FIELD_TYPE_PRIME)
+ {
+ BigInteger a = new BigInteger(aStr, 10);
+ BigInteger b = new BigInteger(bStr, 10);
+ BigInteger basePointX = new BigInteger(basePointXStr, 10);
+ BigInteger basePointY = new BigInteger(basePointYStr, 10);
+ eccParameterSpec = new ECCParameterSpec(p, cofactor, order, seed, null, a, b, basePointX,
+ basePointY, null);
+ }
+ else
+ {
+ int[] irreducible = new int[m/32 + ((m % 32 != 0) ? 1 : 0)];
+ if (fieldParamsType == FIELD_TYPE_TNB)
+ {
+ irreducible[m/32] = 1 << m % 32;
+ irreducible[k/32] += 1 << k % 32;
+ irreducible[0] += 1;
+ }
+ else
+ {
+ irreducible[m/32] = 1 << m % 32;
+ irreducible[k3/32] += 1 << k3 % 32;
+ irreducible[k2/32] += 1 << k2 % 32;
+ irreducible[k1/32] += 1 << k1 % 32;
+ irreducible[0] += 1;
+ }
+ eccParameterSpec = new ECCParameterSpec(irreducible, cofactor, order, octetString2IntArray(aStr),
+ octetString2IntArray(bStr), octetString2IntArray(basePointXStr),
+ octetString2IntArray(basePointYStr), null);
+ }
+ }
+
+ // Public key
+ Element publicKeyElem = getChildElement(keyValueElem, ecdsaNS, "PublicKey", 1);
+ Element publicKeyXElem = getChildElement(publicKeyElem, ecdsaNS, "X", 1);
+ String publicKeyXStr = publicKeyXElem.getAttributeNS(null, "Value");
+ Element publicKeyYElem = getChildElement(publicKeyElem, ecdsaNS, "Y", 1);
+ String publicKeyYStr = publicKeyYElem.getAttributeNS(null, "Value");
+
+ ECDSAParameter ecdsaParams = new ECDSAParameter(eccParameterSpec, CoordinateTypes.PROJECTIVE_COORDINATES);
+ ECGroupFactory ecGroupFactory = ECGroupFactory.getInstance();
+ EllipticCurve eCurve = ecGroupFactory.getCurve(eccParameterSpec.getA(),
+ eccParameterSpec.getB(), eccParameterSpec.getR(), CoordinateTypes.PROJECTIVE_COORDINATES);
+ Field field = eCurve.getField();
+
+ // Detect type of public key field elements
+ String elementType = publicKeyXElem.getAttributeNS(ECDSAConstants.NAMESPACE_XSI_, "type");
+ String elementTypeLocalName = elementType.substring(elementType.indexOf(':') + 1);
+ int FIELD_TYPE_PRIME = 1, FIELD_TYPE_CHAR_TWO = 2;
+ int fieldElemType = ("PrimeFieldElemType".equals(elementTypeLocalName))
+ ? FIELD_TYPE_PRIME
+ : FIELD_TYPE_CHAR_TWO;
+
+ FieldElement publicKeyPointX, publicKeyPointY;
+ if (fieldElemType == FIELD_TYPE_PRIME)
+ {
+
+// Value xValue = FieldFactory.getInstance().getPrimeFieldValue(new BigInteger(publicKeyXStr, 10));
+// publicKeyPointX = field.newElement(xValue);
+ PrimeField pf = (PrimeField) field;
+ publicKeyPointX = pf.newElement(new BigInteger(publicKeyXStr, 10));
+// Value yValue = FieldFactory.getInstance().getPrimeFieldValue(new BigInteger(publicKeyYStr, 10));
+// publicKeyPointY = field.newElement(yValue);
+ publicKeyPointY = pf.newElement(new BigInteger(publicKeyYStr, 10));
+ }
+ else
+ {
+ publicKeyPointX = field.newElement(octetString2ByteArray(publicKeyXStr));
+ publicKeyPointY = field.newElement(octetString2ByteArray(publicKeyYStr));
+ }
+// ProjectiveCoordinate publicKeyPointCoordinate = new ProjectiveCoordinate(publicKeyPointX,
+// publicKeyPointY, field.getONEelement());
+ Coordinate publicKeyPointCoordinate = new AffineCoordinate(publicKeyPointX,
+ publicKeyPointY).toProjective();
+ ECPoint publicKeyPoint = eCurve.newPoint(publicKeyPointCoordinate);
+ ECPublicKey publicKey = new ECPublicKey(ecdsaParams, publicKeyPoint);
+
+ return publicKey;
+ }
+
+ /* ---------------------------------------------------------------------------------------------------- */
+
+ /*
+ public static Element publicKey2ECDSAKeyValueElement(boolean implParams, String curveOID,
+ ECDSAPublicKey publicKey, Document factoryDoc)
+ {
+ String ecdsaNS = ECDSAConstants.NAMESPACE_ECDSAKEYVALUE_;
+ String ecdsaNSP = ECDSAConstants.NS_PREFIX_ECDSAKEYVALUE_;
+ String nsNS = ECDSAConstants.NAMESPACE_NAMESPACES_;
+ String xsiNS = ECDSAConstants.NAMESPACE_XSI_;
+ String xsiNSP = ECDSAConstants.NS_PREFIX_XSI_;
+
+ ECDSAParameter params = (ECDSAParameter)publicKey.getParameter();
+ EllipticCurve curve = params.getG().getCurve();
+ Field field = curve.getField();
+ int fieldId = curve.getField().getFieldId();
+
+ Element eCDSAKeyValue = factoryDoc.createElementNS(ecdsaNS, ecdsaNSP + ":ECDSAKeyValue");
+ eCDSAKeyValue.setAttributeNS(nsNS, "xmlns:" + ecdsaNSP, ecdsaNS);
+ eCDSAKeyValue.setAttributeNS(nsNS, "xmlns:" + xsiNSP, xsiNS);
+
+ // Detect field type
+ int coeffPositions[] = new int[3];
+ int fieldType = 0;
+ String fieldElemTypeString = null;
+ final int FT_PRIME = 1, FT_TNB = 2, FT_PNB = 3;
+ if (fieldId == Field.PRIME_FIELD)
+ {
+ fieldType = FT_PRIME;
+ fieldElemTypeString = ecdsaNSP + ":PrimeFieldElemType";
+ }
+ else
+ {
+ // Get irreducible polynomal
+ BinaryField binaryField = (BinaryField)field;
+ BinaryFieldValue irreducible = binaryField.getIrreducible();
+
+ // Get coefficients of irreducible polynomal
+ int order = irreducible.getOrder();
+ int coeffCount = 2;
+ for (int i = 1; i < order - 1; i++)
+ {
+ if (irreducible.testBit(i))
+ {
+ coeffPositions[coeffCount - 2] = i;
+ coeffCount++;
+ if (coeffCount == 5) break;
+ }
+ }
+
+ // Set polynomal type (TNB or
+ fieldType = (coeffCount == 3) ? FT_TNB : FT_PNB;
+ fieldElemTypeString = ecdsaNSP + ":CharTwoFieldElemType";
+ }
+
+ if (!implParams)
+ {
+ Element domainParameters = factoryDoc.createElementNS(ecdsaNS, ecdsaNSP + ":DomainParameters");
+ eCDSAKeyValue.appendChild(factoryDoc.createTextNode("\n "));
+ eCDSAKeyValue.appendChild(domainParameters);
+
+ if (curveOID != null)
+ {
+ // Named curve
+ Element namedCurve = factoryDoc.createElementNS(ecdsaNS, ecdsaNSP + ":NamedCurve");
+ namedCurve.setAttributeNS(null, "URN", "urn:oid:" + curveOID);
+ domainParameters.appendChild(factoryDoc.createTextNode("\n "));
+ domainParameters.appendChild(namedCurve);
+ domainParameters.appendChild(factoryDoc.createTextNode("\n "));
+ }
+ else
+ {
+ // Explicit parameters
+ Element explicitParams = factoryDoc.createElementNS(ecdsaNS, ecdsaNSP + ":ExplicitParams");
+
+ // Field parameters
+ Element fieldParams = factoryDoc.createElementNS(ecdsaNS, ecdsaNSP + ":FieldParams");
+ explicitParams.appendChild(factoryDoc.createTextNode("\n "));
+ explicitParams.appendChild(fieldParams);
+
+ if (fieldType == FT_PRIME)
+ {
+ fieldParams.setAttributeNS(xsiNS, xsiNSP + ":type", ecdsaNSP + ":PrimeFieldParamsType");
+ Element p = factoryDoc.createElementNS(ecdsaNS, ecdsaNSP + ":P");
+ p.appendChild(factoryDoc.createTextNode(curve.getField().getSize().toString(10)));
+ fieldParams.appendChild(factoryDoc.createTextNode("\n "));
+ fieldParams.appendChild(p);
+ fieldParams.appendChild(factoryDoc.createTextNode("\n "));
+ }
+ else if (fieldType == FT_TNB)
+ {
+ fieldParams.setAttributeNS(xsiNS, xsiNSP + ":type", ecdsaNSP + ":TnBFieldParamsType");
+ Element m = factoryDoc.createElementNS(ecdsaNS, ecdsaNSP + ":M");
+ m.appendChild(factoryDoc.createTextNode(Integer.toString(curve.getField().getOrder())));
+ fieldParams.appendChild(factoryDoc.createTextNode("\n "));
+ fieldParams.appendChild(m);
+
+ Element k = factoryDoc.createElementNS(ecdsaNS, ecdsaNSP + ":K");
+ k.appendChild(factoryDoc.createTextNode(Integer.toString(coeffPositions[0], 10)));
+ fieldParams.appendChild(factoryDoc.createTextNode("\n "));
+ fieldParams.appendChild(k);
+ fieldParams.appendChild(factoryDoc.createTextNode("\n "));
+ }
+ else
+ {
+ fieldParams.setAttributeNS(xsiNS, xsiNSP + ":type", ecdsaNSP + ":PnBFieldParamsType");
+ Element m = factoryDoc.createElementNS(ecdsaNS, ecdsaNSP + ":M");
+ m.appendChild(factoryDoc.createTextNode(Integer.toString(curve.getField().getOrder())));
+ fieldParams.appendChild(factoryDoc.createTextNode("\n "));
+ fieldParams.appendChild(m);
+
+ Element k1 = factoryDoc.createElementNS(ecdsaNS, ecdsaNSP + ":K1");
+ k1.appendChild(factoryDoc.createTextNode(Integer.toString(coeffPositions[0])));
+ fieldParams.appendChild(factoryDoc.createTextNode("\n "));
+ fieldParams.appendChild(k1);
+
+ Element k2 = factoryDoc.createElementNS(ecdsaNS, ecdsaNSP + ":K2");
+ k2.appendChild(factoryDoc.createTextNode(Integer.toString(coeffPositions[1])));
+ fieldParams.appendChild(factoryDoc.createTextNode("\n "));
+ fieldParams.appendChild(k2);
+
+ Element k3 = factoryDoc.createElementNS(ecdsaNS, ecdsaNSP + ":K3");
+ k3.appendChild(factoryDoc.createTextNode(Integer.toString(coeffPositions[2])));
+ fieldParams.appendChild(factoryDoc.createTextNode("\n "));
+ fieldParams.appendChild(k3);
+ fieldParams.appendChild(factoryDoc.createTextNode("\n "));
+ }
+
+ // Curve parameters
+ Element curveParams = factoryDoc.createElementNS(ecdsaNS, ecdsaNSP + ":CurveParams");
+ explicitParams.appendChild(factoryDoc.createTextNode("\n "));
+ explicitParams.appendChild(curveParams);
+
+ Element a = factoryDoc.createElementNS(ecdsaNS, ecdsaNSP + ":A");
+ a.setAttributeNS(xsiNS, xsiNSP + ":type", fieldElemTypeString);
+ a.setAttributeNS(null, "Value",
+ (fieldId == Field.PRIME_FIELD)
+ ? curve.getA().getValue().toBigInt().toString(10)
+ : evenStringLength(curve.getA().getValue().toBigInt().toString(16)));
+ curveParams.appendChild(factoryDoc.createTextNode("\n "));
+ curveParams.appendChild(a);
+
+ Element b = factoryDoc.createElementNS(ecdsaNS, ecdsaNSP + ":B");
+ b.setAttributeNS(xsiNS, xsiNSP + ":type", fieldElemTypeString);
+ b.setAttributeNS(null, "Value",
+ (fieldId == Field.PRIME_FIELD)
+ ? curve.getB().getValue().toBigInt().toString(10)
+ : evenStringLength(curve.getB().getValue().toBigInt().toString(16)));
+ curveParams.appendChild(factoryDoc.createTextNode("\n "));
+ curveParams.appendChild(b);
+
+ if (params.getS() != null)
+ {
+ Element seed = factoryDoc.createElementNS(ecdsaNS, ecdsaNSP + ":Seed");
+ seed.appendChild(factoryDoc.createTextNode(evenStringLength(params.getS().toString(16))));
+ curveParams.appendChild(factoryDoc.createTextNode("\n "));
+ curveParams.appendChild(seed);
+ }
+
+ curveParams.appendChild(factoryDoc.createTextNode("\n "));
+
+ // Base point params
+ Element basePointParams = factoryDoc.createElementNS(ecdsaNS, ecdsaNSP + ":BasePointParams");
+ explicitParams.appendChild(factoryDoc.createTextNode("\n "));
+ explicitParams.appendChild(basePointParams);
+
+ Element basePoint = factoryDoc.createElementNS(ecdsaNS, ecdsaNSP + ":BasePoint");
+ basePointParams.appendChild(factoryDoc.createTextNode("\n "));
+ basePointParams.appendChild(basePoint);
+
+ Element x = factoryDoc.createElementNS(ecdsaNS, ecdsaNSP + ":X");
+ x.setAttributeNS(xsiNS, xsiNSP + ":type", fieldElemTypeString);
+ x.setAttributeNS(null, "Value",
+ (fieldId == Field.PRIME_FIELD)
+ ? params.getG().getCoordinates().getX().getValue().toBigInt().toString(10)
+ : evenStringLength(params.getG().getCoordinates().getX().getValue().toBigInt().toString(16)));
+ basePoint.appendChild(factoryDoc.createTextNode("\n "));
+ basePoint.appendChild(x);
+
+ Element y = factoryDoc.createElementNS(ecdsaNS, ecdsaNSP + ":Y");
+ y.setAttributeNS(xsiNS, xsiNSP + ":type", fieldElemTypeString);
+ y.setAttributeNS(null, "Value",
+ (fieldId == Field.PRIME_FIELD)
+ ? params.getG().getCoordinates().getY().getValue().toBigInt().toString(10)
+ : evenStringLength(params.getG().getCoordinates().getY().getValue().toBigInt().toString(16)));
+ basePoint.appendChild(factoryDoc.createTextNode("\n "));
+ basePoint.appendChild(y);
+ basePoint.appendChild(factoryDoc.createTextNode("\n "));
+
+ Element order = factoryDoc.createElementNS(ecdsaNS, ecdsaNSP + ":Order");
+ order.appendChild(factoryDoc.createTextNode(params.getR().toString(10)));
+ basePointParams.appendChild(factoryDoc.createTextNode("\n "));
+ basePointParams.appendChild(order);
+
+ if (params.getK() != null)
+ {
+ Element cofactor = factoryDoc.createElementNS(ecdsaNS, ecdsaNSP + ":Cofactor");
+ cofactor.appendChild(factoryDoc.createTextNode(params.getK().toString(10)));
+ basePointParams.appendChild(factoryDoc.createTextNode("\n "));
+ basePointParams.appendChild(cofactor);
+ }
+
+ basePointParams.appendChild(factoryDoc.createTextNode("\n "));
+ explicitParams.appendChild(factoryDoc.createTextNode("\n "));
+
+ domainParameters.appendChild(factoryDoc.createTextNode("\n "));
+ domainParameters.appendChild(explicitParams);
+ domainParameters.appendChild(factoryDoc.createTextNode("\n "));
+ }
+ }
+
+ // Public key point
+ Element publicKeyPoint = factoryDoc.createElementNS(ecdsaNS, ecdsaNSP + ":PublicKey");
+
+ Element publicKeyX = factoryDoc.createElementNS(ecdsaNS, ecdsaNSP + ":X");
+ publicKeyX.setAttributeNS(xsiNS, xsiNSP + ":type", fieldElemTypeString);
+ publicKeyX.setAttributeNS(null, "Value",
+ (fieldId == Field.PRIME_FIELD)
+ ? publicKey.getW().getCoordinates().getX().getValue().toBigInt().toString(10)
+ : evenStringLength(publicKey.getW().getCoordinates().getX().getValue().toBigInt().toString(16)));
+ publicKeyPoint.appendChild(factoryDoc.createTextNode("\n "));
+ publicKeyPoint.appendChild(publicKeyX);
+
+ Element publicKeyY = factoryDoc.createElementNS(ecdsaNS, ecdsaNSP + ":Y");
+ publicKeyY.setAttributeNS(xsiNS, xsiNSP + ":type", fieldElemTypeString);
+ publicKeyY.setAttributeNS(null, "Value",
+ (fieldId == Field.PRIME_FIELD)
+ ? publicKey.getW().getCoordinates().getY().getValue().toBigInt().toString(10)
+ : evenStringLength(publicKey.getW().getCoordinates().getY().getValue().toBigInt().toString(16)));
+ publicKeyPoint.appendChild(factoryDoc.createTextNode("\n "));
+ publicKeyPoint.appendChild(publicKeyY);
+ publicKeyPoint.appendChild(factoryDoc.createTextNode("\n "));
+
+ eCDSAKeyValue.appendChild(factoryDoc.createTextNode("\n "));
+ eCDSAKeyValue.appendChild(publicKeyPoint);
+ eCDSAKeyValue.appendChild(factoryDoc.createTextNode("\n "));
+
+ return eCDSAKeyValue;
+ }
+ */
+ /* ---------------------------------------------------------------------------------------------------- */
+
+ private static String getECDSANSPrefix(Element element)
+ {
+ // FIXXME: Review this function (GK, 11.06.2002) - should return a list of strings, since more than
+ // one NS prefix can be bound to the ECDSA namespace
+
+ HashMap inScopeNSAttrs = getInScopeNSAttrs(element);
+ Iterator inScopeNSAttrsIt = inScopeNSAttrs.keySet().iterator();
+ while (inScopeNSAttrsIt.hasNext())
+ {
+ Attr currentAttr = (Attr)inScopeNSAttrs.get(inScopeNSAttrsIt.next());
+ if (ECDSAConstants.NAMESPACE_ECDSAKEYVALUE_.equals(currentAttr.getValue()))
+ {
+ return ("xmlns".equals(currentAttr.getNodeName())) ? "" : currentAttr.getNodeName().substring(6);
+ }
+ }
+ return null;
+ }
+
+ /* ---------------------------------------------------------------------------------------------------- */
+
+ // Converts an octet string representation into an int array as needed for the IAIK ECC library
+ // String: rightmost byte is least significant byte
+ // IntArray: rightmost byte is LEAST significant byte
+ private static int[] octetString2IntArray(String octetString)
+ {
+ int byteCount = octetString.length()/2;
+ int[] intArray = new int[byteCount/4 + ((byteCount % 4 != 0) ? 1 : 0)];
+ for (int i = 0; i < byteCount; i++)
+ {
+ int oSStartPos = octetString.length() - (i + 1) * 2;
+ int currentByte = Integer.parseInt(octetString.substring(oSStartPos, oSStartPos + 2), 16);
+ intArray[i/4] += (currentByte & 0xFF) << ((i % 4) * 8);
+ }
+ return intArray;
+ }
+
+ /* ---------------------------------------------------------------------------------------------------- */
+
+ // Converts an octet string representation into a byte array as needed for the IAIK ECC library
+ // String: rightmost byte is least significant byte
+ // ByteArray: rightmost byte is MOST significant byte
+ private static byte[] octetString2ByteArray(String octetString)
+ {
+ int byteCount = octetString.length()/2;
+ byte[] byteArray = new byte[byteCount];
+ for (int i = 0; i < byteCount; i++)
+ {
+ int oSStartPos = octetString.length() - (i + 1) * 2;
+ byteArray[byteCount - i - 1] = (byte) Integer.parseInt(octetString.substring(
+ oSStartPos, oSStartPos + 2), 16);
+ }
+ return byteArray;
+ }
+
+ /* ---------------------------------------------------------------------------------------------------- */
+
+ private static String evenStringLength(String hexString)
+ {
+ return (hexString.length() % 2 != 0) ? "0" + hexString : hexString;
+ }
+
+ /* ---------------------------------------------------------------------------------------------------- */
+
+ private static Element getChildElement(Element parent, String namespace, String localName,
+ int instance)
+ {
+ NodeList namedElements = parent.getElementsByTagNameNS(namespace, localName);
+ if (namedElements.getLength() < instance) return null;
+ return (Element)namedElements.item(instance - 1);
+ }
+
+ /* ---------------------------------------------------------------------------------------------------- */
+
+ private static String getChildElementText(Element parent, String namespace, String localName,
+ int instance)
+ {
+ Element child = getChildElement(parent, namespace, localName, instance);
+ if (child == null) return null;
+ NodeList childNodes = child.getChildNodes();
+ int nodeCount = 0;
+ while (nodeCount < childNodes.getLength())
+ {
+ Node currentNode = childNodes.item(nodeCount);
+ if (currentNode.getNodeType() == Node.TEXT_NODE) return currentNode.getNodeValue();
+ nodeCount++;
+ }
+ return null;
+ }
+
+ /* ---------------------------------------------------------------------------------------------------- */
+
+ public static HashMap getInScopeNSAttrs(Element element)
+ {
+ // Get all ancestors of element
+ Vector ancestors = new Vector();
+ ancestors.add(element);
+ Node currentAncestor = element;
+ while ((currentAncestor = currentAncestor.getParentNode()) != null &&
+ currentAncestor.getNodeType() == Node.ELEMENT_NODE)
+ {
+ ancestors.add(currentAncestor);
+ }
+
+ // Scan all ancestors for NS attributes
+ HashMap inScopeNSAttrs = new HashMap();
+ for (int i = ancestors.size() - 1; i >= 0; i--)
+ {
+ Element currentAncestorElem = (Element)ancestors.get(i);
+ NamedNodeMap attrs = currentAncestorElem.getAttributes();
+ for (int j = 0; j < attrs.getLength(); j++)
+ {
+ Attr currentAttr = (Attr)attrs.item(j);
+ String currentAttrName = currentAttr.getNodeName();
+ if ("xmlns".equals(currentAttrName) || currentAttrName.startsWith("xmlns:"))
+ {
+ inScopeNSAttrs.put(currentAttrName, currentAttr);
+ }
+ }
+ }
+
+ // Check if default NS attribute is in list; if value is empty remove it from list
+ Attr defaultNSAttr = (Attr)inScopeNSAttrs.get("xmlns");
+ if (defaultNSAttr != null && "".equals(defaultNSAttr.getValue())) inScopeNSAttrs.remove("xmlns");
+
+ return inScopeNSAttrs;
+ }
+} \ No newline at end of file
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/HTTPRequestJSPForwarder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/HTTPRequestJSPForwarder.java
new file mode 100644
index 000000000..076df34ef
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/HTTPRequestJSPForwarder.java
@@ -0,0 +1,91 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+/*
+ * Created on 17.02.2004
+ *
+ * To change the template for this generated file go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+package at.gv.egovernment.moa.id.util;
+
+import java.io.IOException;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import at.gv.egovernment.moa.logging.Logger;
+
+/**
+ * @author rschamberger
+ *
+ * To change the template for this generated type comment go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+public class HTTPRequestJSPForwarder {
+
+ /**
+ * Forwards the HttpServletRequest to a customizable JSP Page and serves the Response. <br>
+ * <ul>
+ * <li>Logs the message</li>
+ * </ul>
+ *
+ * @param message message text
+ * @param jspPageURI URI of the JSP page
+ * @param context the servlet context of the servlet belonging to the req, resp
+ * @param req servlet request
+ * @param resp servlet response
+ */
+ public static void forwardNamed(
+ String message,
+ String jspPageURI,
+ ServletContext context,
+ HttpServletRequest req,
+ HttpServletResponse resp) {
+
+ if (null != message) {
+ Logger.info(message);
+ req.setAttribute("Message", message);
+ }
+
+ //forward this to the given jsp page where the HTML response is generated
+ try {
+ context.getRequestDispatcher(jspPageURI).forward(req, resp);
+ } catch (IOException e) {
+ Logger.error(e);
+ } catch (ServletException e) {
+ Logger.error(e);
+ }
+ }
+
+ /**
+ * Forwards the HttpServletRequest to the customizable JSP Page 'message.jsp' and serves the Response. <br>
+ * <ul>
+ * <li>Logs the message</li>
+ * </ul>
+ *
+ * @param message message text
+ * @param context the servlet context of the servlet belonging to the req, resp
+ * @param req servlet request
+ * @param resp servlet response
+ */
+ public static void forwardDefault(
+ String message,
+ ServletContext context,
+ HttpServletRequest req,
+ HttpServletResponse resp) {
+ forwardNamed(message, "/message.jsp", context, req, resp);
+ }
+} \ No newline at end of file
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/HTTPUtils.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/HTTPUtils.java
new file mode 100644
index 000000000..0e9208362
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/HTTPUtils.java
@@ -0,0 +1,83 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.util;
+
+/**
+ * HTTP Utilities
+ *
+ * @author Rudolf Schamberger
+ * @version $Id$
+ */
+
+import java.io.BufferedInputStream;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import org.apache.regexp.RE;
+import org.apache.regexp.RESyntaxException;
+
+/**
+ *
+ * @author Rudolf Schamberger
+ *
+ */
+public class HTTPUtils {
+
+ /**
+ * Utility used to obtainin correct encoded HTTP content.
+ * Reads a given Content adressed by HTTP-URL into String.
+ * Content encoding is considered by using the Content-Type HTTP header charset value.
+ * @param URL HTTP URL to read from.
+ * @return String representation of content
+ * @throws IOException on data-reading problems
+ */
+ public static String readHttpURL(String URL)
+ throws IOException {
+
+ URL url = new URL(URL);
+ HttpURLConnection conn = (HttpURLConnection)url.openConnection();
+ conn.setRequestMethod("GET");
+ String contentType = conn.getContentType();
+ RE regExp = null;
+ try {
+ regExp = new RE("(;.*charset=)(\"*)(.*[^\"])");
+ } catch (RESyntaxException e) {
+ //RESyntaxException is not possible = expr. is costant
+ }
+ boolean charsetSupplied = regExp.match(contentType);
+ String encoding = "ISO-8859-1"; //default HTTP encoding
+ if (charsetSupplied) {
+ encoding = regExp.getParen(3);
+ }
+ InputStream instream = new BufferedInputStream(conn.getInputStream());
+ InputStreamReader isr = new InputStreamReader(instream, encoding);
+ Reader in = new BufferedReader(isr);
+ int ch;
+ StringBuffer buffer = new StringBuffer();
+ while ((ch = in.read()) > -1) {
+ buffer.append((char)ch);
+ }
+ in.close();
+ conn.disconnect();
+ return buffer.toString();
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/InOrderServletRequestWrapper.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/InOrderServletRequestWrapper.java
new file mode 100644
index 000000000..958ae646e
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/InOrderServletRequestWrapper.java
@@ -0,0 +1,403 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+/*
+ * Created on 01.10.2004
+ *
+ * @author rschamberger
+ * $ID$
+ */
+package at.gv.egovernment.moa.id.util;
+
+import java.io.IOException;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.StringTokenizer;
+import java.util.Vector;
+
+import javax.servlet.ServletInputStream;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequestWrapper;
+
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.URLDecoder;
+
+/**
+ * Special ServletRequestWrapper class which provides a more precise implementation of the getParameter*
+ * family. This implementation cares about the order of the parameters from Query String and HTTP POST
+ * Body. Use this as Filter class for Servlets which such needs.
+ *
+ * @author Rudolf Schamberger
+ * @version $Id$
+ */
+public class InOrderServletRequestWrapper extends HttpServletRequestWrapper {
+
+ /**
+ * standard encoding used to decode the URL string.
+ */
+ //
+ public static final String DEFAULT_CHARACTER_ENCODING = "ISO-8859-1";
+ /**
+ * Vector that stores the order of the query paramters
+ */
+ private Vector queryParamOrder;
+
+ /**
+ * Hashtable that stores the content of the query paramters
+ */
+ private Hashtable queryParameters;
+
+ /**
+ * Vector that stores the order of the HTTP body paramters
+ */
+ private Vector bodyParamOrder;
+
+ /**
+ * Hashtable that stores the content of the HTTP body paramters
+ */
+ private Hashtable bodyParameters;
+
+ /**
+ * ServletContext
+ */
+ private ServletContext context;
+
+ /**
+ * Identifier used to identify query parameters
+ */
+ public static final int QUERY_PARAM = 1;
+
+ /**
+ * Identifier used to identify HTTP body parameters
+ */
+ public static final int BODY_PARAM = 2;
+
+ /**
+ * @see HttpServletRequestWrapper
+ */
+ public InOrderServletRequestWrapper(final HttpServletRequest request, final ServletContext sContext) {
+ super(request);
+ this.context = sContext;
+ }
+
+ /**
+ * parses the Query and if availlable also HTTP POST parameters
+ *
+ * @param req a <code>HttpServletRequest</code> which should be parsed
+ */
+ protected final void parseParameters(final HttpServletRequest req)
+ {
+ queryParamOrder = new Vector();
+ queryParameters = new Hashtable();
+ bodyParamOrder = new Vector();
+ bodyParameters = new Hashtable();
+
+ //Insert code for Query string parsing
+ String rawQuery = req.getQueryString();
+ queryParameters = tokenize(queryParameters, queryParamOrder, rawQuery, DEFAULT_CHARACTER_ENCODING, true);
+
+ //analyze HTTP Post body parameters
+ if (req.getMethod().equalsIgnoreCase("POST"))
+ {
+ //get body encoding
+ String enc = req.getCharacterEncoding();
+ if (enc == null) enc = DEFAULT_CHARACTER_ENCODING;
+
+ if (req.getContentType().equals("application/x-www-form-urlencoded"))
+ {
+
+ try
+ {
+ bodyParameters = parsePostData(bodyParameters, req.getContentLength(), req.getInputStream(), enc);
+ }
+ catch (IOException e)
+ {
+ context.log("could not open input stream of reqest \n" + e.toString());
+ }
+ }
+ else
+ {
+ //TODO add multipart code
+ context.log(
+ "ERROR other Content-Types than 'application/x-www-form-urlencoded' not supported!");
+ }
+
+ }// end POST
+ }
+
+ /**
+ * parses the HTTP POST parameters
+ *
+ * @param ht parameter Hashtable to put parameters in.
+ * @param length of content
+ * @param instream the ServletInputStream of the request
+ * @param encoding encoding of the instream
+ *
+ * @return the Hashtable with the parsed data
+ */
+ private Hashtable parsePostData(Hashtable ht, final int length, final ServletInputStream instream,
+ final String encoding)
+ {
+ int inputLen, offset;
+ byte[] postedBytes = null;
+ boolean dataRemaining = true;
+ String postedBody;
+
+ StringBuffer sb = new StringBuffer();
+
+ if (length <= 0)
+ {
+ return null;
+ }
+
+ postedBytes = new byte[length];
+ try
+ {
+ offset = 0;
+ while (dataRemaining)
+ {
+ inputLen = instream.read(postedBytes, offset, length - offset);
+ if (inputLen <= 0)
+ {
+ throw new IOException("read error during reading the HTTP POST body");
+ }
+ offset += inputLen;
+ if ((length - offset) == 0)
+ {
+ dataRemaining = false;
+ }
+ }
+ }
+ catch (IOException e)
+ {
+ System.out.println("Exception =" + e);
+ return null;
+ }
+
+ postedBody = new String(postedBytes);
+ Hashtable ht2 = tokenize(ht, bodyParamOrder, postedBody, encoding, false);
+ return ht2;
+ }
+
+
+ /**
+ * tokenizes parameter strings
+ *
+ * @param ht parameter Hashtable to put parameters in.
+ * @param order Vector in which the order of the tokenized parameters will be stored.
+ * @param parameterString String to tokenize.
+ * @param encoding which will be used to decode the parameterString.
+ *
+ * @return the Hashtable with the parsed data
+ */
+ private Hashtable tokenize(Hashtable ht, Vector order, final String parameterString, final String encoding, boolean decode)
+ {
+ String[] valArray = null;
+
+ if (null == parameterString) return ht;
+
+ StringTokenizer st = new StringTokenizer(parameterString, "&");
+
+ String key = null;
+ String val = null;
+
+ while (st.hasMoreTokens())
+ {
+ String pair = (String) st.nextToken();
+ int pos = pair.indexOf('=');
+// if (pos == -1)
+// {
+// throw new IllegalArgumentException();
+// }
+ try
+ {
+ if (decode) {
+ if (pos == -1) { // query is not a key=value pair, it is just a key
+ key = URLDecoder.decode(pair, encoding);
+ val = ""; // value is empty string
+ }
+ else {
+ key = URLDecoder.decode(pair.substring(0, pos), encoding);
+ val = URLDecoder.decode(pair.substring(pos + 1, pair.length()), encoding);
+ }
+ } else {
+ if (pos == -1) { // query is not a key=value pair, it is just a key
+ key = pair;
+ val = ""; // value is empty string
+ }
+ else {
+ key = pair.substring(0, pos);
+ val = pair.substring(pos + 1, pair.length());
+ }
+ }
+ //Logger.debug("(" + Integer.toString(key.length()) + "=" + Integer.toString(pair.substring(0, pos).length()) + ")"+key+"|--|"+pair.substring(0, pos));
+ //Logger.debug("(" + Integer.toString(val.length()) + "=" + Integer.toString(pair.substring(pos + 1, pair.length()).length()) + ")"+val+"|--|"+pair.substring(pos + 1, pair.length()));
+ }
+ catch (Exception e)
+ {
+ Logger.error("Error encoding query", e);
+ throw new IllegalArgumentException();
+ }
+ if (ht.containsKey(key))
+ {
+ String oldVals[] = (String[]) ht.get(key);
+ valArray = new String[oldVals.length + 1];
+ for (int i = 0; i < oldVals.length; i++)
+ {
+ valArray[i] = oldVals[i];
+ }
+ valArray[oldVals.length] = val;
+ }
+ else
+ {
+ valArray = new String[1];
+ valArray[0] = val;
+ }
+ ht.put(key, valArray);
+ order.addElement(key);
+ }
+ return ht;
+
+ }
+
+ /**
+ * Returns the value of a request parameter as a <code>String</code>, or <code>null</code> if the
+ * parameter does not exist. Request parameters are extra information sent with the request. For HTTP
+ * servlets, parameters are contained in the query string or posted form data.
+ *
+ * <p>
+ * You should only use this method when you are sure the parameter has only one value. If the parameter
+ * might have more than one value, use {@link #getParameterValues(String, int)}.
+ *
+ * <p>
+ * If you use this method with a multivalued parameter, the value returned is equal to the first value in
+ * the array returned by <code>getParameterValues</code>.
+ *
+ * <p>
+ * If the parameter data was sent in the request body, such as occurs with an HTTP POST request, then
+ * reading the body directly via {@link #getInputStream} or {@link #getReader}can interfere with the
+ * execution of this method.
+ *
+ * @param name a <code>String</code> containing the name of the parameter whose value is requested
+ *
+ * @return a <code>String</code> representing the single value of the parameter
+ *
+ * @see #getParameterValues(String, int)
+ *
+ */
+ public final String getParameter(final String name) {
+ String val = getParameter(name, QUERY_PARAM);
+ return (null != val) ? val : getParameter(name, BODY_PARAM);
+ }
+
+ /**
+ * Returns the value of a request parameter as a <code>String</code>, or <code>null</code> if the
+ * parameter does not exist.
+ *
+ * @param name a <code>String</code> containing the name of the parameter whose value is requested
+ * @param parameterType type of parameter
+ * @see at.gv.egovernment.moa.id.util.InOrderServletRequestWrapper#QUERY_PARAM
+ * and @see at.gv.egovernment.moa.id.util.InOrderServletRequestWrapper#BODY_PARAM
+ * @see #getParameterValues(String)
+ * @return value of the (single) parameter or null if not availlable
+ **/
+ public final String getParameter(final String name, final int parameterType)
+ {
+
+ Hashtable parameters = (parameterType == QUERY_PARAM) ? queryParameters : bodyParameters;
+ String[] vals = (String[]) parameters.get(name);
+ if (vals == null)
+ {
+ return null;
+ }
+ return vals[0];
+ }
+
+
+ /**
+ * Returns an array of <code>String</code> objects containing all of the values the given request
+ * parameter has, or <code>null</code> if the parameter does not exist.
+ *
+ * <p>
+ * If the parameter has a single value, the array has a length of 1.
+ *
+ * @param name a <code>String</code> containing the name of the parameter whose value is requested
+ * @param parameterType type of parameter
+ * @see at.gv.egovernment.moa.id.util.InOrderServletRequestWrapper#QUERY_PARAM
+ * and @see at.gv.egovernment.moa.id.util.InOrderServletRequestWrapper#BODY_PARAM
+ * @return an array of <code>String</code> objects containing the parameter's values or null
+ *
+ * @see #getParameter
+ */
+ public final String getParameterValues(final String name, final int parameterType)
+ {
+ Hashtable parameters = (parameterType == QUERY_PARAM) ? queryParameters : bodyParameters;
+ String[] vals = (String[]) parameters.get(name);
+ if (vals == null)
+ {
+ return null;
+ }
+ String vallist = vals[0];
+ for (int i = 1; i < vals.length; i++)
+ {
+ vallist = vallist + "," + vals[i];
+ }
+ return vallist;
+ }
+
+ /**
+ *
+ * Returns an <code>Enumeration</code> of <code>String</code> objects containing the names of the
+ * parameters. If there are no parameters, the method returns an empty
+ * <code>Enumeration</code>.
+ *
+ * @return an <code>Enumeration</code> of <code>String</code> objects, each <code>String</code>
+ * containing the name of a request parameter; or an empty <code>Enumeration</code> if the
+ * request has no parameters
+ *
+ */
+ public final Enumeration getParameterNames()
+ {
+ Vector FullParamOrder = new Vector();
+ for (Enumeration enu = queryParamOrder.elements(); enu.hasMoreElements();) {
+ FullParamOrder.addElement(enu.nextElement());
+ }
+ for (Enumeration enu = bodyParamOrder.elements(); enu.hasMoreElements();) {
+ FullParamOrder.addElement(enu.nextElement());
+ }
+ return FullParamOrder.elements();
+ }
+
+ /**
+ *
+ * Returns an <code>Enumeration</code> of <code>String</code> objects containing the names of the
+ * parameters contained in this request. If the request has no parameters, the method returns an empty
+ * <code>Enumeration</code>.
+ * @param parameterType type of parameter
+ *
+ * @return an <code>Enumeration</code> of <code>String</code> objects, each <code>String</code>
+ * containing the name of a request parameter; or an empty <code>Enumeration</code> if the
+ * request has no parameters
+ *
+ */
+ public final Enumeration getParameterNames(final int parameterType)
+ {
+ if (QUERY_PARAM == parameterType)
+ return queryParamOrder.elements();
+ else
+ return bodyParamOrder.elements();
+ }
+} //End InOrderServletRequestWrapper \ No newline at end of file
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/MOAIDMessageProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/MOAIDMessageProvider.java
new file mode 100644
index 000000000..0503e6bc9
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/MOAIDMessageProvider.java
@@ -0,0 +1,73 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.util;
+
+import java.util.Locale;
+
+import at.gv.egovernment.moa.util.Messages;
+
+/**
+ * A singleton wrapper around a <code>Message</code> object, providing the messages used in MOA-ID.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class MOAIDMessageProvider {
+
+ /** DEFAULT_MESSAGE_RESOURCES are resources/properties/id_messages */
+ private static final String[] DEFAULT_MESSAGE_RESOURCES =
+ { "resources/properties/id_messages" };
+ /** DEFAULT_MESSAGE_LOCALES are "de", "AT" */
+ private static final Locale[] DEFAULT_MESSAGE_LOCALES =
+ new Locale[] { new Locale("de", "AT") };
+ /** The instance for our singleton */
+ private static MOAIDMessageProvider instance;
+ /** The Messages */
+ private Messages messages;
+
+ /**
+ * Returns the single instance of <code>MOAIDMessageProvider</code>.
+ *
+ * @return the single instance of <code>MOAIDMessageProvider</code>
+ */
+ public static MOAIDMessageProvider getInstance() {
+ if (instance == null)
+ instance = new MOAIDMessageProvider(DEFAULT_MESSAGE_RESOURCES, DEFAULT_MESSAGE_LOCALES);
+ return instance;
+ }
+
+ /**
+ * Create a <code>MOAIDMessageProvider</code>.
+ *
+ * @param resourceNames The names of the resources containing the messages.
+ * @param locales The corresponding locales.
+ */
+ protected MOAIDMessageProvider(String[] resourceNames, Locale[] locales) {
+ this.messages = new Messages(resourceNames, locales);
+ }
+
+ /**
+ * Get the message corresponding to a given message ID.
+ *
+ * @param messageId The ID of the message.
+ * @param parameters The parameters to fill in into the message arguments.
+ * @return The formatted message.
+ */
+ public String getMessage(String messageId, Object[] parameters) {
+ return messages.getMessage(messageId, parameters);
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ParamValidatorUtils.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ParamValidatorUtils.java
new file mode 100644
index 000000000..a1e039661
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ParamValidatorUtils.java
@@ -0,0 +1,480 @@
+package at.gv.egovernment.moa.id.util;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+import at.gv.egovernment.moa.id.config.ConfigurationException;
+import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
+import at.gv.egovernment.moa.logging.Logger;
+
+
+public class ParamValidatorUtils {
+
+ /**
+ * Checks if the given target is valid
+ * @param target HTTP parameter from request
+ * @return
+ */
+ public static boolean isValidTarget(String target) {
+
+ Logger.debug("Überprüfe Parameter Target");
+
+ // if non parameter is given return true
+ if (target == null) {
+ Logger.debug("Parameter Target ist null");
+ return true;
+ }
+
+
+ Pattern pattern = Pattern.compile("[a-zA-Z-]{1,5}");
+ Matcher matcher = pattern.matcher(target);
+ boolean b = matcher.matches();
+ if (b) {
+ Logger.debug("Parameter Target erfolgreich überprüft");
+ return true;
+ }
+ else {
+ Logger.error("Fehler Überprüfung Parameter Target. Target entspricht nicht den Kriterien (nur Zeichen a-z, A-Z und -, sowie 1-5 Zeichen lang)");
+ return false;
+ }
+
+ }
+
+ /**
+ * Checks if the given useMandate is valid
+ * @param target HTTP parameter from request
+ * @return
+ */
+ public static boolean isValidUseMandate(String usemandate) {
+
+ Logger.debug("Überprüfe Parameter useMandate");
+
+ // if non parameter is given return true
+ if (usemandate== null) {
+ Logger.debug("Parameter useMandate ist null");
+ return true;
+ }
+
+
+ if (usemandate.compareToIgnoreCase("true") == 0 || usemandate.compareToIgnoreCase("false") == 0) {
+ Logger.debug("Parameter useMandate erfolgreich überprüft");
+ return true;
+ }
+ else {
+ Logger.error("Fehler Überprüfung Parameter useMandate. useMandate ist weder 'true' noch 'false')");
+ return false;
+ }
+
+
+
+
+
+ }
+
+ /**
+ * Checks if the given bkuURI is valid
+ * @param target HTTP parameter from request
+ * @return
+ */
+ public static boolean isValidBKUURI(String bkuURI) {
+ Logger.debug("Überprüfe Parameter bkuURI");
+ // if non parameter is given return true
+ if (bkuURI == null) {
+ Logger.debug("Parameter bkuURI ist null");
+ return true;
+ }
+
+ // check if template is a valid URL
+ try {
+ // check if bku url starts with http or https
+ if (bkuURI.startsWith("http") || bkuURI.startsWith("https")) {
+ URL url =new URL(bkuURI);
+
+ // check if bkuURI is a local BKU
+ if (bkuURI.compareToIgnoreCase("https://localhost:3496/https-security-layer-request") == 0 ||
+ bkuURI.compareToIgnoreCase("http://localhost:3495/http-security-layer-request") == 0) {
+ Logger.debug("Parameter bkuURI erfolgreich überprüft");
+ return true;
+ }
+ else {
+ Logger.debug("Parameter bkuURI ist keine lokale BKU. Überprüfe Liste der vertrauenswürdigen BKUs.");
+ AuthConfigurationProvider authConf = AuthConfigurationProvider.getInstance();
+ List trustedBKUs = authConf.getTrustedBKUs();
+ boolean b = trustedBKUs.contains(bkuURI);
+ if (b) {
+ Logger.debug("Parameter bkuURI erfolgreich überprüft");
+ return true;
+ }
+ else {
+ Logger.error("Fehler Überprüfung Parameter bkuURI. bkuURI ist nicht auf Liste der vertrauenswürdigen BKUs (Konfigurationselement: MOA-IDConfiguration/TrustedBKUs)");
+ return false;
+ }
+ }
+
+
+ }
+ else {
+ Logger.error("Fehler Überprüfung Parameter bkuURI. bkuURI beginnt nicht mit http or https");
+ return false;
+ }
+
+
+ } catch (MalformedURLException e) {
+ Logger.error("Fehler Überprüfung Parameter bkuURI", e);
+ return false;
+ } catch (ConfigurationException e) {
+ Logger.error("Fehler Überprüfung Parameter bkuURI", e);
+ return false;
+ }
+ }
+
+// private static boolean testBKUConnection(URL url) {
+//
+// // make NullOperationRequest
+// //String request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><sl:NullOperationRequest xmlns:sl=\"http://www.buergerkarte.at/namespaces/securitylayer/1.2#\"/>";
+// String request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><sl:GetPropertiesRequest xmlns:sl=\"http://www.buergerkarte.at/namespaces/securitylayer/1.2#\"/>";
+//
+// HttpURLConnection connection;
+// if (url != null) {
+// try {
+// if (url.toExternalForm().startsWith("https")) {
+// connection = (HttpsURLConnection)url.openConnection();
+// }
+// else {
+// connection = (HttpURLConnection)url.openConnection();
+// }
+//
+// connection.setRequestMethod("POST");
+// connection.setDoOutput(true);
+//
+// connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
+//
+// String toSend = URLEncoder.encode(request, "UTF-8");
+// toSend = "XMLRequest=" + toSend;
+// connection.setRequestProperty("Content-Length", String.valueOf(toSend.getBytes().length));
+//
+// Logger.debug("Send NullOperationRequest to BKU.");
+//
+// OutputStream out = connection.getOutputStream();
+// out.write(toSend.getBytes());
+//
+// // get response
+// connection.connect();
+// int responseCode = connection.getResponseCode();
+//
+// if (responseCode != 200) {
+// InputStream is = connection.getErrorStream();
+// int ch;
+// String ret = "";
+// while ((ch = is.read()) != -1)
+// ret += (char)ch;
+//
+// is.close();
+//
+// System.out.println("ret: " + ret);
+//
+// Logger.error("Fehler Überprüfung Parameter bkuURI. Antwortcode von BKU ist nicht 200.");
+// return false;
+// }
+//
+// DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+// factory.setNamespaceAware(true);
+// DocumentBuilder builder = factory.newDocumentBuilder();
+//
+// //Document doc = builder.parse(connection.getInputStream());
+//
+// System.out.println(convertStreamToString(connection.getInputStream()));
+//
+//// NodeList l = doc.getElementsByTagNameNS(Constants.SL12_NS_URI, "ErrorResponse");
+//// if (l.getLength() != 0) {
+//// Logger.error("Fehler Überprüfung Parameter bkuURI. ErrorResponse von BKU empfangen.");
+//// return false;
+//// }
+//
+// Logger.debug("Parameter Template bkuURI erfolgreich überprüft");
+// return true;
+//
+//// } catch (SAXException e) {
+//// Logger.error("Fehler Überprüfung Parameter bkuURI.", e);
+//// return false;
+// } catch (IOException e) {
+// Logger.error("Fehler Überprüfung Parameter bkuURI.", e);
+// return false;
+// } catch (ParserConfigurationException e) {
+// Logger.error("Fehler Überprüfung Parameter bkuURI.", e);
+// return false;
+// }
+// }
+// else {
+// Logger.error("Fehler Überprüfung Parameter bkuURI. bkuURI ist null.");
+// return false;
+// }
+//
+//
+// }
+
+// public static String convertStreamToString(InputStream is) {
+// if (is != null) {
+// Writer writer = new StringWriter();
+//
+// char[] buffer = new char[1024];
+// try {
+// Reader reader = new BufferedReader(new InputStreamReader(is, "UTF-8"));
+// int n;
+// while ((n = reader.read(buffer)) != -1) {
+// writer.write(buffer, 0, n);
+// }
+// } catch (IOException e) {
+// e.printStackTrace();
+// }
+//
+// return writer.toString();
+// }
+// else {
+// return "";
+// }
+// }
+
+ /**
+ * Checks if the given template is valid
+ * @param req
+ * @param template
+ * @return
+ */
+ public static boolean isValidTemplate(HttpServletRequest req, String template) {
+
+ Logger.debug("Überprüfe Parameter Template bzw. bkuSelectionTemplateURL");
+
+ // if non parameter is given return true
+ if (template == null) {
+ Logger.debug("Parameter Template bzw. bkuSelectionTemplateURL ist null");
+ return true;
+ }
+
+ // check if template is a valid URL
+ try {
+
+ // check if template url starts with http or https
+ if (template.startsWith("http") || template.startsWith("https")) {
+
+ // check if template url is from same server
+ String name = req.getServerName();
+ String httpName = "http://" + name;
+ String httpsName = "https://" + name;
+
+ if (template.startsWith(httpName) || template.startsWith(httpsName)) {
+ new URL(template);
+ Logger.debug("Parameter Template bzw. bkuSelectionTemplateURL erfolgreich überprüft");
+ return true;
+ }
+ else {
+ Logger.error("Fehler Überprüfung Parameter Template bzw. bkuSelectionTemplateURL. Parameter liegt nicht am gleichen Server wie die MOA-Instanz (" + req.getServerName() + ")");
+ return false;
+ }
+
+ }
+ else {
+ Logger.error("Fehler Überprüfung Parameter Template bzw. bkuSelectionTemplateURL. Paramter beginnt nicht mit http oder https.");
+ return false;
+ }
+
+
+ } catch (MalformedURLException e) {
+ Logger.error("Fehler Überprüfung Parameter Template bzw. bkuSelectionTemplateURL.", e);
+ return false;
+ }
+ }
+
+ /**
+ * Checks if the given template is valid
+ * @param target HTTP parameter from request
+ * @return
+ */
+ public static boolean isValidSessionID(String sessionID) {
+ Logger.debug("Überprüfe Parameter MOASessionId");
+
+ // if non parameter is given return true
+ if (sessionID == null) {
+ Logger.debug("Parameter MOASessionId ist null");
+ return true;
+ }
+
+
+ Pattern pattern = Pattern.compile("[0-9-]*");
+ Matcher matcher = pattern.matcher(sessionID);
+ boolean b = matcher.matches();
+ if (b) {
+ Logger.debug("Parameter MOASessionId erfolgreich überprüft");
+ return true;
+ }
+ else {
+ Logger.error("Fehler Überprüfung Parameter MOASessionId. MOASessionId entspricht nicht den Kriterien (nur Zeichen 0-9 und -)");
+ return false;
+ }
+
+
+
+
+
+ }
+
+ /**
+ * Checks if the given oa is valid
+ * @param target HTTP parameter from request
+ * @return
+ */
+ public static boolean isValidOA(String oa) {
+ Logger.debug("Überprüfe Parameter oa");
+ // if non parameter is given return true
+ if (oa == null) {
+ Logger.debug("Parameter oa ist null");
+ return true;
+ }
+
+ // check if template is a valid URL
+ try {
+
+ // check if template url starts with http or https
+ if (oa.startsWith("http") || oa.startsWith("https")) {
+ new URL(oa);
+ Logger.debug("Parameter oa erfolgreich überprüft");
+ return true;
+ }
+ else {
+ Logger.error("Fehler Überprüfung Parameter oa. oa beginnt nicht mit http or https");
+ return false;
+ }
+
+ } catch (MalformedURLException e) {
+ Logger.error("Fehler Überprüfung Parameter oa", e);
+ return false;
+ }
+
+ }
+
+ /**
+ * Checks if the given signurl is valid
+ * @param target HTTP parameter from request
+ * @return
+ */
+ public static boolean isValidSignUrl(String signurl) {
+
+ Logger.debug("Überprüfe Parameter signurl");
+
+ // if non parameter is given return true
+ if (signurl == null) {
+ Logger.debug("Parameter signurl ist null");
+ return true;
+ }
+
+ // check if template is a valid URL
+ try {
+
+ // check if signurl starts with http or https
+ if (signurl.startsWith("http") || signurl.startsWith("https")) {
+ new URL(signurl);
+ Logger.debug("Parameter signurl erfolgreich überprüft");
+ return true;
+ }
+ else {
+ Logger.error("Fehler Überprüfung Parameter signurl. signurl beginnt nicht mit http or https");
+ return false;
+ }
+
+ } catch (MalformedURLException e) {
+ Logger.error("Fehler Überprüfung Parameter signurl", e);
+ return false;
+ }
+
+ }
+
+ /**
+ * Checks if <BKU>, <XMLRequest>, <DataURL>, <CertInfoXMLRequest>,
+ * <CertInfoDataURL> placeholders are contained in the given string.
+ * The placeholder <PushInfobox> is not checked, as it is only required,
+ * if other infoboxes as identity link will be treated.
+ * @param data
+ * @return
+ */
+// private static boolean checkPlaceHolders(String data) {
+//
+// boolean bku = data.contains("<BKU>");
+// boolean xmlrequest = data.contains("<XMLRequest>");
+// boolean dataurl = data.contains("<DataURL>");
+// boolean certinfoxmlrequest = data.contains("<CertInfoXMLRequest>");
+// boolean certinfodataurl = data.contains("<CertInfoDataURL>");
+//
+// System.out.println("Check Data: ");
+// System.out.println("bku: " + bku);
+// System.out.println("xmlrequest: " + xmlrequest);
+// System.out.println("dataurl: " + dataurl);
+// System.out.println("certinfoxmlrequest: " + certinfoxmlrequest);
+// System.out.println("certinfodataurl: " + certinfodataurl);
+//
+//
+// //return bku && xmlrequest && dataurl && certinfoxmlrequest && certinfodataurl;
+// return true;
+//
+// }
+
+
+// /**
+// * Converts an input stream to a string
+// * @param is
+// * @return
+// * @throws Exception
+// */
+// private static String convertStreamToString(InputStream is) throws Exception {
+// BufferedReader reader = new BufferedReader(new InputStreamReader(is));
+// StringBuilder sb = new StringBuilder();
+// String line = null;
+// while ((line = reader.readLine()) != null) {
+// sb.append(line);
+// }
+// is.close();
+// return sb.toString();
+// }
+
+ public static boolean isValidXMLDocument(String document) {
+
+ if (document == null)
+ return false;
+
+ Logger.debug("Überprüfe Parameter XMLDocument");
+ try {
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder builder = factory.newDocumentBuilder();
+ InputSource is = new InputSource(new StringReader(document));
+ builder.parse(is);
+
+ Logger.debug("Parameter XMLDocument erfolgreich überprüft");
+ return true;
+
+ } catch (ParserConfigurationException e) {
+ Logger.error("Fehler Überprüfung Parameter XMLDocument", e);
+ return false;
+ } catch (SAXException e) {
+ Logger.error("Fehler Überprüfung Parameter XMLDocument", e);
+ return false;
+ } catch (IOException e) {
+ Logger.error("Fehler Überprüfung Parameter XMLDocument", e);
+ return false;
+ }
+
+ }
+
+}
+
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ParameterInOrderFilter.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ParameterInOrderFilter.java
new file mode 100644
index 000000000..1e31397ac
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ParameterInOrderFilter.java
@@ -0,0 +1,77 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.util;
+
+import java.io.IOException;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * @author rschamberger
+ *
+ */
+/**
+ * A Filter class wich uses the InOrderServletRequestWrapper to provide servlets a more precise
+ * implementation of the getParameter* family. This implementation cares about the order of the parameters
+ * from Query String and HTTP POST Body. Use this as Filter class for Servlets which such needs.
+ *
+ * @author Rudolf Schamberger
+ * @version $Id$
+ */
+public class ParameterInOrderFilter implements Filter
+{
+
+ /**
+ * filterConfig
+ */
+ private FilterConfig filterConfig;
+
+ /**
+ * @see javax.servlet.Filter#init(javax.servlet.FilterConfig)
+ */
+ public final void init(final FilterConfig config)
+ {
+ this.filterConfig = config;
+ }
+
+ /**
+ * @see javax.servlet.Filter#destroy()
+ */
+ public final void destroy()
+ {
+ };
+
+ /**
+ * @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse,
+ * javax.servlet.FilterChain)
+ */
+ public final void doFilter(final ServletRequest request, final ServletResponse response,
+ final FilterChain chain) throws IOException, ServletException
+ {
+ InOrderServletRequestWrapper sRequ = new InOrderServletRequestWrapper((HttpServletRequest) request,
+ filterConfig.getServletContext());
+ //parse the Query (and Body) parameters
+ sRequ.parseParameters((HttpServletRequest) request);
+ //process the rest of filter chain
+ chain.doFilter(sRequ, response);
+ }
+} \ No newline at end of file
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/Random.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/Random.java
new file mode 100644
index 000000000..450c002f9
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/Random.java
@@ -0,0 +1,46 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.util;
+
+import java.nio.ByteBuffer;
+import java.security.SecureRandom;
+
+/**
+ * Random number generator used to generate ID's
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class Random {
+
+ /** random number generator used */
+ private static SecureRandom random = new SecureRandom();
+ /**
+ * Creates a new random number, to be used as an ID.
+ *
+ * @return random long as a String
+ */
+ public static String nextRandom() {
+
+ byte[] b = new byte[16]; // 16 bytes = 128 bits
+ random.nextBytes(b);
+
+
+ ByteBuffer bb = ByteBuffer.wrap(b);
+ long l = bb.getLong();
+
+ return "" + l;
+ }
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/SSLUtils.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/SSLUtils.java
new file mode 100644
index 000000000..c40c07b38
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/SSLUtils.java
@@ -0,0 +1,205 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.id.util;
+
+import iaik.pki.PKIConfiguration;
+import iaik.pki.PKIException;
+import iaik.pki.PKIFactory;
+import iaik.pki.PKIProfile;
+import iaik.pki.jsse.IAIKX509TrustManager;
+import iaik.security.provider.IAIK;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.net.URL;
+import java.security.GeneralSecurityException;
+import java.security.Security;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.KeyManager;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSocketFactory;
+import javax.net.ssl.TrustManager;
+
+import org.apache.regexp.RE;
+import org.apache.regexp.RESyntaxException;
+
+import at.gv.egovernment.moa.id.config.ConfigurationException;
+import at.gv.egovernment.moa.id.config.ConfigurationProvider;
+import at.gv.egovernment.moa.id.config.ConnectionParameter;
+import at.gv.egovernment.moa.id.iaik.config.PKIConfigurationImpl;
+import at.gv.egovernment.moa.id.iaik.pki.PKIProfileImpl;
+import at.gv.egovernment.moa.id.iaik.pki.jsse.MOAIDTrustManager;
+import at.gv.egovernment.moa.logging.Logger;
+
+
+/**
+ * Utility for a obtaining a secure socket factory using <code>IAIKX509TrustManager</code>.
+ * This <code>TrustManager</code> implementation features CRL checking.<br/>
+ * <code>SSLUtils</code> caches secure socket factories for given <code>ConnectionParameter</code>s.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class SSLUtils {
+
+ /** SSLSocketFactory store, mapping URL->SSLSocketFactory **/
+ private static Map sslSocketFactories = new HashMap();
+
+ /**
+ * Initializes the SSLSocketFactory store.
+ */
+ public static void initialize() {
+ sslSocketFactories = new HashMap();
+ // JSSE Abhängigkeit
+ //Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
+ Security.addProvider(new IAIK());
+ //System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
+
+
+ }
+
+ /**
+ * Creates an <code>SSLSocketFactory</code> which utilizes an
+ * <code>IAIKX509TrustManager</code> for the given trust store,
+ * and the given key store.
+ *
+ * @param conf configuration provider providing a generic properties pointing
+ * to trusted CA store and certificate store root
+ * @param connParam connection parameter containing the client key store settings
+ * to be used in case of client authentication;
+ * if <code>connParam.getClientKeyStore() == null</code>, client authentication
+ * is assumed to be disabled
+ * @return <code>SSLSocketFactory</code> to be used by an <code>HttpsURLConnection</code>
+ * @throws IOException thrown while reading key store file
+ * @throws GeneralSecurityException thrown while creating the socket factory
+ * @throws ConfigurationException on invalid configuration data
+ * @throws PKIException while initializing the <code>IAIKX509TrustManager</code>
+ */
+ public static SSLSocketFactory getSSLSocketFactory(
+ ConfigurationProvider conf,
+ ConnectionParameter connParam)
+ throws IOException, GeneralSecurityException, ConfigurationException, PKIException {
+
+ Logger.debug("Get SSLSocketFactory for " + connParam.getUrl());
+ // retrieve SSLSocketFactory if already created
+ SSLSocketFactory ssf = (SSLSocketFactory)sslSocketFactories.get(connParam.getUrl());
+ if (ssf != null)
+ return ssf;
+
+ // else create new SSLSocketFactory
+ String trustStoreURL = conf.getTrustedCACertificates();
+
+ if (trustStoreURL == null)
+ throw new ConfigurationException(
+ "config.08", new Object[] {"TrustedCACertificates"});
+ String acceptedServerCertURL = connParam.getAcceptedServerCertificates();
+
+ TrustManager[] tms = getTrustManagers(conf, trustStoreURL, acceptedServerCertURL);
+
+ KeyManager[] kms = at.gv.egovernment.moa.util.SSLUtils.getKeyManagers(
+ "pkcs12", connParam.getClientKeyStore(), connParam.getClientKeyStorePassword());
+ SSLContext ctx = SSLContext.getInstance("TLS");
+ ctx.init(kms, tms, null); ssf = ctx.getSocketFactory();
+ // store SSLSocketFactory
+ sslSocketFactories.put(connParam.getUrl(), ssf);
+ return ssf;
+ }
+
+
+ /**
+ * Initializes an <code>IAIKX509TrustManager</code> for a given trust store,
+ * using configuration data.
+ *
+ * @param conf MOA-ID configuration provider
+ * @param trustStoreURL trust store URL
+ * @param acceptedServerCertURL file URL pointing to directory containing accepted server SSL certificates
+ * @return <code>TrustManager</code> array containing the <code>IAIKX509TrustManager</code>
+ * @throws ConfigurationException on invalid configuration data
+ * @throws IOException on data-reading problems
+ * @throws PKIException while initializing the <code>IAIKX509TrustManager</code>
+ */
+ public static TrustManager[] getTrustManagers(
+ ConfigurationProvider conf, String trustStoreURL, String acceptedServerCertURL)
+ throws ConfigurationException, PKIException, IOException, GeneralSecurityException {
+
+ PKIConfiguration cfg = null;
+ if (! PKIFactory.getInstance().isAlreadyConfigured())
+ cfg = new PKIConfigurationImpl(conf);
+ String boolString = conf.getGenericConfigurationParameter(ConfigurationProvider.TRUST_MANAGER_REVOCATION_CHECKING);
+ //not using BoolUtils because default value hast to be true!
+ boolean checkRevocation = !("false".equals(boolString) || "0".equals(boolString));
+ PKIProfile profile = new PKIProfileImpl(trustStoreURL, checkRevocation);
+ // This call fixes a bug occuring when PKIConfiguration is
+ // initialized by the MOA-SP initialization code, in case
+ // MOA-SP is called by API
+ MOAIDTrustManager.initializeLoggingContext();
+ IAIKX509TrustManager tm = new MOAIDTrustManager(acceptedServerCertURL);
+ tm.init(cfg, profile);
+ return new TrustManager[] {tm};
+ }
+ /**
+ * Reads a file, given by URL, into a byte array,
+ * securing the connection by IAIKX509TrustManager.
+ * @param connParam containing URL and accepted server certificates
+ * @param conf ConfigurationProvider for reading
+ * @return String representation of content
+ * @throws ConfigurationException on invalid configuration data
+ * @throws PKIException on invalid configuration data
+ * @throws IOException on data-reading problems
+ * @throws GeneralSecurityException on security issues
+ */
+ public static String readHttpsURL(ConfigurationProvider conf, ConnectionParameter connParam)
+ throws ConfigurationException, PKIException, IOException, GeneralSecurityException {
+
+ URL url = new URL(connParam.getUrl());
+ HttpsURLConnection conn = (HttpsURLConnection)url.openConnection();
+ conn.setRequestMethod("GET");
+ conn.setDoInput(true);
+ SSLSocketFactory sslSocketFactory = getSSLSocketFactory(conf, connParam);
+ conn.setSSLSocketFactory(sslSocketFactory);
+ conn.connect();
+ String contentType = conn.getContentType();
+ RE regExp = null;
+ try {
+ regExp = new RE("(;.*charset=)(\"*)(.*[^\"])");
+ } catch (RESyntaxException e) {
+ //RESyntaxException is not possible = expr. is costant
+ }
+ boolean charsetSupplied = regExp.match(contentType);
+ String encoding = "ISO-8859-1"; //default HTTP encoding
+ if (charsetSupplied) {
+ encoding = regExp.getParen(3);
+ }
+ InputStream instream = new BufferedInputStream(conn.getInputStream());
+ InputStreamReader isr = new InputStreamReader(instream, encoding);
+ Reader in = new BufferedReader(isr);
+ int ch;
+ StringBuffer buffer = new StringBuffer();
+ while ((ch = in.read()) > -1) {
+ buffer.append((char)ch);
+ }
+ in.close();
+ conn.disconnect();
+ return buffer.toString();
+ }
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ServletUtils.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ServletUtils.java
new file mode 100644
index 000000000..c3d548d54
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ServletUtils.java
@@ -0,0 +1,140 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+/**
+ *
+ */
+package at.gv.egovernment.moa.id.util;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.net.URLEncoder;
+
+import javax.servlet.http.HttpServletResponse;
+
+import at.gv.egovernment.moa.id.MOAIDException;
+import at.gv.egovernment.moa.id.auth.AuthenticationServer;
+import at.gv.egovernment.moa.id.auth.builder.DataURLBuilder;
+import at.gv.egovernment.moa.id.auth.data.AuthenticationSession;
+import at.gv.egovernment.moa.logging.Logger;
+
+/**
+ * @author <a href="mailto:peter.danner@egiz.gv.at">Peter Danner</a>
+ *
+ */
+public class ServletUtils {
+
+ /**
+ * Writes out whether the CreateXMLSignatureRequest or a Redirect for form input processing
+ * depending on the requests starting text.
+ *
+ * @param resp The httpServletResponse
+ * @param session The current AuthenticationSession
+ * @param createXMLSignatureRequestOrRedirect The request
+ * @param servletGoal The servlet to which the redirect should happen
+ * @param servletName The servlet name for debug purposes
+ * @throws MOAIDException
+ * @throws IOException
+ */
+ public static void writeCreateXMLSignatureRequestOrRedirect(HttpServletResponse resp, AuthenticationSession session, String createXMLSignatureRequestOrRedirect, String servletGoal, String servletName)
+ throws MOAIDException,
+ IOException
+ {
+ if (!createXMLSignatureRequestOrRedirect.startsWith("Redirect")) {
+ resp.setStatus(307);
+ String dataURL = new DataURLBuilder().buildDataURL(
+ session.getAuthURL(), AuthenticationServer.REQ_VERIFY_AUTH_BLOCK, session.getSessionID());
+ resp.addHeader("Location", dataURL);
+
+ //TODO test impact of explicit setting charset with older versions of BKUs (HotSign)
+ resp.setContentType("text/xml;charset=UTF-8");
+
+ OutputStream out = resp.getOutputStream();
+ out.write(createXMLSignatureRequestOrRedirect.getBytes("UTF-8"));
+ out.flush();
+ out.close();
+ Logger.debug("Finished POST " + servletName);
+
+ } else {
+ String redirectURL = new DataURLBuilder().buildDataURL(session.getAuthURL(), servletGoal, session.getSessionID());
+ resp.setContentType("text/html");
+ resp.setStatus(302);
+ resp.addHeader("Location", redirectURL);
+ Logger.debug("REDIRECT TO: " + redirectURL);
+
+ }
+ }
+ /**
+ * Writes out whether the CreateXMLSignatureRequest or a Redirect for form input processing
+ * depending on the requests starting text.
+ *
+ * @param resp The httpServletResponse
+ * @param session The current AuthenticationSession
+ * @param createXMLSignatureRequestOrRedirect The request
+ * @param servletGoal The servlet to which the redirect should happen
+ * @param servletName The servlet name for debug purposes
+ * @throws MOAIDException
+ * @throws IOException
+ */
+ public static void writeCreateXMLSignatureRequest(HttpServletResponse resp, AuthenticationSession session, String createXMLSignatureRequestOrRedirect, String servletGoal, String servletName, String dataURL)
+ throws MOAIDException,
+ IOException
+ {
+ resp.setStatus(307);
+ resp.addHeader("Location", dataURL);
+
+ //TODO test impact of explicit setting charset with older versions of BKUs (HotSign)
+ resp.setContentType("text/xml;charset=UTF-8");
+
+ OutputStream out = resp.getOutputStream();
+ out.write(createXMLSignatureRequestOrRedirect.getBytes("UTF-8"));
+ out.flush();
+ out.close();
+ Logger.debug("Finished POST " + servletName);
+
+ }
+
+ /**
+ * Writes out whether the CreateXMLSignatureRequest or a Redirect for form input processing
+ * depending on the requests starting text.
+ *
+ * @param resp The httpServletResponse
+ * @param session The current AuthenticationSession
+ * @param createXMLSignatureRequestOrRedirect The request
+ * @param servletGoal The servlet to which the redirect should happen
+ * @param servletName The servlet name for debug purposes
+ * @throws MOAIDException
+ * @throws IOException
+ */
+ public static void writeCreateXMLSignatureRequestURLEncoded(HttpServletResponse resp, AuthenticationSession session, String createXMLSignatureRequestOrRedirect, String servletGoal, String servletName, String dataURL)
+ throws MOAIDException,
+ IOException {
+ resp.setStatus(200);
+ Logger.debug("ContentType set to: application/x-www-form-urlencoded");
+
+ resp.setContentType("application/x-www-form-urlencoded");
+
+ String content = "XMLRequest=" + URLEncoder.encode(createXMLSignatureRequestOrRedirect, "UTF-8") + "&" +
+ "DataURL=" + URLEncoder.encode(dataURL, "UTF-8");
+
+ OutputStream out = resp.getOutputStream();
+ out.write(content.getBytes("UTF-8"));
+ out.flush();
+ out.close();
+ Logger.debug("Finished POST " + servletName);
+
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/client/mis/simple/MISMandate.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/client/mis/simple/MISMandate.java
new file mode 100644
index 000000000..59ca0d5ca
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/client/mis/simple/MISMandate.java
@@ -0,0 +1,48 @@
+package at.gv.egovernment.moa.id.util.client.mis.simple;
+
+public class MISMandate {
+
+ final static private String OID_NOTAR = "1.2.40.0.10.3.1";
+ final static private String TEXT_NOTAR = "berufsmäßige(r) Parteienvertreter(in) mit Notariatseigenschaft";
+
+ final static private String OID_RECHTSANWALT = "1.2.40.0.10.3.2";
+ final static private String TEXT_RECHTSANWALT = "berufsmäßige(r) Parteienvertreter(in) mit Rechtsanwaltseigenschaft";
+
+ final static private String OID_ZIVILTECHNIKER = "1.2.40.0.10.3.3";
+ final static private String TEXT_ZIVILTECHNIKER = "berufsmäßige(r) Parteienvertreter(in) mit Ziviltechnikerinneneigenschaft";
+
+ final static private String OID_ORGANWALTER = "1.2.40.0.10.3.4";
+ final static private String TEXT_ORGANWALTER = "Organwalter";
+
+
+ private String oid = null;
+ private byte[] mandate = null;
+
+ public String getProfRep() {
+ return oid;
+ }
+ public void setProfRep(String oid) {
+ this.oid = oid;
+ }
+ public byte[] getMandate() {
+ return mandate;
+ }
+ public void setMandate(byte[] mandate) {
+ this.mandate = mandate;
+ }
+
+ public String getTextualDescriptionOfOID() {
+ if (this.oid.equalsIgnoreCase(OID_NOTAR))
+ return TEXT_NOTAR;
+ if (this.oid.equalsIgnoreCase(OID_RECHTSANWALT))
+ return TEXT_RECHTSANWALT;
+ if (this.oid.equalsIgnoreCase(OID_ZIVILTECHNIKER))
+ return TEXT_ZIVILTECHNIKER;
+ if (this.oid.equalsIgnoreCase(OID_ORGANWALTER))
+ return TEXT_ORGANWALTER;
+
+ return "Keine textuelle Beschreibung für OID " + oid;
+
+ }
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/client/mis/simple/MISSessionId.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/client/mis/simple/MISSessionId.java
new file mode 100644
index 000000000..d8bec4900
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/client/mis/simple/MISSessionId.java
@@ -0,0 +1,22 @@
+package at.gv.egovernment.moa.id.util.client.mis.simple;
+
+public class MISSessionId {
+
+ private String sessiondId = null;
+ private String redirectURL = null;
+
+ public String getSessiondId() {
+ return sessiondId;
+ }
+ public void setSessiondId(String sessiondId) {
+ this.sessiondId = sessiondId;
+ }
+ public String getRedirectURL() {
+ return redirectURL;
+ }
+ public void setRedirectURL(String redirectURL) {
+ this.redirectURL = redirectURL;
+ }
+
+
+}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/client/mis/simple/MISSimpleClient.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/client/mis/simple/MISSimpleClient.java
new file mode 100644
index 000000000..25c341584
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/client/mis/simple/MISSimpleClient.java
@@ -0,0 +1,261 @@
+package at.gv.egovernment.moa.id.util.client.mis.simple;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.net.ssl.SSLSocketFactory;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.TransformerException;
+
+import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.methods.PostMethod;
+import org.apache.commons.httpclient.methods.StringRequestEntity;
+import org.apache.commons.httpclient.protocol.Protocol;
+import org.apache.xerces.parsers.DOMParser;
+import org.apache.xpath.XPathAPI;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXNotRecognizedException;
+import org.xml.sax.SAXNotSupportedException;
+
+import at.gv.egovernment.moa.id.auth.validator.parep.client.szrgw.SZRGWSecureSocketFactory;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.DOMUtils;
+
+
+public class MISSimpleClient {
+
+
+ private final static String SOAP_NS = "http://schemas.xmlsoap.org/soap/envelope/";
+ private final static String MIS_NS = "http://reference.e-government.gv.at/namespace/mandates/mis/1.0/xsd";
+
+ private static Element NS_NODE = null;
+
+
+ static {
+ try {
+ NS_NODE = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument().createElement("test");
+ NS_NODE.setAttribute("xmlns:soap", SOAP_NS);
+ NS_NODE.setAttribute("xmlns:mis", MIS_NS);
+ } catch (Exception e) {
+ Logger.warn("Error initializing namespace node.", e);
+ }
+ }
+
+ public static List sendGetMandatesRequest(String webServiceURL, String sessionId, SSLSocketFactory sSLSocketFactory) throws MISSimpleClientException {
+ if (webServiceURL == null) {
+ throw new NullPointerException("Argument webServiceURL must not be null.");
+ }
+ if (sessionId == null) {
+ throw new NullPointerException("Argument sessionId must not be null.");
+ }
+
+ // ssl settings
+ if (sSLSocketFactory != null) {
+ SZRGWSecureSocketFactory fac = new SZRGWSecureSocketFactory(sSLSocketFactory);
+ Protocol.registerProtocol("https", new Protocol("https", fac, 443));
+ }
+
+
+ try {
+ Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+ Element mirElement = doc.createElementNS(MIS_NS, "MandateIssueRequest");
+ Element sessionIdElement = doc.createElementNS(MIS_NS, "SessionID");
+ sessionIdElement.appendChild(doc.createTextNode(sessionId));
+ mirElement.appendChild(sessionIdElement);
+
+ // send soap request
+ Element mandateIssueResponseElement = sendSOAPRequest(webServiceURL, mirElement);
+
+ // check for error
+ checkForError(mandateIssueResponseElement);
+
+ // check for session id
+ NodeList mandateElements = XPathAPI.selectNodeList(mandateIssueResponseElement, "//mis:MandateIssueResponse/mis:Mandates/mis:Mandate", NS_NODE);
+
+ if (mandateElements == null || mandateElements.getLength() == 0) {
+ throw new MISSimpleClientException("No mandates found in response.");
+ }
+
+ ArrayList foundMandates = new ArrayList();
+ for (int i=0; i<mandateElements.getLength(); i++) {
+ Element mandate = (Element) mandateElements.item(i);
+ MISMandate misMandate = new MISMandate();
+ if (mandate.hasAttribute("ProfessionalRepresentative")) {
+ misMandate.setProfRep(mandate.getAttribute("ProfessionalRepresentative"));
+ }
+
+ //misMandate.setMandate(Base64.decodeBase64(DOMUtils.getText(mandate)));
+ misMandate.setMandate(Base64.decodeBase64(DOMUtils.getText(mandate).getBytes()));
+ foundMandates.add(misMandate);
+ }
+ return foundMandates;
+ } catch (ParserConfigurationException e) {
+ throw new MISSimpleClientException(e);
+ } catch (DOMException e) {
+ throw new MISSimpleClientException(e);
+ } catch (TransformerException e) {
+ throw new MISSimpleClientException(e);
+ }
+ }
+
+ public static MISSessionId sendSessionIdRequest(String webServiceURL, byte[] idl, byte[] cert, String redirectURL, String mandateIdentifier[], SSLSocketFactory sSLSocketFactory) throws MISSimpleClientException {
+ if (webServiceURL == null) {
+ throw new NullPointerException("Argument webServiceURL must not be null.");
+ }
+ if (idl == null) {
+ throw new NullPointerException("Argument idl must not be null.");
+ }
+ if (redirectURL == null) {
+ throw new NullPointerException("Argument redirectURL must not be null.");
+ }
+
+ // ssl settings
+ if (sSLSocketFactory != null) {
+ SZRGWSecureSocketFactory fac = new SZRGWSecureSocketFactory(sSLSocketFactory);
+ Protocol.registerProtocol("https", new Protocol("https", fac, 443));
+ }
+
+ try {
+ Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+ Element mirElement = doc.createElementNS(MIS_NS, "MandateIssueRequest");
+ Element idlElement = doc.createElementNS(MIS_NS, "IdentityLink");
+
+ idlElement.appendChild(doc.createTextNode(new String(Base64.encodeBase64(idl))));
+ mirElement.appendChild(idlElement);
+
+ if (cert != null && cert.length > 0) {
+ Element certElement = doc.createElementNS(MIS_NS, "X509SignatureCertificate");
+ certElement.appendChild(doc.createTextNode(new String(Base64.encodeBase64(cert))));
+ //certElement.appendChild(doc.createTextNode(Base64.encodeBase64(cert)));
+ // certElement.appendChild(doc.createTextNode(new String(Base64.encodeBase64(cert))));
+ mirElement.appendChild(certElement);
+ }
+ Element redirectElement = doc.createElementNS(MIS_NS, "RedirectURL");
+ redirectElement.appendChild(doc.createTextNode(redirectURL));
+ mirElement.appendChild(redirectElement);
+ if (mandateIdentifier != null && mandateIdentifier.length > 0) {
+ Element filtersElement = doc.createElementNS(MIS_NS, "Filters");
+ Element mandateIdentifiersElement = doc.createElementNS(MIS_NS, "MandateIdentifiers");
+ for (int i=0; i<mandateIdentifier.length; i++) {
+ Element mandateIdentifierElement = doc.createElementNS(MIS_NS, "MandateIdentifier");
+ mandateIdentifierElement.appendChild(doc.createTextNode(mandateIdentifier[i]));
+ mandateIdentifiersElement.appendChild(mandateIdentifierElement);
+ }
+ filtersElement.appendChild(mandateIdentifiersElement);
+ mirElement.appendChild(filtersElement);
+ }
+ // send soap request
+ Element mandateIssueResponseElement = sendSOAPRequest(webServiceURL, mirElement);
+
+ // check for error
+ checkForError(mandateIssueResponseElement);
+
+ // check for session id
+ //String sessionId = ((Node) XPathAPI.selectSingleNode(mandateIssueResponseElement, "/mis:MandateIssueResponse/mis:SessionID/text()", NS_NODE)).getNodeValue();
+ Node sessionIdNode = ((Node) XPathAPI.selectSingleNode(mandateIssueResponseElement, "//mis:MandateIssueResponse/mis:SessionID/text()", NS_NODE));
+ if (sessionIdNode == null) {
+ throw new MISSimpleClientException("SessionId not found in response.");
+ }
+ String sessionId = sessionIdNode.getNodeValue();
+
+ Node guiRedirectURLNode = ((Node) XPathAPI.selectSingleNode(mandateIssueResponseElement, "//mis:MandateIssueResponse/mis:GuiRedirectURL/text()", NS_NODE));
+ if (guiRedirectURLNode == null) {
+ throw new MISSimpleClientException("GuiRedirectURL not found in response.");
+ }
+ String guiRedirectURL = guiRedirectURLNode.getNodeValue();
+
+ // create return object
+ MISSessionId msid = new MISSessionId();
+ msid.setSessiondId(sessionId);
+ msid.setRedirectURL(guiRedirectURL);
+
+ return msid;
+ } catch (ParserConfigurationException e) {
+ throw new MISSimpleClientException(e);
+ } catch (DOMException e) {
+ throw new MISSimpleClientException(e);
+ } catch (TransformerException e) {
+ throw new MISSimpleClientException(e);
+ }
+
+ }
+
+ private static void checkForError(Element mandateIssueResponseElement) throws MISSimpleClientException {
+ if (mandateIssueResponseElement == null) {
+ throw new NullPointerException("Argument mandateIssueResponseElement must not be null.");
+ }
+ try {
+ Element errorElement = (Element) XPathAPI.selectSingleNode(mandateIssueResponseElement, "//mis:MandateIssueResponse/mis:Error", NS_NODE);
+ if (errorElement != null) {
+ String code = ((Node) XPathAPI.selectSingleNode(mandateIssueResponseElement, "//mis:MandateIssueResponse/mis:Error/mis:Code/text()", NS_NODE)).getNodeValue();
+ String text = ((Node) XPathAPI.selectSingleNode(mandateIssueResponseElement, "//mis:MandateIssueResponse/mis:Error/mis:Text/text()", NS_NODE)).getNodeValue();
+ throw new MISSimpleClientException("Fehler beim Abfragen des Online-Vollmachten Services: " + code + " / " + text); }
+ } catch (TransformerException e) {
+ throw new MISSimpleClientException(e);
+ }
+ }
+
+ private static Element sendSOAPRequest(String webServiceURL, Element request) throws MISSimpleClientException {
+ if (webServiceURL == null) {
+ throw new NullPointerException("Argument webServiceURL must not be null.");
+ }
+ if (request == null) {
+ throw new NullPointerException("Argument request must not be null.");
+ }
+ try {
+ HttpClient httpclient = new HttpClient();
+ PostMethod post = new PostMethod(webServiceURL);
+ StringRequestEntity re = new StringRequestEntity(DOMUtils.serializeNode(packIntoSOAP(request)),"text/xml", "UTF-8");
+ post.setRequestEntity(re);
+ int responseCode = httpclient.executeMethod(post);
+ if (responseCode != 200) {
+ throw new MISSimpleClientException("Invalid HTTP response code " + responseCode);
+ }
+ //Element elem = parse(post.getResponseBodyAsStream());
+ Document doc = DOMUtils.parseDocumentSimple(post.getResponseBodyAsStream());
+ return unpackFromSOAP(doc.getDocumentElement());
+ } catch(IOException e) {
+ throw new MISSimpleClientException(e);
+ } catch (TransformerException e) {
+ throw new MISSimpleClientException(e);
+ } catch (SAXException e) {
+ throw new MISSimpleClientException(e);
+ } catch (ParserConfigurationException e) {
+ throw new MISSimpleClientException(e);
+ }
+ }
+
+ private static Element packIntoSOAP(Element element) throws MISSimpleClientException {
+ try {
+ Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+ Element soapEnvelope = doc.createElement("Envelope");
+ soapEnvelope.setAttribute("xmlns", SOAP_NS);
+ Element soapBody = doc.createElement("Body");
+ soapEnvelope.appendChild(soapBody);
+ soapBody.appendChild(doc.importNode(element, true));
+ return soapEnvelope;
+ } catch(ParserConfigurationException e) {
+ throw new MISSimpleClientException(e);
+ }
+ }
+
+ private static Element unpackFromSOAP(Element element) throws MISSimpleClientException {
+ try {
+ return (Element) XPathAPI.selectSingleNode(element, "/soap:Envelope/soap:Body/child::*[position()=1]", NS_NODE);
+ } catch(TransformerException e) {
+ throw new MISSimpleClientException(e);
+ }
+ }
+} \ No newline at end of file
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/client/mis/simple/MISSimpleClientException.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/client/mis/simple/MISSimpleClientException.java
new file mode 100644
index 000000000..6f2627e1d
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/client/mis/simple/MISSimpleClientException.java
@@ -0,0 +1,22 @@
+package at.gv.egovernment.moa.id.util.client.mis.simple;
+
+public class MISSimpleClientException extends Exception {
+
+ private static final long serialVersionUID = 1L;
+
+ public MISSimpleClientException() {
+ }
+
+ public MISSimpleClientException(String message) {
+ super(message);
+ }
+
+ public MISSimpleClientException(Throwable cause) {
+ super(cause);
+ }
+
+ public MISSimpleClientException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+} \ No newline at end of file
diff --git a/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties b/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties
new file mode 100644
index 000000000..f206f6bbb
--- /dev/null
+++ b/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties
@@ -0,0 +1,173 @@
+# This file contains exception messages in the standard Java properties
+# format. The messages may contain formatting patterns as definied in the
+# java.text.MessageFormat class.
+
+#
+# Error messages: the key corresponds to the error code
+#
+
+# status messages included in <samlp:Response> of GetAuthenticationDataService
+1200=Anfrage erfolgreich beantwortet
+1201=Fehlerhaftes Requestformat: mehr als 1 Request übergeben
+1202=Fehlerhaftes Requestformat: kein SAML-Artifakt übergeben
+1203=Fehlerhaftes Requestformat: mehr als 1 SAML-Artifakt übergeben
+1204=Fehlerhaftes Requestformat
+1205=Fehler beim Abholen der Anmeldedaten, fehlerhaftes SAML-Artifakt Format (SAML-Artifakt={0}): {1}
+1206=Fehler beim Abholen der Anmeldedaten, unbekanntes SAML-Artifakt (SAML-Artifakt={0})
+1207=Zeitüberschreitung beim Abholen der Anmeldedaten (SAML-Artifakt={0})
+1299=Interner Server-Fehler
+
+auth.00=Anmeldung an dieser Applikation wird nicht unterstützt (URL={0})
+auth.01=Die Anmeldung ist bereits im Gange (MOASessionID={0})
+auth.02=MOASessionID ist unbekannt (MOASessionID={0})
+auth.03=Fehler beim Abholen einer Datei von der URL "{0}": Interne Fehlermeldung: {1}
+auth.04=Fehler beim Auslesen der Resource "{0}": {1}
+auth.05=Fehlender Parameter "{1}" beim Aufruf von "{0}"
+auth.06=Fehler beim Speichern der Anmeldedaten, fehlerhaftes SAML-Artifact Format (SAML-Artifact={0})
+auth.07=Aufruf von {0} muss mit Schema "https:" erfolgen. <br><b>Hinweis:</b> Bitte Dokumentation zu GenericConfiguration: "FrontendServlets.EnableHTTPConnection" beachten.
+auth.08=In der Bürgerkartenumgebung ist ein Fehler aufgetreten: <br>Fehlercode <i>{0}</i>: {1}
+auth.09=Zur Auswahlseite der Bürgertenumgebung (URL={0}) konnte keine Verbindung hergestellt werden. : <br>HTTP-Statuscode <i>{1}</i>
+auth.10=Fehler beim Aufruf von "{0}": Parameter "{1}" fehlt
+auth.11=Die zentral gespeicherte Auswahlseite für Bürgerkartenumgebungen konnte nicht geladen werden. Bitte informieren Sie den Adminstrator des Servers und versuchen Sie die Anmeldung in einiger Zeit abermals. <br>URL "{0}" Interne Fehlermeldung: {1}
+auth.12=Fehlerhafter Parameter "{1}" beim Aufruf von "{0}"
+auth.13=Vollmachtenmodus für ausländische Bürger wird nicht unterstützt.
+auth.14=Zertifikat konnte nicht ausgelesen werden.
+auth.15=Fehler bei Anfrage an Vollmachten Service.
+auth.16=Fehler bei Abarbeitung der Vollmacht in "{0}"
+
+init.00=MOA ID Authentisierung wurde erfolgreich gestartet
+init.01=Fehler beim Aktivieren des IAIK-JCE/JSSE/JDK1.3 Workaround: SSL ist möglicherweise nicht verfügbar
+init.02=Fehler beim Starten des Service MOA ID Authentisierung
+
+config.00=MOA ID Konfiguration erfolgreich geladen: {0}
+config.01=Umgebungsvariable "moa.id.configuration" nicht gesetzt
+config.02=Nicht klassifizierter Fehler in der Konfiguration (siehe Log-Datei für Details)
+config.03=Fehler beim Einlesen der Konfiguration (siehe Log-Datei für Details)
+config.04=Fehler beim Lesen der MOA ID Konfiguration; es wird weiterhin die ursprüngliche Konfiguration verwendet
+config.05=Fehlerhafter Wert für "{0}" in der MOA ID Konfiguration
+config.06=Doppelter Eintrag in der Konfiguration für die Online-Applikation gefunden: {0}
+config.07=Klasse {0} kann nicht instanziert werden
+config.08=Fehlender Wert für "{0}" in der MOA ID Konfiguration
+config.09=Fehler beim Erstellen von X509IssuerSerial (IssuerName={0}, SerialNumber={1})
+config.10=Fehler in der MOA SPSS Konfiguration: {0}
+config.11=LoginParameterResolver konnte nicht konfiguriert werden {0}
+config.12=Standard DATA URL Prefix "{0}" wird anstatt des konfigurierten DATA URL Prefix verwendet
+config.13=Konfiguriertes DATA URL Prefix "{0}" muss mit http:// bzw. https:// beginnen
+config.14=LoginParameterResolver-Fehler: {0}
+config.15=Das Personenbindungs-Trust-Profil (TrustProfileID = {0}) darf nicht für die Verifikation anderer Infoboxen verwendet werden.
+config.16=MOA ID Proxy konnte nicht gestartet werden. Das Element ConnnectionParameter im allgemeinen Konfigurationsteil der MOA-ID-PROXY Konfigurationsdatei fehlt.
+
+
+parser.00=Leichter Fehler beim Parsen: {0}
+parser.01=Fehler beim Parsen: {0}
+parser.02=Schwerer Fehler beim Parsen: {0}
+parser.03=Fehler beim Parsen oder Konvertieren eines ECDSA-Schlüssels: {0}
+parser.04=Fehler beim Serialisieren: {0}
+parser.05=Fehler beim Serialisieren: SAML-Attribute {0} (Namespace: {1}) konnte nicht serialsiert werden.
+parser.06=Fehler beim Parsen: {0}-InfoboxResponse nicht vollständig ({1} im {2} fehlt)
+parser.07=Fehler beim Parsen: Assoziatives Array im {0}-InfoboxResponse enthält einen Schlüssel ohne zugehörigen Wert ("Key"-Element statt "Pair"-Element).
+
+builder.00=Fehler beim Aufbau der Struktur "{0}": {1}
+builder.01=Fehlerhaftes Template: Kennung "{0}" fehlt
+builder.02=Fehler beim Ausblenden von Stammzahlen
+
+service.00=Fehler beim Aufruf des Web Service: {0}
+service.01=Fehler beim Aufruf des Web Service: kein Endpoint
+service.02=Fehler beim Aufruf des Web Service, Status {0}: {1}
+service.03=Fehler beim Aufruf des SPSS-API: {0}
+
+cleaner.00=AuthenticationSessionCleaner wurde gestartet
+cleaner.01=Fehler im AuthenticationSessionCleaner
+cleaner.02=Abgelaufene MOASession {0} wurde aus dem Speicher entfernt
+cleaner.03=Abgelaufene Anmeldedaten zur SAML-Assertion ID {0} wurden aus dem Speicher entfernt
+
+proxy.00=MOA ID Proxy wurde erfolgreich gestartet
+proxy.01=Unbekannter URL {0}, erwarteter URL auf {1}
+proxy.02=Unbekannter URL {0}. <br>Es wurde keine Übereinstimmung zum Attribut publicURLPrefix im Element 'OnlineApplication' der verwendeten MOA-ID Konfigurationsdatei gefunden.
+proxy.04=URL {0} : {1}
+proxy.05=Fehler beim Aufbauen der SSLSocketFactory für {0} : {1}
+proxy.06=Fehler beim Starten des Service MOA ID Proxy
+proxy.07=Sie sind nicht bzw. nicht mehr angemeldet. Melden Sie sich bitte erneut an.
+proxy.08=Kein URL-Mapping in der HttpSession verfügbar (URL {0})
+proxy.09=Fehler beim Aufruf des MOA-ID Auth API: {0}
+proxy.10=Fehler beim Weiterleiten (MOA-ID Proxy)
+proxy.11=Beim Weiterleiten der Verbindung zur Anwendung ist ein Fehler aufgetreten.
+proxy.12=Fehler bei der Anmeldung. <br>Eine Anmeldung an der Anwendung <b>{0}</b> war nicht m&ouml;glich. <br>Pr&uuml;fen Sie bitte ihre Berechtigung.
+proxy.13=Fehler beim Aufruf des LoginParameterResolvers zu URL-Präfix: {0}
+proxy.14=<p> Folgende Ursachen können zu dem Fehler geführt haben:</p><ol><li>Sie sind nicht mehr angemeldet (Verbindungen werden aus Sicherheitsgründen bei längerer Inaktivität beendet.)<br>Melden Sie sich bitte erneut an.</li><li> Die Kommunikation mit dem Server schlug fehl.<br> </li></ol>
+proxy.15=Auf die gewünschte Seite kann nicht zugegriffen werden, Sie besitzen nicht die benötigte Berechtigung.
+proxy.16=Fehler bei der Anmeldung. <br>Eine Anmeldung an der Anwendung <b>{0}</b> war nicht m&ouml;glich. Die maximale Anzahl von {1} ung&uuml;ltigen Loginversuchen wurde &uuml;berschritten.<br>Pr&uuml;fen Sie bitte ihre Berechtigung.
+
+validator.00=Kein SAML:Assertion Objekt gefunden {0}
+validator.01=Im Subject kommt mehr als ein Element des Typs PhysicalPersonType vor {0}
+validator.02=Das verwendete Schlüsselformat eines öffentlichen Schlüssels ist unbekannt {0}
+validator.03=Der Namespace eines öffentlichen Schlüssels ist ungültig {0}
+validator.04=Es wurde ein SAML:Attribut ohne öffentlichen Schlüssel gefunden {0}
+validator.05=Es wurde {0} keine DSIG:Signature gefunden
+
+validator.06=Die Signatur ist ungültig
+validator.07=Das Zertifikat der Personenbindung ist ungültig.<br>{0}
+validator.08=Das Manifest ist ungültig
+validator.09=Die öffentlichen Schlüssel des Identitiy Link stimmen nicht mit dem retournierten Zertifikat überein
+
+validator.10=Anzahl der URLs zur Authentisierungskomponente ungültig {0}
+validator.11="Geschäftsbereich" wurde nicht in den SAML-Attributen gefunden {0}
+validator.12=Der Namespace des SAML-Attributs "Geschäftsbereich" ist ungültig {0}
+validator.13=Das Target des 'Geschäftsbereichs' ist ungültig {0}
+validator.14="OA" wurde nicht in den SAML-Attributen gefunden {0}
+validator.15=Der Namespace des SAML-Attributs "OA" ist ungültig {0}
+validator.16=Die vorkonfigurierte URL der OnlineApplikation ist fehlerhaft {0}
+
+validator.17= Der SubjectDN-Name des von MOA-SP retournierten Zertifikats ist ungültig {0}
+#validator.18= Der SubjectDN-Name des von MOA-SP retournierten Zertifikats ist nicht als gültiger SubjectDN-Name für eine Personenbindung konfiguriert. <b>{0}</b> wurde NICHT in der Konfiguration gefunden
+validator.18= Das Zertifikat mit dem die Personenbindung signiert wurde, ist nicht zum Signieren der Personenbindung zulässig. Es konnte weder der SubjectDN ({0}) einem berechtigten Namen zugeordnet werden, noch enthält das Zertifikat die Erweiterung "Eigenschaft zur Ausstellung von Personenbindungen".
+
+validator.19=Das verwendete Zertifikat zum Signieren ist ungültig.<br>{0}
+
+validator.21=Es konnte keine formal korrekte Zertifikatskette vom Signatorzertifikat zu einem vertrauenswürdigen Wurzelzertifikat konstruiert werden.
+validator.22=Eine formal korrekte Zertifikatskette vom Signatorzertifikat zu einem vertrauenswürdigen Wurzelzertifikat konnte konstruiert werden. Für zumindest ein Zertifikat dieser Kette fällt der Prüfzeitpunkt nicht in das Gültigkeitsintervall.
+validator.23=Eine formal korrekte Zertifikatskette vom Signatorzertifikat zu einem vertrauenswürdigen Wurzelzertifikat konnte konstruiert werden. Für alle Zertifikate dieser Kette fällt der Prüfzeitpunkt in das jeweilige Gültigkeitsintervall. Für zumindest ein Zertifikat konnte der Zertifikatstatus nicht festgestellt werden.
+validator.24=Eine formal korrekte Zertifikatskette vom Signatorzertifikat zu einem vertrauenswürdigen Wurzelzertifikat konnte konstruiert werden. Für alle Zertifikate dieser Kette fällt der Prüfzeitpunkt in das jeweilige Gültigkeitsintervall. Zumindest ein Zertifikat ist zum Prüfzeitpunkt widerrufen.
+validator.25=Eine formal korrekte Zertifikatskette vom Signatorzertifikat zu einem vertrauenswürdigen Wurzelzertifikat konnte konstruiert werden. Für alle Zertifikate dieser Kette fällt der Prüfzeitpunkt in das jeweilige Gültigkeitsintervall. Kein Zertifikat dieser Kette ist zum Prüfzeitpunkt widerrufen. Zumindest ein Zertifikat ist zum Prüfzeitpunkt gesperrt.
+
+validator.26=OA Applikation ist eine Wirtschaftsapplikation, trotzdem ist ein SAML-Attribut "Geschäftsbereich" enthalten
+validator.27=OA Applikation ist keine Wirtschaftsapplikation, trotzdem ist ein SAML-Attribut "wbPK" enthalten
+validator.28=Fehlerhafter Wert im "wbPK" SAML-Attribut {0}
+validator.29=Fehler beim Auslesen des "wbPK" SAML-Attributs {0}
+validator.30=Der Namespace des SAML-Attributs "wbPK" ist ungültig {0}
+validator.31="wbPK" wurde nicht in den SAML-Attributen gefunden {0}
+
+
+validator.32="Issuer" im AUTH-Block nicht vorhanden.
+validator.33="Issuer"-Attribut im AUTH-Block ("{0}") stimmt nicht mit dem Namen in der Personenbindung ("{1}") überein.
+validator.34=Das Geburtsdatum ({0}) stimmt nicht mit dem in der Personenbindung ({1}) überein.
+validator.35=Der Namespace des SAML-Attributs "Geburtsdatum" ist ungültig.
+validator.36=Die Anzahl der SAML-Attribute im AUTH-Block wurde verändert: {0} statt der erwarteten {1}
+validator.37=Die Reihenfolge der SAML-Attribute im AUTH-Block wurde verändert: Attribut "{0}" anstelle von Attribut "{1}" an der {2}. Position
+validator.38=Der {0} des SAML-Attributs Nummer {1} ({2}) im AUTH-Block ist ungültig: "{3}" anstelle von "{4}"
+validator.39=Der Austellungszeitpunkt (IssueInstant) im AUTH-Block wurde verändert: {0} anstelle von {1}. Möglicherweise wurde Ihre Bürgerkartenumgebung kompromittiert. Verwenden Sie Ihre Bürgerkarte bis auf weiteres nicht mehr, und setzen Sie sich umgehend mit dem Betreiber des Online-Dienstes, an dem Sie sich anmelden wollten, in Verbindung.
+
+
+validator.40=Überprüfung der {0}-Infobox fehlgeschlagen: {1}
+validator.41=Überprüfung der {0}-Infobox fehlgeschlagen: Keine Konfigurationsparameter zur Überprüfung der {0}-Infobox vorhanden.
+validator.42=Überprüfung der {0}-Infobox fehlgeschlagen: Es konnte keine geeignete Applikation zur Verifikation der {0}-Infobox geladen werden.
+validator.43=Überprüfung der {0}-Infobox fehlgeschlagen: Der InfoboxReadResponse für die {0}-Infobox konnte nicht erfolgreich geparst werden.
+validator.44=Überprüfung der {0}-Infobox fehlgeschlagen: In der {0}-Infobox Prüfapplikation ist ein Fehler aufgetreten.
+validator.45=Überprüfung der {0}-Infobox fehlgeschlagen: Der {1} des von der {0}-Infobox Prüfapplikation zurückgegebenen SAML-Attributes Nummer {2} ist {3}.
+validator.46=Überprüfung der {0}-Infobox fehlgeschlagen: Der Wert des von der Prüfapplikation zurückgegebenen SAML-Attributes Nummer {1} ist ungültig.
+validator.47=Überprüfung der {0}-Infobox fehlgeschlagen: Das von der Prüfapplikation zurückgegebene SAML-Attribut Nummer {1} kann nicht eindeutig zugeordnet werden.
+validator.48={0}-Infobox wurde nicht von der BKU übermittelt: Für die Anmeldung an dieser Online-Applikation ist die {0}-Infobox erforderlich. Bitte melden Sie sich erneut an, und selektieren Sie in Ihrer BKU die {0}-Infobox.
+
+validator.49=Beim Ermitteln der Personenbindungs-OID im Zertifikat, mit dem die Personenbindung signiert wurde, ist ein Fehler aufgetreten.
+
+validator.50=Transformationskette in der Signatur stimmt mit keiner Transformationskette aus dem Prüfprofil überein.
+
+validator.60=Überprüfung der {0}-Infobox fehlgeschlagen: Vollmachtenprüfung ist für diesen Typ von Vollmachten nicht aktiviert. Die übermittelte Vollmacht kann nicht für eine Anmeldung verwendet werden.
+validator.61=Überprüfung der {0}-Infobox fehlgeschlagen: Vollmachtenprüfung ist für diesen Typ von Vollmachten für berufliche Parteienvertreter nicht aktiviert. Die übermittelte Vollmacht kann nicht für eine Anmeldung verwendet werden.
+validator.62=Fehler in der Übermittlung: keine primäre Vollmacht übergeben.
+validator.63=Es ist ein Fehler bei der Formulargenerierung für berufliche Parteienvetretung aufgetreten.
+validator.64=Fehler beim Austausch von Vollmachtsdaten
+validator.65=Es ist ein Fehler bei der Formulargenerierung für berufliche Parteienvetretung aufgetreten - kein Formular zur Anzeige vorhanden.
+validator.66=Überprüfung der {0}-Infobox fehlgeschlagen: berufliche Parteienvetretung ist nicht konfiguriert.
+
+ssl.01=Validierung des SSL-Server-Endzertifikates hat fehlgeschlagen
diff --git a/id/server/idserverlib/src/main/resources/resources/templates/ParepMinTemplate.html b/id/server/idserverlib/src/main/resources/resources/templates/ParepMinTemplate.html
new file mode 100644
index 000000000..0ce83ba12
--- /dev/null
+++ b/id/server/idserverlib/src/main/resources/resources/templates/ParepMinTemplate.html
@@ -0,0 +1,135 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+<BASE href="<BASE_href>">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Berufsm&auml;&szlig;ige Parteieinvertretung</title>
+</head>
+<body>
+Berufsm&auml;&szlig;ige Parteienvertretung einer nat&uuml;rlichen/juristischen Person
+<form name="ProcessInputForm" method="post" accept-charset="UTF-8" enctype="application/x-www-form-urlencoded" action="<BKU>">
+ <table width="80%" border="0">
+ <tr/>
+ <tr/>
+ <tr>
+ <td colspan="3">
+ <em>Vertreter:</em></td>
+ </tr>
+ <tr>
+ <td align="right" width="20%">Vorname&nbsp;<img title=" Dieses Feld muss ausgef&uuml;llt sein!" alt="Stern" src="img/stern.gif" width="10" height="16" /></td>
+ <td ><input name="rpgivenname_" type="text" disabled="true" id="rpgivenname" value="<rpgivenname>" size="50" readonly="true" />
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td align="right">Name&nbsp;<img title=" Dieses Feld muss ausgef&uuml;llt sein!" alt="Stern" src="img/stern.gif" width="10" height="16" /></td>
+ <td><input name="rpfamilyname_" type="text" disabled="true" id="rpfamilyname" value="<rpfamilyname>" size="50" readonly="true" />
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td align="right">Geburtsdatum&nbsp;<img title=" Dieses Feld muss ausgef&uuml;llt sein!" alt="Stern" src="img/stern.gif" width="10" height="16" /></td>
+ <td><input name="rpdobyear_" type="text" disabled="true" id="rpdobyear" value="<rpdobyear>" size="4" maxlength="4" readonly="true" />
+ - <input name="rpdobmonth_" type="text" disabled="true" id="rpdobmonth" value="<rpdobmonth>" size="2" maxlength="2" readonly="true" />
+ - <input name="rpdobday_" type="text" disabled="true" id="rpdobday" value="<rpdobday>" size="2" maxlength="2" readonly="true" />
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td colspan="2"><br/>
+ <em>Ich bin berufsm&auml;&szlig;ig berechtigt f&uuml;r die nachfolgend genannte Person in deren Namen mit der B&uuml;rgerkarte einzuschreiten.</em></td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td colspan="3"><br/>
+ <em>Vertretene Person:</em></td>
+ </tr>
+ <tr>
+ <td colspan="3"><input name="physical_" type="radio" physdisabled="" value="true" physselected="" />&nbsp;nat&uuml;rliche Person:&nbsp;</td>
+ </tr>
+ <tr>
+ <td align="right">Vorname&nbsp;<img title=" Dieses Feld muss ausgef&uuml;llt sein!" alt="Stern" src="img/stern.gif" width="10" height="16" /></td>
+ <td><input name="givenname_" type="text" id="givenname" value="<givenname>" physdisabled="" size="50" />&nbsp;<img src="img/info.gif" title="Vorname laut ZMR Schreibweise" alt="Info" border="0"/>
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td align="right">Name&nbsp;<img title=" Dieses Feld muss ausgef&uuml;llt sein!" alt="Stern" src="img/stern.gif" width="10" height="16" /></td>
+ <td><input name="familyname_" type="text" id="familyname" value="<familyname>" physdisabled="" size="50" />&nbsp;<img src="img/info.gif" title="Familienname laut ZMR Schreibweise" alt="Info" border="0"/>
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td align="right">Geburtsdatum&nbsp;<img title=" Dieses Feld muss ausgef&uuml;llt sein!" alt="Stern" src="img/stern.gif" width="10" height="16" /></td>
+ <td><input name="dobyear_" type="text" id="dobyear" size="4" maxlength="4" value="<dobyear>" physdisabled="" />
+ - <input name="dobmonth_" type="text" id="dobmonth" size="2" maxlength="2" value="<dobmonth>" physdisabled="" />
+ - <input name="dobday_" type="text" id="dobday" size="2" maxlength="2" value="<dobday>" physdisabled="" />&nbsp;<img src="img/info.gif" title="Format: JJJJ-MM-TT" alt="Info" border="0"/>
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td align="center"><em>optional:</em></td>
+ <td colspan="2"/>
+ </tr>
+ <tr>
+ <td align="right">Stra&szlig;e&nbsp;</td>
+ <td><input name="streetname_" type="text" id="streetname" value="<streetname>" physdisabled="" size="50" />&nbsp;<img src="img/info.gif" title="Stra&szlig;e laut ZMR Schreibweise" border="0"/>
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td align="right">Hausnummer&nbsp;</td>
+ <td><input name="buildingnumber_" type="text" id="buildingnumber" value="<buildingnumber>" physdisabled="" size="50" />&nbsp;<img src="img/info.gif" title="Hausnummer laut ZMR Schreibweise" alt="Info" border="0"/>
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td align="right">Einh. Nr.&nbsp;</td>
+ <td><input name="unit_" type="text" id="unit" value="<unit>" size="50" physdisabled="" />&nbsp;<img src="img/info.gif" title="Nutzungseinheitsnummer laut ZMR Schreibweise" alt="Info" border="0"/>
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td align="right">Postleitzahl&nbsp;</td>
+ <td><input name="postalcode_" type="text" id="postalcode" value="<postalcode>" size="50" physdisabled="" />&nbsp;<img src="img/info.gif" title="Postleitzahl laut ZMR Schreibweise" alt="Info" border="0"/>
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td align="right">Gemeinde&nbsp;</td>
+ <td><input name="municipality_" type="text" id="municipality" value="<municipality>" size="50" physdisabled="" />&nbsp;<img src="img/info.gif" title="Gemeinde laut ZMR Schreibweise" alt="Info" border="0"/>
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td colspan="3">&nbsp;</td>
+ </tr>
+ <tr>
+ <td colspan="3"><input name="physical_" type="radio" cbdisabled="" value="false" cbselected=""/ >&nbsp;juristische Person:&nbsp;</td>
+ </tr>
+ <tr>
+ <td align="right">Name&nbsp;<img title=" Dieses Feld muss ausgef&uuml;llt sein!" src="img/stern.gif" alt="Stern" width="10" height="16" /></td>
+ <td><input name="fullname_" type="text" cbdisabled="" id="fullname" value="<fullname>" size="50" />&nbsp;<img src="img/info.gif" title="Name der Organisation laut ZMR Schreibweise" alt="Info" border="0"/>
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td align="right" nowrap="nowrap"><select name="cbidentificationtype_" size="1" cbseldisabled="">
+ <option value="urn:publicid:gv.at:baseid+XFN" fnselected="">Firmenbuchnummer</option>
+ <option value="urn:publicid:gv.at:baseid+XZVR" vrselected="">Vereinsnummer</option>
+ <option value="urn:publicid:gv.at:baseid+XERSB" ersbselected="">Ord.Nr.im Erg&auml;nzungsreg.</option>
+ </select>&nbsp;<img title=" Dieses Feld muss ausgef&uuml;llt sein!" src="img/stern.gif" alt="Stern" width="10" height="16" /></td>
+ <td><input name="cbidentificationvalue_" type="text" cbdisabled="" id="cbidentificationvalue" value="<cbidentificationvalue>" size="50" />&nbsp;<img src="img/info.gif" title="Ordnungsbegriff laut ZMR Schreibweise" alt="Info" border="0" />
+ </td>
+ <td></td>
+ </tr>
+ </table>
+ <br/><errortext>
+ <p><em>Bitte halten Sie Ihre B&uuml;rgerkartenumgebung bereit.</em></p> <p>
+ <input name="XMLRequest" type="hidden" value="&lt;?xml version='1.0' encoding='UTF-8'?>&lt;NullOperationRequest xmlns='http://www.buergerkarte.at/namespaces/securitylayer/1.2#'/>"/>
+ <input name="DataURL" type="hidden" value="<DataURL>"/>
+ <input type="submit" name="Submit" value=" Weiter "/>
+ <input name="Clear" type="reset" id="Clear" value="Formular zur&uuml;cksetzen"/></p><br/>
+</form>
+</body>
+</html>
diff --git a/id/server/idserverlib/src/main/resources/resources/templates/ParepTemplate.html b/id/server/idserverlib/src/main/resources/resources/templates/ParepTemplate.html
new file mode 100644
index 000000000..cd3221b6e
--- /dev/null
+++ b/id/server/idserverlib/src/main/resources/resources/templates/ParepTemplate.html
@@ -0,0 +1,171 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+
+<html>
+<head>
+<BASE href="<BASE_href>">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Berufsm&auml;&szlig;ige Parteieinvertretung</title>
+<link href="css/styles.css" type="text/css" rel="stylesheet">
+<link href="css/styles_opera.css" type="text/css" rel="stylesheet">
+<link href="css/mandates.css" type="text/css" rel="stylesheet">
+
+<script src="formallg.js" type="text/javascript"></script>
+<script src="fa.js" type="text/javascript"></script>
+</head>
+<body>
+
+
+<div class="hleft">
+<!--Stammzahlenregisterbehörde<br/>-->&nbsp;
+<!--Ballhausplatz 2<br/>-->
+<!--1014 Wien-->
+</div>
+<div class="hright" align="right"><img src="img/egov_schrift.gif" alt="E-Gov Logo"/></div>
+<div class="htitle" align="left">
+ <h1>Berufsm&auml;&szlig;ige Parteienvertretung</h1>
+</div>
+<div class="leiste1" align="center">
+Bitte beachten Sie
+</div>
+<div class="leiste2" align="center">
+</div>
+<div class="leiste3">
+<img title=" Dieses Feld muss ausgefüllt sein!" alt="Stern" src="img/stern.gif" width="10" height="16" />&nbsp; Feld muss ausgef&uuml;llt sein
+</div>
+<div class="leiste3">
+<img title=" Hilfe zum Ausfüllen " alt="Info" src="img/info.gif" width="10" height="16" />&nbsp; Ausf&uuml;llhilfe
+</div>
+<div class="leiste3">
+<img title=" Angabe bitte ergänzen oder richtig stellen! " alt="Rufezeichen" src="img/rufezeichen.gif" width="10" height="16" />&nbsp; Fehlerhinweis</div>
+<div style="clear: both">&nbsp;</div>
+
+<h2>Berufsm&auml;&szlig;ige Parteienvertretung einer nat&uuml;rlichen/juristischen Person
+</h2>
+<div class="boundingbox">
+<form name="ProcessInputForm" method="post" accept-charset="UTF-8" enctype="application/x-www-form-urlencoded" action="<BKU>">
+ <table width="80%" border="0">
+ <tr/>
+ <tr/>
+ <tr>
+ <td colspan="3">
+ <em>Vertreter:</em></td>
+ </tr>
+ <tr>
+ <td align="right" width="20%">Vorname&nbsp;<img title=" Dieses Feld muss ausgef&uuml;llt sein!" alt="Stern" src="img/stern.gif" width="10" height="16" /></td>
+ <td ><input name="rpgivenname_" type="text" disabled="true" id="rpgivenname" value="<rpgivenname>" size="50" readonly="true" />
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td align="right">Name&nbsp;<img title=" Dieses Feld muss ausgef&uuml;llt sein!" alt="Stern" src="img/stern.gif" width="10" height="16" /></td>
+ <td><input name="rpfamilyname_" type="text" disabled="true" id="rpfamilyname" value="<rpfamilyname>" size="50" readonly="true" />
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td align="right">Geburtsdatum&nbsp;<img title=" Dieses Feld muss ausgef&uuml;llt sein!" alt="Stern" src="img/stern.gif" width="10" height="16" /></td>
+ <td><input name="rpdobyear_" type="text" disabled="true" id="rpdobyear" value="<rpdobyear>" size="4" maxlength="4" readonly="true" />
+ - <input name="rpdobmonth_" type="text" disabled="true" id="rpdobmonth" value="<rpdobmonth>" size="2" maxlength="2" readonly="true" />
+ - <input name="rpdobday_" type="text" disabled="true" id="rpdobday" value="<rpdobday>" size="2" maxlength="2" readonly="true" />
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td colspan="2"><br/>
+ <em>Ich bin berufsm&auml;&szlig;ig berechtigt f&uuml;r die nachfolgend genannte Person in deren Namen mit der B&uuml;rgerkarte einzuschreiten.</em></td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td colspan="3"><br/>
+ <em>Vertretene Person:</em></td>
+ </tr>
+ <tr>
+ <td colspan="3"><input name="physical_" type="radio" physdisabled="" value="true" physselected="" />&nbsp;nat&uuml;rliche Person:&nbsp;</td>
+ </tr>
+ <tr>
+ <td align="right">Vorname&nbsp;<img title=" Dieses Feld muss ausgef&uuml;llt sein!" alt="Stern" src="img/stern.gif" width="10" height="16" /></td>
+ <td><input name="givenname_" type="text" id="givenname" value="<givenname>" physdisabled="" size="50" />&nbsp;<img src="img/info.gif" title="Vorname laut ZMR Schreibweise" alt="Info" border="0"/>
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td align="right">Name&nbsp;<img title=" Dieses Feld muss ausgef&uuml;llt sein!" alt="Stern" src="img/stern.gif" width="10" height="16" /></td>
+ <td><input name="familyname_" type="text" id="familyname" value="<familyname>" physdisabled="" size="50" />&nbsp;<img src="img/info.gif" title="Familienname laut ZMR Schreibweise" alt="Info" border="0"/>
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td align="right">Geburtsdatum&nbsp;<img title=" Dieses Feld muss ausgef&uuml;llt sein!" alt="Stern" src="img/stern.gif" width="10" height="16" /></td>
+ <td><input name="dobyear_" type="text" id="dobyear" size="4" maxlength="4" value="<dobyear>" physdisabled="" />
+ - <input name="dobmonth_" type="text" id="dobmonth" size="2" maxlength="2" value="<dobmonth>" physdisabled="" />
+ - <input name="dobday_" type="text" id="dobday" size="2" maxlength="2" value="<dobday>" physdisabled="" />&nbsp;<img src="img/info.gif" title="Format: JJJJ-MM-TT" alt="Info" border="0"/>
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td align="center"><em>optional:</em></td>
+ <td colspan="2"/>
+ </tr>
+ <tr>
+ <td align="right">Stra&szlig;e&nbsp;</td>
+ <td><input name="streetname_" type="text" id="streetname" value="<streetname>" physdisabled="" size="50" />&nbsp;<img src="img/info.gif" title="Stra&szlig;e laut ZMR Schreibweise" border="0"/>
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td align="right">Hausnummer&nbsp;</td>
+ <td><input name="buildingnumber_" type="text" id="buildingnumber" value="<buildingnumber>" physdisabled="" size="50" />&nbsp;<img src="img/info.gif" title="Hausnummer laut ZMR Schreibweise" alt="Info" border="0"/>
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td align="right">Einh. Nr.&nbsp;</td>
+ <td><input name="unit_" type="text" id="unit" value="<unit>" size="50" physdisabled="" />&nbsp;<img src="img/info.gif" title="Nutzungseinheitsnummer laut ZMR Schreibweise" alt="Info" border="0"/>
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td align="right">Postleitzahl&nbsp;</td>
+ <td><input name="postalcode_" type="text" id="postalcode" value="<postalcode>" size="50" physdisabled="" />&nbsp;<img src="img/info.gif" title="Postleitzahl laut ZMR Schreibweise" alt="Info" border="0"/>
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td align="right">Gemeinde&nbsp;</td>
+ <td><input name="municipality_" type="text" id="municipality" value="<municipality>" size="50" physdisabled="" />&nbsp;<img src="img/info.gif" title="Gemeinde laut ZMR Schreibweise" alt="Info" border="0"/>
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td colspan="3">&nbsp;</td>
+ </tr>
+ <tr>
+ <td colspan="3"><input name="physical_" type="radio" cbdisabled="" value="false" cbselected=""/ >&nbsp;juristische Person:&nbsp;</td>
+ </tr>
+ <tr>
+ <td align="right">Name&nbsp;<img title=" Dieses Feld muss ausgef&uuml;llt sein!" src="img/stern.gif" alt="Stern" width="10" height="16" /></td>
+ <td><input name="fullname_" type="text" cbdisabled="" id="fullname" value="<fullname>" size="50" />&nbsp;<img src="img/info.gif" title="Name der Organisation laut ZMR Schreibweise" alt="Info" border="0"/>
+ </td>
+ <td></td>
+ </tr>
+ <tr>
+ <td align="right" nowrap="nowrap"><select name="cbidentificationtype_" size="1" cbseldisabled="">
+ <option value="urn:publicid:gv.at:baseid+XFN" fnselected="">Firmenbuchnummer</option>
+ <option value="urn:publicid:gv.at:baseid+XZVR" vrselected="">Vereinsnummer</option>
+ <option value="urn:publicid:gv.at:baseid+XERSB" ersbselected="">Ord.Nr.im Erg&auml;nzungsreg.</option>
+ </select>&nbsp;<img title=" Dieses Feld muss ausgef&uuml;llt sein!" src="img/stern.gif" alt="Stern" width="10" height="16" /></td>
+ <td><input name="cbidentificationvalue_" type="text" cbdisabled="" id="cbidentificationvalue" value="<cbidentificationvalue>" size="50" />&nbsp;<img src="img/info.gif" title="Ordnungsbegriff laut ZMR Schreibweise" alt="Info" border="0" />
+ </td>
+ <td></td>
+ </tr>
+ </table>
+ <br/><errortext>
+ <p><em>Bitte halten Sie Ihre B&uuml;rgerkartenumgebung bereit.</em></p> <p>
+ <input name="XMLRequest" type="hidden" value="&lt;?xml version='1.0' encoding='UTF-8'?>&lt;NullOperationRequest xmlns='http://www.buergerkarte.at/namespaces/securitylayer/1.2#'/>"/>
+ <input name="DataURL" type="hidden" value="<DataURL>"/>
+ <input type="submit" name="Submit" value=" Weiter "/>
+ <input name="Clear" type="reset" id="Clear" value="Formular zur&uuml;cksetzen"/></p><br/>
+</form>
+</div>
+</body>
+</html>
diff --git a/id/server/idserverlib/src/main/resources/resources/wsdl/MOA-ID-1.0.wsdl b/id/server/idserverlib/src/main/resources/resources/wsdl/MOA-ID-1.0.wsdl
new file mode 100644
index 000000000..5751b3e58
--- /dev/null
+++ b/id/server/idserverlib/src/main/resources/resources/wsdl/MOA-ID-1.0.wsdl
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="MOA" targetNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" xmlns:moa="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/ http://schemas.xmlsoap.org/wsdl/">
+ <import namespace="http://reference.e-government.gv.at/namespace/moa/20020822#" location="MOA-20020812.xsd"/>
+ <message name="GetAuthenticationDataInput">
+ <part name="body" element="samlp:Request"/>
+ </message>
+ <message name="GetAuthenticationDataOutput">
+ <part name="body" element="samlp:Response"/>
+ </message>
+ <message name="MOAFault">
+ <part name="body" element="moa:ErrorResponse"/>
+ </message>
+ <portType name="IdentificationPortType">
+ <operation name="getAuthenticationData">
+ <input message="tns:GetAuthenticationDataInput"/>
+ <output message="tns:GetAuthenticationDataOutput"/>
+ <fault name="MOAFault" message="tns:MOAFault"/>
+ </operation>
+ </portType>
+ <binding name="IdentificationBinding" type="tns:IdentificationPortType" xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/soap/ http://schemas.xmlsoap.org/wsdl/soap/">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="getAuthenticationData">
+ <soap:operation soapAction="urn:GetAuthenticationDataAction"/>
+ <input>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </output>
+ <fault name="MOAFault">
+ <soap:fault name="MOAFault" use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </fault>
+ </operation>
+ </binding>
+ <service name="GetAuthenticationDataService">
+ <port name="IdentificationPort" binding="tns:IdentificationBinding">
+ <soap:address location="http://localhost/moa-id-auth/services/GetAuthenticationData"/>
+ </port>
+ </service>
+</definitions>
diff --git a/id/server/idserverlib/src/main/resources/resources/wsdl/MOA-ID-1.x.wsdl b/id/server/idserverlib/src/main/resources/resources/wsdl/MOA-ID-1.x.wsdl
new file mode 100644
index 000000000..45152cb38
--- /dev/null
+++ b/id/server/idserverlib/src/main/resources/resources/wsdl/MOA-ID-1.x.wsdl
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="MOA" targetNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" xmlns:moa="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/ http://schemas.xmlsoap.org/wsdl/">
+ <import namespace="http://reference.e-government.gv.at/namespace/moa/20020822#" location="../resources/schemas/MOA-SPSS-1.2.xsd"/>
+ <message name="GetAuthenticationDataInput">
+ <part name="body" element="samlp:Request"/>
+ </message>
+ <message name="GetAuthenticationDataOutput">
+ <part name="body" element="samlp:Response"/>
+ </message>
+ <message name="MOAFault">
+ <part name="body" element="moa:ErrorResponse"/>
+ </message>
+ <portType name="IdentificationPortType">
+ <operation name="getAuthenticationData">
+ <input message="tns:GetAuthenticationDataInput"/>
+ <output message="tns:GetAuthenticationDataOutput"/>
+ <fault name="MOAFault" message="tns:MOAFault"/>
+ </operation>
+ </portType>
+ <binding name="IdentificationBinding" type="tns:IdentificationPortType" xsi:schemaLocation="http://schemas.xmlsoap.org/wsdl/soap/ http://schemas.xmlsoap.org/wsdl/soap/">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="getAuthenticationData">
+ <soap:operation soapAction="urn:GetAuthenticationDataAction"/>
+ <input>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </output>
+ <fault name="MOAFault">
+ <soap:fault name="MOAFault" use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </fault>
+ </operation>
+ </binding>
+ <service name="GetAuthenticationDataService">
+ <port name="IdentificationPort" binding="tns:IdentificationBinding">
+ <soap:address location="http://localhost/Identification"/>
+ </port>
+ </service>
+</definitions>
diff --git a/id/server/idserverlib/src/main/resources/resources/wsdl/MOA-SPSS-1.2.xsd b/id/server/idserverlib/src/main/resources/resources/wsdl/MOA-SPSS-1.2.xsd
new file mode 100644
index 000000000..d7a06d6e7
--- /dev/null
+++ b/id/server/idserverlib/src/main/resources/resources/wsdl/MOA-SPSS-1.2.xsd
@@ -0,0 +1,454 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ MOA SP/SS 1.2 Schema
+-->
+<xsd:schema targetNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.2">
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+ <!--########## Create XML Signature ###-->
+ <!--### Create XML Signature Request ###-->
+ <xsd:element name="CreateXMLSignatureRequest">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="CreateXMLSignatureRequestType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:complexType name="CreateXMLSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="KeyIdentifier" type="KeyIdentifierType"/>
+ <xsd:element name="SingleSignatureInfo" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Ermöglichung der Stapelsignatur durch wiederholte Angabe dieses Elements</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="DataObjectInfo" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="DataObjectInfoType">
+ <xsd:attribute name="ChildOfManifest" type="xsd:boolean" use="optional" default="false"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="CreateSignatureInfo" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="CreateSignatureEnvironment" type="ContentOptionalRefType"/>
+ <xsd:choice>
+ <xsd:annotation>
+ <xsd:documentation>Auswahl: Entweder explizite Angabe des Signaturorts sowie ggf. sinnvoller Supplements im Zshg. mit der Signaturumgebung, oder Verweis auf ein benanntes Profil</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element ref="CreateSignatureEnvironmentProfile"/>
+ <xsd:element name="CreateSignatureEnvironmentProfileID" type="ProfileIdentifierType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="SecurityLayerConformity" type="xsd:boolean" use="optional" default="true"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Create XML Signature Response ###-->
+ <xsd:complexType name="CreateXMLSignatureResponseType">
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Kardinalität 1..oo erlaubt die Antwort auf eine Stapelsignatur-Anfrage</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element name="SignatureEnvironment">
+ <xsd:annotation>
+ <xsd:documentation>Resultat, falls die Signaturerstellung erfolgreich war</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="lax"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element ref="ErrorResponse"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:element name="CreateXMLSignatureResponse" type="CreateXMLSignatureResponseType"/>
+ <!--########## Verify CMS Signature ###-->
+ <!--### Verifiy CMS Signature Request ###-->
+ <xsd:element name="VerifyCMSSignatureRequest">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="VerifyCMSSignatureRequestType">
+ <xsd:attribute name="Signatories" type="SignatoriesType" use="optional" default="1"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:complexType name="VerifyCMSSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="DateTime" type="xsd:dateTime" minOccurs="0"/>
+ <xsd:element name="CMSSignature" type="xsd:base64Binary"/>
+ <xsd:element name="DataObject" type="CMSDataObjectOptionalMetaType" minOccurs="0"/>
+ <xsd:element name="TrustProfileID">
+ <xsd:annotation>
+ <xsd:documentation>mit diesem Profil wird eine Menge von vertrauenswürdigen Wurzelzertifikaten spezifiziert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Verify CMS Signature Response ###-->
+ <xsd:element name="VerifyCMSSignatureResponse" type="VerifyCMSSignatureResponseType"/>
+ <xsd:complexType name="VerifyCMSSignatureResponseType">
+ <xsd:sequence maxOccurs="unbounded">
+ <xsd:element name="SignerInfo" type="dsig:KeyInfoType">
+ <xsd:annotation>
+ <xsd:documentation>only ds:X509Data and RetrievalMethod is supported; QualifiedCertificate is included as X509Data/any;publicAuthority is included as X509Data/any</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="SignatureCheck" type="CheckResultType"/>
+ <xsd:element name="CertificateCheck" type="CheckResultType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--########## Verify XML Signature ###-->
+ <!--### Verify XML Signature Request ###-->
+ <xsd:element name="VerifyXMLSignatureRequest" type="VerifyXMLSignatureRequestType"/>
+ <xsd:complexType name="VerifyXMLSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="DateTime" type="xsd:dateTime" minOccurs="0"/>
+ <xsd:element name="VerifySignatureInfo">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="VerifySignatureEnvironment" type="ContentOptionalRefType"/>
+ <xsd:element name="VerifySignatureLocation" type="xsd:token"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element ref="SupplementProfile"/>
+ <xsd:element name="SupplementProfileID" type="xsd:string"/>
+ </xsd:choice>
+ <xsd:element name="SignatureManifestCheckParams" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ReferenceInfo" type="VerifyTransformsDataType" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Pro dsig:Reference-Element in der zu überprüfenden XML-Signatur muss hier ein ReferenceInfo-Element erscheinen. Die Reihenfolge der einzelnen ReferenceInfo Elemente entspricht jener der dsig:Reference Elemente in der XML-Signatur.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="ReturnReferenceInputData" type="xsd:boolean" use="optional" default="true"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ReturnHashInputData" minOccurs="0"/>
+ <xsd:element name="TrustProfileID">
+ <xsd:annotation>
+ <xsd:documentation>mit diesem Profil wird eine Menge von vertrauenswürdigen Wurzelzertifikaten spezifiziert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Verify XML Signature Response ###-->
+ <xsd:element name="VerifyXMLSignatureResponse" type="VerifyXMLSignatureResponseType"/>
+ <xsd:complexType name="VerifyXMLSignatureResponseType">
+ <xsd:sequence>
+ <xsd:element name="SignerInfo" type="dsig:KeyInfoType">
+ <xsd:annotation>
+ <xsd:documentation>only ds:X509Data and ds:RetrievalMethod is supported; QualifiedCertificate is included as X509Data/any; PublicAuthority is included as X509Data/any</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="HashInputData" type="ContentExLocRefBaseType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="ReferenceInputData" type="ContentExLocRefBaseType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="SignatureCheck" type="ReferencesCheckResultType"/>
+ <xsd:element name="SignatureManifestCheck" type="ReferencesCheckResultType" minOccurs="0"/>
+ <xsd:element name="XMLDSIGManifestCheck" type="ManifestRefsCheckResultType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="CertificateCheck" type="CheckResultType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:simpleType name="ProfileIdentifierType">
+ <xsd:restriction base="xsd:token"/>
+ </xsd:simpleType>
+ <xsd:complexType name="MetaInfoType">
+ <xsd:sequence>
+ <xsd:element name="MimeType" type="MimeTypeType"/>
+ <xsd:element name="Description" type="xsd:anyURI" minOccurs="0"/>
+ <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="FinalDataMetaInfoType">
+ <xsd:complexContent>
+ <xsd:extension base="MetaInfoType">
+ <xsd:sequence>
+ <xsd:element name="Type" type="xsd:anyURI" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="DataObjectInfoType">
+ <xsd:sequence>
+ <xsd:element name="DataObject">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="ContentOptionalRefType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:choice>
+ <xsd:annotation>
+ <xsd:documentation>Auswahl: Entweder explizite Angabe EINER Transformationskette inklusive ggf. sinnvoller Supplements oder Verweis auf ein benanntes Profil</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element ref="CreateTransformsInfoProfile"/>
+ <xsd:element name="CreateTransformsInfoProfileID" type="ProfileIdentifierType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ <xsd:attribute name="Structure" use="required">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="detached"/>
+ <xsd:enumeration value="enveloping"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ </xsd:complexType>
+ <xsd:complexType name="TransformsInfoType">
+ <xsd:sequence>
+ <xsd:element ref="dsig:Transforms" minOccurs="0"/>
+ <xsd:element name="FinalDataMetaInfo" type="FinalDataMetaInfoType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="XMLDataObjectAssociationType">
+ <xsd:sequence>
+ <xsd:element name="MetaInfo" type="MetaInfoType" minOccurs="0"/>
+ <xsd:element name="Content" type="ContentRequiredRefType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CMSDataObjectOptionalMetaType">
+ <xsd:sequence>
+ <xsd:element name="MetaInfo" type="MetaInfoType" minOccurs="0"/>
+ <xsd:element name="Content" type="CMSContentBaseType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CMSContentBaseType">
+ <xsd:complexContent>
+ <xsd:restriction base="ContentOptionalRefType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ </xsd:choice>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="AnyChildrenType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ReferencesCheckResultType">
+ <xsd:complexContent>
+ <xsd:restriction base="CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="ReferencesCheckResultInfoType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ReferencesCheckResultInfoType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:restriction base="AnyChildrenType">
+ <xsd:sequence>
+ <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="FailedReference" type="xsd:positiveInteger" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ManifestRefsCheckResultType">
+ <xsd:complexContent>
+ <xsd:restriction base="CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="ManifestRefsCheckResultInfoType"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ManifestRefsCheckResultInfoType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:restriction base="AnyChildrenType">
+ <xsd:sequence>
+ <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="FailedReference" type="xsd:positiveInteger" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="ReferringSigReference" type="xsd:positiveInteger"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <!--########## Error Response ###-->
+ <xsd:element name="ErrorResponse" type="ErrorResponseType">
+ <xsd:annotation>
+ <xsd:documentation>Resultat, falls die Signaturerstellung gescheitert ist</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:complexType name="ErrorResponseType">
+ <xsd:sequence>
+ <xsd:element name="ErrorCode" type="xsd:integer"/>
+ <xsd:element name="Info" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--########## Auxiliary Types ###-->
+ <xsd:simpleType name="KeyIdentifierType">
+ <xsd:restriction base="xsd:string"/>
+ </xsd:simpleType>
+ <xsd:simpleType name="KeyStorageType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="Software"/>
+ <xsd:enumeration value="Hardware"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="MimeTypeType">
+ <xsd:restriction base="xsd:token"/>
+ </xsd:simpleType>
+ <xsd:complexType name="AnyChildrenType" mixed="true">
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="XMLContentType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:extension base="AnyChildrenType">
+ <xsd:attribute ref="xml:space" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ContentBaseType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ <xsd:element name="LocRefContent" type="xsd:anyURI"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:complexType name="ContentExLocRefBaseType">
+ <xsd:complexContent>
+ <xsd:restriction base="ContentBaseType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ </xsd:choice>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ContentOptionalRefType">
+ <xsd:complexContent>
+ <xsd:extension base="ContentBaseType">
+ <xsd:attribute name="Reference" type="xsd:anyURI" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ContentRequiredRefType">
+ <xsd:complexContent>
+ <xsd:restriction base="ContentOptionalRefType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ <xsd:element name="LocRefContent" type="xsd:anyURI"/>
+ </xsd:choice>
+ <xsd:attribute name="Reference" type="xsd:anyURI" use="required"/>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="VerifyTransformsDataType">
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Ein oder mehrere Transformationswege können von der Applikation an MOA mitgeteilt werden. Die zu prüfende Signatur hat zumindest einem dieser Transformationswege zu entsprechen. Die Angabe kann explizit oder als Profilbezeichner erfolgen.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element ref="VerifyTransformsInfoProfile"/>
+ <xsd:element name="VerifyTransformsInfoProfileID" type="xsd:string">
+ <xsd:annotation>
+ <xsd:documentation>Profilbezeichner für einen Transformationsweg</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:element name="QualifiedCertificate"/>
+ <xsd:element name="PublicAuthority" type="PublicAuthorityType"/>
+ <xsd:complexType name="PublicAuthorityType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:string" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:simpleType name="SignatoriesType">
+ <xsd:union memberTypes="AllSignatoriesType">
+ <xsd:simpleType>
+ <xsd:list itemType="xsd:positiveInteger"/>
+ </xsd:simpleType>
+ </xsd:union>
+ </xsd:simpleType>
+ <xsd:simpleType name="AllSignatoriesType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="all"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:complexType name="CreateSignatureLocationType">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:token">
+ <xsd:attribute name="Index" type="xsd:nonNegativeInteger" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ <xsd:complexType name="TransformParameterType">
+ <xsd:choice minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Die Angabe des Transformationsparameters (explizit oder als Hashwert) kann unterlassen werden, wenn die Applikation von der Unveränderlichkeit des Inhalts der in "Transformationsparamter", Attribut "URI" angegebenen URI ausgehen kann.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element name="Base64Content" type="xsd:base64Binary">
+ <xsd:annotation>
+ <xsd:documentation>Der Transformationsparameter explizit angegeben.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="Hash">
+ <xsd:annotation>
+ <xsd:documentation>Der Hashwert des Transformationsparameters.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="dsig:DigestMethod"/>
+ <xsd:element ref="dsig:DigestValue"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ <xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:element name="CreateSignatureEnvironmentProfile">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="CreateSignatureLocation" type="CreateSignatureLocationType"/>
+ <xsd:element name="Supplement" type="XMLDataObjectAssociationType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="VerifyTransformsInfoProfile">
+ <xsd:annotation>
+ <xsd:documentation>Explizite Angabe des Transformationswegs</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="dsig:Transforms" minOccurs="0"/>
+ <xsd:element name="TransformParameter" type="TransformParameterType" minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Alle impliziten Transformationsparameter, die zum Durchlaufen der oben angeführten Transformationskette bekannt sein müssen, müssen hier angeführt werden. Das Attribut "URI" bezeichnet den Transformationsparameter in exakt jener Weise, wie er in der zu überprüfenden Signatur gebraucht wird.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Supplement" type="XMLDataObjectAssociationType"/>
+ <xsd:element name="SupplementProfile" type="XMLDataObjectAssociationType"/>
+ <xsd:element name="CreateTransformsInfoProfile">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="CreateTransformsInfo" type="TransformsInfoType"/>
+ <xsd:element ref="Supplement" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+</xsd:schema>
diff --git a/id/server/idserverlib/src/main/resources/resources/xmldata/CertInfoDsigSignature.xml b/id/server/idserverlib/src/main/resources/resources/xmldata/CertInfoDsigSignature.xml
new file mode 100644
index 000000000..7896cb399
--- /dev/null
+++ b/id/server/idserverlib/src/main/resources/resources/xmldata/CertInfoDsigSignature.xml
@@ -0,0 +1,139 @@
+<dsig:Signature Id="HS_signature" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:SignedInfo><dsig:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><dsig:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/><dsig:Reference Id="reference-data-1" URI="#signed-data"><dsig:Transforms><dsig:Transform Algorithm="http://www.w3.org/2002/06/xmldsig-filter2"><xf2:XPath Filter="intersect" xmlns:xf2="http://www.w3.org/2002/06/xmldsig-filter2">id(&apos;signed-data&apos;)/node()</xf2:XPath></dsig:Transform></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>C0hW5jQojphweuFzPb+CNkHwhe4=</dsig:DigestValue></dsig:Reference><dsig:Reference Type="http://uri.etsi.org/01903/v1.1.1#SignedProperties" URI="#refetsi"><dsig:Transforms><dsig:Transform Algorithm="http://www.w3.org/2002/06/xmldsig-filter2"><xf2:XPath Filter="intersect" xmlns:etsi="http://uri.etsi.org/01903/v1.1.1#" xmlns:xf2="http://www.w3.org/2002/06/xmldsig-filter2">id(&apos;refetsi&apos;)/etsi:QualifyingProperties/etsi:SignedProperties</xf2:XPath></dsig:Transform></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>Bdsc7wAfyMyZ21ChcF+tRh3D7sU=</dsig:DigestValue></dsig:Reference></dsig:SignedInfo><dsig:SignatureValue>lCz3hDQMbqRMmCieG3fQFax3f8JX86gDi7mf4h03J7vlJjSOJQ4Wh/3Kd81ntKuh
+qFphj2cEhQYX08e6SeaU+7H7qdRa+xFRDRGav8L5x5xCUQT2SV+2/hx0C7UuJt+p
+tewtbqVAcNxgKPlBuIzyXGOrBdiinp1KftEQoVCpPCI=</dsig:SignatureValue><dsig:KeyInfo><dsig:X509Data><dsig:X509Certificate>MIIFJTCCBA2gAwIBAgICGTcwDQYJKoZIhvcNAQEFBQAwgaExCzAJBgNVBAYTAkFU
+MUgwRgYDVQQKEz9BLVRydXN0IEdlcy4gZi4gU2ljaGVyaGVpdHNzeXN0ZW1lIGlt
+IGVsZWt0ci4gRGF0ZW52ZXJrZWhyIEdtYkgxIzAhBgNVBAsTGmEtc2lnbi1URVNU
+LVByZW1pdW0tRW5jLTAxMSMwIQYDVQQDExphLXNpZ24tVEVTVC1QcmVtaXVtLUVu
+Yy0wMTAeFw0wMzAyMTAxMzIwNThaFw0wNjAyMTAxMzIwNThaMGoxCzAJBgNVBAYT
+AkFUMRwwGgYDVQQDExNUZXN0cGVyc29uIE1PQTQgQlJaMQwwCgYDVQQEEwNCUlox
+GDAWBgNVBCoTD1Rlc3RwZXJzb24gTU9BNDEVMBMGA1UEBRMMNzkwMTg3NDYxNjMz
+MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDS/UW1/tZeCh7HHQmj8auUTEc4
+edAgRDkUVKOm0tF3kE3WZlhGDZL0p84xsdIKyI+bwDCMATATkQwDo/Xxn9jJMi4/
+t80bNyRsHk9giA0wcvz9NgmEcDwKNqawGsR9gNeK8TyIC8AuDkj1EwtkAObMvtp/
+Z1phi47x3JxDDfGDpQIDAQABo4ICHzCCAhswEwYDVR0jBAwwCoAIS7OAw3GTPNgw
+JwYIKwYBBQUHAQMBAf8EGDAWMAgGBgQAjkYBATAKBggrBgEFBQcLATCBggYIKwYB
+BQUHAQEEdjB0MCkGCCsGAQUFBzABhh1odHRwOi8vd3d3LmEtdHJ1c3QuYXQ6ODIv
+b2NzcDBHBggrBgEFBQcwAoY7aHR0cDovL3d3dy5hLXRydXN0LmF0L2NlcnRzL2Et
+c2lnbi1URVNULVByZW1pdW0tU2lnLTAxYS5jcnQwgZQGA1UdIASBjDCBiTB9BgYq
+KAARAQQwczA1BggrBgEFBQcCARYpaHR0cDovL3d3dy5hLXRydXN0LmF0L2RvY3Mv
+Y3AvYS1zaWduLVRFU1QwOgYIKwYBBQUHAgIwLhosRGllc2VzIFplcnRpZmlrYXQg
+ZGllbnQgbnVyIHp1IFRlc3R6d2Vja2VuICEwCAYGBACLMAEBMG8GA1UdHwRoMGYw
+ZKBioGCGXmxkYXA6Ly9sZGFwLmEtdHJ1c3QuYXQvb3U9YS1zaWduLVRFU1QtUHJl
+bWl1bS1FbmMtMDEsbz1BLVRydXN0LGM9QVQ/Y2VydGlmaWNhdGVyZXZvY2F0aW9u
+bGlzdD8wEQYDVR0OBAoECE4DxL9ky4M+MA4GA1UdDwEB/wQEAwIGwDAgBgNVHREE
+GTAXgRV0ZXN0cGVyc29uNEBicnouZ3YuYXQwCQYDVR0TBAIwADANBgkqhkiG9w0B
+AQUFAAOCAQEAioVvsZN+NnQxXMTGdjKveTBMRTYzHflkSC8lI9XXltP5+mjIuoB2
+Tn6voovA8dXz9jTsnQt8f8ye0CL2bSS9UVD1jv8So3bavquW+HlkZBAZvL39APNL
+PjUUnWn0QOnrQAJ6W47UwGAUgEw3KcBcJaEa4Xb/8kUj618xGzWl6X0mKsVpxkrf
++5Cj+nmwDqChll08/90MmhSY4M5FrvmQ9GjAN5FHVsk0FPp02tKCRzoBJtzpB1DW
+KHlgiDHUAXy5eD0XI7PXebPNZ4InvY/jC/IH8PRLdJT249YQmUxZ4neTtFDvb8C1
+Qh6k725fh3hVxqX8ZwwWj9+iGQVk53K3CA==</dsig:X509Certificate></dsig:X509Data></dsig:KeyInfo><dsig:Object Id="signed-data"><html>
+<head>
+<title>Überprüfung des Namen des Anmelde-Servers</title>
+</head>
+<body>
+<h2>Prüfung der Identität des MOA-ID Servers</h2>
+
+Bevor Sie sich in den folgenden Schritten an eine Online-Applikation anmelden,
+wird empfohlen den Namen des Anmelde-Servers zu überprüfen.
+Zu diesem Zweck identifiziert Ihr Webbrowser den Anmelde-Server mit Hilfe eines Zertifikates.
+Ihre Aufgabe ist es zu überprüfen, ob das Server-Zertifikat von einem Unternehmen ausgestellt
+wurde, dem Sie vertrauen.
+<p>
+Die folgenden Absätze beschreiben, wie Sie diese Überprüfung durchführen können.
+Führen Sie jene Arbeitsschritte durch, die für den von Ihnen verwendeten Webbrowser zutreffend sind.
+</p>
+<h3>Microsoft Internet Explorer 6.0</h3>
+
+<ol>
+<li>Öffnen Sie (durch Doppel-Klicken) das Symbol mit dem gelben Vorhangschloß am unteren Rand des Browsers.</li>
+<li>Selektieren Sie im nun geöffnetem Fenster &quot;Zertifikat&quot; den Karteireiter &quot;Zertifizierungspfad&quot;.</li>
+<li>Öffnen Sie (durch Doppel-Klicken) das an oberster Stelle gereihte Zertifikat.</li>
+<li>Überprüfen Sie ob als Aussteller dieses Zertifikat (Karteireiter &quot;Details&quot;, Eintrag &quot;Aussteller&quot;)
+ein Unternehmen aufscheint, dem Sie vertrauen den Namen des Anmelde-Servers zu überprüfen.</li>
+<li>Überprüfen Sie, ob dieses Zertifikat authentisch vom angegebene Unternehmen stammt. Dazu können Sie den
+Fingerabdruck (Karteireiter &quot;Details&quot;, unterster Eintrag) des Zertifikats überprüfen. Am Ende dieses Dokuments ist
+eine von der IKT-Stabsstelle überprüfte Liste von Zertifikaten und deren Fingerabdruck aufgelistet.
+Überprüfen Sie ob das von Ihnen zu überprüfende Zertifikat
+in dieser Liste enthalten ist und der Fingerabruck mit dem Wert in der Liste übereinstimmt.
+<ul>
+<li>Ist Ihr zu prüfendes Zertifikat in der Liste enthalten und stimmt der Wert des Fingerabdrucks mit dem Wert
+in der Liste überein, dann ist das Zertifikat authentisch und der Anmeldevorgang kann fortgesetzt werden.</li>
+<li>Ist Ihr zu prüfendes Zertifikat in der Liste enthalten aber stimmt der Wert des Fingerabdrucks nicht mit dem Wert
+in der Liste überein, dann ist das Zertifikat nicht authentisch und der Anmeldevorgang muss abgebrochen werden.</li>
+<li>Ist Ihr zu prüfendes Zertifikat nicht in der Liste enthalten müssen Sie eine andere verlässliche Quelle für den
+Vergleich des Fingerabdrucks finden. Sofern das Zertifikat authentisch ist, kann der Anmeldevorgang fortgesetzt werden.</li>
+</ul></li>
+<li>Ist das in Schritt 3. geöffnete Zertifikat nicht im Internet Explorer installiert erscheint das Zertifikat mit
+einem roten Kreuz. Sie können das Zertifikat installieren, indem Sie die Schaltfläche &quot;Zertifikat installieren ...&quot;
+(Karteireiter &quot;Allgemein&quot;) aktivieren. In der Folge werden alle von dieser Zertifizierungsstelle ausgestellten Zertifikate
+vom Internet Explorer als vertrauenswürdig erkannt.</li>
+</ol>
+<h3>Netscape Navigator 7.0</h3>
+<ol>
+<li>Öffnen Sie (durch Klicken) das Symbol mit dem Vorhangschloss am rechten, unteren Rand des Browsers</li>
+<li>Aktivieren Sie die Schaltfläche &quot;Anzeigen&quot;</li>
+<li>Selektieren Sie im nun geöffnetem Fenster &quot;Zertifikatsanzeige&quot; den Karteireiter &quot;Detail&quot;.</li>
+<li>Aktivieren Sie (durch Klicken) das an oberster Stelle gereihte Zertifikat.</li>
+<li>Überprüfen Sie ob als Aussteller dieses Zertifikat (Eintrag &quot;Aussteller&quot;)
+ein Unternehmen aufscheint, dem Sie vertrauen den Namen des Anmelde-Servers zu überprüfen.</li>
+<li>Überprüfen Sie, ob dieses Zertifikat authentisch vom angegebene Unternehmen stammt. Dazu können Sie den
+Fingerabdruck des Zertifikats überprüfen. Am Ende dieses Dokuments ist
+eine von der IKT-Stabsstelle überprüfte Liste von Zertifikaten und deren Fingerabdruck aufgelistet.
+Überprüfen Sie ob das von Ihnen zu überprüfende Zertifikat
+in dieser Liste enthalten ist und der Fingerabruck mit dem Wert in der Liste übereinstimmt.
+<ul>
+<li>Ist Ihr zu prüfendes Zertifikat in der Liste enthalten und stimmt der Wert des Fingerabdrucks mit dem Wert
+in der Liste überein, dann ist das Zertifikat authentisch und der Anmeldevorgang kann fortgesetzt werden.</li>
+<li>Ist Ihr zu prüfendes Zertifikat in der Liste enthalten aber stimmt der Wert des Fingerabdrucks nicht mit dem Wert
+in der Liste überein, dann ist das Zertifikat nicht authentisch und der Anmeldevorgang muss abgebrochen werden.</li>
+<li>Ist Ihr zu prüfendes Zertifikat nicht in der Liste enthalten müssen Sie eine andere verlässliche Quelle für den
+Vergleich des Fingerabdrucks finden. Sofern das Zertifikat authentisch ist, kann der Anmeldevorgang fortgesetzt werden.</li>
+</ul></li>
+<li>Ist das Aussteller-Zertifikat nicht im Netscape Navigator installiert können Sie das Zertifikat installieren,
+indem Sie die &quot;*.cer&quot; Datei mit Netscape Navigator öffnen. In der Folge werden alle von dieser Zertifizierungsstelle
+ausgestellten Zertifikate vom Internet Explorer als vertrauenswürdig erkannt.</li>
+</ol>
+
+<h2>Zertifikate und ihr Fingerabdruck</h2>
+
+<table>
+<tr>
+<td>Aussteller</td><td>CN=A-Trust-nQual-01,OU=A-Trust-nQual-01,O=A-Trust,C=AT</td>
+</tr>
+<tr>
+<td>Seriennummer</td><td>111 (0x6f)</td>
+</tr>
+<tr>
+<td>Fingerabdruck</td><td>SHA-1: e6 e6 fc 88 71 91 77 c9 b7 42 18 25 75 7c 5e 47 bc ac 85 f6</td>
+</tr>
+</table>
+
+<p/>
+<table>
+<tr>
+<td>Aussteller</td><td>CN=A-Trust-nQual-01,OU=A-Trust-nQual-01,O=A-Trust,C=AT</td>
+</tr>
+<tr>
+<td>Seriennummer</td><td>531 (0x213)</td>
+</tr>
+<tr>
+<td>Fingerabdruck</td><td>SHA-1: 9e 05 12 dd 61 da 59 49 d1 d8 63 1c 3f 19 d7 5f 49 6c 37 33</td>
+</tr>
+</table>
+
+<p/>
+<table>
+<tr>
+<td>Aussteller</td><td>CN=A-Trust-nQual-01,OU=A-Trust-nQual-01,O=A-Trust,C=AT</td>
+</tr>
+<tr>
+<td>Seriennummer</td><td>536 (0x0218)</td>
+</tr>
+<tr>
+<td>Fingerabdruck</td><td>SHA-1: 0f 5a 03 42 f5 cd 44 87 99 c3 c6 d1 78 60 7e 3f 2b 5b cb 8f</td>
+</tr>
+</table>
+
+</body>
+</html></dsig:Object><dsig:Object Id="refetsi"><etsi:QualifyingProperties Target="#HS_signature" xmlns:etsi="http://uri.etsi.org/01903/v1.1.1#"><etsi:SignedProperties><etsi:SignedSignatureProperties><etsi:SigningTime>2003-05-06T07:09:50Z</etsi:SigningTime><etsi:SigningCertificate><etsi:Cert><etsi:CertDigest><etsi:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><etsi:DigestValue>Frhu1o4mL4gQHdJcU0xSA/h4COE=</etsi:DigestValue></etsi:CertDigest><etsi:IssuerSerial><dsig:X509IssuerName>CN=a-sign-TEST-Premium-Enc-01,OU=a-sign-TEST-Premium-Enc-01,O=A-Trust Ges. f. Sicherheitssysteme im elektr. Datenverkehr GmbH,C=AT</dsig:X509IssuerName><dsig:X509SerialNumber>6455</dsig:X509SerialNumber></etsi:IssuerSerial></etsi:Cert></etsi:SigningCertificate><etsi:SignaturePolicyIdentifier><etsi:SignaturePolicyImplied/></etsi:SignaturePolicyIdentifier></etsi:SignedSignatureProperties><etsi:SignedDataObjectProperties><etsi:DataObjectFormat ObjectReference="#reference-data-1"><etsi:MimeType>text/html</etsi:MimeType></etsi:DataObjectFormat></etsi:SignedDataObjectProperties></etsi:SignedProperties></etsi:QualifyingProperties></dsig:Object></dsig:Signature> \ No newline at end of file
diff --git a/id/server/idserverlib/src/test/java/test/MOAIDTestCase.java b/id/server/idserverlib/src/test/java/test/MOAIDTestCase.java
new file mode 100644
index 000000000..0c25123b2
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/MOAIDTestCase.java
@@ -0,0 +1,218 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.xml.transform.TransformerException;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.FileUtils;
+import at.gv.egovernment.moa.util.StreamUtils;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+import iaik.ixsil.algorithms.Transform;
+import iaik.ixsil.algorithms.TransformImplExclusiveCanonicalXML;
+import iaik.ixsil.exceptions.AlgorithmException;
+import iaik.ixsil.exceptions.InitException;
+import iaik.ixsil.exceptions.URIException;
+import iaik.ixsil.init.IXSILInit;
+import iaik.ixsil.util.URI;
+import test.at.gv.egovernment.moa.MOATestCase;
+
+/*
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class MOAIDTestCase extends MOATestCase implements Constants {
+
+ public static final String XML_DECL =
+ "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>";
+ protected static final String nl = "\n";
+
+ public MOAIDTestCase(String name) {
+ super(name);
+ }
+
+ protected void initIxsil() throws InitException, URIException {
+ IXSILInit.init(new URI("init/properties/init.properties"));
+ // Switch on debug information
+ IXSILInit.setPrintDebugLog(true);
+ }
+ //STRING <==> STRING
+ protected void assertXmlEquals(String xml1, String xml2)
+ throws AlgorithmException, IOException, InitException, URIException{
+ initIxsil();
+ String canXml1 = canonicalTransform(xml1);
+ String canXml2 = canonicalTransform(xml2);
+ assertEquals(canXml1, canXml2); }
+ // ELEMENT <==> ELEMENT
+ protected void assertXmlEquals(Element xml1, Element xml2)
+ throws AlgorithmException, IOException, InitException , URIException, TransformerException{
+ initIxsil();
+ assertEquals(canonicalTransform(DOMUtils.serializeNode(xml1)),canonicalTransform(DOMUtils.serializeNode(xml2)));
+ }
+ // INPUTSTREAM <==> INPUTSTREAM
+ protected void assertXmlEquals(InputStream xml1, InputStream xml2)
+ throws AlgorithmException, IOException, InitException , URIException{
+ initIxsil();
+ assertEquals(canonicalTransform(xml1),canonicalTransform(xml2));
+ }
+ // ELEMENT <==> STRING
+ protected void assertXmlEquals(Element xml1, String xml2)
+ throws AlgorithmException, IOException, InitException , URIException, TransformerException {
+ initIxsil();
+ assertEquals(canonicalTransform(xml1),canonicalTransform(xml2));
+ }
+ // ELEMENT <==> INPUTSTREAM
+ protected void assertXmlEquals(Element xml1, InputStream xml2)
+ throws AlgorithmException, IOException, InitException , URIException, TransformerException{
+ initIxsil();
+ assertEquals(canonicalTransform(xml1),canonicalTransform(xml2));
+ }
+ // STRING <==> INPUTSTREAM
+ protected void assertXmlEquals(String xml1, InputStream xml2)
+ throws AlgorithmException, IOException, InitException , URIException{
+ initIxsil();
+ assertEquals(canonicalTransform(xml1),canonicalTransform(xml2));
+ }
+
+ /**
+ * Method canonicalTransform.
+ * @param input as STRING
+ * @return String
+ */
+ protected String canonicalTransform(String input)
+ throws AlgorithmException, IOException {
+
+ Transform tr = new TransformImplExclusiveCanonicalXML();
+ InputStream s = new ByteArrayInputStream(input.getBytes("UTF-8"));
+ tr.setInput(s, null);
+ ByteArrayInputStream transResult = (ByteArrayInputStream) tr.transform();
+ return killWhiteSpace(readString(transResult));
+ }
+ /**
+ * Method canonicalTransform.
+ * @param input as Element
+ * @return String
+ */
+ protected String canonicalTransform(Element input)
+ throws AlgorithmException, IOException {
+
+ Transform tr = new TransformImplExclusiveCanonicalXML();
+ tr.setInput(XPathUtils.selectNodeList(input, XPathUtils.ALL_NODES_XPATH), null);
+ ByteArrayInputStream transResult = (ByteArrayInputStream) tr.transform();
+
+ return killWhiteSpace(readString(transResult));
+ }
+
+ /**
+ * Method canonicalTransform.
+ * @param input as InputStream
+ * @return String
+ */
+ protected String canonicalTransform(InputStream input)
+ throws AlgorithmException, IOException {
+
+ Transform tr = new TransformImplExclusiveCanonicalXML(); tr.setInput(input, null);
+ ByteArrayInputStream transResult = (ByteArrayInputStream) tr.transform();
+
+ return killWhiteSpace(readString(transResult));
+ }
+
+ public static String killWhiteSpace(String input)
+ {
+ int start=0;
+ int ende;
+ String result;
+ String middle;
+ result = input;
+ do {
+ start = result.indexOf(">", start);
+ ende = result.indexOf("<", start);
+ middle = result.substring(start+1,ende).trim();
+ result = result.substring(0,start+1) +middle + result.substring(ende,result.length());
+ start++;
+ } while (result.indexOf("<", ende + 1)>0);
+
+ return result;
+ }
+
+ /**
+ * Method killExclusive.: The values startsWith and endsWith will be included into the answer.
+ * @param input
+ * @param startsWith
+ * @param endsWith
+ * @param newValue
+ * @return String
+ */
+ public static String killExclusive(String input, String startsWith, String endsWith, String newValue)
+ {
+ int start=0;
+ int ende;
+ String result;
+ result = input;
+ do {
+ start = result.indexOf(startsWith, start) + startsWith.length();
+ ende = result.indexOf(endsWith, start);
+ result = result.substring(0,start) + newValue + result.substring(ende,result.length());
+ start++;
+ } while (result.indexOf(startsWith, ende + 1)>0);
+
+ return result;
+ }
+
+ /**
+ * Method killInclusive. : The values startsWith and endsWith will NOT be included into the answer.
+ * @param input
+ * @param startsWith
+ * @param endsWith
+ * @param newValue
+ * @return String
+ */
+ public static String killInclusive(String input, String startsWith, String endsWith, String newValue)
+ {
+ int start=0;
+ int ende;
+ String result;
+ result = input;
+ do {
+ start = result.indexOf(startsWith, start) + startsWith.length();
+ ende = result.indexOf(endsWith, start);
+ result = result.substring(0,start - startsWith.length() ) + newValue + result.substring(ende + endsWith.length(),result.length());
+ start++;
+ } while (result.indexOf(startsWith, ende + 1)>0);
+
+ return result;
+ }
+
+ protected String readFile(String filename) throws IOException {
+ return readFile(filename, "UTF-8");
+ }
+ protected String readFile(String filename, String encoding) throws IOException {
+ return FileUtils.readFile(filename, encoding);
+ }
+ protected String readString(InputStream input) throws IOException
+ {
+ return StreamUtils.readStream(input, "UTF-8");
+ }
+
+}
diff --git a/id/server/idserverlib/src/test/java/test/abnahme/A/Test100StartAuthentication.java b/id/server/idserverlib/src/test/java/test/abnahme/A/Test100StartAuthentication.java
new file mode 100644
index 000000000..4293fc477
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/abnahme/A/Test100StartAuthentication.java
@@ -0,0 +1,187 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.abnahme.A;
+
+import test.abnahme.AbnahmeTestCase;
+import at.gv.egovernment.moa.id.AuthenticationException;
+import at.gv.egovernment.moa.id.auth.WrongParametersException;
+
+/**
+ * @author Stefan Knirsch
+ * @version $Id$
+ *
+ */
+public class Test100StartAuthentication extends AbnahmeTestCase {
+
+ public Test100StartAuthentication(String name) {
+ super(name);
+ }
+
+ public void testA101() throws Exception {
+ try {
+ String htmlForm = server.startAuthentication("https://localhost:8443/auth", //authURL
+ "gb", //target
+ "http://localhost:9080/", //oaURL
+ "file:" + findXmldata("AuthTemplate.html"),
+ "http://localhost:3495/http-security-layer-request",
+ null, null, null);
+ htmlForm = killExclusive(htmlForm, "MOASessionID=","\"","DELETED");
+ //writeXmldata("htmlForm_out.html",htmlForm.getBytes("UTF-8"));
+ assertEquals(readXmldata("htmlForm.html"),htmlForm);
+ System.out.println("-----------------------\nTestfall " + this.getName() + " erfolgreich abgearbeitet! \n-----------------------");
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ public void testA102() throws Exception {
+ try {
+ String htmlForm = server.startAuthentication("https://localhost:8443/auth", //authURL
+ "gb", //target
+ "http://localhost:9080/", //oaURL
+ null,
+ "http://localhost:3495/http-security-layer-request", null, null, null);
+ htmlForm = killExclusive(htmlForm, "MOASessionID=","\"","DELETED");
+ //writeXmldata("htmlForm_out.html",htmlForm.getBytes("UTF-8"));
+ assertEquals(readXmldata("htmlForm.html"),htmlForm);
+
+ System.out.println("-----------------------\nTestfall " + this.getName() + " erfolgreich abgearbeitet! \n-----------------------");
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+ public void testA103() throws Exception {
+ try {
+ String htmlForm = server.startAuthentication("https://localhost:8443/auth", //authURL
+ "gb", //target
+ "http://localhost:9080/", //oaURL
+ "file:" + findXmldata("AuthTemplate.html"),
+ null,
+ null,
+ null, null);
+ htmlForm = killExclusive(htmlForm, "MOASessionID=","\"","DELETED");
+ //writeXmldata("htmlForm_out.html",htmlForm.getBytes("UTF-8"));
+ assertEquals(readXmldata("htmlForm.html"),htmlForm);
+ System.out.println("-----------------------\nTestfall " + this.getName() + " erfolgreich abgearbeitet! \n-----------------------");
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ public void testA151() throws Exception {
+ try {
+ try {
+ server.startAuthentication(null, //authURL
+ "gb", //target
+ "http://localhost:9080/", //oaURL
+ null, null, null, null, null);
+ //assertEquals("",htmlForm);
+ System.err.println(this.getName() + " hat KEINE FEHLER geworfen");
+ fail(this.getName() + " hat KEINE FEHLER geworfen");
+ }
+ catch (WrongParametersException e) {
+ System.out.println("-----------------------\nFehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "\n-----------------------");
+ }
+
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+ public void testA152() throws Exception {
+ try {
+ try {
+ server.startAuthentication("http://localhost:8080/auth", //authURL
+ "gb", "http://localhost:9080/", //oaURL
+ null, null, null, null, null);
+ System.err.println(this.getName() + " hat KEINE FEHLER geworfen");
+ fail(this.getName() + " hat KEINE FEHLER geworfen");
+ }
+ catch (AuthenticationException e) {
+ System.out.println("-----------------------\nFehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "\n-----------------------");
+ }
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+ public void testA153() throws Exception {
+ try {
+ try {
+ server.startAuthentication("https://localhost:8443/auth", //authURL
+ "gb", "http://host_not_in_config/", //oaURL
+ null, null, null, null, null);
+ System.err.println(this.getName() + " hat KEINE FEHLER geworfen");
+ fail(this.getName() + " hat KEINE FEHLER geworfen");
+ }
+ catch (AuthenticationException e) {
+ System.out.println("-----------------------\nFehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "\n-----------------------");
+ }
+
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+ public void testA154() throws Exception {
+ try {
+ try {
+ server.startAuthentication("https://localhost:8443/auth", //authURL
+ "gb", null, //oaURL
+ null, null, null, null, null);
+ System.err.println(this.getName() + " hat KEINE FEHLER geworfen");
+ fail(this.getName() + " hat KEINE FEHLER geworfen");
+ }
+ catch (WrongParametersException e) {
+ System.out.println("-----------------------\nFehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "\n-----------------------");
+ }
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ public void testA155() throws Exception {
+ try {
+ try {
+ server.startAuthentication("https://localhost:8443/auth", //authURL
+ null, "http://localhost:9080/", //oaURL
+ null, null, null, null, null);
+ System.err.println(this.getName() + " hat KEINE FEHLER geworfen");
+ fail(this.getName() + " hat KEINE FEHLER geworfen");
+ }
+ catch (WrongParametersException e) {
+ System.out.println("-----------------------\nFehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "\n-----------------------");
+ }
+ //assertEquals("",htmlForm);
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+}
diff --git a/id/server/idserverlib/src/test/java/test/abnahme/A/Test200VerifyIdentityLink.java b/id/server/idserverlib/src/test/java/test/abnahme/A/Test200VerifyIdentityLink.java
new file mode 100644
index 000000000..5eae95b6b
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/abnahme/A/Test200VerifyIdentityLink.java
@@ -0,0 +1,384 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.abnahme.A;
+
+import java.util.HashMap;
+import java.util.Vector;
+
+import org.w3c.dom.Element;
+
+import test.abnahme.AbnahmeTestCase;
+import at.gv.egovernment.moa.id.AuthenticationException;
+import at.gv.egovernment.moa.id.ParseException;
+import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants;
+import at.gv.egovernment.moa.id.auth.builder.VerifyXMLSignatureRequestBuilder;
+import at.gv.egovernment.moa.id.auth.data.IdentityLink;
+import at.gv.egovernment.moa.id.auth.invoke.SignatureVerificationInvoker;
+import at.gv.egovernment.moa.id.auth.parser.InfoboxReadResponseParser;
+import at.gv.egovernment.moa.id.auth.parser.VerifyXMLSignatureResponseParser;
+import at.gv.egovernment.moa.id.auth.validator.ValidateException;
+import at.gv.egovernment.moa.id.auth.validator.VerifyXMLSignatureResponseValidator;
+import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
+
+/**
+ * @author Stefan Knirsch
+ * @version $Id$
+ *
+ */
+public class Test200VerifyIdentityLink extends AbnahmeTestCase {
+
+ public Test200VerifyIdentityLink(String name) {
+ super(name);
+ }
+
+ public void testA201() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ System.out.println(sessionID);
+ String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ String createXMLSignatureRequest = server.verifyIdentityLink(sessionID, parameters);
+
+ InfoboxReadResponseParser irrp = new InfoboxReadResponseParser(infoboxReadResponse);
+ IdentityLink idl = irrp.parseIdentityLink();
+ Element domVerifyXMLSignatureRequest = new VerifyXMLSignatureRequestBuilder().build(idl, AuthConfigurationProvider.getInstance().getMoaSpAuthBlockTrustProfileID());
+ Element domVerifyXMLSignatureResponse = new SignatureVerificationInvoker().verifyXMLSignature(domVerifyXMLSignatureRequest);
+
+ VerifyXMLSignatureResponseParser respParser = new VerifyXMLSignatureResponseParser(domVerifyXMLSignatureResponse);
+ VerifyXMLSignatureResponseValidator.getInstance().validate(respParser.parseData(), AuthConfigurationProvider.getInstance().getIdentityLinkX509SubjectNames(), VerifyXMLSignatureResponseValidator.CHECK_IDENTITY_LINK, true);
+
+ /*
+ * HINWEIS: clearSamlAssertion löscht aus einer beliebiegen String-Repräsentation einer XML-Struktur
+ * AUSSLIESSLICH die Attribute IssueInstand und die AssertionID heraus, von dem her ist diese
+ * Method hier verwendbar
+ */
+
+ assertXmlEquals(clearSamlAssertion(readXmldata("CreateXMLSignatureRequest.xml")), clearSamlAssertion(createXMLSignatureRequest));
+ System.out.println("-----------------------\nTestfall " + this.getName() + " erfolgreich abgearbeitet! \n-----------------------");
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+
+ }
+ public void testA251() throws Exception {
+ try {
+ startAuthentication();
+ String sessionID = "0";
+ String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
+
+ try {
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
+ System.err.println(this.getName() + " hat KEINE FEHLER geworfen");
+ fail(this.getName() + " hat KEINE FEHLER geworfen");
+ }
+ catch (AuthenticationException e) {
+ System.out.println("-----------------------\nFehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "\n-----------------------");
+ }
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ public void testA252() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+
+ server.setSecondsSessionTimeOut(-100);
+ server.cleanup();
+ server.setSecondsSessionTimeOut(1000);
+
+ System.out.println(sessionID);
+ String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
+ try {
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
+ System.err.println(this.getName() + " hat KEINE FEHLER geworfen");
+ fail(this.getName() + " hat KEINE FEHLER geworfen");
+ }
+ catch (AuthenticationException e) {
+ System.out.println("-----------------------\nFehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "\n-----------------------");
+ }
+
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ public void testA253() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ System.out.println(sessionID);
+ String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
+ try {
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
+ System.err.println(this.getName() + " hat KEINE FEHLER geworfen");
+ fail(this.getName() + " hat KEINE FEHLER geworfen");
+ }
+ catch (AuthenticationException e) {
+ System.out.println("-----------------------\nFehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "\n-----------------------");
+ }
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ public void testA254() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
+ try {
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
+ System.err.println(this.getName() + " hat KEINE FEHLER geworfen");
+ fail(this.getName() + " hat KEINE FEHLER geworfen");
+ }
+ catch (ValidateException e) {
+ System.out.println("-----------------------\nFehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "\n-----------------------");
+ }
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ public void testA255() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ System.out.println(sessionID);
+ String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
+ try {
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
+ }
+ catch (ParseException e) {
+ System.out.println("-----------------------\nFehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "\n-----------------------");
+ }
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+ public void testA256() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ System.out.println(sessionID);
+ String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
+ try {
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
+ }
+ catch (ValidateException e) {
+ System.out.println("-----------------------\nFehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "\n-----------------------");
+ }
+
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+ public void testA257() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ System.out.println(sessionID);
+ String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
+ try {
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
+ System.err.println(this.getName() + " hat KEINE FEHLER geworfen");
+ fail(this.getName() + " hat KEINE FEHLER geworfen");
+
+ }
+ catch (ValidateException e) {
+ System.out.println("-----------------------\nFehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "\n-----------------------");
+ }
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ public void testA258() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ System.out.println(sessionID);
+ String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
+ try {
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
+ System.err.println(this.getName() + " hat KEINE FEHLER geworfen");
+ fail(this.getName() + " hat KEINE FEHLER geworfen");
+ }
+ catch (ValidateException e) {
+ System.out.println("-----------------------\nFehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "\n-----------------------");
+ }
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ public void testA259() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ System.out.println(sessionID);
+ String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
+ try {
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
+ System.err.println(this.getName() + " hat KEINE FEHLER geworfen");
+ fail(this.getName() + " hat KEINE FEHLER geworfen");
+ }
+ catch (ValidateException e) {
+ System.out.println("-----------------------\nFehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "\n-----------------------");
+ }
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ public void testA260() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ System.out.println(sessionID);
+ String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
+ try {
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
+ System.err.println(this.getName() + " hat KEINE FEHLER geworfen");
+ fail(this.getName() + " hat KEINE FEHLER geworfen");
+ }
+ catch (ValidateException e) {
+ System.out.println("-----------------------\nFehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "\n-----------------------");
+ }
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+ public void testA261() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ System.out.println(sessionID);
+ String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
+
+ try {
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
+ System.err.println(this.getName() + " hat KEINE FEHLER geworfen");
+ fail(this.getName() + " hat KEINE FEHLER geworfen");
+ }
+ catch (ValidateException e) {
+ System.out.println("-----------------------\nFehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "\n-----------------------");
+ }
+
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ public void testA262() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ System.out.println(sessionID);
+ String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
+ new InfoboxReadResponseParser(infoboxReadResponse).parseIdentityLink();
+ // System.out.println(infoboxReadResponse);
+
+ try {
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
+ System.err.println(this.getName() + " hat KEINE FEHLER geworfen");
+ fail(this.getName() + " hat KEINE FEHLER geworfen");
+ }
+ catch (ValidateException e) {
+ System.out.println("-----------------------\nFehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "\n-----------------------");
+ }
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ public void testA263() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ System.out.println(sessionID);
+ String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
+ InfoboxReadResponseParser irrp = new InfoboxReadResponseParser(infoboxReadResponse);
+ IdentityLink idl = irrp.parseIdentityLink();
+ Element domVerifyXMLSignatureRequest = new VerifyXMLSignatureRequestBuilder().build(idl, AuthConfigurationProvider.getInstance().getMoaSpAuthBlockTrustProfileID());
+ Element domVerifyXMLSignatureResponse = new SignatureVerificationInvoker().verifyXMLSignature(domVerifyXMLSignatureRequest);
+
+ VerifyXMLSignatureResponseParser respParser = new VerifyXMLSignatureResponseParser(domVerifyXMLSignatureResponse);
+
+ // String createXMLSignatureRequest = server.verifyIdentityLink(sessionID, infoboxReadResponse);
+ // System.out.println(createXMLSignatureRequest);
+ // String createXMLSignatureResponse = readFile(TESTDATA_ROOT + "xmldata/standard/"+"CreateXMLSignatureResponse.xml");
+ // String samlArtifact = server.verifyAuthenticationBlock(sessionID, createXMLSignatureResponse);
+ Vector identityLinkSigners = new Vector();
+ identityLinkSigners.add("CN=TEST,OU=TEST,O=TEST,C=AT");
+ try {
+ VerifyXMLSignatureResponseValidator.getInstance().validate(respParser.parseData(), identityLinkSigners, VerifyXMLSignatureResponseValidator.CHECK_IDENTITY_LINK, true);
+ System.err.println(this.getName() + " hat KEINE FEHLER geworfen");
+ fail(this.getName() + " hat KEINE FEHLER geworfen");
+ }
+ catch (ValidateException e) {
+ System.out.println("-----------------------\nFehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "\n-----------------------");
+ }
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+}
diff --git a/id/server/idserverlib/src/test/java/test/abnahme/A/Test300VerifyAuthBlock.java b/id/server/idserverlib/src/test/java/test/abnahme/A/Test300VerifyAuthBlock.java
new file mode 100644
index 000000000..5938dfce4
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/abnahme/A/Test300VerifyAuthBlock.java
@@ -0,0 +1,624 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.abnahme.A;
+
+import java.util.Calendar;
+import java.util.HashMap;
+
+import org.w3c.dom.Element;
+import test.abnahme.AbnahmeTestCase;
+
+import at.gv.egovernment.moa.id.AuthenticationException;
+import at.gv.egovernment.moa.id.BuildException;
+import at.gv.egovernment.moa.id.ParseException;
+import at.gv.egovernment.moa.id.auth.AuthenticationServer;
+import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants;
+import at.gv.egovernment.moa.id.auth.builder.AuthenticationDataAssertionBuilder;
+import at.gv.egovernment.moa.id.auth.builder.PersonDataBuilder;
+import at.gv.egovernment.moa.id.auth.builder.BPKBuilder;
+import at.gv.egovernment.moa.id.auth.builder.VerifyXMLSignatureRequestBuilder;
+import at.gv.egovernment.moa.id.auth.data.AuthenticationSession;
+import at.gv.egovernment.moa.id.auth.data.CreateXMLSignatureResponse;
+import at.gv.egovernment.moa.id.auth.data.IdentityLink;
+import at.gv.egovernment.moa.id.auth.data.VerifyXMLSignatureResponse;
+import at.gv.egovernment.moa.id.auth.invoke.SignatureVerificationInvoker;
+import at.gv.egovernment.moa.id.auth.parser.CreateXMLSignatureResponseParser;
+import at.gv.egovernment.moa.id.auth.parser.InfoboxReadResponseParser;
+import at.gv.egovernment.moa.id.auth.parser.VerifyXMLSignatureResponseParser;
+import at.gv.egovernment.moa.id.auth.validator.CreateXMLSignatureResponseValidator;
+import at.gv.egovernment.moa.id.auth.validator.ValidateException;
+import at.gv.egovernment.moa.id.auth.validator.VerifyXMLSignatureResponseValidator;
+import at.gv.egovernment.moa.id.config.ConfigurationException;
+import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
+import at.gv.egovernment.moa.id.config.auth.OAAuthParameter;
+import at.gv.egovernment.moa.id.data.AuthenticationData;
+import at.gv.egovernment.moa.id.util.Random;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.DateTimeUtils;
+
+/**
+ * @author Stefan Knirsch
+ * @version $Id$
+ *
+ */
+
+public class Test300VerifyAuthBlock extends AbnahmeTestCase {
+
+ public Test300VerifyAuthBlock(String name) {
+ super(name);
+ }
+
+ public void testA301() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ AuthenticationData authData = initServer(sessionID);
+ //authDataWriter(authData,this.getName()+"new.xml");
+ assertXmlEquals(readXmldata("AuthenticationData.xml"), clearSamlAssertion(authData.getSamlAssertion()));
+ System.out.println("-----------------------Testfall " + this.getName() + " erfolgreich abgearbeitet! -----------------------");
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ public void testA302() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ AuthenticationData authData = initServer(sessionID);
+ //authDataWriter(authData,this.getName()+"new.xml");
+ assertXmlEquals(readXmldata("AuthenticationData.xml"), clearSamlAssertion(authData.getSamlAssertion()));
+ System.out.println("-----------------------Testfall " + this.getName() + " erfolgreich abgearbeitet! -----------------------");
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+ public void testA303() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ AuthenticationData authData = initServer(sessionID);
+ assertXmlEquals(readXmldata("AuthenticationData.xml"), clearSamlAssertion(authData.getSamlAssertion()));
+ System.out.println("-----------------------Testfall " + this.getName() + " erfolgreich abgearbeitet! -----------------------");
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+ public void testA304() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ AuthenticationData authData = initServer(sessionID);
+ assertXmlEquals(readXmldata("AuthenticationData.xml"), clearSamlAssertion(authData.getSamlAssertion()));
+ System.out.println("-----------------------Testfall " + this.getName() + " erfolgreich abgearbeitet! -----------------------");
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+ public void testA305() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ AuthenticationData authData = initServer(sessionID);
+ assertXmlEquals(readXmldata("AuthenticationData.xml"), clearSamlAssertion(authData.getSamlAssertion()));
+ System.out.println("-----------------------Testfall " + this.getName() + " erfolgreich abgearbeitet! -----------------------");
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+ public void testA306() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ AuthenticationData authData = initServer(sessionID);
+ assertXmlEquals(readXmldata("AuthenticationData.xml"), clearSamlAssertion(authData.getSamlAssertion()));
+ System.out.println("-----------------------Testfall " + this.getName() + " erfolgreich abgearbeitet! -----------------------");
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+ public void testA307() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ AuthenticationData authData = initServer(sessionID);
+ assertXmlEquals(readXmldata("AuthenticationData.xml"), clearSamlAssertion(authData.getSamlAssertion()));
+ System.out.println("-----------------------Testfall " + this.getName() + " erfolgreich abgearbeitet! -----------------------");
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+ public void testA308() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ AuthenticationData authData = initServer(sessionID);
+ assertXmlEquals(readXmldata("AuthenticationData.xml"), clearSamlAssertion(authData.getSamlAssertion()));
+ System.out.println("-----------------------Testfall " + this.getName() + " erfolgreich abgearbeitet! -----------------------");
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+
+ }
+
+ public void testA309() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ AuthenticationData authData = initServerWithoutValidateAuthBlock(sessionID);
+ assertXmlEquals(readXmldata("AuthenticationData.xml"), clearSamlAssertion(authData.getSamlAssertion()));
+ System.out.println("-----------------------Testfall " + this.getName() + " erfolgreich abgearbeitet! -----------------------");
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+ public void testA310() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ AuthenticationData authData = initServerWithoutValidateAuthBlock(sessionID);
+ assertXmlEquals(readXmldata("AuthenticationData.xml"), clearSamlAssertion(authData.getSamlAssertion()));
+ System.out.println("-----------------------Testfall " + this.getName() + " erfolgreich abgearbeitet! -----------------------");
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+ public void testA311() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ AuthenticationData authData = initServerWithoutValidateAuthBlock(sessionID);
+ assertXmlEquals(readXmldata("AuthenticationData.xml"), clearSamlAssertion(authData.getSamlAssertion()));
+ System.out.println("-----------------------Testfall " + this.getName() + " erfolgreich abgearbeitet! -----------------------");
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ public void testA351() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ System.out.println(sessionID);
+ String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
+ InfoboxReadResponseParser irrp = new InfoboxReadResponseParser(infoboxReadResponse);
+ IdentityLink idl = irrp.parseIdentityLink();
+ Element domVerifyXMLSignatureRequest = new VerifyXMLSignatureRequestBuilder().build(idl, AuthConfigurationProvider.getInstance().getMoaSpAuthBlockTrustProfileID());
+ Element domVerifyXMLSignatureResponse = new SignatureVerificationInvoker().verifyXMLSignature(domVerifyXMLSignatureRequest);
+ new VerifyXMLSignatureResponseParser(domVerifyXMLSignatureResponse);
+ //VerifyXMLSignatureResponseValidator.getInstance().validate(respParser.parseData(), AuthConfigurationProvider.getInstance().getIdentityLinkX509SubjectNames());
+ // System.out.println(createXMLSignatureRequest);
+ String createXMLSignatureResponse = readXmldata("CreateXMLSignatureResponse.xml");
+
+ // nicht existierende Session....
+ try {
+ server.verifyAuthenticationBlock("0", createXMLSignatureResponse);
+ fail();
+ }
+ catch (AuthenticationException e) {
+ System.out.println("-----------------------Fehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "-----------------------");
+ }
+
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ public void testA352() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ System.out.println(sessionID);
+ String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
+ server.setSecondsSessionTimeOut(-100);
+ server.cleanup();
+ InfoboxReadResponseParser irrp = new InfoboxReadResponseParser(infoboxReadResponse);
+ IdentityLink idl = irrp.parseIdentityLink();
+ Element domVerifyXMLSignatureRequest = new VerifyXMLSignatureRequestBuilder().build(idl, AuthConfigurationProvider.getInstance().getMoaSpAuthBlockTrustProfileID());
+ Element domVerifyXMLSignatureResponse = new SignatureVerificationInvoker().verifyXMLSignature(domVerifyXMLSignatureRequest);
+ new VerifyXMLSignatureResponseParser(domVerifyXMLSignatureResponse);
+ //VerifyXMLSignatureResponseValidator.getInstance().validate(respParser.parseData(), AuthConfigurationProvider.getInstance().getIdentityLinkX509SubjectNames());
+ // System.out.println(createXMLSignatureRequest);
+ String createXMLSignatureResponse = readXmldata("CreateXMLSignatureResponse.xml");
+
+ // abgelaufene Session....
+ server.setSecondsSessionTimeOut(1000);
+ try {
+ server.verifyAuthenticationBlock("0", createXMLSignatureResponse);
+ fail();
+ }
+ catch (AuthenticationException e) {
+ System.out.println("-----------------------Fehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "-----------------------");
+ }
+
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ public void testA353() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ System.out.println(sessionID);
+
+ String createXMLSignatureResponse = readXmldata("CreateXMLSignatureResponse.xml");
+
+ // Session for VerifyIdentityLink-Aufruf
+ try {
+
+ server.verifyAuthenticationBlock(sessionID, createXMLSignatureResponse);
+ fail();
+ }
+ //NOCH SEHR UNSCHÖN..... (fliegt raus im AuthenticationServer, Methode buildAuthenticationData
+ // ( IdentityLink identityLink = session.getIdentityLink(); ==> liefert dann NULL...
+ catch (NullPointerException e) {
+ System.out.println("-----------------------Fehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "-----------------------");
+ }
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ public void testA354() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ System.out.println(sessionID);
+ String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
+ InfoboxReadResponseParser irrp = new InfoboxReadResponseParser(infoboxReadResponse);
+ IdentityLink idl = irrp.parseIdentityLink();
+ Element domVerifyXMLSignatureRequest = new VerifyXMLSignatureRequestBuilder().build(idl, AuthConfigurationProvider.getInstance().getMoaSpAuthBlockTrustProfileID());
+ Element domVerifyXMLSignatureResponse = new SignatureVerificationInvoker().verifyXMLSignature(domVerifyXMLSignatureRequest);
+ new VerifyXMLSignatureResponseParser(domVerifyXMLSignatureResponse);
+ //VerifyXMLSignatureResponseValidator.getInstance().validate(respParser.parseData(), AuthConfigurationProvider.getInstance().getIdentityLinkX509SubjectNames());
+ // System.out.println(createXMLSignatureRequest);
+ String createXMLSignatureResponse = readXmldata("CreateXMLSignatureResponse.xml");
+
+ // nicht existierende Session....
+
+ server.verifyAuthenticationBlock(sessionID, createXMLSignatureResponse);
+ try {
+ server.verifyAuthenticationBlock(sessionID, createXMLSignatureResponse);
+ fail();
+ }
+ catch (AuthenticationException e) {
+ System.out.println("-----------------------Fehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "-----------------------");
+ }
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ public void testA355() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ try {
+ initServer(sessionID);
+ fail();
+ }
+ catch (ParseException e) {
+ System.out.println("-----------------------Fehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "-----------------------");
+ }
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ public void testA356() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ try {
+ initServer(sessionID);
+ fail();
+ }
+ catch (ParseException e) {
+ System.out.println("-----------------------Fehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "-----------------------");
+ }
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+ public void testA357() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ try {
+ initServer(sessionID);
+ fail();
+ }
+ catch (ValidateException e) {
+ System.out.println("-----------------------Fehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "-----------------------");
+ }
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+ public void testA358() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ try {
+ initServer(sessionID);
+ fail();
+ }
+ catch (ValidateException e) {
+ System.out.println("-----------------------Fehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "-----------------------");
+ }
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+ public void testA359() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ try {
+ initServer(sessionID);
+ fail();
+ }
+ catch (ValidateException e) {
+ System.out.println("-----------------------Fehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "-----------------------");
+ }
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+ public void testA360() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ try {
+ initServer(sessionID);
+ fail();
+ }
+ catch (ValidateException e) {
+ System.out.println("-----------------------Fehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "-----------------------");
+ }
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+ public void testA361() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ try {
+ initServer(sessionID);
+ fail();
+ }
+ catch (ValidateException e) {
+ System.out.println("-----------------------Fehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "-----------------------");
+ }
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+ public void testA362() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ try {
+ initServer(sessionID);
+ fail();
+ }
+ catch (ValidateException e) {
+ System.out.println("-----------------------Fehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "-----------------------");
+ }
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ public void testA363() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ try {
+ initServer(sessionID);
+ fail();
+ }
+ catch (ValidateException e) {
+ System.out.println("-----------------------Fehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "-----------------------");
+ }
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ public void testA364() throws Exception {
+ try {
+ String sessionID = startAuthentication();
+ try {
+
+ initServer(sessionID);
+ fail();
+ }
+ catch (ValidateException e) {
+ System.out.println("-----------------------Fehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "-----------------------");
+ }
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ /* public void testA365() throws Exception {
+ String sessionID = startAuthentication();
+ try {
+ // wegen sinnlosigkeit gestrichen
+ initServer(sessionID);
+ fail();
+ }
+ catch (ValidateException e) {System.out.println("-----------------------Fehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage()+ "-----------------------");}
+ }*/
+
+ public void testA366() throws Exception {
+
+ String sessionID = startAuthentication();
+ try {
+ initServer(sessionID);
+ fail();
+ }
+ catch (ValidateException e) {System.out.println("-----------------------Fehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage()+ "-----------------------");}
+ }
+ public void testA367() throws Exception {
+ String sessionID = startAuthentication();
+ try {
+ initServer(sessionID);
+ fail();
+ }
+ catch (ValidateException e) {System.out.println("-----------------------Fehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage()+ "-----------------------");}
+ }
+
+
+ private AuthenticationData initServer(String sessionID) throws Exception {
+ String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
+ InfoboxReadResponseParser irrp = new InfoboxReadResponseParser(infoboxReadResponse);
+ IdentityLink idl = irrp.parseIdentityLink();
+ Element domVerifyXMLSignatureRequest = new VerifyXMLSignatureRequestBuilder().build(idl, "TrustProfile1");
+ Element domVerifyXMLSignatureResponse = new SignatureVerificationInvoker().verifyXMLSignature(domVerifyXMLSignatureRequest);
+ new VerifyXMLSignatureResponseParser(domVerifyXMLSignatureResponse);
+ //VerifyXMLSignatureResponseValidator.getInstance().validate(respParser.parseData(), AuthConfigurationProvider.getInstance().getIdentityLinkX509SubjectNames());
+ // System.out.println(createXMLSignatureRequest);
+ String createXMLSignatureResponse = readXmldata("CreateXMLSignatureResponse.xml");
+ // CreateXMLSignatureResponseValidator.getInstance().validate(new CreateXMLSignatureResponseParser(createXMLSignatureResponse).parseResponse(),"gb","https://localhost:9443/");
+ String samlArtifact = server.verifyAuthenticationBlock(sessionID, createXMLSignatureResponse);
+ AuthenticationData authData = server.getAuthenticationData(samlArtifact);
+ return authData;
+ }
+
+ private AuthenticationData initServerWithoutValidateAuthBlock(String sessionID) throws Exception {
+ String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
+ InfoboxReadResponseParser irrp = new InfoboxReadResponseParser(infoboxReadResponse);
+ IdentityLink idl = irrp.parseIdentityLink();
+ Element domVerifyXMLSignatureRequest = new VerifyXMLSignatureRequestBuilder().build(idl, "TrustProfile1");
+ Element domVerifyXMLSignatureResponse = new SignatureVerificationInvoker().verifyXMLSignature(domVerifyXMLSignatureRequest);
+ new VerifyXMLSignatureResponseParser(domVerifyXMLSignatureResponse);
+ //VerifyXMLSignatureResponseValidator.getInstance().validate(respParser.parseData(), AuthConfigurationProvider.getInstance().getIdentityLinkX509SubjectNames());
+ // System.out.println(createXMLSignatureRequest);
+ String createXMLSignatureResponse = readXmldata("CreateXMLSignatureResponse.xml");
+ // CreateXMLSignatureResponseValidator.getInstance().validate(new CreateXMLSignatureResponseParser(createXMLSignatureResponse).parseResponse(),"gb","https://localhost:9443/");
+
+ AuthenticationSession session = AuthenticationServer.getSession(sessionID);
+ AuthConfigurationProvider authConf = AuthConfigurationProvider.getInstance();
+ // parses <CreateXMLSignatureResponse>
+ CreateXMLSignatureResponse csresp =
+ new CreateXMLSignatureResponseParser(createXMLSignatureResponse).parseResponse();
+ // validates <CreateXMLSignatureResponse>
+ new CreateXMLSignatureResponseValidator().validate(csresp, session);
+ // builds a <VerifyXMLSignatureRequest> for a MOA-SPSS call
+ String[] vtids = authConf.getMoaSpAuthBlockVerifyTransformsInfoIDs();
+ String tpid = authConf.getMoaSpAuthBlockTrustProfileID();
+ Element domVsreq = new VerifyXMLSignatureRequestBuilder().build(csresp, vtids, tpid);
+ // invokes the call
+ Element domVsresp = new SignatureVerificationInvoker().verifyXMLSignature(domVsreq);
+ // parses the <VerifyXMLSignatureResponse>
+ VerifyXMLSignatureResponse vsresp = new VerifyXMLSignatureResponseParser(domVsresp).parseData();
+ // validates the <VerifyXMLSignatureResponse>
+ VerifyXMLSignatureResponseValidator.getInstance().validate(vsresp, null, VerifyXMLSignatureResponseValidator.CHECK_AUTH_BLOCK, true);
+ // compares the public keys from the identityLink with the AuthBlock
+
+ // builds authentication data and stores it together with a SAML artifact
+ AuthenticationData authData = buildAuthenticationData(session, vsresp);
+ return authData;
+ }
+ private AuthenticationData buildAuthenticationData(
+ AuthenticationSession session,
+ VerifyXMLSignatureResponse verifyXMLSigResp)
+ throws ConfigurationException, BuildException {
+
+ IdentityLink identityLink = session.getIdentityLink();
+ AuthenticationData authData = new AuthenticationData();
+ authData.setMajorVersion(1);
+ authData.setMinorVersion(0);
+ authData.setAssertionID(Random.nextRandom());
+ authData.setIssuer(session.getAuthURL());
+ authData.setIssueInstant(DateTimeUtils.buildDateTime(Calendar.getInstance()));
+ String vpkBase64 = new BPKBuilder().buildBPK(
+ identityLink.getIdentificationValue(), session.getTarget());
+ authData.setBPK(vpkBase64);
+ authData.setGivenName(identityLink.getGivenName());
+ authData.setFamilyName(identityLink.getFamilyName());
+ authData.setDateOfBirth(identityLink.getDateOfBirth());
+ authData.setQualifiedCertificate(verifyXMLSigResp.isQualifiedCertificate());
+ authData.setPublicAuthority(verifyXMLSigResp.isPublicAuthority());
+ authData.setPublicAuthorityCode(verifyXMLSigResp.getPublicAuthorityCode());
+ OAAuthParameter oaParam =
+ AuthConfigurationProvider.getInstance().getOnlineApplicationParameter(
+ session.getPublicOAURLPrefix());
+ String prPerson = new PersonDataBuilder().build(
+ identityLink, oaParam.getProvideStammzahl());
+
+ try {
+ String ilAssertion =
+ oaParam.getProvideIdentityLink() ? DOMUtils.serializeNode(identityLink.getSamlAssertion()) : "";
+ String authBlock = oaParam.getProvideAuthBlock() ? session.getAuthBlock() : "";
+ String samlAssertion = new AuthenticationDataAssertionBuilder().build(
+ authData, prPerson, authBlock, ilAssertion, session.getBkuURL(), "", false, null);
+ authData.setSamlAssertion(samlAssertion);
+ return authData;
+ }
+ catch (Throwable ex) {
+ throw new BuildException(
+ "builder.00",
+ new Object[] { "AuthenticationData", ex.getMessage() },
+ ex);
+ }
+ }
+}
diff --git a/id/server/idserverlib/src/test/java/test/abnahme/A/Test400GetAuthenticationData.java b/id/server/idserverlib/src/test/java/test/abnahme/A/Test400GetAuthenticationData.java
new file mode 100644
index 000000000..a6c9d7d78
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/abnahme/A/Test400GetAuthenticationData.java
@@ -0,0 +1,152 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.abnahme.A;
+
+import java.util.HashMap;
+
+import org.w3c.dom.Element;
+import test.abnahme.AbnahmeTestCase;
+
+import at.gv.egovernment.moa.id.AuthenticationException;
+import at.gv.egovernment.moa.id.auth.AuthenticationServer;
+import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants;
+import at.gv.egovernment.moa.id.auth.builder.VerifyXMLSignatureRequestBuilder;
+import at.gv.egovernment.moa.id.auth.data.AuthenticationSession;
+import at.gv.egovernment.moa.id.auth.data.IdentityLink;
+import at.gv.egovernment.moa.id.auth.invoke.SignatureVerificationInvoker;
+import at.gv.egovernment.moa.id.auth.parser.CreateXMLSignatureResponseParser;
+import at.gv.egovernment.moa.id.auth.parser.InfoboxReadResponseParser;
+import at.gv.egovernment.moa.id.auth.parser.VerifyXMLSignatureResponseParser;
+import at.gv.egovernment.moa.id.auth.validator.CreateXMLSignatureResponseValidator;
+import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
+import at.gv.egovernment.moa.id.data.AuthenticationData;
+
+/**
+ * @author Stefan Knirsch
+ * @version $Id$
+ */
+
+public class Test400GetAuthenticationData extends AbnahmeTestCase {
+
+ private String samlArtifact;
+
+ public Test400GetAuthenticationData(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ String sessionID = startAuthentication();
+ AuthenticationSession session = AuthenticationServer.getSession(sessionID);
+ String infoboxReadResponse = readXmldata("InfoBoxReadResponse.xml");
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+ server.verifyIdentityLink(sessionID, parameters);
+ InfoboxReadResponseParser irrp = new InfoboxReadResponseParser(infoboxReadResponse);
+ IdentityLink idl = irrp.parseIdentityLink();
+ Element domVerifyXMLSignatureRequest = new VerifyXMLSignatureRequestBuilder().build(idl, AuthConfigurationProvider.getInstance().getMoaSpAuthBlockTrustProfileID());
+ Element domVerifyXMLSignatureResponse = new SignatureVerificationInvoker().verifyXMLSignature(domVerifyXMLSignatureRequest);
+ new VerifyXMLSignatureResponseParser(domVerifyXMLSignatureResponse);
+ //VerifyXMLSignatureResponseValidator.getInstance().validate(respParser.parseData(), AuthConfigurationProvider.getInstance().getIdentityLinkX509SubjectNames());
+ // System.out.println(createXMLSignatureRequest);
+ String createXMLSignatureResponse = readXmldata("CreateXMLSignatureResponse.xml");
+ CreateXMLSignatureResponseValidator.getInstance().validate(new CreateXMLSignatureResponseParser(createXMLSignatureResponse).parseResponse(), session);
+ samlArtifact = server.verifyAuthenticationBlock(sessionID, createXMLSignatureResponse);
+ }
+
+ public void testA401() throws Exception {
+ try {
+
+ AuthenticationData authData = server.getAuthenticationData(samlArtifact);
+// authDataWriter(authData,"NEWA401");
+ assertXmlEquals(clearSamlAssertion(authData.getSamlAssertion()), readXmldata("AuthenticationData.xml"));
+ System.out.println("-----------------------\nTestfall " + this.getName() + " erfolgreich abgearbeitet! \n-----------------------");
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ public void testA451() throws Exception {
+ try {
+ try {
+ AuthenticationData authData = server.getAuthenticationData("AAGu1JFbyGKqJ+3NAonwMu5bNyUc7kooeMK6bxeXBbnK6NL0DfuVJsGi");
+ authDataWriter(authData, "A45");
+ if (authData != null)
+ fail();
+ }
+ catch (AuthenticationException e) {
+ System.out.println("-----------------------\nFehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "\n-----------------------");
+ }
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ public void testA452() throws Exception {
+ try {
+ server.getAuthenticationData(samlArtifact);
+ try {
+ server.getAuthenticationData(samlArtifact);
+ fail();
+ }
+ catch (AuthenticationException e) {
+ System.out.println("-----------------------\nFehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "\n-----------------------");
+ }
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+ public void testA453() throws Exception {
+ try {
+ server.setSecondsAuthDataTimeOut(-1000);
+ server.cleanup();
+ try {
+ server.getAuthenticationData(samlArtifact);
+ fail();
+ }
+ catch (AuthenticationException e) {
+ System.out.println("-----------------------\nFehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "\n-----------------------");
+ }
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ public void testA454() throws Exception {
+ try {
+ try {
+ server.getAuthenticationData("blabla123");
+ fail();
+ }
+ catch (AuthenticationException e) {
+ System.out.println("-----------------------\nFehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "\n-----------------------");
+ }
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+}
diff --git a/id/server/idserverlib/src/test/java/test/abnahme/A/Test500StartAuthenticationServlet.java b/id/server/idserverlib/src/test/java/test/abnahme/A/Test500StartAuthenticationServlet.java
new file mode 100644
index 000000000..1e094efd2
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/abnahme/A/Test500StartAuthenticationServlet.java
@@ -0,0 +1,320 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.abnahme.A;
+
+import java.io.OutputStream;
+import java.net.URL;
+import java.security.Security;
+
+import javax.net.ssl.SSLSocketFactory;
+
+import test.abnahme.AbnahmeTestCase;
+
+import at.gv.egovernment.moa.util.StreamUtils;
+import at.gv.egovernment.moa.util.URLEncoder;
+
+import com.sun.net.ssl.HostnameVerifier;
+import com.sun.net.ssl.HttpsURLConnection;
+
+/**
+ * @author Stefan Knirsch
+ * @version $Id$
+ *
+ */
+public class Test500StartAuthenticationServlet extends AbnahmeTestCase {
+
+ private String testdataRoot = TESTDATA_ROOT + "xmldata/standard/";
+ SSLSocketFactory ssf;
+ public Test500StartAuthenticationServlet(String name) {
+ super(name);
+ }
+ protected void setUp() throws Exception {
+ super.setUp();
+ Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
+ System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
+ System.setProperty("javax.net.ssl.trustStore", "C:/Programme/ApacheGroup/abnahme/server.keystore");
+ System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
+ }
+
+ public void testA501() throws Exception {
+ //NUR einmal für alle folgenden Testfälle
+ //----------------------------------------
+
+ //----------------------------------------
+
+ try {
+ String targetURL = getURL("https://localhost:8443/moa-id-auth/", "gb", "https://localhost:9443/");
+ HttpsURLConnection conn = giveConnection(targetURL, "GET");
+ conn.connect();
+ int resultCode = conn.getResponseCode();
+ String contentType = conn.getHeaderField("Content-Type");
+ if (resultCode != 200)
+ fail("Wrong HTTP-Code");
+ if (!conn.getHeaderField("Content-Type").equalsIgnoreCase("text/html"))
+ fail("Wrong contentType: expected text/html and was " + conn.getHeaderField("Content-Type"));
+ conn.disconnect();
+ System.out.println("-----------------------Testfall " + this.getName() + " erfolgreich abgearbeitet! -----------------------");
+
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ public void testA502() throws Exception {
+ try {
+ String URL = getURL("https://localhost:8443/moa-id-auth/", "gb", "https://localhost:9443/");
+ HttpsURLConnection conn = giveConnection(URL, "GET");
+ conn.connect();
+ int resultCode = conn.getResponseCode();
+ String contentType = conn.getHeaderField("Content-Type");
+ if (resultCode != 200)
+ fail("Wrong HTTP-Code: expected '200' and was '" + resultCode + "'");
+ if (!conn.getHeaderField("Content-Type").equalsIgnoreCase("text/html"))
+ fail("Wrong contentType: expected text/html and was " + conn.getHeaderField("Content-Type"));
+ String result = new String(StreamUtils.readStream(conn.getInputStream()));
+
+ conn.disconnect();
+
+ URL = parseDataURL(result);
+ conn = giveConnection(URL, "POST");
+ conn.setRequestProperty("Content-type", "application/x-www-form-urlencoded");
+
+ String infoboxReadResponse = readXmldata("InfoboxReadResponse.xml");
+ System.out.println("File gelesen, Daten in Outputstream einpflegen");
+ OutputStream out = conn.getOutputStream();
+ out.write(new String("XMLResponse=" + URLEncoder.encode(infoboxReadResponse, "UTF-8")).getBytes("UTF-8"));
+ out.flush();
+ out.close();
+
+ System.out.println("Verbinden zu " + URL);
+ conn.connect();
+ resultCode = conn.getResponseCode();
+ System.out.println("resultCode :" + resultCode);
+ String redirectLoc = conn.getHeaderField("Location");
+ System.out.println("redirectLoc :" + redirectLoc);
+ // Austausch von VerifyIdentityLink in der POST-URL durch VerifyAuthBlock... rest MUSS gleich sein!
+ if (!killInclusive(URL, "VerifyI", "Link", "VerifyAuthBlock").equals(redirectLoc))
+ fail("Wrong Redirect-Location: expected " + URL + " and was " + conn.getHeaderField("Location"));
+ if (!conn.getHeaderField("Content-Type").equalsIgnoreCase("text/xml"))
+ fail("Wrong contentType: expected text/xml and was " + conn.getHeaderField("Content-Type"));
+ conn.disconnect();
+ System.out.println("-----------------------\nTestfall " + this.getName() + " erfolgreich abgearbeitet! \n-----------------------");
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ public void testA503() throws Exception {
+ try {
+ String URL = getURL("https://localhost:8443/moa-id-auth/", "gb", "https://localhost:9443/");
+ HttpsURLConnection conn = giveConnection(URL, "GET");
+ conn.connect();
+
+ assertEquals(200,conn.getResponseCode());
+ if (!conn.getHeaderField("Content-Type").equalsIgnoreCase("text/html"))
+ fail("Wrong contentType: expected text/html and was " + conn.getHeaderField("Content-Type"));
+ String result = new String(StreamUtils.readStream(conn.getInputStream()));
+ URL = parseDataURL(result);
+
+ conn.disconnect();
+ conn = giveConnection(URL, "POST");
+ conn.setRequestProperty("Content-type", "application/x-www-form-urlencoded");
+ String infoboxReadResponse = readXmldata("InfoboxReadResponse.xml");
+ OutputStream out = conn.getOutputStream();
+ out.write(new String("XMLResponse=" + URLEncoder.encode(infoboxReadResponse, "UTF-8")).getBytes());
+ out.flush();
+ out.close();
+ conn.connect();
+ String redirectLoc = conn.getHeaderField("Location");
+ // Austausch von VerifyIdentityLink in der POST-URL durch VerifyAuthBlock... rest MUSS gleich sein!
+ if (!killInclusive(URL, "VerifyI", "Link", "VerifyAuthBlock").equals(redirectLoc))
+ fail("Wrong Redirect-Location: expected " + URL + " and was " + conn.getHeaderField("Location"));
+ if (!conn.getHeaderField("Content-Type").equalsIgnoreCase("text/xml"))
+ fail("Wrong contentType: expected text/xml and was " + conn.getHeaderField("Content-Type"));
+ conn.disconnect();
+
+ conn = giveConnection(redirectLoc, "POST");
+ System.out.println("Redirect Location: " + redirectLoc);
+ String createXMLSignatureResponse = URLEncoder.encode(readXmldata("CreateXMLSignatureResponse.xml"), "UTF-8");
+ out = conn.getOutputStream();
+ out.write(("XMLResponse=" +createXMLSignatureResponse).getBytes());
+ out.flush();
+ out.close();
+
+ System.out.println("Sending Data to " + redirectLoc);
+ conn.connect();
+
+ redirectLoc = conn.getHeaderField("Location");
+ System.out.println("redirectLoc: " + redirectLoc);
+ /* RandomAccessFile raf = new RandomAccessFile("C://503.xml", "rw");
+ raf.write(StreamUtils.readStream(conn.getInputStream()));
+ raf.close();*/
+ conn.disconnect();
+ assertEquals(302, conn.getResponseCode());
+ assertTrue(redirectLoc.startsWith("https://localhost:9443/?Target=gb&SAMLArtifact="));
+ System.out.println("-----------------------\nTestfall " + this.getName() + " erfolgreich abgearbeitet! \n-----------------------");
+
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+ public void testA551() throws Exception {
+ try {
+ String targetURL = getURL("https://localhost:8443/moa-id-auth/", "gb", "");
+ HttpsURLConnection conn = giveConnection(targetURL, "GET");
+ conn.connect();
+ String result = new String(StreamUtils.readStream(conn.getInputStream()));
+ assertTrue(result.indexOf("Die Angabe der Parameter ist unvollst&auml;ndig") >= 0);
+ conn.disconnect();
+ System.out.println("-----------------------\nFehler in " + this.getName() + " erfolgreich abgefangen: Die Angabe der Parameter ist unvollständig.\n-----------------------");
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ public void testA552() throws Exception {
+ try {
+ String URL = getURL("https://localhost:8443/moa-id-auth/", "gb", "https://localhost:9443/");
+ HttpsURLConnection conn = giveConnection(URL, "GET");
+ conn.connect();
+ int resultCode = conn.getResponseCode();
+ assertEquals(200, resultCode);
+ if (!conn.getHeaderField("Content-Type").equalsIgnoreCase("text/html"))
+ fail("Wrong contentType: expected text/html and was " + conn.getHeaderField("Content-Type"));
+ conn.disconnect();
+ URL = "https://localhost:8443/moa-id-auth/" + "VerifyIdentityLink?MOASessionID=0000";
+ conn = giveConnection(URL, "POST");
+ conn.setRequestProperty("Content-type", "application/x-www-form-urlencoded");
+
+ String infoboxReadResponse = readXmldata("InfoboxReadResponse.xml");
+ OutputStream out = conn.getOutputStream();
+ out.write(new String("XMLResponse=" + URLEncoder.encode(infoboxReadResponse, "UTF-8")).getBytes());
+ out.flush();
+ out.close();
+
+ conn.connect();
+ String result = new String(StreamUtils.readStream(conn.getInputStream()));
+ assertTrue(result.indexOf("MOASessionID ist unbekannt") >= 0);
+ System.out.println("Fehler in testA552 erfolgreich abgefangen: MOASessionID ist unbekannt");
+ conn.disconnect();
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+ public void testA553() throws Exception {
+ try {
+ String URL = getURL("https://localhost:8443/moa-id-auth/", "gb", "https://localhost:9443/");
+ HttpsURLConnection conn = giveConnection(URL, "GET");
+ conn.connect();
+ int resultCode = conn.getResponseCode();
+ assertEquals(200,resultCode);
+ if (!conn.getHeaderField("Content-Type").equalsIgnoreCase("text/html"))
+ fail("Wrong contentType: expected text/html and was " + conn.getHeaderField("Content-Type"));
+ String result = new String(StreamUtils.readStream(conn.getInputStream()));
+ String MOASessionID = parseSessionIDFromForm(result);
+ URL = parseDataURL(result);
+ conn.disconnect();
+
+ conn = giveConnection(URL, "POST");
+ conn.setRequestProperty("Content-type", "application/x-www-form-urlencoded");
+
+ String infoboxReadResponse = readXmldata("InfoboxReadResponse.xml");
+ OutputStream out = conn.getOutputStream();
+ out.write(new String("XMLResponse=" + URLEncoder.encode(infoboxReadResponse, "UTF-8")).getBytes());
+ out.flush();
+ out.close();
+ conn.connect();
+ result = new String(StreamUtils.readStream(conn.getInputStream()));
+ String redirectLoc = conn.getHeaderField("Location");
+ // Austausch von VerifyIdentityLink in der POST-URL durch VerifyAuthBlock... rest MUSS gleich sein!
+ if (!killInclusive(URL, "VerifyI", "Link", "VerifyAuthBlock").equals(redirectLoc))
+ fail("Wrong Redirect-Location: expected " + URL + " and was " + conn.getHeaderField("Location"));
+ if (!conn.getHeaderField("Content-Type").equalsIgnoreCase("text/xml"))
+ fail("Wrong contentType: expected text/xml and was " + conn.getHeaderField("Content-Type"));
+ conn.disconnect();
+ conn = giveConnection(redirectLoc + "XXX", "POST");
+ System.out.println("Redirect Location: " + redirectLoc + "XXX");
+ String createXMLSignatureResponse = "XMLResponse=" + URLEncoder.encode(readXmldata("CreateXMLSignatureResponse.xml"), "UTF-8");
+
+ out = conn.getOutputStream();
+ out.write(new String("MOASessionID=" + MOASessionID + "&").getBytes());
+ out.write(createXMLSignatureResponse.getBytes("UTF-8"));
+ out.flush();
+ out.close();
+ System.out.println("Sending Data to " + redirectLoc);
+ conn.connect();
+ resultCode = conn.getResponseCode();
+
+ result = new String(StreamUtils.readStream(conn.getInputStream()));
+ conn.disconnect();
+ assertEquals(200, resultCode);
+ assertTrue(result.indexOf("MOASessionID ist unbekannt") >= 0);
+ System.out.println("-----------------------\nTestfall " + this.getName() + " erfolgreich abgearbeitet! \n-----------------------");
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ private String parseDataURL(String input) {
+ String ret = getSubString(input.substring(input.indexOf("DataURL"), input.length()), "value=\"", "\"");
+ return ret;
+ }
+
+ private String getSubString(String input, String startsWith, String endsWith) {
+ return input.substring(input.indexOf(startsWith) + startsWith.length(), input.indexOf(endsWith, input.indexOf(startsWith) + startsWith.length()));
+ }
+ private String getURL(String authURL, String target, String oaURL) {
+ return authURL + "StartAuthentication?Target=" + target + "&OA=" + oaURL;
+ }
+ private String parseSessionIDFromForm(String htmlForm) {
+ String parName = "MOASessionID=";
+ assertTrue("HTML Form enthält keine SessionID", htmlForm.indexOf(parName) >= 0);
+ int i1 = htmlForm.indexOf(parName) + parName.length();
+ int i2 = htmlForm.indexOf("\"", i1);
+ assertTrue("HTML Form enthält keine gültige SessionID", i2 > i1);
+ return htmlForm.substring(i1, i2);
+ }
+
+ private class HostnameVerifierHack implements HostnameVerifier {
+ public boolean verify(String arg0, String arg1) {
+ return true;
+ }
+ }
+ private HttpsURLConnection giveConnection(String targetURL, String requestMethod) throws Exception {
+ URL url = new URL(targetURL);
+ HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();
+ conn.setRequestMethod(requestMethod);
+ conn.setDoInput(true);
+ conn.setDoOutput(true);
+ conn.setUseCaches(false);
+ conn.setAllowUserInteraction(false);
+ conn.setHostnameVerifier(new HostnameVerifierHack());
+ return conn;
+ }
+
+} \ No newline at end of file
diff --git a/id/server/idserverlib/src/test/java/test/abnahme/A/Test600GetAuthenticationDataService.java b/id/server/idserverlib/src/test/java/test/abnahme/A/Test600GetAuthenticationDataService.java
new file mode 100644
index 000000000..046a191b3
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/abnahme/A/Test600GetAuthenticationDataService.java
@@ -0,0 +1,296 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.abnahme.A;
+
+import java.io.OutputStream;
+import java.net.URL;
+import java.security.Security;
+import java.util.Calendar;
+import java.util.Vector;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Call;
+import javax.xml.rpc.Service;
+import javax.xml.rpc.ServiceFactory;
+
+import org.apache.axis.message.SOAPBodyElement;
+import org.w3c.dom.Element;
+
+import com.sun.net.ssl.HostnameVerifier;
+import com.sun.net.ssl.HttpsURLConnection;
+
+import test.abnahme.AbnahmeTestCase;
+
+import at.gv.egovernment.moa.id.proxy.builder.SAMLRequestBuilder;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.DateTimeUtils;
+import at.gv.egovernment.moa.util.StreamUtils;
+import at.gv.egovernment.moa.util.URLDecoder;
+import at.gv.egovernment.moa.util.URLEncoder;
+
+/**
+ * @author Stefan Knirsch
+ * @version $Id$
+ */
+
+public class Test600GetAuthenticationDataService extends AbnahmeTestCase {
+
+ private String moaSessionID;
+ private String samlArtifact;
+ private static final QName SERVICE_QNAME = new QName("SignatureCreation");
+
+ public Test600GetAuthenticationDataService(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
+ System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
+ System.setProperty("javax.net.ssl.trustStore", "C:/Programme/ApacheGroup/abnahme/server.keystore");
+ System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
+ }
+
+ public void testA601() throws Exception {
+ try {
+
+ // Anmelden
+ String URL = getURL("https://localhost:8443/moa-id-auth/", "gb", "https://localhost:9443/");
+ HttpsURLConnection conn = giveConnection(URL, "GET");
+ conn.connect();
+ String result = new String(StreamUtils.readStream(conn.getInputStream()));
+ String MOASessionID = parseSessionIDFromForm(result);
+ conn.disconnect();
+
+ URL = parseDataURL(result);
+ // Verify Identity Link
+ conn = giveConnection(URL, "POST");
+ conn.setRequestProperty("Content-type", "application/x-www-form-urlencoded");
+ String infoboxReadResponse = readXmldata("InfoboxReadResponse.xml");
+ OutputStream out = conn.getOutputStream();
+ out.write(new String("XMLResponse=" + URLEncoder.encode(infoboxReadResponse, "UTF-8")).getBytes());
+ out.flush();
+ out.close();
+ conn.connect();
+ String redirectLoc = conn.getHeaderField("Location");
+ conn.disconnect();
+ //Verify Auth Block
+ conn = giveConnection(redirectLoc, "POST");
+ String createXMLSignatureResponse = URLEncoder.encode(readXmldata("CreateXMLSignatureResponse.xml"), "UTF-8");
+ out = conn.getOutputStream();
+ out.write(("MOASessionID=" + moaSessionID + "&XMLResponse=" + createXMLSignatureResponse).getBytes("UTF-8"));
+ out.flush();
+ out.close();
+ conn.connect();
+ redirectLoc = conn.getHeaderField("Location");
+ samlArtifact = parseSamlArtifact(redirectLoc);
+ System.out.println("SamlArtifact: " + samlArtifact);
+ conn.disconnect();
+
+ assertTrue(redirectLoc.startsWith("https://localhost:9443/?Target=gb&SAMLArtifact="));
+
+ conn = null;
+
+ SAMLRequestBuilder srb = new SAMLRequestBuilder();
+
+ Element erg = doCall(srb.build(moaSessionID,URLDecoder.decode(samlArtifact, "UTF-8")));
+ result = DOMUtils.serializeNode(erg);
+ result = killInclusive(result,"IssueInstant=\"","\"","");
+ result = killInclusive(result,"AssertionID=\"","\"","");
+ result = killInclusive(result,"ResponseID=\"","\"","");
+
+// writeXmldata("GetAuthenticationDataWebServiceResponse.xml", result.getBytes("UTF-8"));
+
+ assertEquals(result,readXmldata("GetAuthenticationDataWebServiceResponse.xml"));
+
+ System.out.println("-----------------------\nTestfall " + this.getName() + " erfolgreich abgearbeitet! \n-----------------------");
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ public void testA651() throws Exception {
+ try {
+
+ // Anmelden
+ String URL = getURL("https://localhost:8443/moa-id-auth/", "gb", "https://localhost:9443/");
+ HttpsURLConnection conn = giveConnection(URL, "GET");
+ conn.connect();
+ String result = new String(StreamUtils.readStream(conn.getInputStream()));
+ String MOASessionID = parseSessionIDFromForm(result);
+ conn.disconnect();
+
+ URL = parseDataURL(result);
+ // Verify Identity Link
+ conn = giveConnection(URL, "POST");
+ conn.setRequestProperty("Content-type", "application/x-www-form-urlencoded");
+ String infoboxReadResponse = readXmldata("InfoboxReadResponse.xml");
+ OutputStream out = conn.getOutputStream();
+ out.write(new String("XMLResponse=" + URLEncoder.encode(infoboxReadResponse, "UTF-8")).getBytes());
+ out.flush();
+ out.close();
+ conn.connect();
+ String redirectLoc = conn.getHeaderField("Location");
+ conn.disconnect();
+ //Verify Auth Block
+ conn = giveConnection(redirectLoc, "POST");
+ String createXMLSignatureResponse = URLEncoder.encode(readXmldata("CreateXMLSignatureResponse.xml"), "UTF-8");
+ out = conn.getOutputStream();
+ out.write(("MOASessionID=" + moaSessionID + "&XMLResponse=" + createXMLSignatureResponse).getBytes("UTF-8"));
+ out.flush();
+ out.close();
+ conn.connect();
+ redirectLoc = conn.getHeaderField("Location");
+ samlArtifact = "AAGu1JFbyGKqJ+3NAonwMu5bNyUc7kooeMK6bxeXBbnK6NL0DfuVJsGi";
+ System.out.println("SamlArtifact: " + samlArtifact);
+ conn.disconnect();
+
+ assertTrue(redirectLoc.startsWith("https://localhost:9443/?Target=gb&SAMLArtifact="));
+
+ conn = null;
+
+ SAMLRequestBuilder srb = new SAMLRequestBuilder();
+ Element samlPRequest = srb.build(moaSessionID,samlArtifact);
+
+ assertTrue(DOMUtils.serializeNode(doCall(samlPRequest)).indexOf("unbekanntes SAML-Artifakt")!=-1);
+
+ System.out.println("-----------------------\nFehler in " + this.getName() + " erfolgreich abgefangen: Fehler beim Abholen der Anmeldedaten, unbekanntes SAML-Artifakt\n-----------------------");
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ public void testA652() throws Exception {
+ try {
+
+ // Anmelden
+ String URL = getURL("https://localhost:8443/moa-id-auth/", "gb", "https://localhost:9443/");
+ HttpsURLConnection conn = giveConnection(URL, "GET");
+ conn.connect();
+ String result = new String(StreamUtils.readStream(conn.getInputStream()));
+ String MOASessionID = parseSessionIDFromForm(result);
+ conn.disconnect();
+
+ URL = parseDataURL(result);
+ // Verify Identity Link
+ conn = giveConnection(URL, "POST");
+ conn.setRequestProperty("Content-type", "application/x-www-form-urlencoded");
+ String infoboxReadResponse = readXmldata("InfoboxReadResponse.xml");
+ OutputStream out = conn.getOutputStream();
+ out.write(new String("XMLResponse=" + URLEncoder.encode(infoboxReadResponse, "UTF-8")).getBytes());
+ out.flush();
+ out.close();
+ conn.connect();
+ String redirectLoc = conn.getHeaderField("Location");
+ conn.disconnect();
+ //Verify Auth Block
+ conn = giveConnection(redirectLoc, "POST");
+ String createXMLSignatureResponse = URLEncoder.encode(readXmldata("CreateXMLSignatureResponse.xml"), "UTF-8");
+ out = conn.getOutputStream();
+ out.write(("MOASessionID=" + moaSessionID + "&XMLResponse=" + createXMLSignatureResponse).getBytes("UTF-8"));
+ out.flush();
+ out.close();
+ conn.connect();
+ redirectLoc = conn.getHeaderField("Location");
+ samlArtifact = parseSamlArtifact(redirectLoc);
+ System.out.println("SamlArtifact: " + samlArtifact);
+ conn.disconnect();
+
+ assertTrue(redirectLoc.startsWith("https://localhost:9443/?Target=gb&SAMLArtifact="));
+
+ conn = null;
+ String request =
+ "<samlp:Request xmlns:samlp=\"urn:oasis:names:tc:SAML:1.0:protocol\" RequestID=\"" +
+ moaSessionID + "\" MajorVersion=\"1\" MinorVersion=\"0\" IssueInstant=\"" +
+ DateTimeUtils.buildDateTime(Calendar.getInstance())+"\">" +
+ "</samlp:Request>";
+
+ Element samlPRequest = DOMUtils.parseDocument(request, false, ALL_SCHEMA_LOCATIONS, null).getDocumentElement();
+
+ assertTrue(DOMUtils.serializeNode(doCall(samlPRequest)).indexOf("Fehlerhaftes Requestformat")!=-1);
+// writeXmldata("GetAuthenticationDataWebServiceResponse.xml", result.getBytes("UTF-8"));
+ System.out.println("-----------------------\nFehler in " + this.getName() + " erfolgreich abgefangen: Fehlerhaftes Requestformat\n-----------------------"); }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+
+ protected Element doCall(Element request)
+ throws Exception {
+ QName serviceName = new QName("GetAuthenticationData");
+ String endPoint = "http://localhost:8080/moa-id-auth/services/GetAuthenticationData";
+ Service service = ServiceFactory.newInstance().createService(serviceName);
+ Call call = service.createCall();
+ SOAPBodyElement body =
+ new SOAPBodyElement(request);
+ SOAPBodyElement[] params = new SOAPBodyElement[] {body};
+ Vector responses;
+ SOAPBodyElement response;
+
+ call.setTargetEndpointAddress(endPoint);
+ responses = (Vector) call.invoke(params);
+ response = (SOAPBodyElement) responses.get(0);
+
+ return response.getAsDOM();
+ }
+
+ private String parseDataURL(String input)
+ {
+ return getSubString(input.substring(input.indexOf("DataURL"),input.length()),"value=\"","\"");
+ }
+ private String parseSamlArtifact(String input)
+ {
+ return getSubString(input+"@@@","SAMLArtifact=","@@@");
+ }
+ private String getSubString(String input, String startsWith, String endsWith)
+ {
+ return input.substring(input.indexOf(startsWith)+startsWith.length(), input.indexOf(endsWith, input.indexOf(startsWith)+startsWith.length()));
+ }
+ private String getURL(String authURL, String target, String oaURL)
+ {
+ return authURL + "StartAuthentication?Target=" + target + "&OA=" + oaURL;
+ }
+ private String parseSessionIDFromForm(String htmlForm) {
+ String parName = "MOASessionID=";
+ assertTrue(
+ "HTML Form enthält keine SessionID",
+ htmlForm.indexOf(parName) >= 0);
+ int i1 = htmlForm.indexOf(parName) + parName.length();
+ int i2 = htmlForm.indexOf("\"", i1);
+ assertTrue("HTML Form enthält keine gültige SessionID", i2 > i1);
+ return htmlForm.substring(i1, i2);
+ }
+ private HttpsURLConnection giveConnection(String targetURL, String requestMethod) throws Exception {
+ HttpsURLConnection conn = (HttpsURLConnection) new URL(targetURL).openConnection();
+ conn.setRequestMethod(requestMethod);
+ conn.setDoInput(true);
+ conn.setDoOutput(true);
+ conn.setUseCaches(false);
+ conn.setAllowUserInteraction(false);
+ conn.setHostnameVerifier(new HostnameVerifierHack());
+ return conn;
+ }
+ private class HostnameVerifierHack implements HostnameVerifier {
+ public boolean verify(String arg0, String arg1) {
+ return true;
+ }
+ }
+}
diff --git a/id/server/idserverlib/src/test/java/test/abnahme/A/Test700SelectBKU.java b/id/server/idserverlib/src/test/java/test/abnahme/A/Test700SelectBKU.java
new file mode 100644
index 000000000..c8b2759e7
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/abnahme/A/Test700SelectBKU.java
@@ -0,0 +1,78 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.abnahme.A;
+
+import test.abnahme.AbnahmeTestCase;
+
+/*
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class Test700SelectBKU extends AbnahmeTestCase {
+
+ public Test700SelectBKU(String name) {
+ super(name);
+ }
+
+ public void testA701() throws Exception {
+ try {
+ String form = server.selectBKU(
+ "https://localhost:8443/auth",
+ "gb",
+ "https://localhost:9443/",
+ "file:" + getTestCaseDirectory() + "BKUSelectionTemplate.html",
+ "file:" + getTestCaseDirectory() + "Template.html");
+ //writeXmldata("SelectBKUForm_out.html", form.getBytes());
+ assertEqualsIgnoreSessionID(readXmldata("SelectBKUForm.html"), form);
+ }
+ catch (Exception ex) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + ex.getLocalizedMessage());
+ throw ex;
+ }
+ }
+ public void testA702() throws Exception {
+ try {
+ String form = server.selectBKU(
+ "https://localhost:8443/auth",
+ "gb",
+ "https://localhost:9443/",
+ null,
+ null);
+ //writeXmldata("SelectBKUForm_out.html", form.getBytes());
+ assertEqualsIgnoreSessionID(readXmldata("SelectBKUForm.html"), form);
+ }
+ catch (Exception ex) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + ex.getLocalizedMessage());
+ throw ex;
+ }
+ }
+ public void testA703() throws Exception {
+ try {
+ String form = server.selectBKU(
+ "https://localhost:8443/auth",
+ "gb",
+ "https://localhost:9443/",
+ null,
+ null);
+ //writeXmldata("SelectBKUForm_out.html", form.getBytes());
+ assertEqualsIgnoreSessionID(readXmldata("SelectBKUForm.html"), form);
+ }
+ catch (Exception ex) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + ex.getLocalizedMessage());
+ throw ex;
+ }
+ }
+}
diff --git a/id/server/idserverlib/src/test/java/test/abnahme/AbnahmeTestCase.java b/id/server/idserverlib/src/test/java/test/abnahme/AbnahmeTestCase.java
new file mode 100644
index 000000000..4ef3ad92f
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/abnahme/AbnahmeTestCase.java
@@ -0,0 +1,180 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.abnahme;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+
+import test.MOAIDTestCase;
+
+import at.gv.egovernment.moa.id.MOAIDException;
+import at.gv.egovernment.moa.id.auth.AuthenticationServer;
+import at.gv.egovernment.moa.id.config.ConfigurationProvider;
+import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
+import at.gv.egovernment.moa.id.data.AuthenticationData;
+
+/**
+ * Base class for MOA ID test cases.
+ *
+ * Provides some utility functions.
+ *
+ * @author Stefan Knirsch
+ * @version $Id$
+ */
+public class AbnahmeTestCase extends MOAIDTestCase {
+
+ protected static final String TESTDATA_ROOT = "data/abnahme-test/";
+ protected static final String TESTDATA_XMLDATA = "data/abnahme-test/xmldata/";
+ protected static final String AUTH_ENDPOINT = "http://localhost:8080/moa-id-auth/";
+ protected AuthenticationServer server;
+
+ /**
+ * Constructor for MOATestCase.
+ * @param arg0
+ */
+ public AbnahmeTestCase(String name) {
+ super(name);
+ }
+ /**
+ * Set up a transaction context with a test configuration.
+ */
+ protected void setUp() throws Exception {
+
+ System.out.print("--------S-T-A-R-T----V-O-N----");
+ System.out.print(getName().toUpperCase().substring(4,getName().length()));
+ System.out.print("-----------------------------\n");
+
+ // Set moa.spss.server.configuration property
+ System.setProperty("moa.spss.server.configuration",TESTDATA_ROOT + "conf/moa/ConfigurationTest.xml");
+
+ // Set moa.id.configuration property
+ String pathname = findXmldata("Configuration.xml");
+ System.setProperty(ConfigurationProvider.CONFIG_PROPERTY_NAME, pathname);
+ System.out.println("Konfiguration " + pathname);
+ AuthConfigurationProvider.reload();
+
+ server = AuthenticationServer.getInstance();
+ }
+ /** Test case z.B. "A153" */
+ protected String getID() {
+ return getName().toUpperCase().substring(4,getName().length());
+ }
+ /** Test group z.B. "A100" */
+ protected String getTestGroup() {
+ return getID().substring(0, 2) + "00";
+ }
+ /** Test case data directory */
+ protected String getTestCaseDirectory() {
+ return getTestGroupDirectory() + getID() + "/";
+ }
+ /** Test group data directory */
+ protected String getTestGroupDirectory() {
+ return TESTDATA_XMLDATA + getTestGroup() + "/";
+ }
+ /** Finds a file in the xmldata directory */
+ protected String findXmldata(String filename) {
+ String pathname = getTestCaseDirectory() + filename;
+ if (! new File(pathname).exists()) {
+ pathname = getTestGroupDirectory() + filename;
+ if (! new File(pathname).exists()) {
+ pathname = TESTDATA_XMLDATA + filename;
+ }
+ }
+ return pathname;
+ }
+ /** Finds and reads a file in the xmldata directory */
+ protected String readXmldata(String filename) throws IOException {
+ String pathname = findXmldata(filename);
+ System.out.println("Read file " + pathname);
+ return readFile(pathname);
+ }
+ protected void writeXmldata(String filename, byte[] content) throws Exception {
+ String pathname = getTestCaseDirectory() + filename;
+ System.out.println("Write file " + pathname);
+ RandomAccessFile raf = new RandomAccessFile(pathname, "rw");
+ byte[] data = content;
+ raf.write(data);
+ raf.setLength(data.length);
+ raf.close();
+ }
+
+ /**
+ * Creates a session using standard parameters,
+ * and returns the session ID.
+ */
+ protected String startAuthentication() throws MOAIDException {
+ return startAuthentication("https://localhost:9443/");
+ }
+ /**
+ * Creates a session using standard parameters,
+ * and returns the session ID.
+ */
+ protected String startAuthentication(String oaURL) throws MOAIDException {
+ String htmlForm = AuthenticationServer.getInstance().startAuthentication(
+ "https://localhost:8443/auth",
+ "gb",
+ oaURL,
+ null,
+ null,
+ null,
+ null,
+ null);
+ String sessionID = parseSessionIDFromForm(htmlForm);
+ return sessionID;
+ }
+ private String parseSessionIDFromForm(String htmlForm) {
+ String parName = "MOASessionID=";
+ assertTrue(
+ "HTML Form enthält keine SessionID",
+ htmlForm.indexOf(parName) >= 0);
+ int i1 = htmlForm.indexOf(parName) + parName.length();
+ int i2 = i1;
+ while(i2 < htmlForm.length() &&
+ (htmlForm.charAt(i2) == '-' || (htmlForm.charAt(i2) >= '0' && htmlForm.charAt(i2) <= '9')))
+ i2++;
+ assertTrue("HTML Form enthält keine gültige SessionID", i2 > i1);
+ return htmlForm.substring(i1, i2);
+ }
+ protected String clearSessionID(String htmlForm) {
+ String sessionID = parseSessionIDFromForm(htmlForm);
+ int i1 = htmlForm.indexOf(sessionID);
+ int i2 = i1 + sessionID.length();
+ return htmlForm.substring(0, i1) + htmlForm.substring(i2);
+ }
+ protected void assertEqualsIgnoreSessionID(String s1, String s2) {
+ String ss1 = clearSessionID(s1);
+ String ss2 = clearSessionID(s2);
+ assertEquals(ss1, ss2);
+ }
+ protected void authDataWriter(AuthenticationData authData, String filename) throws Exception
+ {
+ writeXmldata("AuthenticationDataNEW.xml", clearSamlAssertion(authData.getSamlAssertion()).getBytes("UTF-8"));
+ }
+
+ /**
+ * clearSamlAssertion löscht aus einer beliebiegen String-Repräsentation einer XML-Struktur
+ * AUSSLIESSLICH die Attribute 'IssueInstant' und 'AssertionID' heraus.
+ * @param samlAssertion
+ * @return String
+ */
+ protected String clearSamlAssertion(String samlAssertion)
+ {
+ String result = killInclusive(samlAssertion,"IssueInstant='", "'","");
+ result = killInclusive(result,"AssertionID='", "'","");
+ return result;
+ }
+} \ No newline at end of file
diff --git a/id/server/idserverlib/src/test/java/test/abnahme/AllTests.java b/id/server/idserverlib/src/test/java/test/abnahme/AllTests.java
new file mode 100644
index 000000000..027d6485e
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/abnahme/AllTests.java
@@ -0,0 +1,64 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.abnahme;
+
+import junit.awtui.TestRunner;
+import junit.framework.*;
+
+import test.abnahme.A.Test100StartAuthentication;
+import test.abnahme.A.Test200VerifyIdentityLink;
+import test.abnahme.A.Test300VerifyAuthBlock;
+import test.abnahme.A.Test400GetAuthenticationData;
+import test.abnahme.A.Test500StartAuthenticationServlet;
+import test.abnahme.A.Test600GetAuthenticationDataService;
+import test.abnahme.A.Test700SelectBKU;
+import test.abnahme.C.Test100Konfiguration;
+import test.abnahme.P.Test100LoginParameterResolver;
+
+
+
+
+/**
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class AllTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite();
+
+ suite.addTestSuite(Test100StartAuthentication.class);
+ suite.addTestSuite(Test200VerifyIdentityLink.class);
+ suite.addTestSuite(Test300VerifyAuthBlock.class);
+ suite.addTestSuite(Test400GetAuthenticationData.class);
+ suite.addTestSuite(Test500StartAuthenticationServlet.class);
+ suite.addTestSuite(Test600GetAuthenticationDataService.class);
+ suite.addTestSuite(Test700SelectBKU.class);
+
+ suite.addTestSuite(Test100LoginParameterResolver.class);
+
+ suite.addTestSuite(Test100Konfiguration.class);
+ return suite;
+ }
+
+ public static void main(String[] args) {
+ try {
+ TestRunner.run(AllTests.class);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/id/server/idserverlib/src/test/java/test/abnahme/C/Test100Konfiguration.java b/id/server/idserverlib/src/test/java/test/abnahme/C/Test100Konfiguration.java
new file mode 100644
index 000000000..3b014acdf
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/abnahme/C/Test100Konfiguration.java
@@ -0,0 +1,75 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.abnahme.C;
+
+import at.gv.egovernment.moa.id.config.ConfigurationProvider;
+import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
+
+import test.abnahme.AbnahmeTestCase;
+
+/**
+ * @author Stefan Knirsch
+ * @version $Id$
+ *
+ */
+
+public class Test100Konfiguration extends AbnahmeTestCase {
+
+ public Test100Konfiguration(String name) {
+ super(name);
+ }
+
+ public void testC001() throws Exception {
+ try {
+ System.out.println("-----------------------Testfall " + this.getName() + " erfolgreich abgearbeitet! -----------------------");
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+ public void testC002() throws Exception {
+ try {
+ System.out.println("-----------------------Testfall " + this.getName() + " erfolgreich abgearbeitet! -----------------------");
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+ public void testC003() throws Exception {
+ try {
+ System.out.println("-----------------------Testfall " + this.getName() + " erfolgreich abgearbeitet! -----------------------");
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+ throw e;
+ }
+ }
+ public void testC051() throws Exception {
+ try {
+ // Set moa.id.configuration property
+ String pathname = findXmldata("ConfigurationC051.xml");
+ System.setProperty(ConfigurationProvider.CONFIG_PROPERTY_NAME, pathname);
+ System.out.println("Konfiguration " + pathname);
+ AuthConfigurationProvider.reload();
+ }
+ catch (Exception e) {
+ System.out.println("-----------------------Fehler in " + this.getName() + " erfolgreich abgefangen: " + e.getLocalizedMessage() + "-----------------------");
+ }
+ // AuthConfigurationProvider.getInstance().getBKUConnectionParameter().getAcceptedServerCertificates()
+ }
+}
diff --git a/id/server/idserverlib/src/test/java/test/abnahme/P/Test100LoginParameterResolver.java b/id/server/idserverlib/src/test/java/test/abnahme/P/Test100LoginParameterResolver.java
new file mode 100644
index 000000000..248e5cc33
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/abnahme/P/Test100LoginParameterResolver.java
@@ -0,0 +1,150 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.abnahme.P;
+import test.abnahme.AbnahmeTestCase;
+
+/**
+ * @author Stefan Knirsch
+ * @version $Id$
+ *
+ */
+
+public class Test100LoginParameterResolver extends AbnahmeTestCase {
+
+// private static final String CLIENT_IP_ADDRESS = "56.246.75.11";
+// private OAConfiguration oaConf;
+// private LoginParameterResolver lpr;
+//
+ public Test100LoginParameterResolver(String name) {
+ super(name);
+ }
+//
+// private void setUp(String publicURLPrefix)
+// throws Exception {
+//
+// // get configuration data
+// ProxyConfigurationProvider proxyConf = ProxyConfigurationProvider.getInstance();
+// OAProxyParameter oaParam = proxyConf.getOnlineApplicationParameter(publicURLPrefix);
+// oaConf = oaParam.getOaConfiguration();
+// System.out.println("Parameterübergabe: " + oaConf.getAuthType());
+//
+// // get login parameter resolver
+// LoginParameterResolverFactory.initialize();
+// lpr = LoginParameterResolverFactory.getLoginParameterResolver(publicURLPrefix);
+// }
+// public void testP101() throws Exception {
+// try {
+// // read configuration and set up LoginParameterResolver
+// setUp("https://testP101:9443/");
+// if (! oaConf.getAuthType().equals(OAConfiguration.BASIC_AUTH))
+// fail();
+//
+// // assemble authentication data
+// AuthenticationData authData = new AuthenticationData();
+// authData.setFamilyName("Huber");
+// authData.setGivenName("Hugo");
+//
+// // resolve login headers
+// Map loginHeaders = lpr.getAuthenticationHeaders(oaConf, authData, CLIENT_IP_ADDRESS, false, "");
+//
+// // validate login headers
+// assertEquals(1, loginHeaders.keySet().size());
+// System.out.println("Header Authorization: " + loginHeaders.get("Authorization"));
+// System.out.println("Decoded UserID:Password " +
+// new String(new BASE64Decoder().decodeBuffer(((String)loginHeaders.get("Authorization")).substring(6))));
+// String userIDPassword = "Hugo:Huber";
+// String credentials = Base64Utils.encode(userIDPassword.getBytes());
+// assertEquals("Basic " + credentials, loginHeaders.get("Authorization"));
+// System.out.println("-----------------------Testfall " + this.getName() + " erfolgreich abgearbeitet! -----------------------");
+// }
+// catch (Exception e) {
+// System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+// throw e;
+// }
+//
+// }
+// public void testP102() throws Exception {
+// try {
+// // read configuration and set up LoginParameterResolver
+// setUp("https://testP102:9443/");
+// if (! oaConf.getAuthType().equals(OAConfiguration.PARAM_AUTH))
+// fail();
+//
+// // assemble authentication data
+// AuthenticationData authData = new AuthenticationData();
+// String DATE_OF_BIRTH = "1963-12-29";
+// String VPK = "kp6hOq6LRAkLtrqm6EvDm6bMwJw=";
+// authData.setDateOfBirth(DATE_OF_BIRTH);
+// authData.setBPK(VPK);
+//
+// // resolve login parameters
+// Map loginParameters = lpr.getAuthenticationParameters(oaConf, authData, CLIENT_IP_ADDRESS, false, "");
+//
+// // validate login headers
+// assertEquals(2, loginParameters.keySet().size());
+// System.out.println("Param1: " + loginParameters.get("Param1"));
+// System.out.println("Param2: " + loginParameters.get("Param2"));
+// assertEquals(DATE_OF_BIRTH, loginParameters.get("Param1"));
+// assertEquals(VPK, loginParameters.get("Param2"));
+// System.out.println("-----------------------Testfall " + this.getName() + " erfolgreich abgearbeitet! -----------------------");
+// }
+// catch (Exception e) {
+// System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+// throw e;
+// }
+// }
+//
+// public void testP103() throws Exception {
+// try {
+// // read configuration and set up LoginParameterResolver
+// setUp("https://localhost:9443/");
+// if (! oaConf.getAuthType().equals(OAConfiguration.HEADER_AUTH))
+// fail();
+//
+// // assemble authentication data
+// AuthenticationData authData = new AuthenticationData();
+// boolean PUBLIC_AUTH = true;
+// String BKZ = "FinanzamtWien23Leitstelle";
+// boolean QUAL_CERT = false;
+// String STAMMZAHL = "3456789012";
+// authData.setPublicAuthority(PUBLIC_AUTH);
+// authData.setPublicAuthorityCode(BKZ);
+// authData.setQualifiedCertificate(QUAL_CERT);
+// authData.setIdentificationValue(STAMMZAHL);
+//
+// // resolve login headers
+// Map loginHeaders = lpr.getAuthenticationHeaders(oaConf, authData, CLIENT_IP_ADDRESS, false, "");
+//
+// // validate login headers
+// assertEquals(5, loginHeaders.keySet().size());
+// System.out.println("Header Param1: " + loginHeaders.get("Param1"));
+// System.out.println("Header Param2: " + loginHeaders.get("Param2"));
+// System.out.println("Header Param3: " + loginHeaders.get("Param3"));
+// System.out.println("Header Param4: " + loginHeaders.get("Param4"));
+// System.out.println("Header Param5: " + loginHeaders.get("Param5"));
+// assertEquals(String.valueOf(PUBLIC_AUTH), loginHeaders.get("Param1"));
+// assertEquals(BKZ, loginHeaders.get("Param2"));
+// assertEquals(String.valueOf(QUAL_CERT), loginHeaders.get("Param3"));
+// assertEquals(STAMMZAHL, loginHeaders.get("Param4"));
+// assertEquals(CLIENT_IP_ADDRESS, loginHeaders.get("Param5"));
+// System.out.println("-----------------------Testfall " + this.getName() + " erfolgreich abgearbeitet! -----------------------");
+// }
+// catch (Exception e) {
+// System.err.println("------ FEHLER IN " + this.getName() + ":" + e.getLocalizedMessage());
+// throw e;
+// }
+// }
+}
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/AllTests.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/AllTests.java
new file mode 100644
index 000000000..ff4be0ba2
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/AllTests.java
@@ -0,0 +1,56 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.id;
+
+import test.at.gv.egovernment.moa.id.auth.AuthenticationServerTest;
+import test.at.gv.egovernment.moa.id.auth.servlet.GetAuthenticationDataServiceTest;
+import test.at.gv.egovernment.moa.id.auth.invoke.SignatureVerificationTest;
+import test.at.gv.egovernment.moa.id.config.auth.MOAIDAuthConfigurationProviderTest;
+import test.at.gv.egovernment.moa.id.config.proxy.MOAIDProxyConfigurationProviderTest;
+
+import junit.awtui.TestRunner;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class AllTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite();
+
+ suite.addTestSuite(AuthenticationServerTest.class);
+ suite.addTest(test.at.gv.egovernment.moa.id.auth.builder.AllTests.suite());
+ suite.addTest(test.at.gv.egovernment.moa.id.auth.parser.AllTests.suite());
+ suite.addTestSuite(GetAuthenticationDataServiceTest.class);
+ suite.addTestSuite(SignatureVerificationTest.class);
+ suite.addTestSuite(MOAIDAuthConfigurationProviderTest.class);
+ suite.addTestSuite(MOAIDProxyConfigurationProviderTest.class);
+ suite.addTest(test.at.gv.egovernment.moa.id.proxy.AllTests.suite());
+
+ return suite;
+ }
+
+ public static void main(String[] args) {
+ try {
+ TestRunner.run(AllTests.class);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/UnitTestCase.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/UnitTestCase.java
new file mode 100644
index 000000000..c1ca60130
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/UnitTestCase.java
@@ -0,0 +1,50 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.id;
+
+import test.MOAIDTestCase;
+
+import at.gv.egovernment.moa.id.config.ConfigurationProvider;
+
+/**
+ * Base class for MOA ID test cases.
+ *
+ * Provides some utility functions.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class UnitTestCase extends MOAIDTestCase {
+
+ protected static final String TESTDATA_ROOT = "data/test/";
+
+ /**
+ * Constructor for MOATestCase.
+ * @param arg0
+ */
+ public UnitTestCase(String name) {
+ super(name);
+ }
+ /**
+ * Set up a transaction context with a test configuration.
+ */
+ protected void setUp() throws Exception {
+ System.setProperty(
+ ConfigurationProvider.CONFIG_PROPERTY_NAME,
+ TESTDATA_ROOT + "conf/ConfigurationTest.xml");
+ }
+
+} \ No newline at end of file
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/AuthenticationServerTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/AuthenticationServerTest.java
new file mode 100644
index 000000000..db7aa9719
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/AuthenticationServerTest.java
@@ -0,0 +1,71 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.id.auth;
+
+import java.util.HashMap;
+
+import at.gv.egovernment.moa.id.auth.AuthenticationServer;
+import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants;
+import at.gv.egovernment.moa.id.data.AuthenticationData;
+
+import test.at.gv.egovernment.moa.id.UnitTestCase;
+
+/**
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class AuthenticationServerTest extends UnitTestCase {
+
+ public AuthenticationServerTest(String name) {
+ super(name);
+ }
+
+ public void testStandard() throws Exception {
+ doTest(
+ "standard",
+ "https://localhost:8443/auth",
+ "gb",
+ "https://localhost:9443/",
+ null,
+ null);
+ }
+ public void doTest(String testdataDirectory, String authURL, String target, String oaURL, String bkuURL, String templateURL) throws Exception {
+ String testdataRoot = TESTDATA_ROOT + "xmldata/" + testdataDirectory + "/";
+ AuthenticationServer server = AuthenticationServer.getInstance();
+ String htmlForm = server.startAuthentication(authURL, target, oaURL, templateURL, bkuURL, null, null, null);
+ String sessionID = parseSessionIDFromForm(htmlForm);
+ String infoboxReadResponse = readFile(TESTDATA_ROOT + "xmldata/testperson1/" + "InfoboxReadResponse.xml");
+ HashMap parameters = new HashMap(1);
+ parameters.put(MOAIDAuthConstants.PARAM_XMLRESPONSE, infoboxReadResponse);
+
+ String createXMLSignatureRequest = server.verifyIdentityLink(sessionID, parameters);
+ String createXMLSignatureRequestShould = readFile(testdataRoot + "CreateXMLSignatureRequest.xml");
+ assertXmlEquals(createXMLSignatureRequestShould, createXMLSignatureRequest);
+ String createXMLSignatureResponse = readFile(testdataRoot + "CreateXMLSignatureResponse.xml");
+ String samlArtifact = server.verifyAuthenticationBlock(sessionID, createXMLSignatureResponse);
+ AuthenticationData authData = server.getAuthenticationData(samlArtifact);
+ String authDataShould = readFile(testdataRoot + "AuthenticationDataAssertion.xml");
+ assertXmlEquals(authDataShould, authData.getSamlAssertion());
+ }
+ private String parseSessionIDFromForm(String htmlForm) {
+ String parName = "MOASessionID=";
+ assertTrue("HTML Form enthält keine SessionID", htmlForm.indexOf(parName) >= 0);
+ int i1 = htmlForm.indexOf(parName) + parName.length();
+ int i2 = htmlForm.indexOf("\"", i1);
+ assertTrue("HTML Form enthält keine gültige SessionID", i2 > i1);
+ return htmlForm.substring(i1, i2);
+ }
+}
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/MOAIDAuthInitialiserTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/MOAIDAuthInitialiserTest.java
new file mode 100644
index 000000000..fd9164a09
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/MOAIDAuthInitialiserTest.java
@@ -0,0 +1,62 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.id.auth;
+
+import java.security.KeyStore;
+import java.util.Enumeration;
+
+import test.at.gv.egovernment.moa.id.UnitTestCase;
+import at.gv.egovernment.moa.id.util.SSLUtils;
+import at.gv.egovernment.moa.util.KeyStoreUtils;
+
+/**
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class MOAIDAuthInitialiserTest extends UnitTestCase {
+
+ public MOAIDAuthInitialiserTest(String name) {
+ super(name);
+ }
+
+ public void testInit() throws Exception
+ {
+// System.setProperty(
+// ConfigurationProvider.CONFIG_PROPERTY_NAME,"C://Programme/ApacheGroup/abnahme/conf/moa-id/SampleMOAIDConfiguration.xml");
+// System.setProperty(
+// ConfigurationProvider.CONFIG_PROPERTY_NAME,"D://Daten/_Projects/moa_id_maengel/SampleMOAIDConfiguration.xml");
+ SSLUtils.initialize();
+
+ try {
+ KeyStore s = KeyStoreUtils.loadKeyStore("pkcs12","file:C:/Programme/ApacheGroup/abnahme/cert/keystore.p12","changeit");
+ System.out.println(s.getProvider().getClass().getName());
+ Enumeration aliases = s.aliases();
+ while (aliases.hasMoreElements()) {
+ String element = (String) aliases.nextElement();
+ System.out.print(element+":");
+ System.out.println(s.getCertificate(element).getPublicKey().getAlgorithm());
+ System.out.println(s.getCertificate(element).getType());
+ }
+
+
+ System.out.println(s.getCertificate("pc41408").getPublicKey().getFormat());
+
+ }
+ catch (Exception e) {e.printStackTrace();};
+
+ }
+
+ }
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/AllTests.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/AllTests.java
new file mode 100644
index 000000000..058b73ebf
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/AllTests.java
@@ -0,0 +1,48 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.id.auth.builder;
+
+import junit.awtui.TestRunner;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author patrick
+ * @version $Id$
+ */
+public class AllTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite();
+
+// suite.addTestSuite(AuthenticationBlockAssertionBuilderTest.class);
+ suite.addTestSuite(CreateXMLSignatureBuilderTest.class);
+// suite.addTestSuite(GetIdentityLinkFormBuilderTest.class);
+// suite.addTestSuite(InfoboxReadRequestBuilderTest.class);
+// suite.addTestSuite(PersonDataBuilderTest.class);
+// suite.addTestSuite(SAMLArtifactBuilderTest.class);
+
+ return suite;
+ }
+
+ public static void main(String[] args) {
+ try {
+ TestRunner.run(AllTests.class);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/AuthenticationBlockAssertionBuilderTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/AuthenticationBlockAssertionBuilderTest.java
new file mode 100644
index 000000000..b2597b98f
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/AuthenticationBlockAssertionBuilderTest.java
@@ -0,0 +1,62 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.id.auth.builder;
+
+import test.at.gv.egovernment.moa.id.UnitTestCase;
+
+import at.gv.egovernment.moa.id.auth.builder.AuthenticationBlockAssertionBuilder;
+
+/**
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class AuthenticationBlockAssertionBuilderTest extends UnitTestCase {
+ private static final String nl = "\n";
+ private static final String ISSUER = "Hugo Mustermann";
+ private static final String ISSUE_INSTANT = "2003-03-15T22:50:21+01:00";
+ private static final String AUTH_URL = "https://auth.moa.gv.at/";
+ private static final String TARGET = "Grundbuch";
+ private static final String OA_URL = "https://grundbuch.gv.at/";
+ private static final String GEB_DAT = "2004-01-02";
+
+ // wird auch von CreateXMLSignatureBuilderTest verwendet !
+ public static final String ASSERTION_SHOULD =
+"<saml:Assertion xmlns:saml='urn:oasis:names:tc:SAML:1.0:assertion' MajorVersion='1' MinorVersion='0' AssertionID='any' Issuer='" + ISSUER + "' IssueInstant='" + ISSUE_INSTANT + "'>" + nl +
+" <saml:AttributeStatement>" + nl +
+" <saml:Subject>" + nl +
+" <saml:NameIdentifier>" + AUTH_URL + "</saml:NameIdentifier>" + nl +
+" </saml:Subject>" + nl +
+" <saml:Attribute AttributeName='Geschäftsbereich' AttributeNamespace='http://reference.e-government.gv.at/namespace/moa/20020822#'>" + nl +
+" <saml:AttributeValue>" + TARGET + "</saml:AttributeValue>" + nl +
+" </saml:Attribute>" + nl +
+" <saml:Attribute AttributeName='OA' AttributeNamespace='http://reference.e-government.gv.at/namespace/moa/20020822#'>" + nl +
+" <saml:AttributeValue>" + OA_URL + "</saml:AttributeValue>" + nl +
+" </saml:Attribute>" + nl +
+" </saml:AttributeStatement>" + nl +
+"</saml:Assertion>";
+
+ public AuthenticationBlockAssertionBuilderTest(String name) {
+ super(name);
+ }
+
+ public void testBuild() throws Exception {
+ AuthenticationBlockAssertionBuilder builder = new AuthenticationBlockAssertionBuilder();
+ String assertionBuilt = builder.buildAuthBlock(ISSUER, ISSUE_INSTANT, AUTH_URL, TARGET, "", "", OA_URL, GEB_DAT, null, null);
+ assertionBuilt = XML_DECL + assertionBuilt;
+ String assertionShould = XML_DECL + ASSERTION_SHOULD;
+ assertXmlEquals(assertionShould, assertionBuilt);
+ }
+}
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/CreateXMLSignatureBuilderTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/CreateXMLSignatureBuilderTest.java
new file mode 100644
index 000000000..3eb492f9e
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/CreateXMLSignatureBuilderTest.java
@@ -0,0 +1,120 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.id.auth.builder;
+
+import at.gv.egovernment.moa.id.auth.builder.CreateXMLSignatureRequestBuilder;
+
+import test.at.gv.egovernment.moa.id.UnitTestCase;
+
+/**
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class CreateXMLSignatureBuilderTest extends UnitTestCase {
+ private static final String nl = "\n";
+ public static final String TRANSFORMS_INFO =
+ " <sl10:TransformsInfo>" + nl +
+ " <dsig:Transforms>" + nl +
+ " <dsig:Transform Algorithm='http://www.w3.org/2000/09/xmldsig#enveloped-signature'/>" + nl +
+ " <dsig:Transform Algorithm='http://www.w3.org/TR/1999/REC-xslt-19991116'>" + nl +
+"<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:saml='urn:oasis:names:tc:SAML:1.0:assertion' >" + nl +
+"<xsl:template match='/'>" + nl +
+"<html>" + nl +
+"<body>" + nl +
+"</body>" + nl +
+"</html>" + nl +
+"</xsl:template>" + nl +
+"</xsl:stylesheet>" + nl +
+ " </dsig:Transform>" + nl +
+ " </dsig:Transforms>" + nl +
+ " <sl10:FinalDataMetaInfo>" + nl +
+ " <sl10:MimeType>text/html</sl10:MimeType>" + nl +
+ " </sl10:FinalDataMetaInfo>" + nl +
+ " </sl10:TransformsInfo>" + nl;
+ public static final String REQUEST_SHOULD =
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + nl +
+"<sl11:CreateXMLSignatureRequest xmlns:dsig=\"http://www.w3.org/2000/09/xmldsig#\" xmlns:sl10=\"http://www.buergerkarte.at/namespaces/securitylayer/20020225#\" xmlns:sl11=\"http://www.buergerkarte.at/namespaces/securitylayer/20020831#\">" + nl +
+" <sl11:KeyboxIdentifier>SecureSignatureKeypair</sl11:KeyboxIdentifier>" + nl +
+" <sl11:DataObjectInfo Structure=\"detached\">" + nl +
+" <sl10:DataObject Reference=\"\"/>" + nl +
+TRANSFORMS_INFO +
+" </sl11:DataObjectInfo>" + nl +
+" <sl11:SignatureInfo>" + nl +
+" <sl11:SignatureEnvironment>" + nl +
+" <sl10:XMLContent>" + AuthenticationBlockAssertionBuilderTest.ASSERTION_SHOULD + "</sl10:XMLContent>" + nl +
+" </sl11:SignatureEnvironment>" + nl +
+" <sl11:SignatureLocation Index=\"2\">/saml:Assertion</sl11:SignatureLocation>" + nl +
+" </sl11:SignatureInfo>" + nl +
+"</sl11:CreateXMLSignatureRequest>";
+
+
+ public static final String TRANSFORMS_INFO_SL12 =
+ " <sl:TransformsInfo>" + nl +
+ " <dsig:Transforms>" + nl +
+ " <dsig:Transform Algorithm='http://www.w3.org/2000/09/xmldsig#enveloped-signature'/>" + nl +
+ " <dsig:Transform Algorithm='http://www.w3.org/TR/1999/REC-xslt-19991116'>" + nl +
+"<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:saml='urn:oasis:names:tc:SAML:1.0:assertion' >" + nl +
+"<xsl:template match='/'>" + nl +
+"<html>" + nl +
+"<body>" + nl +
+"</body>" + nl +
+"</html>" + nl +
+"</xsl:template>" + nl +
+"</xsl:stylesheet>" + nl +
+ " </dsig:Transform>" + nl +
+ " </dsig:Transforms>" + nl +
+ " <sl:FinalDataMetaInfo>" + nl +
+ " <sl:MimeType>text/html</sl:MimeType>" + nl +
+ " </sl:FinalDataMetaInfo>" + nl +
+ " </sl:TransformsInfo>" + nl;
+ public static final String REQUEST_SHOULD_SL12 =
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + nl +
+"<sl:CreateXMLSignatureRequest xmlns:dsig=\"http://www.w3.org/2000/09/xmldsig#\" xmlns:sl=\"http://www.buergerkarte.at/namespaces/securitylayer/1.2#\">" + nl +
+" <sl:KeyboxIdentifier>SecureSignatureKeypair</sl:KeyboxIdentifier>" + nl +
+" <sl:DataObjectInfo Structure=\"detached\">" + nl +
+" <sl:DataObject Reference=\"\"/>" + nl +
+TRANSFORMS_INFO_SL12 +
+" </sl:DataObjectInfo>" + nl +
+" <sl:SignatureInfo>" + nl +
+" <sl:SignatureEnvironment>" + nl +
+" <sl:XMLContent>" + AuthenticationBlockAssertionBuilderTest.ASSERTION_SHOULD + "</sl:XMLContent>" + nl +
+" </sl:SignatureEnvironment>" + nl +
+" <sl:SignatureLocation Index=\"2\">/saml:Assertion</sl:SignatureLocation>" + nl +
+" </sl:SignatureInfo>" + nl +
+"</sl:CreateXMLSignatureRequest>";
+
+
+
+
+ public CreateXMLSignatureBuilderTest(String name) {
+ super(name);
+ }
+
+ public void testBuild() throws Exception {
+ // test build for Security Layer version 1.1 and 1.0
+ String request = new CreateXMLSignatureRequestBuilder().build(
+ AuthenticationBlockAssertionBuilderTest.ASSERTION_SHOULD, "SecureSignatureKeypair",
+ new String[] {TRANSFORMS_INFO},
+ false);
+ assertXmlEquals(REQUEST_SHOULD, request);
+ // test build for Security Layer version 1.2
+ String requestSL12 = new CreateXMLSignatureRequestBuilder().build(
+ AuthenticationBlockAssertionBuilderTest.ASSERTION_SHOULD, "SecureSignatureKeypair",
+ new String[] {TRANSFORMS_INFO},
+ true);
+ assertXmlEquals(REQUEST_SHOULD_SL12, requestSL12);
+ }
+}
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilderTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilderTest.java
new file mode 100644
index 000000000..1e172597c
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilderTest.java
@@ -0,0 +1,88 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.id.auth.builder;
+
+import java.text.MessageFormat;
+
+import junit.framework.TestCase;
+
+import at.gv.egovernment.moa.id.auth.builder.CertInfoVerifyXMLSignatureRequestBuilder;
+import at.gv.egovernment.moa.id.auth.builder.GetIdentityLinkFormBuilder;
+import at.gv.egovernment.moa.id.auth.builder.InfoboxReadRequestBuilder;
+
+/**
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class GetIdentityLinkFormBuilderTest extends TestCase {
+ private static String nl = "\n";
+ public static String FORM =
+ "<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">" + nl +
+ "<html>" + nl +
+ "<head>" + nl +
+ "<title>Auslesen der Personenbindung</title>" + nl +
+ "</head>" + nl +
+ "<body>" + nl +
+ "<form name=\"GetIdentityLinkForm\"" + nl +
+ " action=\"{0}\"" + nl +
+ " method=\"post\">" + nl +
+ " <input type=\"hidden\" " + nl +
+ " name=\"XMLRequest\"" + nl +
+ " value=\"{1}\"/>" + nl +
+ " <input type=\"hidden\" " + nl +
+ " name=\"DataURL\"" + nl +
+ " value=\"{2}\"/>" + nl +
+ " <input type=\"submit\" value=\"Auslesen der Personenbindung\"/>" + nl +
+ "</form>" + nl +
+ "<form name=\"CertificateInfoForm\"" + nl +
+ " action=\"{0}\"" + nl +
+ " method=\"post\">" + nl +
+ " <input type=\"hidden\" " + nl +
+ " name=\"XMLRequest\"" + nl +
+ " value=\"{3}\"/>" + nl +
+ " <input type=\"hidden\" " + nl +
+ " name=\"DataURL\"" + nl +
+ " value=\"{4}\"/>" + nl +
+ " <input type=\"submit\" value=\"Information zu Wurzelzertifikaten\"/>" + nl +
+ "</form>" + nl +
+ "</body>" + nl +
+ "</html>";
+ public static String BKU =
+ "http://localhost:3495/http-security-layer-request";
+
+ public void testBuild() throws Exception {
+ String xmlRequest = new InfoboxReadRequestBuilder().build(false, false, null);
+ String dataURL = "https://1.2.3.4/auth/VerifyIdentityLink?MOASessionID=1234567";
+ String infoRequest = new CertInfoVerifyXMLSignatureRequestBuilder().build(false);
+ String infoDataURL = "https://1.2.3.4/auth/StartAuthentication?Target=gb&OA=https://oa.gv.at/";
+ String form = new GetIdentityLinkFormBuilder().build(null, null, xmlRequest, dataURL, infoRequest, infoDataURL, null);
+ String formShould = MessageFormat.format(
+ FORM, new Object[] { BKU, xmlRequest, dataURL, infoRequest, infoDataURL });
+ assertEquals(formShould, form);
+ }
+ public void testBuildCustomBKU() throws Exception {
+ String xmlRequest = new InfoboxReadRequestBuilder().build(false, false, null);
+ String dataURL = "https://1.2.3.4/auth/AuthServlet/StartAuthentication?MOASessionID=1234567";
+ String infoRequest = new CertInfoVerifyXMLSignatureRequestBuilder().build(false);
+ String infoDataURL = "https://1.2.3.4/auth/StartAuthentication?Target=gb&OA=https://oa.gv.at/";
+ String bkuURL = "http://bku.at/";
+ String form = new GetIdentityLinkFormBuilder().build(null, bkuURL, xmlRequest, dataURL, infoRequest, infoDataURL, null);
+ String formShould = MessageFormat.format(
+ FORM, new Object[] { bkuURL, xmlRequest, dataURL, infoRequest, infoDataURL });
+ assertEquals(formShould, form);
+ }
+
+}
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/InfoboxReadRequestBuilderTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/InfoboxReadRequestBuilderTest.java
new file mode 100644
index 000000000..d10387613
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/InfoboxReadRequestBuilderTest.java
@@ -0,0 +1,44 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.id.auth.builder;
+
+import org.w3c.dom.Document;
+import test.at.gv.egovernment.moa.id.UnitTestCase;
+
+import at.gv.egovernment.moa.id.auth.builder.InfoboxReadRequestBuilder;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+
+/**
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class InfoboxReadRequestBuilderTest extends UnitTestCase implements Constants {
+
+ public InfoboxReadRequestBuilderTest(String name) {
+ super(name);
+ }
+
+ public void testBuild() throws Exception {
+ InfoboxReadRequestBuilder builder = new InfoboxReadRequestBuilder();
+ String xmlBuilt = builder.build(false, false, null);
+ Document docBuilt = DOMUtils.parseDocument(xmlBuilt, false, ALL_SCHEMA_LOCATIONS, null);
+ String xmlBuiltSerialized = DOMUtils.serializeNode(docBuilt);
+ // xmlShould was generated by Hot:Sign Tester
+ String xmlShould = "<?xml version='1.0' encoding='utf-8'?><sl10:InfoboxReadRequest xmlns:sl10='http://www.buergerkarte.at/namespaces/securitylayer/20020225#'><sl10:InfoboxIdentifier>IdentityLink</sl10:InfoboxIdentifier><sl10:BinaryFileParameters ContentIsXMLEntity='true'/></sl10:InfoboxReadRequest>";
+ assertXmlEquals(xmlShould, xmlBuiltSerialized);
+ }
+}
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/PersonDataBuilderTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/PersonDataBuilderTest.java
new file mode 100644
index 000000000..5d16dc5e8
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/PersonDataBuilderTest.java
@@ -0,0 +1,66 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.id.auth.builder;
+
+import at.gv.egovernment.moa.id.auth.builder.PersonDataBuilder;
+import at.gv.egovernment.moa.id.auth.data.IdentityLink;
+import at.gv.egovernment.moa.id.auth.parser.InfoboxReadResponseParser;
+import at.gv.egovernment.moa.util.Constants;
+
+import test.at.gv.egovernment.moa.id.UnitTestCase;
+
+/**
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class PersonDataBuilderTest extends UnitTestCase implements Constants {
+
+ /**
+ * Constructor for PersonDataBuilderTest.
+ */
+ public PersonDataBuilderTest(String arg) {
+ super(arg);
+ }
+ public void testBuild() throws Exception {
+ String xmlInfoboxReadResponse = readFile("data/test/xmldata/testperson1/InfoboxReadResponse.xml");
+ IdentityLink il = new InfoboxReadResponseParser(xmlInfoboxReadResponse).parseIdentityLink();
+ String xmlPersonData = new PersonDataBuilder().build(il, true);
+ String xmlPersonDataShould = "<pr:Person xsi:type=\"pr:PhysicalPersonType\"><pr:Identification><pr:Value>123456789012</pr:Value><pr:Type>http://reference.e-government.gv.at/names/persondata/20020228#zmr-zahl</pr:Type></pr:Identification><pr:Name><pr:GivenName>Hermann</pr:GivenName><pr:FamilyName primary=\"undefined\">Muster</pr:FamilyName></pr:Name><pr:DateOfBirth>1968-10-22</pr:DateOfBirth></pr:Person>";
+ assertPersonDataEquals(xmlPersonDataShould, xmlPersonData);
+ }
+ public void testBuildNoZMRZahl() throws Exception {
+ String xmlInfoboxReadResponse = readFile("data/test/xmldata/testperson1/InfoboxReadResponse.xml");
+ IdentityLink il = new InfoboxReadResponseParser(xmlInfoboxReadResponse).parseIdentityLink();
+ String xmlPersonData = new PersonDataBuilder().build(il, false);
+ String xmlPersonDataShould = XML_DECL + "<pr:Person xsi:type=\"pr:PhysicalPersonType\"><pr:Name><pr:GivenName>Hermann</pr:GivenName><pr:FamilyName primary=\"undefined\">Muster</pr:FamilyName></pr:Name><pr:DateOfBirth>1968-10-22</pr:DateOfBirth></pr:Person>";
+ assertPersonDataEquals(xmlPersonDataShould, xmlPersonData);
+ }
+ private void assertPersonDataEquals(String s1, String s2) throws Exception {
+ String ss1 = insertPrNS(s1);
+ String ss2 = insertPrNS(s2);
+ assertXmlEquals(ss1, ss2);
+ }
+ private String insertPrNS(String xmlPersonData) {
+ int startNS = xmlPersonData.indexOf("Person") + "Person".length() + 1;
+ String s =
+ xmlPersonData.substring(0, startNS) +
+ "xmlns:pr=\"" + PD_NS_URI + "\" " +
+ "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" " +
+ xmlPersonData.substring(startNS);
+ return s;
+ }
+
+}
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/SAMLArtifactBuilderTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/SAMLArtifactBuilderTest.java
new file mode 100644
index 000000000..94fb97c9f
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/SAMLArtifactBuilderTest.java
@@ -0,0 +1,67 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.id.auth.builder;
+
+import at.gv.egovernment.moa.id.BuildException;
+import at.gv.egovernment.moa.id.auth.builder.SAMLArtifactBuilder;
+import at.gv.egovernment.moa.util.Base64Utils;
+
+import test.at.gv.egovernment.moa.id.UnitTestCase;
+
+/**
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class SAMLArtifactBuilderTest extends UnitTestCase {
+
+ private static final String AUTH_URL = "https://moa.gv.at/auth/";
+ private static final String SESSION_ID_1 = "123456";
+ private static final String SESSION_ID_2 = "123457";
+ private static final String SESSION_ID_3 = "1234567";
+
+ private SAMLArtifactBuilder builder;
+ private byte[] artifact1;
+ private byte[] artifact2;
+ private byte[] artifact3;
+
+ public SAMLArtifactBuilderTest(String name) {
+ super(name);
+ }
+ protected void setUp() throws Exception {
+ builder = new SAMLArtifactBuilder();
+ artifact1 = Base64Utils.decode(builder.build(AUTH_URL, SESSION_ID_1), false);
+ artifact2 = Base64Utils.decode(builder.build(AUTH_URL, SESSION_ID_2), false);
+ artifact3 = Base64Utils.decode(builder.build(AUTH_URL, SESSION_ID_3), false);
+ }
+
+ public void testBuildArtifactLength() throws BuildException {
+ assertEquals(42, artifact1.length);
+ assertEquals(42, artifact2.length);
+ assertEquals(42, artifact3.length);
+ }
+ public void testBuildSameArtifact() throws Exception {
+ byte[] artifact1Clone = Base64Utils.decode(builder.build(AUTH_URL, SESSION_ID_1), false);
+ assertEquals(new String(artifact1), new String(artifact1Clone));
+ }
+ public void testBuildDifferentArtifacts() throws BuildException {
+ String msg = "SAML Artifacts should be different";
+ assertFalse(msg, new String(artifact1).equals(new String(artifact2)));
+ assertFalse(msg, new String(artifact1).equals(new String(artifact3)));
+ assertFalse(msg, new String(artifact3).equals(new String(artifact2)));
+ }
+
+
+}
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/VerifyXMLSignatureRequestBuilderTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/VerifyXMLSignatureRequestBuilderTest.java
new file mode 100644
index 000000000..b7ce1769f
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/builder/VerifyXMLSignatureRequestBuilderTest.java
@@ -0,0 +1,108 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.id.auth.builder;
+
+import java.io.FileInputStream;
+import java.io.RandomAccessFile;
+
+import org.w3c.dom.Element;
+import test.at.gv.egovernment.moa.id.auth.invoke.MOASPSSTestCase;
+
+import at.gv.egovernment.moa.id.auth.builder.VerifyXMLSignatureRequestBuilder;
+import at.gv.egovernment.moa.id.auth.data.CreateXMLSignatureResponse;
+import at.gv.egovernment.moa.id.auth.data.IdentityLink;
+import at.gv.egovernment.moa.id.auth.parser.CreateXMLSignatureResponseParser;
+import at.gv.egovernment.moa.id.auth.parser.InfoboxReadResponseParser;
+import at.gv.egovernment.moa.id.auth.invoke.SignatureVerificationInvoker;
+import at.gv.egovernment.moa.id.config.ConfigurationProvider;
+import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
+
+
+
+/**
+ * Test case for the signature verification web service.
+ *
+ * This test requires a running SignatureVerification web service.
+ *
+ * @author Stefan Knirsch
+ * @version $Id$
+ */
+public class VerifyXMLSignatureRequestBuilderTest extends MOASPSSTestCase {
+
+
+ private SignatureVerificationInvoker caller;
+
+ public VerifyXMLSignatureRequestBuilderTest(String name) {
+ super(name);
+ }
+
+ public void setUp() {
+ System.setProperty(
+ ConfigurationProvider.CONFIG_PROPERTY_NAME,
+ "data/test/conf/ConfigurationTest.xml");
+ caller = new SignatureVerificationInvoker();
+ }
+
+ public void testVerifyXMLSignatureRequestBuilderIdentityLink() throws Exception {
+
+ RandomAccessFile infoBox = new RandomAccessFile(
+ "data/test/xmldata/testperson1/InfoboxReadResponse.xml","r");
+ byte[] b = new byte[(int) infoBox.length()];
+ infoBox.read(b);
+ infoBox.close();
+ String xmlInfoboxReadResponse = new String(b, "UTF-8");
+
+
+ RandomAccessFile vr = new RandomAccessFile(
+ "data/test/xmldata/standard/VerifyXMLSignatureRequestIdentityLink.xml","r");
+ b = new byte[(int) vr.length()];
+ vr.read(b);
+ vr.close();
+ String xmlResponse = new String(b, "UTF-8");
+
+ InfoboxReadResponseParser irrp = new InfoboxReadResponseParser(xmlInfoboxReadResponse);
+ IdentityLink idl = irrp.parseIdentityLink();
+ VerifyXMLSignatureRequestBuilder vsrb = new VerifyXMLSignatureRequestBuilder();
+ AuthConfigurationProvider authConf = AuthConfigurationProvider.getInstance();
+
+ Element requestBuild = vsrb.build(idl, authConf.getMoaSpIdentityLinkTrustProfileID());
+
+ assertXmlEquals(requestBuild, xmlResponse);
+
+ }
+
+ public void testVerifyXMLSignature2() throws Exception {
+
+ RandomAccessFile s = new RandomAccessFile("data/test/xmldata/standard/CreateXMLSignatureResponse.xml","r");
+ byte[] b = new byte[(int) s.length()];
+ s.read(b);
+ s.close();
+ String xmlCreateXMLSignatureResponse = new String(b, "UTF-8");
+
+ CreateXMLSignatureResponseParser cXMLsrp = new CreateXMLSignatureResponseParser(xmlCreateXMLSignatureResponse);
+ CreateXMLSignatureResponse csr = cXMLsrp.parseResponse();
+
+ VerifyXMLSignatureRequestBuilder vsrb = new VerifyXMLSignatureRequestBuilder();
+
+ AuthConfigurationProvider authConf = AuthConfigurationProvider.getInstance();
+
+ Element request = vsrb.build(csr, authConf.getMoaSpAuthBlockVerifyTransformsInfoIDs(), authConf.getMoaSpIdentityLinkTrustProfileID());
+
+ // check the result
+ assertXmlEquals(request, new FileInputStream("data/test/xmldata/standard/VerifyXMLSignatureRequestCreateXML.xml"));
+
+ }
+ }
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/invoke/MOASPSSTestCase.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/invoke/MOASPSSTestCase.java
new file mode 100644
index 000000000..4cd56d61a
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/invoke/MOASPSSTestCase.java
@@ -0,0 +1,53 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.id.auth.invoke;
+
+import java.security.Security;
+
+import test.at.gv.egovernment.moa.id.UnitTestCase;
+
+/**
+ * Base class for end-to-end tests of MOA web-services.
+ *
+ * Initializes the test system and provides some properties.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class MOASPSSTestCase extends UnitTestCase {
+
+ public MOASPSSTestCase(String name) {
+ super(name);
+ }
+
+
+ protected void setupSSL() {
+ System.setProperty("javax.net.debug", "all");
+ Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
+ System.setProperty(
+ "java.protocol.handler.pkgs",
+ "com.sun.net.ssl.internal.www.protocol");
+ System.setProperty(
+ "javax.net.ssl.keyStore",
+ "data/test/security/client.keystore");
+ System.setProperty("javax.net.ssl.keyStorePassword", "changeit");
+ System.setProperty(
+ "javax.net.ssl.trustStore",
+ "data/test/security/client.keystore");
+ System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
+ }
+
+}
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationTest.java
new file mode 100644
index 000000000..0d655306f
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationTest.java
@@ -0,0 +1,181 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.id.auth.invoke;
+
+import java.io.RandomAccessFile;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.id.auth.builder.VerifyXMLSignatureRequestBuilder;
+import at.gv.egovernment.moa.id.auth.data.CreateXMLSignatureResponse;
+import at.gv.egovernment.moa.id.auth.data.IdentityLink;
+import at.gv.egovernment.moa.id.auth.data.VerifyXMLSignatureResponse;
+import at.gv.egovernment.moa.id.auth.parser.CreateXMLSignatureResponseParser;
+import at.gv.egovernment.moa.id.auth.parser.InfoboxReadResponseParser;
+import at.gv.egovernment.moa.id.auth.parser.VerifyXMLSignatureResponseParser;
+import at.gv.egovernment.moa.id.auth.invoke.SignatureVerificationInvoker;
+import at.gv.egovernment.moa.id.auth.validator.VerifyXMLSignatureResponseValidator;
+import at.gv.egovernment.moa.id.config.ConfigurationProvider;
+import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
+import at.gv.egovernment.moa.util.DOMUtils;
+
+
+
+/**
+ * Test case for the signature verification web service.
+ *
+ * This test requires a running SignatureVerification web service.
+ *
+ * @author Patrick Peck
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class SignatureVerificationTest extends MOASPSSTestCase {
+
+
+ private SignatureVerificationInvoker caller;
+
+ public SignatureVerificationTest(String name) {
+ super(name);
+ }
+
+ public void setUp() {
+System.setProperty(
+ ConfigurationProvider.CONFIG_PROPERTY_NAME,
+ "data/test/conf/ConfigurationTest.xml");
+ caller = new SignatureVerificationInvoker();
+ }
+
+/* public void testVerifyCMSSignature() throws Exception {
+ Element request =
+ parseXml("data/test/xml/VCSQ000.xml").getDocumentElement();
+ Element result;
+
+ // call the service
+ result = caller.verifyXMLSignature(request);
+
+ // check the result
+ assertEquals("VerifyCMSSignatureResponse", result.getTagName());
+ }*/
+
+ public void testVerifyXMLSignature1() throws Exception {
+
+ //Momentan zeigt die Konfiguration als Endpunkt aus localhost:8081 zum
+ //Protokollieren per TCPMon... der ECHT Endpunkt ist 10.16.46.108:8080
+ RandomAccessFile s =
+ new RandomAccessFile(
+ "data/test/xmldata/testperson1/InfoboxReadResponse.xml","r");
+ byte[] b = new byte[(int) s.length()];
+ s.read(b);
+ String xmlInfoboxReadResponse =new String(b,"UTF8");
+
+ InfoboxReadResponseParser irrp = new InfoboxReadResponseParser(xmlInfoboxReadResponse);
+ IdentityLink idl = irrp.parseIdentityLink();
+ VerifyXMLSignatureRequestBuilder vsrb = new VerifyXMLSignatureRequestBuilder();
+
+ AuthConfigurationProvider authConf = AuthConfigurationProvider.getInstance();
+
+ Element request = vsrb.build(idl, authConf.getMoaSpIdentityLinkTrustProfileID());
+ s =new RandomAccessFile("D://PatricksVerifyXMLSignatureRequestWithInfoboxReadResponse.xml","rw");
+ s.write(DOMUtils.serializeNode(request).getBytes("UTF-8"));
+ s.close();
+// Element request = DOMUtils.parseDocument(vsrb.build(xmlInfoboxReadResponse,"TrustProfile1"),false,null,null).getDocumentElement();
+// Element request = DOMUtils.parseDocument(xmlInfoboxReadResponse,false,null,null).getDocumentElement();
+// call the service
+ Element response = caller.verifyXMLSignature(request);
+ VerifyXMLSignatureResponseParser vParser = new VerifyXMLSignatureResponseParser(response);
+ VerifyXMLSignatureResponse vData = vParser.parseData();
+ VerifyXMLSignatureResponseValidator vValidate = VerifyXMLSignatureResponseValidator.getInstance();
+ vValidate.validate(vData, authConf.getIdentityLinkX509SubjectNames(), VerifyXMLSignatureResponseValidator.CHECK_IDENTITY_LINK, true);
+ vValidate.validateCertificate(vData,idl);
+
+ // check the result
+ assertXmlEquals(response, request);
+
+ }
+
+ public void testVerifyXMLSignature2() throws Exception {
+ // Prüft den 2. Aufruf mit dem CreateXMLSIgnatureResponse als Parameter
+ //Momentan zeigt die Konfiguration als Endpunkt aus localhost:8081 zum
+ //Protokollieren per TCPMon... der ECHT Endpunkt ist 10.16.46.108:8080
+ RandomAccessFile s =
+ new RandomAccessFile(
+ "data/test/xmldata/standard/CreateXMLSignatureResponse.xml","r");
+ byte[] b = new byte[(int) s.length()];
+ s.read(b);
+ String xmlCreateXMLSignatureResponse = new String(b, "UTF8");
+
+ CreateXMLSignatureResponseParser cXMLsrp = new CreateXMLSignatureResponseParser(xmlCreateXMLSignatureResponse);
+// CreateXMLSignatureResponseParser cXMLsrp = new CreateXMLSignatureResponseParser(xmlCreateXMLSignatureResponse);
+ CreateXMLSignatureResponse csr = cXMLsrp.parseResponse();
+
+ VerifyXMLSignatureRequestBuilder vsrb = new VerifyXMLSignatureRequestBuilder();
+
+ AuthConfigurationProvider authConf = AuthConfigurationProvider.getInstance();
+
+ Element request = vsrb.build(csr, authConf.getMoaSpAuthBlockVerifyTransformsInfoIDs(), authConf.getMoaSpIdentityLinkTrustProfileID());
+ // Element request = DOMUtils.parseDocument(vsrb.build(xmlInfoboxReadResponse,"TrustProfile1"),false,null,null).getDocumentElement();
+// Element request = DOMUtils.parseDocument(xmlInfoboxReadResponse,false,null,null).getDocumentElement();
+ Element result;
+/*s =new RandomAccessFile("D://PatricksVerifyXMLSignatureRequestWithAuthBlock.xml","rw");
+ s.write(DOMUtils.serializeNode(request).getBytes("UTF-8"));
+ s.close();*/
+ // call the service
+ result = caller.verifyXMLSignature(request);
+ // check the result
+ assertEquals("VerifyXMLSignatureResponse", result.getTagName());
+
+ }
+
+
+ public void testParseCreateXMLSignatureResponse() throws Exception {
+
+ //Später soll die Datei direkt vom Server geholt werden...
+
+ RandomAccessFile s =
+ new RandomAccessFile(
+ "data/test/xmldata/standard/CreateXMLSignatureResponse.xml",
+
+ "r");
+ byte[] b = new byte[(int) s.length()];
+ s.read(b);
+ String xmlCreateXMLSignatureResponse = new String(b, "UTF-8");
+
+ CreateXMLSignatureResponseParser cXMLsrp = new CreateXMLSignatureResponseParser(xmlCreateXMLSignatureResponse);
+ CreateXMLSignatureResponse csr = cXMLsrp.parseResponse();
+
+ }
+
+ public void testParseVerifyXMLSignatureResponse() throws Exception {
+
+ //Später soll die Datei direkt vom Server geholt werden...
+
+ RandomAccessFile s =
+ new RandomAccessFile(
+ "data/test/xmldata/standard/VerifyXMLSignaterResponse.xml",
+
+ "r");
+ byte[] b = new byte[(int) s.length()];
+ s.read(b);
+ String xmlVerifyXMLSignatureResponse = new String(b, "UTF-8");
+
+ VerifyXMLSignatureResponseParser vXMLsrp = new VerifyXMLSignatureResponseParser(xmlVerifyXMLSignatureResponse);
+ VerifyXMLSignatureResponse vsr = vXMLsrp.parseData();
+
+ }
+
+
+ }
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/AllTests.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/AllTests.java
new file mode 100644
index 000000000..b272e737d
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/AllTests.java
@@ -0,0 +1,44 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.id.auth.parser;
+
+import junit.awtui.TestRunner;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class AllTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite();
+
+ suite.addTestSuite(IdentityLinkAssertionParserTest.class);
+ suite.addTestSuite(SAMLArtifactParserTest.class);
+
+ return suite;
+ }
+
+ public static void main(String[] args) {
+ try {
+ TestRunner.run(AllTests.class);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/IdentityLinkAssertionParserTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/IdentityLinkAssertionParserTest.java
new file mode 100644
index 000000000..05d3b6258
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/IdentityLinkAssertionParserTest.java
@@ -0,0 +1,152 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.id.auth.parser;
+
+import iaik.security.rsa.RSAPublicKey;
+
+import java.io.FileOutputStream;
+import java.io.RandomAccessFile;
+import java.security.PublicKey;
+
+import org.w3c.dom.Document;
+
+import test.at.gv.egovernment.moa.id.UnitTestCase;
+
+import at.gv.egovernment.moa.id.auth.builder.VerifyXMLSignatureRequestBuilder;
+import at.gv.egovernment.moa.id.auth.data.IdentityLink;
+import at.gv.egovernment.moa.id.util.ECDSAKeyValueConverter;
+import at.gv.egovernment.moa.id.auth.parser.IdentityLinkAssertionParser;
+import at.gv.egovernment.moa.id.auth.parser.InfoboxReadResponseParser;
+import at.gv.egovernment.moa.id.auth.validator.IdentityLinkValidator;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+
+/**
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class IdentityLinkAssertionParserTest extends UnitTestCase {
+
+ IdentityLinkAssertionParser ilap;
+
+ public IdentityLinkAssertionParserTest(String name) {
+ super(name);
+ }
+
+ public void setUp() {
+ try {
+ RandomAccessFile s =
+ new RandomAccessFile(
+ "data/test/xmldata/testperson1/InfoboxReadResponse.xml",
+ "r");
+ byte[] b = new byte[(int) s.length()];
+ s.read(b);
+ String xmlInfoboxReadResponse = new String(b, "UTF-8");
+
+ InfoboxReadResponseParser irrp = new InfoboxReadResponseParser(xmlInfoboxReadResponse);
+ ilap = new IdentityLinkAssertionParser(irrp.parseSAMLAssertion());
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void testParseIdentityLink() throws Exception {
+ IdentityLink idl = ilap.parseIdentityLink();
+ System.out.println(idl.getGivenName());
+ System.out.println(idl.getFamilyName());
+ System.out.println(idl.getDateOfBirth());
+ System.out.println(idl.getIdentificationValue());
+
+ VerifyXMLSignatureRequestBuilder vx = new VerifyXMLSignatureRequestBuilder();
+
+ // Element zurück bekommen: vx.build(idl.getSamlAssertion());
+
+ IdentityLinkValidator idVali = IdentityLinkValidator.getInstance();
+ idVali.validate(idl);
+
+ }
+
+// public void testParseIdentityLinkECC() throws Exception {
+// RandomAccessFile s =
+// new RandomAccessFile(
+// "data/test/xmldata/IL.ResponseToRequest.01.ECDSA.xml",
+// "r");
+// byte[] b = new byte[(int) s.length()];
+// s.read(b);
+// String xmlInfoboxReadResponse = new String(b);
+// InfoboxReadResponseParser irrp = new InfoboxReadResponseParser(xmlInfoboxReadResponse);
+// String SAML = irrp.parseSAMLAssertion();
+// ilap = new IdentityLinkAssertionParser(SAML);
+// IdentityLink idl = ilap.parseIdentityLink();
+// System.out.println(idl.getGivenName());
+// System.out.println(idl.getFamilyName());
+// System.out.println(idl.getDateOfBirth());
+// System.out.println(idl.getIdentificationValue());
+//
+// VerifyXMLSignatureRequestBuilder vx = new VerifyXMLSignatureRequestBuilder();
+//
+// // Element zurück bekommen: vx.build(idl.getSamlAssertion());
+//
+// IdentityLinkValidator idVali = IdentityLinkValidator.getInstance();
+// idVali.validate(idl);
+//
+// }
+
+ public void testRSAPublicKeys() throws Exception {
+ if (ilap.getPublicKeys()[0].getClass().getName().equals("iaik.security.rsa.RSAPublicKey"))
+ {
+
+ for (int i = 0; i < ilap.getPublicKeys().length; i++) {
+ RSAPublicKey result = (RSAPublicKey)ilap.getPublicKeys()[i];
+ System.out.println("RSA Public Key No" + i);
+ System.out.println("Modulus: " + result.getModulus());
+ System.out.println("Exponent: " + result.getPublicExponent());
+ }
+
+ }
+ }
+
+ public void testECDSAPublicKeys() throws Exception {
+
+ RandomAccessFile s =
+ new RandomAccessFile(
+ "data/test/xmldata/ECDSAKeyExample.xml",
+ "r");
+ byte[] b = new byte[(int) s.length()];
+ s.read(b);
+ String ecdsaKey = new String(b, "UTF-8");
+ Document e = DOMUtils.parseDocument(ecdsaKey,true,Constants.ALL_SCHEMA_LOCATIONS, null);
+ PublicKey p = ECDSAKeyValueConverter.element2ECDSAPublicKey(e.getDocumentElement());
+
+ }
+
+
+ public void testDsigCertificates() throws Exception {
+
+ String[] result = ilap.getCertificates();
+ for (int i = 0; i < result.length; i++) {
+
+ System.out.println("DSIG Certificate Length: " + result[i].length() + " No" + i + "\n" + result[i]);
+ FileOutputStream raf = new FileOutputStream("data/test/certs/cert" + i + ".cer");
+ raf.write(result[i].getBytes());
+ raf.flush();
+ raf.close();
+ }
+
+ }
+
+}
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/InfoboxReadResponseParserTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/InfoboxReadResponseParserTest.java
new file mode 100644
index 000000000..cfa01cf40
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/InfoboxReadResponseParserTest.java
@@ -0,0 +1,82 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.id.auth.parser;
+
+import java.io.RandomAccessFile;
+
+import test.at.gv.egovernment.moa.id.UnitTestCase;
+
+import at.gv.egovernment.moa.id.auth.data.IdentityLink;
+import at.gv.egovernment.moa.id.auth.parser.IdentityLinkAssertionParser;
+import at.gv.egovernment.moa.id.auth.parser.InfoboxReadResponseParser;
+
+/**
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class InfoboxReadResponseParserTest extends UnitTestCase {
+
+ IdentityLinkAssertionParser ilap;
+
+ public InfoboxReadResponseParserTest(String name) {
+ super(name);
+ }
+
+ public void setUp() {
+ }
+
+ public void testParseInfoboxReadResponse() throws Exception {
+ RandomAccessFile s =
+ new RandomAccessFile(
+ "data/test/xmldata/testperson1/InfoboxReadResponse.xml",
+ "r");
+ byte[] b = new byte[(int) s.length()];
+ s.read(b);
+ String xmlInfoboxReadResponse = new String(b, "UTF-8");
+
+ InfoboxReadResponseParser irrp = new InfoboxReadResponseParser(xmlInfoboxReadResponse);
+ ilap = new IdentityLinkAssertionParser(irrp.parseSAMLAssertion());
+
+ IdentityLink idl = ilap.parseIdentityLink();
+ System.out.println(idl.getGivenName());
+ System.out.println(idl.getFamilyName());
+ System.out.println(idl.getDateOfBirth());
+ System.out.println(idl.getIdentificationValue());
+
+ }
+
+ public void testParseInfoboxReadResponseError() throws Exception {
+ RandomAccessFile s =
+ new RandomAccessFile(
+ "data/test/xmldata/ErrorResponse.xml",
+ "r");
+ byte[] b = new byte[(int) s.length()];
+ s.read(b);
+ String xmlInfoboxReadResponse = new String(b, "UTF-8");
+
+ InfoboxReadResponseParser irrp = new InfoboxReadResponseParser(xmlInfoboxReadResponse);
+ ilap = new IdentityLinkAssertionParser(irrp.parseSAMLAssertion());
+
+ IdentityLink idl = ilap.parseIdentityLink();
+ System.out.println(idl.getGivenName());
+ System.out.println(idl.getFamilyName());
+ System.out.println(idl.getDateOfBirth());
+ System.out.println(idl.getIdentificationValue());
+
+ }
+
+
+}
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/SAMLArtifactParserTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/SAMLArtifactParserTest.java
new file mode 100644
index 000000000..1d662a332
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/parser/SAMLArtifactParserTest.java
@@ -0,0 +1,70 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.id.auth.parser;
+
+import at.gv.egovernment.moa.id.auth.builder.SAMLArtifactBuilder;
+import at.gv.egovernment.moa.id.auth.parser.SAMLArtifactParser;
+import at.gv.egovernment.moa.id.util.Random;
+import test.at.gv.egovernment.moa.id.UnitTestCase;
+
+/*
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class SAMLArtifactParserTest extends UnitTestCase {
+
+ private static String URL1 = "http://moa.gv.at/auth";
+ private static String URL2 = "https://moa.gv.at/auth";
+
+ public SAMLArtifactParserTest(String name) {
+ super(name);
+ }
+
+ public void testParseTypeCode() throws Exception {
+ String sessionID = Random.nextRandom();
+ String samlArtifact = new SAMLArtifactBuilder().build(URL1, sessionID);
+ byte[] typeCode = new SAMLArtifactParser(samlArtifact).parseTypeCode();
+ assertEquals(typeCode[0], 0);
+ assertEquals(typeCode[1], 1);
+ }
+ public void testParseAssertionHandleSameSessionID() throws Exception {
+ // SAML artifacts for different authURL's but same sessionID MUST give same assertion handle
+ String sessionID = Random.nextRandom();
+ String samlArtifact1 = new SAMLArtifactBuilder().build(URL1, sessionID);
+ String samlArtifact2 = new SAMLArtifactBuilder().build(URL2, sessionID);
+ String assertionHandle1 = new SAMLArtifactParser(samlArtifact1).parseAssertionHandle();
+ String assertionHandle2 = new SAMLArtifactParser(samlArtifact2).parseAssertionHandle();
+ assertEquals(assertionHandle1, assertionHandle2);
+ }
+ public void testParseAssertionHandleSameURL() throws Exception {
+ // SAML artifacts for same authURL but different sessionID's MUST give different assertion handles
+ String sessionID1 = Random.nextRandom();
+ String sessionID2 = Random.nextRandom();
+ String samlArtifact1 = new SAMLArtifactBuilder().build(URL1, sessionID1);
+ String samlArtifact2 = new SAMLArtifactBuilder().build(URL1, sessionID2);
+ String assertionHandle1 = new SAMLArtifactParser(samlArtifact1).parseAssertionHandle();
+ String assertionHandle2 = new SAMLArtifactParser(samlArtifact2).parseAssertionHandle();
+ assertFalse(assertionHandle1.equals(assertionHandle2));
+ }
+ public void testParseAssertionHandleSameSAMLArtifact() throws Exception {
+ // SAML artifact parsed twice MUST give same assertion handle each time
+ String sessionID = Random.nextRandom();
+ String samlArtifact = new SAMLArtifactBuilder().build(URL1, sessionID);
+ String assertionHandle1 = new SAMLArtifactParser(samlArtifact).parseAssertionHandle();
+ String assertionHandle2 = new SAMLArtifactParser(samlArtifact).parseAssertionHandle();
+ assertEquals(assertionHandle1, assertionHandle2);
+ }
+}
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/servlet/GetAuthenticationDataServiceTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/servlet/GetAuthenticationDataServiceTest.java
new file mode 100644
index 000000000..5d69286a6
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/auth/servlet/GetAuthenticationDataServiceTest.java
@@ -0,0 +1,106 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.id.auth.servlet;
+
+import org.w3c.dom.Element;
+
+import test.at.gv.egovernment.moa.id.UnitTestCase;
+
+import at.gv.egovernment.moa.id.auth.servlet.GetAuthenticationDataService;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+/**
+ * Test case instantiates GetAuthenticationDataService and calls the Request() method.
+ * It DOES NOT call the web service via Axis.
+ *
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class GetAuthenticationDataServiceTest extends UnitTestCase implements Constants {
+
+ private GetAuthenticationDataService service;
+
+ public GetAuthenticationDataServiceTest(String arg0) {
+ super(arg0);
+ }
+ protected void setUp() throws Exception {
+ service = new GetAuthenticationDataService();
+ }
+
+ public void testService2Requests() throws Exception {
+ String requestString =
+ "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" +
+ "<samlp:Request xmlns:samlp=\"urn:oasis:names:tc:SAML:1.0:protocol\" xmlns:saml=\"urn:oasis:names:tc:SAML:1.0:assertion\" RequestID=\"123456\" MajorVersion=\"1\" MinorVersion=\"0\" IssueInstant=\"2003-02-13T13:59:00\">" +
+ "<saml:AssertionIDReference>123</saml:AssertionIDReference>" +
+ "</samlp:Request>";
+ Element request = DOMUtils.parseDocument(requestString, false, ALL_SCHEMA_LOCATIONS, null).getDocumentElement();
+ Element response = service.Request(new Element[] {request, request})[0];
+ assertStatus(response, "samlp:Requester", "samlp:TooManyResponses");
+ }
+ public void testServiceNoSAMLArtifact() throws Exception {
+ String requestString =
+ "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" +
+ "<samlp:Request xmlns:samlp=\"urn:oasis:names:tc:SAML:1.0:protocol\" xmlns:saml=\"urn:oasis:names:tc:SAML:1.0:assertion\" RequestID=\"123456\" MajorVersion=\"1\" MinorVersion=\"0\" IssueInstant=\"2003-02-13T13:59:00\">" +
+ "<saml:AssertionIDReference>123</saml:AssertionIDReference>" +
+ "</samlp:Request>";
+ Element request = DOMUtils.parseDocument(requestString, false, ALL_SCHEMA_LOCATIONS, null).getDocumentElement();
+ Element response = service.Request(new Element[] {request})[0];
+ assertStatus(response, "samlp:Requester", null);
+ }
+ public void testService2SAMLArtifacts() throws Exception {
+ String requestString =
+ "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" +
+ "<samlp:Request xmlns:samlp=\"urn:oasis:names:tc:SAML:1.0:protocol\" xmlns:saml=\"urn:oasis:names:tc:SAML:1.0:assertion\" RequestID=\"123456\" MajorVersion=\"1\" MinorVersion=\"0\" IssueInstant=\"2003-02-13T13:59:00\">" +
+ "<samlp:AssertionArtifact>123</samlp:AssertionArtifact>" +
+ "<samlp:AssertionArtifact>456</samlp:AssertionArtifact>" +
+ "</samlp:Request>";
+ Element request = DOMUtils.parseDocument(requestString, false, ALL_SCHEMA_LOCATIONS, null).getDocumentElement();
+ Element response = service.Request(new Element[] {request})[0];
+ assertStatus(response, "samlp:Requester", "samlp:TooManyResponses");
+ }
+ public void testServiceWrongFormat() throws Exception {
+ String requestString =
+ "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" +
+ "<samlp:Request xmlns:samlp=\"urn:oasis:names:tc:SAML:1.0:protocol\" xmlns:saml=\"urn:oasis:names:tc:SAML:1.0:assertion\" RequestID=\"123456\" MajorVersion=\"1\" MinorVersion=\"0\" IssueInstant=\"2003-02-13T13:59:00\">" +
+ "</samlp:Request>";
+ Element request = DOMUtils.parseDocument(requestString, false, ALL_SCHEMA_LOCATIONS, null).getDocumentElement();
+ Element response = service.Request(new Element[] {request})[0];
+ assertStatus(response, "samlp:Requester", null);
+ }
+ public void testServiceWrongSAMLArtifact() throws Exception {
+ String requestString =
+ "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" +
+ "<samlp:Request xmlns:samlp=\"urn:oasis:names:tc:SAML:1.0:protocol\" xmlns:saml=\"urn:oasis:names:tc:SAML:1.0:assertion\" RequestID=\"123456\" MajorVersion=\"1\" MinorVersion=\"0\" IssueInstant=\"2003-02-13T13:59:00\">" +
+ "<samlp:AssertionArtifact>WRONGARTIFACT</samlp:AssertionArtifact>" +
+ "</samlp:Request>";
+ Element request = DOMUtils.parseDocument(requestString, false, ALL_SCHEMA_LOCATIONS, null).getDocumentElement();
+ Element response = service.Request(new Element[] {request})[0];
+ assertStatus(response, "samlp:Requester", "samlp:ResourceNotRecognized");
+ }
+ private void assertStatus(Element response, String statusCodeShould, String subStatusCodeShould) throws Exception {
+ Element statusCodeNode = (Element)XPathUtils.selectSingleNode(response, "//samlp:StatusCode");
+ String statusCode = statusCodeNode.getAttribute("Value");
+ Element subStatusCodeNode = (Element)XPathUtils.selectSingleNode(statusCodeNode, "//samlp:StatusCode/samlp:StatusCode");
+ String subStatusCode = subStatusCodeNode == null ? null : subStatusCodeNode.getAttribute("Value");
+ System.out.println(statusCode + subStatusCode);
+ assertEquals(statusCodeShould, statusCode);
+ assertEquals(subStatusCodeShould, subStatusCode);
+ }
+
+
+}
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/config/auth/MOAIDAuthConfigurationProviderTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/config/auth/MOAIDAuthConfigurationProviderTest.java
new file mode 100644
index 000000000..7bf042625
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/config/auth/MOAIDAuthConfigurationProviderTest.java
@@ -0,0 +1,127 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.id.config.auth;
+
+import java.util.Map;
+
+import test.at.gv.egovernment.moa.id.UnitTestCase;
+
+import at.gv.egovernment.moa.id.config.ConnectionParameter;
+import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
+import at.gv.egovernment.moa.id.config.auth.OAAuthParameter;
+
+/**
+ * @author Stefan Knirsch
+ * @version $Id$
+ */
+public class MOAIDAuthConfigurationProviderTest extends UnitTestCase {
+ private AuthConfigurationProvider provider;
+
+ /**
+ * Constructor for MOAAuthConfigTest.
+ * @param name
+ */
+ public MOAIDAuthConfigurationProviderTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+
+ provider =
+ new AuthConfigurationProvider(TESTDATA_ROOT + "conf/ConfigurationTest.xml");
+
+ }
+ public void testGetTransformsInfoFileNames() {
+ String[] transformsInfoFileNames;
+ transformsInfoFileNames = provider.getTransformsInfoFileNames();
+// for (int i = 0; i < transformsInfoFileNames.length; i++) {
+// System.out.println(
+// "getTransformsInfoFileNames: " + transformsInfoFileNames[i]);
+ assertEquals(transformsInfoFileNames[0],"http://StringsecLayerTranformsInfo1");
+ assertEquals(transformsInfoFileNames[1],"http://StringsecLayerTranformsInfo2");
+// }
+
+ }
+
+ public void testGetMOASPConnectionParameters() {
+ ConnectionParameter cp;
+ cp = provider.getMoaSpConnectionParameter();
+ assertEquals(cp.getUrl(),"MOA-SP-URL");
+ assertEquals(cp.getAcceptedServerCertificates(),"http://AcceptedServerCertificates");
+ assertEquals(cp.getClientKeyStorePassword(),"Keystore Pass");
+ assertEquals(cp.getClientKeyStore(),"URLtoClientKeystoreAUTH");
+/* System.out.println();
+ System.out.println("getMoaSpConnectionParameter :" + cp.getUrl());
+ System.out.println(
+ "getMoaSpConnectionParameter :" + cp.getAcceptedServerCertificates());
+ System.out.println(
+ "getMoaSpConnectionParameter :" + cp.getClientKeyStorePassword());
+ System.out.println(
+ "getMoaSpConnectionParameter :" + cp.getClientKeyStore());*/
+ }
+ public void testGetMoaSpIdentityLinkTrustProfileID() {
+
+ assertEquals(provider.getMoaSpIdentityLinkTrustProfileID(),"StringVerifyIdentiyLinkTrustID");
+
+ }
+ public void testGetMoaSpAuthBlockTrustProfileID() {
+ assertEquals(provider.getMoaSpAuthBlockTrustProfileID(),"StringVerifyAuthBlockTransformID");
+ }
+
+ public void testGetMoaSpAuthBlockVerifyTransformsInfoIDs() {
+ String[] result = provider.getMoaSpAuthBlockVerifyTransformsInfoIDs();
+ assertEquals(result[0],"StringVerifyTransformsInfoID1");
+ assertEquals(result[1],"StringVerifyTransformsInfoID2");
+
+ }
+
+ public void testGetOnlineApplicationAuthParameter() {
+ OAAuthParameter[] result = provider.getOnlineApplicationParameters();
+
+ assertEquals(result[0].getPublicURLPrefix(),"StringOALoginURL");
+ assertEquals(result[0].getProvideStammzahl(),false);
+ assertEquals(result[0].getProvideAuthBlock(),false);
+ assertEquals(result[0].getProvideIdentityLink(),false);
+
+ assertEquals(result[1].getPublicURLPrefix(),"StringOALoginURL2");
+ assertEquals(result[1].getProvideStammzahl(),true);
+ assertEquals(result[1].getProvideAuthBlock(),true);
+ assertEquals(result[1].getProvideIdentityLink(),true);
+
+
+/* for (int i = 0; i < result.length; i++) {
+ System.out.println();
+ System.out.println("getOnlineApplicationParameters Url: " + result[i].getUrl());
+ System.out.println("getOnlineApplicationParameters ProvideStammzahl: " + result[i].getProvideStammzahl());
+ System.out.println("getOnlineApplicationParameters ProvideAuthBlock: " + result[i].getProvideAuthBlock());
+ System.out.println("getOnlineApplicationParameters ProvideIdentityLink: " + result[i].getProvideIdentityLink());
+ }*/
+ }
+
+ public void testGetGenericConfiguration() {
+ Map result = provider.getGenericConfiguration();
+ assertEquals(result.containsKey("Generic Name 1"),true);
+ assertEquals(result.containsKey("Generic Name 2"),true);
+ assertEquals(result.get("Generic Name 1"),"Value1");
+ assertEquals(result.get("Generic Name 2"),"Value2");
+ /* for (Iterator iter = result.keySet().iterator(); iter.hasNext();) {
+ String element = (String) iter.next();
+ System.out.println("getGenericConfiguration Key:" + element);
+ System.out.println("getGenericConfiguration Value:" + result.get(element));
+ }*/
+ }
+
+}
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/config/proxy/MOAIDProxyConfigurationProviderTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/config/proxy/MOAIDProxyConfigurationProviderTest.java
new file mode 100644
index 000000000..873dcca77
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/config/proxy/MOAIDProxyConfigurationProviderTest.java
@@ -0,0 +1,142 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.id.config.proxy;
+
+import java.util.Map;
+
+import at.gv.egovernment.moa.id.config.ConnectionParameter;
+import at.gv.egovernment.moa.id.config.proxy.OAConfiguration;
+import at.gv.egovernment.moa.id.config.proxy.ProxyConfigurationProvider;
+import at.gv.egovernment.moa.id.config.proxy.OAProxyParameter;
+
+import test.at.gv.egovernment.moa.id.UnitTestCase;
+
+
+
+/**
+ * @author Stefan Knirsch
+ * @version $Id$
+ */
+public class MOAIDProxyConfigurationProviderTest extends UnitTestCase {
+ private ProxyConfigurationProvider provider;
+
+ /**
+ * Constructor for MOAProxyConfigTest.
+ * @param name
+ */
+ public MOAIDProxyConfigurationProviderTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+
+ provider =
+// new ProxyConfigurationProvider(TESTDATA_ROOT + "conf/ConfigurationTest.xml");
+ new ProxyConfigurationProvider("data/deploy/conf/moa-id/ConfigurationTest.xml");
+ }
+ public void testGetAuthComponentConnectionParameter()
+ {
+ ConnectionParameter cp;
+ cp = provider.getAuthComponentConnectionParameter();
+ assertEquals(cp.getUrl(),"AuthComponentURL");
+ assertEquals( cp.getAcceptedServerCertificates(),"http://www.altova.com");
+ assertEquals(cp.getClientKeyStorePassword(),"String");
+ assertEquals(cp.getClientKeyStore(),"http://www.altova.com");
+ /* System.out.println();
+ System.out.println("getProxyComponentConnectionParameter :" + cp.getUrl());
+ System.out.println(
+ "getProxyComponentConnectionParameter :" + cp.getAcceptedServerCertificates());
+ System.out.println(
+ "getProxyComponentConnectionParameter :" + cp.getClientKeyStorePassword());
+ System.out.println(
+ "getProxyComponentConnectionParameter :" + cp.getClientKeyStore());*/
+}
+
+ public void testGetOAProxyParameter() {
+ OAProxyParameter[] result = provider.getOnlineApplicationParameters();
+
+ assertEquals("http://localhost:9080/", result[0].getPublicURLPrefix());
+ assertEquals("file:data/test/conf/OAConfParamAuth.xml", result[0].getConfigFileURL());
+ assertEquals(10, result[0].getSessionTimeOut());
+ assertEquals("StringloginParameterResolverImpl1", result[0].getLoginParameterResolverImpl());
+ assertEquals("StringconnectionBuilderImpl1", result[0].getConnectionBuilderImpl());
+
+ assertEquals("ProxyComponentURL", result[0].getConnectionParameter().getUrl());
+ assertEquals("url:AcceptedServerCertificates", result[0].getConnectionParameter().getAcceptedServerCertificates());
+ assertEquals("URL:toClientKeystoreOA", result[0].getConnectionParameter().getClientKeyStore());
+ assertEquals("ClientKeystoreOAPAss", result[0].getConnectionParameter().getClientKeyStorePassword());
+
+ assertEquals("StringOALoginURL2", result[1].getPublicURLPrefix());
+ assertEquals("file:data/test/conf/OAConfHeaderAuth.xml", result[1].getConfigFileURL());
+ assertEquals(20, result[1].getSessionTimeOut());
+ assertEquals("StringloginParameterResolverImpl2",result[1].getLoginParameterResolverImpl());
+ assertEquals("StringconnectionBuilderImpl2", result[1].getConnectionBuilderImpl());
+
+ assertEquals("ProxyComponentURL2", result[1].getConnectionParameter().getUrl());
+ assertEquals("url:AcceptedServerCertificates2", result[1].getConnectionParameter().getAcceptedServerCertificates());
+ assertEquals("URL:toClientKeystoreOA2", result[1].getConnectionParameter().getClientKeyStore());
+ assertEquals("ClientKeystoreOAPAss2", result[1].getConnectionParameter().getClientKeyStorePassword());
+
+ assertEquals("StringOALoginURL3", result[2].getPublicURLPrefix());
+ assertEquals("file:data/test/conf/OAConfBasicAuth.xml", result[2].getConfigFileURL());
+ assertEquals(20, result[2].getSessionTimeOut());
+ assertEquals("StringloginParameterResolverImpl3",result[2].getLoginParameterResolverImpl());
+ assertEquals("StringconnectionBuilderImpl3", result[2].getConnectionBuilderImpl());
+
+ assertEquals("ProxyComponentURL3", result[2].getConnectionParameter().getUrl());
+ assertEquals("url:AcceptedServerCertificates3", result[2].getConnectionParameter().getAcceptedServerCertificates());
+ assertEquals("URL:toClientKeystoreOA3", result[2].getConnectionParameter().getClientKeyStore());
+ assertEquals("ClientKeystoreOAPAss3", result[2].getConnectionParameter().getClientKeyStorePassword());
+ }
+
+ public void testGetGenericConfiguration() {
+ Map result = provider.getGenericConfiguration();
+ assertEquals(true, result.containsKey("authenticationSessionTimeOut"));
+ assertEquals(true, result.containsKey("authenticationDataTimeOut"));
+ assertEquals("600", result.get("authenticationSessionTimeOut"));
+ assertEquals("120", result.get("authenticationDataTimeOut"));
+ }
+
+ public void testOAConfigurationProvider() throws Exception
+ {
+ OAProxyParameter[] result = provider.getOnlineApplicationParameters();
+ // für jeden Parameter müsste theoretisch bereits ein Provider instanziiert worden sein,
+ // aus diesem Grund braucht man NICHT mehr die File-URL anzugeben, PublicURLPrefix reicht
+
+ // sollte ParamAuth sein
+ OAConfiguration oac1 = result[0].getOaConfiguration();
+ assertEquals(OAConfiguration.PARAM_AUTH, oac1.getAuthType());
+ assertEquals("MOADateOfBirth", oac1.getParamAuthMapping().get("Param1"));
+ assertEquals("MOABPK", oac1.getParamAuthMapping().get("Param2"));
+ // sollte HeaderAuth sein
+ OAConfiguration oac2 = result[1].getOaConfiguration();
+ assertEquals(OAConfiguration.HEADER_AUTH, oac2.getAuthType());
+ assertEquals("MOAPublicAuthority", oac2.getHeaderAuthMapping().get("Param1"));
+ assertEquals("MOABKZ", oac2.getHeaderAuthMapping().get("Param2"));
+ assertEquals("MOAQualifiedCertificate", oac2.getHeaderAuthMapping().get("Param3"));
+ assertEquals("MOAStammzahl", oac2.getHeaderAuthMapping().get("Param4"));
+ assertEquals("MOAIPAddress", oac2.getHeaderAuthMapping().get("Param5"));
+
+ // sollte BasicAuth sein
+ OAConfiguration oac3 = result[2].getOaConfiguration();
+ assertEquals(OAConfiguration.BASIC_AUTH, oac3.getAuthType());
+ assertEquals("MOAGivenName", oac3.getBasicAuthUserIDMapping());
+ assertEquals("MOAFamilyName", oac3.getBasicAuthPasswordMapping());
+ //Fehlerfall:
+
+
+ }
+}
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/AllTests.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/AllTests.java
new file mode 100644
index 000000000..93afeb096
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/AllTests.java
@@ -0,0 +1,46 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.id.proxy;
+
+import test.at.gv.egovernment.moa.id.proxy.builder.SAMLRequestBuilderTest;
+import test.at.gv.egovernment.moa.id.proxy.parser.SAMLResponseParserTest;
+import junit.awtui.TestRunner;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class AllTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite();
+
+ suite.addTestSuite(SAMLRequestBuilderTest.class);
+ suite.addTestSuite(SAMLResponseParserTest.class);
+
+ return suite;
+ }
+
+ public static void main(String[] args) {
+ try {
+ TestRunner.run(AllTests.class);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/builder/DOMTreeCompare.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/builder/DOMTreeCompare.java
new file mode 100644
index 000000000..6e10a06d8
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/builder/DOMTreeCompare.java
@@ -0,0 +1,477 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.id.proxy.builder;
+
+import java.io.PrintStream;
+import java.util.ArrayList;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Text;
+
+import at.gv.egovernment.moa.util.Base64Utils;
+
+/**
+ * @author Administrator
+ *
+ * To change this generated comment edit the template variable "typecomment":
+ * Window>Preferences>Java>Templates.
+ * To enable and disable the creation of type comments go to
+ * Window>Preferences>Java>Code Generation.
+ */
+public class DOMTreeCompare {
+
+ boolean debug = true;
+
+ private static PrintStream Log = null;
+
+ static
+ {
+ Log = System.out;
+ }
+
+ public boolean compareElements(Element root1, Element root2)
+ {
+ //Log.println("----- Compare Elements:"+root1.getNodeName()+" "+root2.getNodeName());
+ filterTree(root1);
+ filterTree(root2);
+ return compareNodes(root1,root2,0,"root/",false);
+ }
+
+ private boolean compareNodes(Node n1, Node n2, int level,String path,boolean attribute)
+ {
+ /*try {
+ Log.println(DOMUtils.serializeNode(n1));
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ }*/
+ boolean equal = false;
+ //Log.println("----- Compare Node "+level+":"+n1+" "+n2);
+ //Log.println("----- Compare Node "+level+":"+n1.getNodeName()+" "+n2.getNodeName());
+ //Log.println("----- Checking:"+path+getPathString(n1));
+ NodeList nl1 = n1.getChildNodes();
+ NodeList nl2 = n2.getChildNodes();
+
+ int size1 = nl1.getLength();
+ int size2 = nl2.getLength();
+
+ if(debug)display_one(n1);
+ if(debug)display_one(n2);
+
+
+ if(debug)
+ if(n1.getNodeName().equals("Base64Content") && n2.getNodeName().equals("Base64Content"))
+ {
+ try {
+ Log.println("CONT:"+new String(Base64Utils.decode(strip(n1.getChildNodes().item(0).getNodeValue()),false)));
+ Log.println("CONT:"+new String(Base64Utils.decode(strip(n2.getChildNodes().item(0).getNodeValue()),false)));
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ if(size1 != size2)
+ {
+ Log.println("----- Anzahl der Kinder nicht gleich:"+path+getPathString(n1)+":"+getPathString(n2));
+ return false;
+ }
+
+ equal = compareNodeExact(n1,n2,level,path+getPathString(n1)+"/");
+ if(!equal)
+ {
+ Log.println("----- Knoten sind nicht identisch:"+path+getPathString(n1));
+ return false;
+ }
+
+ if(n1.hasAttributes() || n2.hasAttributes())
+ {
+ equal = compareNodeAttriubtes(n1,n2,level+1,path+getPathString(n1)+"/(a)");
+ if(!equal)
+ {
+ Log.println("----- Attribute stimmen nicht überein:"+path+getPathString(n1));
+ return false;
+ }
+ }
+ if(size1==0)
+ {
+ return true;
+ }
+
+ for(int counter=0;counter<size1;counter++)
+ {
+ boolean found = false;
+ Node comp_n1 = nl1.item(counter);
+
+ //if(comp_n1==null) return false;
+
+ Node comp_n2 = null;
+ size2 = nl2.getLength();
+ for(int counter2=0;counter2<size2;counter2++)
+ {
+ comp_n2 = nl2.item(counter2);
+
+ /*equal = compareNodeExact(comp_n1,comp_n2,level+1);
+ if(equal) return false;*/
+ //Log.println("COMP_N1:"+comp_n1);
+ //Log.println("COMP_N2:"+comp_n2);
+ equal = compareNodes(comp_n1,comp_n2,level+1,path+getPathString(comp_n1)+"/",false);
+ if(equal)
+ {
+ n2.removeChild(comp_n2);
+ counter2=size2;
+ nl2 = n2.getChildNodes();
+ size2 = nl2.getLength();
+ }
+
+ }
+
+ if(!equal)
+ {
+ Log.println("----- Keine Übereinstimmung gefunden:"+path+getPathString(comp_n1));
+ return false;
+ }
+ }
+ return true;
+ }
+
+ private boolean compareNodeExact(Node n1,Node n2,int level,String path)
+ {
+ if(n1.getNodeType() == Node.TEXT_NODE)
+ {
+ Text textnode = (Text)n1;
+ /*Log.println("----- *****"+textnode.getNodeName());
+ Log.println("----- *****"+textnode.getParentNode().getNodeName());
+ Log.println("----- *****"+textnode.getNodeValue());*/
+ }
+
+ //Log.println("----- Checking:"+path);
+ String n1_name = n1.getNodeName();
+ String n2_name = n2.getNodeName();
+ /*Log.println("----- !!!!!"+n1.getNodeName());
+ Log.println("----- !!!!!"+n1.getNodeValue());
+ Log.println("----- !!!!!"+n1.getLocalName());
+ Log.println("----- !!!!!"+n1.getPrefix());
+ Log.println("----- !!!!!"+n1.getNextSibling());
+ Log.println("----- !!!!!"+n1.getPreviousSibling());*/
+
+ //Log.println("----- Compare Node "+level+":"+n1_name+" "+n2_name);
+ if(!((n1_name==null && n2_name==null) ||
+ (n1_name!=null && n2_name!=null && n1_name.equals(n2_name))))
+ {
+ Log.println("----- Name stimmt nicht überein:"+path);
+ return false;
+ }
+
+ //Log.println("----- Compare Node "+level+":"+n1.getNodeType()+" "+n2.getNodeType());
+ if(n1.getNodeType() != n2.getNodeType())
+ {
+ Log.println("----- Knotentyp stimmt nicht überein:"+path);
+ return false;
+ }
+
+ String n1_ns = n1.getPrefix();
+ String n2_ns = n2.getPrefix();
+ //Log.println("----- Compare Node "+level+":"+n1_ns+" "+n2_ns);
+ if(!((n1_ns==null && n2_ns==null) ||
+ (n1_ns!=null && n2_ns!=null && n1_ns.equals(n2_ns))))
+ {
+ Log.println("----- NameSpace stimmt nicht überein:"+path);
+ return false;
+ }
+
+ String n1_value = n1.getNodeValue();
+ String n2_value = n2.getNodeValue();
+
+ boolean special = false;
+ special = specialValues(n1_value,n2_value,path);
+ if(special) return true;
+
+ //Log.println("----- Compare Node "+level+":"+n1_value+" "+n2_value);
+ if(!((n1_value==null && n2_value==null) ||
+ (n1_value!=null && n2_value!=null && n1_value.equals(n2_value))))
+ {
+ Log.println("----- Wert stimmt nicht überein:"+path);
+ Log.println("----- Value1:\n"+n1_value);
+ Log.println("----- Value2:\n"+n2_value);
+ return false;
+ }
+
+
+ return true;
+ }
+
+ private boolean compareNodeAttriubtesWithoutSize(Node n1, Node n2, int level,String path)
+ {
+ return true;
+ }
+
+ private boolean compareNodeAttriubtes(Node n1, Node n2, int level,String path)
+ {
+ //Log.println("----- Compare NodeAttributes "+level+":"+n1.getNodeName()+" "+n2.getNodeName());
+ Element n1elem = (Element)n1;
+ Element n2elem = (Element)n2;
+
+ NamedNodeMap nnm1 = n1.getAttributes();
+ NamedNodeMap nnm2 = n2.getAttributes();
+
+ int size1 = 0;
+ int size2 = 0;
+
+ boolean specialattrs = specialAttributesSize(path);
+
+ if(!specialattrs)
+ {
+
+ if(nnm1==null && nnm2==null) return true;
+ if(nnm1==null || nnm2==null)
+ {
+ Log.println("----- Anzahl der Attribute nicht gleich:"+path+":"+getPathString(n1));
+ return false;
+ }
+ size1 = nnm1.getLength();
+ size2 = nnm2.getLength();
+
+ if(size1 != size2)
+ {
+ Log.println("----- Anzahl der Attribute nicht gleich:"+path+":"+getPathString(n1));
+ return false;
+ }
+
+ }
+ else
+ {
+ return compareNodeAttriubtesWithoutSize(n1,n2,level,path);
+ }
+
+ for(int counter=0;counter<size1;counter++)
+ {
+ Node attribute_node1 = nnm1.item(counter);
+ Node attribute_node2 = nnm2.item(counter);
+
+ String attr1_name = attribute_node1.getNodeName();
+ String attr2_name = attribute_node2.getNodeName();
+
+ String value1 = n1elem.getAttribute(attr1_name);
+ String value2 = n2elem.getAttribute(attr2_name);
+
+ boolean special = false;
+
+ special = specialAttributes(path,attr1_name,value1,attr2_name,value2);
+ if(special)
+ {
+ return special;
+ }
+
+ if(!value1.equals(value2))
+ {
+ Log.println("----- Keine Übereinstimmung gefunden:"+path+getPathString(n1));
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ private boolean checkNode(Node base,String name)
+ {
+ if(base.getNodeName().equals(name))
+ {
+ return true;
+ }
+
+ NodeList children = base.getChildNodes();
+ int size = children.getLength();
+ for(int counter=0;counter<size;counter++)
+ {
+ boolean found = checkNode(children.item(counter),name);
+ if(found) return true;
+ }
+ return false;
+ }
+
+ private void display_one(Node base)
+ {
+ int att_size=0;
+ if(base.getAttributes()!=null)
+ {
+ att_size=base.getAttributes().getLength();
+ }
+ if(base.getNodeName().equals("#text"))
+ Log.println(base.getNodeName()+base.getChildNodes().getLength()+":"+att_size+" ("+base.getNodeValue()+")");
+ else
+ Log.println(base.getNodeName()+base.getChildNodes().getLength()+":"+att_size);
+ }
+
+ private void display(Node base)
+ {
+ display(base,1);
+ }
+
+ private void display(Node base,int level)
+ {
+ String spacer = "";
+ for(int counter=0;counter<level;counter++)
+ {
+ spacer+=" ";
+ }
+
+ int att_size=0;
+ if(base.getAttributes()!=null)
+ {
+ att_size=base.getAttributes().getLength();
+ }
+ if(base.getNodeName().equals("#text"))
+ Log.println(spacer+base.getNodeName()+base.getChildNodes().getLength()+":"+att_size+" ("+base.getNodeValue()+")");
+ else
+ Log.println(spacer+base.getNodeName()+base.getChildNodes().getLength()+":"+att_size);
+
+ NodeList children = base.getChildNodes();
+ int size = children.getLength();
+ for(int counter=0;counter<size;counter++)
+ {
+ display(children.item(counter),level+1);
+ }
+ }
+
+ private void filterTree(Node base)
+ {
+ ArrayList removeList = new ArrayList();
+
+ NodeList children = base.getChildNodes();
+ int size = children.getLength();
+ for(int counter=0;counter<size;counter++)
+ {
+ Node child1 = children.item(counter);
+ if(child1.getNodeType() == Node.TEXT_NODE && child1.getNodeValue().trim().equals(""))
+ {
+ removeList.add(child1);
+ }
+ }
+
+ size = removeList.size();
+ for(int counter=0;counter<size;counter++)
+ {
+ base.removeChild((Node)removeList.get(counter));
+ }
+
+ children = base.getChildNodes();
+ size = children.getLength();
+ for(int counter=0;counter<size;counter++)
+ {
+ filterTree(children.item(counter));
+ }
+
+ }
+
+ private String getPathString(Node n)
+ {
+ if(n.getNodeType()==Node.TEXT_NODE)
+ {
+ return n.getParentNode().getNodeName()+"(text)";
+ }
+ else
+ {
+ return n.getNodeName();
+ }
+
+ }
+
+ public boolean specialAttributes(String path,String attr1_name,String value1,String attr2_name,String value2)
+ {
+ //if(value1.startsWith("reference-") && value2.startsWith("reference-")) return true;
+ //if(value1.startsWith("signature-") && value2.startsWith("signature-")) return true;
+
+ return false;
+ }
+
+ public boolean specialAttributesSize(String path)
+ {
+ //if(path.endsWith("/xsl:template/(a)")) return true;
+ return false;
+ }
+
+ public boolean specialValues(String value1,String value2,String path)
+ {
+
+ //Log.println(path);
+ /*if(ignoreSignatureValue)
+ {
+ if(path.endsWith("/dsig:SignatureValue(text)/"))
+ {
+ return true;
+ }
+ }
+ else
+ {
+ if(path.endsWith("/dsig:SignatureValue(text)/"))
+ {
+ String stripped_1 = strip(value1);
+ String stripped_2 = strip(value2);
+ return stripped_1.equals(stripped_2);
+ }
+ }*/
+
+ return false;
+ }
+
+ private String strip(String input)
+ {
+ String output = replaceStringAll(input," ","");
+ output = replaceStringAll(output,"\n","");
+ output = replaceStringAll(output,"\r","");
+ return output;
+ }
+
+ private static String replaceStringAll(
+ String input,
+ String oldPart,
+ String newPart)
+ {
+
+ String erg = null;
+
+ int pos = input.indexOf(oldPart);
+ if(pos==-1) return input;
+
+ while(true)
+ {
+
+ //First Part
+ pos = input.indexOf(oldPart);
+ if(pos==-1) break;
+ erg = input.substring(0, pos);
+
+ //Insert new Part
+ erg += newPart;
+
+ //insert REST
+ erg
+ += input.substring(
+ input.indexOf(oldPart) + oldPart.length(),
+ input.length());
+
+ input = erg;
+ }
+ return erg;
+ }
+
+}
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/builder/SAMLRequestBuilderTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/builder/SAMLRequestBuilderTest.java
new file mode 100644
index 000000000..060f4426e
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/builder/SAMLRequestBuilderTest.java
@@ -0,0 +1,47 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.id.proxy.builder;
+
+import org.w3c.dom.Element;
+
+import test.at.gv.egovernment.moa.id.UnitTestCase;
+import at.gv.egovernment.moa.id.auth.builder.SAMLArtifactBuilder;
+import at.gv.egovernment.moa.id.proxy.builder.SAMLRequestBuilder;
+import at.gv.egovernment.moa.util.DOMUtils;
+
+/*
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class SAMLRequestBuilderTest extends UnitTestCase {
+
+ public SAMLRequestBuilderTest(String arg0) {
+ super(arg0);
+ }
+
+ public void testBuild() throws Exception {
+ String requestID = "123";
+ String samlArtifact = new SAMLArtifactBuilder().build("https://moa.gv.at/auth/", "12345678901234567890");
+ String REQUEST_SHOULD = "<samlp:Request xmlns:samlp=\"urn:oasis:names:tc:SAML:1.0:protocol\" RequestID=\"" +
+ requestID + "\" MajorVersion=\"1\" MinorVersion=\"0\" IssueInstant=\"IGNORE\">" +
+ "<samlp:AssertionArtifact>" + samlArtifact + "</samlp:AssertionArtifact>" +
+ "</samlp:Request>";
+ Element request = new SAMLRequestBuilder().build(requestID, samlArtifact);
+ Element requestShould = DOMUtils.parseDocument(REQUEST_SHOULD, false, ALL_SCHEMA_LOCATIONS, null).getDocumentElement();
+ assertTrue(new SAMLRequestCompare().compareElements(requestShould, request));
+ }
+
+}
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/builder/SAMLRequestCompare.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/builder/SAMLRequestCompare.java
new file mode 100644
index 000000000..8ddc101a4
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/builder/SAMLRequestCompare.java
@@ -0,0 +1,34 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.id.proxy.builder;
+
+/*
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class SAMLRequestCompare extends test.at.gv.egovernment.moa.id.proxy.builder.DOMTreeCompare {
+
+
+ /*
+ * @see at.gv.egovernment.moa.util.SAMLRequestCompare#specialAttributes(java.lang.String, java.lang.String)
+ */
+ public boolean specialAttributes(String path,String attr1_name,String value1,String attr2_name,String value2) {
+ if(attr1_name.equals("IssueInstant"))
+ return true;
+ return false;
+ }
+
+}
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/parser/SAMLResponseParserTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/parser/SAMLResponseParserTest.java
new file mode 100644
index 000000000..f1de6ab8c
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/proxy/parser/SAMLResponseParserTest.java
@@ -0,0 +1,195 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.id.proxy.parser;
+
+import org.w3c.dom.Element;
+
+import test.at.gv.egovernment.moa.id.UnitTestCase;
+
+import at.gv.egovernment.moa.id.data.AuthenticationData;
+import at.gv.egovernment.moa.id.data.SAMLStatus;
+import at.gv.egovernment.moa.id.proxy.parser.SAMLResponseParser;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+
+/*
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class SAMLResponseParserTest extends UnitTestCase {
+
+ public SAMLResponseParserTest(String arg0) {
+ super(arg0);
+ }
+
+ public void testParse() throws Exception {
+ String samlResponse =
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
+ "<samlp:Response xmlns:samlp=\"urn:oasis:names:tc:SAML:1.0:protocol\" xmlns:saml=\"urn:oasis:names:tc:SAML:1.0:assertion\"" +
+ " ResponseID=\"\" MajorVersion=\"1\" MinorVersion=\"0\" IssueInstant=\"2003-03-29T06:00:00+02:00\">" +
+ "<samlp:Status>" +
+ "<samlp:StatusCode Value=\"samlp:Success\"><samlp:StatusCode Value=\"samlp:Success\"></samlp:StatusCode></samlp:StatusCode>" +
+ "<samlp:StatusMessage>Ollas leiwand</samlp:StatusMessage>" +
+ "</samlp:Status>" +
+"<saml:Assertion xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:pr=\"http://reference.e-government.gv.at/namespace/persondata/20020228#\" xmlns:saml=\"urn:oasis:names:tc:SAML:1.0:assertion\" MajorVersion=\"1\" MinorVersion=\"0\" AssertionID=\"-4633313027464114584\" Issuer=\"http://localhost:8080/moa-id-auth/\" IssueInstant=\"2003-04-02T14:55:42+02:00\">" +
+ "<saml:AttributeStatement>" +
+ "<saml:Subject>" +
+ "<saml:NameIdentifier NameQualifier=\"http://reference.e-government.gv.at/names/vpk/20020221#\">MTk2OC0xMC0yMmdi</saml:NameIdentifier>" +
+ "<saml:SubjectConfirmation>" +
+ "<saml:ConfirmationMethod>http://reference.e-government.gv.at/namespace/moa/20020822#cm</saml:ConfirmationMethod>" +
+ "<saml:SubjectConfirmationData>" +
+ "<saml:Assertion xmlns:saml=\"urn:oasis:names:tc:SAML:1.0:assertion\" MajorVersion=\"1\" MinorVersion=\"0\" AssertionID=\"any\" Issuer=\"Hermann Muster\" IssueInstant=\"2003-04-02T14:55:27+02:00\">" +
+ "<saml:AttributeStatement>" +
+ "<saml:Subject>" +
+ "<saml:NameIdentifier>http://localhost:8080/moa-id-auth/</saml:NameIdentifier>" +
+ "</saml:Subject>" +
+ "<saml:Attribute AttributeName=\"Geschäftsbereich\" AttributeNamespace=\"http://reference.e-government.gv.at/namespace/moa/20020822#\">" +
+ "<saml:AttributeValue>gb</saml:AttributeValue>" +
+ "</saml:Attribute>" +
+ "<saml:Attribute AttributeName=\"OA\" AttributeNamespace=\"http://reference.e-government.gv.at/namespace/moa/20020822#\">" +
+ "<saml:AttributeValue>https://localhost:9443/</saml:AttributeValue>" +
+ "</saml:Attribute>" +
+ "</saml:AttributeStatement>" +
+ "</saml:Assertion>" +
+ "<saml:Assertion AssertionID=\"zmr.bmi.gv.at-AssertionID-2003-02-12T20:28:34.474\" IssueInstant=\"2003-02-12T20:28:34.474\" Issuer=\"http://zmr.bmi.gv.at/zmra/names#Issuer\" MajorVersion=\"1\" MinorVersion=\"0\" xmlns:pr=\"http://reference.e-government.gv.at/namespace/persondata/20020228#\" xmlns:saml=\"urn:oasis:names:tc:SAML:1.0:assertion\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">" +
+ "<saml:AttributeStatement>" +
+ "<saml:Subject>" +
+ "<saml:SubjectConfirmation>" +
+ "<saml:ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:sender-vouches</saml:ConfirmationMethod>" +
+ "<saml:SubjectConfirmationData>" +
+ "<pr:Person xsi:type=\"pr:PhysicalPersonType\">" +
+ "<pr:Identification>" +
+ "<pr:Value>123456789012</pr:Value>" +
+ "<pr:Type>http://reference.e-government.gv.at/names/persondata/20020228#zmr-zahl</pr:Type>" +
+ "</pr:Identification>" +
+ "<pr:Name>" +
+ "<pr:GivenName>Hermann</pr:GivenName>" +
+ "<pr:FamilyName primary=\"undefined\">Muster</pr:FamilyName>" +
+ "</pr:Name>" +
+ "<pr:DateOfBirth>1968-10-22</pr:DateOfBirth>" +
+ "</pr:Person>" +
+ "</saml:SubjectConfirmationData>" +
+ "</saml:SubjectConfirmation>" +
+ "</saml:Subject>" +
+ "<saml:Attribute AttributeName=\"CitizenPublicKey\" AttributeNamespace=\"http://www.buergerkarte.at/namespaces/personenbindung/20020506#\">" +
+ "<saml:AttributeValue>" +
+ "<dsig:RSAKeyValue xmlns:dsig=\"http://www.w3.org/2000/09/xmldsig#\">" +
+ "<dsig:Modulus>0v1Ftf7WXgoexx0Jo/GrlExHOHnQIEQ5FFSjptLRd5BN1mZYRg2S9KfOMbHSCsiPm8AwjAEwE5EM A6P18Z/YyTIuP7fNGzckbB5PYIgNMHL8/TYJhHA8CjamsBrEfYDXivE8iAvALg5I9RMLZADmzL7a f2daYYuO8dycQw3xg6U=</dsig:Modulus>" +
+ "<dsig:Exponent>AQAB</dsig:Exponent>" +
+ "</dsig:RSAKeyValue>" +
+ "</saml:AttributeValue>" +
+ "</saml:Attribute>" +
+ "<saml:Attribute AttributeName=\"CitizenPublicKey\" AttributeNamespace=\"http://www.buergerkarte.at/namespaces/personenbindung/20020506#\">" +
+ "<saml:AttributeValue>" +
+ "<dsig:RSAKeyValue xmlns:dsig=\"http://www.w3.org/2000/09/xmldsig#\">" +
+ "<dsig:Modulus>i2qa56X4fpYeXqFLXAcQljGU3+DWnVgNrAxI9gn2bMeFWtLXE2SFa6qvl9EymUl0noBlFn0q9DWp AsyeLnRhzCAXJeSxiwsUEloOvcQCV0DfW2UVq0Y9bVlJ8KifJ2AS+5BxZ21mkc/VYx5Qz6EYjPrn pIpdAwR9sw5xnIvTySc=</dsig:Modulus>" +
+ "<dsig:Exponent>AQAB</dsig:Exponent>" +
+ "</dsig:RSAKeyValue>" +
+ "</saml:AttributeValue>" +
+ "</saml:Attribute>" +
+ "</saml:AttributeStatement>" +
+ "<dsig:Signature xmlns:dsig=\"http://www.w3.org/2000/09/xmldsig#\">" +
+ "<dsig:SignedInfo>" +
+ "<dsig:CanonicalizationMethod Algorithm=\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315\"/>" +
+ "<dsig:SignatureMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#rsa-sha1\"/>" +
+ "<dsig:Reference URI=\"\">" +
+ "<dsig:Transforms>" +
+ "<dsig:Transform Algorithm=\"http://www.w3.org/TR/1999/REC-xpath-19991116\">" +
+ "<dsig:XPath>not(ancestor-or-self::pr:Identification)</dsig:XPath>" +
+ "</dsig:Transform>" +
+ "<dsig:Transform Algorithm=\"http://www.w3.org/2000/09/xmldsig#enveloped-signature\"/>" +
+ "</dsig:Transforms>" +
+ "<dsig:DigestMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#sha1\"/>" +
+ "<dsig:DigestValue>s7TfoZrYo36OMdlxGxuIfAw/wr8=</dsig:DigestValue>" +
+ "</dsig:Reference>" +
+ "<dsig:Reference Type=\"http://www.w3.org/2000/09/xmldsig#Manifest\" URI=\"\">" +
+ "<dsig:Transforms>" +
+ "<dsig:Transform Algorithm=\"http://www.w3.org/TR/1999/REC-xpath-19991116\">" +
+ "<dsig:XPath>ancestor-or-self::dsig:Manifest</dsig:XPath>" +
+ "</dsig:Transform>" +
+ "</dsig:Transforms>" +
+ "<dsig:DigestMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#sha1\"/>" +
+ "<dsig:DigestValue>dO+RSn4xLHT3cuq8uopFtZyUBqo=</dsig:DigestValue>" +
+ "</dsig:Reference>" +
+ "</dsig:SignedInfo>" +
+ "<dsig:SignatureValue>MFbZ5wA5cq0UezYFDXted5uqXubWFxxRwZawGh73XEAGxAbJsT/IEQmrTQThPRHNWW5RPGxVlPDz 5BmjberdaWlgJlbyKf3b/WpNNJYptQ7ijrXlsQoCzjfiQy37NEfvHEcxHQOA6sa42C+dFKsKIvmP 3mZkRYWJDxxsVzI7E+Y=</dsig:SignatureValue>" +
+ "<dsig:KeyInfo>" +
+ "<dsig:X509Data>" +
+ "<dsig:X509Certificate>MIIDaDCCAtWgAwIBAgIBADAJBgUrDgMCHQUAMIGOMQswCQYDVQQGEwJBVDE9MDsG A1UEChQ0QnVuZGVzbWluaXN0ZXJpdW0gZvxyIPZmZmVudGxpY2hlIExlaXN0dW5n IHVuZCBTcG9ydDEjMCEGA1UECxMaSUtULVN0YWJzc3RlbGxlIGRlcyBCdW5kZXMx GzAZBgNVBAMTEk1PQSBUZXN0IENBIC0gUm9vdDAeFw0wMzAyMTExNTE5NDRaFw0w MzEyMzEyMjU5MzBaMIGOMQswCQYDVQQGEwJBVDE9MDsGA1UEChQ0QnVuZGVzbWlu aXN0ZXJpdW0gZvxyIPZmZmVudGxpY2hlIExlaXN0dW5nIHVuZCBTcG9ydDEjMCEG A1UECxMaSUtULVN0YWJzc3RlbGxlIGRlcyBCdW5kZXMxGzAZBgNVBAMTEk1PQSBU ZXN0IENBIC0gUm9vdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAjHuFphE3 +UkTe2OcIFWUDLzhPl1j2dH4sMPAhDK09/0i+aWrdtQW9yHktu/7+LTiCiPeevT0 lGMGDcWMSoSm66tYmpxei6YojCFIaVdJFtXZ7x1o7e7jTDVRLMfdZ5lI1sQ7loIY hOE0OmlYOkn4AI6xMtJtsca45rV8wW7qm8kCAwEAAaOB2zCB2DAPBgNVHRMBAf8E BTADAQH/MA4GA1UdDwEB/wQEAwIBBjBdBgNVHSAEVjBUMFIGDCsGAQQBlRIBAnsB ATBCMEAGCCsGAQUFBwICMDQaMkRpZXNlcyBaZXJ0aWZpa2F0IGlzdCBudXIgZvxy IFRlc3R6d2Vja2UgZ2VlaWduZXQuMB0GA1UdDgQWBBRDC612dCgZetTmAKyV6DII NkOoYTAWBgcqKAAKAQEBBAsMCUJNT0xTLUlLVDAfBgNVHSMEGDAWgBRDC612dCgZ etTmAKyV6DIINkOoYTAJBgUrDgMCHQUAA4GBAHj0xBNWGYLijaocjOX1AkL+r+G2 fZsX4z3S/2eEvtUp+EUHaOPMLTS0MIP1nwj5f4ZluAIrDLXihqMdi4xRv0W6QYbN aDxICNz3/QbrzMlFPeC8odesdRlT+GGswX0ZGUtVIZm1HVhxRk5ZEW2pr2afo5c0 Btxup/kgjGMnnS7C</dsig:X509Certificate>" +
+ "<dsig:X509Certificate>MIIDiTCCAvagAwIBAgIBADAJBgUrDgMCHQUAMIGOMQswCQYDVQQGEwJBVDE9MDsG A1UEChQ0QnVuZGVzbWluaXN0ZXJpdW0gZvxyIPZmZmVudGxpY2hlIExlaXN0dW5n IHVuZCBTcG9ydDEjMCEGA1UECxMaSUtULVN0YWJzc3RlbGxlIGRlcyBCdW5kZXMx GzAZBgNVBAMTEk1PQSBUZXN0IENBIC0gUm9vdDAeFw0wMzAyMTExNTI1MTRaFw0w MzEyMzEyMjU5MzBaMIGZMQswCQYDVQQGEwJBVDE9MDsGA1UEChQ0QnVuZGVzbWlu aXN0ZXJpdW0gZvxyIPZmZmVudGxpY2hlIExlaXN0dW5nIHVuZCBTcG9ydDEjMCEG A1UECxMaSUtULVN0YWJzc3RlbGxlIGRlcyBCdW5kZXMxJjAkBgNVBAMTHU1PQSBU ZXN0IENBIC0gU2lnbmF0dXJkaWVuc3RlMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB iQKBgQCw7ULOYSNji09Ein7Ar4j3Rjxjq05spBmZDmbSomEZMnGEtVTyIRzKc8ia 2kcXUMz5MEoFaVmvqRim31m20T21uvHFIs86gqzC/prOAz7V7HWok5F+9M/5gR1S BvpdqiEAXYeRXFPiOe8XSmpwhic7+n2jfuoBeYiRBEMGoP1DkwIDAQABo4HxMIHu MBIGA1UdEwEB/wQIMAYBAf8CAQAwDgYDVR0PAQH/BAQDAgHGMBEGCWCGSAGG+EIB AQQEAwIBAjBdBgNVHSAEVjBUMFIGDCsGAQQBlRIBAgMBATBCMEAGCCsGAQUFBwIC MDQaMkRpZXNlcyBaZXJ0aWZpa2F0IGlzdCBudXIgZvxyIFRlc3R6d2Vja2UgZ2Vl aWduZXQuMB0GA1UdDgQWBBSeRWvUfxEjKZSfxImJr/fpBDtMmTAWBgcqKAAKAQEB BAsMCUJNT0xTLUlLVDAfBgNVHSMEGDAWgBRDC612dCgZetTmAKyV6DIINkOoYTAJ BgUrDgMCHQUAA4GBAIMa4C2z3SbkcjEiMNAsHKaKUCJkBbMtNaab6U/cwwYmG6nl ga7xyEmbfY2SKzOqkcIwuv83Tma3rcr1f+OLUeGUaGLHt2Pl1a/s8BZGQZHWvLXv 7hV4RceEUHzVGAfvDD8iBJqBmfq/z/fBPFsgSup4nO1YECkDYfQ+sqCIP4ik</dsig:X509Certificate>" +
+ "<dsig:X509Certificate>MIIDZzCCAtSgAwIBAgIBADAJBgUrDgMCHQUAMIGZMQswCQYDVQQGEwJBVDE9MDsG A1UEChQ0QnVuZGVzbWluaXN0ZXJpdW0gZvxyIPZmZmVudGxpY2hlIExlaXN0dW5n IHVuZCBTcG9ydDEjMCEGA1UECxMaSUtULVN0YWJzc3RlbGxlIGRlcyBCdW5kZXMx JjAkBgNVBAMTHU1PQSBUZXN0IENBIC0gU2lnbmF0dXJkaWVuc3RlMB4XDTAzMDIx MTE1MzI0NVoXDTAzMDgxMTE0MzI0NVowgYUxCzAJBgNVBAYTAkFUMSYwJAYDVQQK FB1CdW5kZXNtaW5pc3Rlcml1bSBm/HIgSW5uZXJlczEgMB4GA1UECxMXWmVudHJh bGVzIE1lbGRlcmVnaXN0ZXIxLDAqBgNVBAMTI1Rlc3QgU2lnbmF0dXJkaWVuc3Qg UGVyc29uZW5iaW5kdW5nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDEzkpk QjbGjZwssN1+vMBE/ALMcA8LWFcILI3uxXaTSWGfTiLo9ECfzjuwYJG7FjEaeWrW nPEcp4VfMNocrm3T7Hw/ikpE5/+FsfTzD4MpIwwUPd/CUfA5vDNXK5CiP7qKKR1e vATO2s6lfDul+CS/eEbwzKmUQvZGrJggxg2m5wIDAQABo4HYMIHVMAwGA1UdEwEB /wQCMAAwDgYDVR0PAQH/BAQDAgbAMF0GA1UdIARWMFQwUgYMKwYBBAGVEgECAwEB MEIwQAYIKwYBBQUHAgIwNBoyRGllc2VzIFplcnRpZmlrYXQgaXN0IG51ciBm/HIg VGVzdHp3ZWNrZSBnZWVpZ25ldC4wHQYDVR0OBBYEFIpEyv43H3EtiGr4I7Z34bWj v2z6MBYGByooAAoBAQEECwwJQk1PTFMtSUtUMB8GA1UdIwQYMBaAFJ5Fa9R/ESMp lJ/EiYmv9+kEO0yZMAkGBSsOAwIdBQADgYEAfMBJRy/kp8HQa0lGIBfFrWNpxVPv RsIu+N4IiFrswrsoQoMAh6IqNyzSdq7rJC08xsDkXe5HOwkb+2zGKYoC3aQ/J/zr BGkg6ec4tOaS/VSdEQeTL1L30r2faTffWLUV3GrzL7pM7jN470hB1w8F6Hc3LCI7 kFfp23o/juVtJNw=</dsig:X509Certificate>" +
+ "</dsig:X509Data>" +
+ "</dsig:KeyInfo>" +
+ "<dsig:Object>" +
+ "<dsig:Manifest>" +
+ "<dsig:Reference URI=\"\">" +
+ "<dsig:Transforms>" +
+ "<dsig:Transform Algorithm=\"http://www.w3.org/2000/09/xmldsig#enveloped-signature\"/>" +
+ "</dsig:Transforms>" +
+ "<dsig:DigestMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#sha1\"/>" +
+ "<dsig:DigestValue>BqzfCB7dNg4G3u4YaxpD1tALdKI=</dsig:DigestValue>" +
+ "</dsig:Reference>" +
+ "</dsig:Manifest>" +
+ "</dsig:Object>" +
+ "</dsig:Signature>" +
+ "</saml:Assertion>" +
+ "</saml:SubjectConfirmationData>" +
+ "</saml:SubjectConfirmation>" +
+ "</saml:Subject>" +
+ "<saml:Attribute AttributeName=\"PersonData\" AttributeNamespace=\"http://reference.e-government.gv.at/namespace/persondata/20020228#\">" +
+ "<saml:AttributeValue>" +
+ "<pr:Person xsi:type=\"pr:PhysicalPersonType\">" +
+ "<pr:Identification>" +
+ "<pr:Value>123456789012</pr:Value>" +
+ "<pr:Type>http://reference.e-government.gv.at/names/persondata/20020228#zmr-zahl</pr:Type>" +
+ "</pr:Identification>" +
+ "<pr:Name>" +
+ "<pr:GivenName>Hermann</pr:GivenName>" +
+ "<pr:FamilyName primary=\"undefined\">Muster</pr:FamilyName>" +
+ "</pr:Name>" +
+ "<pr:DateOfBirth>1968-10-22</pr:DateOfBirth>" +
+ "</pr:Person>" +
+ "</saml:AttributeValue>" +
+ "</saml:Attribute>" +
+ "<saml:Attribute AttributeName=\"isQualifiedCertificate\" AttributeNamespace=\"http://reference.e-government.gv.at/namespace/moa/20020822#\">" +
+ "<saml:AttributeValue>true</saml:AttributeValue>" +
+ "</saml:Attribute>" +
+ "</saml:AttributeStatement>" +
+"</saml:Assertion>" +
+ "</samlp:Response>";
+
+ Element samlResponseElem =
+ DOMUtils.parseDocument(samlResponse, true, Constants.ALL_SCHEMA_LOCATIONS, null).getDocumentElement();
+ SAMLResponseParser parser = new SAMLResponseParser(samlResponseElem);
+ SAMLStatus status = parser.parseStatusCode();
+ assertEquals("samlp:Success", status.getStatusCode());
+ assertEquals("samlp:Success", status.getSubStatusCode());
+ assertEquals("Ollas leiwand", status.getStatusMessage());
+ AuthenticationData authData = parser.parseAuthenticationData();
+ assertEquals(1, authData.getMajorVersion());
+ assertEquals(0, authData.getMinorVersion());
+ assertEquals("-4633313027464114584", authData.getAssertionID());
+ assertEquals("http://localhost:8080/moa-id-auth/", authData.getIssuer());
+ assertEquals("2003-04-02T14:55:42+02:00", authData.getIssueInstant());
+ assertEquals("123456789012", authData.getIdentificationValue());
+ assertEquals("MTk2OC0xMC0yMmdi", authData.getBPK());
+ assertEquals("Hermann", authData.getGivenName());
+ assertEquals("Muster", authData.getFamilyName());
+ assertEquals("1968-10-22", authData.getDateOfBirth());
+ assertTrue(authData.isQualifiedCertificate());
+ assertFalse(authData.isPublicAuthority());
+ }
+}
diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/util/SSLUtilsTest.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/util/SSLUtilsTest.java
new file mode 100644
index 000000000..fa5b51a91
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/util/SSLUtilsTest.java
@@ -0,0 +1,107 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.id.util;
+
+import iaik.pki.jsse.IAIKX509TrustManager;
+
+import java.net.URL;
+import java.security.Security;
+
+import javax.net.ssl.SSLException;
+import javax.net.ssl.SSLSocketFactory;
+
+import com.sun.net.ssl.HttpsURLConnection;
+
+import at.gv.egovernment.moa.id.config.ConfigurationProvider;
+import at.gv.egovernment.moa.id.config.ConnectionParameter;
+import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
+import at.gv.egovernment.moa.id.config.proxy.OAProxyParameter;
+import at.gv.egovernment.moa.id.config.proxy.ProxyConfigurationProvider;
+import at.gv.egovernment.moa.id.iaik.config.LoggerConfigImpl;
+import at.gv.egovernment.moa.id.util.SSLUtils;
+import test.at.gv.egovernment.moa.id.UnitTestCase;
+
+/*
+ * @author Paul Ivancsics
+ * @version $Id$
+ */
+public class SSLUtilsTest extends UnitTestCase {
+
+ public SSLUtilsTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ //System.setProperty("javax.net.debug", "all");
+ Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
+ System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
+ IAIKX509TrustManager.initLog(new LoggerConfigImpl("file:" + TESTDATA_ROOT + "conf/log4j.properties"));
+ System.setProperty("https.cipherSuites", "SSL_DHE_DSS_WITH_DES_CBC_SHA,SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA,SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA,SSL_RSA_WITH_DES_CBC_SHA,SSL_RSA_WITH_3DES_EDE_CBC_SHA,SSL_RSA_EXPORT_WITH_RC4_40_MD5");
+ }
+
+ public void testVerisignOK() throws Exception {
+ doTestOA("conf/ConfigurationTest.xml", "http://verisign.moa.gv.at/", true, null);
+ }
+ public void testATrustOK() throws Exception {
+ doTestOA("conf/ConfigurationTest.xml", "http://a-trust.moa.gv.at/", true, null);
+ }
+ public void testBaltimoreOK() throws Exception {
+ doTestOA("conf/ConfigurationTest.xml", "http://baltimore.moa.gv.at/", true, null);
+ }
+ public void testCIOOK() throws Exception {
+ doTestOA("conf/ConfigurationTest.xml", "http://cio.moa.gv.at/", true, null);
+ }
+ public void testMOASPOK() throws Exception {
+ System.setProperty(ConfigurationProvider.CONFIG_PROPERTY_NAME,
+ TESTDATA_ROOT + "conf/ConfigurationTest.xml");
+ ConnectionParameter connParam = AuthConfigurationProvider.getInstance().getMoaSpConnectionParameter();
+ doTest(connParam, true, null);
+ }
+ private void doTestOA(String configFile, String publicURLPrefix, boolean shouldOK, String exMessageFragment) throws Exception {
+ System.setProperty(ConfigurationProvider.CONFIG_PROPERTY_NAME,
+ TESTDATA_ROOT + configFile);
+ ProxyConfigurationProvider proxyConf =
+ ProxyConfigurationProvider.getInstance();
+ OAProxyParameter oaParam = proxyConf.getOnlineApplicationParameter(publicURLPrefix);
+ ConnectionParameter connParam = oaParam.getConnectionParameter();
+ doTest(connParam, shouldOK, exMessageFragment);
+ }
+ private void doTest(ConnectionParameter connParam, boolean shouldOK, String exMessageFragment) throws Exception {
+ SSLUtils.initialize();
+ AuthConfigurationProvider authConf = AuthConfigurationProvider.getInstance();
+ SSLSocketFactory ssf = SSLUtils.getSSLSocketFactory(authConf, connParam);
+ URL url = new URL(connParam.getUrl());
+ HttpsURLConnection conn = (HttpsURLConnection)url.openConnection();
+ conn.setRequestMethod("GET");
+ conn.setDoInput(true);
+ conn.setDoOutput(true);
+ conn.setUseCaches(false);
+ conn.setAllowUserInteraction(false);
+ conn.setSSLSocketFactory(ssf);
+ try {
+ conn.connect();
+ assertTrue(shouldOK);
+ assertEquals(200, conn.getResponseCode());
+ conn.disconnect();
+ }
+ catch (SSLException ex) {
+ ex.printStackTrace();
+ assertFalse(shouldOK);
+ assertTrue(ex.getMessage().indexOf(exMessageFragment) >= 0);
+ }
+ }
+
+}
diff --git a/id/server/idserverlib/src/test/java/test/lasttest/Dispatcher.java b/id/server/idserverlib/src/test/java/test/lasttest/Dispatcher.java
new file mode 100644
index 000000000..3a7ef1a78
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/lasttest/Dispatcher.java
@@ -0,0 +1,79 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.lasttest;
+
+/**
+ * @author Stefan Knirsch
+ * @version $Id$
+ *
+ */
+public class Dispatcher extends Thread {
+ private LasttestClient parent = null;
+ private int max;
+ private int turns;
+ private int turn_counter;
+ private int turn;
+ private int time;
+ private long sum;
+ private int turnnum;
+
+ public Dispatcher(LasttestClient parent, int max, int turns, int time, long sum) {
+ this.parent = parent;
+ this.max = max;
+ this.turns = turns;
+ this.time = time;
+ this.sum = sum;
+ turnnum=0;
+ }
+
+ public void run() {
+ this.setPriority(Thread.NORM_PRIORITY + 1);
+ System.out.println("Dispatcher wird gestartet...");
+ TestThread[] old_reqs = buildRequests(0);
+ for (turn_counter = 0; turns == 0 ? true : (turn_counter < turns); turn_counter++) {
+ try {
+// LasttestClient.Log.write(("Starte Durchlauf " + turn_counter + "\n").getBytes());
+ }
+ catch (Exception e) {}
+
+// System.out.println("Starte Durchlauf " + turn_counter);
+ turn = turn_counter;
+ if (turns == 0)
+ turn_counter--;
+ TestThread[] reqs = buildRequests(turn_counter);
+ for (int counter = 0; counter < max; counter++) {
+ old_reqs[counter].start();
+ }
+ old_reqs = reqs;
+ try {
+ Thread.sleep(time);
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ parent.stop = true;
+ }
+
+ public TestThread[] buildRequests(int turnNo) {
+ TestThread[] ret = new TestThread[max];
+ for (int counter = 0; counter < max; counter++) {
+// turnnum ++;
+ ret[counter] = new TestThread(parent, turnNo);
+ }
+ return ret;
+ }
+}
diff --git a/id/server/idserverlib/src/test/java/test/lasttest/HostnameVerifierHack.java b/id/server/idserverlib/src/test/java/test/lasttest/HostnameVerifierHack.java
new file mode 100644
index 000000000..87b8aad4c
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/lasttest/HostnameVerifierHack.java
@@ -0,0 +1,28 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.lasttest;
+
+import com.sun.net.ssl.HostnameVerifier;
+
+/**
+ * @author Stefan Knirsch
+ * @version $Id$
+ *
+ */
+public class HostnameVerifierHack implements HostnameVerifier{
+ public boolean verify(String arg0, String arg1) {
+ return true;
+ }}
diff --git a/id/server/idserverlib/src/test/java/test/lasttest/LasttestClient.java b/id/server/idserverlib/src/test/java/test/lasttest/LasttestClient.java
new file mode 100644
index 000000000..911ca0258
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/lasttest/LasttestClient.java
@@ -0,0 +1,233 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.lasttest;
+
+import java.io.FileOutputStream;
+import java.io.OutputStream;
+import java.io.PrintStream;
+import java.security.Security;
+import java.util.Date;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.id.auth.AuthenticationServer;
+import at.gv.egovernment.moa.id.config.ConfigurationProvider;
+import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider;
+import at.gv.egovernment.moa.id.proxy.builder.SAMLRequestBuilder;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.StreamUtils;
+import at.gv.egovernment.moa.util.URLDecoder;
+import at.gv.egovernment.moa.util.URLEncoder;
+import com.sun.net.ssl.HttpsURLConnection;
+
+/**
+ * @author Sven
+ *
+ * To change this generated comment edit the template variable "typecomment":
+ * Window>Preferences>Java>Templates.
+ * To enable and disable the creation of type comments go to
+ * Window>Preferences>Java>Code Generation.
+ *
+ * Aufruf: Requestdatei (==null), ServerURL, Anzahl der Requests pro Sekunde, Anzahl der Wiederholungen
+ * z.b. "data/CX0/TestGeneratorCX0.001.Req.xml" "http://127.0.0.1:8080/" 5 100
+ *
+ * ==> GEÄNDERT: ersten 2 Parameter gekillt... nur noch 5 100
+ */
+public class LasttestClient {
+
+ protected static final String TESTDATA_ROOT = "data/abnahme-test/";
+ protected static final String MOA_AUTH_SERVER = "https://localhost:8443/moa-id-auth/";
+ protected AuthenticationServer server;
+
+ public int max_thread_count = 300;
+ public int thread_counter = 0;
+ public int error_count = 0;
+ public int turns = 0;
+ public long sum = 0;
+ public long max = 0;
+ public long min = Long.MAX_VALUE;
+
+ public static PrintStream Log = null;
+
+ public boolean stop = false;
+
+ public static final String trustStore = "javax.net.ssl.trustStore";
+ public static final String trustStorePassword = "javax.net.ssl.trustStorePassword";
+ public static final String handler = "java.protocol.handler.pkgs";
+
+ public void startTest(int req_per_second, int turns, int time) throws Exception {
+ Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
+
+ System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
+ System.setProperty("javax.net.ssl.trustStore", "C:/Programme/ApacheGroup/abnahme/server.keystore");
+ System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
+
+ System.setProperty(ConfigurationProvider.CONFIG_PROPERTY_NAME, TESTDATA_ROOT + "xmldata/L000/Configuration.xml");
+
+ AuthConfigurationProvider.reload();
+
+ this.turns = turns;
+
+ boolean result = new TestThread(this,0).doRequest(0);// doTestRequest();
+ if (result) {
+ System.out.println("TestRequest OK. Lasttest wird gestartet.");
+ sum=0;
+ max=0;
+ Dispatcher dp = new Dispatcher(this, req_per_second, turns, time, sum);
+ dp.start();
+ while (!stop) {
+ try {
+ Log.println(new String(("Checking Stop Condition ...(Running " + thread_counter + ", Min " + (min) + ", Max " + (max) + ", " + new Date(System.currentTimeMillis()) + ")")));
+ Log.flush();
+ }
+ catch (Exception e) {}
+
+ System.out.println("Checking Stop Condition ...(Running " + thread_counter + ", Min " + (min) + ", Max " + (max) + ", " + new Date(System.currentTimeMillis()) + ")");
+ Thread.sleep(10000);
+ }
+ System.out.println("Fehler:" + error_count + " (Running " + thread_counter + ", Min " + (min) + ", Max " + (max) + ", " + new Date(System.currentTimeMillis()) + ")");
+ }
+ else {
+ System.out.println("TestRequest lieferte einen Fehler. Lasttest wird nicht gestartet.");
+ }
+ }
+
+
+ public boolean doTestRequest() throws Exception {
+
+ try {
+
+ TestThread tt = new TestThread(null,0);
+
+ // Anmelden
+ String URL = tt.getURL(MOA_AUTH_SERVER, "gb", "http://10.16.126.28:9080/moa-id-proxy/");
+ HttpsURLConnection conn = tt.giveConnection(URL, "GET");
+
+ conn.connect();
+ String result = new String(StreamUtils.readStream(conn.getInputStream()));
+ String MOASessionID = tt.parseSessionIDFromForm(result);
+ conn.disconnect();
+
+ URL = tt.parseDataURL(result);
+ // Verify Identity Link
+ conn = tt.giveConnection(URL, "POST");
+ conn.setRequestProperty("Content-type", "application/x-www-form-urlencoded");
+ String infoboxReadResponse = tt.readXmldata("InfoboxReadResponse.xml");
+ OutputStream out = conn.getOutputStream();
+ out.write(new String("XMLResponse=" + URLEncoder.encode(infoboxReadResponse, "UTF-8")).getBytes());
+ out.flush();
+ out.close();
+ conn.connect();
+ String redirectLoc = conn.getHeaderField("Location");
+ conn.disconnect();
+ //Verify Auth Block
+ conn = tt.giveConnection(redirectLoc, "POST");
+ String createXMLSignatureResponse = URLEncoder.encode(tt.readXmldata("CreateXMLSignatureResponse.xml"), "UTF-8");
+ out = conn.getOutputStream();
+ out.write(("XMLResponse=" + createXMLSignatureResponse).getBytes("UTF-8"));
+ out.flush();
+ out.close();
+ conn.connect();
+ redirectLoc = conn.getHeaderField("Location");
+ String samlArtifact = tt.parseSamlArtifact(redirectLoc);
+ System.out.println("SamlArtifact: " + samlArtifact);
+
+ conn.disconnect();
+
+ conn = null;
+
+ SAMLRequestBuilder srb = new SAMLRequestBuilder();
+
+ Element erg = tt.doCall(srb.build(MOASessionID, URLDecoder.decode(samlArtifact, "UTF-8")),MOA_AUTH_SERVER);
+ result = DOMUtils.serializeNode(erg);
+ if (result.indexOf("saml:Assertion")<0)
+ {
+ System.err.println("Falsche Antwort vom Webservice:\n" + result);
+ throw new Exception("Falsche Antwort vom Webservice");
+
+ }
+ }
+ catch (Exception e) {
+ System.err.println("------ FEHLER IN LASTTEST :" + e.getLocalizedMessage());
+ throw e;
+ }
+
+ return true;
+
+ }
+
+ public String replaceString(String input, String oldPart, String newPart) throws Exception {
+ String erg = null;
+
+ //First Part
+ erg = input.substring(0, input.indexOf(oldPart));
+ //Insert new Part
+ erg += newPart;
+
+ //insert REST
+ erg += input.substring(input.indexOf(oldPart) + oldPart.length(), input.length());
+
+ return erg;
+ }
+
+ public static void main(String[] args) throws Exception {
+ Log = new PrintStream(new FileOutputStream("C:/Lasttest.log"));
+ int time = 0;
+ int sek = 0;
+ int turns = 0;
+
+ if (args.length != 3) {
+ System.out.println("Parameteranzahl falsch. Bitte verwenden Sie die Syntax <Request_pro_Zeiteinheit(Zahl)> <Anzahl_der_Durchläufe(Zahl oder INF)> <Zeit_zwischen_Aufrufen_in_ms(Zahl)>");
+ return;
+ }
+
+ try {
+ sek = Integer.parseInt(args[0]);
+ time = Integer.parseInt(args[2]);
+ if (args[1].equals("INF")) {
+ turns = 0;
+ }
+ else
+ turns = Integer.parseInt(args[1]);
+ }
+ catch (NumberFormatException e) {
+ System.out.println("Einer der Parameter (Requestanzahl oder Testanzahl) ist keine Zahl !");
+ return;
+ }
+
+ System.out.println("Starte Lastest mit folgenden Parametern ...");
+ System.out.println("ServerURL: " + MOA_AUTH_SERVER);
+ double reqPerSek = sek*1000;
+ System.out.println("Requests pro Sekunde: " + reqPerSek/time);
+ System.out.println("Durchläufe: " + (turns == 0 ? "INF" : turns + ""));
+
+ Log.println("Starte Lastest mit folgenden Parametern ...");
+ Log.println("ServerURL: " + MOA_AUTH_SERVER);
+ Log.println("Requests pro Sekunde: " + reqPerSek / time);
+ Log.println("Durchläufe: " + (turns == 0 ? "INF" : turns + ""));
+
+
+ try {
+ LasttestClient lc = new LasttestClient();
+ //lc.startTest("data/CX0/TestGeneratorCX0.001.Req.xml","http://161.106.2.255:8080/",10,1000);
+ lc.startTest(sek, turns, time);
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
+
diff --git a/id/server/idserverlib/src/test/java/test/lasttest/TestThread.java b/id/server/idserverlib/src/test/java/test/lasttest/TestThread.java
new file mode 100644
index 000000000..924b0189a
--- /dev/null
+++ b/id/server/idserverlib/src/test/java/test/lasttest/TestThread.java
@@ -0,0 +1,266 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.lasttest;
+
+import java.io.OutputStream;
+import java.net.URL;
+import java.util.Vector;
+
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Call;
+import javax.xml.rpc.Service;
+import javax.xml.rpc.ServiceFactory;
+
+import org.apache.axis.message.SOAPBodyElement;
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.id.proxy.builder.SAMLRequestBuilder;
+import at.gv.egovernment.moa.id.util.AxisSecureSocketFactory;
+import at.gv.egovernment.moa.util.FileUtils;
+import at.gv.egovernment.moa.util.StreamUtils;
+import at.gv.egovernment.moa.util.URLDecoder;
+import at.gv.egovernment.moa.util.URLEncoder;
+import com.sun.net.ssl.HttpsURLConnection;
+
+/**
+ * @author Stefan Knirsch
+ * @version $Id$
+ *
+ */
+public class TestThread extends Thread {
+ private LasttestClient parent = null;
+ private int turn_no;
+ private Dispatcher disp = null;
+
+ public TestThread( LasttestClient parent, int durchlauf_nr) {
+ turn_no = durchlauf_nr;
+ this.parent = parent;
+
+ }
+
+ protected Element doCall(Element request, String server) throws Exception {
+
+ /* QName serviceName = new QName("GetAuthenticationData");
+
+ String endPoint = server + "services/GetAuthenticationData";
+ Service service = ServiceFactory.newInstance().createService(serviceName);
+ Call call = service.createCall();
+ SOAPBodyElement body = new SOAPBodyElement(request);
+ SOAPBodyElement[] params = new SOAPBodyElement[] { body };
+ Vector responses;
+ SOAPBodyElement response;
+
+
+ System.out.println(DOMUtils.serializeNode(body.getAsDOM()));
+ call.setTargetEndpointAddress(endPoint);
+ System.out.println("Rufe WS auf: " + endPoint);
+ responses = (Vector) call.invoke(params);
+ System.out.println("WS aufgerufen.");
+ response = (SOAPBodyElement) responses.get(0);
+ System.out.println(DOMUtils.serializeNode(response.getAsDOM()));
+ return response.getAsDOM();*/
+
+ QName serviceName = new QName("GetAuthenticationData");
+ String endPoint = server + "services/GetAuthenticationData";
+ Service service = ServiceFactory.newInstance().createService(serviceName);
+ Call call = service.createCall();
+
+ System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
+ System.setProperty("javax.net.ssl.trustStore", "C:/Programme/ApacheGroup/abnahme/server.keystore");
+ System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
+ SOAPBodyElement body = new SOAPBodyElement(request);
+ SOAPBodyElement[] params = new SOAPBodyElement[] { body };
+ Vector responses;
+ SOAPBodyElement response;
+
+ call.setTargetEndpointAddress(endPoint);
+ responses = (Vector) call.invoke(params);
+ response = (SOAPBodyElement) responses.get(0);
+ return response.getAsDOM();
+ }
+
+ public boolean doRequest(int turnNo) throws Exception {
+ long start = System.currentTimeMillis();
+
+ try {
+ LasttestClient.Log.write(("Starte Durchlauf " + turnNo + "\n").getBytes());
+ }
+ catch (Exception e) {}
+
+ System.out.println("Starte Durchlauf " + turnNo);
+ // Anmelden
+ String URL = getURL(LasttestClient.MOA_AUTH_SERVER, "gb", "http://10.16.126.28:9080/moa-id-proxy/");
+ HttpsURLConnection conn = giveConnection(URL, "GET");
+ conn.connect();
+ String result = new String(StreamUtils.readStream(conn.getInputStream()));
+ /*
+ * FOR DEBUG ONLY
+ */
+ // System.out.println(URL);
+ // System.out.println(result);
+ //----------------
+
+ String MOASessionID = parseSessionIDFromForm(result);
+ conn.disconnect();
+
+ URL = parseDataURL(result);
+ // Verify Identity Link
+ conn = giveConnection(URL, "POST");
+ conn.setRequestProperty("Content-type", "application/x-www-form-urlencoded");
+ String infoboxReadResponse = readXmldata("InfoboxReadResponse.xml");
+ OutputStream out = conn.getOutputStream();
+ out.write(new String("XMLResponse=" + URLEncoder.encode(infoboxReadResponse, "UTF-8")).getBytes());
+ out.flush();
+ out.close();
+ conn.connect();
+
+ /*
+ * FOR DEBUG ONLY
+ */
+ // System.out.println(URL);
+ // System.out.println(new String(StreamUtils.readStream(conn.getInputStream())));
+ //----------------
+
+ String redirectLoc = conn.getHeaderField("Location");
+ conn.disconnect();
+ //Verify Auth Block
+ conn = giveConnection(redirectLoc, "POST");
+ String createXMLSignatureResponse = URLEncoder.encode(readXmldata("CreateXMLSignatureResponse.xml"), "UTF-8");
+ out = conn.getOutputStream();
+ out.write(("XMLResponse=" + createXMLSignatureResponse).getBytes("UTF-8"));
+ out.flush();
+ out.close();
+ conn.connect();
+ redirectLoc = conn.getHeaderField("Location");
+
+ /*
+ * FOR DEBUG ONLY
+ */
+ // System.out.println(redirectLoc);
+ // System.out.println(new String(StreamUtils.readStream(conn.getInputStream())));
+ //----------------
+ String samlArtifact = parseSamlArtifact(redirectLoc);
+
+ // System.out.println("SamlArtifact: " + samlArtifact);
+
+ AxisSecureSocketFactory.initialize(conn.getSSLSocketFactory());
+ conn.disconnect();
+
+ conn = null;
+
+ SAMLRequestBuilder srb = new SAMLRequestBuilder();
+
+ doCall(srb.build(MOASessionID, URLDecoder.decode(samlArtifact, "UTF-8")), LasttestClient.MOA_AUTH_SERVER);
+ // writeXmldata("GetAuthenticationDataWebServiceResponse.xml", result.getBytes("UTF-8"));
+
+ long end = System.currentTimeMillis();
+ long diff = end - start;
+ parent.sum +=diff;
+ if (parent.max < diff) {
+ parent.max = diff;
+ }
+ if (parent.min > diff) {
+ parent.min = diff;
+ }
+ if (turnNo>0) {
+ long totalmem = Runtime.getRuntime().totalMemory();
+ long freemem = Runtime.getRuntime().freeMemory();
+ try {
+ LasttestClient.Log.write(new String("Ende Durchlauf: " + turnNo + " ==> Dauer:" + diff + " Schnitt: " + (parent.sum/turnNo/2) + " Total-Mem: " + totalmem + " Free-Mem: " + freemem + "\n").getBytes());
+ LasttestClient.Log.flush();
+ }
+ catch (Exception e) {}
+ System.out.println(new String("Ende Durchlauf: " + turnNo + " ==> Dauer:" + diff + " Schnitt: " + (parent.sum/turnNo/2) + " Total-Mem: " + totalmem + " Free-Mem: " + freemem));
+ }
+ return true;
+
+ }
+
+ public String getSubString(String input, String startsWith, String endsWith) {
+ return input.substring(input.indexOf(startsWith) + startsWith.length(), input.indexOf(endsWith, input.indexOf(startsWith) + startsWith.length()));
+ }
+
+ public String getURL(String authURL, String target, String oaURL) {
+ return authURL + "StartAuthentication?Target=" + target + "&OA=" + oaURL;
+ }
+
+ public HttpsURLConnection giveConnection(String targetURL, String requestMethod) throws Exception {
+ HttpsURLConnection conn = (HttpsURLConnection) new URL(targetURL).openConnection();
+ conn.setRequestMethod(requestMethod);
+ conn.setDoInput(true);
+ conn.setDoOutput(true);
+ conn.setUseCaches(false);
+ conn.setAllowUserInteraction(false);
+ conn.setHostnameVerifier(new HostnameVerifierHack());
+ return conn;
+ }
+
+ public String killInclusive(String input, String startsWith, String endsWith, String newValue) {
+ int start = 0;
+ int ende;
+ String result;
+ result = input;
+ do {
+ start = result.indexOf(startsWith, start) + startsWith.length();
+ ende = result.indexOf(endsWith, start);
+ result = result.substring(0, start - startsWith.length()) + newValue + result.substring(ende + endsWith.length(), result.length());
+ start++;
+ }
+ while (result.indexOf(startsWith, ende + 1) > 0);
+
+ return result;
+ }
+
+ public String parseDataURL(String input) {
+ return getSubString(input.substring(input.indexOf("DataURL"), input.length()), "value=\"", "\"");
+ }
+
+ public String parseSamlArtifact(String input) {
+// System.out.println(input);
+ return getSubString(input + "@@@", "SAMLArtifact=", "@@@");
+ }
+
+ public String parseSessionIDFromForm(String htmlForm) {
+ String parName = "MOASessionID=";
+ int i1 = htmlForm.indexOf(parName) + parName.length();
+ int i2 = htmlForm.indexOf("\"", i1);
+ return htmlForm.substring(i1, i2);
+ }
+
+ public String readXmldata(String filename) throws Exception {
+
+ return FileUtils.readFile(LasttestClient.TESTDATA_ROOT + "xmldata/L000/" + filename, "UTF-8");
+ }
+
+ /**
+ * @see java.lang.Runnable#run()
+ */
+ public void run() {
+ parent.thread_counter++;
+
+ try {
+ if (!doRequest(turn_no)) {
+ parent.error_count++;
+ }
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ parent.error_count++;
+ }
+ parent.thread_counter--;
+ }
+
+}
diff --git a/id/server/licenses/APACHE-LICENSE-2.0.txt b/id/server/licenses/APACHE-LICENSE-2.0.txt
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/id/server/licenses/APACHE-LICENSE-2.0.txt
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/id/server/licenses/IAIK-LICENSE.txt b/id/server/licenses/IAIK-LICENSE.txt
new file mode 100644
index 000000000..c0db63b22
--- /dev/null
+++ b/id/server/licenses/IAIK-LICENSE.txt
@@ -0,0 +1,13 @@
+IAIK MOA Runtime Lizenz
+
+Stiftung SIC gewährt dem Lizenznehmer eine nicht-exklusive, nicht-übertragbare
+Runtime Lizenz für die "IAIK MOA" Module im Kontext von MOA SP/SS und MOA ID.
+Alle Versuche, Teile oder die kompletten IAIK Crypto Toolkits, die zusammen
+mit dem MOA Produktbündel ausgeliefert werden, für andere Zwecke als jenem
+für Applikationen im MOA Kontext zu verwenden, sind nicht erlaubt. Auch weitere
+Versuche, die sich auf die Entwicklung von Anwendungen , oder aber darüber hinaus
+auf die Schaffung eines eigenen Toolkits, oder die Aufnahme in ein weiters
+weiteres Toolkit beziehen, sind nicht erlaubt.
+Die hier beschriebene Runtime Lizenz ist nicht übertragbar auf weitere
+Vertragspartner des Kunden, Personen, Organisationen oder Unternehmen
+außerhalb der Organisation des Lizenznehmers.
diff --git a/id/server/pom.xml b/id/server/pom.xml
new file mode 100644
index 000000000..9ab2ca01f
--- /dev/null
+++ b/id/server/pom.xml
@@ -0,0 +1,27 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>MOA</groupId>
+ <artifactId>id</artifactId>
+ <version>1.5.0</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>MOA.id</groupId>
+ <artifactId>moa-id</artifactId>
+ <packaging>pom</packaging>
+ <version>1.5.0</version>
+ <name>MOA ID Server</name>
+
+ <modules>
+ <module>idserverlib</module>
+ <module>proxy</module>
+ <module>auth</module>
+ </modules>
+
+ <properties>
+ <repositoryPath>${basedir}/../../repository</repositoryPath>
+ </properties>
+
+</project>
diff --git a/id/server/proxy/.classpath b/id/server/proxy/.classpath
new file mode 100644
index 000000000..af4743f8a
--- /dev/null
+++ b/id/server/proxy/.classpath
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/id/server/proxy/.project b/id/server/proxy/.project
new file mode 100644
index 000000000..5aa808c31
--- /dev/null
+++ b/id/server/proxy/.project
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>moa-id-proxy</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ </natures>
+</projectDescription>
diff --git a/id/server/proxy/.settings/.jsdtscope b/id/server/proxy/.settings/.jsdtscope
new file mode 100644
index 000000000..f40dd98e2
--- /dev/null
+++ b/id/server/proxy/.settings/.jsdtscope
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
diff --git a/id/server/proxy/.settings/org.eclipse.jdt.core.prefs b/id/server/proxy/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..d70bf9268
--- /dev/null
+++ b/id/server/proxy/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,5 @@
+#Mon Aug 17 10:06:16 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.source=1.4
diff --git a/id/server/proxy/.settings/org.eclipse.jdt.core.prefs.merge-left.r1113 b/id/server/proxy/.settings/org.eclipse.jdt.core.prefs.merge-left.r1113
new file mode 100644
index 000000000..5ffa1b7e5
--- /dev/null
+++ b/id/server/proxy/.settings/org.eclipse.jdt.core.prefs.merge-left.r1113
@@ -0,0 +1,5 @@
+#Wed Aug 22 09:50:03 CEST 2007
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.3
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.compliance=1.3
diff --git a/id/server/proxy/.settings/org.eclipse.jdt.core.prefs.merge-right.r1113 b/id/server/proxy/.settings/org.eclipse.jdt.core.prefs.merge-right.r1113
new file mode 100644
index 000000000..88af5dc39
--- /dev/null
+++ b/id/server/proxy/.settings/org.eclipse.jdt.core.prefs.merge-right.r1113
@@ -0,0 +1,7 @@
+#Thu May 28 10:03:21 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.source=1.3
diff --git a/id/server/proxy/.settings/org.eclipse.jdt.core.prefs.working b/id/server/proxy/.settings/org.eclipse.jdt.core.prefs.working
new file mode 100644
index 000000000..53bd4313d
--- /dev/null
+++ b/id/server/proxy/.settings/org.eclipse.jdt.core.prefs.working
@@ -0,0 +1,7 @@
+#Tue Jul 07 16:07:23 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.source=1.3
diff --git a/id/server/proxy/.settings/org.eclipse.wst.common.component b/id/server/proxy/.settings/org.eclipse.wst.common.component
new file mode 100644
index 000000000..fad3275dd
--- /dev/null
+++ b/id/server/proxy/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="moa-id-proxy">
+ <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
+ <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/moa-spss-lib/moa-spss-lib">
+ <dependency-type>uses</dependency-type>
+ </dependent-module>
+ <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/moa-common/moa-common">
+ <dependency-type>uses</dependency-type>
+ </dependent-module>
+ <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/moa-id-lib/moa-id-lib">
+ <dependency-type>uses</dependency-type>
+ </dependent-module>
+ <property name="context-root" value="moa-id-proxy"/>
+ <property name="java-output-path"/>
+ </wb-module>
+</project-modules>
diff --git a/id/server/proxy/.settings/org.eclipse.wst.common.project.facet.core.xml b/id/server/proxy/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 000000000..f30a1de6e
--- /dev/null
+++ b/id/server/proxy/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <installed facet="jst.java" version="1.4"/>
+ <installed facet="jst.web" version="2.3"/>
+</faceted-project>
diff --git a/id/server/proxy/.settings/org.eclipse.wst.jsdt.ui.superType.container b/id/server/proxy/.settings/org.eclipse.wst.jsdt.ui.superType.container
new file mode 100644
index 000000000..3bd5d0a48
--- /dev/null
+++ b/id/server/proxy/.settings/org.eclipse.wst.jsdt.ui.superType.container
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file
diff --git a/id/server/proxy/.settings/org.eclipse.wst.jsdt.ui.superType.name b/id/server/proxy/.settings/org.eclipse.wst.jsdt.ui.superType.name
new file mode 100644
index 000000000..05bd71b6e
--- /dev/null
+++ b/id/server/proxy/.settings/org.eclipse.wst.jsdt.ui.superType.name
@@ -0,0 +1 @@
+Window \ No newline at end of file
diff --git a/id/server/proxy/.settings/org.maven.ide.eclipse.prefs b/id/server/proxy/.settings/org.maven.ide.eclipse.prefs
new file mode 100644
index 000000000..3f907cfa1
--- /dev/null
+++ b/id/server/proxy/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,9 @@
+#Tue Jul 07 16:06:59 CEST 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
diff --git a/id/server/proxy/pom.xml b/id/server/proxy/pom.xml
new file mode 100644
index 000000000..14f0f8d54
--- /dev/null
+++ b/id/server/proxy/pom.xml
@@ -0,0 +1,118 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>MOA.id</groupId>
+ <artifactId>moa-id</artifactId>
+ <version>1.5.0</version>
+ </parent>
+
+ <properties>
+ <repositoryPath>${basedir}/../../../repository</repositoryPath>
+ </properties>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>MOA.id.server</groupId>
+ <artifactId>moa-id-proxy</artifactId>
+ <packaging>war</packaging>
+ <version>1.5.0</version>
+ <name>MOA ID-Proxy WebService</name>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <archive>
+ <manifest>
+ <addDefaultSpecificationEntries>false</addDefaultSpecificationEntries>
+ <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+ </manifest>
+ <addMavenDescriptor>false</addMavenDescriptor>
+ </archive>
+<!--
+ <webResources>
+ <resource>
+ <directory>${basedir}/../resources</directory>
+ <targetPath>WEB-INF/classes/resources</targetPath>
+ </resource>
+ <resource>
+ <directory>${basedir}/../services</directory>
+ <targetPath>WEB-INF/classes/META-INF/services</targetPath>
+ </resource>
+ </webResources>
+-->
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <!-- we need Axis 1.1 here, 1.0 is included in SPSS -->
+ <dependency>
+ <groupId>axis</groupId>
+ <artifactId>axis</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>MOA.spss.server</groupId>
+ <artifactId>moa-spss-lib</artifactId>
+ <!--version>${project.version}</version-->
+ </dependency>
+ <dependency>
+ <groupId>MOA.id.server</groupId>
+ <artifactId>moa-id-lib</artifactId>
+ <!--version>${project.version}</version-->
+ </dependency>
+ <!-- transitive dependencies we don't want to include into the war -->
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_jce_full</artifactId>
+ <!-- should be in the ext directory of the jre -->
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_ecc</artifactId>
+ <!-- should be in the ext directory of the jre -->
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Provider</artifactId>
+ <!-- should be in the ext directory of the jre -->
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Wrapper</artifactId>
+ <!-- should be in the ext directory of the jre -->
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>xalan</artifactId>
+ <!-- should be provided by the container or jre -->
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <!-- should be provided by the container or jre -->
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>xml-apis</artifactId>
+ <!-- should be provided by the container or jre -->
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>serializer</artifactId>
+ <!-- should be provided by the container or jre -->
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/id/server/proxy/src/main/webapp/META-INF/MANIFEST.MF b/id/server/proxy/src/main/webapp/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..5e9495128
--- /dev/null
+++ b/id/server/proxy/src/main/webapp/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
diff --git a/id/server/proxy/src/main/webapp/WEB-INF/web.xml b/id/server/proxy/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 000000000..57926f207
--- /dev/null
+++ b/id/server/proxy/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>
+<web-app>
+ <display-name>MOA ID Proxy</display-name>
+ <description>MOA ID Proxy Service</description>
+
+ <filter>
+ <filter-name>ParameterInOrder Filter</filter-name>
+ <filter-class>at.gv.egovernment.moa.id.util.ParameterInOrderFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>ParameterInOrder Filter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <servlet>
+ <servlet-name>Proxy</servlet-name>
+ <display-name>Proxy</display-name>
+ <description>Forwards requests to the online application</description>
+ <servlet-class>at.gv.egovernment.moa.id.proxy.servlet.ProxyServlet</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet>
+ <servlet-name>ConfigurationUpdate</servlet-name>
+ <display-name>ConfigurationUpdate</display-name>
+ <description>Update MOA-ID Proxy configuration from the configuration file</description>
+ <servlet-class>at.gv.egovernment.moa.id.proxy.servlet.ConfigurationServlet</servlet-class>
+ </servlet>
+
+ <!-- JSP servlet -->
+ <servlet>
+ <servlet-name>jspservlet</servlet-name>
+ <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
+ </servlet>
+
+ <!-- servlet mapping for jsp pages -->
+ <!-- errorpage.jsp (customizeable) -->
+ <servlet-mapping>
+ <servlet-name>jspservlet</servlet-name>
+ <url-pattern>/errorpage-proxy.jsp</url-pattern>
+ </servlet-mapping>
+ <!-- message-proxy.jsp (customizeable) used for non error messages (e.g. ConfigurationUpdate) -->
+ <servlet-mapping>
+ <servlet-name>jspservlet</servlet-name>
+ <url-pattern>/message-proxy.jsp</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>ConfigurationUpdate</servlet-name>
+ <url-pattern>/ConfigurationUpdate</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Proxy</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+ <session-config>
+ <session-timeout>30</session-timeout>
+ </session-config>
+ <error-page>
+ <error-code>500</error-code>
+ <location>/errorpage-proxy.jsp</location>
+ </error-page>
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>ConfigurationUpdate</web-resource-name>
+ <url-pattern>/ConfigurationUpdate</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>moa-admin</role-name>
+ </auth-constraint>
+ </security-constraint>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ <realm-name>UserDatabase</realm-name>
+ </login-config>
+ <security-role>
+ <description>
+ The role that is required to log in to the moa Application
+ </description>
+ <role-name>moa-admin</role-name>
+ </security-role>
+</web-app>
diff --git a/id/server/proxy/src/main/webapp/errorpage-proxy.jsp b/id/server/proxy/src/main/webapp/errorpage-proxy.jsp
new file mode 100644
index 000000000..07f3e7f69
--- /dev/null
+++ b/id/server/proxy/src/main/webapp/errorpage-proxy.jsp
@@ -0,0 +1,50 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<%@ page contentType="text/html; charset=UTF-8" %>
+<html>
+<head>
+<title>Ein Fehler ist aufgetreten</title>
+</head>
+<% Throwable exceptionThrown = (Throwable)request.getAttribute("ExceptionThrown");
+ String errorMessage = (String)request.getAttribute("ErrorMessage");
+ String wrongParameters = (String)request.getAttribute("WrongParameters");
+%>
+
+<body>
+<h1>Fehler bei der Anmeldung</h1>
+<p>Bei der Anmeldung ist ein Fehler aufgetreten.</p>
+
+<% if (errorMessage != null) { %>
+<p>
+<%= errorMessage%><br>
+</p>
+<% } %>
+<% if (exceptionThrown != null) { %>
+<p>
+<%= exceptionThrown.getMessage()%>
+</p>
+<% } %>
+<% if (wrongParameters != null) { %>
+<p>Die Angabe der Parameter ist unvollst&auml;ndig.<br></p>
+<b> <%= wrongParameters %> </b><br>
+<p>
+ Beispiele f&uuml;r korrekte Links zur MOA-ID Authentisierung sind:
+</p>
+<p>
+<tt>&lt;a href="https://&lt;MOA-URL&gt;/StartAuthentication?Target=&lt;Gesch&auml;ftsbereich&gt;&amp;OA=&lt;OA-URL&gt;&amp;Template=&lt;Template-URL&gt;&quot;&gt;</tt>
+</p>
+<p>
+<tt>&lt;a href="https://&lt;MOA-URL&gt;/SelectBKU?Target=&lt;Gesch&auml;ftsbereich&gt;&amp;OA=&lt;OA-URL&gt;&amp;Template=&lt;Template-URL&gt;&amp;BKUSelectionTemplate=&lt;BKU-Template-URL&gt;&quot;&gt;</tt>
+</p>
+<p>
+Im Falle einer Applikation aus dem privatwirtschaftlichen Bereich (type="businessService") entf&auml;llt die Angabe des <i>Target</i> Parameters:
+</p>
+<p>
+<tt>&lt;a href="https://&lt;MOA-URL&gt;/StartAuthentication?OA=&lt;OA-URL&gt;&amp;Template=&lt;Template-URL&gt;&quot;&gt;</tt>
+</p>
+<p>
+<tt>&lt;a href="https://&lt;MOA-URL&gt;/SelectBKU?OA=&lt;OA-URL&gt;&amp;Template=&lt;Template-URL&gt;&amp;BKUSelectionTemplate=&lt;BKU-Template-URL&gt;&quot;&gt;</tt>
+</p>
+<p>Die Angabe der Parameter <tt>&quot;Template&quot;</tt> und <tt>&quot;BKUSelectionTemplate&quot;</tt> ist optional.</p>
+<% } %>
+</body>
+</html> \ No newline at end of file
diff --git a/id/server/proxy/src/main/webapp/message-proxy.jsp b/id/server/proxy/src/main/webapp/message-proxy.jsp
new file mode 100644
index 000000000..0d970898a
--- /dev/null
+++ b/id/server/proxy/src/main/webapp/message-proxy.jsp
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<%@ page contentType="text/html; charset=UTF-8" %>
+<html>
+<head>
+<title>MOA-ID Proxy</title>
+</head>
+<% String message = (String)request.getAttribute("Message");
+%>
+
+<body>
+<h1>MOA-ID Proxy</h1>
+
+<% if (message != null) { %>
+<p>
+<%= message%><br>
+</p>
+<% } %>
+
+</body>
+</html> \ No newline at end of file
diff --git a/id/templates/.classpath b/id/templates/.classpath
new file mode 100644
index 000000000..af4743f8a
--- /dev/null
+++ b/id/templates/.classpath
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/id/templates/.project b/id/templates/.project
new file mode 100644
index 000000000..583a2a0e7
--- /dev/null
+++ b/id/templates/.project
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>moa-id-templates</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ </natures>
+</projectDescription>
diff --git a/id/templates/.settings/.jsdtscope b/id/templates/.settings/.jsdtscope
new file mode 100644
index 000000000..f40dd98e2
--- /dev/null
+++ b/id/templates/.settings/.jsdtscope
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
diff --git a/id/templates/.settings/org.eclipse.jdt.core.prefs b/id/templates/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..f5e17a86f
--- /dev/null
+++ b/id/templates/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,5 @@
+#Mon Aug 17 10:06:12 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.source=1.4
diff --git a/id/templates/.settings/org.eclipse.jdt.core.prefs.merge-left.r1113 b/id/templates/.settings/org.eclipse.jdt.core.prefs.merge-left.r1113
new file mode 100644
index 000000000..c959c9def
--- /dev/null
+++ b/id/templates/.settings/org.eclipse.jdt.core.prefs.merge-left.r1113
@@ -0,0 +1,5 @@
+#Wed Aug 22 09:50:02 CEST 2007
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.3
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.source=1.3
+org.eclipse.jdt.core.compiler.compliance=1.3
diff --git a/id/templates/.settings/org.eclipse.jdt.core.prefs.merge-right.r1113 b/id/templates/.settings/org.eclipse.jdt.core.prefs.merge-right.r1113
new file mode 100644
index 000000000..d4367ef6f
--- /dev/null
+++ b/id/templates/.settings/org.eclipse.jdt.core.prefs.merge-right.r1113
@@ -0,0 +1,7 @@
+#Thu May 28 10:03:18 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.source=1.3
diff --git a/id/templates/.settings/org.eclipse.jdt.core.prefs.working b/id/templates/.settings/org.eclipse.jdt.core.prefs.working
new file mode 100644
index 000000000..0db181025
--- /dev/null
+++ b/id/templates/.settings/org.eclipse.jdt.core.prefs.working
@@ -0,0 +1,7 @@
+#Tue Jul 07 16:07:21 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.source=1.3
diff --git a/id/templates/.settings/org.eclipse.wst.common.component b/id/templates/.settings/org.eclipse.wst.common.component
new file mode 100644
index 000000000..1e8a98df8
--- /dev/null
+++ b/id/templates/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="moa-id-templates">
+ <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
+ <property name="context-root" value="moa-id-templates"/>
+ <property name="java-output-path"/>
+ </wb-module>
+</project-modules>
diff --git a/id/templates/.settings/org.eclipse.wst.common.project.facet.core.xml b/id/templates/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 000000000..f30a1de6e
--- /dev/null
+++ b/id/templates/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <installed facet="jst.java" version="1.4"/>
+ <installed facet="jst.web" version="2.3"/>
+</faceted-project>
diff --git a/id/templates/.settings/org.eclipse.wst.jsdt.ui.superType.container b/id/templates/.settings/org.eclipse.wst.jsdt.ui.superType.container
new file mode 100644
index 000000000..3bd5d0a48
--- /dev/null
+++ b/id/templates/.settings/org.eclipse.wst.jsdt.ui.superType.container
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file
diff --git a/id/templates/.settings/org.eclipse.wst.jsdt.ui.superType.name b/id/templates/.settings/org.eclipse.wst.jsdt.ui.superType.name
new file mode 100644
index 000000000..05bd71b6e
--- /dev/null
+++ b/id/templates/.settings/org.eclipse.wst.jsdt.ui.superType.name
@@ -0,0 +1 @@
+Window \ No newline at end of file
diff --git a/id/templates/.settings/org.maven.ide.eclipse.prefs b/id/templates/.settings/org.maven.ide.eclipse.prefs
new file mode 100644
index 000000000..65774a979
--- /dev/null
+++ b/id/templates/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,9 @@
+#Tue Jul 07 16:06:58 CEST 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
diff --git a/id/templates/pom.xml b/id/templates/pom.xml
new file mode 100644
index 000000000..b7a5d537a
--- /dev/null
+++ b/id/templates/pom.xml
@@ -0,0 +1,25 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>MOA</groupId>
+ <artifactId>id</artifactId>
+ <version>1.5.0</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>MOA.id</groupId>
+ <artifactId>moa-id-templates</artifactId>
+ <packaging>war</packaging>
+ <version>1.5.0</version>
+ <name>MOA ID Sample Templates</name>
+
+ <properties>
+ <repositoryPath>${basedir}/../../repository</repositoryPath>
+ </properties>
+
+ <build>
+ <finalName>moaid-templates</finalName>
+ </build>
+
+</project>
diff --git a/id/templates/src/main/webapp/META-INF/MANIFEST.MF b/id/templates/src/main/webapp/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..5e9495128
--- /dev/null
+++ b/id/templates/src/main/webapp/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
diff --git a/id/templates/src/main/webapp/SampleBKUSelectionTemplate.html b/id/templates/src/main/webapp/SampleBKUSelectionTemplate.html
new file mode 100644
index 000000000..5536226a8
--- /dev/null
+++ b/id/templates/src/main/webapp/SampleBKUSelectionTemplate.html
@@ -0,0 +1,52 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>MOA ID - Auswahl der B&uuuml;rgerkartenumgebung</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta name="Author" content="Max Mustermann">
+ <meta name="keywords" content="MOA-ID">
+ <link rel="stylesheet" type="text/css" href="/moaid-templates/css/main.css">
+ <link rel="stylesheet" type="text/css" href="/moaid-templates/css/display.css" media="screen,projection,tv,handheld">
+</head>
+
+<body>
+<img src="/moaid-templates/SampleLogo.gif" alt='Organisation XY'>
+<h1 align="center">Auswahl der B&uuml;rgerkartenumgebung</h1>
+<p></p>
+<p>Sie haben sich f&uuml;r Anmeldung mit Ihrer B&uuml;rgerkarte entschieden. Da es verschiedene Formen der B&uuml;rgerkarte gibt, m&uuml;ssen Sie nun w&auml;hlen, welche Sie bei der Anmeldung verwenden wollen.</p>
+<h3>Auswahl der B&uuml;rgerkarte</h3>
+<form name="CustomizedForm" method="post" action="<StartAuth>">
+ <BKUSelect>
+ <input type="submit" value="Ausw&auml;hlen"/>
+</form>
+<br/>
+<p></p>
+
+ <input type="hidden" value="Weitere Info"/>
+</form>
+
+<h4>Hinweise: </h4>
+<ul>
+ <li>
+ <p>Wollen Sie eine A-Trust B&uuml;rgerkarte erwerben? Hier finden Sie Informationen
+ dazu: <a href="http://www.a-trust.at/info.asp?node=337" target="_blank">A-Trust
+ B&uuml;rgerkarte.</a> Bei der Anmeldung mit der A-Trust B&uuml;rgerkarte
+ ben&ouml;tigen Sie eine funktionsf&auml;hige B&uuml;rgerkartensoftware sowie
+ einen passenden Kartenleser.</p>
+ </li>
+ <li>
+ <p>Wollen Sie ein A1-Signatur erwerben? Wenden Sie sich an 0800-664 680 um
+ Informationen zur A1-Signatur zu erhalten.
+ Hier finden Sie ebenfalls Informationen dazu: <a href="http://www.a1.net/signatur" target="_blank">A1-Signatur</a>.
+ Bei der Anmeldung mit der A1-Signatur wird keine B&uuml;rgerkartensoftware und
+ kein Kartenleser ben&ouml;tigt.</p>
+ </li>
+</ul>
+<div align="right"><a href="http://validator.w3.org/check?uri=http://localhost:8080/moaid-templates/SampleBKUSElectionTemplate.html"><img border="0"
+ src="/moaid-templates/valid-html401.gif"
+ alt="Valid HTML 4.01!" height="31" width="88"></a> </div>
+<p align="right">&nbsp; </p>
+
+
+</body>
+</html>
diff --git a/id/templates/src/main/webapp/SampleInputProcessorSignTemplate.html b/id/templates/src/main/webapp/SampleInputProcessorSignTemplate.html
new file mode 100644
index 000000000..c9b0a37b3
--- /dev/null
+++ b/id/templates/src/main/webapp/SampleInputProcessorSignTemplate.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>MOA ID - Identifizierter Zugang mit B&uuml;rgerkarte</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta name="Author" content="Max Mustermann">
+ <meta name="keywords" content="MOA-ID">
+ <link rel="stylesheet" type="text/css" href="/moaid-templates/css/main.css">
+ <link rel="stylesheet" type="text/css" href="/moaid-templates/css/display.css" media="screen,projection,tv,handheld">
+ <script language="javascript" type="text/javascript">
+ //<!--
+ function autoSubmit() {
+ document.VerifyAuthBlockForm.submitButton.disabled=true;
+ document.VerifyAuthBlockForm.submit();
+ } //-->
+ </script>
+</head>
+
+<body onLoad="autoSubmit()">
+<img src="/moaid-templates/SampleLogo.gif" alt='Organisation XY'>
+<h1 align="center">Sicherer Zugang zur Online-Anwendung mit B&uuml;rgerkarte</h1>
+<p></p>
+
+Der identifizierte Zugang erfolgt &uuml;ber die Module f&uuml;r Online Applikationen (MOA) unter Verwendung einer B&uuml;rgerkarte und deren Signaturfunktion.
+
+<p></p>
+<p>Sie werden in ku&uuml;rze zur Signatur der Anmeldedaten aufgefordert. Wenn sie diese
+signieren, so werden sie zur Online-Anwendung weitergeleitet und angemeldet.</p>
+
+<form name="VerifyAuthBlockForm" action="<BKU>" method="post" enctype="application/x-www-form-urlencoded">
+ <div align="center">
+ <input type="hidden" name="XMLRequest" value="<XMLRequest>"/>
+ <input type="hidden" name="DataURL" value="<DataURL>"/>
+ <input type="hidden" name="PushInfobox" value="<PushInfobox>"/>
+ <input type="submit" value="Signieren der Anmeldedaten" id="submitButton"/>
+ </div>
+</form>
+
+<div align="right"><a href="http://validator.w3.org/check?uri=http://localhost:8080/moaid-templates/SampleTemplate.html"><img border="0"
+ src="/moaid-templates/valid-html401.gif"
+ alt="Valid HTML 4.01!" height="31" width="88"></a> </div>
+<p align="right">&nbsp; </p>
+
+</body>
+</html>
diff --git a/id/templates/src/main/webapp/SampleLogo.gif b/id/templates/src/main/webapp/SampleLogo.gif
new file mode 100644
index 000000000..4b7c682b1
--- /dev/null
+++ b/id/templates/src/main/webapp/SampleLogo.gif
Binary files differ
diff --git a/id/templates/src/main/webapp/SampleTemplate.html b/id/templates/src/main/webapp/SampleTemplate.html
new file mode 100644
index 000000000..824c7153c
--- /dev/null
+++ b/id/templates/src/main/webapp/SampleTemplate.html
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>MOA ID - Identifizierter Zugang mit B&uuml;rgerkarte</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta name="Author" content="Max Mustermann">
+ <meta name="keywords" content="MOA-ID">
+ <link rel="stylesheet" type="text/css" href="/moaid-templates/css/main.css">
+ <link rel="stylesheet" type="text/css" href="/moaid-templates/css/display.css" media="screen,projection,tv,handheld">
+</head>
+
+<body>
+<img src="/moaid-templates/SampleLogo.gif" alt='Organisation XY'>
+<h1 align="center">Sicherer Zugang zur Online-Anwendung mit B&uuml;rgerkarte</h1>
+<p></p>
+
+Der identifizierte Zugang erfolgt &uuml;ber die Module f&uuml;r Online Applikationen (MOA) unter Verwendung einer B&uuml;rgerkarte und deren Signaturfunktion.
+
+<p></p>
+<p>Wenn Sie in Folge die Schaltfl&auml;che "Anmeldung mit B&uuml;rgerkarte"
+aktivieren, so werden zur Signatur der Anmeldedaten aufgefordert. Wenn sie diese
+signieren, so werden sie zur Online-Anwendung weitergeleitet und angemeldet.</p>
+
+
+<form name="CustomizedForm" action="<BKU>" method="post">
+ <div align="center">
+ <input type="hidden" name="XMLRequest" value="<XMLRequest>"/>
+ <input type="hidden" name="DataURL" value="<DataURL>"/>
+ <input type="hidden" name="PushInfobox" value="<PushInfobox>"/>
+ <input type="submit" value="Anmeldung mit B&uuml;rgerkarte" name="submit"/>
+ </div>
+</form>
+<form name="CustomizedInfoForm" action="<BKU>" method="post">
+ <input type="hidden" name="XMLRequest" value="<CertInfoXMLRequest>"/>
+ <input type="hidden" name="DataURL" value="<CertInfoDataURL>"/>
+<br/>
+<p></p>
+ <input type="hidden" value="Weitere Info"/>
+</form>
+
+<div align="right"><a href="http://validator.w3.org/check?uri=http://localhost:8080/moaid-templates/SampleTemplate.html"><img border="0"
+ src="/moaid-templates/valid-html401.gif"
+ alt="Valid HTML 4.01!" height="31" width="88"></a> </div>
+<p align="right">&nbsp; </p>
+
+</body>
+</html>
diff --git a/id/templates/src/main/webapp/WEB-INF/web.xml b/id/templates/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 000000000..6954e9c87
--- /dev/null
+++ b/id/templates/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>
+
+<web-app>
+ <display-name>Sample MOA-ID Templates</display-name>
+ <description>>Sample MOA-ID Templates</description>
+</web-app>
+
diff --git a/id/templates/src/main/webapp/css/display.css b/id/templates/src/main/webapp/css/display.css
new file mode 100644
index 000000000..fc6da85b0
--- /dev/null
+++ b/id/templates/src/main/webapp/css/display.css
@@ -0,0 +1,52 @@
+/* Beispiel Display-Stylesheet */
+
+span.printText {
+ font-size:80%;
+ margin-left:1em;
+ margin-top:-1.2em;
+ margin-bottom:1em;
+ font-weight:bold;
+ float:right
+}
+
+#mainmenu {
+ padding-left: 8px
+}
+
+#currentcontext {
+ background-color:#eff3ff;
+ border-top: 1px solid #76769f;
+ border-bottom: 1px solid #76769f;
+}
+
+#contextmenu {
+ position: absolute;
+ padding-top: 0.5em;
+ margin-top: 1em;
+ background: #e7e9f6;
+ width: 12.5em;
+}
+
+#contextmenubottom {
+ padding-top:1em;
+ background:white;
+ background-image:url(/style/img/mnv.gif);
+ background-repeat:repeat-x;
+}
+
+#contentcontainer {
+ position: absolute;
+ padding: 0px;
+ margin-left: 13.5em;
+ margin-top: 1em;
+ width: 40em;
+ text-align: justify;
+}
+
+#content {
+ margin-top:0em;
+ margin-left:1em;
+}
+
+
+/* #z_location { font-size:80%; margin-left:1em; padding-top:1em; } */
diff --git a/id/templates/src/main/webapp/css/main.css b/id/templates/src/main/webapp/css/main.css
new file mode 100644
index 000000000..bcad5589c
--- /dev/null
+++ b/id/templates/src/main/webapp/css/main.css
@@ -0,0 +1,74 @@
+/* Haupt-Stylesheet fuer z.B. für CIO/ciointern/iktintern/WSIS Webseite sowie in MOA-ID Templates*/
+/* Original design by Tinfish Media Lab */
+/* Additional design by Bernd Martin, Arno Hollosi */
+
+body {
+ margin-bottom:0.5em;
+ margin-right:2em;
+ margin-left:0.5em;
+ margin-top:0.5em;
+ background-color:#FFFFFF;
+ color:#000000;
+}
+
+/* Font */
+body,table,td,th
+{
+ font-family:arial,sans-serif;
+ font-size:small;
+}
+th { background-color:#ffffbb; color:#000000; }
+
+
+/* Ueberschriften */
+h1,h2,h3,h4,h5
+{
+ color:#336699;
+ background-color:#FFFFFF;
+}
+h1 { font-size:140%; }
+h2 { font-size:120%; }
+h3 { font-size:110%; }
+
+/* Links */
+a:link { color:#336699; text-decoration:none; }
+a:visited { color:#660066; text-decoration:none; }
+a:active { color:#336699; text-decoration:none; }
+a:hover { color:#000000; text-decoration:underline; }
+
+dt { font-weight:bold; }
+
+dl.filelist dt { font-weight: normal; }
+dl.filelist dd { margin-bottom: 0.5em; }
+
+
+div.pic { font-size:80%; color:#888888; background-color:#FFFFFF; }
+
+div.verz0 { margin-left:0em; }
+div.verz1 { margin-left:1em; }
+div.verz2 { margin-left:2em; }
+div.verz3 { margin-left:3em; }
+div.verz4 { margin-left:4em; }
+div.verz5 { margin-left:5em; }
+div.verz6 { margin-left:6em; }
+div.verz7 { margin-left:7em; }
+
+div.backLink { font-size:70%; margin-left:0em; margin-bottom:0em; font-weight:bold }
+div.noJavaScript { font-size:70%; margin-top:1.2em; margin-bottom:1.2em; font-weight:bold }
+
+div.newsDate { font-size:70%; margin-left:0em; margin-bottom:0em; margin-top:1em; font-weight:bold }
+div.newsTitle { font-size:100%; margin-left:0em; margin-bottom:0.1em; font-weight:bold }
+div.newsDesc { font-size:90%; margin-left:2em; margin-bottom:0em; }
+div.newsCreator { font-size:70%; margin-left:2.6em; margin-bottom:1em; }
+div.newsResultDesc { font-size:90%; margin-left:2em; margin-bottom:1em; }
+
+div.indentSmall { margin-left:1em }
+div.indentNormal { margin-left:1.5em }
+div.indentHigh { margin-left:2em }
+
+div.pic { font-size:80%; color:#888888; background-color:#FFFFFF; }
+
+span.hinw { color:#993333; background-color:#FFFFFF; }
+span.filesizeinfo { font-size:75% }
+span.imprintText { font-size:80%; margin-left:1em; float:right }
+span.footer { font-size:80%; margin-left:1em; margin-bottom:1em;}
diff --git a/id/templates/src/main/webapp/valid-html401.gif b/id/templates/src/main/webapp/valid-html401.gif
new file mode 100644
index 000000000..1270561e1
--- /dev/null
+++ b/id/templates/src/main/webapp/valid-html401.gif
Binary files differ
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 000000000..c0df961d2
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,433 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>MOA</groupId>
+ <artifactId>MOA</artifactId>
+ <packaging>pom</packaging>
+ <version>1.5.0</version>
+ <name>MOA</name>
+
+ <properties>
+ <repositoryPath>${basedir}/repository</repositoryPath>
+ </properties>
+
+ <profiles>
+ <profile>
+ <id>default</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ <property>
+ <name>default</name>
+ </property>
+ </activation>
+ <modules>
+ <module>common</module>
+ <module>spss</module>
+ <module>id</module>
+ </modules>
+ </profile>
+ </profiles>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <verbose>false</verbose>
+ <fork>true</fork>
+ <executable>${env.BUILD_EXECUTEABLE}</executable>
+ <compilerVersion>${env.BUILD_VERSION}</compilerVersion>
+ <source>1.4</source>
+ <target>1.4</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <inherited>false</inherited>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2-beta-1</version>
+ <configuration>
+ <finalName>moa</finalName>
+ <descriptors>
+ <descriptor>id/assembly-auth.xml</descriptor>
+ <descriptor>id/assembly-proxy.xml</descriptor>
+ <descriptor>spss/assembly.xml</descriptor>
+ <descriptor>spss/assembly-lib.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </plugin>
+ </plugins>
+
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <excludePackageNames>test.*</excludePackageNames>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+
+ <dependencyManagement>
+ <dependencies>
+
+ <dependency>
+ <groupId>axis</groupId>
+ <artifactId>axis</artifactId>
+ <version>1.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>axis</groupId>
+ <artifactId>axis-jaxrpc</artifactId>
+ <version>1.4</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>axis</groupId>
+ <artifactId>axis-saaj</artifactId>
+ <version>1.4</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>axis</groupId>
+ <artifactId>axis-wsdl4j</artifactId>
+ <version>1.5.1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>jaxen</groupId>
+ <artifactId>jaxen</artifactId>
+ <version>1.0-FCS</version>
+ </dependency>
+ <dependency>
+ <groupId>saxpath</groupId>
+ <artifactId>saxpath</artifactId>
+ <version>1.0-FCS</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ <version>7.2</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ <version>1.4</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ <version>1.1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>dav4j</groupId>
+ <artifactId>dav4j</artifactId>
+ <version>0.1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>httpsclient</groupId>
+ <artifactId>httpsclient</artifactId>
+ <version>JSSE-1.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>regexp</groupId>
+ <artifactId>regexp</artifactId>
+ <version>1.3</version>
+ </dependency>
+
+
+ <dependency>
+ <groupId>MOA</groupId>
+ <artifactId>moa-common</artifactId>
+ <version>1.5.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>MOA.id.server</groupId>
+ <artifactId>moa-id-lib</artifactId>
+ <version>1.5.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>MOA.spss.server</groupId>
+ <artifactId>moa-spss-lib</artifactId>
+ <version>1.5.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>MOA</groupId>
+ <artifactId>moa-common</artifactId>
+ <version>1.5.0</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>MOA.spss.server</groupId>
+ <artifactId>moa-spss-tools</artifactId>
+ <version>1.5</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.0.4</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.4</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.activation</groupId>
+ <artifactId>activation</artifactId>
+ <version>1.1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-discovery</groupId>
+ <artifactId>commons-discovery</artifactId>
+ <version>0.2</version>
+ <scope>compile</scope>
+ </dependency>
+ <!-- IAIK libraries -->
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_jce_full</artifactId>
+ <version>4.0_MOA</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_moa</artifactId>
+ <version>1.29</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_cms</artifactId>
+ <version>4.1_MOA</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_ecc</artifactId>
+ <version>2.19</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_ixsil</artifactId>
+ <version>1.2.2.4</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_X509TrustManager</artifactId>
+ <version>0.2</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Provider</artifactId>
+ <version>1.2.4</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Wrapper</artifactId>
+ <version>1.2.17</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Wrapper</artifactId>
+ <version>1.2.17</version>
+ <classifier>win32</classifier>
+ <type>dll</type>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Wrapper</artifactId>
+ <version>1.2.17</version>
+ <classifier>linux</classifier>
+ <type>so</type>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Wrapper</artifactId>
+ <version>1.2.17</version>
+ <classifier>linux_x64</classifier>
+ <type>so</type>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Wrapper</artifactId>
+ <version>1.2.17</version>
+ <classifier>solaris_sparc</classifier>
+ <type>so</type>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Wrapper</artifactId>
+ <version>1.2.17</version>
+ <classifier>solaris_sparcv9</classifier>
+ <type>so</type>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Wrapper</artifactId>
+ <version>1.2.17</version>
+ <classifier>win64</classifier>
+ <type>dll</type>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>2.7.1</version>
+ <scope>compile</scope>
+ </dependency>
+ <!-- The xmlParserAPIs.jar of the official xalan distribution
+ and the one in the central repository differ. So, we
+ are going to include the official one in our own
+ distribution to prevent from problems with different
+ versions in the endorsed directory of the servlet container
+ or jre endorsed directory. -->
+ <dependency>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>xml-apis</artifactId>
+ <version>2.7.0</version><!-- xalan version -->
+ <scope>runtime</scope>
+ </dependency>
+ <!-- The xalan.jar of the official xalan distribution
+ and the one in the central repository differ. So, we
+ are going to include the official one in our own
+ distribution to prevent from problems with different
+ versions in the endorsed directory of the servlet container
+ or jre endorsed directory. -->
+ <dependency>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>xalan</artifactId>
+ <version>2.7.0</version>
+ <scope>compile</scope><!-- for XPathAPI, Javadoc,...-->
+ </dependency>
+ <dependency>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>serializer</artifactId>
+ <version>2.7.0</version><!-- xalan version -->
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Wrapper</artifactId>
+ <classifier>win32</classifier>
+ <type>dll</type>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Wrapper</artifactId>
+ <classifier>linux</classifier>
+ <type>so</type>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Wrapper</artifactId>
+ <classifier>linux_x64</classifier>
+ <type>so</type>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Wrapper</artifactId>
+ <classifier>solaris_sparc</classifier>
+ <type>so</type>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Wrapper</artifactId>
+ <classifier>solaris_sparcv9</classifier>
+ <type>so</type>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Wrapper</artifactId>
+ <classifier>win64</classifier>
+ <type>dll</type>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+
+ <repositories>
+ <repository>
+ <id>MOA</id>
+ <name>MOA Dependencies</name>
+ <!--releases>
+ <enabled>false</enabled>
+ </releases-->
+ <layout>default</layout>
+ <url>file://${repositoryPath}</url>
+ </repository>
+ </repositories>
+</project>
diff --git a/repository/at/gv/egovernment/moa/id/mandate-validate/1.1/mandate-validate-1.1.jar b/repository/at/gv/egovernment/moa/id/mandate-validate/1.1/mandate-validate-1.1.jar
new file mode 100644
index 000000000..e82986124
--- /dev/null
+++ b/repository/at/gv/egovernment/moa/id/mandate-validate/1.1/mandate-validate-1.1.jar
Binary files differ
diff --git a/repository/at/gv/egovernment/moa/id/mandate-validate/1.1/mandate-validate-1.1.jar.md5 b/repository/at/gv/egovernment/moa/id/mandate-validate/1.1/mandate-validate-1.1.jar.md5
new file mode 100644
index 000000000..555bf9b75
--- /dev/null
+++ b/repository/at/gv/egovernment/moa/id/mandate-validate/1.1/mandate-validate-1.1.jar.md5
@@ -0,0 +1 @@
+5fe35cf763701c4fab80d0f151c6f55b \ No newline at end of file
diff --git a/repository/at/gv/egovernment/moa/id/mandate-validate/1.1/mandate-validate-1.1.jar.sha1 b/repository/at/gv/egovernment/moa/id/mandate-validate/1.1/mandate-validate-1.1.jar.sha1
new file mode 100644
index 000000000..7f077274a
--- /dev/null
+++ b/repository/at/gv/egovernment/moa/id/mandate-validate/1.1/mandate-validate-1.1.jar.sha1
@@ -0,0 +1 @@
+2c52349bf0255de412507628e764ee0433b210a3 \ No newline at end of file
diff --git a/repository/at/gv/egovernment/moa/id/mandate-validate/1.1/mandate-validate-1.1.pom b/repository/at/gv/egovernment/moa/id/mandate-validate/1.1/mandate-validate-1.1.pom
new file mode 100644
index 000000000..abfdf6187
--- /dev/null
+++ b/repository/at/gv/egovernment/moa/id/mandate-validate/1.1/mandate-validate-1.1.pom
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?><project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>at.gv.egovernment.moa.id</groupId>
+ <artifactId>mandate-validate</artifactId>
+ <version>1.1</version>
+ <description>Mandate Infobox Validator for MOA-ID</description>
+</project>
diff --git a/repository/at/gv/egovernment/moa/id/mandate-validate/1.1/mandate-validate-1.1.pom.md5 b/repository/at/gv/egovernment/moa/id/mandate-validate/1.1/mandate-validate-1.1.pom.md5
new file mode 100644
index 000000000..e5e428512
--- /dev/null
+++ b/repository/at/gv/egovernment/moa/id/mandate-validate/1.1/mandate-validate-1.1.pom.md5
@@ -0,0 +1 @@
+91ea39c3ac0f82bf63dd13a7999b5190 \ No newline at end of file
diff --git a/repository/at/gv/egovernment/moa/id/mandate-validate/1.1/mandate-validate-1.1.pom.sha1 b/repository/at/gv/egovernment/moa/id/mandate-validate/1.1/mandate-validate-1.1.pom.sha1
new file mode 100644
index 000000000..f02972492
--- /dev/null
+++ b/repository/at/gv/egovernment/moa/id/mandate-validate/1.1/mandate-validate-1.1.pom.sha1
@@ -0,0 +1 @@
+b43ee1a3b9ce95598841aecdf4d52d95f87530d5 \ No newline at end of file
diff --git a/repository/dav4j/dav4j/0.1/dav4j-0.1.jar b/repository/dav4j/dav4j/0.1/dav4j-0.1.jar
new file mode 100644
index 000000000..9a5a7bf81
--- /dev/null
+++ b/repository/dav4j/dav4j/0.1/dav4j-0.1.jar
Binary files differ
diff --git a/repository/dav4j/dav4j/0.1/dav4j-0.1.pom b/repository/dav4j/dav4j/0.1/dav4j-0.1.pom
new file mode 100644
index 000000000..05ebd2471
--- /dev/null
+++ b/repository/dav4j/dav4j/0.1/dav4j-0.1.pom
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?><project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>dav4j</groupId>
+ <artifactId>dav4j</artifactId>
+ <version>0.1</version>
+ <description>POM was created from install:install-file</description>
+</project> \ No newline at end of file
diff --git a/repository/dav4j/dav4j/maven-metadata-local.xml b/repository/dav4j/dav4j/maven-metadata-local.xml
new file mode 100644
index 000000000..777457a09
--- /dev/null
+++ b/repository/dav4j/dav4j/maven-metadata-local.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?><metadata>
+ <groupId>dav4j</groupId>
+ <artifactId>dav4j</artifactId>
+ <version>0.1</version>
+ <versioning>
+ <versions>
+ <version>0.1</version>
+ </versions>
+ <lastUpdated>20070814132458</lastUpdated>
+ </versioning>
+</metadata> \ No newline at end of file
diff --git a/repository/httpsclient/httpsclient/JSSE-1.0/httpsclient-JSSE-1.0.jar b/repository/httpsclient/httpsclient/JSSE-1.0/httpsclient-JSSE-1.0.jar
new file mode 100644
index 000000000..a9272deb1
--- /dev/null
+++ b/repository/httpsclient/httpsclient/JSSE-1.0/httpsclient-JSSE-1.0.jar
Binary files differ
diff --git a/repository/httpsclient/httpsclient/JSSE-1.0/httpsclient-JSSE-1.0.pom b/repository/httpsclient/httpsclient/JSSE-1.0/httpsclient-JSSE-1.0.pom
new file mode 100644
index 000000000..06e1fe40e
--- /dev/null
+++ b/repository/httpsclient/httpsclient/JSSE-1.0/httpsclient-JSSE-1.0.pom
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?><project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>httpsclient</groupId>
+ <artifactId>httpsclient</artifactId>
+ <version>JSSE-1.0</version>
+ <description>POM was created from install:install-file</description>
+</project> \ No newline at end of file
diff --git a/repository/httpsclient/httpsclient/maven-metadata-local.xml b/repository/httpsclient/httpsclient/maven-metadata-local.xml
new file mode 100644
index 000000000..f64c2577e
--- /dev/null
+++ b/repository/httpsclient/httpsclient/maven-metadata-local.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?><metadata>
+ <groupId>httpsclient</groupId>
+ <artifactId>httpsclient</artifactId>
+ <version>JSSE-1.0</version>
+ <versioning>
+ <versions>
+ <version>JSSE-1.0</version>
+ </versions>
+ <lastUpdated>20070814132409</lastUpdated>
+ </versioning>
+</metadata> \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Provider/1.2.4/iaik_Pkcs11Provider-1.2.4.jar b/repository/iaik/prod/iaik_Pkcs11Provider/1.2.4/iaik_Pkcs11Provider-1.2.4.jar
new file mode 100644
index 000000000..a348db04e
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Provider/1.2.4/iaik_Pkcs11Provider-1.2.4.jar
Binary files differ
diff --git a/repository/iaik/prod/iaik_Pkcs11Provider/1.2.4/iaik_Pkcs11Provider-1.2.4.jar.md5 b/repository/iaik/prod/iaik_Pkcs11Provider/1.2.4/iaik_Pkcs11Provider-1.2.4.jar.md5
new file mode 100644
index 000000000..755cc47fb
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Provider/1.2.4/iaik_Pkcs11Provider-1.2.4.jar.md5
@@ -0,0 +1 @@
+693dcf03f52dbadaa707fb1f5dd0085a \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Provider/1.2.4/iaik_Pkcs11Provider-1.2.4.jar.sha1 b/repository/iaik/prod/iaik_Pkcs11Provider/1.2.4/iaik_Pkcs11Provider-1.2.4.jar.sha1
new file mode 100644
index 000000000..6e133b3f8
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Provider/1.2.4/iaik_Pkcs11Provider-1.2.4.jar.sha1
@@ -0,0 +1 @@
+a58003f524217da40c7a85982636cb937d3b93bb \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Provider/1.2.4/iaik_Pkcs11Provider-1.2.4.pom b/repository/iaik/prod/iaik_Pkcs11Provider/1.2.4/iaik_Pkcs11Provider-1.2.4.pom
new file mode 100644
index 000000000..4325fd109
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Provider/1.2.4/iaik_Pkcs11Provider-1.2.4.pom
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?><project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Provider</artifactId>
+ <version>1.2.4</version>
+ <description>POM was created from install:install-file</description>
+</project> \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Provider/1.2.4/iaik_Pkcs11Provider-1.2.4.pom.md5 b/repository/iaik/prod/iaik_Pkcs11Provider/1.2.4/iaik_Pkcs11Provider-1.2.4.pom.md5
new file mode 100644
index 000000000..6d6d1f79c
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Provider/1.2.4/iaik_Pkcs11Provider-1.2.4.pom.md5
@@ -0,0 +1 @@
+6f94c976c6da78186b711fd9c4befdb9 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Provider/1.2.4/iaik_Pkcs11Provider-1.2.4.pom.sha1 b/repository/iaik/prod/iaik_Pkcs11Provider/1.2.4/iaik_Pkcs11Provider-1.2.4.pom.sha1
new file mode 100644
index 000000000..15135d6c2
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Provider/1.2.4/iaik_Pkcs11Provider-1.2.4.pom.sha1
@@ -0,0 +1 @@
+c59283c32ddee2a546e7d2045dbf52bb88bd7347 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Provider/1.2.6/iaik_Pkcs11Provider-1.2.6.jar b/repository/iaik/prod/iaik_Pkcs11Provider/1.2.6/iaik_Pkcs11Provider-1.2.6.jar
new file mode 100644
index 000000000..3eccf9ecb
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Provider/1.2.6/iaik_Pkcs11Provider-1.2.6.jar
Binary files differ
diff --git a/repository/iaik/prod/iaik_Pkcs11Provider/1.2.6/iaik_Pkcs11Provider-1.2.6.jar.md5 b/repository/iaik/prod/iaik_Pkcs11Provider/1.2.6/iaik_Pkcs11Provider-1.2.6.jar.md5
new file mode 100644
index 000000000..8d4b8aa6c
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Provider/1.2.6/iaik_Pkcs11Provider-1.2.6.jar.md5
@@ -0,0 +1 @@
+7D1B96A00ED443FC6B744474B5BF3388 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Provider/1.2.6/iaik_Pkcs11Provider-1.2.6.jar.sha1 b/repository/iaik/prod/iaik_Pkcs11Provider/1.2.6/iaik_Pkcs11Provider-1.2.6.jar.sha1
new file mode 100644
index 000000000..17980d2f0
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Provider/1.2.6/iaik_Pkcs11Provider-1.2.6.jar.sha1
@@ -0,0 +1 @@
+098BE92B2A0E2647C692AC89C34DCF121992F2F5 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Provider/1.2.6/iaik_Pkcs11Provider-1.2.6.pom b/repository/iaik/prod/iaik_Pkcs11Provider/1.2.6/iaik_Pkcs11Provider-1.2.6.pom
new file mode 100644
index 000000000..48b9c880f
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Provider/1.2.6/iaik_Pkcs11Provider-1.2.6.pom
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?><project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Provider</artifactId>
+ <version>1.2.6</version>
+ <description>POM was created from install:install-file</description>
+</project> \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Provider/1.2.6/iaik_Pkcs11Provider-1.2.6.pom.md5 b/repository/iaik/prod/iaik_Pkcs11Provider/1.2.6/iaik_Pkcs11Provider-1.2.6.pom.md5
new file mode 100644
index 000000000..8d4b8aa6c
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Provider/1.2.6/iaik_Pkcs11Provider-1.2.6.pom.md5
@@ -0,0 +1 @@
+7D1B96A00ED443FC6B744474B5BF3388 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Provider/1.2.6/iaik_Pkcs11Provider-1.2.6.pom.sha1 b/repository/iaik/prod/iaik_Pkcs11Provider/1.2.6/iaik_Pkcs11Provider-1.2.6.pom.sha1
new file mode 100644
index 000000000..17980d2f0
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Provider/1.2.6/iaik_Pkcs11Provider-1.2.6.pom.sha1
@@ -0,0 +1 @@
+098BE92B2A0E2647C692AC89C34DCF121992F2F5 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Provider/maven-metadata-central.xml b/repository/iaik/prod/iaik_Pkcs11Provider/maven-metadata-central.xml
new file mode 100644
index 000000000..ce32c47b8
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Provider/maven-metadata-central.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?><metadata>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Provider</artifactId>
+ <version>1.2.6</version>
+ <versioning>
+ <latest>1.2.6</latest>
+ <release>1.2.6</release>
+ <versions>
+ <version>1.2.4</version>
+ <version>1.2.6</version>
+ </versions>
+ <lastUpdated>20090810085134</lastUpdated>
+ </versioning>
+</metadata> \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Provider/maven-metadata-central.xml.md5 b/repository/iaik/prod/iaik_Pkcs11Provider/maven-metadata-central.xml.md5
new file mode 100644
index 000000000..8d4b8aa6c
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Provider/maven-metadata-central.xml.md5
@@ -0,0 +1 @@
+7D1B96A00ED443FC6B744474B5BF3388 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Provider/maven-metadata-central.xml.sha1 b/repository/iaik/prod/iaik_Pkcs11Provider/maven-metadata-central.xml.sha1
new file mode 100644
index 000000000..29841c45f
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Provider/maven-metadata-central.xml.sha1
@@ -0,0 +1 @@
+28B666EBA7FE10C7B7EC6515A08CD718523F03B6 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Provider/maven-metadata.xml b/repository/iaik/prod/iaik_Pkcs11Provider/maven-metadata.xml
new file mode 100644
index 000000000..ce32c47b8
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Provider/maven-metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?><metadata>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Provider</artifactId>
+ <version>1.2.6</version>
+ <versioning>
+ <latest>1.2.6</latest>
+ <release>1.2.6</release>
+ <versions>
+ <version>1.2.4</version>
+ <version>1.2.6</version>
+ </versions>
+ <lastUpdated>20090810085134</lastUpdated>
+ </versioning>
+</metadata> \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Provider/maven-metadata.xml.md5 b/repository/iaik/prod/iaik_Pkcs11Provider/maven-metadata.xml.md5
new file mode 100644
index 000000000..8d4b8aa6c
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Provider/maven-metadata.xml.md5
@@ -0,0 +1 @@
+7D1B96A00ED443FC6B744474B5BF3388 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Provider/maven-metadata.xml.sha1 b/repository/iaik/prod/iaik_Pkcs11Provider/maven-metadata.xml.sha1
new file mode 100644
index 000000000..17980d2f0
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Provider/maven-metadata.xml.sha1
@@ -0,0 +1 @@
+098BE92B2A0E2647C692AC89C34DCF121992F2F5 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-linux.so b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-linux.so
new file mode 100644
index 000000000..11852511b
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-linux.so
Binary files differ
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-linux.so.md5 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-linux.so.md5
new file mode 100644
index 000000000..c1a9134e5
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-linux.so.md5
@@ -0,0 +1 @@
+3847181418fd479473b3b60d0d384b78 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-linux.so.sha1 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-linux.so.sha1
new file mode 100644
index 000000000..09664aadf
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-linux.so.sha1
@@ -0,0 +1 @@
+ff80de20def956f474cd36f351c1ac99cb76bf40 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-linux_x64.so b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-linux_x64.so
new file mode 100644
index 000000000..393946053
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-linux_x64.so
Binary files differ
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-linux_x64.so.md5 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-linux_x64.so.md5
new file mode 100644
index 000000000..ccb273d54
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-linux_x64.so.md5
@@ -0,0 +1 @@
+e95dfd3b6b4f616daa12f4440da49cac \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-linux_x64.so.sha1 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-linux_x64.so.sha1
new file mode 100644
index 000000000..f0351a6a3
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-linux_x64.so.sha1
@@ -0,0 +1 @@
+a686948d388d5f9d4e11c932ce545b800c847f17 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-solaris_sparc.so b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-solaris_sparc.so
new file mode 100644
index 000000000..0b19f10c1
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-solaris_sparc.so
Binary files differ
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-solaris_sparc.so.md5 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-solaris_sparc.so.md5
new file mode 100644
index 000000000..67e896572
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-solaris_sparc.so.md5
@@ -0,0 +1 @@
+01003bd2e025deb2f981ef9ba5a61756 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-solaris_sparc.so.sha1 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-solaris_sparc.so.sha1
new file mode 100644
index 000000000..c13562e72
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-solaris_sparc.so.sha1
@@ -0,0 +1 @@
+313975b7ce5368703fa6d4684c1582c936e2c003 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-solaris_sparcv9.so b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-solaris_sparcv9.so
new file mode 100644
index 000000000..11f928b0b
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-solaris_sparcv9.so
Binary files differ
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-solaris_sparcv9.so.md5 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-solaris_sparcv9.so.md5
new file mode 100644
index 000000000..392e5cce2
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-solaris_sparcv9.so.md5
@@ -0,0 +1 @@
+0e4b9707f80757f99856755872659f70 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-solaris_sparcv9.so.sha1 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-solaris_sparcv9.so.sha1
new file mode 100644
index 000000000..f2ce9fc3b
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-solaris_sparcv9.so.sha1
@@ -0,0 +1 @@
+dcb89a48fb8e93d79e2b3bc490d4cb17c4d02ea3 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-win32.dll b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-win32.dll
new file mode 100644
index 000000000..3789b8d7a
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-win32.dll
Binary files differ
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-win32.dll.md5 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-win32.dll.md5
new file mode 100644
index 000000000..50e00efc6
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-win32.dll.md5
@@ -0,0 +1 @@
+39a366ffd368a1c9eaf05b544a06f875 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-win32.dll.sha1 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-win32.dll.sha1
new file mode 100644
index 000000000..d4f721d4b
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-win32.dll.sha1
@@ -0,0 +1 @@
+17388b3df0e5c397dec18a438674b14901342fa3 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-wince30arm.dll b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-wince30arm.dll
new file mode 100644
index 000000000..d98e48d80
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-wince30arm.dll
Binary files differ
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-wince30arm.dll.md5 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-wince30arm.dll.md5
new file mode 100644
index 000000000..4cab4126b
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-wince30arm.dll.md5
@@ -0,0 +1 @@
+be0698efa409d94f0f009c3c5179a0a4 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-wince30arm.dll.sha1 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-wince30arm.dll.sha1
new file mode 100644
index 000000000..7b6c4a70a
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16-wince30arm.dll.sha1
@@ -0,0 +1 @@
+b3bd0928d60b99df30356268295d94910dd7b08a \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16.jar b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16.jar
new file mode 100644
index 000000000..43342ef7c
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16.jar
Binary files differ
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16.jar.md5 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16.jar.md5
new file mode 100644
index 000000000..39f690ed6
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16.jar.md5
@@ -0,0 +1 @@
+638cc3d2ee90445c6683e55561295df5 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16.jar.sha1 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16.jar.sha1
new file mode 100644
index 000000000..12787ee27
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16.jar.sha1
@@ -0,0 +1 @@
+a5ef19ea43be5e16f85240b842f16a7f202e0049 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16.pom b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16.pom
new file mode 100644
index 000000000..0fd16012a
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16.pom
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?><project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Wrapper</artifactId>
+ <packaging>jar</packaging>
+ <version>1.2.16</version>
+</project> \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16.pom.md5 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16.pom.md5
new file mode 100644
index 000000000..e9a0270f8
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16.pom.md5
@@ -0,0 +1 @@
+3903f2c2ec48e9f770b51e6eb3a460db \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16.pom.sha1 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16.pom.sha1
new file mode 100644
index 000000000..08f2e3b85
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.16/iaik_Pkcs11Wrapper-1.2.16.pom.sha1
@@ -0,0 +1 @@
+90a1995356174c420a7da5afea2659b3f12276b0 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-linux.so b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-linux.so
new file mode 100644
index 000000000..eacbb13b2
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-linux.so
Binary files differ
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-linux.so.md5 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-linux.so.md5
new file mode 100644
index 000000000..5a049775d
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-linux.so.md5
@@ -0,0 +1 @@
+069DA682E9A9F9BB4AC324B255A393F7 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-linux.so.sha1 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-linux.so.sha1
new file mode 100644
index 000000000..ab6337249
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-linux.so.sha1
@@ -0,0 +1 @@
+BAEB9BA34180097D4946F0AD361D8B8EFECB413E \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-linux_x64.so b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-linux_x64.so
new file mode 100644
index 000000000..a10526cb8
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-linux_x64.so
Binary files differ
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-linux_x64.so.md5 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-linux_x64.so.md5
new file mode 100644
index 000000000..373c9868a
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-linux_x64.so.md5
@@ -0,0 +1 @@
+87BFE6434F8A6B816FBD78215B9C1412 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-linux_x64.so.sha1 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-linux_x64.so.sha1
new file mode 100644
index 000000000..6d5bcedd6
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-linux_x64.so.sha1
@@ -0,0 +1 @@
+06C78175A51E14E08AB43F5AE972D0484124AED5 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-solaris_sparc.so b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-solaris_sparc.so
new file mode 100644
index 000000000..c5f7d595f
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-solaris_sparc.so
Binary files differ
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-solaris_sparc.so.md5 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-solaris_sparc.so.md5
new file mode 100644
index 000000000..825a34e24
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-solaris_sparc.so.md5
@@ -0,0 +1 @@
+FD92CC8B3101507E741BA29B82F201D2 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-solaris_sparc.so.sha1 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-solaris_sparc.so.sha1
new file mode 100644
index 000000000..1963b6d61
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-solaris_sparc.so.sha1
@@ -0,0 +1 @@
+D276E39B9502D495445955AF8374220871BF7EED \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-solaris_sparcv9.so b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-solaris_sparcv9.so
new file mode 100644
index 000000000..1f58fe949
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-solaris_sparcv9.so
Binary files differ
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-solaris_sparcv9.so.md5 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-solaris_sparcv9.so.md5
new file mode 100644
index 000000000..5d6ae958d
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-solaris_sparcv9.so.md5
@@ -0,0 +1 @@
+CDC78C1FC40ABCF949BEB29992A74E82 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-solaris_sparcv9.so.sha1 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-solaris_sparcv9.so.sha1
new file mode 100644
index 000000000..6dc15cb14
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-solaris_sparcv9.so.sha1
@@ -0,0 +1 @@
+020D2C480E1C83631D4C28E504280421D02FAE6A \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-win32.dll b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-win32.dll
new file mode 100644
index 000000000..c1ee108b8
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-win32.dll
Binary files differ
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-win32.dll.md5 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-win32.dll.md5
new file mode 100644
index 000000000..692b59d70
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-win32.dll.md5
@@ -0,0 +1 @@
+60DB4967A04616FB68ED99DAB26E448F \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-win32.dll.sha1 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-win32.dll.sha1
new file mode 100644
index 000000000..692b59d70
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-win32.dll.sha1
@@ -0,0 +1 @@
+60DB4967A04616FB68ED99DAB26E448F \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-win64.dll b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-win64.dll
new file mode 100644
index 000000000..651a0e5cb
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-win64.dll
Binary files differ
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-win64.dll.md5 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-win64.dll.md5
new file mode 100644
index 000000000..1f9268ae4
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-win64.dll.md5
@@ -0,0 +1 @@
+C3DB420446E781F5CE37B14A4B170837 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-win64.dll.sha1 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-win64.dll.sha1
new file mode 100644
index 000000000..f1420c60d
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17-win64.dll.sha1
@@ -0,0 +1 @@
+805F00E6D9B6622FF5320B5A8136C9EC3D8693F2 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17.jar b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17.jar
new file mode 100644
index 000000000..940c1824d
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17.jar
Binary files differ
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17.jar.md5 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17.jar.md5
new file mode 100644
index 000000000..1f9268ae4
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17.jar.md5
@@ -0,0 +1 @@
+C3DB420446E781F5CE37B14A4B170837 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17.jar.sha1 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17.jar.sha1
new file mode 100644
index 000000000..c3478b5c1
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17.jar.sha1
@@ -0,0 +1 @@
+4CC3E3AF46627C4BBE5A2C81CA321DD046DADB50 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17.pom b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17.pom
new file mode 100644
index 000000000..1e1041e83
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17.pom
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?><project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Wrapper</artifactId>
+ <packaging>jar</packaging>
+ <version>1.2.17</version>
+</project> \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17.pom.md5 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17.pom.md5
new file mode 100644
index 000000000..5a049775d
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17.pom.md5
@@ -0,0 +1 @@
+069DA682E9A9F9BB4AC324B255A393F7 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17.pom.sha1 b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17.pom.sha1
new file mode 100644
index 000000000..7cfff220b
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/1.2.17/iaik_Pkcs11Wrapper-1.2.17.pom.sha1
@@ -0,0 +1 @@
+54C3534A0EACF59C77A6E28125CA5744C2FB988E \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/maven-metadata-central.xml b/repository/iaik/prod/iaik_Pkcs11Wrapper/maven-metadata-central.xml
new file mode 100644
index 000000000..ec5ce6369
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/maven-metadata-central.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?><metadata>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Wrapper</artifactId>
+ <version>1.2.17</version>
+ <versioning>
+ <latest>1.2.17</latest>
+ <release>1.2.17</release>
+ <versions>
+ <version>1.2.16</version>
+ <version>1.2.17</version>
+ </versions>
+ <lastUpdated>20090810085134</lastUpdated>
+ </versioning>
+</metadata> \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/maven-metadata-central.xml.md5 b/repository/iaik/prod/iaik_Pkcs11Wrapper/maven-metadata-central.xml.md5
new file mode 100644
index 000000000..60124fd03
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/maven-metadata-central.xml.md5
@@ -0,0 +1 @@
+C9E1EDB945EAE0CFD173431804498DFE \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/maven-metadata-central.xml.sha1 b/repository/iaik/prod/iaik_Pkcs11Wrapper/maven-metadata-central.xml.sha1
new file mode 100644
index 000000000..ece5d2149
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/maven-metadata-central.xml.sha1
@@ -0,0 +1 @@
+DEF3A90BD51643659EEAAA28A7F14E092CA465B0 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/maven-metadata.xml b/repository/iaik/prod/iaik_Pkcs11Wrapper/maven-metadata.xml
new file mode 100644
index 000000000..19a4eb7e7
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/maven-metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?><metadata>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Wrapper</artifactId>
+ <version>1.2.17</version>
+ <versioning>
+ <latest>1.2.17</latest>
+ <release>1.2.17</release>
+ <versions>
+ <version>1.2.16</version>
+ <version>1.2.17</version>
+ </versions>
+ <lastUpdated>20090810113210</lastUpdated>
+ </versioning>
+</metadata> \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/maven-metadata.xml.md5 b/repository/iaik/prod/iaik_Pkcs11Wrapper/maven-metadata.xml.md5
new file mode 100644
index 000000000..60124fd03
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/maven-metadata.xml.md5
@@ -0,0 +1 @@
+C9E1EDB945EAE0CFD173431804498DFE \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_Pkcs11Wrapper/maven-metadata.xml.sha1 b/repository/iaik/prod/iaik_Pkcs11Wrapper/maven-metadata.xml.sha1
new file mode 100644
index 000000000..45c122c9b
--- /dev/null
+++ b/repository/iaik/prod/iaik_Pkcs11Wrapper/maven-metadata.xml.sha1
@@ -0,0 +1 @@
+1DC586945531124E5C5C9948E576306EA5ADC301 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_X509TrustManager/0.2/iaik_X509TrustManager-0.2.jar b/repository/iaik/prod/iaik_X509TrustManager/0.2/iaik_X509TrustManager-0.2.jar
new file mode 100644
index 000000000..0c2d98400
--- /dev/null
+++ b/repository/iaik/prod/iaik_X509TrustManager/0.2/iaik_X509TrustManager-0.2.jar
Binary files differ
diff --git a/repository/iaik/prod/iaik_X509TrustManager/0.2/iaik_X509TrustManager-0.2.jar.md5 b/repository/iaik/prod/iaik_X509TrustManager/0.2/iaik_X509TrustManager-0.2.jar.md5
new file mode 100644
index 000000000..03de5944e
--- /dev/null
+++ b/repository/iaik/prod/iaik_X509TrustManager/0.2/iaik_X509TrustManager-0.2.jar.md5
@@ -0,0 +1 @@
+2def897df8ea889bd1160cd311b61a42 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_X509TrustManager/0.2/iaik_X509TrustManager-0.2.jar.sha1 b/repository/iaik/prod/iaik_X509TrustManager/0.2/iaik_X509TrustManager-0.2.jar.sha1
new file mode 100644
index 000000000..80aa2ea09
--- /dev/null
+++ b/repository/iaik/prod/iaik_X509TrustManager/0.2/iaik_X509TrustManager-0.2.jar.sha1
@@ -0,0 +1 @@
+39bfb3145140f6b53f3a15f9236b3c507049d2f5 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_X509TrustManager/0.2/iaik_X509TrustManager-0.2.pom b/repository/iaik/prod/iaik_X509TrustManager/0.2/iaik_X509TrustManager-0.2.pom
new file mode 100644
index 000000000..f4c3c25cd
--- /dev/null
+++ b/repository/iaik/prod/iaik_X509TrustManager/0.2/iaik_X509TrustManager-0.2.pom
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?><project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_X509TrustManager</artifactId>
+ <version>0.2</version>
+ <description>POM was created from install:install-file</description>
+</project> \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_X509TrustManager/0.2/iaik_X509TrustManager-0.2.pom.md5 b/repository/iaik/prod/iaik_X509TrustManager/0.2/iaik_X509TrustManager-0.2.pom.md5
new file mode 100644
index 000000000..4ad6445ba
--- /dev/null
+++ b/repository/iaik/prod/iaik_X509TrustManager/0.2/iaik_X509TrustManager-0.2.pom.md5
@@ -0,0 +1 @@
+aaaaff7a5d6a29d0a4256527a8616ef4 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_X509TrustManager/0.2/iaik_X509TrustManager-0.2.pom.sha1 b/repository/iaik/prod/iaik_X509TrustManager/0.2/iaik_X509TrustManager-0.2.pom.sha1
new file mode 100644
index 000000000..a51e29ffa
--- /dev/null
+++ b/repository/iaik/prod/iaik_X509TrustManager/0.2/iaik_X509TrustManager-0.2.pom.sha1
@@ -0,0 +1 @@
+4252e14194fb7fc66b91331015cebc9a9e1b2e9b \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_X509TrustManager/maven-metadata-central.xml b/repository/iaik/prod/iaik_X509TrustManager/maven-metadata-central.xml
new file mode 100644
index 000000000..78628aba4
--- /dev/null
+++ b/repository/iaik/prod/iaik_X509TrustManager/maven-metadata-central.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?><metadata>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_X509TrustManager</artifactId>
+ <version>0.2</version>
+ <versioning>
+ <latest>0.2</latest>
+ <release>0.2</release>
+ <versions>
+ <version>0.2</version>
+ </versions>
+ <lastUpdated>20070814085134</lastUpdated>
+ </versioning>
+</metadata> \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_X509TrustManager/maven-metadata-central.xml.md5 b/repository/iaik/prod/iaik_X509TrustManager/maven-metadata-central.xml.md5
new file mode 100644
index 000000000..d68881b50
--- /dev/null
+++ b/repository/iaik/prod/iaik_X509TrustManager/maven-metadata-central.xml.md5
@@ -0,0 +1 @@
+9b68f57f4da5b1b5f917519aec1255d9 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_X509TrustManager/maven-metadata-central.xml.sha1 b/repository/iaik/prod/iaik_X509TrustManager/maven-metadata-central.xml.sha1
new file mode 100644
index 000000000..99d2c7f38
--- /dev/null
+++ b/repository/iaik/prod/iaik_X509TrustManager/maven-metadata-central.xml.sha1
@@ -0,0 +1 @@
+36334d140a18f20c03073a6b090a240296ec6dbd \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_X509TrustManager/maven-metadata.xml b/repository/iaik/prod/iaik_X509TrustManager/maven-metadata.xml
new file mode 100644
index 000000000..78628aba4
--- /dev/null
+++ b/repository/iaik/prod/iaik_X509TrustManager/maven-metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?><metadata>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_X509TrustManager</artifactId>
+ <version>0.2</version>
+ <versioning>
+ <latest>0.2</latest>
+ <release>0.2</release>
+ <versions>
+ <version>0.2</version>
+ </versions>
+ <lastUpdated>20070814085134</lastUpdated>
+ </versioning>
+</metadata> \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_X509TrustManager/maven-metadata.xml.md5 b/repository/iaik/prod/iaik_X509TrustManager/maven-metadata.xml.md5
new file mode 100644
index 000000000..d68881b50
--- /dev/null
+++ b/repository/iaik/prod/iaik_X509TrustManager/maven-metadata.xml.md5
@@ -0,0 +1 @@
+9b68f57f4da5b1b5f917519aec1255d9 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_X509TrustManager/maven-metadata.xml.sha1 b/repository/iaik/prod/iaik_X509TrustManager/maven-metadata.xml.sha1
new file mode 100644
index 000000000..99d2c7f38
--- /dev/null
+++ b/repository/iaik/prod/iaik_X509TrustManager/maven-metadata.xml.sha1
@@ -0,0 +1 @@
+36334d140a18f20c03073a6b090a240296ec6dbd \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_cms/4.01_MOA/iaik_cms-4.01_MOA.jar b/repository/iaik/prod/iaik_cms/4.01_MOA/iaik_cms-4.01_MOA.jar
new file mode 100644
index 000000000..cc5b36c98
--- /dev/null
+++ b/repository/iaik/prod/iaik_cms/4.01_MOA/iaik_cms-4.01_MOA.jar
Binary files differ
diff --git a/repository/iaik/prod/iaik_cms/4.01_MOA/iaik_cms-4.01_MOA.jar.md5 b/repository/iaik/prod/iaik_cms/4.01_MOA/iaik_cms-4.01_MOA.jar.md5
new file mode 100644
index 000000000..81c1a3bc7
--- /dev/null
+++ b/repository/iaik/prod/iaik_cms/4.01_MOA/iaik_cms-4.01_MOA.jar.md5
@@ -0,0 +1 @@
+3e2a79017366f887b3bbe4483d44f954 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_cms/4.01_MOA/iaik_cms-4.01_MOA.jar.sha1 b/repository/iaik/prod/iaik_cms/4.01_MOA/iaik_cms-4.01_MOA.jar.sha1
new file mode 100644
index 000000000..687c5d2b5
--- /dev/null
+++ b/repository/iaik/prod/iaik_cms/4.01_MOA/iaik_cms-4.01_MOA.jar.sha1
@@ -0,0 +1 @@
+55005815b937cb6951bec229ae07ec5add519832 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_cms/4.01_MOA/iaik_cms-4.01_MOA.pom b/repository/iaik/prod/iaik_cms/4.01_MOA/iaik_cms-4.01_MOA.pom
new file mode 100644
index 000000000..c4920ae4a
--- /dev/null
+++ b/repository/iaik/prod/iaik_cms/4.01_MOA/iaik_cms-4.01_MOA.pom
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?><project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_cms</artifactId>
+ <version>4.01_MOA</version>
+</project> \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_cms/4.01_MOA/iaik_cms-4.01_MOA.pom.md5 b/repository/iaik/prod/iaik_cms/4.01_MOA/iaik_cms-4.01_MOA.pom.md5
new file mode 100644
index 000000000..3894d9d06
--- /dev/null
+++ b/repository/iaik/prod/iaik_cms/4.01_MOA/iaik_cms-4.01_MOA.pom.md5
@@ -0,0 +1 @@
+1bb62e794f864f86e5d97e563d1800bf \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_cms/4.01_MOA/iaik_cms-4.01_MOA.pom.sha1 b/repository/iaik/prod/iaik_cms/4.01_MOA/iaik_cms-4.01_MOA.pom.sha1
new file mode 100644
index 000000000..189f21722
--- /dev/null
+++ b/repository/iaik/prod/iaik_cms/4.01_MOA/iaik_cms-4.01_MOA.pom.sha1
@@ -0,0 +1 @@
+fc1b35563e2fa452a82e5f9c5b474cad7f1dc397 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_cms/4.1_MOA/iaik_cms-4.1_MOA.jar b/repository/iaik/prod/iaik_cms/4.1_MOA/iaik_cms-4.1_MOA.jar
new file mode 100644
index 000000000..8d41ba860
--- /dev/null
+++ b/repository/iaik/prod/iaik_cms/4.1_MOA/iaik_cms-4.1_MOA.jar
Binary files differ
diff --git a/repository/iaik/prod/iaik_cms/4.1_MOA/iaik_cms-4.1_MOA.pom b/repository/iaik/prod/iaik_cms/4.1_MOA/iaik_cms-4.1_MOA.pom
new file mode 100644
index 000000000..19c21e912
--- /dev/null
+++ b/repository/iaik/prod/iaik_cms/4.1_MOA/iaik_cms-4.1_MOA.pom
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?><project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_cms</artifactId>
+ <version>4.1_MOA</version>
+</project> \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_cms/maven-metadata.xml b/repository/iaik/prod/iaik_cms/maven-metadata.xml
new file mode 100644
index 000000000..4a224aeab
--- /dev/null
+++ b/repository/iaik/prod/iaik_cms/maven-metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?><metadata>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_cms</artifactId>
+ <version>4.1_MOA</version>
+ <versioning>
+ <latest>4.1_MOA</latest>
+ <release>4.1_MOA</release>
+ <versions>
+ <version>4.0_MOA</version>
+ <version>4.01_MOA</version>
+ <version>4.1_MOA</version>
+ </versions>
+ <lastUpdated>20080423102941</lastUpdated>
+ </versioning>
+</metadata> \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_cms/maven-metadata.xml.md5 b/repository/iaik/prod/iaik_cms/maven-metadata.xml.md5
new file mode 100644
index 000000000..1f58dd010
--- /dev/null
+++ b/repository/iaik/prod/iaik_cms/maven-metadata.xml.md5
@@ -0,0 +1 @@
+30452431e6acf5bed6bf0de642cfbb08 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_cms/maven-metadata.xml.sha1 b/repository/iaik/prod/iaik_cms/maven-metadata.xml.sha1
new file mode 100644
index 000000000..a5bf93f24
--- /dev/null
+++ b/repository/iaik/prod/iaik_cms/maven-metadata.xml.sha1
@@ -0,0 +1 @@
+8c86bee231af867a59c6a2698d54d336e8c3e2cf \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_ecc/2.16/iaik_ecc-2.16.jar b/repository/iaik/prod/iaik_ecc/2.16/iaik_ecc-2.16.jar
new file mode 100644
index 000000000..3c44d1860
--- /dev/null
+++ b/repository/iaik/prod/iaik_ecc/2.16/iaik_ecc-2.16.jar
Binary files differ
diff --git a/repository/iaik/prod/iaik_ecc/2.16/iaik_ecc-2.16.jar.md5 b/repository/iaik/prod/iaik_ecc/2.16/iaik_ecc-2.16.jar.md5
new file mode 100644
index 000000000..e2100d240
--- /dev/null
+++ b/repository/iaik/prod/iaik_ecc/2.16/iaik_ecc-2.16.jar.md5
@@ -0,0 +1 @@
+23cce9b0aab94023b41e4b35a384950f \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_ecc/2.16/iaik_ecc-2.16.jar.sha1 b/repository/iaik/prod/iaik_ecc/2.16/iaik_ecc-2.16.jar.sha1
new file mode 100644
index 000000000..dedf4fc96
--- /dev/null
+++ b/repository/iaik/prod/iaik_ecc/2.16/iaik_ecc-2.16.jar.sha1
@@ -0,0 +1 @@
+7ae072416c4aaf58d409776109e5391fa80f8b0f \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_ecc/2.16/iaik_ecc-2.16.pom b/repository/iaik/prod/iaik_ecc/2.16/iaik_ecc-2.16.pom
new file mode 100644
index 000000000..8d663a505
--- /dev/null
+++ b/repository/iaik/prod/iaik_ecc/2.16/iaik_ecc-2.16.pom
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?><project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_ecc</artifactId>
+ <version>2.16</version>
+</project> \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_ecc/2.16/iaik_ecc-2.16.pom.md5 b/repository/iaik/prod/iaik_ecc/2.16/iaik_ecc-2.16.pom.md5
new file mode 100644
index 000000000..0acca79de
--- /dev/null
+++ b/repository/iaik/prod/iaik_ecc/2.16/iaik_ecc-2.16.pom.md5
@@ -0,0 +1 @@
+7103828b2e03b16490af4e732e5c1fe1 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_ecc/2.16/iaik_ecc-2.16.pom.sha1 b/repository/iaik/prod/iaik_ecc/2.16/iaik_ecc-2.16.pom.sha1
new file mode 100644
index 000000000..6261a8b4b
--- /dev/null
+++ b/repository/iaik/prod/iaik_ecc/2.16/iaik_ecc-2.16.pom.sha1
@@ -0,0 +1 @@
+8fd2d71d9861c9967f00fefaee43e0dd667bf973 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_ecc/2.19/iaik_ecc-2.19.jar b/repository/iaik/prod/iaik_ecc/2.19/iaik_ecc-2.19.jar
new file mode 100644
index 000000000..abe38aea9
--- /dev/null
+++ b/repository/iaik/prod/iaik_ecc/2.19/iaik_ecc-2.19.jar
Binary files differ
diff --git a/repository/iaik/prod/iaik_ecc/2.19/iaik_ecc-2.19.jar.md5 b/repository/iaik/prod/iaik_ecc/2.19/iaik_ecc-2.19.jar.md5
new file mode 100644
index 000000000..c19d0dc21
--- /dev/null
+++ b/repository/iaik/prod/iaik_ecc/2.19/iaik_ecc-2.19.jar.md5
@@ -0,0 +1 @@
+49E8F35B0F97BDAC499A974D4C0FEF60 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_ecc/2.19/iaik_ecc-2.19.jar.sha1 b/repository/iaik/prod/iaik_ecc/2.19/iaik_ecc-2.19.jar.sha1
new file mode 100644
index 000000000..301e53e3b
--- /dev/null
+++ b/repository/iaik/prod/iaik_ecc/2.19/iaik_ecc-2.19.jar.sha1
@@ -0,0 +1 @@
+9BC26B101CF5EA86E060039E6DF16F2DF0C2FEE1 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_ecc/2.19/iaik_ecc-2.19.pom b/repository/iaik/prod/iaik_ecc/2.19/iaik_ecc-2.19.pom
new file mode 100644
index 000000000..c8036e4e5
--- /dev/null
+++ b/repository/iaik/prod/iaik_ecc/2.19/iaik_ecc-2.19.pom
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?><project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_ecc</artifactId>
+ <version>2.19</version>
+</project> \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_ecc/2.19/iaik_ecc-2.19.pom.md5 b/repository/iaik/prod/iaik_ecc/2.19/iaik_ecc-2.19.pom.md5
new file mode 100644
index 000000000..c9eef1446
--- /dev/null
+++ b/repository/iaik/prod/iaik_ecc/2.19/iaik_ecc-2.19.pom.md5
@@ -0,0 +1 @@
+9A65E9A0DD6A3F4A60C0150097BA7A5A \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_ecc/2.19/iaik_ecc-2.19.pom.sha1 b/repository/iaik/prod/iaik_ecc/2.19/iaik_ecc-2.19.pom.sha1
new file mode 100644
index 000000000..77924b025
--- /dev/null
+++ b/repository/iaik/prod/iaik_ecc/2.19/iaik_ecc-2.19.pom.sha1
@@ -0,0 +1 @@
+8B852574CD8BF31023E398B8E3B3FE868DF9AD85 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_ecc/maven-metadata.xml b/repository/iaik/prod/iaik_ecc/maven-metadata.xml
new file mode 100644
index 000000000..282aef69f
--- /dev/null
+++ b/repository/iaik/prod/iaik_ecc/maven-metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?><metadata>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_ecc</artifactId>
+ <version>2.19</version>
+ <versioning>
+ <versions>
+ <version>2.16</version>
+ <version>2.19</version>
+ </versions>
+ <lastUpdated>20090810102119</lastUpdated>
+ </versioning>
+</metadata> \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_ecc/maven-metadata.xml.md5 b/repository/iaik/prod/iaik_ecc/maven-metadata.xml.md5
new file mode 100644
index 000000000..656260f63
--- /dev/null
+++ b/repository/iaik/prod/iaik_ecc/maven-metadata.xml.md5
@@ -0,0 +1 @@
+B8CD86C18E600501E61BF894541B7586 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_ecc/maven-metadata.xml.sha1 b/repository/iaik/prod/iaik_ecc/maven-metadata.xml.sha1
new file mode 100644
index 000000000..249da60ef
--- /dev/null
+++ b/repository/iaik/prod/iaik_ecc/maven-metadata.xml.sha1
@@ -0,0 +1 @@
+91186D742AC2B54960AD0C6A9293DBCAD5CE7D47 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_ixsil/1.2.2.3/iaik_ixsil-1.2.2.3.jar b/repository/iaik/prod/iaik_ixsil/1.2.2.3/iaik_ixsil-1.2.2.3.jar
new file mode 100644
index 000000000..58f082dfb
--- /dev/null
+++ b/repository/iaik/prod/iaik_ixsil/1.2.2.3/iaik_ixsil-1.2.2.3.jar
Binary files differ
diff --git a/repository/iaik/prod/iaik_ixsil/1.2.2.3/iaik_ixsil-1.2.2.3.jar.md5 b/repository/iaik/prod/iaik_ixsil/1.2.2.3/iaik_ixsil-1.2.2.3.jar.md5
new file mode 100644
index 000000000..f32005a5c
--- /dev/null
+++ b/repository/iaik/prod/iaik_ixsil/1.2.2.3/iaik_ixsil-1.2.2.3.jar.md5
@@ -0,0 +1 @@
+96685dec785418dfce238865f660d5d8 *iaik_ixsil-1.2.2.3.jar
diff --git a/repository/iaik/prod/iaik_ixsil/1.2.2.3/iaik_ixsil-1.2.2.3.jar.sha1 b/repository/iaik/prod/iaik_ixsil/1.2.2.3/iaik_ixsil-1.2.2.3.jar.sha1
new file mode 100644
index 000000000..bf504fdea
--- /dev/null
+++ b/repository/iaik/prod/iaik_ixsil/1.2.2.3/iaik_ixsil-1.2.2.3.jar.sha1
@@ -0,0 +1 @@
+b8917856afa3013a6cfd46d2f228c87fad337b61
diff --git a/repository/iaik/prod/iaik_ixsil/1.2.2.3/iaik_ixsil-1.2.2.3.pom b/repository/iaik/prod/iaik_ixsil/1.2.2.3/iaik_ixsil-1.2.2.3.pom
new file mode 100644
index 000000000..dc7922545
--- /dev/null
+++ b/repository/iaik/prod/iaik_ixsil/1.2.2.3/iaik_ixsil-1.2.2.3.pom
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?><project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_ixsil</artifactId>
+ <version>1.2.2.3</version>
+ <description>POM was created from install:install-file</description>
+</project> \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_ixsil/1.2.2.3/iaik_ixsil-1.2.2.3.pom.md5 b/repository/iaik/prod/iaik_ixsil/1.2.2.3/iaik_ixsil-1.2.2.3.pom.md5
new file mode 100644
index 000000000..820509786
--- /dev/null
+++ b/repository/iaik/prod/iaik_ixsil/1.2.2.3/iaik_ixsil-1.2.2.3.pom.md5
@@ -0,0 +1 @@
+9ca977ce70b35388fba69bddae7c2f6b \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_ixsil/1.2.2.3/iaik_ixsil-1.2.2.3.pom.sha1 b/repository/iaik/prod/iaik_ixsil/1.2.2.3/iaik_ixsil-1.2.2.3.pom.sha1
new file mode 100644
index 000000000..90e7e8781
--- /dev/null
+++ b/repository/iaik/prod/iaik_ixsil/1.2.2.3/iaik_ixsil-1.2.2.3.pom.sha1
@@ -0,0 +1 @@
+16a7b5564a57458af2b469a8f38d161bd403d34c \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_ixsil/1.2.2.4/iaik_ixsil-1.2.2.4.jar b/repository/iaik/prod/iaik_ixsil/1.2.2.4/iaik_ixsil-1.2.2.4.jar
new file mode 100644
index 000000000..bda9f05bd
--- /dev/null
+++ b/repository/iaik/prod/iaik_ixsil/1.2.2.4/iaik_ixsil-1.2.2.4.jar
Binary files differ
diff --git a/repository/iaik/prod/iaik_ixsil/1.2.2.4/iaik_ixsil-1.2.2.4.jar.md5 b/repository/iaik/prod/iaik_ixsil/1.2.2.4/iaik_ixsil-1.2.2.4.jar.md5
new file mode 100644
index 000000000..a9e0071d8
--- /dev/null
+++ b/repository/iaik/prod/iaik_ixsil/1.2.2.4/iaik_ixsil-1.2.2.4.jar.md5
@@ -0,0 +1 @@
+a14e509ffd1336f5428943c1a4600915 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_ixsil/1.2.2.4/iaik_ixsil-1.2.2.4.jar.sha1 b/repository/iaik/prod/iaik_ixsil/1.2.2.4/iaik_ixsil-1.2.2.4.jar.sha1
new file mode 100644
index 000000000..514dbcde4
--- /dev/null
+++ b/repository/iaik/prod/iaik_ixsil/1.2.2.4/iaik_ixsil-1.2.2.4.jar.sha1
@@ -0,0 +1 @@
+46d39b070e41a410ab42463815f4a93b028bd6f2 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_ixsil/1.2.2.4/iaik_ixsil-1.2.2.4.pom b/repository/iaik/prod/iaik_ixsil/1.2.2.4/iaik_ixsil-1.2.2.4.pom
new file mode 100644
index 000000000..f4791bd3e
--- /dev/null
+++ b/repository/iaik/prod/iaik_ixsil/1.2.2.4/iaik_ixsil-1.2.2.4.pom
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?><project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_ixsil</artifactId>
+ <version>1.2.2.4</version>
+ <description>POM was created from install:install-file</description>
+</project> \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_ixsil/1.2.2.4/iaik_ixsil-1.2.2.4.pom.md5 b/repository/iaik/prod/iaik_ixsil/1.2.2.4/iaik_ixsil-1.2.2.4.pom.md5
new file mode 100644
index 000000000..95c95a01e
--- /dev/null
+++ b/repository/iaik/prod/iaik_ixsil/1.2.2.4/iaik_ixsil-1.2.2.4.pom.md5
@@ -0,0 +1 @@
+88c888e60510bddbe74e5741c74927bb \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_ixsil/1.2.2.4/iaik_ixsil-1.2.2.4.pom.sha1 b/repository/iaik/prod/iaik_ixsil/1.2.2.4/iaik_ixsil-1.2.2.4.pom.sha1
new file mode 100644
index 000000000..9867a2ea2
--- /dev/null
+++ b/repository/iaik/prod/iaik_ixsil/1.2.2.4/iaik_ixsil-1.2.2.4.pom.sha1
@@ -0,0 +1 @@
+3f376fb5988f665e099e3364567654df766d1a6c \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_ixsil/maven-metadata-MOA.xml b/repository/iaik/prod/iaik_ixsil/maven-metadata-MOA.xml
new file mode 100644
index 000000000..f33956525
--- /dev/null
+++ b/repository/iaik/prod/iaik_ixsil/maven-metadata-MOA.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?><metadata>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_ixsil</artifactId>
+ <version>1.2.2.4</version>
+ <versioning>
+ <versions>
+ <version>1.2.2.3</version>
+ <version>1.2.2.4</version>
+ </versions>
+ <lastUpdated>20080911074320</lastUpdated>
+ </versioning>
+</metadata> \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_jce_full/3.16_MOA/iaik_jce_full-3.16_MOA.jar b/repository/iaik/prod/iaik_jce_full/3.16_MOA/iaik_jce_full-3.16_MOA.jar
new file mode 100644
index 000000000..4cb8ce274
--- /dev/null
+++ b/repository/iaik/prod/iaik_jce_full/3.16_MOA/iaik_jce_full-3.16_MOA.jar
Binary files differ
diff --git a/repository/iaik/prod/iaik_jce_full/3.16_MOA/iaik_jce_full-3.16_MOA.jar.md5 b/repository/iaik/prod/iaik_jce_full/3.16_MOA/iaik_jce_full-3.16_MOA.jar.md5
new file mode 100644
index 000000000..16c49ae10
--- /dev/null
+++ b/repository/iaik/prod/iaik_jce_full/3.16_MOA/iaik_jce_full-3.16_MOA.jar.md5
@@ -0,0 +1 @@
+eb3456b843ffe6a7f6bb0a96579fbc56 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_jce_full/3.16_MOA/iaik_jce_full-3.16_MOA.jar.sha1 b/repository/iaik/prod/iaik_jce_full/3.16_MOA/iaik_jce_full-3.16_MOA.jar.sha1
new file mode 100644
index 000000000..f001288ea
--- /dev/null
+++ b/repository/iaik/prod/iaik_jce_full/3.16_MOA/iaik_jce_full-3.16_MOA.jar.sha1
@@ -0,0 +1 @@
+9d6ed37423e93765e38fa8791278ba43d3e6c320 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_jce_full/3.16_MOA/iaik_jce_full-3.16_MOA.pom b/repository/iaik/prod/iaik_jce_full/3.16_MOA/iaik_jce_full-3.16_MOA.pom
new file mode 100644
index 000000000..ae3f8e03a
--- /dev/null
+++ b/repository/iaik/prod/iaik_jce_full/3.16_MOA/iaik_jce_full-3.16_MOA.pom
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?><project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_jce_full</artifactId>
+ <version>3.16_MOA</version>
+</project> \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_jce_full/3.16_MOA/iaik_jce_full-3.16_MOA.pom.md5 b/repository/iaik/prod/iaik_jce_full/3.16_MOA/iaik_jce_full-3.16_MOA.pom.md5
new file mode 100644
index 000000000..dacc772d7
--- /dev/null
+++ b/repository/iaik/prod/iaik_jce_full/3.16_MOA/iaik_jce_full-3.16_MOA.pom.md5
@@ -0,0 +1 @@
+c4474c1a43d0b50ebdafaebebb190c06 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_jce_full/3.16_MOA/iaik_jce_full-3.16_MOA.pom.sha1 b/repository/iaik/prod/iaik_jce_full/3.16_MOA/iaik_jce_full-3.16_MOA.pom.sha1
new file mode 100644
index 000000000..4f3bdee9b
--- /dev/null
+++ b/repository/iaik/prod/iaik_jce_full/3.16_MOA/iaik_jce_full-3.16_MOA.pom.sha1
@@ -0,0 +1 @@
+ba6cad038de86b5a0a726df0f7c95e1d99d7f5e7 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_jce_full/3.18_MOA/iaik_jce_full-3.18_MOA.jar b/repository/iaik/prod/iaik_jce_full/3.18_MOA/iaik_jce_full-3.18_MOA.jar
new file mode 100644
index 000000000..4a0aa89c7
--- /dev/null
+++ b/repository/iaik/prod/iaik_jce_full/3.18_MOA/iaik_jce_full-3.18_MOA.jar
Binary files differ
diff --git a/repository/iaik/prod/iaik_jce_full/3.18_MOA/iaik_jce_full-3.18_MOA.jar.md5 b/repository/iaik/prod/iaik_jce_full/3.18_MOA/iaik_jce_full-3.18_MOA.jar.md5
new file mode 100644
index 000000000..656260f63
--- /dev/null
+++ b/repository/iaik/prod/iaik_jce_full/3.18_MOA/iaik_jce_full-3.18_MOA.jar.md5
@@ -0,0 +1 @@
+B8CD86C18E600501E61BF894541B7586 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_jce_full/3.18_MOA/iaik_jce_full-3.18_MOA.jar.sha1 b/repository/iaik/prod/iaik_jce_full/3.18_MOA/iaik_jce_full-3.18_MOA.jar.sha1
new file mode 100644
index 000000000..594674c0e
--- /dev/null
+++ b/repository/iaik/prod/iaik_jce_full/3.18_MOA/iaik_jce_full-3.18_MOA.jar.sha1
@@ -0,0 +1 @@
+EC96520B6269A0D38788DF0A259B9C09E3FCC9E3 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_jce_full/3.18_MOA/iaik_jce_full-3.18_MOA.pom b/repository/iaik/prod/iaik_jce_full/3.18_MOA/iaik_jce_full-3.18_MOA.pom
new file mode 100644
index 000000000..5fef87d52
--- /dev/null
+++ b/repository/iaik/prod/iaik_jce_full/3.18_MOA/iaik_jce_full-3.18_MOA.pom
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?><project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_jce_full</artifactId>
+ <version>3.18_MOA</version>
+</project> \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_jce_full/3.18_MOA/iaik_jce_full-3.18_MOA.pom.md5 b/repository/iaik/prod/iaik_jce_full/3.18_MOA/iaik_jce_full-3.18_MOA.pom.md5
new file mode 100644
index 000000000..3520099ae
--- /dev/null
+++ b/repository/iaik/prod/iaik_jce_full/3.18_MOA/iaik_jce_full-3.18_MOA.pom.md5
@@ -0,0 +1 @@
+98B885777FB5879B69DA1237B4D8FA27 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_jce_full/3.18_MOA/iaik_jce_full-3.18_MOA.pom.sha1 b/repository/iaik/prod/iaik_jce_full/3.18_MOA/iaik_jce_full-3.18_MOA.pom.sha1
new file mode 100644
index 000000000..d18c1dcce
--- /dev/null
+++ b/repository/iaik/prod/iaik_jce_full/3.18_MOA/iaik_jce_full-3.18_MOA.pom.sha1
@@ -0,0 +1 @@
+3B91CD08B81AEBF56AE12E440B8D339C2B8C4D0A \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_jce_full/4.0_MOA/iaik_jce_full-4.0_MOA.jar b/repository/iaik/prod/iaik_jce_full/4.0_MOA/iaik_jce_full-4.0_MOA.jar
new file mode 100644
index 000000000..bacb70edc
--- /dev/null
+++ b/repository/iaik/prod/iaik_jce_full/4.0_MOA/iaik_jce_full-4.0_MOA.jar
Binary files differ
diff --git a/repository/iaik/prod/iaik_jce_full/4.0_MOA/iaik_jce_full-4.0_MOA.pom b/repository/iaik/prod/iaik_jce_full/4.0_MOA/iaik_jce_full-4.0_MOA.pom
new file mode 100644
index 000000000..9610b3951
--- /dev/null
+++ b/repository/iaik/prod/iaik_jce_full/4.0_MOA/iaik_jce_full-4.0_MOA.pom
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?><project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_jce_full</artifactId>
+ <version>4.0_MOA</version>
+</project> \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_jce_full/maven-metadata-central.xml b/repository/iaik/prod/iaik_jce_full/maven-metadata-central.xml
new file mode 100644
index 000000000..2726eb212
--- /dev/null
+++ b/repository/iaik/prod/iaik_jce_full/maven-metadata-central.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?><metadata>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_jce_full</artifactId>
+ <version>4.0_MOA</version>
+ <versioning>
+ <latest>4.0_MOA</latest>
+ <release>3.18_MOA</release>
+ <versions>
+ <version>3.16_MOA</version>
+ <version>3.18_MOA</version>
+ <version>4.0_MOA</version>
+ </versions>
+ <lastUpdated>20090810170702</lastUpdated>
+ </versioning>
+</metadata>
diff --git a/repository/iaik/prod/iaik_jce_full/maven-metadata-central.xml.md5 b/repository/iaik/prod/iaik_jce_full/maven-metadata-central.xml.md5
new file mode 100644
index 000000000..a082884f6
--- /dev/null
+++ b/repository/iaik/prod/iaik_jce_full/maven-metadata-central.xml.md5
@@ -0,0 +1 @@
+4E7942E0F03220DD1C714F60820A6AF9 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_jce_full/maven-metadata-central.xml.sha1 b/repository/iaik/prod/iaik_jce_full/maven-metadata-central.xml.sha1
new file mode 100644
index 000000000..6f28ac366
--- /dev/null
+++ b/repository/iaik/prod/iaik_jce_full/maven-metadata-central.xml.sha1
@@ -0,0 +1 @@
+FEFB307B398FCF96B534438422E03806BF18DBC5 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_jce_full/maven-metadata.xml b/repository/iaik/prod/iaik_jce_full/maven-metadata.xml
new file mode 100644
index 000000000..f3091eb4f
--- /dev/null
+++ b/repository/iaik/prod/iaik_jce_full/maven-metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?><metadata>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_jce_full</artifactId>
+ <version>4.0_MOA</version>
+ <versioning>
+ <latest>4.0_MOA</latest>
+ <release>4.0_MOA</release>
+ <versions>
+ <version>3.16_MOA</version>
+ <version>3.18_MOA</version>
+ <version>4.0_MOA</version>
+ </versions>
+ <lastUpdated>20090810170702</lastUpdated>
+ </versioning>
+</metadata>
diff --git a/repository/iaik/prod/iaik_jce_full/maven-metadata.xml.md5 b/repository/iaik/prod/iaik_jce_full/maven-metadata.xml.md5
new file mode 100644
index 000000000..a082884f6
--- /dev/null
+++ b/repository/iaik/prod/iaik_jce_full/maven-metadata.xml.md5
@@ -0,0 +1 @@
+4E7942E0F03220DD1C714F60820A6AF9 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_jce_full/maven-metadata.xml.sha1 b/repository/iaik/prod/iaik_jce_full/maven-metadata.xml.sha1
new file mode 100644
index 000000000..6f28ac366
--- /dev/null
+++ b/repository/iaik/prod/iaik_jce_full/maven-metadata.xml.sha1
@@ -0,0 +1 @@
+FEFB307B398FCF96B534438422E03806BF18DBC5 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_moa/1.23/iaik_moa-1.23.jar b/repository/iaik/prod/iaik_moa/1.23/iaik_moa-1.23.jar
new file mode 100644
index 000000000..fba7fde77
--- /dev/null
+++ b/repository/iaik/prod/iaik_moa/1.23/iaik_moa-1.23.jar
Binary files differ
diff --git a/repository/iaik/prod/iaik_moa/1.23/iaik_moa-1.23.jar.md5 b/repository/iaik/prod/iaik_moa/1.23/iaik_moa-1.23.jar.md5
new file mode 100644
index 000000000..2355476d5
--- /dev/null
+++ b/repository/iaik/prod/iaik_moa/1.23/iaik_moa-1.23.jar.md5
@@ -0,0 +1 @@
+a947a334136d608e7b519b4214333c27 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_moa/1.23/iaik_moa-1.23.jar.sha1 b/repository/iaik/prod/iaik_moa/1.23/iaik_moa-1.23.jar.sha1
new file mode 100644
index 000000000..04a4e73d8
--- /dev/null
+++ b/repository/iaik/prod/iaik_moa/1.23/iaik_moa-1.23.jar.sha1
@@ -0,0 +1 @@
+9212660edcd77ad844069b9e334074f8af5cada2 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_moa/1.23/iaik_moa-1.23.pom b/repository/iaik/prod/iaik_moa/1.23/iaik_moa-1.23.pom
new file mode 100644
index 000000000..1230c7915
--- /dev/null
+++ b/repository/iaik/prod/iaik_moa/1.23/iaik_moa-1.23.pom
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?><project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_moa</artifactId>
+ <version>1.23</version>
+</project> \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_moa/1.23/iaik_moa-1.23.pom.md5 b/repository/iaik/prod/iaik_moa/1.23/iaik_moa-1.23.pom.md5
new file mode 100644
index 000000000..922df4439
--- /dev/null
+++ b/repository/iaik/prod/iaik_moa/1.23/iaik_moa-1.23.pom.md5
@@ -0,0 +1 @@
+3a1ed73f234e7cce43769eb35ef3a3d6 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_moa/1.23/iaik_moa-1.23.pom.sha1 b/repository/iaik/prod/iaik_moa/1.23/iaik_moa-1.23.pom.sha1
new file mode 100644
index 000000000..cf6a691bb
--- /dev/null
+++ b/repository/iaik/prod/iaik_moa/1.23/iaik_moa-1.23.pom.sha1
@@ -0,0 +1 @@
+a8d15530dbfea7443f2f8e1eea07388cc7b98d97 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_moa/1.24/iaik_moa-1.24.jar b/repository/iaik/prod/iaik_moa/1.24/iaik_moa-1.24.jar
new file mode 100644
index 000000000..afc65d15d
--- /dev/null
+++ b/repository/iaik/prod/iaik_moa/1.24/iaik_moa-1.24.jar
Binary files differ
diff --git a/repository/iaik/prod/iaik_moa/1.24/iaik_moa-1.24.jar.md5 b/repository/iaik/prod/iaik_moa/1.24/iaik_moa-1.24.jar.md5
new file mode 100644
index 000000000..6635b65a9
--- /dev/null
+++ b/repository/iaik/prod/iaik_moa/1.24/iaik_moa-1.24.jar.md5
@@ -0,0 +1 @@
+b650ef016f467c14c9eb324426da1bb0 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_moa/1.24/iaik_moa-1.24.jar.sha1 b/repository/iaik/prod/iaik_moa/1.24/iaik_moa-1.24.jar.sha1
new file mode 100644
index 000000000..951fd3373
--- /dev/null
+++ b/repository/iaik/prod/iaik_moa/1.24/iaik_moa-1.24.jar.sha1
@@ -0,0 +1 @@
+bb5b1e76f8f15890daa92268d870b9a479771d6d \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_moa/1.24/iaik_moa-1.24.pom b/repository/iaik/prod/iaik_moa/1.24/iaik_moa-1.24.pom
new file mode 100644
index 000000000..5b274e9c9
--- /dev/null
+++ b/repository/iaik/prod/iaik_moa/1.24/iaik_moa-1.24.pom
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?><project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_moa</artifactId>
+ <version>1.24</version>
+ <description>POM was created from install:install-file</description>
+</project> \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_moa/1.24/iaik_moa-1.24.pom.md5 b/repository/iaik/prod/iaik_moa/1.24/iaik_moa-1.24.pom.md5
new file mode 100644
index 000000000..4a8e46e2b
--- /dev/null
+++ b/repository/iaik/prod/iaik_moa/1.24/iaik_moa-1.24.pom.md5
@@ -0,0 +1 @@
+70403182e82cbed8ba878db087813cbc \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_moa/1.24/iaik_moa-1.24.pom.sha1 b/repository/iaik/prod/iaik_moa/1.24/iaik_moa-1.24.pom.sha1
new file mode 100644
index 000000000..d17b6a43d
--- /dev/null
+++ b/repository/iaik/prod/iaik_moa/1.24/iaik_moa-1.24.pom.sha1
@@ -0,0 +1 @@
+5d8db6c590778d2a4d277a9f802c05ed1ab12e07 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_moa/1.26/iaik_moa-1.26.jar b/repository/iaik/prod/iaik_moa/1.26/iaik_moa-1.26.jar
new file mode 100644
index 000000000..081b1de49
--- /dev/null
+++ b/repository/iaik/prod/iaik_moa/1.26/iaik_moa-1.26.jar
Binary files differ
diff --git a/repository/iaik/prod/iaik_moa/1.26/iaik_moa-1.26.jar.md5 b/repository/iaik/prod/iaik_moa/1.26/iaik_moa-1.26.jar.md5
new file mode 100644
index 000000000..733571ded
--- /dev/null
+++ b/repository/iaik/prod/iaik_moa/1.26/iaik_moa-1.26.jar.md5
@@ -0,0 +1 @@
+2DAE775314F1B40FA0FCEA54D8768280 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_moa/1.26/iaik_moa-1.26.jar.sha1 b/repository/iaik/prod/iaik_moa/1.26/iaik_moa-1.26.jar.sha1
new file mode 100644
index 000000000..a5afe4d9c
--- /dev/null
+++ b/repository/iaik/prod/iaik_moa/1.26/iaik_moa-1.26.jar.sha1
@@ -0,0 +1 @@
+BCA16470663CD25252BAF084FCE63BA6CC82A6F7 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_moa/1.26/iaik_moa-1.26.pom b/repository/iaik/prod/iaik_moa/1.26/iaik_moa-1.26.pom
new file mode 100644
index 000000000..e6d1c2263
--- /dev/null
+++ b/repository/iaik/prod/iaik_moa/1.26/iaik_moa-1.26.pom
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?><project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_moa</artifactId>
+ <version>1.26</version>
+ <description>POM was created from install:install-file</description>
+</project> \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_moa/1.26/iaik_moa-1.26.pom.md5 b/repository/iaik/prod/iaik_moa/1.26/iaik_moa-1.26.pom.md5
new file mode 100644
index 000000000..733571ded
--- /dev/null
+++ b/repository/iaik/prod/iaik_moa/1.26/iaik_moa-1.26.pom.md5
@@ -0,0 +1 @@
+2DAE775314F1B40FA0FCEA54D8768280 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_moa/1.26/iaik_moa-1.26.pom.sha1 b/repository/iaik/prod/iaik_moa/1.26/iaik_moa-1.26.pom.sha1
new file mode 100644
index 000000000..a5afe4d9c
--- /dev/null
+++ b/repository/iaik/prod/iaik_moa/1.26/iaik_moa-1.26.pom.sha1
@@ -0,0 +1 @@
+BCA16470663CD25252BAF084FCE63BA6CC82A6F7 \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_moa/1.27/iaik_moa-1.27.jar b/repository/iaik/prod/iaik_moa/1.27/iaik_moa-1.27.jar
new file mode 100644
index 000000000..0f4f153e1
--- /dev/null
+++ b/repository/iaik/prod/iaik_moa/1.27/iaik_moa-1.27.jar
Binary files differ
diff --git a/repository/iaik/prod/iaik_moa/1.28/iaik_moa-1.28.jar b/repository/iaik/prod/iaik_moa/1.28/iaik_moa-1.28.jar
new file mode 100644
index 000000000..15d117873
--- /dev/null
+++ b/repository/iaik/prod/iaik_moa/1.28/iaik_moa-1.28.jar
Binary files differ
diff --git a/repository/iaik/prod/iaik_moa/1.28/iaik_moa-1.28.pom b/repository/iaik/prod/iaik_moa/1.28/iaik_moa-1.28.pom
new file mode 100644
index 000000000..51b55a52f
--- /dev/null
+++ b/repository/iaik/prod/iaik_moa/1.28/iaik_moa-1.28.pom
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?><project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_moa</artifactId>
+ <version>1.28</version>
+</project> \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_moa/1.29/iaik_moa-1.29.jar b/repository/iaik/prod/iaik_moa/1.29/iaik_moa-1.29.jar
new file mode 100644
index 000000000..95a6773a6
--- /dev/null
+++ b/repository/iaik/prod/iaik_moa/1.29/iaik_moa-1.29.jar
Binary files differ
diff --git a/repository/iaik/prod/iaik_moa/1.29/iaik_moa-1.29.pom b/repository/iaik/prod/iaik_moa/1.29/iaik_moa-1.29.pom
new file mode 100644
index 000000000..e94fe3f49
--- /dev/null
+++ b/repository/iaik/prod/iaik_moa/1.29/iaik_moa-1.29.pom
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?><project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_moa</artifactId>
+ <version>1.29</version>
+</project> \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_moa/maven-metadata-MOA.xml b/repository/iaik/prod/iaik_moa/maven-metadata-MOA.xml
new file mode 100644
index 000000000..32e4aad37
--- /dev/null
+++ b/repository/iaik/prod/iaik_moa/maven-metadata-MOA.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?><metadata>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_moa</artifactId>
+ <version>1.28</version>
+ <versioning>
+ <versions>
+ <version>1.23</version>
+ <version>1.24</version>
+ <version>1.26</version>
+ <version>1.27</version>
+ <version>1.28</version>
+ <version>1.29</version>
+ </versions>
+ <lastUpdated>20090810074128</lastUpdated>
+ </versioning>
+</metadata> \ No newline at end of file
diff --git a/repository/iaik/prod/iaik_moa/maven-metadata-local.xml b/repository/iaik/prod/iaik_moa/maven-metadata-local.xml
new file mode 100644
index 000000000..ced753edc
--- /dev/null
+++ b/repository/iaik/prod/iaik_moa/maven-metadata-local.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_moa</artifactId>
+ <version>1.29</version>
+ <versioning>
+ <versions>
+ <version>1.29</version>
+ </versions>
+ <lastUpdated>20100618102247</lastUpdated>
+ </versioning>
+</metadata>
diff --git a/repository/xalan-bin-dist/serializer/2.7.0/serializer-2.7.0.jar b/repository/xalan-bin-dist/serializer/2.7.0/serializer-2.7.0.jar
new file mode 100644
index 000000000..7cd806964
--- /dev/null
+++ b/repository/xalan-bin-dist/serializer/2.7.0/serializer-2.7.0.jar
Binary files differ
diff --git a/repository/xalan-bin-dist/serializer/2.7.0/serializer-2.7.0.jar.md5 b/repository/xalan-bin-dist/serializer/2.7.0/serializer-2.7.0.jar.md5
new file mode 100644
index 000000000..42964c31e
--- /dev/null
+++ b/repository/xalan-bin-dist/serializer/2.7.0/serializer-2.7.0.jar.md5
@@ -0,0 +1 @@
+35aa6a56662458d9dc28a9b628f84847 \ No newline at end of file
diff --git a/repository/xalan-bin-dist/serializer/2.7.0/serializer-2.7.0.jar.sha1 b/repository/xalan-bin-dist/serializer/2.7.0/serializer-2.7.0.jar.sha1
new file mode 100644
index 000000000..8bcab225d
--- /dev/null
+++ b/repository/xalan-bin-dist/serializer/2.7.0/serializer-2.7.0.jar.sha1
@@ -0,0 +1 @@
+85ddd38e4cdbc22fb6c518f3d35744336da6fbfd \ No newline at end of file
diff --git a/repository/xalan-bin-dist/serializer/2.7.0/serializer-2.7.0.pom b/repository/xalan-bin-dist/serializer/2.7.0/serializer-2.7.0.pom
new file mode 100644
index 000000000..87bfdd006
--- /dev/null
+++ b/repository/xalan-bin-dist/serializer/2.7.0/serializer-2.7.0.pom
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?><project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>serializer</artifactId>
+ <version>2.7.0</version>
+</project> \ No newline at end of file
diff --git a/repository/xalan-bin-dist/serializer/2.7.0/serializer-2.7.0.pom.md5 b/repository/xalan-bin-dist/serializer/2.7.0/serializer-2.7.0.pom.md5
new file mode 100644
index 000000000..7b1cf9d6d
--- /dev/null
+++ b/repository/xalan-bin-dist/serializer/2.7.0/serializer-2.7.0.pom.md5
@@ -0,0 +1 @@
+b40d1a414676a4f358f157c6898664bb \ No newline at end of file
diff --git a/repository/xalan-bin-dist/serializer/2.7.0/serializer-2.7.0.pom.sha1 b/repository/xalan-bin-dist/serializer/2.7.0/serializer-2.7.0.pom.sha1
new file mode 100644
index 000000000..2ebd5256a
--- /dev/null
+++ b/repository/xalan-bin-dist/serializer/2.7.0/serializer-2.7.0.pom.sha1
@@ -0,0 +1 @@
+9e7770973422a62b4a3ae7ea5c20b6d06b463528 \ No newline at end of file
diff --git a/repository/xalan-bin-dist/serializer/maven-metadata.xml b/repository/xalan-bin-dist/serializer/maven-metadata.xml
new file mode 100644
index 000000000..3b2919728
--- /dev/null
+++ b/repository/xalan-bin-dist/serializer/maven-metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?><metadata>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>serializer</artifactId>
+ <version>2.7.0</version>
+ <versioning>
+ <versions>
+ <version>2.7.0</version>
+ </versions>
+ <lastUpdated>20070828113437</lastUpdated>
+ </versioning>
+</metadata> \ No newline at end of file
diff --git a/repository/xalan-bin-dist/serializer/maven-metadata.xml.md5 b/repository/xalan-bin-dist/serializer/maven-metadata.xml.md5
new file mode 100644
index 000000000..1e74cd099
--- /dev/null
+++ b/repository/xalan-bin-dist/serializer/maven-metadata.xml.md5
@@ -0,0 +1 @@
+618746ccbd308489eec0a5f6ceafb565 \ No newline at end of file
diff --git a/repository/xalan-bin-dist/serializer/maven-metadata.xml.sha1 b/repository/xalan-bin-dist/serializer/maven-metadata.xml.sha1
new file mode 100644
index 000000000..4463aea5b
--- /dev/null
+++ b/repository/xalan-bin-dist/serializer/maven-metadata.xml.sha1
@@ -0,0 +1 @@
+de784579e439fb38440facdd43d70c159434cc44 \ No newline at end of file
diff --git a/repository/xalan-bin-dist/xalan/2.7.0/xalan-2.7.0.jar b/repository/xalan-bin-dist/xalan/2.7.0/xalan-2.7.0.jar
new file mode 100644
index 000000000..979ee761c
--- /dev/null
+++ b/repository/xalan-bin-dist/xalan/2.7.0/xalan-2.7.0.jar
Binary files differ
diff --git a/repository/xalan-bin-dist/xalan/2.7.0/xalan-2.7.0.jar.md5 b/repository/xalan-bin-dist/xalan/2.7.0/xalan-2.7.0.jar.md5
new file mode 100644
index 000000000..5a623f9d2
--- /dev/null
+++ b/repository/xalan-bin-dist/xalan/2.7.0/xalan-2.7.0.jar.md5
@@ -0,0 +1 @@
+126c0c876a6b9726cfdd43f052923660 \ No newline at end of file
diff --git a/repository/xalan-bin-dist/xalan/2.7.0/xalan-2.7.0.jar.sha1 b/repository/xalan-bin-dist/xalan/2.7.0/xalan-2.7.0.jar.sha1
new file mode 100644
index 000000000..c8b946d9e
--- /dev/null
+++ b/repository/xalan-bin-dist/xalan/2.7.0/xalan-2.7.0.jar.sha1
@@ -0,0 +1 @@
+10f170da8dfbcdcc4098131ba773710f0ba7aef1 \ No newline at end of file
diff --git a/repository/xalan-bin-dist/xalan/2.7.0/xalan-2.7.0.pom b/repository/xalan-bin-dist/xalan/2.7.0/xalan-2.7.0.pom
new file mode 100644
index 000000000..a957201e4
--- /dev/null
+++ b/repository/xalan-bin-dist/xalan/2.7.0/xalan-2.7.0.pom
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?><project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>xalan</artifactId>
+ <version>2.7.0</version>
+</project> \ No newline at end of file
diff --git a/repository/xalan-bin-dist/xalan/2.7.0/xalan-2.7.0.pom.md5 b/repository/xalan-bin-dist/xalan/2.7.0/xalan-2.7.0.pom.md5
new file mode 100644
index 000000000..892d7635e
--- /dev/null
+++ b/repository/xalan-bin-dist/xalan/2.7.0/xalan-2.7.0.pom.md5
@@ -0,0 +1 @@
+fb90bb055826496abcc3bdbd07c78088 \ No newline at end of file
diff --git a/repository/xalan-bin-dist/xalan/2.7.0/xalan-2.7.0.pom.sha1 b/repository/xalan-bin-dist/xalan/2.7.0/xalan-2.7.0.pom.sha1
new file mode 100644
index 000000000..a0286a312
--- /dev/null
+++ b/repository/xalan-bin-dist/xalan/2.7.0/xalan-2.7.0.pom.sha1
@@ -0,0 +1 @@
+c58c98128a376191f6ddcd88b29c4adcd0f59dfb \ No newline at end of file
diff --git a/repository/xalan-bin-dist/xalan/maven-metadata.xml b/repository/xalan-bin-dist/xalan/maven-metadata.xml
new file mode 100644
index 000000000..8564c8faa
--- /dev/null
+++ b/repository/xalan-bin-dist/xalan/maven-metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?><metadata>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>xalan</artifactId>
+ <version>2.7.0</version>
+ <versioning>
+ <versions>
+ <version>2.7.0</version>
+ </versions>
+ <lastUpdated>20070828063912</lastUpdated>
+ </versioning>
+</metadata> \ No newline at end of file
diff --git a/repository/xalan-bin-dist/xalan/maven-metadata.xml.md5 b/repository/xalan-bin-dist/xalan/maven-metadata.xml.md5
new file mode 100644
index 000000000..2dfacdcec
--- /dev/null
+++ b/repository/xalan-bin-dist/xalan/maven-metadata.xml.md5
@@ -0,0 +1 @@
+ed0190e78f5dfbd8bb0906fe3d62948e \ No newline at end of file
diff --git a/repository/xalan-bin-dist/xalan/maven-metadata.xml.sha1 b/repository/xalan-bin-dist/xalan/maven-metadata.xml.sha1
new file mode 100644
index 000000000..3b9fc56e6
--- /dev/null
+++ b/repository/xalan-bin-dist/xalan/maven-metadata.xml.sha1
@@ -0,0 +1 @@
+8ac861f6a88f53ac4807dd7de8d958d760165eaf \ No newline at end of file
diff --git a/repository/xalan-bin-dist/xml-apis/2.7.0/xml-apis-2.7.0.jar b/repository/xalan-bin-dist/xml-apis/2.7.0/xml-apis-2.7.0.jar
new file mode 100644
index 000000000..243eaeaeb
--- /dev/null
+++ b/repository/xalan-bin-dist/xml-apis/2.7.0/xml-apis-2.7.0.jar
Binary files differ
diff --git a/repository/xalan-bin-dist/xml-apis/2.7.0/xml-apis-2.7.0.jar.md5 b/repository/xalan-bin-dist/xml-apis/2.7.0/xml-apis-2.7.0.jar.md5
new file mode 100644
index 000000000..739ea21f7
--- /dev/null
+++ b/repository/xalan-bin-dist/xml-apis/2.7.0/xml-apis-2.7.0.jar.md5
@@ -0,0 +1 @@
+2e7aed876c51af3ee6a23ed524180d37 \ No newline at end of file
diff --git a/repository/xalan-bin-dist/xml-apis/2.7.0/xml-apis-2.7.0.jar.sha1 b/repository/xalan-bin-dist/xml-apis/2.7.0/xml-apis-2.7.0.jar.sha1
new file mode 100644
index 000000000..0916b2415
--- /dev/null
+++ b/repository/xalan-bin-dist/xml-apis/2.7.0/xml-apis-2.7.0.jar.sha1
@@ -0,0 +1 @@
+dc7315e359b5e43f20131414d60b5c307aace975 \ No newline at end of file
diff --git a/repository/xalan-bin-dist/xml-apis/2.7.0/xml-apis-2.7.0.pom b/repository/xalan-bin-dist/xml-apis/2.7.0/xml-apis-2.7.0.pom
new file mode 100644
index 000000000..152db2bdc
--- /dev/null
+++ b/repository/xalan-bin-dist/xml-apis/2.7.0/xml-apis-2.7.0.pom
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?><project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>xml-apis</artifactId>
+ <version>2.7.0</version>
+</project> \ No newline at end of file
diff --git a/repository/xalan-bin-dist/xml-apis/2.7.0/xml-apis-2.7.0.pom.md5 b/repository/xalan-bin-dist/xml-apis/2.7.0/xml-apis-2.7.0.pom.md5
new file mode 100644
index 000000000..b4ab1984a
--- /dev/null
+++ b/repository/xalan-bin-dist/xml-apis/2.7.0/xml-apis-2.7.0.pom.md5
@@ -0,0 +1 @@
+397393d2fed99f21295f9765db4daa39 \ No newline at end of file
diff --git a/repository/xalan-bin-dist/xml-apis/2.7.0/xml-apis-2.7.0.pom.sha1 b/repository/xalan-bin-dist/xml-apis/2.7.0/xml-apis-2.7.0.pom.sha1
new file mode 100644
index 000000000..af96bd0f0
--- /dev/null
+++ b/repository/xalan-bin-dist/xml-apis/2.7.0/xml-apis-2.7.0.pom.sha1
@@ -0,0 +1 @@
+e05fa7c530c0d57a6727153144b099f9ac7bd3bf \ No newline at end of file
diff --git a/repository/xalan-bin-dist/xml-apis/maven-metadata.xml b/repository/xalan-bin-dist/xml-apis/maven-metadata.xml
new file mode 100644
index 000000000..97cbc7798
--- /dev/null
+++ b/repository/xalan-bin-dist/xml-apis/maven-metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?><metadata>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>xml-apis</artifactId>
+ <version>2.7.0</version>
+ <versioning>
+ <versions>
+ <version>2.7.0</version>
+ </versions>
+ <lastUpdated>20070828112349</lastUpdated>
+ </versioning>
+</metadata> \ No newline at end of file
diff --git a/repository/xalan-bin-dist/xml-apis/maven-metadata.xml.md5 b/repository/xalan-bin-dist/xml-apis/maven-metadata.xml.md5
new file mode 100644
index 000000000..59864b4b4
--- /dev/null
+++ b/repository/xalan-bin-dist/xml-apis/maven-metadata.xml.md5
@@ -0,0 +1 @@
+3b2a8867dbd3e9474a2ff3fce851d510 \ No newline at end of file
diff --git a/repository/xalan-bin-dist/xml-apis/maven-metadata.xml.sha1 b/repository/xalan-bin-dist/xml-apis/maven-metadata.xml.sha1
new file mode 100644
index 000000000..6ed6a1d39
--- /dev/null
+++ b/repository/xalan-bin-dist/xml-apis/maven-metadata.xml.sha1
@@ -0,0 +1 @@
+12d4a985dee1a1d5e9cbb524c83c2f5f8be5cd81 \ No newline at end of file
diff --git a/spss/assembly-lib.xml b/spss/assembly-lib.xml
new file mode 100644
index 000000000..5fb27b0f2
--- /dev/null
+++ b/spss/assembly-lib.xml
@@ -0,0 +1,157 @@
+<assembly>
+ <id>spss-${project.version}-lib</id>
+
+ <formats>
+ <format>dir</format>
+ <format>zip</format>
+ <format>tar.gz</format>
+ </formats>
+
+ <baseDirectory>moa-spss-lib-${project.version}</baseDirectory>
+
+ <moduleSets>
+ <moduleSet>
+ <includes>
+ <include>MOA.spss.server:moa-spss-lib</include>
+ </includes>
+ <binaries>
+ <includeDependencies>true</includeDependencies>
+ <dependencySets>
+ <dependencySet>
+ <includes>
+ <include>xalan-bin-dist:xalan</include>
+ <include>xerces:xercesImpl</include>
+ <include>xalan-bin-dist:xml-apis</include>
+ <include>xalan-bin-dist:serializer</include>
+ </includes>
+ <outputDirectory>/endorsed</outputDirectory>
+ <!-- strip version off the artifact file names -->
+ <outputFileNameMapping>${artifactId}.${extension}</outputFileNameMapping>
+ </dependencySet>
+ <dependencySet>
+ <includes>
+ <include>iaik.prod:iaik_ecc</include>
+ <include>iaik.prod:iaik_jce_full</include>
+ <include>iaik.prod:iaik_Pkcs11Provider</include>
+ <include>iaik.prod:iaik_Pkcs11Wrapper:jar</include>
+ </includes>
+ <outputDirectory>/ext</outputDirectory>
+ <!-- strip version off the artifact file names -->
+ <outputFileNameMapping>${artifactId}.${extension}</outputFileNameMapping>
+ </dependencySet>
+ <dependencySet>
+ <includes>
+ <include>MOA:moa-common</include>
+ </includes>
+ <outputDirectory>/</outputDirectory>
+ <!-- strip version off the artifact file names -->
+ <outputFileNameMapping>${artifactId}.${extension}</outputFileNameMapping>
+ </dependencySet>
+ <dependencySet>
+ <excludes>
+ <exclude>MOA:moa-common</exclude>
+ <exclude>xalan-bin-dist:xalan</exclude>
+ <exclude>xerces:xercesImpl</exclude>
+ <exclude>xalan-bin-dist:xml-apis</exclude>
+ <exclude>xalan-bin-dist:serializer</exclude>
+ <exclude>iaik.prod:iaik_ecc</exclude>
+ <exclude>iaik.prod:iaik_jce_full</exclude>
+ <exclude>iaik.prod:iaik_Pkcs11Provider</exclude>
+ <exclude>iaik.prod:iaik_Pkcs11Wrapper</exclude>
+ </excludes>
+ <outputDirectory>/lib</outputDirectory>
+ </dependencySet>
+ </dependencySets>
+ <outputFileNameMapping>moa-spss.${extension}</outputFileNameMapping>
+ <unpack>false</unpack>
+ </binaries>
+ </moduleSet>
+ <moduleSet>
+ <includes>
+ <include>MOA.spss.server:moa-spss-lib</include>
+ </includes>
+ <binaries>
+ <attachmentClassifier>javadoc</attachmentClassifier>
+ <includeDependencies>false</includeDependencies>
+ <outputFileNameMapping>api-doc</outputFileNameMapping>
+ <outputDirectory>/doc</outputDirectory>
+ <unpack>true</unpack>
+ </binaries>
+ </moduleSet>
+ <moduleSet>
+ <includes>
+ <include>MOA.spss.server:moa-spss-tools</include>
+ </includes>
+ <binaries>
+ <includeDependencies>true</includeDependencies>
+ <dependencySets>
+ <dependencySet>
+ <includes>
+ <include>iaik.prod:iaik_ecc</include>
+ <include>iaik.prod:iaik_jce_full</include>
+ <include>iaik.prod:iaik_moa</include>
+ <include>log4j:log4j</include>
+ <include>xalan-bin-dist:xalan</include>
+ </includes>
+ <outputDirectory>/tools</outputDirectory>
+ <!-- strip version off the artifact file names -->
+ <outputFileNameMapping>${artifactId}.${extension}</outputFileNameMapping>
+ </dependencySet>
+ </dependencySets>
+ <outputDirectory>/tools</outputDirectory>
+ <outputFileNameMapping>tools.${extension}</outputFileNameMapping>
+ <unpack>false</unpack>
+ </binaries>
+ </moduleSet>
+ </moduleSets>
+
+ <componentDescriptors>
+ <componentDescriptor>component-pkcs11libs.xml</componentDescriptor>
+ </componentDescriptors>
+
+ <files>
+ <file>
+ <source>${basedir}/spss/handbook/handbook.html</source>
+ <outputDirectory>/doc</outputDirectory>
+ </file>
+ </files>
+
+ <fileSets>
+ <fileSet>
+ <directory>${basedir}/spss/server</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>*.txt</include>
+ </includes>
+ <excludes>
+ <exclude>readme.src.txt</exclude>
+ </excludes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/spss/handbook/conf</directory>
+ <outputDirectory>/conf</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/spss/handbook/handbook</directory>
+ <outputDirectory>/doc/handbook</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/spss/handbook/clients</directory>
+ <outputDirectory>/doc/clients</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>LICENSE-2.0.txt</include>
+ <include>NOTICE.txt</include>
+ <include>IAIK-LICENSE.txt</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/spss/server/tools/src/main/scripts</directory>
+ <outputDirectory>/tools</outputDirectory>
+ </fileSet>
+ </fileSets>
+
+</assembly>
diff --git a/spss/assembly.xml b/spss/assembly.xml
new file mode 100644
index 000000000..9c959ad06
--- /dev/null
+++ b/spss/assembly.xml
@@ -0,0 +1,143 @@
+<assembly>
+ <id>spss-${project.version}</id>
+
+ <formats>
+ <format>dir</format>
+ <format>zip</format>
+ <format>tar.gz</format>
+ </formats>
+
+ <baseDirectory>moa-spss-${project.version}</baseDirectory>
+
+ <moduleSets>
+ <moduleSet>
+ <includes>
+ <include>MOA.spss.server:moa-spss-ws</include>
+ </includes>
+ <binaries>
+ <includeDependencies>true</includeDependencies>
+ <dependencySets>
+ <dependencySet>
+ <includes>
+ <include>xalan-bin-dist:xalan</include>
+ <include>xerces:xercesImpl</include>
+ <include>xalan-bin-dist:xml-apis</include>
+ <include>xalan-bin-dist:serializer</include>
+ </includes>
+ <outputDirectory>/endorsed</outputDirectory>
+ <!-- strip version off the artifact file names -->
+ <outputFileNameMapping>${artifactId}.${extension}</outputFileNameMapping>
+ </dependencySet>
+ <dependencySet>
+ <includes>
+ <include>iaik.prod:iaik_ecc</include>
+ <include>iaik.prod:iaik_jce_full</include>
+ <include>iaik.prod:iaik_Pkcs11Provider</include>
+ <include>iaik.prod:iaik_Pkcs11Wrapper:jar</include>
+ </includes>
+ <outputDirectory>/ext</outputDirectory>
+ <!-- strip version off the artifact file names -->
+ <outputFileNameMapping>${artifactId}.${extension}</outputFileNameMapping>
+ </dependencySet>
+ </dependencySets>
+ <outputFileNameMapping>moa-spss.${extension}</outputFileNameMapping>
+ <unpack>false</unpack>
+ </binaries>
+ </moduleSet>
+ <moduleSet>
+ <includes>
+ <include>MOA.spss.server:moa-spss-lib</include>
+ </includes>
+ <binaries>
+ <attachmentClassifier>javadoc</attachmentClassifier>
+ <includeDependencies>false</includeDependencies>
+ <outputFileNameMapping>api-doc</outputFileNameMapping>
+ <outputDirectory>/doc</outputDirectory>
+ <unpack>true</unpack>
+ </binaries>
+ </moduleSet>
+ <moduleSet>
+ <includes>
+ <include>MOA.spss.server:moa-spss-tools</include>
+ </includes>
+ <binaries>
+ <includeDependencies>true</includeDependencies>
+ <dependencySets>
+ <dependencySet>
+ <includes>
+ <include>iaik.prod:iaik_ecc</include>
+ <include>iaik.prod:iaik_jce_full</include>
+ <include>iaik.prod:iaik_moa</include>
+ <include>log4j:log4j</include>
+ <include>xalan-bin-dist:xalan</include>
+ </includes>
+ <outputDirectory>/tools</outputDirectory>
+ <!-- strip version off the artifact file names -->
+ <outputFileNameMapping>${artifactId}.${extension}</outputFileNameMapping>
+ </dependencySet>
+ </dependencySets>
+ <outputDirectory>/tools</outputDirectory>
+ <outputFileNameMapping>tools.${extension}</outputFileNameMapping>
+ <unpack>false</unpack>
+ </binaries>
+ </moduleSet>
+ </moduleSets>
+
+ <componentDescriptors>
+ <componentDescriptor>component-pkcs11libs.xml</componentDescriptor>
+ </componentDescriptors>
+
+ <files>
+ <file>
+ <source>${basedir}/spss/handbook/handbook.html</source>
+ <outputDirectory>/doc</outputDirectory>
+ </file>
+ </files>
+
+ <fileSets>
+ <fileSet>
+ <directory>${basedir}/spss/server</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>*.txt</include>
+ </includes>
+ <excludes>
+ <exclude>readme.src.txt</exclude>
+ </excludes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/spss/handbook/conf</directory>
+ <outputDirectory>/conf</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/spss/handbook/handbook</directory>
+ <outputDirectory>/doc/handbook</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/spss/handbook/clients</directory>
+ <outputDirectory>/doc/clients</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}</directory>
+ <outputDirectory>/</outputDirectory>
+ <includes>
+ <include>LICENSE-2.0.txt</include>
+ <include>NOTICE.txt</include>
+ <include>IAIK-LICENSE.txt</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/spss/server/serverws/data/deploy/tomcat</directory>
+ <outputDirectory>/tomcat</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/spss/server/serverws/data/deploy/tools</directory>
+ <outputDirectory>/tools</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/spss/server/tools/src/main/scripts</directory>
+ <outputDirectory>/tools</outputDirectory>
+ </fileSet>
+ </fileSets>
+
+</assembly>
diff --git a/spss/handbook/.classpath b/spss/handbook/.classpath
new file mode 100644
index 000000000..f93d181b5
--- /dev/null
+++ b/spss/handbook/.classpath
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/spss/handbook/.project b/spss/handbook/.project
new file mode 100644
index 000000000..67a13396f
--- /dev/null
+++ b/spss/handbook/.project
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>moa-spss-handbook</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
diff --git a/spss/handbook/.settings/org.eclipse.jdt.core.prefs b/spss/handbook/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..af3df77d1
--- /dev/null
+++ b/spss/handbook/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,5 @@
+#Mon Aug 17 10:06:15 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.source=1.4
diff --git a/spss/handbook/.settings/org.maven.ide.eclipse.prefs b/spss/handbook/.settings/org.maven.ide.eclipse.prefs
new file mode 100644
index 000000000..9bf914230
--- /dev/null
+++ b/spss/handbook/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,9 @@
+#Tue Jul 07 16:06:52 CEST 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
diff --git a/spss/handbook/clients/.classpath b/spss/handbook/clients/.classpath
new file mode 100644
index 000000000..f93d181b5
--- /dev/null
+++ b/spss/handbook/clients/.classpath
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/spss/handbook/clients/.project b/spss/handbook/clients/.project
new file mode 100644
index 000000000..a7f2e066e
--- /dev/null
+++ b/spss/handbook/clients/.project
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>moa-spss-handbook-clients</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
diff --git a/spss/handbook/clients/.settings/org.eclipse.jdt.core.prefs b/spss/handbook/clients/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..99e7590e6
--- /dev/null
+++ b/spss/handbook/clients/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,5 @@
+#Tue Jul 07 16:07:23 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.source=1.4
diff --git a/spss/handbook/clients/.settings/org.maven.ide.eclipse.prefs b/spss/handbook/clients/.settings/org.maven.ide.eclipse.prefs
new file mode 100644
index 000000000..9bf914230
--- /dev/null
+++ b/spss/handbook/clients/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,9 @@
+#Tue Jul 07 16:06:52 CEST 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
diff --git a/spss/handbook/clients/api/.classpath b/spss/handbook/clients/api/.classpath
new file mode 100644
index 000000000..8619241eb
--- /dev/null
+++ b/spss/handbook/clients/api/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/spss/handbook/clients/api/.project b/spss/handbook/clients/api/.project
new file mode 100644
index 000000000..ec6e1354b
--- /dev/null
+++ b/spss/handbook/clients/api/.project
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>moa-spss-handbook-apiClient</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
diff --git a/spss/handbook/clients/api/.settings/org.eclipse.jdt.core.prefs b/spss/handbook/clients/api/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..99e7590e6
--- /dev/null
+++ b/spss/handbook/clients/api/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,5 @@
+#Tue Jul 07 16:07:23 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.source=1.4
diff --git a/spss/handbook/clients/api/.settings/org.maven.ide.eclipse.prefs b/spss/handbook/clients/api/.settings/org.maven.ide.eclipse.prefs
new file mode 100644
index 000000000..1964c59a4
--- /dev/null
+++ b/spss/handbook/clients/api/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,9 @@
+#Tue Jul 07 16:06:54 CEST 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
diff --git a/spss/handbook/clients/api/pom.xml b/spss/handbook/clients/api/pom.xml
new file mode 100644
index 000000000..6a38fbb2d
--- /dev/null
+++ b/spss/handbook/clients/api/pom.xml
@@ -0,0 +1,137 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>MOA.spss.handbook.clients</groupId>
+ <artifactId>moa-spss-handbook-clients</artifactId>
+ <version>1.5</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>MOA.spss.handbook</groupId>
+ <artifactId>moa-spss-handbook-apiClient</artifactId>
+ <packaging>jar</packaging>
+ <version>1.5</version>
+ <name>MOA SP/SS Handbook API Client</name>
+
+ <properties>
+ <repositoryPath>${basedir}/../../../../../repository</repositoryPath>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>axis</groupId>
+ <artifactId>axis</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>axis</groupId>
+ <artifactId>axis-jaxrpc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>axis</groupId>
+ <artifactId>axis-saaj</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>axis</groupId>
+ <artifactId>axis-wsdl4j</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-discovery</groupId>
+ <artifactId>commons-discovery</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.activation</groupId>
+ <artifactId>activation</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>xalan</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>xml-apis</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>serializer</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_moa</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_ixsil</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_jce_full</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_ecc</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_cms</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Provider</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Wrapper</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Wrapper</artifactId>
+ <classifier>win32</classifier>
+ <type>dll</type>
+ <scope>runtime</scope>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>MOA</groupId>
+ <artifactId>moa-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>MOA.spss.server</groupId>
+ <artifactId>moa-spss-lib</artifactId>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/spss/handbook/clients/api/signatures/SimpleSignature.xml b/spss/handbook/clients/api/signatures/SimpleSignature.xml
new file mode 100644
index 000000000..9ecd215c1
--- /dev/null
+++ b/spss/handbook/clients/api/signatures/SimpleSignature.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<dsig:Signature Id="signature-1-1" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:SignedInfo><dsig:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><dsig:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"/><dsig:Reference Id="reference-1-1" URI="#xpointer(id(&apos;signed-data-1-1-1&apos;)/node())"><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>tLODyeiWFbAkQKwhrR23jtcgu4k=</dsig:DigestValue></dsig:Reference></dsig:SignedInfo><dsig:SignatureValue>VEjXB6+geUL16oTPDVx5lcQliGl/oyVobug3BVxVwhu8CU7WK65moTcTuo/CL2hQ</dsig:SignatureValue><dsig:KeyInfo><dsig:X509Data><dsig:X509Certificate>MIID+DCCA2WgAwIBAgIBCTAJBgUrDgMCHQUAMH8xCzAJBgNVBAYTAkFUMSwwKgYD
+VQQKEyNTdGFic3RlbGxlIElLVC1TdHJhdGVnaWUgZGVzIEJ1bmRlczEeMBwGA1UE
+CxMVVGVjaG5payB1bmQgU3RhbmRhcmRzMSIwIAYDVQQDExlUZXN0IENBIC0gU2ln
+bmF0dXJkaWVuc3RlMB4XDTA0MDgwNDA4MjM0OFoXDTA3MDgwNDA4MjM0OFowgZgx
+CzAJBgNVBAYTAkFUMS0wKwYDVQQKEyRTdGFic3N0ZWxsZSBJS1QtU3RyYXRlZ2ll
+IGRlcyBCdW5kZXMxHjAcBgNVBAsTFVRlY2huaWsgdW5kIFN0YW5kYXJkczE6MDgG
+A1UEAxMxVGVzdDogU2lnbmF0dXJkaWVuc3QgYWxsZXIgS3VuZGVuOiBFQ0RTQSAo
+UDE5MnYxKTCB8zCBvAYHKoZIzj0CATCBsAIBATAkBgcqhkjOPQEBAhkA////////
+/////////////v//////////MDQEGP////////////////////7//////////AQY
+ZCEFGeWcgOcPp+mrciQwSf643uzBRrmxBDEEGI2oDrAwkPZ8vyDrQ6GIAPT/Cv2C
+/xASBxkrlf/I2nhjEBHtayTN1XP5d6EeeUgRAhkA////////////////md74NhRr
+ybG00igxAgEBAzIABNHWY9lQOE1zgmpcpjTg2WIg6qgEsGhpXELPinJoMPDVheTv
+2BZPG42YJsNfvWgC06OCARwwggEYMA4GA1UdDwEB/wQEAwIGwDAMBgNVHRMBAf8E
+AjAAMB0GA1UdDgQWBBRHH5EXnrWosCmIa+JyEM5seMxFVzBdBgNVHSAEVjBUMFIG
+DCsGAQQBlRIBAgMBATBCMEAGCCsGAQUFBwICMDQaMkRpZXNlcyBaZXJ0aWZpa2F0
+IGlzdCBudXIgZvxyIFRlc3R6d2Vja2UgZ2VlaWduZXQuMEMGA1UdHwQ8MDowOKA2
+oDSGMmh0dHA6Ly9sYWJzLmNpby5ndi5hdC90ZW1wL2NybHMvc2lnbmF0dXJkaWVu
+c3QuY3JsMBQGByooAAoBAQEECQwHQktBLUlLVDAfBgNVHSMEGDAWgBRAl0P5fWaw
+vf59+uxGcYY9wffZPTAJBgUrDgMCHQUAA4GBAIMKUsnajgfBtpHeDdMdQMLA8fdt
+lluezDOM78WYYSFURP04QZk5iHkShzptgZCF5Y/T4an3dC3SnytL67LJvEoKUyja
+iTMLo7650xRTvAjTaMJ+nly/wTRYJKplOLXKWj3WwfObMHXdsDE8NJmpJSRE7Sw7
++tj+UiTiNNSaXirq</dsig:X509Certificate></dsig:X509Data></dsig:KeyInfo><dsig:Object Id="signed-data-1-1-1">Diese Daten werden signiert.</dsig:Object></dsig:Signature> \ No newline at end of file
diff --git a/spss/handbook/clients/api/src/main/java/at/gv/egovernment/moa/spss/handbook/clients/api/CreateXMLSignature.java b/spss/handbook/clients/api/src/main/java/at/gv/egovernment/moa/spss/handbook/clients/api/CreateXMLSignature.java
new file mode 100644
index 000000000..bed9a0caa
--- /dev/null
+++ b/spss/handbook/clients/api/src/main/java/at/gv/egovernment/moa/spss/handbook/clients/api/CreateXMLSignature.java
@@ -0,0 +1,145 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.handbook.clients.api;
+
+import java.io.ByteArrayInputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.SignatureCreationService;
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfile;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse;
+import at.gv.egovernment.moa.spss.api.xmlsign.DataObjectInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.SignatureEnvironmentResponse;
+import at.gv.egovernment.moa.spss.api.xmlsign.SingleSignatureInfo;
+import at.gv.egovernment.moa.util.DOMUtils;
+
+/**
+ * Dieses einfache Beispiel demonstriert grundlegend den Gebrauch der API von MOA SP/SS. Es wird damit eine
+ * einfach aufgebaute XML-Signatur erzeugt.
+ */
+public class CreateXMLSignature
+{
+ /**
+ * Methode main.
+ *
+ * Enthält beispielhaften Code zum grundlegenden Gebrauch der API von MOA SP/SS. Es wird damit eine
+ * einfach aufgebaute XML-Signatur erzeugt.
+ *
+ * ACHTUNG: Stellen Sie bei Verwendung von J2SE 1.4.x bzw. 5.x sicher, dass Sie die System-Property
+ * <code>java.endorsed.dirs</code> auf jenes Verzeichnis gesetzt haben, in dem sich die XPath-
+ * und XSLT-Bibliothek <em>Xalan-J</em> befindet.
+ *
+ * @param args <ul>
+ * <li>
+ * args[0] enthält einen Verweis auf die Konfigurations-Datei von MOA SP/SS Der Verweis
+ * enthält entweder eine absolute oder eine relative Pfadangabe, wobei eine relative
+ * Angabe als relativ zum Arbeitsverzeichnis der Java VM interpretiert wird.
+ * </li>
+ * <li>
+ * args[1] enthält einen Verweis auf die Konfigurations-Datei von Log4J, dem Logging-
+ * Framework, das von MOA SP/SS verwendet wird. Der Verweis enthält entweder eine
+ * absolute oder eine relative Pfadangabe, wobei eine relative Angabe als relativ zum
+ * Arbeitsverzeichnis der Java VM interpretiert wird.
+ * </li>
+ * </ul>
+ *
+ * @throws Exception Sollten Fehler auftreten werden die Fehler an die Java-VM weitergeleitet.
+ */
+ public static void main(String[] args) throws Exception
+ {
+ // Setzen der System-Properties
+ init(args);
+
+ // Serverfunktionshandler instanzieren
+ SPSSFactory spf = SPSSFactory.getInstance();
+
+ // Zu signierende Daten in ein Contentobjekt einbinden (die Daten werden hier explizit angegeben,
+ // sollen aber in der Signatur mittels URL "http://uri.data.org" referenziert werden
+ byte[] data = "Diese Daten werden signiert.".getBytes("UTF-8");
+ ByteArrayInputStream bis = new ByteArrayInputStream(data);
+ Content cont = spf.createContent(bis, null);
+
+ // Metainformationen zu den zu signierenden Daten erstellen
+ MetaInfo mi = spf.createMetaInfo("text/plain", null, null, null);
+
+ // Transformationen erstellen (hier werden keine Transformationen angewandt)
+ CreateTransformsInfo cti = spf.createCreateTransformsInfo(null, mi);
+ CreateTransformsInfoProfile ct = spf.createCreateTransformsInfoProfile(cti, null);
+
+ // Datenobjekt aufbauen
+ DataObjectInfo doi = spf.createDataObjectInfo(DataObjectInfo.STRUCTURE_ENVELOPING, false, cont, ct);
+
+ // Erstellen eines SingleSignatureInfo-Containers
+ // Enthält alle Angaben zur Erstellung *einer* Signatur
+ List dataobjectinfolist = new ArrayList();
+ dataobjectinfolist.add(doi);
+ SingleSignatureInfo ssi = spf.createSingleSignatureInfo(dataobjectinfolist, null, false);
+
+ // Erstellen des Request-Objekts (Schlüsselbezeichner, Liste von SingleSignatureInfo-Containern)
+ List singlesignatureinfolist = new ArrayList();
+ singlesignatureinfolist.add(ssi);
+ CreateXMLSignatureRequest cxsreq = spf.createCreateXMLSignatureRequest("KG_allgemein",
+ singlesignatureinfolist);
+
+ // Signatureerstellungsservice instanzieren und aufrufen
+ SignatureCreationService scs = SignatureCreationService.getInstance();
+ CreateXMLSignatureResponse cxsres = scs.createXMLSignature(cxsreq);
+
+ // Response auswerten
+ List elements = cxsres.getResponseElements();
+ SignatureEnvironmentResponse ser = (SignatureEnvironmentResponse) elements.get(0);
+
+ // Auswertung des ersten (und einzigen) SignatureEnvironmentResponse-Containers
+ int response_type = ser.getResponseType();
+
+ if (response_type == SignatureEnvironmentResponse.ERROR_RESPONSE)
+ {
+ // Fehlerfall
+ System.out.println("Bei der Erstellung der Signatur ist ein Fehler aufgetreten.");
+ }
+ else
+ {
+ // Signaturerstellung erfolgreich
+ System.out.println("Signaturerstellung erfolgreich:");
+
+ Element se = ser.getSignatureEnvironment();
+ System.out.println(DOMUtils.serializeNode(se));
+ }
+ }
+
+ /**
+ * Setzt die notwendigen System-Properties für die Konfiguration der MOA SP/SS API.
+ *
+ * @param args Siehe @link CreateXMLSignature#main(String[]).
+ */
+ private static void init(String[] args)
+ {
+ if (args == null || args.length != 2)
+ {
+ System.out.println("Verwendung: CreateXMLSignature <MOASPSSConfigFile> <Log4JConfigFile>");
+ }
+ System.setProperty("moa.spss.server.configuration", args[0]);
+ System.setProperty("log4j.configuration", "file:" + args[1]);
+ }
+} \ No newline at end of file
diff --git a/spss/handbook/clients/api/src/main/java/at/gv/egovernment/moa/spss/handbook/clients/api/VerifyXMLSignature.java b/spss/handbook/clients/api/src/main/java/at/gv/egovernment/moa/spss/handbook/clients/api/VerifyXMLSignature.java
new file mode 100644
index 000000000..4bb661142
--- /dev/null
+++ b/spss/handbook/clients/api/src/main/java/at/gv/egovernment/moa/spss/handbook/clients/api/VerifyXMLSignature.java
@@ -0,0 +1,162 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.handbook.clients.api;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.util.HashMap;
+
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.SignatureVerificationService;
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.common.SignerInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureLocation;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse;
+
+/**
+ * Dieses einfache Beispiel demonstriert grundlegend den Gebrauch der API von MOA SP/SS.
+ * Es wird damit eine einfach aufgebaute XML-Signatur geprüft.
+ */
+
+public class VerifyXMLSignature
+{
+ /**
+ * Methode main.
+ *
+ * Enthält beispielhaften Code zum grundlegenden Gebrauch der API von MOA SP/SS.
+ * Es wird damit eine einfach aufgebaute XML-Signatur geprüft.
+ *
+ * ACHTUNG: Stellen Sie bei Verwendung von J2SE 1.4.x bzw. 5.x sicher, dass Sie die System-Property
+ * <code>java.endorsed.dirs</code> auf jenes Verzeichnis gesetzt haben, in dem sich die XPath-
+ * und XSLT-Bibliothek <em>Xalan-J</em> befindet.
+ *
+ * @param args <ul>
+ * <li>
+ * args[0] enthält einen Verweis auf die Konfigurations-Datei von MOA SP/SS Der Verweis
+ * enthält entweder eine absolute oder eine relative Pfadangabe, wobei eine relative
+ * Angabe als relativ zum Arbeitsverzeichnis der Java VM interpretiert wird.
+ * </li>
+ * <li>
+ * args[1] enthält einen Verweis auf die Konfigurations-Datei von Log4J, dem Logging-
+ * Framework, das von MOA SP/SS verwendet wird. Der Verweis enthält entweder eine
+ * absolute oder eine relative Pfadangabe, wobei eine relative Angabe als relativ zum
+ * Arbeitsverzeichnis der Java VM interpretiert wird.
+ * </li>
+ * <li>
+ * args[2] enthält Pfad und Dateiname des XML-Dokuments mit der darin enthaltenen, zu
+ * prüfenden XML-Signatur. Verwenden Sie z.B. das mit diesem Handbuch mitgelieferte
+ * Beispiel <code>clients/api/signatures/SimpleSignature.xml</code>.
+ * </li>
+ * </ul>
+ */
+ public static void main(String[] args)
+ {
+ // Setzen der System-Properties
+ init(args);
+
+ // Factory und Service instanzieren
+ SPSSFactory spssFac = SPSSFactory.getInstance();
+ SignatureVerificationService sigVerifyService = SignatureVerificationService.getInstance();
+
+ // Content aus Dokument mit zu prüfender Signatur erstellen
+ FileInputStream sigDocFIS = null;
+ try
+ {
+ sigDocFIS = new FileInputStream(args[2]);
+ }
+ catch (FileNotFoundException e1)
+ {
+ System.err.println("XML-Dokument mit zu prüfender Signatur nicht gefunden: " + args[2]);
+ System.exit(-1);
+ }
+ Content sigDocContent = spssFac.createContent(sigDocFIS, null);
+
+ // Position der zu prüfenden Signatur im Dokument angeben
+ // (Nachdem im XPath-Ausdruck ein NS-Präfix verwendet wird, muss in einer Lookup-Tabelle
+ // der damit bezeichnete Namenraum mitgegeben werden)
+ HashMap nSMap = new HashMap();
+ nSMap.put("dsig", "http://www.w3.org/2000/09/xmldsig#");
+ VerifySignatureLocation sigLocation = spssFac.createVerifySignatureLocation("//dsig:Signature", nSMap);
+
+ // Zu prüfendes Dokument und Signaturposition zusammenfassen
+ VerifySignatureInfo sigInfo = spssFac.createVerifySignatureInfo(sigDocContent, sigLocation);
+
+ // Prüfrequest zusammenstellen
+ VerifyXMLSignatureRequest verifyRequest = spssFac.createVerifyXMLSignatureRequest(
+ null, // Wird Prüfzeit nicht angegeben, wird aktuelle Zeit verwendet
+ sigInfo,
+ null, // Keine Ergänzungsobjekte notwendig
+ null, // Signaturmanifest-Prüfung soll nicht durchgeführt werden
+ false, // Hash-Inputdaten, d.h. tatsächlich signierte Daten werden nicht zurückgeliefert
+ "Test-Signaturdienste"); // ID des verwendeten Vertrauensprofils
+
+ VerifyXMLSignatureResponse verifyResponse = null;
+ try
+ {
+ // Aufruf der Signaturprüfung
+ verifyResponse = sigVerifyService.verifyXMLSignature(verifyRequest);
+ }
+ catch (MOAException e)
+ {
+ // Service liefert Fehler
+ System.err.println("Die Signaturprüfung hat folgenden Fehler geliefert:");
+ System.err.println("Fehlercode: " + e.getMessageId());
+ System.err.println("Fehlernachricht: " + e.getMessage());
+ System.exit(-1);
+ }
+
+ // Auswertung der Response
+ System.out.println();
+ System.out.println("Ergebnisse der Signaturprüfung:");
+ System.out.println();
+
+ // Besondere Eigenschaften des Signatorzertifikats
+ SignerInfo signerInfo = verifyResponse.getSignerInfo();
+ System.out.println("*** Ist Zertifikat des Signators qualifiziert? " + ((signerInfo.isQualifiedCertificate()) ? "ja" : "nein"));
+ System.out.println("*** Ist Zertifikat des Signators von einer Behörde? " + ((signerInfo.isPublicAuthority()) ? "ja" : "nein"));
+
+ // Ergebnisse von Signatur- und Zertifikatsprüfung
+ System.out.println();
+ System.out.println("Ergebniscode der Signaturprüfung: " + verifyResponse.getSignatureCheck().getCode());
+ System.out.println("Ergebniscode der Zertifikatsprüfung: " + verifyResponse.getCertificateCheck().getCode());
+
+ // Signatorzertifikat
+ System.out.println();
+ System.out.println("*** Zertifikat des Signators:");
+ System.out.println("Aussteller: " + signerInfo.getSignerCertificate().getIssuerDN());
+ System.out.println("Subject: " + signerInfo.getSignerCertificate().getSubjectDN());
+ System.out.println("Seriennummer: " + signerInfo.getSignerCertificate().getSerialNumber());
+ }
+
+ /**
+ * Setzt die notwendigen System-Properties für die Konfiguration der MOA SP/SS API.
+ *
+ * @param args Siehe @link VerifyXMLSignature#main(String[]).
+ */
+ private static void init(String[] args)
+ {
+ if (args == null || args.length != 3)
+ {
+ System.out.println("Verwendung: VerifyXMLSignature <MOASPSSConfigFile> <Log4JConfigFile> <XMLDocWithSignature>");
+ System.exit(-1);
+ }
+ System.setProperty("moa.spss.server.configuration", args[0]);
+ System.setProperty("log4j.configuration", "file:" + args[1]);
+ }
+} \ No newline at end of file
diff --git a/spss/handbook/clients/pom.xml b/spss/handbook/clients/pom.xml
new file mode 100644
index 000000000..5a4ab81c8
--- /dev/null
+++ b/spss/handbook/clients/pom.xml
@@ -0,0 +1,26 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>MOA.spss.handbook</groupId>
+ <artifactId>moa-spss-handbook</artifactId>
+ <version>1.5</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>MOA.spss.handbook.clients</groupId>
+ <artifactId>moa-spss-handbook-clients</artifactId>
+ <packaging>pom</packaging>
+ <version>1.5</version>
+ <name>MOA SP/SS Handbook Clients</name>
+
+ <modules>
+ <module>referencedData</module>
+ <module>api</module>
+ <module>webservice</module>
+ </modules>
+
+ <properties>
+ <repositoryPath>${basedir}/../../../../repository</repositoryPath>
+ </properties>
+
+</project>
diff --git a/spss/handbook/clients/referencedData/.classpath b/spss/handbook/clients/referencedData/.classpath
new file mode 100644
index 000000000..af4743f8a
--- /dev/null
+++ b/spss/handbook/clients/referencedData/.classpath
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/spss/handbook/clients/referencedData/.project b/spss/handbook/clients/referencedData/.project
new file mode 100644
index 000000000..23699368d
--- /dev/null
+++ b/spss/handbook/clients/referencedData/.project
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>moa-spss-handbook-referencedData</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ </natures>
+</projectDescription>
diff --git a/spss/handbook/clients/referencedData/.settings/.jsdtscope b/spss/handbook/clients/referencedData/.settings/.jsdtscope
new file mode 100644
index 000000000..f40dd98e2
--- /dev/null
+++ b/spss/handbook/clients/referencedData/.settings/.jsdtscope
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
diff --git a/spss/handbook/clients/referencedData/.settings/org.eclipse.jdt.core.prefs b/spss/handbook/clients/referencedData/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..573b253b9
--- /dev/null
+++ b/spss/handbook/clients/referencedData/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Mon Aug 17 10:06:17 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.source=1.4
diff --git a/spss/handbook/clients/referencedData/.settings/org.eclipse.wst.common.component b/spss/handbook/clients/referencedData/.settings/org.eclipse.wst.common.component
new file mode 100644
index 000000000..ea8402b5f
--- /dev/null
+++ b/spss/handbook/clients/referencedData/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="moa-spss-handbook-referencedData">
+ <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
+ <property name="context-root" value="moa-spss-handbook-referencedData"/>
+ <property name="java-output-path"/>
+ </wb-module>
+</project-modules>
diff --git a/spss/handbook/clients/referencedData/.settings/org.eclipse.wst.common.project.facet.core.xml b/spss/handbook/clients/referencedData/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 000000000..f30a1de6e
--- /dev/null
+++ b/spss/handbook/clients/referencedData/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <installed facet="jst.java" version="1.4"/>
+ <installed facet="jst.web" version="2.3"/>
+</faceted-project>
diff --git a/spss/handbook/clients/referencedData/.settings/org.eclipse.wst.jsdt.ui.superType.container b/spss/handbook/clients/referencedData/.settings/org.eclipse.wst.jsdt.ui.superType.container
new file mode 100644
index 000000000..3bd5d0a48
--- /dev/null
+++ b/spss/handbook/clients/referencedData/.settings/org.eclipse.wst.jsdt.ui.superType.container
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file
diff --git a/spss/handbook/clients/referencedData/.settings/org.eclipse.wst.jsdt.ui.superType.name b/spss/handbook/clients/referencedData/.settings/org.eclipse.wst.jsdt.ui.superType.name
new file mode 100644
index 000000000..05bd71b6e
--- /dev/null
+++ b/spss/handbook/clients/referencedData/.settings/org.eclipse.wst.jsdt.ui.superType.name
@@ -0,0 +1 @@
+Window \ No newline at end of file
diff --git a/spss/handbook/clients/referencedData/.settings/org.maven.ide.eclipse.prefs b/spss/handbook/clients/referencedData/.settings/org.maven.ide.eclipse.prefs
new file mode 100644
index 000000000..7eae03e88
--- /dev/null
+++ b/spss/handbook/clients/referencedData/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,9 @@
+#Tue Jul 07 16:06:53 CEST 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
diff --git a/spss/handbook/clients/referencedData/pom.xml b/spss/handbook/clients/referencedData/pom.xml
new file mode 100644
index 000000000..9a8a3b68e
--- /dev/null
+++ b/spss/handbook/clients/referencedData/pom.xml
@@ -0,0 +1,39 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>MOA.spss.handbook.clients</groupId>
+ <artifactId>moa-spss-handbook-clients</artifactId>
+ <version>1.5</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>MOA.spss.handbook</groupId>
+ <artifactId>moa-spss-handbook-referencedData</artifactId>
+ <packaging>war</packaging>
+ <version>1.5</version>
+ <name>MOA SP/SS Handbook Referenced Data</name>
+
+ <properties>
+ <repositoryPath>${basedir}/../../../../../repository</repositoryPath>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <warName>referencedData</warName>
+ <archive>
+ <manifest>
+ <addDefaultSpecificationEntries>false</addDefaultSpecificationEntries>
+ <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+ </manifest>
+ <addMavenDescriptor>false</addMavenDescriptor>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/spss/handbook/clients/referencedData/src/main/webapp/META-INF/MANIFEST.MF b/spss/handbook/clients/referencedData/src/main/webapp/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..5e9495128
--- /dev/null
+++ b/spss/handbook/clients/referencedData/src/main/webapp/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
diff --git a/spss/handbook/clients/referencedData/src/main/webapp/Text.b64 b/spss/handbook/clients/referencedData/src/main/webapp/Text.b64
new file mode 100644
index 000000000..0f4636b9a
--- /dev/null
+++ b/spss/handbook/clients/referencedData/src/main/webapp/Text.b64
@@ -0,0 +1 @@
+RGllc2UgRGF0ZW4gd2FyZW4gYmFzZTY0IGtvZGllcnQu \ No newline at end of file
diff --git a/spss/handbook/clients/referencedData/src/main/webapp/Text.txt b/spss/handbook/clients/referencedData/src/main/webapp/Text.txt
new file mode 100644
index 000000000..3a75c06b3
--- /dev/null
+++ b/spss/handbook/clients/referencedData/src/main/webapp/Text.txt
@@ -0,0 +1 @@
+Diese Daten sind reiner Text. \ No newline at end of file
diff --git a/spss/handbook/clients/referencedData/src/main/webapp/WEB-INF/web.xml b/spss/handbook/clients/referencedData/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 000000000..002520ba5
--- /dev/null
+++ b/spss/handbook/clients/referencedData/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!DOCTYPE web-app
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+ <display-name>MOA Webservice Client: Referenzierte Web-Daten</display-name>
+ <description>MOA Webservice Client: Referenzierte Web-Daten</description>
+</web-app>
diff --git a/spss/handbook/clients/referencedData/src/main/webapp/XMLDocument.Para.xsl b/spss/handbook/clients/referencedData/src/main/webapp/XMLDocument.Para.xsl
new file mode 100644
index 000000000..11d6dd6f9
--- /dev/null
+++ b/spss/handbook/clients/referencedData/src/main/webapp/XMLDocument.Para.xsl
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:doc="urn:document" xmlns="http://www.w3.org/1999/xhtml">
+ <xsl:output encoding="UTF-8" method="xml" indent="yes"/>
+ <xsl:template match="/">
+ <html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>HTML-Dokument</title>
+ </head>
+ <body>
+ <xsl:apply-templates/>
+ </body>
+ </html>
+ </xsl:template>
+ <xsl:template match="doc:Paragraph">
+ <p>
+ <xsl:value-of select="child::text()"/>
+ </p>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/spss/handbook/clients/referencedData/src/main/webapp/XMLDocument.signed.xml b/spss/handbook/clients/referencedData/src/main/webapp/XMLDocument.signed.xml
new file mode 100644
index 000000000..897b3c896
--- /dev/null
+++ b/spss/handbook/clients/referencedData/src/main/webapp/XMLDocument.signed.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc:XMLDocument xmlns:doc="urn:document">
+ <doc:Paragraph>Ich bin der erste Absatz in diesem Dokument.</doc:Paragraph>
+ <doc:Paragraph ParaId="Para2">Und ich bin der zweite Absatz in diesem Dokument.
+Ich habe weiters ein eigenens ID-Attribut bekommen.</doc:Paragraph><dsig:Signature Id="signature-1-1" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:SignedInfo><dsig:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><dsig:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"/><dsig:Reference Id="reference-1-1" URI=""><dsig:Transforms><dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>2b83+NbXDFijHzz+sH0T7fM36sA=</dsig:DigestValue></dsig:Reference></dsig:SignedInfo><dsig:SignatureValue>30zsZMPn1mR5G5oIGJvTRmCik3WuepfZF6AhLwxgJDMJlPQ8rheBWCaKihzXnHaS</dsig:SignatureValue><dsig:KeyInfo><dsig:X509Data><dsig:X509Certificate>MIID+DCCA2WgAwIBAgIBCTAJBgUrDgMCHQUAMH8xCzAJBgNVBAYTAkFUMSwwKgYD
+VQQKEyNTdGFic3RlbGxlIElLVC1TdHJhdGVnaWUgZGVzIEJ1bmRlczEeMBwGA1UE
+CxMVVGVjaG5payB1bmQgU3RhbmRhcmRzMSIwIAYDVQQDExlUZXN0IENBIC0gU2ln
+bmF0dXJkaWVuc3RlMB4XDTA0MDgwNDA4MjM0OFoXDTA3MDgwNDA4MjM0OFowgZgx
+CzAJBgNVBAYTAkFUMS0wKwYDVQQKEyRTdGFic3N0ZWxsZSBJS1QtU3RyYXRlZ2ll
+IGRlcyBCdW5kZXMxHjAcBgNVBAsTFVRlY2huaWsgdW5kIFN0YW5kYXJkczE6MDgG
+A1UEAxMxVGVzdDogU2lnbmF0dXJkaWVuc3QgYWxsZXIgS3VuZGVuOiBFQ0RTQSAo
+UDE5MnYxKTCB8zCBvAYHKoZIzj0CATCBsAIBATAkBgcqhkjOPQEBAhkA////////
+/////////////v//////////MDQEGP////////////////////7//////////AQY
+ZCEFGeWcgOcPp+mrciQwSf643uzBRrmxBDEEGI2oDrAwkPZ8vyDrQ6GIAPT/Cv2C
+/xASBxkrlf/I2nhjEBHtayTN1XP5d6EeeUgRAhkA////////////////md74NhRr
+ybG00igxAgEBAzIABNHWY9lQOE1zgmpcpjTg2WIg6qgEsGhpXELPinJoMPDVheTv
+2BZPG42YJsNfvWgC06OCARwwggEYMA4GA1UdDwEB/wQEAwIGwDAMBgNVHRMBAf8E
+AjAAMB0GA1UdDgQWBBRHH5EXnrWosCmIa+JyEM5seMxFVzBdBgNVHSAEVjBUMFIG
+DCsGAQQBlRIBAgMBATBCMEAGCCsGAQUFBwICMDQaMkRpZXNlcyBaZXJ0aWZpa2F0
+IGlzdCBudXIgZvxyIFRlc3R6d2Vja2UgZ2VlaWduZXQuMEMGA1UdHwQ8MDowOKA2
+oDSGMmh0dHA6Ly9sYWJzLmNpby5ndi5hdC90ZW1wL2NybHMvc2lnbmF0dXJkaWVu
+c3QuY3JsMBQGByooAAoBAQEECQwHQktBLUlLVDAfBgNVHSMEGDAWgBRAl0P5fWaw
+vf59+uxGcYY9wffZPTAJBgUrDgMCHQUAA4GBAIMKUsnajgfBtpHeDdMdQMLA8fdt
+lluezDOM78WYYSFURP04QZk5iHkShzptgZCF5Y/T4an3dC3SnytL67LJvEoKUyja
+iTMLo7650xRTvAjTaMJ+nly/wTRYJKplOLXKWj3WwfObMHXdsDE8NJmpJSRE7Sw7
++tj+UiTiNNSaXirq</dsig:X509Certificate></dsig:X509Data></dsig:KeyInfo></dsig:Signature>
+</doc:XMLDocument> \ No newline at end of file
diff --git a/spss/handbook/clients/referencedData/src/main/webapp/XMLDocument.withResolvableSchemaHint.xml b/spss/handbook/clients/referencedData/src/main/webapp/XMLDocument.withResolvableSchemaHint.xml
new file mode 100644
index 000000000..4f1124637
--- /dev/null
+++ b/spss/handbook/clients/referencedData/src/main/webapp/XMLDocument.withResolvableSchemaHint.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc:XMLDocument xmlns:doc="urn:document" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:document http://localhost:8080/referencedData/XMLDocument.xsd">
+ <doc:Paragraph>Ich bin der erste Absatz in diesem Dokument.</doc:Paragraph>
+ <doc:Paragraph ParaId="Para2">Und ich bin der zweite Absatz in diesem Dokument.
+Ich habe weiters ein eigenens ID-Attribut bekommen.</doc:Paragraph>
+</doc:XMLDocument>
diff --git a/spss/handbook/clients/referencedData/src/main/webapp/XMLDocument.withSchemaHint.xml b/spss/handbook/clients/referencedData/src/main/webapp/XMLDocument.withSchemaHint.xml
new file mode 100644
index 000000000..82f65d99e
--- /dev/null
+++ b/spss/handbook/clients/referencedData/src/main/webapp/XMLDocument.withSchemaHint.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc:XMLDocument xmlns:doc="urn:document" xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:document urn:XMLDocument.xsd">
+ <doc:Paragraph>Ich bin der erste Absatz in diesem Dokument.</doc:Paragraph>
+ <doc:Paragraph ParaId="Para2">Und ich bin der zweite Absatz in diesem Dokument.
+Ich habe weiters ein eigenens ID-Attribut bekommen.</doc:Paragraph>
+</doc:XMLDocument>
diff --git a/spss/handbook/clients/referencedData/src/main/webapp/XMLDocument.xml b/spss/handbook/clients/referencedData/src/main/webapp/XMLDocument.xml
new file mode 100644
index 000000000..1c48dce36
--- /dev/null
+++ b/spss/handbook/clients/referencedData/src/main/webapp/XMLDocument.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc:XMLDocument xmlns:doc="urn:document">
+ <doc:Paragraph>Ich bin der erste Absatz in diesem Dokument.</doc:Paragraph>
+ <doc:Paragraph ParaId="Para2">Und ich bin der zweite Absatz in diesem Dokument.
+Ich habe weiters ein eigenens ID-Attribut bekommen.</doc:Paragraph>
+</doc:XMLDocument>
diff --git a/spss/handbook/clients/referencedData/src/main/webapp/XMLDocument.xsd b/spss/handbook/clients/referencedData/src/main/webapp/XMLDocument.xsd
new file mode 100644
index 000000000..a2930f1da
--- /dev/null
+++ b/spss/handbook/clients/referencedData/src/main/webapp/XMLDocument.xsd
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema targetNamespace="urn:document" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:document" elementFormDefault="qualified" attributeFormDefault="unqualified">
+ <xs:element name="XMLDocument">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Paragraph" maxOccurs="unbounded">
+ <xs:complexType mixed="true">
+ <xs:attribute name="ParaId" type="xs:ID" use="optional"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
diff --git a/spss/handbook/clients/referencedData/src/main/webapp/XMLDocument.xsl b/spss/handbook/clients/referencedData/src/main/webapp/XMLDocument.xsl
new file mode 100644
index 000000000..85755c2e6
--- /dev/null
+++ b/spss/handbook/clients/referencedData/src/main/webapp/XMLDocument.xsl
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:doc="urn:document">
+ <xsl:output encoding="UTF-8" method="xml" indent="yes"/>
+ <xsl:template match="/doc:XMLDocument">
+ <html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>HTML-Dokument</title>
+ </head>
+ <body>
+ <xsl:for-each select="doc:Paragraph">
+ <p>
+ <xsl:value-of select="child::text()"/>
+ </p>
+ </xsl:for-each>
+ </body>
+ </html>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/spss/handbook/clients/referencedData/src/main/webapp/XMLDocumentRef.xsl b/spss/handbook/clients/referencedData/src/main/webapp/XMLDocumentRef.xsl
new file mode 100644
index 000000000..c385f9d1f
--- /dev/null
+++ b/spss/handbook/clients/referencedData/src/main/webapp/XMLDocumentRef.xsl
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:include href="XMLDocument.Para.xsl"/>
+</xsl:stylesheet>
diff --git a/spss/handbook/clients/webservice/.classpath b/spss/handbook/clients/webservice/.classpath
new file mode 100644
index 000000000..8619241eb
--- /dev/null
+++ b/spss/handbook/clients/webservice/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/spss/handbook/clients/webservice/.project b/spss/handbook/clients/webservice/.project
new file mode 100644
index 000000000..8f4c7fe37
--- /dev/null
+++ b/spss/handbook/clients/webservice/.project
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>moa-spss-handbook-webserviceClient</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
diff --git a/spss/handbook/clients/webservice/.settings/org.eclipse.jdt.core.prefs b/spss/handbook/clients/webservice/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..dee421f20
--- /dev/null
+++ b/spss/handbook/clients/webservice/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,5 @@
+#Wed Nov 07 07:57:10 GMT 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.source=1.4
diff --git a/spss/handbook/clients/webservice/.settings/org.maven.ide.eclipse.prefs b/spss/handbook/clients/webservice/.settings/org.maven.ide.eclipse.prefs
new file mode 100644
index 000000000..1964c59a4
--- /dev/null
+++ b/spss/handbook/clients/webservice/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,9 @@
+#Tue Jul 07 16:06:54 CEST 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
diff --git a/spss/handbook/clients/webservice/conf/http.properties b/spss/handbook/clients/webservice/conf/http.properties
new file mode 100644
index 000000000..8bf490a85
--- /dev/null
+++ b/spss/handbook/clients/webservice/conf/http.properties
@@ -0,0 +1,78 @@
+###
+# Properties für den HTTP(S) Client
+###
+
+#
+# Signieren
+#
+
+# Name des Webservices, fix "SignatureCreation"
+signServiceQName = SignatureCreation
+
+# Zugangspunkt des Webservices
+signServiceEndPoint = http://localhost:8080/moa-spss/services/SignatureCreation
+#signServiceEndPoint = https://localhost:8443/moa-spss/services/SignatureCreation
+
+# Name des zu sendenden Signaturerstellungsrequests (entweder absolute
+# oder relative Pfadangabe; eine relative Pfadangabe wird relativ zum
+# Arbeitsverzeichnis der Java VM interpretiert)
+signRequest = resources/requests/CreateXMLSignatureRequest.Simple.xml
+#signRequest=resources/requests/CreateXMLSignatureRequest.Refs.xml
+#signRequest=resources/requests/CreateXMLSignatureRequest.Transforms.xml
+#signRequest=resources/requests/CreateXMLSignatureRequest.Supplements.xml
+
+
+#
+# Verifizieren
+#
+
+# Name des Webservices, fix "SignatureVerification"
+verifyServiceQName = SignatureVerification
+
+# Zugangspunkt des Webservices
+verifyServiceEndPoint = http://localhost:18080/moa-spss/services/SignatureVerification
+#verifyServiceEndPoint = https://localhost:8443/moa-spss/services/SignatureVerification
+
+# Name des zu sendenden Signaturprüfrequests (entweder absolute
+# oder relative Pfadangabe; eine relative Pfadangabe wird relativ zum
+# Arbeitsverzeichnis der Java VM interpretiert)
+verifyRequest=resources/requests/VerifyCMSSignatureRequest.Simple.xml
+#verifyRequest=resources/requests/VerifyCMSSignatureRequest.Extended.xml
+#verifyRequest=resources/requests/VerifyXMLSignatureRequest.Simple.xml
+#verifyRequest=resources/requests/VerifyXMLSignatureRequest.Enveloped.xml
+#verifyRequest=resources/requests/VerifyXMLSignatureRequest.Supplements.xml
+#verifyRequest=resources/requests/VerifyXMLSignatureRequest.SigManifest.xml
+#verifyRequest=resources/requests/VerifyXMLSignatureRequest.XMLDSigManifest.xml
+#verifyRequest=resources/requests/VerifyXMLSignatureRequest.FileURIs.xml
+#verifyRequest=resources/requests/VerifyXMLSignatureRequest.FileURIs.DataObject.xml
+#verifyRequest=resources/requests/VerifyXMLSignatureRequest.FileURIs.Supplements.xml
+#verifyRequest=resources/requests/VerifyXMLSignatureRequest.FileURIs.ServerSupplements.xml
+
+#
+# JSSE-Konfiguration
+#
+
+# Typ des JSSE-Truststores (entweder "JKS" für einen Java Key Store oder
+# "PKCS12" für eine PKCS#12-Datei).
+ssl.truststore.type = JKS
+
+# Relativer oder absoluter Pfad zum JSSE-Truststore. Ein relativer Pfad
+# wird relativ zum Arbeitsverzeichnis der Java VM interpretiert).
+ssl.truststore.loc = resources/sslKeys/customer1/trustedServers[pwd=servers].keystore
+#ssl.truststore.loc = resources/sslKeys/customer2/trustedServers[pwd=servers].keystore
+
+# Passwort für den JSSE-Truststore.
+ssl.truststore.pwd = servers
+
+# Typ des JSSE-Keystores (entweder "JKS" für einen Java Key Store oder
+# "PKCS12" für eine PKCS#12-Datei).
+ssl.keystore.type = PKCS12
+
+# Relativer oder absoluter Pfad zum JSSE-Keystore. Ein relativer Pfad
+# wird relativ zum Arbeitsverzeichnis der Java VM interpretiert).
+ssl.keystore.loc = resources/sslKeys/customer1/moa-ssl-kunde1[pwd=kunde1].p12
+#ssl.keystore.loc = resources/sslKeys/customer2/moa-ssl-kunde2[pwd=kunde2].p12
+
+# Passwort für den JSSE-Keystore.
+ssl.keystore.pwd = kunde1
+#ssl.keystore.pwd = kunde2
diff --git a/spss/handbook/clients/webservice/conf/log4j.properties b/spss/handbook/clients/webservice/conf/log4j.properties
new file mode 100644
index 000000000..bf7c98c0c
--- /dev/null
+++ b/spss/handbook/clients/webservice/conf/log4j.properties
@@ -0,0 +1,25 @@
+# commons-logging setup
+org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.Log4jFactory
+
+# define log4j root loggers
+log4j.rootLogger=info, stdout
+#log4j.rootLogger=info, stdout, R
+#log4j.logger.moa=info
+#log4j.logger.moa.spss.server=debug
+#log4j.logger.iaik.server=info
+#log4j.logger.moa.id.auth=debug
+#log4j.logger.moa.id.proxy=debug
+
+# configure the stdout appender
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%5p | %d{dd HH:mm:ss,SSS} | %20.20c | %10t | %m%n
+
+# configure the rolling file appender (R)
+log4j.appender.R=org.apache.log4j.RollingFileAppender
+log4j.appender.R.File=${catalina.base}/logs/moa-id.log
+log4j.appender.R.MaxFileSize=10000KB
+log4j.appender.R.MaxBackupIndex=1
+log4j.appender.R.layout=org.apache.log4j.PatternLayout
+log4j.appender.R.layout.ConversionPattern=%5p | %d{dd HH:mm:ss,SSS} | %t | %m%n
+
diff --git a/spss/handbook/clients/webservice/pom.xml b/spss/handbook/clients/webservice/pom.xml
new file mode 100644
index 000000000..70aefa4bc
--- /dev/null
+++ b/spss/handbook/clients/webservice/pom.xml
@@ -0,0 +1,137 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>MOA.spss.handbook.clients</groupId>
+ <artifactId>moa-spss-handbook-clients</artifactId>
+ <version>1.5</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>MOA.spss.handbook.clients</groupId>
+ <artifactId>moa-spss-handbook-webserviceClient</artifactId>
+ <packaging>jar</packaging>
+ <version>1.5</version>
+ <name>MOA SP/SS Handbook WebService Client</name>
+
+ <properties>
+ <repositoryPath>${basedir}/../../../../../repository</repositoryPath>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>axis</groupId>
+ <artifactId>axis</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>axis</groupId>
+ <artifactId>axis-jaxrpc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>axis</groupId>
+ <artifactId>axis-saaj</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>axis</groupId>
+ <artifactId>axis-wsdl4j</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-discovery</groupId>
+ <artifactId>commons-discovery</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.activation</groupId>
+ <artifactId>activation</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>xalan</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>xml-apis</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>serializer</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_moa</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_ixsil</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_jce_full</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_ecc</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_cms</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Provider</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Wrapper</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Wrapper</artifactId>
+ <classifier>win32</classifier>
+ <type>dll</type>
+ <scope>runtime</scope>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>MOA</groupId>
+ <artifactId>moa-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>MOA.spss.server</groupId>
+ <artifactId>moa-spss-lib</artifactId>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Refs.resp.xml b/spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Refs.resp.xml
new file mode 100644
index 000000000..bad31d170
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Refs.resp.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CreateXMLSignatureResponse xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><SignatureEnvironment><doc:XMLDocument xmlns:doc="urn:document">
+ <doc:Paragraph>Ich bin der erste Absatz in diesem Dokument.</doc:Paragraph>
+ <doc:Paragraph ParaId="Para2">Und ich bin der zweite Absatz in diesem Dokument.
+Ich habe weiters ein eigenens ID-Attribut bekommen.</doc:Paragraph><dsig:Signature Id="signature-1-1" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:SignedInfo><dsig:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><dsig:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"/><dsig:Reference Id="reference-1-2" URI="#xpointer(id(&apos;signed-data-1-2-1&apos;)/node())"><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>A8ml6/aZKCmj1hONwvLItIwGHoc=</dsig:DigestValue></dsig:Reference><dsig:Reference Id="reference-1-3" URI="#xpointer(id(&apos;signed-data-1-3-1&apos;)/node())"><dsig:Transforms><dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#base64"/></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>0P878Dsmtxv5goj+6KgNmj6S/EE=</dsig:DigestValue></dsig:Reference><dsig:Reference Id="reference-1-4" URI="#xpointer(id(&apos;signed-data-1-4-1&apos;)/node())"><dsig:Transforms><dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#base64"/></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>0P878Dsmtxv5goj+6KgNmj6S/EE=</dsig:DigestValue></dsig:Reference><dsig:Reference Id="reference-1-6" URI="NichtAufloesbareReferenz1"><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>2b83+NbXDFijHzz+sH0T7fM36sA=</dsig:DigestValue></dsig:Reference><dsig:Reference Id="reference-1-7" URI="http://localhost:8080/referencedData/Text.txt"><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>0P878Dsmtxv5goj+6KgNmj6S/EE=</dsig:DigestValue></dsig:Reference><dsig:Reference Id="reference-1-8" URI="NichtAufloesbareReferenz2"><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>0P878Dsmtxv5goj+6KgNmj6S/EE=</dsig:DigestValue></dsig:Reference><dsig:Reference Id="reference-1-9" URI=""><dsig:Transforms><dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>2b83+NbXDFijHzz+sH0T7fM36sA=</dsig:DigestValue></dsig:Reference><dsig:Reference Type="http://www.w3.org/2000/09/xmldsig#Manifest" URI="#dsig-manifest-1-1"><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>mNsxUkFoF46XZVBivBo4aasFCTQ=</dsig:DigestValue></dsig:Reference></dsig:SignedInfo><dsig:SignatureValue>kaAiAZgnUMYb3/IV5mmJinrH3et5M+o4OWMhgA3C9SZSPsE+ptWUAPU1VKl1G2AF</dsig:SignatureValue><dsig:KeyInfo><dsig:X509Data><dsig:X509Certificate>MIID+DCCA2WgAwIBAgIBCTAJBgUrDgMCHQUAMH8xCzAJBgNVBAYTAkFUMSwwKgYD
+VQQKEyNTdGFic3RlbGxlIElLVC1TdHJhdGVnaWUgZGVzIEJ1bmRlczEeMBwGA1UE
+CxMVVGVjaG5payB1bmQgU3RhbmRhcmRzMSIwIAYDVQQDExlUZXN0IENBIC0gU2ln
+bmF0dXJkaWVuc3RlMB4XDTA0MDgwNDA4MjM0OFoXDTA3MDgwNDA4MjM0OFowgZgx
+CzAJBgNVBAYTAkFUMS0wKwYDVQQKEyRTdGFic3N0ZWxsZSBJS1QtU3RyYXRlZ2ll
+IGRlcyBCdW5kZXMxHjAcBgNVBAsTFVRlY2huaWsgdW5kIFN0YW5kYXJkczE6MDgG
+A1UEAxMxVGVzdDogU2lnbmF0dXJkaWVuc3QgYWxsZXIgS3VuZGVuOiBFQ0RTQSAo
+UDE5MnYxKTCB8zCBvAYHKoZIzj0CATCBsAIBATAkBgcqhkjOPQEBAhkA////////
+/////////////v//////////MDQEGP////////////////////7//////////AQY
+ZCEFGeWcgOcPp+mrciQwSf643uzBRrmxBDEEGI2oDrAwkPZ8vyDrQ6GIAPT/Cv2C
+/xASBxkrlf/I2nhjEBHtayTN1XP5d6EeeUgRAhkA////////////////md74NhRr
+ybG00igxAgEBAzIABNHWY9lQOE1zgmpcpjTg2WIg6qgEsGhpXELPinJoMPDVheTv
+2BZPG42YJsNfvWgC06OCARwwggEYMA4GA1UdDwEB/wQEAwIGwDAMBgNVHRMBAf8E
+AjAAMB0GA1UdDgQWBBRHH5EXnrWosCmIa+JyEM5seMxFVzBdBgNVHSAEVjBUMFIG
+DCsGAQQBlRIBAgMBATBCMEAGCCsGAQUFBwICMDQaMkRpZXNlcyBaZXJ0aWZpa2F0
+IGlzdCBudXIgZvxyIFRlc3R6d2Vja2UgZ2VlaWduZXQuMEMGA1UdHwQ8MDowOKA2
+oDSGMmh0dHA6Ly9sYWJzLmNpby5ndi5hdC90ZW1wL2NybHMvc2lnbmF0dXJkaWVu
+c3QuY3JsMBQGByooAAoBAQEECQwHQktBLUlLVDAfBgNVHSMEGDAWgBRAl0P5fWaw
+vf59+uxGcYY9wffZPTAJBgUrDgMCHQUAA4GBAIMKUsnajgfBtpHeDdMdQMLA8fdt
+lluezDOM78WYYSFURP04QZk5iHkShzptgZCF5Y/T4an3dC3SnytL67LJvEoKUyja
+iTMLo7650xRTvAjTaMJ+nly/wTRYJKplOLXKWj3WwfObMHXdsDE8NJmpJSRE7Sw7
++tj+UiTiNNSaXirq</dsig:X509Certificate></dsig:X509Data></dsig:KeyInfo><dsig:Object Id="signed-data-1-2-1"><doc:XMLDocument xmlns:doc="urn:document">
+ <doc:Paragraph>Ich bin der erste Absatz in diesem Dokument.</doc:Paragraph>
+ <doc:Paragraph ParaId="Para2">Und ich bin der zweite Absatz in diesem Dokument.
+Ich habe weiters ein eigenens ID-Attribut bekommen.</doc:Paragraph>
+</doc:XMLDocument></dsig:Object><dsig:Object Id="signed-data-1-3-1">RGllc2UgRGF0ZW4gc2luZCByZWluZXIgVGV4dC4=</dsig:Object><dsig:Object Id="signed-data-1-4-1">RGllc2UgRGF0ZW4gc2luZCByZWluZXIgVGV4dC4=</dsig:Object><dsig:Object Id="signed-data-1-1-1">RGllc2UgRGF0ZW4gd2FyZW4gYmFzZTY0IGtvZGllcnQu</dsig:Object><dsig:Object><dsig:Manifest Id="dsig-manifest-1-1"><dsig:Reference Id="reference-1-1" URI="#xpointer(id(&apos;signed-data-1-1-1&apos;)/node())"><dsig:Transforms><dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#base64"/></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>a53jOsL7KbyltpByAK87FoMZphI=</dsig:DigestValue></dsig:Reference><dsig:Reference Id="reference-1-5" URI="http://localhost:8080/referencedData/Text.b64"><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>a53jOsL7KbyltpByAK87FoMZphI=</dsig:DigestValue></dsig:Reference></dsig:Manifest></dsig:Object></dsig:Signature>
+</doc:XMLDocument></SignatureEnvironment></CreateXMLSignatureResponse> \ No newline at end of file
diff --git a/spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Refs.xml b/spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Refs.xml
new file mode 100644
index 000000000..f4dd2dbb6
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Refs.xml
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CreateXMLSignatureRequest xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
+ <KeyIdentifier>KG_allgemein</KeyIdentifier>
+ <SingleSignatureInfo SecurityLayerConformity="false">
+ <!--Enveloping Data, direkte Angabe der Daten in base64 kodierter Form; Manifest-Referenz-->
+ <DataObjectInfo Structure="enveloping" ChildOfManifest="true">
+ <DataObject>
+ <Base64Content>RGllc2UgRGF0ZW4gd2FyZW4gYmFzZTY0IGtvZGllcnQu</Base64Content>
+ </DataObject>
+ <CreateTransformsInfoProfile>
+ <CreateTransformsInfo>
+ <FinalDataMetaInfo>
+ <MimeType>text/plain</MimeType>
+ </FinalDataMetaInfo>
+ </CreateTransformsInfo>
+ </CreateTransformsInfoProfile>
+ </DataObjectInfo>
+ <!--Enveloping Data, direkte Angabe der Daten als XML-Fragment; SignedInfo-Referenz-->
+ <DataObjectInfo Structure="enveloping" ChildOfManifest="false">
+ <DataObject>
+ <XMLContent><doc:XMLDocument xmlns:doc="urn:document">
+ <doc:Paragraph>Ich bin der erste Absatz in diesem Dokument.</doc:Paragraph>
+ <doc:Paragraph ParaId="Para2">Und ich bin der zweite Absatz in diesem Dokument.
+Ich habe weiters ein eigenens ID-Attribut bekommen.</doc:Paragraph>
+</doc:XMLDocument></XMLContent>
+ </DataObject>
+ <CreateTransformsInfoProfile>
+ <CreateTransformsInfo>
+ <FinalDataMetaInfo>
+ <MimeType>application/xml</MimeType>
+ </FinalDataMetaInfo>
+ </CreateTransformsInfo>
+ </CreateTransformsInfoProfile>
+ </DataObjectInfo>
+ <!--Enveloping Data, Angabe der Daten als Referenz mittels Reference-Attribut, die von MOA aufgelöst wird; SignedInfo-Referenz-->
+ <DataObjectInfo Structure="enveloping" ChildOfManifest="false">
+ <DataObject Reference="http://localhost:8080/referencedData/Text.txt"/>
+ <CreateTransformsInfoProfile>
+ <CreateTransformsInfo>
+ <FinalDataMetaInfo>
+ <MimeType>text/plain</MimeType>
+ </FinalDataMetaInfo>
+ </CreateTransformsInfo>
+ </CreateTransformsInfoProfile>
+ </DataObjectInfo>
+ <!--Enveloping Data, Angabe der Daten als Referenz mittels LocRefContent, die von MOA aufgelöst wird; SignedInfo-Referenz-->
+ <DataObjectInfo Structure="enveloping" ChildOfManifest="false">
+ <DataObject>
+ <LocRefContent>http://localhost:8080/referencedData/Text.txt</LocRefContent>
+ </DataObject>
+ <CreateTransformsInfoProfile>
+ <CreateTransformsInfo>
+ <FinalDataMetaInfo>
+ <MimeType>text/plain</MimeType>
+ </FinalDataMetaInfo>
+ </CreateTransformsInfo>
+ </CreateTransformsInfoProfile>
+ </DataObjectInfo>
+ <!--Detached Daten; direkte Angabe der Daten in base64 kodierter Form; Referenzierung für die Signatur muss durch Reference-Attribut angegeben werden; Manifest-Referenz-->
+ <DataObjectInfo Structure="detached" ChildOfManifest="true">
+ <DataObject Reference="http://localhost:8080/referencedData/Text.b64">
+ <Base64Content>RGllc2UgRGF0ZW4gd2FyZW4gYmFzZTY0IGtvZGllcnQu</Base64Content>
+ </DataObject>
+ <CreateTransformsInfoProfile>
+ <CreateTransformsInfo>
+ <FinalDataMetaInfo>
+ <MimeType>text/plain</MimeType>
+ </FinalDataMetaInfo>
+ </CreateTransformsInfo>
+ </CreateTransformsInfoProfile>
+ </DataObjectInfo>
+ <!--Detached Daten; direkte Angabe der Daten als XML-Fragment; Referenzierung in der Signatur muss durch Reference-Attribut angegeben werden; SignedInfo-Referenz-->
+ <DataObjectInfo Structure="detached" ChildOfManifest="false">
+ <DataObject Reference="NichtAufloesbareReferenz1">
+ <XMLContent><doc:XMLDocument xmlns:doc="urn:document">
+ <doc:Paragraph>Ich bin der erste Absatz in diesem Dokument.</doc:Paragraph>
+ <doc:Paragraph ParaId="Para2">Und ich bin der zweite Absatz in diesem Dokument.
+Ich habe weiters ein eigenens ID-Attribut bekommen.</doc:Paragraph>
+</doc:XMLDocument></XMLContent>
+ </DataObject>
+ <CreateTransformsInfoProfile>
+ <CreateTransformsInfo>
+ <FinalDataMetaInfo>
+ <MimeType>application/xml</MimeType>
+ </FinalDataMetaInfo>
+ </CreateTransformsInfo>
+ </CreateTransformsInfoProfile>
+ </DataObjectInfo>
+ <!--Detached Daten;Angabe der Daten als Referenz über das Reference-Attribut, die von MOA aufgelöst wird; Referenzierung für die Signatur muss durch Reference-Attribut angegeben werden; SignedInfo-Referenz-->
+ <DataObjectInfo Structure="detached" ChildOfManifest="false">
+ <DataObject Reference="http://localhost:8080/referencedData/Text.txt">
+ </DataObject>
+ <CreateTransformsInfoProfile>
+ <CreateTransformsInfo>
+ <FinalDataMetaInfo>
+ <MimeType>text/plain</MimeType>
+ </FinalDataMetaInfo>
+ </CreateTransformsInfo>
+ </CreateTransformsInfoProfile>
+ </DataObjectInfo>
+ <!--Detached Daten;Angabe der Daten als Referenz mittels LocRefContent, die von MOA aufgelöst wird; Referenzierung für die Signatur muss durch Reference-Attribut angegeben werden; SignedInfo-Referenz-->
+ <DataObjectInfo Structure="detached" ChildOfManifest="false">
+ <DataObject Reference="NichtAufloesbareReferenz2">
+ <LocRefContent>http://localhost:8080/referencedData/Text.txt</LocRefContent>
+ </DataObject>
+ <CreateTransformsInfoProfile>
+ <CreateTransformsInfo>
+ <FinalDataMetaInfo>
+ <MimeType>text/plain</MimeType>
+ </FinalDataMetaInfo>
+ </CreateTransformsInfo>
+ </CreateTransformsInfoProfile>
+ </DataObjectInfo>
+ <!--Detached Daten, Verweis auf jenes Dokument, das die Signatur beinhalten wird; Angabe der Daten als Referenz über das Reference-Attribut, die von MOA aufgelöst wird; Referenzierung für die Signatur muss durch Reference-Attribut angegeben werden; SignedInfo-Referenz-->
+ <DataObjectInfo Structure="detached">
+ <DataObject Reference=""/>
+ <CreateTransformsInfoProfile>
+ <CreateTransformsInfo>
+ <dsig:Transforms>
+ <dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
+ </dsig:Transforms>
+ <FinalDataMetaInfo>
+ <MimeType>application/xml</MimeType>
+ </FinalDataMetaInfo>
+ </CreateTransformsInfo>
+ </CreateTransformsInfoProfile>
+ </DataObjectInfo>
+ <CreateSignatureInfo>
+ <CreateSignatureEnvironment>
+ <LocRefContent>http://localhost:8080/referencedData/XMLDocument.xml</LocRefContent>
+ </CreateSignatureEnvironment>
+ <CreateSignatureEnvironmentProfile>
+ <CreateSignatureLocation Index="4" xmlns:doc="urn:document">/doc:XMLDocument</CreateSignatureLocation>
+ </CreateSignatureEnvironmentProfile>
+ </CreateSignatureInfo>
+ </SingleSignatureInfo>
+</CreateXMLSignatureRequest> \ No newline at end of file
diff --git a/spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Simple.resp.xml b/spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Simple.resp.xml
new file mode 100644
index 000000000..edcb03c09
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Simple.resp.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CreateXMLSignatureResponse xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><SignatureEnvironment><dsig:Signature Id="signature-1-1" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:SignedInfo><dsig:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><dsig:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"/><dsig:Reference Id="reference-1-1" URI="#xpointer(id(&apos;signed-data-1-1-1&apos;)/node())"><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>tLODyeiWFbAkQKwhrR23jtcgu4k=</dsig:DigestValue></dsig:Reference></dsig:SignedInfo><dsig:SignatureValue>VEjXB6+geUL16oTPDVx5lcQliGl/oyVobug3BVxVwhu8CU7WK65moTcTuo/CL2hQ</dsig:SignatureValue><dsig:KeyInfo><dsig:X509Data><dsig:X509Certificate>MIID+DCCA2WgAwIBAgIBCTAJBgUrDgMCHQUAMH8xCzAJBgNVBAYTAkFUMSwwKgYD
+VQQKEyNTdGFic3RlbGxlIElLVC1TdHJhdGVnaWUgZGVzIEJ1bmRlczEeMBwGA1UE
+CxMVVGVjaG5payB1bmQgU3RhbmRhcmRzMSIwIAYDVQQDExlUZXN0IENBIC0gU2ln
+bmF0dXJkaWVuc3RlMB4XDTA0MDgwNDA4MjM0OFoXDTA3MDgwNDA4MjM0OFowgZgx
+CzAJBgNVBAYTAkFUMS0wKwYDVQQKEyRTdGFic3N0ZWxsZSBJS1QtU3RyYXRlZ2ll
+IGRlcyBCdW5kZXMxHjAcBgNVBAsTFVRlY2huaWsgdW5kIFN0YW5kYXJkczE6MDgG
+A1UEAxMxVGVzdDogU2lnbmF0dXJkaWVuc3QgYWxsZXIgS3VuZGVuOiBFQ0RTQSAo
+UDE5MnYxKTCB8zCBvAYHKoZIzj0CATCBsAIBATAkBgcqhkjOPQEBAhkA////////
+/////////////v//////////MDQEGP////////////////////7//////////AQY
+ZCEFGeWcgOcPp+mrciQwSf643uzBRrmxBDEEGI2oDrAwkPZ8vyDrQ6GIAPT/Cv2C
+/xASBxkrlf/I2nhjEBHtayTN1XP5d6EeeUgRAhkA////////////////md74NhRr
+ybG00igxAgEBAzIABNHWY9lQOE1zgmpcpjTg2WIg6qgEsGhpXELPinJoMPDVheTv
+2BZPG42YJsNfvWgC06OCARwwggEYMA4GA1UdDwEB/wQEAwIGwDAMBgNVHRMBAf8E
+AjAAMB0GA1UdDgQWBBRHH5EXnrWosCmIa+JyEM5seMxFVzBdBgNVHSAEVjBUMFIG
+DCsGAQQBlRIBAgMBATBCMEAGCCsGAQUFBwICMDQaMkRpZXNlcyBaZXJ0aWZpa2F0
+IGlzdCBudXIgZvxyIFRlc3R6d2Vja2UgZ2VlaWduZXQuMEMGA1UdHwQ8MDowOKA2
+oDSGMmh0dHA6Ly9sYWJzLmNpby5ndi5hdC90ZW1wL2NybHMvc2lnbmF0dXJkaWVu
+c3QuY3JsMBQGByooAAoBAQEECQwHQktBLUlLVDAfBgNVHSMEGDAWgBRAl0P5fWaw
+vf59+uxGcYY9wffZPTAJBgUrDgMCHQUAA4GBAIMKUsnajgfBtpHeDdMdQMLA8fdt
+lluezDOM78WYYSFURP04QZk5iHkShzptgZCF5Y/T4an3dC3SnytL67LJvEoKUyja
+iTMLo7650xRTvAjTaMJ+nly/wTRYJKplOLXKWj3WwfObMHXdsDE8NJmpJSRE7Sw7
++tj+UiTiNNSaXirq</dsig:X509Certificate></dsig:X509Data></dsig:KeyInfo><dsig:Object Id="signed-data-1-1-1">Diese Daten werden signiert.</dsig:Object></dsig:Signature></SignatureEnvironment></CreateXMLSignatureResponse> \ No newline at end of file
diff --git a/spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Simple.response.xml b/spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Simple.response.xml
new file mode 100644
index 000000000..cb966151b
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Simple.response.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CreateXMLSignatureResponse xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><SignatureEnvironment><dsig:Signature Id="signature-1-1"><dsig:SignedInfo><dsig:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><dsig:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"/><dsig:Reference Id="reference-1-1" URI="#xpointer(id('signed-data-1-1-1')/node())"><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>tLODyeiWFbAkQKwhrR23jtcgu4k=</dsig:DigestValue></dsig:Reference></dsig:SignedInfo><dsig:SignatureValue>2tI1Wv/LsUKr0hcsWSYXSHne7kbCBXGFrIiI/1WfAH2ba8vT5kVfJn4NOBOBatLA</dsig:SignatureValue><dsig:KeyInfo><dsig:X509Data><dsig:X509Certificate>MIIELjCCAxagAwIBAgIBEzANBgkqhkiG9w0BAQUFADBEMQswCQYDVQQGEwJBVDEQ
+MA4GA1UEChMHVFUgR3JhejENMAsGA1UECxMERUdJWjEUMBIGA1UEAxMLTU9BIFRl
+c3QgQ0EwHhcNMDcwODIzMTM1ODU0WhcNMTIwODIzMTM1ODU0WjBpMQswCQYDVQQG
+EwJBVDEQMA4GA1UEChMHVFUgR1JBWjENMAsGA1UECxMERUdJWjE5MDcGA1UEAxMw
+VGVzdCBTaWduYXR1cmRpZW5zdCBhbGxlciBLdW5kZW46IEVDRFNBIChQMTkydjEp
+MIHzMIG8BgcqhkjOPQIBMIGwAgEBMCQGByqGSM49AQECGQD/////////////////
+///+//////////8wNAQY/////////////////////v/////////8BBhkIQUZ5ZyA
+5w+n6atyJDBJ/rje7MFGubEEMQQYjagOsDCQ9ny/IOtDoYgA9P8K/YL/EBIHGSuV
+/8jaeGMQEe1rJM3Vc/l3oR55SBECGQD///////////////+Z3vg2FGvJsbTSKDEC
+AQEDMgAExf78b6N6BUhK+FHmunDUCQefSxpQmC6m4yq/+pqdDMJalTWATFhQwZqE
+qSMXJ2Tqo4IBNDCCATAwDgYDVR0PAQH/BAQDAgbAMAwGA1UdEwEB/wQCMAAwHQYD
+VR0OBBYEFBrwapQSMwabwPPOijtgOu3iNlt3MHAGA1UdIARpMGcwZQYMKwYBBAGV
+EgECewEBMFUwUwYIKwYBBQUHAgIwRxpFVGhpcyBjZXJ0aWZpY2F0ZSBvbmx5IG1h
+eSBiZSB1c2VkIGZvciBkZW1vbnN0cmF0aW9uIGFuZCB0ZXN0IHB1cnBvc2VzMEYG
+A1UdHwQ/MD0wO6A5oDeGNWh0dHA6Ly9tb2EtaWRzcHNzLmVnb3ZsYWJzLmd2LmF0
+L2NybHMvbW9hLXRlc3QtY2EuY3JsMBYGByooAAoBAQEECxMJRUdJWi1UZXN0MB8G
+A1UdIwQYMBaAFFKXvB3Ugd6H51ClcBGdjhYJNiRSMA0GCSqGSIb3DQEBBQUAA4IB
+AQB60RLi9zIwF/Rmy/Wo0yf1/ZktElIt91vfBsXlpgLJ4Q6ol/4hTjMJ4FIa8GOl
+0b9dIkEe+WGq77JFJVgltsRoJfQBSvnK9jdLfB5YJD0ETDnMdckBV+RsxkEtl5Lr
+IrT6vExyJUAWz15XJiHgkYZncJCBTy1oh8f3V8cR1VZYwO4QBRDwRdVdZsaL5PME
+vvLrcAMJhF5fS4AiqMex2Eh2kav5t6/I5bmB4CKEe+0+dPO8DGl7areEfzQEPd8p
+jkkX5PnxriQvZfgVzwrdXGDqMTnBNaRtCGMiQU/0kp21a6BVtT4am27yr9p3ddhl
+z7sJ4Z6ys1bwB0on/O65tdn7</dsig:X509Certificate></dsig:X509Data></dsig:KeyInfo><dsig:Object Id="signed-data-1-1-1">Diese Daten werden signiert.</dsig:Object></dsig:Signature></SignatureEnvironment></CreateXMLSignatureResponse> \ No newline at end of file
diff --git a/spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Simple.xml b/spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Simple.xml
new file mode 100644
index 000000000..3344b4709
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Simple.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CreateXMLSignatureRequest xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
+ <KeyIdentifier>KG_allgemein</KeyIdentifier>
+ <SingleSignatureInfo SecurityLayerConformity="false">
+ <DataObjectInfo Structure="enveloping">
+ <DataObject>
+ <XMLContent>Diese Daten werden signiert.</XMLContent>
+ </DataObject>
+ <CreateTransformsInfoProfile>
+ <CreateTransformsInfo>
+ <FinalDataMetaInfo>
+ <MimeType>text/plain</MimeType>
+ </FinalDataMetaInfo>
+ </CreateTransformsInfo>
+ </CreateTransformsInfoProfile>
+ </DataObjectInfo>
+ </SingleSignatureInfo>
+</CreateXMLSignatureRequest>
+
diff --git a/spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Supplements.resp.xml b/spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Supplements.resp.xml
new file mode 100644
index 000000000..def0daf25
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Supplements.resp.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CreateXMLSignatureResponse xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><SignatureEnvironment><doc:XMLDocument xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:doc="urn:document" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:document urn:XMLDocument.xsd">
+ <doc:Paragraph>Ich bin der erste Absatz in diesem Dokument.</doc:Paragraph>
+ <doc:Paragraph ParaId="Para2">Und ich bin der zweite Absatz in diesem Dokument.
+Ich habe weiters ein eigenens ID-Attribut bekommen.</doc:Paragraph><dsig:Signature Id="signature-1-1" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:SignedInfo><dsig:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><dsig:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"/><dsig:Reference Id="reference-1-1" URI="#Para2"><dsig:Transforms><dsig:Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116"><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:include href="XMLDocument.Para.xsl"/>
+</xsl:stylesheet></dsig:Transform><dsig:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>luM3wUmedTvkMHVedQkA/8otXUE=</dsig:DigestValue></dsig:Reference></dsig:SignedInfo><dsig:SignatureValue>vGVimRmUHwrDR8feQCK1DZ2kyDw0CCrXimJi/yCrIoqSkUKFlKrtAyP2RUBXXjye</dsig:SignatureValue><dsig:KeyInfo><dsig:X509Data><dsig:X509Certificate>MIID+DCCA2WgAwIBAgIBCTAJBgUrDgMCHQUAMH8xCzAJBgNVBAYTAkFUMSwwKgYD
+VQQKEyNTdGFic3RlbGxlIElLVC1TdHJhdGVnaWUgZGVzIEJ1bmRlczEeMBwGA1UE
+CxMVVGVjaG5payB1bmQgU3RhbmRhcmRzMSIwIAYDVQQDExlUZXN0IENBIC0gU2ln
+bmF0dXJkaWVuc3RlMB4XDTA0MDgwNDA4MjM0OFoXDTA3MDgwNDA4MjM0OFowgZgx
+CzAJBgNVBAYTAkFUMS0wKwYDVQQKEyRTdGFic3N0ZWxsZSBJS1QtU3RyYXRlZ2ll
+IGRlcyBCdW5kZXMxHjAcBgNVBAsTFVRlY2huaWsgdW5kIFN0YW5kYXJkczE6MDgG
+A1UEAxMxVGVzdDogU2lnbmF0dXJkaWVuc3QgYWxsZXIgS3VuZGVuOiBFQ0RTQSAo
+UDE5MnYxKTCB8zCBvAYHKoZIzj0CATCBsAIBATAkBgcqhkjOPQEBAhkA////////
+/////////////v//////////MDQEGP////////////////////7//////////AQY
+ZCEFGeWcgOcPp+mrciQwSf643uzBRrmxBDEEGI2oDrAwkPZ8vyDrQ6GIAPT/Cv2C
+/xASBxkrlf/I2nhjEBHtayTN1XP5d6EeeUgRAhkA////////////////md74NhRr
+ybG00igxAgEBAzIABNHWY9lQOE1zgmpcpjTg2WIg6qgEsGhpXELPinJoMPDVheTv
+2BZPG42YJsNfvWgC06OCARwwggEYMA4GA1UdDwEB/wQEAwIGwDAMBgNVHRMBAf8E
+AjAAMB0GA1UdDgQWBBRHH5EXnrWosCmIa+JyEM5seMxFVzBdBgNVHSAEVjBUMFIG
+DCsGAQQBlRIBAgMBATBCMEAGCCsGAQUFBwICMDQaMkRpZXNlcyBaZXJ0aWZpa2F0
+IGlzdCBudXIgZvxyIFRlc3R6d2Vja2UgZ2VlaWduZXQuMEMGA1UdHwQ8MDowOKA2
+oDSGMmh0dHA6Ly9sYWJzLmNpby5ndi5hdC90ZW1wL2NybHMvc2lnbmF0dXJkaWVu
+c3QuY3JsMBQGByooAAoBAQEECQwHQktBLUlLVDAfBgNVHSMEGDAWgBRAl0P5fWaw
+vf59+uxGcYY9wffZPTAJBgUrDgMCHQUAA4GBAIMKUsnajgfBtpHeDdMdQMLA8fdt
+lluezDOM78WYYSFURP04QZk5iHkShzptgZCF5Y/T4an3dC3SnytL67LJvEoKUyja
+iTMLo7650xRTvAjTaMJ+nly/wTRYJKplOLXKWj3WwfObMHXdsDE8NJmpJSRE7Sw7
++tj+UiTiNNSaXirq</dsig:X509Certificate></dsig:X509Data></dsig:KeyInfo></dsig:Signature>
+</doc:XMLDocument></SignatureEnvironment></CreateXMLSignatureResponse> \ No newline at end of file
diff --git a/spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Supplements.response.xml b/spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Supplements.response.xml
new file mode 100644
index 000000000..ac5d0a52f
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Supplements.response.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CreateXMLSignatureResponse xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><ErrorResponse><ErrorCode>2237</ErrorCode><Info>Fehler beim Auflösen der internen Referenz (URI=Para2)</Info></ErrorResponse></CreateXMLSignatureResponse> \ No newline at end of file
diff --git a/spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Supplements.xml b/spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Supplements.xml
new file mode 100644
index 000000000..9144e83f8
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Supplements.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CreateXMLSignatureRequest xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
+ <KeyIdentifier>KG_allgemein</KeyIdentifier>
+ <SingleSignatureInfo SecurityLayerConformity="false">
+ <DataObjectInfo Structure="detached">
+ <DataObject Reference="#Para2"/>
+ <CreateTransformsInfoProfile>
+ <CreateTransformsInfo>
+ <dsig:Transforms>
+ <dsig:Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116">
+ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:include href="XMLDocument.Para.xsl"/>
+</xsl:stylesheet>
+ </dsig:Transform>
+ <dsig:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
+ </dsig:Transforms>
+ <FinalDataMetaInfo>
+ <MimeType>application/xhtml+xml</MimeType>
+ </FinalDataMetaInfo>
+ </CreateTransformsInfo>
+ <Supplement>
+ <Content Reference="XMLDocument.Para.xsl">
+ <LocRefContent>http://localhost:8080/referencedData/XMLDocument.Para.xsl</LocRefContent>
+ </Content>
+ </Supplement>
+ </CreateTransformsInfoProfile>
+ </DataObjectInfo>
+ <CreateSignatureInfo>
+ <CreateSignatureEnvironment Reference="http://localhost:8080/referencedData/XMLDocument.withSchemaHint.xml"/>
+ <CreateSignatureEnvironmentProfile>
+ <CreateSignatureLocation Index="4" xmlns:doc="urn:document">/doc:XMLDocument</CreateSignatureLocation>
+ <Supplement>
+ <Content Reference="urn:XMLDocument.xsd">
+ <LocRefContent>http://localhost:8080/referencedData/XMLDocument.xsd</LocRefContent>
+ </Content>
+ </Supplement>
+ </CreateSignatureEnvironmentProfile>
+ </CreateSignatureInfo>
+ </SingleSignatureInfo>
+</CreateXMLSignatureRequest>
diff --git a/spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Transforms.resp.xml b/spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Transforms.resp.xml
new file mode 100644
index 000000000..1d5bd65ea
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Transforms.resp.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CreateXMLSignatureResponse xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><SignatureEnvironment><dsig:Signature Id="signature-1-1" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:SignedInfo><dsig:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><dsig:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"/><dsig:Reference Id="reference-1-1" URI="http://localhost:8080/referencedData/Text.b64"><dsig:Transforms><dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#base64"/></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>a53jOsL7KbyltpByAK87FoMZphI=</dsig:DigestValue></dsig:Reference><dsig:Reference Id="reference-1-2" URI="http://localhost:8080/referencedData/XMLDocument.xml"><dsig:Transforms><dsig:Transform Algorithm="http://www.w3.org/2002/06/xmldsig-filter2"><xp2:XPath Filter="subtract" xmlns:doc="urn:document" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xf2="http://www.w3.org/2002/06/xmldsig-filter2" xmlns:xp2="http://www.w3.org/2002/06/xmldsig-filter2">/doc:XMLDocument/doc:Paragraph[2]</xp2:XPath></dsig:Transform><dsig:Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116"><xsl:stylesheet version="1.0" xmlns:doc="urn:document" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:output encoding="UTF-8" indent="yes" method="xml"/>
+ <xsl:template match="/doc:XMLDocument">
+ <html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>HTML-Dokument</title>
+ </head>
+ <body>
+ <xsl:for-each select="doc:Paragraph">
+ <p>
+ <xsl:value-of select="child::text()"/>
+ </p>
+ </xsl:for-each>
+ </body>
+ </html>
+ </xsl:template>
+</xsl:stylesheet></dsig:Transform><dsig:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>fIPwneCpjVqTXwHMN9DFfx6tJIU=</dsig:DigestValue></dsig:Reference></dsig:SignedInfo><dsig:SignatureValue>kWm9iFL5UngH8uDG6094K99J/WB/PdlqzfI6WtGpJ3jiCTV7mn/mzYWMv09b3vee</dsig:SignatureValue><dsig:KeyInfo><dsig:X509Data><dsig:X509Certificate>MIID+DCCA2WgAwIBAgIBCTAJBgUrDgMCHQUAMH8xCzAJBgNVBAYTAkFUMSwwKgYD
+VQQKEyNTdGFic3RlbGxlIElLVC1TdHJhdGVnaWUgZGVzIEJ1bmRlczEeMBwGA1UE
+CxMVVGVjaG5payB1bmQgU3RhbmRhcmRzMSIwIAYDVQQDExlUZXN0IENBIC0gU2ln
+bmF0dXJkaWVuc3RlMB4XDTA0MDgwNDA4MjM0OFoXDTA3MDgwNDA4MjM0OFowgZgx
+CzAJBgNVBAYTAkFUMS0wKwYDVQQKEyRTdGFic3N0ZWxsZSBJS1QtU3RyYXRlZ2ll
+IGRlcyBCdW5kZXMxHjAcBgNVBAsTFVRlY2huaWsgdW5kIFN0YW5kYXJkczE6MDgG
+A1UEAxMxVGVzdDogU2lnbmF0dXJkaWVuc3QgYWxsZXIgS3VuZGVuOiBFQ0RTQSAo
+UDE5MnYxKTCB8zCBvAYHKoZIzj0CATCBsAIBATAkBgcqhkjOPQEBAhkA////////
+/////////////v//////////MDQEGP////////////////////7//////////AQY
+ZCEFGeWcgOcPp+mrciQwSf643uzBRrmxBDEEGI2oDrAwkPZ8vyDrQ6GIAPT/Cv2C
+/xASBxkrlf/I2nhjEBHtayTN1XP5d6EeeUgRAhkA////////////////md74NhRr
+ybG00igxAgEBAzIABNHWY9lQOE1zgmpcpjTg2WIg6qgEsGhpXELPinJoMPDVheTv
+2BZPG42YJsNfvWgC06OCARwwggEYMA4GA1UdDwEB/wQEAwIGwDAMBgNVHRMBAf8E
+AjAAMB0GA1UdDgQWBBRHH5EXnrWosCmIa+JyEM5seMxFVzBdBgNVHSAEVjBUMFIG
+DCsGAQQBlRIBAgMBATBCMEAGCCsGAQUFBwICMDQaMkRpZXNlcyBaZXJ0aWZpa2F0
+IGlzdCBudXIgZvxyIFRlc3R6d2Vja2UgZ2VlaWduZXQuMEMGA1UdHwQ8MDowOKA2
+oDSGMmh0dHA6Ly9sYWJzLmNpby5ndi5hdC90ZW1wL2NybHMvc2lnbmF0dXJkaWVu
+c3QuY3JsMBQGByooAAoBAQEECQwHQktBLUlLVDAfBgNVHSMEGDAWgBRAl0P5fWaw
+vf59+uxGcYY9wffZPTAJBgUrDgMCHQUAA4GBAIMKUsnajgfBtpHeDdMdQMLA8fdt
+lluezDOM78WYYSFURP04QZk5iHkShzptgZCF5Y/T4an3dC3SnytL67LJvEoKUyja
+iTMLo7650xRTvAjTaMJ+nly/wTRYJKplOLXKWj3WwfObMHXdsDE8NJmpJSRE7Sw7
++tj+UiTiNNSaXirq</dsig:X509Certificate></dsig:X509Data></dsig:KeyInfo></dsig:Signature></SignatureEnvironment></CreateXMLSignatureResponse> \ No newline at end of file
diff --git a/spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Transforms.xml b/spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Transforms.xml
new file mode 100644
index 000000000..6375365b2
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/CreateXMLSignatureRequest.Transforms.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CreateXMLSignatureRequest xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
+ <KeyIdentifier>KG_allgemein</KeyIdentifier>
+ <SingleSignatureInfo SecurityLayerConformity="false">
+ <DataObjectInfo Structure="detached">
+ <DataObject Reference="http://localhost:8080/referencedData/Text.b64"/>
+ <CreateTransformsInfoProfile>
+ <CreateTransformsInfo>
+ <dsig:Transforms>
+ <dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#base64"/>
+ </dsig:Transforms>
+ <FinalDataMetaInfo>
+ <MimeType>text/plain</MimeType>
+ </FinalDataMetaInfo>
+ </CreateTransformsInfo>
+ </CreateTransformsInfoProfile>
+ </DataObjectInfo>
+ <DataObjectInfo Structure="detached">
+ <DataObject Reference="http://localhost:8080/referencedData/XMLDocument.xml"/>
+ <CreateTransformsInfoProfile>
+ <CreateTransformsInfo>
+ <dsig:Transforms>
+ <dsig:Transform Algorithm="http://www.w3.org/2002/06/xmldsig-filter2">
+ <xp2:XPath xmlns:xp2="http://www.w3.org/2002/06/xmldsig-filter2" xmlns:doc="urn:document" Filter="subtract">/doc:XMLDocument/doc:Paragraph[2]</xp2:XPath>
+ </dsig:Transform>
+ <dsig:Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116"><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:doc="urn:document">
+ <xsl:output encoding="UTF-8" method="xml" indent="yes"/>
+ <xsl:template match="/doc:XMLDocument">
+ <html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>HTML-Dokument</title>
+ </head>
+ <body>
+ <xsl:for-each select="doc:Paragraph">
+ <p>
+ <xsl:value-of select="child::text()"/>
+ </p>
+ </xsl:for-each>
+ </body>
+ </html>
+ </xsl:template>
+</xsl:stylesheet></dsig:Transform>
+ <dsig:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
+ </dsig:Transforms>
+ <FinalDataMetaInfo>
+ <MimeType>application/xhtml+xml</MimeType>
+ </FinalDataMetaInfo>
+ </CreateTransformsInfo>
+ </CreateTransformsInfoProfile>
+ </DataObjectInfo>
+ </SingleSignatureInfo>
+</CreateXMLSignatureRequest>
diff --git a/spss/handbook/clients/webservice/resources/requests/VerifyCMSSignatureRequest.Extended.resp.xml b/spss/handbook/clients/webservice/resources/requests/VerifyCMSSignatureRequest.Extended.resp.xml
new file mode 100644
index 000000000..daa22bdb3
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/VerifyCMSSignatureRequest.Extended.resp.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VerifyCMSSignatureResponse xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><SignerInfo><dsig:X509Data><dsig:X509SubjectName>serialNumber=615536615920,givenName=Gregor,SN=Karlinger,CN=Gregor Karlinger,C=AT</dsig:X509SubjectName><dsig:X509IssuerSerial><dsig:X509IssuerName>CN=TrustSignTest-Sig-01,OU=TrustSignTest-Sig-01,O=A-Trust Ges. für Sicherheitssysteme im elektr. Datenverkehr GmbH,C=AT</dsig:X509IssuerName><dsig:X509SerialNumber>2892</dsig:X509SerialNumber></dsig:X509IssuerSerial><dsig:X509Certificate>MIIFLjCCBBagAwIBAgICC0wwDQYJKoZIhvcNAQEFBQAwgdkxCzAJBgNVBAYTAkFU
+MYGLMIGIBgNVBAoegYAAQQAtAFQAcgB1AHMAdAAgAEcAZQBzAC4AIABmAPwAcgAg
+AFMAaQBjAGgAZQByAGgAZQBpAHQAcwBzAHkAcwB0AGUAbQBlACAAaQBtACAAZQBs
+AGUAawB0AHIALgAgAEQAYQB0AGUAbgB2AGUAcgBrAGUAaAByACAARwBtAGIASDEd
+MBsGA1UECxMUVHJ1c3RTaWduVGVzdC1TaWctMDExHTAbBgNVBAMTFFRydXN0U2ln
+blRlc3QtU2lnLTAxMB4XDTAzMDgyNzEyMDEyNFoXDTA2MDgyNzEyMDEyNFowZDEL
+MAkGA1UEBhMCQVQxGTAXBgNVBAMTEEdyZWdvciBLYXJsaW5nZXIxEjAQBgNVBAQT
+CUthcmxpbmdlcjEPMA0GA1UEKhMGR3JlZ29yMRUwEwYDVQQFEww2MTU1MzY2MTU5
+MjAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKDSK1XaYK0Ydbk6V58g7QzQ
+Ysk0A6C2JyhiZy3078DJ1EkwzBMVejTNq1e9wp+BmeZ2YpiftNyRFfu/Gg8ksOUQ
+2oCn9A9pZLUGvtajA3aL8f182GQODRqQmelvYSUL/u9vAChOlcT+UEqj5jW4xjd4
+XsCotX4Kz+ofkD+SAlf1AgMBAAGjggH2MIIB8jATBgNVHSMEDDAKgAhKfsjmnWR0
+6TA+BggrBgEFBQcBAwEB/wQvMC0wCAYGBACORgEBMBUGBgQAjkYBAjALEwNFVVIC
+AQACAQAwCgYIKwYBBQUHCwEwgYIGCCsGAQUFBwEBBHYwdDAvBggrBgEFBQcwAYYj
+aHR0cDovL29jc3AtdGVzdC5hLXRydXN0LmF0OjgyL29jc3AwQQYIKwYBBQUHMAKG
+NWh0dHA6Ly93d3cuYS10cnVzdC5hdC9jZXJ0cy9UcnVzdFNpZ25UZXN0LVNpZy0w
+MWMuY3J0MFEGA1UdIARKMEgwPAYGKigAEQEDMDIwMAYIKwYBBQUHAgEWJGh0dHA6
+Ly93d3cuYS10cnVzdC5hdC9kb2NzL1RydXN0VGVzdDAIBgYEAIswAQEwbgYDVR0f
+BGcwZTBjoGGgX4ZdbGRhcDovL2xkYXAtdGVzdC5hLXRydXN0LmF0L291PVRydXN0
+U2lnblRlc3QtU2lnLTAxLG89QS1UcnVzdCxjPUFUP2NlcnRpZmljYXRlcmV2b2Nh
+dGlvbmxpc3Q/MBEGA1UdDgQKBAhNa9QR1H4T3zAOBgNVHQ8BAf8EBAMCBsAwJQYD
+VR0RBB4wHIEaZ3JlZ29yLmthcmxpbmdlckBjaW8uZ3YuYXQwCQYDVR0TBAIwADAN
+BgkqhkiG9w0BAQUFAAOCAQEALi2DEl6whJsiQF+bsNVR8CQhXg6ZuzTGlPhyCBum
+765Y5gMRLEfAx2D8Wv4XXPHasAxZ/NKZRwbfLWN7IxPeVHF+vCShlXmYGWVj75fE
+EGStIKyULqZB7jOJdsFHNdvp8yQaexR9olO3neXjrFmcXFVhpZFJomBH6JEL0uRa
+LsPlN97OTa1NKkdj92SX8IkcV2k9yQ3Nl2KgicZDlxdYtSDGh9P0KddJZZJTRAdm
+ixWb4Y2cGkRDhXoHzvHcZQ7eqJYHPapm3NTZ428I7LCKma8859rMwRSNTN14yIVL
+KkgBtxvmstGVa33Ki53LBkSSuBMH3Pa+4xbnYSkJA4phaA==</dsig:X509Certificate><QualifiedCertificate/></dsig:X509Data></SignerInfo><SignatureCheck><Code>0</Code></SignatureCheck><CertificateCheck><Code>1</Code></CertificateCheck></VerifyCMSSignatureResponse> \ No newline at end of file
diff --git a/spss/handbook/clients/webservice/resources/requests/VerifyCMSSignatureRequest.Extended.xml b/spss/handbook/clients/webservice/resources/requests/VerifyCMSSignatureRequest.Extended.xml
new file mode 100644
index 000000000..16e961b96
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/VerifyCMSSignatureRequest.Extended.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VerifyCMSSignatureRequest xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" Signatories="1">
+ <DateTime>2004-08-17T08:00:00+02:00</DateTime>
+ <CMSSignature>MIIHiwYJKoZIhvcNAQcCoIIHfDCCB3gCAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHAaCCBTIw
+ggUuMIIEFqADAgECAgILTDANBgkqhkiG9w0BAQUFADCB2TELMAkGA1UEBhMCQVQxgYswgYgGA1UE
+Ch6BgABBAC0AVAByAHUAcwB0ACAARwBlAHMALgAgAGYA/AByACAAUwBpAGMAaABlAHIAaABlAGkA
+dABzAHMAeQBzAHQAZQBtAGUAIABpAG0AIABlAGwAZQBrAHQAcgAuACAARABhAHQAZQBuAHYAZQBy
+AGsAZQBoAHIAIABHAG0AYgBIMR0wGwYDVQQLExRUcnVzdFNpZ25UZXN0LVNpZy0wMTEdMBsGA1UE
+AxMUVHJ1c3RTaWduVGVzdC1TaWctMDEwHhcNMDMwODI3MTIwMTI0WhcNMDYwODI3MTIwMTI0WjBk
+MQswCQYDVQQGEwJBVDEZMBcGA1UEAxMQR3JlZ29yIEthcmxpbmdlcjESMBAGA1UEBBMJS2FybGlu
+Z2VyMQ8wDQYDVQQqEwZHcmVnb3IxFTATBgNVBAUTDDYxNTUzNjYxNTkyMDCBnzANBgkqhkiG9w0B
+AQEFAAOBjQAwgYkCgYEAoNIrVdpgrRh1uTpXnyDtDNBiyTQDoLYnKGJnLfTvwMnUSTDMExV6NM2r
+V73Cn4GZ5nZimJ+03JEV+78aDySw5RDagKf0D2lktQa+1qMDdovx/XzYZA4NGpCZ6W9hJQv+728A
+KE6VxP5QSqPmNbjGN3hewKi1fgrP6h+QP5ICV/UCAwEAAaOCAfYwggHyMBMGA1UdIwQMMAqACEp+
+yOadZHTpMD4GCCsGAQUFBwEDAQH/BC8wLTAIBgYEAI5GAQEwFQYGBACORgECMAsTA0VVUgIBAAIB
+ADAKBggrBgEFBQcLATCBggYIKwYBBQUHAQEEdjB0MC8GCCsGAQUFBzABhiNodHRwOi8vb2NzcC10
+ZXN0LmEtdHJ1c3QuYXQ6ODIvb2NzcDBBBggrBgEFBQcwAoY1aHR0cDovL3d3dy5hLXRydXN0LmF0
+L2NlcnRzL1RydXN0U2lnblRlc3QtU2lnLTAxYy5jcnQwUQYDVR0gBEowSDA8BgYqKAARAQMwMjAw
+BggrBgEFBQcCARYkaHR0cDovL3d3dy5hLXRydXN0LmF0L2RvY3MvVHJ1c3RUZXN0MAgGBgQAizAB
+ATBuBgNVHR8EZzBlMGOgYaBfhl1sZGFwOi8vbGRhcC10ZXN0LmEtdHJ1c3QuYXQvb3U9VHJ1c3RT
+aWduVGVzdC1TaWctMDEsbz1BLVRydXN0LGM9QVQ/Y2VydGlmaWNhdGVyZXZvY2F0aW9ubGlzdD8w
+EQYDVR0OBAoECE1r1BHUfhPfMA4GA1UdDwEB/wQEAwIGwDAlBgNVHREEHjAcgRpncmVnb3Iua2Fy
+bGluZ2VyQGNpby5ndi5hdDAJBgNVHRMEAjAAMA0GCSqGSIb3DQEBBQUAA4IBAQAuLYMSXrCEmyJA
+X5uw1VHwJCFeDpm7NMaU+HIIG6bvrljmAxEsR8DHYPxa/hdc8dqwDFn80plHBt8tY3sjE95UcX68
+JKGVeZgZZWPvl8QQZK0grJQupkHuM4l2wUc12+nzJBp7FH2iU7ed5eOsWZxcVWGlkUmiYEfokQvS
+5Fouw+U33s5NrU0qR2P3ZJfwiRxXaT3JDc2XYqCJxkOXF1i1IMaH0/Qp10llklNEB2aLFZvhjZwa
+REOFegfO8dxlDt6olgc9qmbc1NnjbwjssIqZrzzn2szBFI1M3XjIhUsqSAG3G+ay0ZVrfcqLncsG
+RJK4Ewfc9r7jFudhKQkDimFoMYICITCCAh0CAQEwgeAwgdkxCzAJBgNVBAYTAkFUMYGLMIGIBgNV
+BAoegYAAQQAtAFQAcgB1AHMAdAAgAEcAZQBzAC4AIABmAPwAcgAgAFMAaQBjAGgAZQByAGgAZQBp
+AHQAcwBzAHkAcwB0AGUAbQBlACAAaQBtACAAZQBsAGUAawB0AHIALgAgAEQAYQB0AGUAbgB2AGUA
+cgBrAGUAaAByACAARwBtAGIASDEdMBsGA1UECxMUVHJ1c3RTaWduVGVzdC1TaWctMDExHTAbBgNV
+BAMTFFRydXN0U2lnblRlc3QtU2lnLTAxAgILTDAJBgUrDgMCGgUAoIGXMCMGCSqGSIb3DQEJBDEW
+BBRrneM6wvspvKW2kHIArzsWgxmmEjAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMCkGCyqGSIb3
+DQEJEAIEMRowGAwLdGV4dC9wbGFpbhsGCSqGSIb3DQEHATArBgsqhkiG9w0BCRACEzEcMBowGDAW
+BBQdhdZ+dQSz53K2vT9KOGCxp6+qIDANBgkqhkiG9w0BAQEFAASBgFTEY4mMXQx2fNk9zo64MRxI
+mS38vuD7W7LjBoUQ/w6mPi60kiqA/Pnf5I7fvM2epuo4xHpft1diuTY0fa9VqSv+q13Lr1x+l3ON
+oxX27oCPLcJq6sFipZj50Bx5BHhgTX+59cNIT3eTRLenBzrJ/ccNd5OLqgkfiwsvqSk48lou</CMSSignature>
+ <DataObject>
+ <Content>
+ <Base64Content>RGllc2UgRGF0ZW4gd2FyZW4gYmFzZTY0IGtvZGllcnQu</Base64Content>
+ </Content>
+ </DataObject>
+ <TrustProfileID>Test-Signaturdienste</TrustProfileID>
+</VerifyCMSSignatureRequest>
diff --git a/spss/handbook/clients/webservice/resources/requests/VerifyCMSSignatureRequest.Simple.resp.xml b/spss/handbook/clients/webservice/resources/requests/VerifyCMSSignatureRequest.Simple.resp.xml
new file mode 100644
index 000000000..daa22bdb3
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/VerifyCMSSignatureRequest.Simple.resp.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VerifyCMSSignatureResponse xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><SignerInfo><dsig:X509Data><dsig:X509SubjectName>serialNumber=615536615920,givenName=Gregor,SN=Karlinger,CN=Gregor Karlinger,C=AT</dsig:X509SubjectName><dsig:X509IssuerSerial><dsig:X509IssuerName>CN=TrustSignTest-Sig-01,OU=TrustSignTest-Sig-01,O=A-Trust Ges. für Sicherheitssysteme im elektr. Datenverkehr GmbH,C=AT</dsig:X509IssuerName><dsig:X509SerialNumber>2892</dsig:X509SerialNumber></dsig:X509IssuerSerial><dsig:X509Certificate>MIIFLjCCBBagAwIBAgICC0wwDQYJKoZIhvcNAQEFBQAwgdkxCzAJBgNVBAYTAkFU
+MYGLMIGIBgNVBAoegYAAQQAtAFQAcgB1AHMAdAAgAEcAZQBzAC4AIABmAPwAcgAg
+AFMAaQBjAGgAZQByAGgAZQBpAHQAcwBzAHkAcwB0AGUAbQBlACAAaQBtACAAZQBs
+AGUAawB0AHIALgAgAEQAYQB0AGUAbgB2AGUAcgBrAGUAaAByACAARwBtAGIASDEd
+MBsGA1UECxMUVHJ1c3RTaWduVGVzdC1TaWctMDExHTAbBgNVBAMTFFRydXN0U2ln
+blRlc3QtU2lnLTAxMB4XDTAzMDgyNzEyMDEyNFoXDTA2MDgyNzEyMDEyNFowZDEL
+MAkGA1UEBhMCQVQxGTAXBgNVBAMTEEdyZWdvciBLYXJsaW5nZXIxEjAQBgNVBAQT
+CUthcmxpbmdlcjEPMA0GA1UEKhMGR3JlZ29yMRUwEwYDVQQFEww2MTU1MzY2MTU5
+MjAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKDSK1XaYK0Ydbk6V58g7QzQ
+Ysk0A6C2JyhiZy3078DJ1EkwzBMVejTNq1e9wp+BmeZ2YpiftNyRFfu/Gg8ksOUQ
+2oCn9A9pZLUGvtajA3aL8f182GQODRqQmelvYSUL/u9vAChOlcT+UEqj5jW4xjd4
+XsCotX4Kz+ofkD+SAlf1AgMBAAGjggH2MIIB8jATBgNVHSMEDDAKgAhKfsjmnWR0
+6TA+BggrBgEFBQcBAwEB/wQvMC0wCAYGBACORgEBMBUGBgQAjkYBAjALEwNFVVIC
+AQACAQAwCgYIKwYBBQUHCwEwgYIGCCsGAQUFBwEBBHYwdDAvBggrBgEFBQcwAYYj
+aHR0cDovL29jc3AtdGVzdC5hLXRydXN0LmF0OjgyL29jc3AwQQYIKwYBBQUHMAKG
+NWh0dHA6Ly93d3cuYS10cnVzdC5hdC9jZXJ0cy9UcnVzdFNpZ25UZXN0LVNpZy0w
+MWMuY3J0MFEGA1UdIARKMEgwPAYGKigAEQEDMDIwMAYIKwYBBQUHAgEWJGh0dHA6
+Ly93d3cuYS10cnVzdC5hdC9kb2NzL1RydXN0VGVzdDAIBgYEAIswAQEwbgYDVR0f
+BGcwZTBjoGGgX4ZdbGRhcDovL2xkYXAtdGVzdC5hLXRydXN0LmF0L291PVRydXN0
+U2lnblRlc3QtU2lnLTAxLG89QS1UcnVzdCxjPUFUP2NlcnRpZmljYXRlcmV2b2Nh
+dGlvbmxpc3Q/MBEGA1UdDgQKBAhNa9QR1H4T3zAOBgNVHQ8BAf8EBAMCBsAwJQYD
+VR0RBB4wHIEaZ3JlZ29yLmthcmxpbmdlckBjaW8uZ3YuYXQwCQYDVR0TBAIwADAN
+BgkqhkiG9w0BAQUFAAOCAQEALi2DEl6whJsiQF+bsNVR8CQhXg6ZuzTGlPhyCBum
+765Y5gMRLEfAx2D8Wv4XXPHasAxZ/NKZRwbfLWN7IxPeVHF+vCShlXmYGWVj75fE
+EGStIKyULqZB7jOJdsFHNdvp8yQaexR9olO3neXjrFmcXFVhpZFJomBH6JEL0uRa
+LsPlN97OTa1NKkdj92SX8IkcV2k9yQ3Nl2KgicZDlxdYtSDGh9P0KddJZZJTRAdm
+ixWb4Y2cGkRDhXoHzvHcZQ7eqJYHPapm3NTZ428I7LCKma8859rMwRSNTN14yIVL
+KkgBtxvmstGVa33Ki53LBkSSuBMH3Pa+4xbnYSkJA4phaA==</dsig:X509Certificate><QualifiedCertificate/></dsig:X509Data></SignerInfo><SignatureCheck><Code>0</Code></SignatureCheck><CertificateCheck><Code>1</Code></CertificateCheck></VerifyCMSSignatureResponse> \ No newline at end of file
diff --git a/spss/handbook/clients/webservice/resources/requests/VerifyCMSSignatureRequest.Simple.xml b/spss/handbook/clients/webservice/resources/requests/VerifyCMSSignatureRequest.Simple.xml
new file mode 100644
index 000000000..d41b0e278
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/VerifyCMSSignatureRequest.Simple.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VerifyCMSSignatureRequest xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#">
+ <CMSSignature>MIIHsAYJKoZIhvcNAQcCoIIHoTCCB50CAQExCzAJBgUrDgMCGgUAMDAGCSqGSIb3DQEHAaAjBCFE
+aWVzZSBEYXRlbiB3YXJlbiBiYXNlNjQga29kaWVydC6gggUyMIIFLjCCBBagAwIBAgICC0wwDQYJ
+KoZIhvcNAQEFBQAwgdkxCzAJBgNVBAYTAkFUMYGLMIGIBgNVBAoegYAAQQAtAFQAcgB1AHMAdAAg
+AEcAZQBzAC4AIABmAPwAcgAgAFMAaQBjAGgAZQByAGgAZQBpAHQAcwBzAHkAcwB0AGUAbQBlACAA
+aQBtACAAZQBsAGUAawB0AHIALgAgAEQAYQB0AGUAbgB2AGUAcgBrAGUAaAByACAARwBtAGIASDEd
+MBsGA1UECxMUVHJ1c3RTaWduVGVzdC1TaWctMDExHTAbBgNVBAMTFFRydXN0U2lnblRlc3QtU2ln
+LTAxMB4XDTAzMDgyNzEyMDEyNFoXDTA2MDgyNzEyMDEyNFowZDELMAkGA1UEBhMCQVQxGTAXBgNV
+BAMTEEdyZWdvciBLYXJsaW5nZXIxEjAQBgNVBAQTCUthcmxpbmdlcjEPMA0GA1UEKhMGR3JlZ29y
+MRUwEwYDVQQFEww2MTU1MzY2MTU5MjAwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKDSK1Xa
+YK0Ydbk6V58g7QzQYsk0A6C2JyhiZy3078DJ1EkwzBMVejTNq1e9wp+BmeZ2YpiftNyRFfu/Gg8k
+sOUQ2oCn9A9pZLUGvtajA3aL8f182GQODRqQmelvYSUL/u9vAChOlcT+UEqj5jW4xjd4XsCotX4K
+z+ofkD+SAlf1AgMBAAGjggH2MIIB8jATBgNVHSMEDDAKgAhKfsjmnWR06TA+BggrBgEFBQcBAwEB
+/wQvMC0wCAYGBACORgEBMBUGBgQAjkYBAjALEwNFVVICAQACAQAwCgYIKwYBBQUHCwEwgYIGCCsG
+AQUFBwEBBHYwdDAvBggrBgEFBQcwAYYjaHR0cDovL29jc3AtdGVzdC5hLXRydXN0LmF0OjgyL29j
+c3AwQQYIKwYBBQUHMAKGNWh0dHA6Ly93d3cuYS10cnVzdC5hdC9jZXJ0cy9UcnVzdFNpZ25UZXN0
+LVNpZy0wMWMuY3J0MFEGA1UdIARKMEgwPAYGKigAEQEDMDIwMAYIKwYBBQUHAgEWJGh0dHA6Ly93
+d3cuYS10cnVzdC5hdC9kb2NzL1RydXN0VGVzdDAIBgYEAIswAQEwbgYDVR0fBGcwZTBjoGGgX4Zd
+bGRhcDovL2xkYXAtdGVzdC5hLXRydXN0LmF0L291PVRydXN0U2lnblRlc3QtU2lnLTAxLG89QS1U
+cnVzdCxjPUFUP2NlcnRpZmljYXRlcmV2b2NhdGlvbmxpc3Q/MBEGA1UdDgQKBAhNa9QR1H4T3zAO
+BgNVHQ8BAf8EBAMCBsAwJQYDVR0RBB4wHIEaZ3JlZ29yLmthcmxpbmdlckBjaW8uZ3YuYXQwCQYD
+VR0TBAIwADANBgkqhkiG9w0BAQUFAAOCAQEALi2DEl6whJsiQF+bsNVR8CQhXg6ZuzTGlPhyCBum
+765Y5gMRLEfAx2D8Wv4XXPHasAxZ/NKZRwbfLWN7IxPeVHF+vCShlXmYGWVj75fEEGStIKyULqZB
+7jOJdsFHNdvp8yQaexR9olO3neXjrFmcXFVhpZFJomBH6JEL0uRaLsPlN97OTa1NKkdj92SX8Ikc
+V2k9yQ3Nl2KgicZDlxdYtSDGh9P0KddJZZJTRAdmixWb4Y2cGkRDhXoHzvHcZQ7eqJYHPapm3NTZ
+428I7LCKma8859rMwRSNTN14yIVLKkgBtxvmstGVa33Ki53LBkSSuBMH3Pa+4xbnYSkJA4phaDGC
+AiEwggIdAgEBMIHgMIHZMQswCQYDVQQGEwJBVDGBizCBiAYDVQQKHoGAAEEALQBUAHIAdQBzAHQA
+IABHAGUAcwAuACAAZgD8AHIAIABTAGkAYwBoAGUAcgBoAGUAaQB0AHMAcwB5AHMAdABlAG0AZQAg
+AGkAbQAgAGUAbABlAGsAdAByAC4AIABEAGEAdABlAG4AdgBlAHIAawBlAGgAcgAgAEcAbQBiAEgx
+HTAbBgNVBAsTFFRydXN0U2lnblRlc3QtU2lnLTAxMR0wGwYDVQQDExRUcnVzdFNpZ25UZXN0LVNp
+Zy0wMQICC0wwCQYFKw4DAhoFAKCBlzAjBgkqhkiG9w0BCQQxFgQUa53jOsL7KbyltpByAK87FoMZ
+phIwGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATApBgsqhkiG9w0BCRACBDEaMBgMC3RleHQvcGxh
+aW4bBgkqhkiG9w0BBwEwKwYLKoZIhvcNAQkQAhMxHDAaMBgwFgQUHYXWfnUEs+dytr0/Sjhgsaev
+qiAwDQYJKoZIhvcNAQEBBQAEgYBUxGOJjF0MdnzZPc6OuDEcSJkt/L7g+1uy4waFEP8Opj4utJIq
+gPz53+SO37zNnqbqOMR6X7dXYrk2NH2vVakr/qtdy69cfpdzjaMV9u6Ajy3CaurBYqWY+dAceQR4
+YE1/ufXDSE93k0S3pwc6yf3HDXeTi6oJH4sLL6kpOPJaLg==</CMSSignature>
+ <TrustProfileID>Test-Signaturdienste</TrustProfileID>
+</VerifyCMSSignatureRequest>
diff --git a/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.Enveloped.resp.xml b/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.Enveloped.resp.xml
new file mode 100644
index 000000000..f4db026fe
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.Enveloped.resp.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VerifyXMLSignatureResponse xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><SignerInfo><dsig:X509Data><dsig:X509SubjectName>CN=Test: Signaturdienst aller Kunden: ECDSA (P192v1),OU=Technik und Standards,O=Stabsstelle IKT-Strategie des Bundes,C=AT</dsig:X509SubjectName><dsig:X509IssuerSerial><dsig:X509IssuerName>CN=Test CA - Signaturdienste,OU=Technik und Standards,O=Stabstelle IKT-Strategie des Bundes,C=AT</dsig:X509IssuerName><dsig:X509SerialNumber>9</dsig:X509SerialNumber></dsig:X509IssuerSerial><dsig:X509Certificate>MIID+DCCA2WgAwIBAgIBCTAJBgUrDgMCHQUAMH8xCzAJBgNVBAYTAkFUMSwwKgYD
+VQQKEyNTdGFic3RlbGxlIElLVC1TdHJhdGVnaWUgZGVzIEJ1bmRlczEeMBwGA1UE
+CxMVVGVjaG5payB1bmQgU3RhbmRhcmRzMSIwIAYDVQQDExlUZXN0IENBIC0gU2ln
+bmF0dXJkaWVuc3RlMB4XDTA0MDgwNDA4MjM0OFoXDTA3MDgwNDA4MjM0OFowgZgx
+CzAJBgNVBAYTAkFUMS0wKwYDVQQKEyRTdGFic3N0ZWxsZSBJS1QtU3RyYXRlZ2ll
+IGRlcyBCdW5kZXMxHjAcBgNVBAsTFVRlY2huaWsgdW5kIFN0YW5kYXJkczE6MDgG
+A1UEAxMxVGVzdDogU2lnbmF0dXJkaWVuc3QgYWxsZXIgS3VuZGVuOiBFQ0RTQSAo
+UDE5MnYxKTCB8zCBvAYHKoZIzj0CATCBsAIBATAkBgcqhkjOPQEBAhkA////////
+/////////////v//////////MDQEGP////////////////////7//////////AQY
+ZCEFGeWcgOcPp+mrciQwSf643uzBRrmxBDEEGI2oDrAwkPZ8vyDrQ6GIAPT/Cv2C
+/xASBxkrlf/I2nhjEBHtayTN1XP5d6EeeUgRAhkA////////////////md74NhRr
+ybG00igxAgEBAzIABNHWY9lQOE1zgmpcpjTg2WIg6qgEsGhpXELPinJoMPDVheTv
+2BZPG42YJsNfvWgC06OCARwwggEYMA4GA1UdDwEB/wQEAwIGwDAMBgNVHRMBAf8E
+AjAAMB0GA1UdDgQWBBRHH5EXnrWosCmIa+JyEM5seMxFVzBdBgNVHSAEVjBUMFIG
+DCsGAQQBlRIBAgMBATBCMEAGCCsGAQUFBwICMDQaMkRpZXNlcyBaZXJ0aWZpa2F0
+IGlzdCBudXIgZvxyIFRlc3R6d2Vja2UgZ2VlaWduZXQuMEMGA1UdHwQ8MDowOKA2
+oDSGMmh0dHA6Ly9sYWJzLmNpby5ndi5hdC90ZW1wL2NybHMvc2lnbmF0dXJkaWVu
+c3QuY3JsMBQGByooAAoBAQEECQwHQktBLUlLVDAfBgNVHSMEGDAWgBRAl0P5fWaw
+vf59+uxGcYY9wffZPTAJBgUrDgMCHQUAA4GBAIMKUsnajgfBtpHeDdMdQMLA8fdt
+lluezDOM78WYYSFURP04QZk5iHkShzptgZCF5Y/T4an3dC3SnytL67LJvEoKUyja
+iTMLo7650xRTvAjTaMJ+nly/wTRYJKplOLXKWj3WwfObMHXdsDE8NJmpJSRE7Sw7
++tj+UiTiNNSaXirq</dsig:X509Certificate><PublicAuthority><Code>BKA-IKT</Code></PublicAuthority></dsig:X509Data></SignerInfo><HashInputData PartOf="SignedInfo"><Base64Content>PGRvYzpYTUxEb2N1bWVudCB4bWxuczpkb2M9InVybjpkb2N1bWVudCI+CiAgPGRv
+YzpQYXJhZ3JhcGg+SWNoIGJpbiBkZXIgZXJzdGUgQWJzYXR6IGluIGRpZXNlbSBE
+b2t1bWVudC48L2RvYzpQYXJhZ3JhcGg+CiAgPGRvYzpQYXJhZ3JhcGggUGFyYUlk
+PSJQYXJhMiI+VW5kIGljaCBiaW4gZGVyIHp3ZWl0ZSBBYnNhdHogaW4gZGllc2Vt
+IERva3VtZW50LgpJY2ggaGFiZSB3ZWl0ZXJzIGVpbiBlaWdlbmVucyBJRC1BdHRy
+aWJ1dCBiZWtvbW1lbi48L2RvYzpQYXJhZ3JhcGg+CjwvZG9jOlhNTERvY3VtZW50Pg==</Base64Content></HashInputData><SignatureCheck><Code>0</Code></SignatureCheck><CertificateCheck><Code>0</Code></CertificateCheck></VerifyXMLSignatureResponse> \ No newline at end of file
diff --git a/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.Enveloped.xml b/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.Enveloped.xml
new file mode 100644
index 000000000..d97e76f78
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.Enveloped.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VerifyXMLSignatureRequest xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#">
+ <DateTime>2004-08-18T17:00:00+02:00</DateTime>
+ <VerifySignatureInfo>
+ <VerifySignatureEnvironment Reference="http://localhost:8080/referencedData/XMLDocument.signed.xml"/>
+ <VerifySignatureLocation xmlns:doc="urn:document" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">/doc:XMLDocument/dsig:Signature</VerifySignatureLocation>
+ </VerifySignatureInfo>
+ <ReturnHashInputData/>
+ <TrustProfileID>Test-Signaturdienste</TrustProfileID>
+</VerifyXMLSignatureRequest>
diff --git a/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.FileURIs.DataObject.xml b/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.FileURIs.DataObject.xml
new file mode 100644
index 000000000..5b4b61938
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.FileURIs.DataObject.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VerifyXMLSignatureRequest
+ xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#"
+ xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://reference.e-government.gv.at/namespace/moa/20020822# file:D:/_java/moa-idspss/trunk/common/src/main/resources/resources/schemas/MOA-SPSS-1.3.xsd
+ http://www.w3.org/2000/09/xmldsig# http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd">
+ <VerifySignatureInfo>
+ <VerifySignatureEnvironment>
+ <XMLContent>
+ <dsig:Signature Id="signature-1-1"
+ xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
+ <dsig:SignedInfo>
+ <dsig:CanonicalizationMethod
+ Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
+ <dsig:SignatureMethod
+ Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1" />
+ <dsig:Reference
+ Type="http://www.w3.org/2000/09/xmldsig#Manifest"
+ URI="#dsig-manifest-1-1">
+ <dsig:DigestMethod
+ Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
+ <dsig:DigestValue>
+ XRuYnuRTOAInpu8TzwDWn9Er4/Y=
+ </dsig:DigestValue>
+ </dsig:Reference>
+ </dsig:SignedInfo>
+ <dsig:SignatureValue>
+ O3/U4zcVG6BOdc2C/m09xe+vxGhp6TKz7lEukgjINsc1o1Bvdelo77T8cEG/muYd
+ </dsig:SignatureValue>
+ <dsig:KeyInfo>
+ <dsig:X509Data>
+ <dsig:X509Certificate>
+ MIIELjCCAxagAwIBAgIBEzANBgkqhkiG9w0BAQUFADBEMQswCQYDVQQGEwJBVDEQ
+ MA4GA1UEChMHVFUgR3JhejENMAsGA1UECxMERUdJWjEUMBIGA1UEAxMLTU9BIFRl
+ c3QgQ0EwHhcNMDcwODIzMTM1ODU0WhcNMTIwODIzMTM1ODU0WjBpMQswCQYDVQQG
+ EwJBVDEQMA4GA1UEChMHVFUgR1JBWjENMAsGA1UECxMERUdJWjE5MDcGA1UEAxMw
+ VGVzdCBTaWduYXR1cmRpZW5zdCBhbGxlciBLdW5kZW46IEVDRFNBIChQMTkydjEp
+ MIHzMIG8BgcqhkjOPQIBMIGwAgEBMCQGByqGSM49AQECGQD/////////////////
+ ///+//////////8wNAQY/////////////////////v/////////8BBhkIQUZ5ZyA
+ 5w+n6atyJDBJ/rje7MFGubEEMQQYjagOsDCQ9ny/IOtDoYgA9P8K/YL/EBIHGSuV
+ /8jaeGMQEe1rJM3Vc/l3oR55SBECGQD///////////////+Z3vg2FGvJsbTSKDEC
+ AQEDMgAExf78b6N6BUhK+FHmunDUCQefSxpQmC6m4yq/+pqdDMJalTWATFhQwZqE
+ qSMXJ2Tqo4IBNDCCATAwDgYDVR0PAQH/BAQDAgbAMAwGA1UdEwEB/wQCMAAwHQYD
+ VR0OBBYEFBrwapQSMwabwPPOijtgOu3iNlt3MHAGA1UdIARpMGcwZQYMKwYBBAGV
+ EgECewEBMFUwUwYIKwYBBQUHAgIwRxpFVGhpcyBjZXJ0aWZpY2F0ZSBvbmx5IG1h
+ eSBiZSB1c2VkIGZvciBkZW1vbnN0cmF0aW9uIGFuZCB0ZXN0IHB1cnBvc2VzMEYG
+ A1UdHwQ/MD0wO6A5oDeGNWh0dHA6Ly9tb2EtaWRzcHNzLmVnb3ZsYWJzLmd2LmF0
+ L2NybHMvbW9hLXRlc3QtY2EuY3JsMBYGByooAAoBAQEECxMJRUdJWi1UZXN0MB8G
+ A1UdIwQYMBaAFFKXvB3Ugd6H51ClcBGdjhYJNiRSMA0GCSqGSIb3DQEBBQUAA4IB
+ AQB60RLi9zIwF/Rmy/Wo0yf1/ZktElIt91vfBsXlpgLJ4Q6ol/4hTjMJ4FIa8GOl
+ 0b9dIkEe+WGq77JFJVgltsRoJfQBSvnK9jdLfB5YJD0ETDnMdckBV+RsxkEtl5Lr
+ IrT6vExyJUAWz15XJiHgkYZncJCBTy1oh8f3V8cR1VZYwO4QBRDwRdVdZsaL5PME
+ vvLrcAMJhF5fS4AiqMex2Eh2kav5t6/I5bmB4CKEe+0+dPO8DGl7areEfzQEPd8p
+ jkkX5PnxriQvZfgVzwrdXGDqMTnBNaRtCGMiQU/0kp21a6BVtT4am27yr9p3ddhl
+ z7sJ4Z6ys1bwB0on/O65tdn7
+ </dsig:X509Certificate>
+ </dsig:X509Data>
+ </dsig:KeyInfo>
+ <dsig:Object>
+ <dsig:Manifest Id="dsig-manifest-1-1">
+ <dsig:Reference Id="reference-1-1"
+ URI="file:referencedData/Text.txt">
+ <dsig:DigestMethod
+ Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
+ <dsig:DigestValue>
+ TrE7WPVlNnBf1dh9PRiZdwpTaxs=
+ </dsig:DigestValue>
+ </dsig:Reference>
+ </dsig:Manifest>
+ </dsig:Object>
+ </dsig:Signature>
+ </XMLContent>
+ </VerifySignatureEnvironment>
+ <VerifySignatureLocation
+ xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
+ /dsig:Signature
+ </VerifySignatureLocation>
+ </VerifySignatureInfo>
+ <TrustProfileID>Test-Signaturdienste</TrustProfileID>
+</VerifyXMLSignatureRequest>
+
diff --git a/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.FileURIs.ServerSupplements.xml b/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.FileURIs.ServerSupplements.xml
new file mode 100644
index 000000000..4b9fa43fe
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.FileURIs.ServerSupplements.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VerifyXMLSignatureRequest
+ xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#"
+ xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://reference.e-government.gv.at/namespace/moa/20020822# file:D:/_java/moa-idspss/trunk/common/src/main/resources/resources/schemas/MOA-SPSS-1.3.xsd
+ http://www.w3.org/2000/09/xmldsig# http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd">
+ <VerifySignatureInfo>
+ <VerifySignatureEnvironment>
+ <XMLContent>
+ <dsig:Signature xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Id="signature-1208432475-242867937-18096">
+ <dsig:SignedInfo>
+ <dsig:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
+ <dsig:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"/>
+ <dsig:Reference Id="signed-data-reference-0-1208432475-242867937-22960" URI="urn:Document">
+ <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
+ <dsig:DigestValue>te0YD8LFaK3JLQV8cL69DPnFRLc=</dsig:DigestValue>
+ </dsig:Reference>
+ <dsig:Reference Id="etsi-data-reference-0-1208432475-242867937-11431" Type="http://uri.etsi.org/01903/v1.1.1#SignedProperties" URI="#xmlns(etsi=http://uri.etsi.org/01903/v1.1.1%23)%20xpointer(id('etsi-data-object-0-1208432475-242867937-12332')/child::etsi:QualifyingProperties/child::etsi:SignedProperties)">
+ <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
+ <dsig:DigestValue>2M9g7DopnXtz86dkz+7yk5SHSHo=</dsig:DigestValue>
+ </dsig:Reference>
+ </dsig:SignedInfo>
+ <dsig:SignatureValue>Ti3ckR8eq4D0mUhb+ylUFhIYn7mfUHTc2AjTys4oaq4gFkXvQlQI41Iggp40c916</dsig:SignatureValue>
+ <dsig:KeyInfo>
+ <dsig:X509Data>
+ <dsig:X509Certificate>MIIDlzCCAf+gAwIBAgIRMrFTcaHacn5T5kRFML4Ck6swDQYJKoZIhvcNAQEFBQAwTTESMBAGA1UEAwwJVlNpZyBDQSAyMSowKAYDVQQKDCFIYXVwdHZlcmJhbmQgw7ZzdGVyci4gU296aWFsdmVycy4xCzAJBgNVBAYTAkFUMB4XDTA2MDEyMDA1MTExMVoXDTExMDEyMDA1MTExMVowXzEVMBMGA1UEAwwMRGF2aWQgRmVyYmFzMSowKAYDVQQKDCFIYXVwdHZlcmJhbmQgw7ZzdGVyci4gU296aWFsdmVycy4xDTALBgNVBAsMBFZTaWcxCzAJBgNVBAYTAkFUMEkwEwYHKoZIzj0CAQYIKoZIzj0DAQEDMgAEc7ESyZ4IdIM9UDtze29i0IqfCbwWSODfCF8bTiXxdJZLWZOE0eqwL2ybWVTEmCXDo4G6MIG3MBMGA1UdIwQMMAqACEhpdVw8ryMqMBEGA1UdDgQKBAhP473ttlxOBjAOBgNVHQ8BAf8EBAMCBsAwFgYDVR0gBA8wDTALBgkqKAAKAQQBZgAwQwYIKwYBBQUHAQEENzA1MDMGCCsGAQUFBzABhidodHRwOi8vb2NzcC5lY2FyZC5zb3ppYWx2ZXJzaWNoZXJ1bmcuYXQwIAYDVR0RBBkwF4EVZGF2aWQuZmVyYmFzQGlub2RlLmF0MA0GCSqGSIb3DQEBBQUAA4IBgQAu74FsENLTC9kqN4UVEX+pJz4ckOjAI8NbzCEvHgDqfpXmjZKA+8354fE6hsCd8uCJWCJ36ig2cMcOjGJrW+4YExYFRpiq1U2u9N1eKEj7j1oQzNZw4lotDxMFHnzd5WBjXjWekgy3uWkFhqE+NvQtauNtRiR3kg2jMt4MmcjZpck3WoTibrV9sMOzyM8L4y3HdDix97aWTefqxJ28IF9Anuk/uNGu74KcuJjYuIZx7q1ULsuXEs/HJMxU2/9lcT6lRhsp5VE0Z0/zOWdenQYUBscdbNrEDg3gmGU9T7SuxNQfHRLQ1OGzjolJL7kvhsRiK/l7pBtGAt2oPO6OKbLgWhW/6DEYJqnUrScQCli34EVDFC8W9yOBq3BHHZCQOzGgYtxtpI2QzCHLMGEwaxdFAYQp9pVBnX7HGbPqhq2r5osDlcyJDLO9uYW+63CTCVIeJ9018OxvOxNNvb6JzunW/oQAVMj+vTiR4GE74A0qVbuYd0fvEvc47J1q6++QlKc=</dsig:X509Certificate>
+ </dsig:X509Data>
+ </dsig:KeyInfo>
+ <dsig:Object Id="etsi-data-object-0-1208432475-242867937-12332">
+ <etsi:QualifyingProperties xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:etsi="http://uri.etsi.org/01903/v1.1.1#" Target="#signature-1208432475-242867937-18096">
+ <etsi:SignedProperties xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:etsi="http://uri.etsi.org/01903/v1.1.1#">
+ <etsi:SignedSignatureProperties>
+ <etsi:SigningTime>2008-04-17T11:41:15Z</etsi:SigningTime>
+ <etsi:SigningCertificate>
+ <etsi:Cert>
+ <etsi:CertDigest>
+ <etsi:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
+ <etsi:DigestValue>RREWB1U7AWw/Xy+QkwfAiityVDs=</etsi:DigestValue>
+ </etsi:CertDigest>
+ <etsi:IssuerSerial>
+ <dsig:X509IssuerName>C=AT,O=Hauptverband österr. Sozialvers.,CN=VSig CA 2</dsig:X509IssuerName>
+ <dsig:X509SerialNumber>17249824966675737197051526866457224975275</dsig:X509SerialNumber>
+ </etsi:IssuerSerial>
+ </etsi:Cert>
+ </etsi:SigningCertificate>
+ <etsi:SignaturePolicyIdentifier>
+ <etsi:SignaturePolicyImplied/>
+ </etsi:SignaturePolicyIdentifier>
+ </etsi:SignedSignatureProperties>
+ <etsi:SignedDataObjectProperties>
+ <etsi:DataObjectFormat ObjectReference="#signed-data-reference-0-1208432475-242867937-22960">
+ <etsi:MimeType>text/plain</etsi:MimeType>
+ </etsi:DataObjectFormat>
+ </etsi:SignedDataObjectProperties>
+ </etsi:SignedProperties>
+ </etsi:QualifyingProperties>
+ </dsig:Object>
+ </dsig:Signature>
+ </XMLContent>
+ </VerifySignatureEnvironment>
+ <VerifySignatureLocation xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">/dsig:Signature</VerifySignatureLocation>
+ </VerifySignatureInfo>
+ <SupplementProfileID>testID</SupplementProfileID>
+ <TrustProfileID>certifiedSignature+Test</TrustProfileID>
+</VerifyXMLSignatureRequest>
diff --git a/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.FileURIs.Supplements.xml b/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.FileURIs.Supplements.xml
new file mode 100644
index 000000000..27929cefd
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.FileURIs.Supplements.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VerifyXMLSignatureRequest
+ xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#"
+ xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://reference.e-government.gv.at/namespace/moa/20020822# file:D:/_java/moa-idspss/trunk/common/src/main/resources/resources/schemas/MOA-SPSS-1.3.xsd
+ http://www.w3.org/2000/09/xmldsig# http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd">
+ <VerifySignatureInfo>
+ <VerifySignatureEnvironment>
+ <XMLContent>
+ <dsig:Signature xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" Id="signature-1208432475-242867937-18096">
+ <dsig:SignedInfo>
+ <dsig:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
+ <dsig:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"/>
+ <dsig:Reference Id="signed-data-reference-0-1208432475-242867937-22960" URI="urn:Document">
+ <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
+ <dsig:DigestValue>te0YD8LFaK3JLQV8cL69DPnFRLc=</dsig:DigestValue>
+ </dsig:Reference>
+ <dsig:Reference Id="etsi-data-reference-0-1208432475-242867937-11431" Type="http://uri.etsi.org/01903/v1.1.1#SignedProperties" URI="#xmlns(etsi=http://uri.etsi.org/01903/v1.1.1%23)%20xpointer(id('etsi-data-object-0-1208432475-242867937-12332')/child::etsi:QualifyingProperties/child::etsi:SignedProperties)">
+ <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
+ <dsig:DigestValue>2M9g7DopnXtz86dkz+7yk5SHSHo=</dsig:DigestValue>
+ </dsig:Reference>
+ </dsig:SignedInfo>
+ <dsig:SignatureValue>Ti3ckR8eq4D0mUhb+ylUFhIYn7mfUHTc2AjTys4oaq4gFkXvQlQI41Iggp40c916</dsig:SignatureValue>
+ <dsig:KeyInfo>
+ <dsig:X509Data>
+ <dsig:X509Certificate>MIIDlzCCAf+gAwIBAgIRMrFTcaHacn5T5kRFML4Ck6swDQYJKoZIhvcNAQEFBQAwTTESMBAGA1UEAwwJVlNpZyBDQSAyMSowKAYDVQQKDCFIYXVwdHZlcmJhbmQgw7ZzdGVyci4gU296aWFsdmVycy4xCzAJBgNVBAYTAkFUMB4XDTA2MDEyMDA1MTExMVoXDTExMDEyMDA1MTExMVowXzEVMBMGA1UEAwwMRGF2aWQgRmVyYmFzMSowKAYDVQQKDCFIYXVwdHZlcmJhbmQgw7ZzdGVyci4gU296aWFsdmVycy4xDTALBgNVBAsMBFZTaWcxCzAJBgNVBAYTAkFUMEkwEwYHKoZIzj0CAQYIKoZIzj0DAQEDMgAEc7ESyZ4IdIM9UDtze29i0IqfCbwWSODfCF8bTiXxdJZLWZOE0eqwL2ybWVTEmCXDo4G6MIG3MBMGA1UdIwQMMAqACEhpdVw8ryMqMBEGA1UdDgQKBAhP473ttlxOBjAOBgNVHQ8BAf8EBAMCBsAwFgYDVR0gBA8wDTALBgkqKAAKAQQBZgAwQwYIKwYBBQUHAQEENzA1MDMGCCsGAQUFBzABhidodHRwOi8vb2NzcC5lY2FyZC5zb3ppYWx2ZXJzaWNoZXJ1bmcuYXQwIAYDVR0RBBkwF4EVZGF2aWQuZmVyYmFzQGlub2RlLmF0MA0GCSqGSIb3DQEBBQUAA4IBgQAu74FsENLTC9kqN4UVEX+pJz4ckOjAI8NbzCEvHgDqfpXmjZKA+8354fE6hsCd8uCJWCJ36ig2cMcOjGJrW+4YExYFRpiq1U2u9N1eKEj7j1oQzNZw4lotDxMFHnzd5WBjXjWekgy3uWkFhqE+NvQtauNtRiR3kg2jMt4MmcjZpck3WoTibrV9sMOzyM8L4y3HdDix97aWTefqxJ28IF9Anuk/uNGu74KcuJjYuIZx7q1ULsuXEs/HJMxU2/9lcT6lRhsp5VE0Z0/zOWdenQYUBscdbNrEDg3gmGU9T7SuxNQfHRLQ1OGzjolJL7kvhsRiK/l7pBtGAt2oPO6OKbLgWhW/6DEYJqnUrScQCli34EVDFC8W9yOBq3BHHZCQOzGgYtxtpI2QzCHLMGEwaxdFAYQp9pVBnX7HGbPqhq2r5osDlcyJDLO9uYW+63CTCVIeJ9018OxvOxNNvb6JzunW/oQAVMj+vTiR4GE74A0qVbuYd0fvEvc47J1q6++QlKc=</dsig:X509Certificate>
+ </dsig:X509Data>
+ </dsig:KeyInfo>
+ <dsig:Object Id="etsi-data-object-0-1208432475-242867937-12332">
+ <etsi:QualifyingProperties xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:etsi="http://uri.etsi.org/01903/v1.1.1#" Target="#signature-1208432475-242867937-18096">
+ <etsi:SignedProperties xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:etsi="http://uri.etsi.org/01903/v1.1.1#">
+ <etsi:SignedSignatureProperties>
+ <etsi:SigningTime>2008-04-17T11:41:15Z</etsi:SigningTime>
+ <etsi:SigningCertificate>
+ <etsi:Cert>
+ <etsi:CertDigest>
+ <etsi:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
+ <etsi:DigestValue>RREWB1U7AWw/Xy+QkwfAiityVDs=</etsi:DigestValue>
+ </etsi:CertDigest>
+ <etsi:IssuerSerial>
+ <dsig:X509IssuerName>C=AT,O=Hauptverband österr. Sozialvers.,CN=VSig CA 2</dsig:X509IssuerName>
+ <dsig:X509SerialNumber>17249824966675737197051526866457224975275</dsig:X509SerialNumber>
+ </etsi:IssuerSerial>
+ </etsi:Cert>
+ </etsi:SigningCertificate>
+ <etsi:SignaturePolicyIdentifier>
+ <etsi:SignaturePolicyImplied/>
+ </etsi:SignaturePolicyIdentifier>
+ </etsi:SignedSignatureProperties>
+ <etsi:SignedDataObjectProperties>
+ <etsi:DataObjectFormat ObjectReference="#signed-data-reference-0-1208432475-242867937-22960">
+ <etsi:MimeType>text/plain</etsi:MimeType>
+ </etsi:DataObjectFormat>
+ </etsi:SignedDataObjectProperties>
+ </etsi:SignedProperties>
+ </etsi:QualifyingProperties>
+ </dsig:Object>
+ </dsig:Signature>
+ </XMLContent>
+ </VerifySignatureEnvironment>
+ <VerifySignatureLocation xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">/dsig:Signature</VerifySignatureLocation>
+ </VerifySignatureInfo>
+ <SupplementProfile>
+ <Content Reference="urn:Document">
+ <LocRefContent>file:D:/Programme/apache-tomcat-5.5.26/webapps/referencedData/enno-sp.pdf_bku_sign_out.pdf</LocRefContent>
+ </Content>
+ </SupplementProfile>
+ <TrustProfileID>certifiedSignature+Test</TrustProfileID>
+</VerifyXMLSignatureRequest>
diff --git a/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.FileURIs.xml b/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.FileURIs.xml
new file mode 100644
index 000000000..fc67859ba
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.FileURIs.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VerifyXMLSignatureRequest
+ xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#">
+ <VerifySignatureInfo>
+ <VerifySignatureEnvironment>
+ <XMLContent>
+ <dsig:Signature Id="signature-1-1" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
+ <dsig:SignedInfo>
+ <dsig:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
+ <dsig:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1" />
+ <dsig:Reference Id="reference-1-1" URI="file:../conf/server.xml">
+ <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
+ <dsig:DigestValue>tLODyeiWFbAkQKwhrR23jtcgu4k=</dsig:DigestValue>
+ </dsig:Reference>
+ </dsig:SignedInfo>
+ <dsig:SignatureValue>
+ VEjXB6+geUL16oTPDVx5lcQliGl/oyVobug3BVxVwhu8CU7WK65moTcTuo/CL2hQ
+ </dsig:SignatureValue>
+ <dsig:KeyInfo>
+ <dsig:X509Data>
+ <dsig:X509Certificate>
+ MIID+DCCA2WgAwIBAgIBCTAJBgUrDgMCHQUAMH8xCzAJBgNVBAYTAkFUMSwwKgYD
+ VQQKEyNTdGFic3RlbGxlIElLVC1TdHJhdGVnaWUgZGVzIEJ1bmRlczEeMBwGA1UE
+ CxMVVGVjaG5payB1bmQgU3RhbmRhcmRzMSIwIAYDVQQDExlUZXN0IENBIC0gU2ln
+ bmF0dXJkaWVuc3RlMB4XDTA0MDgwNDA4MjM0OFoXDTA3MDgwNDA4MjM0OFowgZgx
+ CzAJBgNVBAYTAkFUMS0wKwYDVQQKEyRTdGFic3N0ZWxsZSBJS1QtU3RyYXRlZ2ll
+ IGRlcyBCdW5kZXMxHjAcBgNVBAsTFVRlY2huaWsgdW5kIFN0YW5kYXJkczE6MDgG
+ A1UEAxMxVGVzdDogU2lnbmF0dXJkaWVuc3QgYWxsZXIgS3VuZGVuOiBFQ0RTQSAo
+ UDE5MnYxKTCB8zCBvAYHKoZIzj0CATCBsAIBATAkBgcqhkjOPQEBAhkA////////
+ /////////////v//////////MDQEGP////////////////////7//////////AQY
+ ZCEFGeWcgOcPp+mrciQwSf643uzBRrmxBDEEGI2oDrAwkPZ8vyDrQ6GIAPT/Cv2C
+ /xASBxkrlf/I2nhjEBHtayTN1XP5d6EeeUgRAhkA////////////////md74NhRr
+ ybG00igxAgEBAzIABNHWY9lQOE1zgmpcpjTg2WIg6qgEsGhpXELPinJoMPDVheTv
+ 2BZPG42YJsNfvWgC06OCARwwggEYMA4GA1UdDwEB/wQEAwIGwDAMBgNVHRMBAf8E
+ AjAAMB0GA1UdDgQWBBRHH5EXnrWosCmIa+JyEM5seMxFVzBdBgNVHSAEVjBUMFIG
+ DCsGAQQBlRIBAgMBATBCMEAGCCsGAQUFBwICMDQaMkRpZXNlcyBaZXJ0aWZpa2F0
+ IGlzdCBudXIgZvxyIFRlc3R6d2Vja2UgZ2VlaWduZXQuMEMGA1UdHwQ8MDowOKA2
+ oDSGMmh0dHA6Ly9sYWJzLmNpby5ndi5hdC90ZW1wL2NybHMvc2lnbmF0dXJkaWVu
+ c3QuY3JsMBQGByooAAoBAQEECQwHQktBLUlLVDAfBgNVHSMEGDAWgBRAl0P5fWaw
+ vf59+uxGcYY9wffZPTAJBgUrDgMCHQUAA4GBAIMKUsnajgfBtpHeDdMdQMLA8fdt
+ lluezDOM78WYYSFURP04QZk5iHkShzptgZCF5Y/T4an3dC3SnytL67LJvEoKUyja
+ iTMLo7650xRTvAjTaMJ+nly/wTRYJKplOLXKWj3WwfObMHXdsDE8NJmpJSRE7Sw7
+ +tj+UiTiNNSaXirq
+ </dsig:X509Certificate>
+ </dsig:X509Data>
+ </dsig:KeyInfo>
+ </dsig:Signature>
+ </XMLContent>
+ </VerifySignatureEnvironment>
+ <VerifySignatureLocation xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">/dsig:Signature</VerifySignatureLocation>
+ </VerifySignatureInfo>
+ <SignatureManifestCheckParams ReturnReferenceInputData="true">
+ <ReferenceInfo>
+ <VerifyTransformsInfoProfile />
+ </ReferenceInfo>
+ </SignatureManifestCheckParams>
+ <TrustProfileID>Test-Signaturdienste</TrustProfileID>
+</VerifyXMLSignatureRequest> \ No newline at end of file
diff --git a/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.SigManifest.resp.xml b/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.SigManifest.resp.xml
new file mode 100644
index 000000000..3798b2706
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.SigManifest.resp.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VerifyXMLSignatureResponse xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><SignerInfo><dsig:X509Data><dsig:X509SubjectName>CN=Test: Signaturdienst aller Kunden: ECDSA (P192v1),OU=Technik und Standards,O=Stabsstelle IKT-Strategie des Bundes,C=AT</dsig:X509SubjectName><dsig:X509IssuerSerial><dsig:X509IssuerName>CN=Test CA - Signaturdienste,OU=Technik und Standards,O=Stabstelle IKT-Strategie des Bundes,C=AT</dsig:X509IssuerName><dsig:X509SerialNumber>9</dsig:X509SerialNumber></dsig:X509IssuerSerial><dsig:X509Certificate>MIID+DCCA2WgAwIBAgIBCTAJBgUrDgMCHQUAMH8xCzAJBgNVBAYTAkFUMSwwKgYD
+VQQKEyNTdGFic3RlbGxlIElLVC1TdHJhdGVnaWUgZGVzIEJ1bmRlczEeMBwGA1UE
+CxMVVGVjaG5payB1bmQgU3RhbmRhcmRzMSIwIAYDVQQDExlUZXN0IENBIC0gU2ln
+bmF0dXJkaWVuc3RlMB4XDTA0MDgwNDA4MjM0OFoXDTA3MDgwNDA4MjM0OFowgZgx
+CzAJBgNVBAYTAkFUMS0wKwYDVQQKEyRTdGFic3N0ZWxsZSBJS1QtU3RyYXRlZ2ll
+IGRlcyBCdW5kZXMxHjAcBgNVBAsTFVRlY2huaWsgdW5kIFN0YW5kYXJkczE6MDgG
+A1UEAxMxVGVzdDogU2lnbmF0dXJkaWVuc3QgYWxsZXIgS3VuZGVuOiBFQ0RTQSAo
+UDE5MnYxKTCB8zCBvAYHKoZIzj0CATCBsAIBATAkBgcqhkjOPQEBAhkA////////
+/////////////v//////////MDQEGP////////////////////7//////////AQY
+ZCEFGeWcgOcPp+mrciQwSf643uzBRrmxBDEEGI2oDrAwkPZ8vyDrQ6GIAPT/Cv2C
+/xASBxkrlf/I2nhjEBHtayTN1XP5d6EeeUgRAhkA////////////////md74NhRr
+ybG00igxAgEBAzIABNHWY9lQOE1zgmpcpjTg2WIg6qgEsGhpXELPinJoMPDVheTv
+2BZPG42YJsNfvWgC06OCARwwggEYMA4GA1UdDwEB/wQEAwIGwDAMBgNVHRMBAf8E
+AjAAMB0GA1UdDgQWBBRHH5EXnrWosCmIa+JyEM5seMxFVzBdBgNVHSAEVjBUMFIG
+DCsGAQQBlRIBAgMBATBCMEAGCCsGAQUFBwICMDQaMkRpZXNlcyBaZXJ0aWZpa2F0
+IGlzdCBudXIgZvxyIFRlc3R6d2Vja2UgZ2VlaWduZXQuMEMGA1UdHwQ8MDowOKA2
+oDSGMmh0dHA6Ly9sYWJzLmNpby5ndi5hdC90ZW1wL2NybHMvc2lnbmF0dXJkaWVu
+c3QuY3JsMBQGByooAAoBAQEECQwHQktBLUlLVDAfBgNVHSMEGDAWgBRAl0P5fWaw
+vf59+uxGcYY9wffZPTAJBgUrDgMCHQUAA4GBAIMKUsnajgfBtpHeDdMdQMLA8fdt
+lluezDOM78WYYSFURP04QZk5iHkShzptgZCF5Y/T4an3dC3SnytL67LJvEoKUyja
+iTMLo7650xRTvAjTaMJ+nly/wTRYJKplOLXKWj3WwfObMHXdsDE8NJmpJSRE7Sw7
++tj+UiTiNNSaXirq</dsig:X509Certificate><PublicAuthority><Code>BKA-IKT</Code></PublicAuthority></dsig:X509Data></SignerInfo><ReferenceInputData PartOf="SignedInfo"><XMLContent xml:space="preserve"><doc:Paragraph ParaId="Para2" xmlns:doc="urn:document" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">Und ich bin der zweite Absatz in diesem Dokument.
+Ich habe weiters ein eigenens ID-Attribut bekommen.</doc:Paragraph></XMLContent></ReferenceInputData><ReferenceInputData PartOf="SignedInfo"><XMLContent xml:space="preserve"><dsig:Manifest Id="manifest-1-1" xmlns:doc="urn:document" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dsig:Reference URI="http://localhost:8080/referencedData/XMLDocument.Para.xsl"><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>B9nRChTbct68n9h5+Cb2mfNkASI=</dsig:DigestValue></dsig:Reference></dsig:Manifest></XMLContent></ReferenceInputData><ReferenceInputData PartOf="SignedInfo"><XMLContent xml:space="preserve"><etsi:SignedProperties xmlns:doc="urn:document" xmlns:etsi="http://uri.etsi.org/01903/v1.1.1#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><etsi:SignedSignatureProperties><etsi:SigningTime>2004-08-20T12:42:21</etsi:SigningTime><etsi:SigningCertificate><etsi:Cert><etsi:CertDigest><etsi:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><etsi:DigestValue>FOWcAqaHew69LEIDiGuiWVnB0mc=</etsi:DigestValue></etsi:CertDigest><etsi:IssuerSerial><dsig:X509IssuerName>CN=Test CA - Signaturdienste,OU=Technik und Standards,O=Stabstelle IKT-Strategie des Bundes,C=AT</dsig:X509IssuerName><dsig:X509SerialNumber>9</dsig:X509SerialNumber></etsi:IssuerSerial></etsi:Cert></etsi:SigningCertificate><etsi:SignaturePolicyIdentifier><etsi:SignaturePolicyImplied/></etsi:SignaturePolicyIdentifier></etsi:SignedSignatureProperties><etsi:SignedDataObjectProperties><etsi:DataObjectFormat ObjectReference="#reference-1-1"><etsi:MimeType>application/xhtml+xml</etsi:MimeType></etsi:DataObjectFormat></etsi:SignedDataObjectProperties></etsi:SignedProperties></XMLContent></ReferenceInputData><SignatureCheck><Code>0</Code></SignatureCheck><SignatureManifestCheck><Code>0</Code></SignatureManifestCheck><CertificateCheck><Code>0</Code></CertificateCheck></VerifyXMLSignatureResponse> \ No newline at end of file
diff --git a/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.SigManifest.xml b/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.SigManifest.xml
new file mode 100644
index 000000000..657beca77
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.SigManifest.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VerifyXMLSignatureRequest xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
+ <VerifySignatureInfo>
+ <VerifySignatureEnvironment>
+ <XMLContent><doc:XMLDocument xmlns:doc="urn:document" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:document http://localhost:8080/referencedData/XMLDocument.xsd">
+ <doc:Paragraph>Ich bin der erste Absatz in diesem Dokument.</doc:Paragraph>
+ <doc:Paragraph ParaId="Para2">Und ich bin der zweite Absatz in diesem Dokument.
+Ich habe weiters ein eigenens ID-Attribut bekommen.</doc:Paragraph><dsig:Signature Id="signature-1-1" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:SignedInfo><dsig:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><dsig:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"/><dsig:Reference Id="reference-1-1" URI="#Para2"><dsig:Transforms><dsig:Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116"><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:include href="http://localhost:8080/referencedData/XMLDocument.Para.xsl"/>
+</xsl:stylesheet></dsig:Transform><dsig:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>luM3wUmedTvkMHVedQkA/8otXUE=</dsig:DigestValue></dsig:Reference><dsig:Reference Type="http://www.buergerkarte.at/specifications/Security-Layer/20020225#SignatureManifest" URI="#manifest-1-1"><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>1aSV+vFkwG6NZCk5ZUzZV3J4eSo=</dsig:DigestValue></dsig:Reference><dsig:Reference Type="http://uri.etsi.org/01903/v1.1.1#SignedProperties" URI="#xmlns(etsi=http://uri.etsi.org/01903/v1.1.1%23)%20xpointer(id(&apos;etsi-signed-1-1&apos;)/child::etsi:QualifyingProperties/child::etsi:SignedProperties)"><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>Dy1xXsV2LgSFJlGwYiunav1KC7A=</dsig:DigestValue></dsig:Reference></dsig:SignedInfo><dsig:SignatureValue>f1v/vi1S7xiL+7ofWOUqBfoqOy42EnlXYFoTYcaUZaBiAecDvyX9StPRWTUls/j2</dsig:SignatureValue><dsig:KeyInfo><dsig:X509Data><dsig:X509Certificate>MIID+DCCA2WgAwIBAgIBCTAJBgUrDgMCHQUAMH8xCzAJBgNVBAYTAkFUMSwwKgYD
+VQQKEyNTdGFic3RlbGxlIElLVC1TdHJhdGVnaWUgZGVzIEJ1bmRlczEeMBwGA1UE
+CxMVVGVjaG5payB1bmQgU3RhbmRhcmRzMSIwIAYDVQQDExlUZXN0IENBIC0gU2ln
+bmF0dXJkaWVuc3RlMB4XDTA0MDgwNDA4MjM0OFoXDTA3MDgwNDA4MjM0OFowgZgx
+CzAJBgNVBAYTAkFUMS0wKwYDVQQKEyRTdGFic3N0ZWxsZSBJS1QtU3RyYXRlZ2ll
+IGRlcyBCdW5kZXMxHjAcBgNVBAsTFVRlY2huaWsgdW5kIFN0YW5kYXJkczE6MDgG
+A1UEAxMxVGVzdDogU2lnbmF0dXJkaWVuc3QgYWxsZXIgS3VuZGVuOiBFQ0RTQSAo
+UDE5MnYxKTCB8zCBvAYHKoZIzj0CATCBsAIBATAkBgcqhkjOPQEBAhkA////////
+/////////////v//////////MDQEGP////////////////////7//////////AQY
+ZCEFGeWcgOcPp+mrciQwSf643uzBRrmxBDEEGI2oDrAwkPZ8vyDrQ6GIAPT/Cv2C
+/xASBxkrlf/I2nhjEBHtayTN1XP5d6EeeUgRAhkA////////////////md74NhRr
+ybG00igxAgEBAzIABNHWY9lQOE1zgmpcpjTg2WIg6qgEsGhpXELPinJoMPDVheTv
+2BZPG42YJsNfvWgC06OCARwwggEYMA4GA1UdDwEB/wQEAwIGwDAMBgNVHRMBAf8E
+AjAAMB0GA1UdDgQWBBRHH5EXnrWosCmIa+JyEM5seMxFVzBdBgNVHSAEVjBUMFIG
+DCsGAQQBlRIBAgMBATBCMEAGCCsGAQUFBwICMDQaMkRpZXNlcyBaZXJ0aWZpa2F0
+IGlzdCBudXIgZvxyIFRlc3R6d2Vja2UgZ2VlaWduZXQuMEMGA1UdHwQ8MDowOKA2
+oDSGMmh0dHA6Ly9sYWJzLmNpby5ndi5hdC90ZW1wL2NybHMvc2lnbmF0dXJkaWVu
+c3QuY3JsMBQGByooAAoBAQEECQwHQktBLUlLVDAfBgNVHSMEGDAWgBRAl0P5fWaw
+vf59+uxGcYY9wffZPTAJBgUrDgMCHQUAA4GBAIMKUsnajgfBtpHeDdMdQMLA8fdt
+lluezDOM78WYYSFURP04QZk5iHkShzptgZCF5Y/T4an3dC3SnytL67LJvEoKUyja
+iTMLo7650xRTvAjTaMJ+nly/wTRYJKplOLXKWj3WwfObMHXdsDE8NJmpJSRE7Sw7
++tj+UiTiNNSaXirq</dsig:X509Certificate></dsig:X509Data></dsig:KeyInfo><dsig:Object><dsig:Manifest Id="manifest-1-1"><dsig:Reference URI="http://localhost:8080/referencedData/XMLDocument.Para.xsl"><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>B9nRChTbct68n9h5+Cb2mfNkASI=</dsig:DigestValue></dsig:Reference></dsig:Manifest></dsig:Object><dsig:Object Id="etsi-signed-1-1"><etsi:QualifyingProperties Target="#signature-1-1" xmlns:etsi="http://uri.etsi.org/01903/v1.1.1#"><etsi:SignedProperties><etsi:SignedSignatureProperties><etsi:SigningTime>2005-03-29T09:55:29</etsi:SigningTime><etsi:SigningCertificate><etsi:Cert><etsi:CertDigest><etsi:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><etsi:DigestValue>FOWcAqaHew69LEIDiGuiWVnB0mc=</etsi:DigestValue></etsi:CertDigest><etsi:IssuerSerial><dsig:X509IssuerName>CN=Test CA - Signaturdienste,OU=Technik und Standards,O=Stabstelle IKT-Strategie des Bundes,C=AT</dsig:X509IssuerName><dsig:X509SerialNumber>9</dsig:X509SerialNumber></etsi:IssuerSerial></etsi:Cert></etsi:SigningCertificate><etsi:SignaturePolicyIdentifier><etsi:SignaturePolicyImplied/></etsi:SignaturePolicyIdentifier></etsi:SignedSignatureProperties><etsi:SignedDataObjectProperties><etsi:DataObjectFormat ObjectReference="#reference-1-1"><etsi:MimeType>application/xhtml+xml</etsi:MimeType></etsi:DataObjectFormat></etsi:SignedDataObjectProperties></etsi:SignedProperties></etsi:QualifyingProperties></dsig:Object></dsig:Signature>
+</doc:XMLDocument></XMLContent>
+ </VerifySignatureEnvironment>
+ <VerifySignatureLocation xmlns:doc="urn:document">/doc:XMLDocument/dsig:Signature</VerifySignatureLocation>
+ </VerifySignatureInfo>
+ <SignatureManifestCheckParams ReturnReferenceInputData="true">
+ <ReferenceInfo>
+ <VerifyTransformsInfoProfile>
+ <dsig:Transforms><dsig:Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116"><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:include href="http://localhost:8080/referencedData/XMLDocument.Para.xsl"/>
+</xsl:stylesheet></dsig:Transform><dsig:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/></dsig:Transforms>
+ <TransformParameter URI="http://localhost:8080/referencedData/XMLDocument.Para.xsl"/>
+ </VerifyTransformsInfoProfile>
+ <VerifyTransformsInfoProfile>
+ <dsig:Transforms><dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/></dsig:Transforms>
+ </VerifyTransformsInfoProfile>
+ </ReferenceInfo>
+ </SignatureManifestCheckParams>
+ <TrustProfileID>Test-Signaturdienste</TrustProfileID>
+</VerifyXMLSignatureRequest>
diff --git a/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.Simple.resp.xml b/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.Simple.resp.xml
new file mode 100644
index 000000000..2fab33b20
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.Simple.resp.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VerifyXMLSignatureResponse xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><SignerInfo><dsig:X509Data><dsig:X509SubjectName>CN=Test: Signaturdienst aller Kunden: ECDSA (P192v1),OU=Technik und Standards,O=Stabsstelle IKT-Strategie des Bundes,C=AT</dsig:X509SubjectName><dsig:X509IssuerSerial><dsig:X509IssuerName>CN=Test CA - Signaturdienste,OU=Technik und Standards,O=Stabstelle IKT-Strategie des Bundes,C=AT</dsig:X509IssuerName><dsig:X509SerialNumber>9</dsig:X509SerialNumber></dsig:X509IssuerSerial><dsig:X509Certificate>MIID+DCCA2WgAwIBAgIBCTAJBgUrDgMCHQUAMH8xCzAJBgNVBAYTAkFUMSwwKgYD
+VQQKEyNTdGFic3RlbGxlIElLVC1TdHJhdGVnaWUgZGVzIEJ1bmRlczEeMBwGA1UE
+CxMVVGVjaG5payB1bmQgU3RhbmRhcmRzMSIwIAYDVQQDExlUZXN0IENBIC0gU2ln
+bmF0dXJkaWVuc3RlMB4XDTA0MDgwNDA4MjM0OFoXDTA3MDgwNDA4MjM0OFowgZgx
+CzAJBgNVBAYTAkFUMS0wKwYDVQQKEyRTdGFic3N0ZWxsZSBJS1QtU3RyYXRlZ2ll
+IGRlcyBCdW5kZXMxHjAcBgNVBAsTFVRlY2huaWsgdW5kIFN0YW5kYXJkczE6MDgG
+A1UEAxMxVGVzdDogU2lnbmF0dXJkaWVuc3QgYWxsZXIgS3VuZGVuOiBFQ0RTQSAo
+UDE5MnYxKTCB8zCBvAYHKoZIzj0CATCBsAIBATAkBgcqhkjOPQEBAhkA////////
+/////////////v//////////MDQEGP////////////////////7//////////AQY
+ZCEFGeWcgOcPp+mrciQwSf643uzBRrmxBDEEGI2oDrAwkPZ8vyDrQ6GIAPT/Cv2C
+/xASBxkrlf/I2nhjEBHtayTN1XP5d6EeeUgRAhkA////////////////md74NhRr
+ybG00igxAgEBAzIABNHWY9lQOE1zgmpcpjTg2WIg6qgEsGhpXELPinJoMPDVheTv
+2BZPG42YJsNfvWgC06OCARwwggEYMA4GA1UdDwEB/wQEAwIGwDAMBgNVHRMBAf8E
+AjAAMB0GA1UdDgQWBBRHH5EXnrWosCmIa+JyEM5seMxFVzBdBgNVHSAEVjBUMFIG
+DCsGAQQBlRIBAgMBATBCMEAGCCsGAQUFBwICMDQaMkRpZXNlcyBaZXJ0aWZpa2F0
+IGlzdCBudXIgZvxyIFRlc3R6d2Vja2UgZ2VlaWduZXQuMEMGA1UdHwQ8MDowOKA2
+oDSGMmh0dHA6Ly9sYWJzLmNpby5ndi5hdC90ZW1wL2NybHMvc2lnbmF0dXJkaWVu
+c3QuY3JsMBQGByooAAoBAQEECQwHQktBLUlLVDAfBgNVHSMEGDAWgBRAl0P5fWaw
+vf59+uxGcYY9wffZPTAJBgUrDgMCHQUAA4GBAIMKUsnajgfBtpHeDdMdQMLA8fdt
+lluezDOM78WYYSFURP04QZk5iHkShzptgZCF5Y/T4an3dC3SnytL67LJvEoKUyja
+iTMLo7650xRTvAjTaMJ+nly/wTRYJKplOLXKWj3WwfObMHXdsDE8NJmpJSRE7Sw7
++tj+UiTiNNSaXirq</dsig:X509Certificate><PublicAuthority><Code>BKA-IKT</Code></PublicAuthority></dsig:X509Data></SignerInfo><SignatureCheck><Code>0</Code></SignatureCheck><CertificateCheck><Code>0</Code></CertificateCheck></VerifyXMLSignatureResponse> \ No newline at end of file
diff --git a/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.Simple.xml b/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.Simple.xml
new file mode 100644
index 000000000..5565601d8
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.Simple.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VerifyXMLSignatureRequest xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#">
+ <VerifySignatureInfo>
+ <VerifySignatureEnvironment>
+ <XMLContent><dsig:Signature Id="signature-1-1" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:SignedInfo><dsig:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><dsig:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"/><dsig:Reference Id="reference-1-1" URI="#xpointer(id(&apos;signed-data-1-1-1&apos;)/node())"><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>tLODyeiWFbAkQKwhrR23jtcgu4k=</dsig:DigestValue></dsig:Reference></dsig:SignedInfo><dsig:SignatureValue>VEjXB6+geUL16oTPDVx5lcQliGl/oyVobug3BVxVwhu8CU7WK65moTcTuo/CL2hQ</dsig:SignatureValue><dsig:KeyInfo><dsig:X509Data><dsig:X509Certificate>MIID+DCCA2WgAwIBAgIBCTAJBgUrDgMCHQUAMH8xCzAJBgNVBAYTAkFUMSwwKgYD
+VQQKEyNTdGFic3RlbGxlIElLVC1TdHJhdGVnaWUgZGVzIEJ1bmRlczEeMBwGA1UE
+CxMVVGVjaG5payB1bmQgU3RhbmRhcmRzMSIwIAYDVQQDExlUZXN0IENBIC0gU2ln
+bmF0dXJkaWVuc3RlMB4XDTA0MDgwNDA4MjM0OFoXDTA3MDgwNDA4MjM0OFowgZgx
+CzAJBgNVBAYTAkFUMS0wKwYDVQQKEyRTdGFic3N0ZWxsZSBJS1QtU3RyYXRlZ2ll
+IGRlcyBCdW5kZXMxHjAcBgNVBAsTFVRlY2huaWsgdW5kIFN0YW5kYXJkczE6MDgG
+A1UEAxMxVGVzdDogU2lnbmF0dXJkaWVuc3QgYWxsZXIgS3VuZGVuOiBFQ0RTQSAo
+UDE5MnYxKTCB8zCBvAYHKoZIzj0CATCBsAIBATAkBgcqhkjOPQEBAhkA////////
+/////////////v//////////MDQEGP////////////////////7//////////AQY
+ZCEFGeWcgOcPp+mrciQwSf643uzBRrmxBDEEGI2oDrAwkPZ8vyDrQ6GIAPT/Cv2C
+/xASBxkrlf/I2nhjEBHtayTN1XP5d6EeeUgRAhkA////////////////md74NhRr
+ybG00igxAgEBAzIABNHWY9lQOE1zgmpcpjTg2WIg6qgEsGhpXELPinJoMPDVheTv
+2BZPG42YJsNfvWgC06OCARwwggEYMA4GA1UdDwEB/wQEAwIGwDAMBgNVHRMBAf8E
+AjAAMB0GA1UdDgQWBBRHH5EXnrWosCmIa+JyEM5seMxFVzBdBgNVHSAEVjBUMFIG
+DCsGAQQBlRIBAgMBATBCMEAGCCsGAQUFBwICMDQaMkRpZXNlcyBaZXJ0aWZpa2F0
+IGlzdCBudXIgZvxyIFRlc3R6d2Vja2UgZ2VlaWduZXQuMEMGA1UdHwQ8MDowOKA2
+oDSGMmh0dHA6Ly9sYWJzLmNpby5ndi5hdC90ZW1wL2NybHMvc2lnbmF0dXJkaWVu
+c3QuY3JsMBQGByooAAoBAQEECQwHQktBLUlLVDAfBgNVHSMEGDAWgBRAl0P5fWaw
+vf59+uxGcYY9wffZPTAJBgUrDgMCHQUAA4GBAIMKUsnajgfBtpHeDdMdQMLA8fdt
+lluezDOM78WYYSFURP04QZk5iHkShzptgZCF5Y/T4an3dC3SnytL67LJvEoKUyja
+iTMLo7650xRTvAjTaMJ+nly/wTRYJKplOLXKWj3WwfObMHXdsDE8NJmpJSRE7Sw7
++tj+UiTiNNSaXirq</dsig:X509Certificate></dsig:X509Data></dsig:KeyInfo><dsig:Object Id="signed-data-1-1-1">Diese Daten werden signiert.</dsig:Object></dsig:Signature></XMLContent></VerifySignatureEnvironment>
+ <VerifySignatureLocation xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">/dsig:Signature</VerifySignatureLocation>
+ </VerifySignatureInfo>
+ <TrustProfileID>Test-Signaturdienste</TrustProfileID>
+</VerifyXMLSignatureRequest>
diff --git a/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.Supplements.resp.xml b/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.Supplements.resp.xml
new file mode 100644
index 000000000..2fab33b20
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.Supplements.resp.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VerifyXMLSignatureResponse xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><SignerInfo><dsig:X509Data><dsig:X509SubjectName>CN=Test: Signaturdienst aller Kunden: ECDSA (P192v1),OU=Technik und Standards,O=Stabsstelle IKT-Strategie des Bundes,C=AT</dsig:X509SubjectName><dsig:X509IssuerSerial><dsig:X509IssuerName>CN=Test CA - Signaturdienste,OU=Technik und Standards,O=Stabstelle IKT-Strategie des Bundes,C=AT</dsig:X509IssuerName><dsig:X509SerialNumber>9</dsig:X509SerialNumber></dsig:X509IssuerSerial><dsig:X509Certificate>MIID+DCCA2WgAwIBAgIBCTAJBgUrDgMCHQUAMH8xCzAJBgNVBAYTAkFUMSwwKgYD
+VQQKEyNTdGFic3RlbGxlIElLVC1TdHJhdGVnaWUgZGVzIEJ1bmRlczEeMBwGA1UE
+CxMVVGVjaG5payB1bmQgU3RhbmRhcmRzMSIwIAYDVQQDExlUZXN0IENBIC0gU2ln
+bmF0dXJkaWVuc3RlMB4XDTA0MDgwNDA4MjM0OFoXDTA3MDgwNDA4MjM0OFowgZgx
+CzAJBgNVBAYTAkFUMS0wKwYDVQQKEyRTdGFic3N0ZWxsZSBJS1QtU3RyYXRlZ2ll
+IGRlcyBCdW5kZXMxHjAcBgNVBAsTFVRlY2huaWsgdW5kIFN0YW5kYXJkczE6MDgG
+A1UEAxMxVGVzdDogU2lnbmF0dXJkaWVuc3QgYWxsZXIgS3VuZGVuOiBFQ0RTQSAo
+UDE5MnYxKTCB8zCBvAYHKoZIzj0CATCBsAIBATAkBgcqhkjOPQEBAhkA////////
+/////////////v//////////MDQEGP////////////////////7//////////AQY
+ZCEFGeWcgOcPp+mrciQwSf643uzBRrmxBDEEGI2oDrAwkPZ8vyDrQ6GIAPT/Cv2C
+/xASBxkrlf/I2nhjEBHtayTN1XP5d6EeeUgRAhkA////////////////md74NhRr
+ybG00igxAgEBAzIABNHWY9lQOE1zgmpcpjTg2WIg6qgEsGhpXELPinJoMPDVheTv
+2BZPG42YJsNfvWgC06OCARwwggEYMA4GA1UdDwEB/wQEAwIGwDAMBgNVHRMBAf8E
+AjAAMB0GA1UdDgQWBBRHH5EXnrWosCmIa+JyEM5seMxFVzBdBgNVHSAEVjBUMFIG
+DCsGAQQBlRIBAgMBATBCMEAGCCsGAQUFBwICMDQaMkRpZXNlcyBaZXJ0aWZpa2F0
+IGlzdCBudXIgZvxyIFRlc3R6d2Vja2UgZ2VlaWduZXQuMEMGA1UdHwQ8MDowOKA2
+oDSGMmh0dHA6Ly9sYWJzLmNpby5ndi5hdC90ZW1wL2NybHMvc2lnbmF0dXJkaWVu
+c3QuY3JsMBQGByooAAoBAQEECQwHQktBLUlLVDAfBgNVHSMEGDAWgBRAl0P5fWaw
+vf59+uxGcYY9wffZPTAJBgUrDgMCHQUAA4GBAIMKUsnajgfBtpHeDdMdQMLA8fdt
+lluezDOM78WYYSFURP04QZk5iHkShzptgZCF5Y/T4an3dC3SnytL67LJvEoKUyja
+iTMLo7650xRTvAjTaMJ+nly/wTRYJKplOLXKWj3WwfObMHXdsDE8NJmpJSRE7Sw7
++tj+UiTiNNSaXirq</dsig:X509Certificate><PublicAuthority><Code>BKA-IKT</Code></PublicAuthority></dsig:X509Data></SignerInfo><SignatureCheck><Code>0</Code></SignatureCheck><CertificateCheck><Code>0</Code></CertificateCheck></VerifyXMLSignatureResponse> \ No newline at end of file
diff --git a/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.Supplements.response.xml b/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.Supplements.response.xml
new file mode 100644
index 000000000..2fab33b20
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.Supplements.response.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VerifyXMLSignatureResponse xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><SignerInfo><dsig:X509Data><dsig:X509SubjectName>CN=Test: Signaturdienst aller Kunden: ECDSA (P192v1),OU=Technik und Standards,O=Stabsstelle IKT-Strategie des Bundes,C=AT</dsig:X509SubjectName><dsig:X509IssuerSerial><dsig:X509IssuerName>CN=Test CA - Signaturdienste,OU=Technik und Standards,O=Stabstelle IKT-Strategie des Bundes,C=AT</dsig:X509IssuerName><dsig:X509SerialNumber>9</dsig:X509SerialNumber></dsig:X509IssuerSerial><dsig:X509Certificate>MIID+DCCA2WgAwIBAgIBCTAJBgUrDgMCHQUAMH8xCzAJBgNVBAYTAkFUMSwwKgYD
+VQQKEyNTdGFic3RlbGxlIElLVC1TdHJhdGVnaWUgZGVzIEJ1bmRlczEeMBwGA1UE
+CxMVVGVjaG5payB1bmQgU3RhbmRhcmRzMSIwIAYDVQQDExlUZXN0IENBIC0gU2ln
+bmF0dXJkaWVuc3RlMB4XDTA0MDgwNDA4MjM0OFoXDTA3MDgwNDA4MjM0OFowgZgx
+CzAJBgNVBAYTAkFUMS0wKwYDVQQKEyRTdGFic3N0ZWxsZSBJS1QtU3RyYXRlZ2ll
+IGRlcyBCdW5kZXMxHjAcBgNVBAsTFVRlY2huaWsgdW5kIFN0YW5kYXJkczE6MDgG
+A1UEAxMxVGVzdDogU2lnbmF0dXJkaWVuc3QgYWxsZXIgS3VuZGVuOiBFQ0RTQSAo
+UDE5MnYxKTCB8zCBvAYHKoZIzj0CATCBsAIBATAkBgcqhkjOPQEBAhkA////////
+/////////////v//////////MDQEGP////////////////////7//////////AQY
+ZCEFGeWcgOcPp+mrciQwSf643uzBRrmxBDEEGI2oDrAwkPZ8vyDrQ6GIAPT/Cv2C
+/xASBxkrlf/I2nhjEBHtayTN1XP5d6EeeUgRAhkA////////////////md74NhRr
+ybG00igxAgEBAzIABNHWY9lQOE1zgmpcpjTg2WIg6qgEsGhpXELPinJoMPDVheTv
+2BZPG42YJsNfvWgC06OCARwwggEYMA4GA1UdDwEB/wQEAwIGwDAMBgNVHRMBAf8E
+AjAAMB0GA1UdDgQWBBRHH5EXnrWosCmIa+JyEM5seMxFVzBdBgNVHSAEVjBUMFIG
+DCsGAQQBlRIBAgMBATBCMEAGCCsGAQUFBwICMDQaMkRpZXNlcyBaZXJ0aWZpa2F0
+IGlzdCBudXIgZvxyIFRlc3R6d2Vja2UgZ2VlaWduZXQuMEMGA1UdHwQ8MDowOKA2
+oDSGMmh0dHA6Ly9sYWJzLmNpby5ndi5hdC90ZW1wL2NybHMvc2lnbmF0dXJkaWVu
+c3QuY3JsMBQGByooAAoBAQEECQwHQktBLUlLVDAfBgNVHSMEGDAWgBRAl0P5fWaw
+vf59+uxGcYY9wffZPTAJBgUrDgMCHQUAA4GBAIMKUsnajgfBtpHeDdMdQMLA8fdt
+lluezDOM78WYYSFURP04QZk5iHkShzptgZCF5Y/T4an3dC3SnytL67LJvEoKUyja
+iTMLo7650xRTvAjTaMJ+nly/wTRYJKplOLXKWj3WwfObMHXdsDE8NJmpJSRE7Sw7
++tj+UiTiNNSaXirq</dsig:X509Certificate><PublicAuthority><Code>BKA-IKT</Code></PublicAuthority></dsig:X509Data></SignerInfo><SignatureCheck><Code>0</Code></SignatureCheck><CertificateCheck><Code>0</Code></CertificateCheck></VerifyXMLSignatureResponse> \ No newline at end of file
diff --git a/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.Supplements.xml b/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.Supplements.xml
new file mode 100644
index 000000000..50ddbc1da
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.Supplements.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VerifyXMLSignatureRequest xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#">
+ <VerifySignatureInfo>
+ <VerifySignatureEnvironment>
+ <XMLContent><doc:XMLDocument xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:doc="urn:document" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:document urn:XMLDocument.xsd">
+ <doc:Paragraph>Ich bin der erste Absatz in diesem Dokument.</doc:Paragraph>
+ <doc:Paragraph ParaId="Para2">Und ich bin der zweite Absatz in diesem Dokument.
+Ich habe weiters ein eigenens ID-Attribut bekommen.</doc:Paragraph><dsig:Signature Id="signature-1-1" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:SignedInfo><dsig:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><dsig:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"/><dsig:Reference Id="reference-1-1" URI="#Para2"><dsig:Transforms><dsig:Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116"><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:include href="XMLDocument.Para.xsl"/>
+</xsl:stylesheet></dsig:Transform><dsig:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>luM3wUmedTvkMHVedQkA/8otXUE=</dsig:DigestValue></dsig:Reference></dsig:SignedInfo><dsig:SignatureValue>vGVimRmUHwrDR8feQCK1DZ2kyDw0CCrXimJi/yCrIoqSkUKFlKrtAyP2RUBXXjye</dsig:SignatureValue><dsig:KeyInfo><dsig:X509Data><dsig:X509Certificate>MIID+DCCA2WgAwIBAgIBCTAJBgUrDgMCHQUAMH8xCzAJBgNVBAYTAkFUMSwwKgYD
+VQQKEyNTdGFic3RlbGxlIElLVC1TdHJhdGVnaWUgZGVzIEJ1bmRlczEeMBwGA1UE
+CxMVVGVjaG5payB1bmQgU3RhbmRhcmRzMSIwIAYDVQQDExlUZXN0IENBIC0gU2ln
+bmF0dXJkaWVuc3RlMB4XDTA0MDgwNDA4MjM0OFoXDTA3MDgwNDA4MjM0OFowgZgx
+CzAJBgNVBAYTAkFUMS0wKwYDVQQKEyRTdGFic3N0ZWxsZSBJS1QtU3RyYXRlZ2ll
+IGRlcyBCdW5kZXMxHjAcBgNVBAsTFVRlY2huaWsgdW5kIFN0YW5kYXJkczE6MDgG
+A1UEAxMxVGVzdDogU2lnbmF0dXJkaWVuc3QgYWxsZXIgS3VuZGVuOiBFQ0RTQSAo
+UDE5MnYxKTCB8zCBvAYHKoZIzj0CATCBsAIBATAkBgcqhkjOPQEBAhkA////////
+/////////////v//////////MDQEGP////////////////////7//////////AQY
+ZCEFGeWcgOcPp+mrciQwSf643uzBRrmxBDEEGI2oDrAwkPZ8vyDrQ6GIAPT/Cv2C
+/xASBxkrlf/I2nhjEBHtayTN1XP5d6EeeUgRAhkA////////////////md74NhRr
+ybG00igxAgEBAzIABNHWY9lQOE1zgmpcpjTg2WIg6qgEsGhpXELPinJoMPDVheTv
+2BZPG42YJsNfvWgC06OCARwwggEYMA4GA1UdDwEB/wQEAwIGwDAMBgNVHRMBAf8E
+AjAAMB0GA1UdDgQWBBRHH5EXnrWosCmIa+JyEM5seMxFVzBdBgNVHSAEVjBUMFIG
+DCsGAQQBlRIBAgMBATBCMEAGCCsGAQUFBwICMDQaMkRpZXNlcyBaZXJ0aWZpa2F0
+IGlzdCBudXIgZvxyIFRlc3R6d2Vja2UgZ2VlaWduZXQuMEMGA1UdHwQ8MDowOKA2
+oDSGMmh0dHA6Ly9sYWJzLmNpby5ndi5hdC90ZW1wL2NybHMvc2lnbmF0dXJkaWVu
+c3QuY3JsMBQGByooAAoBAQEECQwHQktBLUlLVDAfBgNVHSMEGDAWgBRAl0P5fWaw
+vf59+uxGcYY9wffZPTAJBgUrDgMCHQUAA4GBAIMKUsnajgfBtpHeDdMdQMLA8fdt
+lluezDOM78WYYSFURP04QZk5iHkShzptgZCF5Y/T4an3dC3SnytL67LJvEoKUyja
+iTMLo7650xRTvAjTaMJ+nly/wTRYJKplOLXKWj3WwfObMHXdsDE8NJmpJSRE7Sw7
++tj+UiTiNNSaXirq</dsig:X509Certificate></dsig:X509Data></dsig:KeyInfo></dsig:Signature>
+</doc:XMLDocument></XMLContent>
+ </VerifySignatureEnvironment>
+ <VerifySignatureLocation xmlns:doc="urn:document" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">/doc:XMLDocument/dsig:Signature</VerifySignatureLocation>
+ </VerifySignatureInfo>
+ <SupplementProfile>
+ <Content Reference="XMLDocument.Para.xsl">
+ <LocRefContent>http://localhost:8080/referencedData/XMLDocument.Para.xsl</LocRefContent>
+ </Content>
+ </SupplementProfile>
+ <SupplementProfile>
+ <Content Reference="urn:XMLDocument.xsd">
+ <XMLContent><xs:schema targetNamespace="urn:document" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:document" elementFormDefault="qualified" attributeFormDefault="unqualified">
+ <xs:element name="XMLDocument">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Paragraph" maxOccurs="unbounded">
+ <xs:complexType mixed="true">
+ <xs:attribute name="ParaId" type="xs:ID" use="optional"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
+
+</XMLContent>
+ </Content>
+ </SupplementProfile>
+ <TrustProfileID>Test-Signaturdienste</TrustProfileID>
+</VerifyXMLSignatureRequest>
diff --git a/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.XMLDSigManifest.resp.xml b/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.XMLDSigManifest.resp.xml
new file mode 100644
index 000000000..9d3b6dea7
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.XMLDSigManifest.resp.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VerifyXMLSignatureResponse xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><SignerInfo><dsig:X509Data><dsig:X509SubjectName>CN=Test: Signaturdienst aller Kunden: ECDSA (P192v1),OU=Technik und Standards,O=Stabsstelle IKT-Strategie des Bundes,C=AT</dsig:X509SubjectName><dsig:X509IssuerSerial><dsig:X509IssuerName>CN=Test CA - Signaturdienste,OU=Technik und Standards,O=Stabstelle IKT-Strategie des Bundes,C=AT</dsig:X509IssuerName><dsig:X509SerialNumber>9</dsig:X509SerialNumber></dsig:X509IssuerSerial><dsig:X509Certificate>MIID+DCCA2WgAwIBAgIBCTAJBgUrDgMCHQUAMH8xCzAJBgNVBAYTAkFUMSwwKgYD
+VQQKEyNTdGFic3RlbGxlIElLVC1TdHJhdGVnaWUgZGVzIEJ1bmRlczEeMBwGA1UE
+CxMVVGVjaG5payB1bmQgU3RhbmRhcmRzMSIwIAYDVQQDExlUZXN0IENBIC0gU2ln
+bmF0dXJkaWVuc3RlMB4XDTA0MDgwNDA4MjM0OFoXDTA3MDgwNDA4MjM0OFowgZgx
+CzAJBgNVBAYTAkFUMS0wKwYDVQQKEyRTdGFic3N0ZWxsZSBJS1QtU3RyYXRlZ2ll
+IGRlcyBCdW5kZXMxHjAcBgNVBAsTFVRlY2huaWsgdW5kIFN0YW5kYXJkczE6MDgG
+A1UEAxMxVGVzdDogU2lnbmF0dXJkaWVuc3QgYWxsZXIgS3VuZGVuOiBFQ0RTQSAo
+UDE5MnYxKTCB8zCBvAYHKoZIzj0CATCBsAIBATAkBgcqhkjOPQEBAhkA////////
+/////////////v//////////MDQEGP////////////////////7//////////AQY
+ZCEFGeWcgOcPp+mrciQwSf643uzBRrmxBDEEGI2oDrAwkPZ8vyDrQ6GIAPT/Cv2C
+/xASBxkrlf/I2nhjEBHtayTN1XP5d6EeeUgRAhkA////////////////md74NhRr
+ybG00igxAgEBAzIABNHWY9lQOE1zgmpcpjTg2WIg6qgEsGhpXELPinJoMPDVheTv
+2BZPG42YJsNfvWgC06OCARwwggEYMA4GA1UdDwEB/wQEAwIGwDAMBgNVHRMBAf8E
+AjAAMB0GA1UdDgQWBBRHH5EXnrWosCmIa+JyEM5seMxFVzBdBgNVHSAEVjBUMFIG
+DCsGAQQBlRIBAgMBATBCMEAGCCsGAQUFBwICMDQaMkRpZXNlcyBaZXJ0aWZpa2F0
+IGlzdCBudXIgZvxyIFRlc3R6d2Vja2UgZ2VlaWduZXQuMEMGA1UdHwQ8MDowOKA2
+oDSGMmh0dHA6Ly9sYWJzLmNpby5ndi5hdC90ZW1wL2NybHMvc2lnbmF0dXJkaWVu
+c3QuY3JsMBQGByooAAoBAQEECQwHQktBLUlLVDAfBgNVHSMEGDAWgBRAl0P5fWaw
+vf59+uxGcYY9wffZPTAJBgUrDgMCHQUAA4GBAIMKUsnajgfBtpHeDdMdQMLA8fdt
+lluezDOM78WYYSFURP04QZk5iHkShzptgZCF5Y/T4an3dC3SnytL67LJvEoKUyja
+iTMLo7650xRTvAjTaMJ+nly/wTRYJKplOLXKWj3WwfObMHXdsDE8NJmpJSRE7Sw7
++tj+UiTiNNSaXirq</dsig:X509Certificate><PublicAuthority><Code>BKA-IKT</Code></PublicAuthority></dsig:X509Data></SignerInfo><SignatureCheck><Code>0</Code></SignatureCheck><XMLDSIGManifestCheck><Code>0</Code><Info><ReferringSigReference>1</ReferringSigReference></Info></XMLDSIGManifestCheck><CertificateCheck><Code>0</Code></CertificateCheck></VerifyXMLSignatureResponse> \ No newline at end of file
diff --git a/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.XMLDSigManifest.xml b/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.XMLDSigManifest.xml
new file mode 100644
index 000000000..a57fbb934
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/VerifyXMLSignatureRequest.XMLDSigManifest.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<VerifyXMLSignatureRequest xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
+ <VerifySignatureInfo>
+ <VerifySignatureEnvironment>
+ <XMLContent><dsig:Signature Id="signature-1-1" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:SignedInfo><dsig:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><dsig:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"/><dsig:Reference Type="http://www.w3.org/2000/09/xmldsig#Manifest" URI="#dsig-manifest-1-1"><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>nUUaW6OtcsNvV/QhqmkU2QXT1Mw=</dsig:DigestValue></dsig:Reference></dsig:SignedInfo><dsig:SignatureValue>pzI1j60BNsnS+zjXYtXlh109HjJGEMrMzTzkUB54rReOpI1ynNkG2RE7AiOlvpPh</dsig:SignatureValue><dsig:KeyInfo><dsig:X509Data><dsig:X509Certificate>MIID+DCCA2WgAwIBAgIBCTAJBgUrDgMCHQUAMH8xCzAJBgNVBAYTAkFUMSwwKgYD
+VQQKEyNTdGFic3RlbGxlIElLVC1TdHJhdGVnaWUgZGVzIEJ1bmRlczEeMBwGA1UE
+CxMVVGVjaG5payB1bmQgU3RhbmRhcmRzMSIwIAYDVQQDExlUZXN0IENBIC0gU2ln
+bmF0dXJkaWVuc3RlMB4XDTA0MDgwNDA4MjM0OFoXDTA3MDgwNDA4MjM0OFowgZgx
+CzAJBgNVBAYTAkFUMS0wKwYDVQQKEyRTdGFic3N0ZWxsZSBJS1QtU3RyYXRlZ2ll
+IGRlcyBCdW5kZXMxHjAcBgNVBAsTFVRlY2huaWsgdW5kIFN0YW5kYXJkczE6MDgG
+A1UEAxMxVGVzdDogU2lnbmF0dXJkaWVuc3QgYWxsZXIgS3VuZGVuOiBFQ0RTQSAo
+UDE5MnYxKTCB8zCBvAYHKoZIzj0CATCBsAIBATAkBgcqhkjOPQEBAhkA////////
+/////////////v//////////MDQEGP////////////////////7//////////AQY
+ZCEFGeWcgOcPp+mrciQwSf643uzBRrmxBDEEGI2oDrAwkPZ8vyDrQ6GIAPT/Cv2C
+/xASBxkrlf/I2nhjEBHtayTN1XP5d6EeeUgRAhkA////////////////md74NhRr
+ybG00igxAgEBAzIABNHWY9lQOE1zgmpcpjTg2WIg6qgEsGhpXELPinJoMPDVheTv
+2BZPG42YJsNfvWgC06OCARwwggEYMA4GA1UdDwEB/wQEAwIGwDAMBgNVHRMBAf8E
+AjAAMB0GA1UdDgQWBBRHH5EXnrWosCmIa+JyEM5seMxFVzBdBgNVHSAEVjBUMFIG
+DCsGAQQBlRIBAgMBATBCMEAGCCsGAQUFBwICMDQaMkRpZXNlcyBaZXJ0aWZpa2F0
+IGlzdCBudXIgZvxyIFRlc3R6d2Vja2UgZ2VlaWduZXQuMEMGA1UdHwQ8MDowOKA2
+oDSGMmh0dHA6Ly9sYWJzLmNpby5ndi5hdC90ZW1wL2NybHMvc2lnbmF0dXJkaWVu
+c3QuY3JsMBQGByooAAoBAQEECQwHQktBLUlLVDAfBgNVHSMEGDAWgBRAl0P5fWaw
+vf59+uxGcYY9wffZPTAJBgUrDgMCHQUAA4GBAIMKUsnajgfBtpHeDdMdQMLA8fdt
+lluezDOM78WYYSFURP04QZk5iHkShzptgZCF5Y/T4an3dC3SnytL67LJvEoKUyja
+iTMLo7650xRTvAjTaMJ+nly/wTRYJKplOLXKWj3WwfObMHXdsDE8NJmpJSRE7Sw7
++tj+UiTiNNSaXirq</dsig:X509Certificate></dsig:X509Data></dsig:KeyInfo><dsig:Object Id="signed-data-1-1-1">Diese Daten sind signiert.</dsig:Object><dsig:Object><dsig:Manifest Id="dsig-manifest-1-1"><dsig:Reference Id="reference-1-1" URI="#xpointer(id(&apos;signed-data-1-1-1&apos;)/node())"><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>EYxznGxNRAIcHQeUsj+zsK+uaHA=</dsig:DigestValue></dsig:Reference></dsig:Manifest></dsig:Object></dsig:Signature></XMLContent>
+ </VerifySignatureEnvironment>
+ <VerifySignatureLocation>//dsig:Signature</VerifySignatureLocation>
+ </VerifySignatureInfo>
+ <TrustProfileID>Test-Signaturdienste</TrustProfileID>
+</VerifyXMLSignatureRequest>
diff --git a/spss/handbook/clients/webservice/resources/requests/signatures2bverified/CreateXMLSignatureRequest.VerifyXML.Enveloped.response.xml b/spss/handbook/clients/webservice/resources/requests/signatures2bverified/CreateXMLSignatureRequest.VerifyXML.Enveloped.response.xml
new file mode 100644
index 000000000..be2eb37ad
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/signatures2bverified/CreateXMLSignatureRequest.VerifyXML.Enveloped.response.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CreateXMLSignatureResponse xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><SignatureEnvironment><doc:XMLDocument xmlns:doc="urn:document">
+ <doc:Paragraph>Ich bin der erste Absatz in diesem Dokument.</doc:Paragraph>
+ <doc:Paragraph ParaId="Para2">Und ich bin der zweite Absatz in diesem Dokument.
+Ich habe weiters ein eigenens ID-Attribut bekommen.</doc:Paragraph><dsig:Signature Id="signature-1-1" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:SignedInfo><dsig:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><dsig:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"/><dsig:Reference Id="reference-1-1" URI=""><dsig:Transforms><dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>2b83+NbXDFijHzz+sH0T7fM36sA=</dsig:DigestValue></dsig:Reference></dsig:SignedInfo><dsig:SignatureValue>30zsZMPn1mR5G5oIGJvTRmCik3WuepfZF6AhLwxgJDMJlPQ8rheBWCaKihzXnHaS</dsig:SignatureValue><dsig:KeyInfo><dsig:X509Data><dsig:X509Certificate>MIID+DCCA2WgAwIBAgIBCTAJBgUrDgMCHQUAMH8xCzAJBgNVBAYTAkFUMSwwKgYD
+VQQKEyNTdGFic3RlbGxlIElLVC1TdHJhdGVnaWUgZGVzIEJ1bmRlczEeMBwGA1UE
+CxMVVGVjaG5payB1bmQgU3RhbmRhcmRzMSIwIAYDVQQDExlUZXN0IENBIC0gU2ln
+bmF0dXJkaWVuc3RlMB4XDTA0MDgwNDA4MjM0OFoXDTA3MDgwNDA4MjM0OFowgZgx
+CzAJBgNVBAYTAkFUMS0wKwYDVQQKEyRTdGFic3N0ZWxsZSBJS1QtU3RyYXRlZ2ll
+IGRlcyBCdW5kZXMxHjAcBgNVBAsTFVRlY2huaWsgdW5kIFN0YW5kYXJkczE6MDgG
+A1UEAxMxVGVzdDogU2lnbmF0dXJkaWVuc3QgYWxsZXIgS3VuZGVuOiBFQ0RTQSAo
+UDE5MnYxKTCB8zCBvAYHKoZIzj0CATCBsAIBATAkBgcqhkjOPQEBAhkA////////
+/////////////v//////////MDQEGP////////////////////7//////////AQY
+ZCEFGeWcgOcPp+mrciQwSf643uzBRrmxBDEEGI2oDrAwkPZ8vyDrQ6GIAPT/Cv2C
+/xASBxkrlf/I2nhjEBHtayTN1XP5d6EeeUgRAhkA////////////////md74NhRr
+ybG00igxAgEBAzIABNHWY9lQOE1zgmpcpjTg2WIg6qgEsGhpXELPinJoMPDVheTv
+2BZPG42YJsNfvWgC06OCARwwggEYMA4GA1UdDwEB/wQEAwIGwDAMBgNVHRMBAf8E
+AjAAMB0GA1UdDgQWBBRHH5EXnrWosCmIa+JyEM5seMxFVzBdBgNVHSAEVjBUMFIG
+DCsGAQQBlRIBAgMBATBCMEAGCCsGAQUFBwICMDQaMkRpZXNlcyBaZXJ0aWZpa2F0
+IGlzdCBudXIgZvxyIFRlc3R6d2Vja2UgZ2VlaWduZXQuMEMGA1UdHwQ8MDowOKA2
+oDSGMmh0dHA6Ly9sYWJzLmNpby5ndi5hdC90ZW1wL2NybHMvc2lnbmF0dXJkaWVu
+c3QuY3JsMBQGByooAAoBAQEECQwHQktBLUlLVDAfBgNVHSMEGDAWgBRAl0P5fWaw
+vf59+uxGcYY9wffZPTAJBgUrDgMCHQUAA4GBAIMKUsnajgfBtpHeDdMdQMLA8fdt
+lluezDOM78WYYSFURP04QZk5iHkShzptgZCF5Y/T4an3dC3SnytL67LJvEoKUyja
+iTMLo7650xRTvAjTaMJ+nly/wTRYJKplOLXKWj3WwfObMHXdsDE8NJmpJSRE7Sw7
++tj+UiTiNNSaXirq</dsig:X509Certificate></dsig:X509Data></dsig:KeyInfo></dsig:Signature>
+</doc:XMLDocument></SignatureEnvironment></CreateXMLSignatureResponse> \ No newline at end of file
diff --git a/spss/handbook/clients/webservice/resources/requests/signatures2bverified/CreateXMLSignatureRequest.VerifyXML.Enveloped.xml b/spss/handbook/clients/webservice/resources/requests/signatures2bverified/CreateXMLSignatureRequest.VerifyXML.Enveloped.xml
new file mode 100644
index 000000000..7f89028c6
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/signatures2bverified/CreateXMLSignatureRequest.VerifyXML.Enveloped.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CreateXMLSignatureRequest xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
+ <KeyIdentifier>KG_allgemein</KeyIdentifier>
+ <SingleSignatureInfo SecurityLayerConformity="false">
+ <DataObjectInfo Structure="detached">
+ <DataObject Reference=""/>
+ <CreateTransformsInfoProfile>
+ <CreateTransformsInfo>
+ <dsig:Transforms>
+ <dsig:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
+ </dsig:Transforms>
+ <FinalDataMetaInfo>
+ <MimeType>text/xml</MimeType>
+ </FinalDataMetaInfo>
+ </CreateTransformsInfo>
+ </CreateTransformsInfoProfile>
+ </DataObjectInfo>
+ <CreateSignatureInfo>
+ <CreateSignatureEnvironment Reference="http://localhost:8080/referencedData/XMLDocument.xml"/>
+ <CreateSignatureEnvironmentProfile>
+ <CreateSignatureLocation Index="4" xmlns:doc="urn:document">/doc:XMLDocument</CreateSignatureLocation>
+ </CreateSignatureEnvironmentProfile>
+ </CreateSignatureInfo>
+ </SingleSignatureInfo>
+</CreateXMLSignatureRequest>
diff --git a/spss/handbook/clients/webservice/resources/requests/signatures2bverified/CreateXMLSignatureRequest.VerifyXML.SigManifest.response.xml b/spss/handbook/clients/webservice/resources/requests/signatures2bverified/CreateXMLSignatureRequest.VerifyXML.SigManifest.response.xml
new file mode 100644
index 000000000..fb4204a09
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/signatures2bverified/CreateXMLSignatureRequest.VerifyXML.SigManifest.response.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CreateXMLSignatureResponse xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><SignatureEnvironment><doc:XMLDocument xmlns:doc="urn:document" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:document http://localhost:8080/referencedData/XMLDocument.xsd">
+ <doc:Paragraph>Ich bin der erste Absatz in diesem Dokument.</doc:Paragraph>
+ <doc:Paragraph ParaId="Para2">Und ich bin der zweite Absatz in diesem Dokument.
+Ich habe weiters ein eigenens ID-Attribut bekommen.</doc:Paragraph><dsig:Signature Id="signature-1-1" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:SignedInfo><dsig:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><dsig:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"/><dsig:Reference Id="reference-1-1" URI="#Para2"><dsig:Transforms><dsig:Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116"><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:include href="http://localhost:8080/referencedData/XMLDocument.Para.xsl"/>
+</xsl:stylesheet></dsig:Transform><dsig:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/></dsig:Transforms><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>luM3wUmedTvkMHVedQkA/8otXUE=</dsig:DigestValue></dsig:Reference><dsig:Reference Type="http://www.buergerkarte.at/specifications/Security-Layer/20020225#SignatureManifest" URI="#manifest-1-1"><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>1aSV+vFkwG6NZCk5ZUzZV3J4eSo=</dsig:DigestValue></dsig:Reference><dsig:Reference Type="http://uri.etsi.org/01903/v1.1.1#SignedProperties" URI="#xmlns(etsi=http://uri.etsi.org/01903/v1.1.1%23)%20xpointer(id(&apos;etsi-signed-1-1&apos;)/child::etsi:QualifyingProperties/child::etsi:SignedProperties)"><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>Dy1xXsV2LgSFJlGwYiunav1KC7A=</dsig:DigestValue></dsig:Reference></dsig:SignedInfo><dsig:SignatureValue>f1v/vi1S7xiL+7ofWOUqBfoqOy42EnlXYFoTYcaUZaBiAecDvyX9StPRWTUls/j2</dsig:SignatureValue><dsig:KeyInfo><dsig:X509Data><dsig:X509Certificate>MIID+DCCA2WgAwIBAgIBCTAJBgUrDgMCHQUAMH8xCzAJBgNVBAYTAkFUMSwwKgYD
+VQQKEyNTdGFic3RlbGxlIElLVC1TdHJhdGVnaWUgZGVzIEJ1bmRlczEeMBwGA1UE
+CxMVVGVjaG5payB1bmQgU3RhbmRhcmRzMSIwIAYDVQQDExlUZXN0IENBIC0gU2ln
+bmF0dXJkaWVuc3RlMB4XDTA0MDgwNDA4MjM0OFoXDTA3MDgwNDA4MjM0OFowgZgx
+CzAJBgNVBAYTAkFUMS0wKwYDVQQKEyRTdGFic3N0ZWxsZSBJS1QtU3RyYXRlZ2ll
+IGRlcyBCdW5kZXMxHjAcBgNVBAsTFVRlY2huaWsgdW5kIFN0YW5kYXJkczE6MDgG
+A1UEAxMxVGVzdDogU2lnbmF0dXJkaWVuc3QgYWxsZXIgS3VuZGVuOiBFQ0RTQSAo
+UDE5MnYxKTCB8zCBvAYHKoZIzj0CATCBsAIBATAkBgcqhkjOPQEBAhkA////////
+/////////////v//////////MDQEGP////////////////////7//////////AQY
+ZCEFGeWcgOcPp+mrciQwSf643uzBRrmxBDEEGI2oDrAwkPZ8vyDrQ6GIAPT/Cv2C
+/xASBxkrlf/I2nhjEBHtayTN1XP5d6EeeUgRAhkA////////////////md74NhRr
+ybG00igxAgEBAzIABNHWY9lQOE1zgmpcpjTg2WIg6qgEsGhpXELPinJoMPDVheTv
+2BZPG42YJsNfvWgC06OCARwwggEYMA4GA1UdDwEB/wQEAwIGwDAMBgNVHRMBAf8E
+AjAAMB0GA1UdDgQWBBRHH5EXnrWosCmIa+JyEM5seMxFVzBdBgNVHSAEVjBUMFIG
+DCsGAQQBlRIBAgMBATBCMEAGCCsGAQUFBwICMDQaMkRpZXNlcyBaZXJ0aWZpa2F0
+IGlzdCBudXIgZvxyIFRlc3R6d2Vja2UgZ2VlaWduZXQuMEMGA1UdHwQ8MDowOKA2
+oDSGMmh0dHA6Ly9sYWJzLmNpby5ndi5hdC90ZW1wL2NybHMvc2lnbmF0dXJkaWVu
+c3QuY3JsMBQGByooAAoBAQEECQwHQktBLUlLVDAfBgNVHSMEGDAWgBRAl0P5fWaw
+vf59+uxGcYY9wffZPTAJBgUrDgMCHQUAA4GBAIMKUsnajgfBtpHeDdMdQMLA8fdt
+lluezDOM78WYYSFURP04QZk5iHkShzptgZCF5Y/T4an3dC3SnytL67LJvEoKUyja
+iTMLo7650xRTvAjTaMJ+nly/wTRYJKplOLXKWj3WwfObMHXdsDE8NJmpJSRE7Sw7
++tj+UiTiNNSaXirq</dsig:X509Certificate></dsig:X509Data></dsig:KeyInfo><dsig:Object><dsig:Manifest Id="manifest-1-1"><dsig:Reference URI="http://localhost:8080/referencedData/XMLDocument.Para.xsl"><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>B9nRChTbct68n9h5+Cb2mfNkASI=</dsig:DigestValue></dsig:Reference></dsig:Manifest></dsig:Object><dsig:Object Id="etsi-signed-1-1"><etsi:QualifyingProperties Target="#signature-1-1" xmlns:etsi="http://uri.etsi.org/01903/v1.1.1#"><etsi:SignedProperties><etsi:SignedSignatureProperties><etsi:SigningTime>2005-03-29T09:55:29</etsi:SigningTime><etsi:SigningCertificate><etsi:Cert><etsi:CertDigest><etsi:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><etsi:DigestValue>FOWcAqaHew69LEIDiGuiWVnB0mc=</etsi:DigestValue></etsi:CertDigest><etsi:IssuerSerial><dsig:X509IssuerName>CN=Test CA - Signaturdienste,OU=Technik und Standards,O=Stabstelle IKT-Strategie des Bundes,C=AT</dsig:X509IssuerName><dsig:X509SerialNumber>9</dsig:X509SerialNumber></etsi:IssuerSerial></etsi:Cert></etsi:SigningCertificate><etsi:SignaturePolicyIdentifier><etsi:SignaturePolicyImplied/></etsi:SignaturePolicyIdentifier></etsi:SignedSignatureProperties><etsi:SignedDataObjectProperties><etsi:DataObjectFormat ObjectReference="#reference-1-1"><etsi:MimeType>application/xhtml+xml</etsi:MimeType></etsi:DataObjectFormat></etsi:SignedDataObjectProperties></etsi:SignedProperties></etsi:QualifyingProperties></dsig:Object></dsig:Signature>
+</doc:XMLDocument></SignatureEnvironment></CreateXMLSignatureResponse> \ No newline at end of file
diff --git a/spss/handbook/clients/webservice/resources/requests/signatures2bverified/CreateXMLSignatureRequest.VerifyXML.SigManifest.xml b/spss/handbook/clients/webservice/resources/requests/signatures2bverified/CreateXMLSignatureRequest.VerifyXML.SigManifest.xml
new file mode 100644
index 000000000..b19f66b61
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/signatures2bverified/CreateXMLSignatureRequest.VerifyXML.SigManifest.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CreateXMLSignatureRequest xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
+ <KeyIdentifier>KG_allgemein</KeyIdentifier>
+ <SingleSignatureInfo SecurityLayerConformity="true">
+ <DataObjectInfo Structure="detached">
+ <DataObject Reference="#Para2"/>
+ <CreateTransformsInfoProfile>
+ <CreateTransformsInfo>
+ <dsig:Transforms>
+ <dsig:Transform Algorithm="http://www.w3.org/TR/1999/REC-xslt-19991116">
+ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:include href="http://localhost:8080/referencedData/XMLDocument.Para.xsl"/>
+</xsl:stylesheet>
+ </dsig:Transform>
+ <dsig:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
+ </dsig:Transforms>
+ <FinalDataMetaInfo>
+ <MimeType>application/xhtml+xml</MimeType>
+ </FinalDataMetaInfo>
+ </CreateTransformsInfo>
+ </CreateTransformsInfoProfile>
+ </DataObjectInfo>
+ <CreateSignatureInfo>
+ <CreateSignatureEnvironment Reference="http://localhost:8080/referencedData/XMLDocument.withResolvableSchemaHint.xml"/>
+ <CreateSignatureEnvironmentProfile>
+ <CreateSignatureLocation Index="4" xmlns:doc="urn:document">/doc:XMLDocument</CreateSignatureLocation>
+ </CreateSignatureEnvironmentProfile>
+ </CreateSignatureInfo>
+ </SingleSignatureInfo>
+</CreateXMLSignatureRequest>
diff --git a/spss/handbook/clients/webservice/resources/requests/signatures2bverified/CreateXMLSignatureRequest.VerifyXML.XMLDSigManifest.response.xml b/spss/handbook/clients/webservice/resources/requests/signatures2bverified/CreateXMLSignatureRequest.VerifyXML.XMLDSigManifest.response.xml
new file mode 100644
index 000000000..a465e2126
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/signatures2bverified/CreateXMLSignatureRequest.VerifyXML.XMLDSigManifest.response.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CreateXMLSignatureResponse xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><SignatureEnvironment><dsig:Signature Id="signature-1-1" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"><dsig:SignedInfo><dsig:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><dsig:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"/><dsig:Reference Type="http://www.w3.org/2000/09/xmldsig#Manifest" URI="#dsig-manifest-1-1"><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>nUUaW6OtcsNvV/QhqmkU2QXT1Mw=</dsig:DigestValue></dsig:Reference></dsig:SignedInfo><dsig:SignatureValue>pzI1j60BNsnS+zjXYtXlh109HjJGEMrMzTzkUB54rReOpI1ynNkG2RE7AiOlvpPh</dsig:SignatureValue><dsig:KeyInfo><dsig:X509Data><dsig:X509Certificate>MIID+DCCA2WgAwIBAgIBCTAJBgUrDgMCHQUAMH8xCzAJBgNVBAYTAkFUMSwwKgYD
+VQQKEyNTdGFic3RlbGxlIElLVC1TdHJhdGVnaWUgZGVzIEJ1bmRlczEeMBwGA1UE
+CxMVVGVjaG5payB1bmQgU3RhbmRhcmRzMSIwIAYDVQQDExlUZXN0IENBIC0gU2ln
+bmF0dXJkaWVuc3RlMB4XDTA0MDgwNDA4MjM0OFoXDTA3MDgwNDA4MjM0OFowgZgx
+CzAJBgNVBAYTAkFUMS0wKwYDVQQKEyRTdGFic3N0ZWxsZSBJS1QtU3RyYXRlZ2ll
+IGRlcyBCdW5kZXMxHjAcBgNVBAsTFVRlY2huaWsgdW5kIFN0YW5kYXJkczE6MDgG
+A1UEAxMxVGVzdDogU2lnbmF0dXJkaWVuc3QgYWxsZXIgS3VuZGVuOiBFQ0RTQSAo
+UDE5MnYxKTCB8zCBvAYHKoZIzj0CATCBsAIBATAkBgcqhkjOPQEBAhkA////////
+/////////////v//////////MDQEGP////////////////////7//////////AQY
+ZCEFGeWcgOcPp+mrciQwSf643uzBRrmxBDEEGI2oDrAwkPZ8vyDrQ6GIAPT/Cv2C
+/xASBxkrlf/I2nhjEBHtayTN1XP5d6EeeUgRAhkA////////////////md74NhRr
+ybG00igxAgEBAzIABNHWY9lQOE1zgmpcpjTg2WIg6qgEsGhpXELPinJoMPDVheTv
+2BZPG42YJsNfvWgC06OCARwwggEYMA4GA1UdDwEB/wQEAwIGwDAMBgNVHRMBAf8E
+AjAAMB0GA1UdDgQWBBRHH5EXnrWosCmIa+JyEM5seMxFVzBdBgNVHSAEVjBUMFIG
+DCsGAQQBlRIBAgMBATBCMEAGCCsGAQUFBwICMDQaMkRpZXNlcyBaZXJ0aWZpa2F0
+IGlzdCBudXIgZvxyIFRlc3R6d2Vja2UgZ2VlaWduZXQuMEMGA1UdHwQ8MDowOKA2
+oDSGMmh0dHA6Ly9sYWJzLmNpby5ndi5hdC90ZW1wL2NybHMvc2lnbmF0dXJkaWVu
+c3QuY3JsMBQGByooAAoBAQEECQwHQktBLUlLVDAfBgNVHSMEGDAWgBRAl0P5fWaw
+vf59+uxGcYY9wffZPTAJBgUrDgMCHQUAA4GBAIMKUsnajgfBtpHeDdMdQMLA8fdt
+lluezDOM78WYYSFURP04QZk5iHkShzptgZCF5Y/T4an3dC3SnytL67LJvEoKUyja
+iTMLo7650xRTvAjTaMJ+nly/wTRYJKplOLXKWj3WwfObMHXdsDE8NJmpJSRE7Sw7
++tj+UiTiNNSaXirq</dsig:X509Certificate></dsig:X509Data></dsig:KeyInfo><dsig:Object Id="signed-data-1-1-1">Diese Daten sind signiert.</dsig:Object><dsig:Object><dsig:Manifest Id="dsig-manifest-1-1"><dsig:Reference Id="reference-1-1" URI="#xpointer(id(&apos;signed-data-1-1-1&apos;)/node())"><dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><dsig:DigestValue>EYxznGxNRAIcHQeUsj+zsK+uaHA=</dsig:DigestValue></dsig:Reference></dsig:Manifest></dsig:Object></dsig:Signature></SignatureEnvironment></CreateXMLSignatureResponse> \ No newline at end of file
diff --git a/spss/handbook/clients/webservice/resources/requests/signatures2bverified/CreateXMLSignatureRequest.VerifyXML.XMLDSigManifest.xml b/spss/handbook/clients/webservice/resources/requests/signatures2bverified/CreateXMLSignatureRequest.VerifyXML.XMLDSigManifest.xml
new file mode 100644
index 000000000..da7e82025
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/signatures2bverified/CreateXMLSignatureRequest.VerifyXML.XMLDSigManifest.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CreateXMLSignatureRequest xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#">
+ <KeyIdentifier>KG_allgemein</KeyIdentifier>
+ <SingleSignatureInfo SecurityLayerConformity="false">
+ <DataObjectInfo Structure="enveloping" ChildOfManifest="true">
+ <DataObject>
+ <XMLContent>Diese Daten sind signiert.</XMLContent>
+ </DataObject>
+ <CreateTransformsInfoProfile>
+ <CreateTransformsInfo>
+ <FinalDataMetaInfo>
+ <MimeType>text/plain</MimeType>
+ </FinalDataMetaInfo>
+ </CreateTransformsInfo>
+ </CreateTransformsInfoProfile>
+ </DataObjectInfo>
+ </SingleSignatureInfo>
+</CreateXMLSignatureRequest> \ No newline at end of file
diff --git a/spss/handbook/clients/webservice/resources/requests/transformResults/CreateXMLSignatureRequest.Transforms.hashinput.ref2.txt b/spss/handbook/clients/webservice/resources/requests/transformResults/CreateXMLSignatureRequest.Transforms.hashinput.ref2.txt
new file mode 100644
index 000000000..f8527bb6d
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/requests/transformResults/CreateXMLSignatureRequest.Transforms.hashinput.ref2.txt
@@ -0,0 +1,8 @@
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:doc="urn:document">
+<head>
+<title>HTML-Dokument</title>
+</head>
+<body>
+<p>Ich bin der erste Absatz in diesem Dokument.</p>
+</body>
+</html>
diff --git a/spss/handbook/clients/webservice/resources/sslKeys/customer1/moa-ssl-kunde1.der b/spss/handbook/clients/webservice/resources/sslKeys/customer1/moa-ssl-kunde1.der
new file mode 100644
index 000000000..b6091332c
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/sslKeys/customer1/moa-ssl-kunde1.der
Binary files differ
diff --git a/spss/handbook/clients/webservice/resources/sslKeys/customer1/moa-ssl-kunde1[pwd=kunde1].p12 b/spss/handbook/clients/webservice/resources/sslKeys/customer1/moa-ssl-kunde1[pwd=kunde1].p12
new file mode 100644
index 000000000..33f76bf9c
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/sslKeys/customer1/moa-ssl-kunde1[pwd=kunde1].p12
Binary files differ
diff --git a/spss/handbook/clients/webservice/resources/sslKeys/customer1/trustedServers[pwd=servers].keystore b/spss/handbook/clients/webservice/resources/sslKeys/customer1/trustedServers[pwd=servers].keystore
new file mode 100644
index 000000000..9c6c55359
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/sslKeys/customer1/trustedServers[pwd=servers].keystore
Binary files differ
diff --git a/spss/handbook/clients/webservice/resources/sslKeys/customer2/moa-ssl-kunde2.der b/spss/handbook/clients/webservice/resources/sslKeys/customer2/moa-ssl-kunde2.der
new file mode 100644
index 000000000..20bc38e14
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/sslKeys/customer2/moa-ssl-kunde2.der
Binary files differ
diff --git a/spss/handbook/clients/webservice/resources/sslKeys/customer2/moa-ssl-kunde2[pwd=kunde2].p12 b/spss/handbook/clients/webservice/resources/sslKeys/customer2/moa-ssl-kunde2[pwd=kunde2].p12
new file mode 100644
index 000000000..ec7bf8e48
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/sslKeys/customer2/moa-ssl-kunde2[pwd=kunde2].p12
Binary files differ
diff --git a/spss/handbook/clients/webservice/resources/sslKeys/customer2/trustedServers[pwd=servers].keystore b/spss/handbook/clients/webservice/resources/sslKeys/customer2/trustedServers[pwd=servers].keystore
new file mode 100644
index 000000000..d32a22f0f
--- /dev/null
+++ b/spss/handbook/clients/webservice/resources/sslKeys/customer2/trustedServers[pwd=servers].keystore
Binary files differ
diff --git a/spss/handbook/clients/webservice/src/main/java/at/gv/egovernment/moa/spss/handbook/clients/webservice/HTTP.java b/spss/handbook/clients/webservice/src/main/java/at/gv/egovernment/moa/spss/handbook/clients/webservice/HTTP.java
new file mode 100644
index 000000000..37ae7d3e9
--- /dev/null
+++ b/spss/handbook/clients/webservice/src/main/java/at/gv/egovernment/moa/spss/handbook/clients/webservice/HTTP.java
@@ -0,0 +1,219 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.handbook.clients.webservice;
+
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.util.Properties;
+import java.util.Vector;
+
+import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.rpc.Call;
+import javax.xml.rpc.Service;
+import javax.xml.rpc.ServiceFactory;
+
+import org.apache.axis.message.SOAPBodyElement;
+import org.apache.xml.serialize.OutputFormat;
+import org.apache.xml.serialize.XMLSerializer;
+import org.w3c.dom.Document;
+
+/**
+ * Diese Klasse implementiert einen einfachen Client für das MOA SP/SS Webservice mittels Apache Axis. Die
+ * Verbindung erfolgt ungesichert über HTTP.
+ */
+public class HTTP
+{
+ protected Properties props_;
+
+ /**
+ * Methode main.
+ *
+ * Enthält den Beispielcode der nötig ist um von Java aus auf MOA-SPSS zugreifen zu können. Der Zugriff
+ * passiert über das AXIS-Framework. Die Verbindung erfolgt ungesichert über HTTP.
+ *
+ * @param args <ul>
+ * <li>
+ * args[0] enthält entweder die Bezeichnung "sign" oder "verify" zur Kennzeichnung,
+ * ob ein Signaturerstellungsrequest, oder ein Signaturprüfrequest gesendet werden soll.
+ * </li>
+ * <li>
+ * args[1] enthält einen Verweis auf eine Property-Datei, die die nähere Konfiguration
+ * für dieses Beispiel enthält. Der Verweis enthält entweder eine absolute oder eine
+ * relative Pfadangabe, wobei eine relative Angabe als relativ zum Arbeitsverzeichnis der
+ * Java VM interpretiert wird. Folgende Properties müssen in der Property-Datei vorhanden
+ * sein:
+ * <ul>
+ * <li>
+ * <code>signServiceQName</code>: Name des Webservices, fix "SignatureCreation"
+ * </li>
+ * <li>
+ * <code>signServiceEndPoint</code>: Zugangspunkt des Webservices (URL)
+ * </li>
+ * <li>
+ * <code>signRequest</code>: Name des zu sendenden Signaturerstellungsrequests (entweder
+ * absolute oder relative Pfadangabe; eine relative Pfadangabe wird relativ zum
+ * Arbeitsverzeichnis der Java VM interpretiert)
+ * </li>
+ * <li>
+ * <code>verifyServiceQName</code>: Name des Webservices, fix "SignatureVerification"
+ * </li>
+ * <li>
+ * <code>verifyServiceEndPoint</code>: Zugangspunkt des Webservices (URL)
+ * </li>
+ * <li>
+ * <code>verifyRequest</code>: Name des zu sendenden Signaturprüfrequests (entweder
+ * absolute oder relative Pfadangabe; eine relative Pfadangabe wird relativ zum
+ * Arbeitsverzeichnis der Java VM interpretiert)
+ * </li>
+ * </ul>
+ * </li>
+ * </ul>
+ */
+ public static void main(String[] args)
+ {
+ try
+ {
+ // Prüfen, ob Beispiel korrekt verwendet wird
+ checkArgs(args, "HTTP");
+
+ // Initialisieren des Clients
+ HTTP httpClient = new HTTP(args);
+
+ // Ausführen der Serviceabfrage
+ httpClient.execute(args[0]);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Prüft, ob das Beispiel korrekt verwendet wird.
+ *
+ * @param args Die Aufrufparameter für das Beispiel. Siehe {@link HTTP#main(String[])}.
+ *
+ * @param exampleName Der Name dieses Beispiels, der im Hilfetext gedruckt wird.
+ */
+ protected static void checkArgs(String[] args, String exampleName)
+ {
+ if (args == null || args.length != 2 || (!"sign".equals(args[0]) && !"verify".equals(args[0])))
+ {
+ System.out.println("Verwendung: " + exampleName + " \"sign\"|\"verify\" Properties-Datei");
+ }
+ }
+
+ /**
+ * Erzeugt den MOA Client. Es erfolgt die Auswertung der übergebenen Aufrufparameter.
+ *
+ * @param args Die Aufrufparameter für das Beispiel. Siehe {@link HTTP#main(String[])}.
+ *
+ * @throws Exception wenn der MOA Client mit den übergebenen Aufrufparametern nicht korrekt erzeugt
+ * werden konnte.
+ */
+ protected HTTP(String[] args) throws Exception
+ {
+ props_ = new Properties();
+ props_.load(new FileInputStream(args[1]));
+ }
+
+ /**
+ * Führt die Abfrage beim MOA-Service aus.
+ *
+ * @param mode Steuert, ob eine Signatur erstellt ("sign") oder geprüft ("verify") werden soll.
+ *
+ * @throws Exception wenn dabei etwas schiegeht.
+ */
+ protected void execute(String mode) throws Exception
+ {
+ // Datei mit Request einlesen
+ FileInputStream inputStream = new FileInputStream(getProperty(mode + "Request"));
+
+ // Parser/DOMBuilder instanzieren
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ factory.setNamespaceAware(true);
+ DocumentBuilder builder = factory.newDocumentBuilder();
+
+ // XML Datei in einen DOM-Baum umwandeln
+ Document xmlRequest = builder.parse(inputStream);
+
+ // AXIS-Server instanzieren
+ Service service = ServiceFactory.newInstance().createService(new QName(getProperty(mode + "ServiceQName")));
+
+ // Call öffnen
+ Call call = service.createCall();
+
+ // Neues BodyElement anlegen und mit dem DOM-Baum füllen
+ SOAPBodyElement body = new SOAPBodyElement(xmlRequest.getDocumentElement());
+ SOAPBodyElement[] params = new SOAPBodyElement[]
+ {
+ body
+ };
+
+ // Call mit Endpoint verknüpfen
+ call.setTargetEndpointAddress(getProperty(mode + "ServiceEndPoint"));
+
+ // Call auslösen und die Antworten speichern
+ System.out.println("Calling ...");
+ Vector responses = (Vector) call.invoke(params);
+
+ // Erstes Body Element auslesen
+ SOAPBodyElement response = (SOAPBodyElement) responses.get(0);
+
+ // Aus der Response den DOM-Baum lesen
+ Document root_response = response.getAsDocument();
+ System.out.println("Return ...");
+
+ // XML-Formatierung konfiguieren
+ OutputFormat format = new OutputFormat((Document) root_response);
+ format.setLineSeparator("\n");
+ format.setIndenting(false);
+ format.setPreserveSpace(true);
+ format.setOmitXMLDeclaration(false);
+ format.setEncoding("UTF-8");
+
+ // Ausgabe der Webservice-Antwort auf die Konsole
+ XMLSerializer conSerializer = new XMLSerializer(System.out, format);
+ conSerializer.serialize(root_response);
+
+ // Ausgabe der Webservice-Antwort in Datei
+ String responseFile = getProperty(mode + "Request").substring(0, getProperty(mode + "Request").lastIndexOf('.'))
+ + ".response.xml";
+ XMLSerializer fileSerializer = new XMLSerializer(new FileOutputStream(responseFile), format);
+ fileSerializer.serialize(root_response);
+ }
+
+ /**
+ * Prüft ob die Property mit dem angegebenen Namen in den Konfigurations-Properties enthalten ist.
+ *
+ * @param propName Name der zu untersuchenden Property.
+ *
+ * @return den Wert der gesuchten Property.
+ *
+ * @throws Exception wenn die gesuchte Property nicht vorhanden ist.
+ */
+ protected String getProperty(String propName) throws Exception
+ {
+ String propValue = props_.getProperty(propName);
+ if ((propValue == null) || "".equals(propValue.trim()))
+ {
+ throw new Exception("Property named \"" + propName + "\" does not exist.");
+ }
+ return propValue;
+ }
+} \ No newline at end of file
diff --git a/spss/handbook/clients/webservice/src/main/java/at/gv/egovernment/moa/spss/handbook/clients/webservice/HTTPSClientAuth.java b/spss/handbook/clients/webservice/src/main/java/at/gv/egovernment/moa/spss/handbook/clients/webservice/HTTPSClientAuth.java
new file mode 100644
index 000000000..b720f816a
--- /dev/null
+++ b/spss/handbook/clients/webservice/src/main/java/at/gv/egovernment/moa/spss/handbook/clients/webservice/HTTPSClientAuth.java
@@ -0,0 +1,137 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.handbook.clients.webservice;
+
+
+/**
+ * Diese Klasse implementiert einen einfachen Client für das MOA SP/SS Webservice mittels Apache Axis. Die
+ * Verbindung erfolgt gesichert über SSL, und zwar sowohl mit Server- und Clientauthentisierung.
+ */
+public class HTTPSClientAuth extends HTTPSServerAuth
+{
+ // JSSE Konstanten
+ public static final String KEYSTORE = "javax.net.ssl.keyStore";
+ public static final String KEYSTOREPASSWORD = "javax.net.ssl.keyStorePassword";
+ public static final String KEYSTORETYPE = "javax.net.ssl.keyStoreType";
+
+ /**
+ * Methode main.
+ *
+ * Enthält den Beispielcode der nötig ist um von Java aus auf MOA-SPSS zugreifen zu können. Der Zugriff
+ * passiert über das AXIS-Framework. Die Verbindung erfolgt gesichert über SSL, und zwar sowohl mit
+ * Server- und Clientauthentisierung.
+ *
+ * @param args <ul>
+ * <li>
+ * args[0] enthält entweder die Bezeichnung "sign" oder "verify" zur Kennzeichnung,
+ * ob ein Signaturerstellungsrequest, oder ein Signaturprüfrequest gesendet werden soll.
+ * </li>
+ * <li>
+ * args[1] enthält einen Verweis auf eine Property-Datei, die die nähere Konfiguration
+ * für dieses Beispiel enthält. Der Verweis enthält entweder eine absolute oder eine
+ * relative Pfadangabe, wobei eine relative Angabe als relativ zum Arbeitsverzeichnis der
+ * Java VM interpretiert wird. Folgende Properties müssen in der Properties-Datei vorhanden
+ * sein:
+ * <ul>
+ * <li>
+ * <code>signServiceQName</code>: Name des Webservices, fix "SignatureCreation"
+ * </li>
+ * <li>
+ * <code>signServiceEndPoint</code>: Zugangspunkt des Webservices (URL)
+ * </li>
+ * <li>
+ * <code>signRequest</code>: Name des zu sendenden Signaturerstellungsrequests (entweder
+ * absolute oder relative Pfadangabe; eine relative Pfadangabe wird relativ zum
+ * Arbeitsverzeichnis der Java VM interpretiert)
+ * </li>
+ * <li>
+ * <code>verifyServiceQName</code>: Name des Webservices, fix "SignatureVerification"
+ * </li>
+ * <li>
+ * <code>verifyServiceEndPoint</code>: Zugangspunkt des Webservices (URL)
+ * </li>
+ * <li>
+ * <code>verifyRequest</code>: Name des zu sendenden Signaturprüfrequests (entweder
+ * absolute oder relative Pfadangabe; eine relative Pfadangabe wird relativ zum
+ * Arbeitsverzeichnis der Java VM interpretiert)
+ * </li>
+ * <li>
+ * <code>ssl.truststore.type</code>: Typ des JSSE-Truststores (entweder "JKS" für einen
+ * Java Key Store oder "PKCS12" für eine PKCS#12-Datei).
+ * </li>
+ * <li><code>ssl.truststore.type</code>: Relativer oder absoluter Pfad zum JSSE-Truststore.
+ * Ein relativer Pfad wird relativ zum Arbeitsverzeichnis der Java VM interpretiert).
+ * </li>
+ * <li><code>ssl.truststore.pwd</code>: Passwort für den JSSE-Truststore.
+ * </li>
+ * <li>
+ * <code>ssl.keystore.type</code>: Typ des JSSE-Keystores (entweder "JKS" für einen
+ * Java Key Store oder "PKCS12" für eine PKCS#12-Datei).
+ * </li>
+ * <li><code>ssl.keystore.type</code>: Relativer oder absoluter Pfad zum JSSE-Keystore.
+ * Ein relativer Pfad wird relativ zum Arbeitsverzeichnis der Java VM interpretiert).
+ * </li>
+ * <li><code>ssl.keystore.pwd</code>: Passwort für den JSSE-Keystore.
+ * </li>
+ * </ul>
+ * </li>
+ * </ul>
+ */
+ public static void main(String[] args)
+ {
+ try
+ {
+ // Prüfen, ob Beispiel korrekt verwendet wird
+ checkArgs(args, "HTTP");
+
+ // Initialisieren des Clients
+ HTTPSClientAuth httpClient = new HTTPSClientAuth(args);
+
+ // Ausführen der Serviceabfrage
+ httpClient.execute(args[0]);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Erzeugt den MOA Client. Es erfolgt die Auswertung der übergebenen Aufrufparameter.
+ *
+ * @param args Die Aufrufparameter für das Beispiel. Siehe {@link HTTPSClientAuth#main(String[])}.
+ *
+ * @throws Exception wenn der MOA Client mit den übergebenen Aufrufparametern nicht korrekt erzeugt
+ * werden konnte.
+ */
+ protected HTTPSClientAuth(String[] args) throws Exception
+ {
+ super(args);
+ }
+
+ /**
+ * Konfiguriert JSSE für eine SSL-Verbindung mit Client- und Serverauthentisierung.
+ */
+ protected void configureSSL() throws Exception
+ {
+ super.configureSSL();
+
+ // Konfiguriere Key-Store (enthält privaten Schlüssel und Zertifikat des Clients)
+ System.setProperty(KEYSTORETYPE, getProperty("ssl.keystore.type"));
+ System.setProperty(KEYSTORE, getProperty("ssl.keystore.loc"));
+ System.setProperty(KEYSTOREPASSWORD, getProperty("ssl.keystore.pwd"));
+ }
+} \ No newline at end of file
diff --git a/spss/handbook/clients/webservice/src/main/java/at/gv/egovernment/moa/spss/handbook/clients/webservice/HTTPSServerAuth.java b/spss/handbook/clients/webservice/src/main/java/at/gv/egovernment/moa/spss/handbook/clients/webservice/HTTPSServerAuth.java
new file mode 100644
index 000000000..4ed04efc5
--- /dev/null
+++ b/spss/handbook/clients/webservice/src/main/java/at/gv/egovernment/moa/spss/handbook/clients/webservice/HTTPSServerAuth.java
@@ -0,0 +1,140 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.handbook.clients.webservice;
+
+import java.security.Security;
+
+import com.sun.net.ssl.internal.ssl.Provider;
+
+/**
+ * Diese Klasse implementiert einen einfachen Client für das MOA SP/SS Webservice mittels Apache Axis. Die
+ * Verbindung erfolgt gesichert über SSL, und zwar nur mit Serverauthentisierung.
+ */
+public class HTTPSServerAuth extends HTTP
+{
+ // JSSE Konstanten
+ public static final String HANDLER = "java.protocol.handler.pkgs";
+ public static final String TRUSTSTORE = "javax.net.ssl.trustStore";
+ public static final String TRUSTSTOREPASSWORD = "javax.net.ssl.trustStorePassword";
+ public static final String TRUSTSTORETYPE = "javax.net.ssl.trustStoreType";
+
+ /**
+ * Methode main.
+ *
+ * Enthält den Beispielcode der nötig ist um von Java aus auf MOA-SPSS zugreifen zu können. Der Zugriff
+ * passiert über das AXIS-Framework. Die Verbindung erfolgt gesichert über SSL, und zwar nur mit
+ * Serverauthentisierung.
+ *
+ * @param args <ul>
+ * <li>
+ * args[0] enthält entweder die Bezeichnung "sign" oder "verify" zur Kennzeichnung,
+ * ob ein Signaturerstellungsrequest, oder ein Signaturprüfrequest gesendet werden soll.
+ * </li>
+ * <li>
+ * args[1] enthält einen Verweis auf eine Property-Datei, die die nähere Konfiguration
+ * für dieses Beispiel enthält. Der Verweis enthält entweder eine absolute oder eine
+ * relative Pfadangabe, wobei eine relative Angabe als relativ zum Arbeitsverzeichnis der
+ * Java VM interpretiert wird. Folgende Properties müssen in der Properties-Datei vorhanden
+ * sein:
+ * <ul>
+ * <li>
+ * <code>signServiceQName</code>: Name des Webservices, fix "SignatureCreation"
+ * </li>
+ * <li>
+ * <code>signServiceEndPoint</code>: Zugangspunkt des Webservices (URL)
+ * </li>
+ * <li>
+ * <code>signRequest</code>: Name des zu sendenden Signaturerstellungsrequests (entweder
+ * absolute oder relative Pfadangabe; eine relative Pfadangabe wird relativ zum
+ * Arbeitsverzeichnis der Java VM interpretiert)
+ * </li>
+ * <li>
+ * <code>verifyServiceQName</code>: Name des Webservices, fix "SignatureVerification"
+ * </li>
+ * <li>
+ * <code>verifyServiceEndPoint</code>: Zugangspunkt des Webservices (URL)
+ * </li>
+ * <li>
+ * <code>verifyRequest</code>: Name des zu sendenden Signaturprüfrequests (entweder
+ * absolute oder relative Pfadangabe; eine relative Pfadangabe wird relativ zum
+ * Arbeitsverzeichnis der Java VM interpretiert)
+ * </li>
+ * <li>
+ * <code>ssl.truststore.type</code>: Typ des JSSE-Truststores (entweder "JKS" für einen
+ * Java Key Store oder "PKCS12" für eine PKCS#12-Datei).
+ * </li>
+ * <li><code>ssl.truststore.type</code>: Relativer oder absoluter Pfad zum JSSE-Truststore.
+ * Ein relativer Pfad wird relativ zum Arbeitsverzeichnis der Java VM interpretiert).
+ * </li>
+ * <li><code>ssl.truststore.pwd</code>: Passwort für den JSSE-Truststore.
+ * </li>
+ * </ul>
+ * </li>
+ * </ul>
+ */
+ public static void main(String[] args)
+ {
+ try
+ {
+ // Prüfen, ob Beispiel korrekt verwendet wird
+ checkArgs(args, "HTTP");
+
+ // Initialisieren des Clients
+ HTTPSServerAuth httpClient = new HTTPSServerAuth(args);
+
+ // Ausführen der Serviceabfrage
+ httpClient.execute(args[0]);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Erzeugt den MOA Client. Es erfolgt die Auswertung der übergebenen Aufrufparameter.
+ *
+ * @param args Die Aufrufparameter für das Beispiel. Siehe {@link HTTPSServerAuth#main(String[])}.
+ *
+ * @throws Exception wenn der MOA Client mit den übergebenen Aufrufparametern nicht korrekt erzeugt
+ * werden konnte.
+ */
+ protected HTTPSServerAuth(String[] args) throws Exception
+ {
+ super(args);
+ configureSSL();
+ }
+
+ /**
+ * Konfiguriert JSSE für eine SSL-Verbindung mit Serverauthentisierung.
+ *
+ * @throws Exception wenn die Konfiguration von JSSE fehlschlägt.
+ */
+ protected void configureSSL() throws Exception
+ {
+ // Aktivieren Sie die nächste Zeile für detailliertes Logging des SSL-Verbindungsaufbaus
+ // System.setProperty("javax.net.debug", "all");
+
+ // Setzen des korrekten Protokoll-Handlers für https
+ Security.addProvider(new Provider());
+ System.setProperty(HANDLER, "com.sun.net.ssl.internal.www.protocol");
+
+ // Konfiguriere Trust-Store (enthält SSL-Zertifikat des MOA Services, dem vertraut wird)
+ System.setProperty(TRUSTSTORETYPE, getProperty("ssl.truststore.type"));
+ System.setProperty(TRUSTSTORE, getProperty("ssl.truststore.loc"));
+ System.setProperty(TRUSTSTOREPASSWORD, getProperty("ssl.truststore.pwd"));
+ }
+} \ No newline at end of file
diff --git a/spss/handbook/conf/moa-spss/certstore/01540E2704537AA810D671E1C4106FD8821EB52A/C2556DADDF68A9EEF7F5C14A24CA33BCA930B201 b/spss/handbook/conf/moa-spss/certstore/01540E2704537AA810D671E1C4106FD8821EB52A/C2556DADDF68A9EEF7F5C14A24CA33BCA930B201
new file mode 100644
index 000000000..592c96230
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/01540E2704537AA810D671E1C4106FD8821EB52A/C2556DADDF68A9EEF7F5C14A24CA33BCA930B201
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/032F2123890A879585CE96674CA4C37B55986729/E1201A308CC10323C27D9084B048996E44B8F710 b/spss/handbook/conf/moa-spss/certstore/032F2123890A879585CE96674CA4C37B55986729/E1201A308CC10323C27D9084B048996E44B8F710
new file mode 100644
index 000000000..a7948e488
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/032F2123890A879585CE96674CA4C37B55986729/E1201A308CC10323C27D9084B048996E44B8F710
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/04462EF01783744F9F4CDE3705FD86D488697C9F/D44EED7580C7792242D73E267A89C7DB25E4BD08 b/spss/handbook/conf/moa-spss/certstore/04462EF01783744F9F4CDE3705FD86D488697C9F/D44EED7580C7792242D73E267A89C7DB25E4BD08
new file mode 100644
index 000000000..73434134e
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/04462EF01783744F9F4CDE3705FD86D488697C9F/D44EED7580C7792242D73E267A89C7DB25E4BD08
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/083E1A0528C48475951A6610360D813E2713DCC7/7E691392F741B7E4B4AA9A76D75851BDE18BE5A7 b/spss/handbook/conf/moa-spss/certstore/083E1A0528C48475951A6610360D813E2713DCC7/7E691392F741B7E4B4AA9A76D75851BDE18BE5A7
new file mode 100644
index 000000000..8c434777e
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/083E1A0528C48475951A6610360D813E2713DCC7/7E691392F741B7E4B4AA9A76D75851BDE18BE5A7
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/0889EBEC55D9E34E782E6D3C250840EB932EEA2F/9CD9ADF04626E7E8C9A1C8DACE3B0B8A2979C726 b/spss/handbook/conf/moa-spss/certstore/0889EBEC55D9E34E782E6D3C250840EB932EEA2F/9CD9ADF04626E7E8C9A1C8DACE3B0B8A2979C726
new file mode 100644
index 000000000..3af27c013
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/0889EBEC55D9E34E782E6D3C250840EB932EEA2F/9CD9ADF04626E7E8C9A1C8DACE3B0B8A2979C726
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/0A5C2C9276B649D088A86BD9FD97E2B95658481D/08CAE18D8CFF86144CB8FFD671B916CAAB8BD4E9 b/spss/handbook/conf/moa-spss/certstore/0A5C2C9276B649D088A86BD9FD97E2B95658481D/08CAE18D8CFF86144CB8FFD671B916CAAB8BD4E9
new file mode 100644
index 000000000..cac44093a
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/0A5C2C9276B649D088A86BD9FD97E2B95658481D/08CAE18D8CFF86144CB8FFD671B916CAAB8BD4E9
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/0AF04E7099C9829BD1F8437362BA0036E0705C4D/0F843FB1E0C626540BE638B79A2987E2611CE630 b/spss/handbook/conf/moa-spss/certstore/0AF04E7099C9829BD1F8437362BA0036E0705C4D/0F843FB1E0C626540BE638B79A2987E2611CE630
new file mode 100644
index 000000000..29d93550e
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/0AF04E7099C9829BD1F8437362BA0036E0705C4D/0F843FB1E0C626540BE638B79A2987E2611CE630
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/0AF04E7099C9829BD1F8437362BA0036E0705C4D/69F21C82DC9A7A940ACEC414593E59C9E61E522F b/spss/handbook/conf/moa-spss/certstore/0AF04E7099C9829BD1F8437362BA0036E0705C4D/69F21C82DC9A7A940ACEC414593E59C9E61E522F
new file mode 100644
index 000000000..2a88295a7
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/0AF04E7099C9829BD1F8437362BA0036E0705C4D/69F21C82DC9A7A940ACEC414593E59C9E61E522F
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/0AF04E7099C9829BD1F8437362BA0036E0705C4D/FC72939DC06EDDF8C51549ECF00AC92BF2B39F35 b/spss/handbook/conf/moa-spss/certstore/0AF04E7099C9829BD1F8437362BA0036E0705C4D/FC72939DC06EDDF8C51549ECF00AC92BF2B39F35
new file mode 100644
index 000000000..84a1690d2
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/0AF04E7099C9829BD1F8437362BA0036E0705C4D/FC72939DC06EDDF8C51549ECF00AC92BF2B39F35
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/0FE419AB943E7E5C6A7190CC6BBE8E3F914C658A/FB356CEF4406D1F135E3FC59026B338D3F518F9A b/spss/handbook/conf/moa-spss/certstore/0FE419AB943E7E5C6A7190CC6BBE8E3F914C658A/FB356CEF4406D1F135E3FC59026B338D3F518F9A
new file mode 100644
index 000000000..04c6ea363
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/0FE419AB943E7E5C6A7190CC6BBE8E3F914C658A/FB356CEF4406D1F135E3FC59026B338D3F518F9A
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/10D143E18C03A4A29F783D26F2F67E3B64C35CB0/BE9D654B0DE0F3CC53CA36703DD9D9049A5F9330 b/spss/handbook/conf/moa-spss/certstore/10D143E18C03A4A29F783D26F2F67E3B64C35CB0/BE9D654B0DE0F3CC53CA36703DD9D9049A5F9330
new file mode 100644
index 000000000..32893db7f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/10D143E18C03A4A29F783D26F2F67E3B64C35CB0/BE9D654B0DE0F3CC53CA36703DD9D9049A5F9330
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/10F17BDACD8DEAA1E8F23FBEAE7B3EC3D9773D1D/E7340D1FB627D8917A9C0D23F21515C441BF1214 b/spss/handbook/conf/moa-spss/certstore/10F17BDACD8DEAA1E8F23FBEAE7B3EC3D9773D1D/E7340D1FB627D8917A9C0D23F21515C441BF1214
new file mode 100644
index 000000000..fd23a38d6
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/10F17BDACD8DEAA1E8F23FBEAE7B3EC3D9773D1D/E7340D1FB627D8917A9C0D23F21515C441BF1214
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/125E4AC6B38C1E0BF34BF7D927CBB947E35141E8/2CA36B76BC6CCDC29296111A4EFCAFC0553BBC7D b/spss/handbook/conf/moa-spss/certstore/125E4AC6B38C1E0BF34BF7D927CBB947E35141E8/2CA36B76BC6CCDC29296111A4EFCAFC0553BBC7D
new file mode 100644
index 000000000..1a3106742
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/125E4AC6B38C1E0BF34BF7D927CBB947E35141E8/2CA36B76BC6CCDC29296111A4EFCAFC0553BBC7D
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/15A052B0DC4E0333656264E2FEEBE45B1BE449BF/386C1663C6390BC288DC171522439210AF361958 b/spss/handbook/conf/moa-spss/certstore/15A052B0DC4E0333656264E2FEEBE45B1BE449BF/386C1663C6390BC288DC171522439210AF361958
new file mode 100644
index 000000000..a5e651f86
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/15A052B0DC4E0333656264E2FEEBE45B1BE449BF/386C1663C6390BC288DC171522439210AF361958
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/1607988A938D3D339F40AFB567384BC5B7540935/9FDCFE5A082FD69BF5D9E73C25FBE9EA1AC0ACF2 b/spss/handbook/conf/moa-spss/certstore/1607988A938D3D339F40AFB567384BC5B7540935/9FDCFE5A082FD69BF5D9E73C25FBE9EA1AC0ACF2
new file mode 100644
index 000000000..28cb48bb0
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/1607988A938D3D339F40AFB567384BC5B7540935/9FDCFE5A082FD69BF5D9E73C25FBE9EA1AC0ACF2
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/1A283D1183DB82A548427B4F19E99E7A8EA728D7/49969819654C230ECDF779ABB9629A211FCC43D6 b/spss/handbook/conf/moa-spss/certstore/1A283D1183DB82A548427B4F19E99E7A8EA728D7/49969819654C230ECDF779ABB9629A211FCC43D6
new file mode 100644
index 000000000..bdfcb7ab1
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/1A283D1183DB82A548427B4F19E99E7A8EA728D7/49969819654C230ECDF779ABB9629A211FCC43D6
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/1BF3C1D2767F5C333AD5531531FEE3A712935B73/D0AF386E182F00983637F97C0A5F4708F9F641A7 b/spss/handbook/conf/moa-spss/certstore/1BF3C1D2767F5C333AD5531531FEE3A712935B73/D0AF386E182F00983637F97C0A5F4708F9F641A7
new file mode 100644
index 000000000..eaac3518b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/1BF3C1D2767F5C333AD5531531FEE3A712935B73/D0AF386E182F00983637F97C0A5F4708F9F641A7
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/20DD04B052D2D364E5FF851A3FD314F0FD91253E/6814C7316CEA7191C9CB3BE58199B4A957210D9C b/spss/handbook/conf/moa-spss/certstore/20DD04B052D2D364E5FF851A3FD314F0FD91253E/6814C7316CEA7191C9CB3BE58199B4A957210D9C
new file mode 100644
index 000000000..4dd2c49bf
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/20DD04B052D2D364E5FF851A3FD314F0FD91253E/6814C7316CEA7191C9CB3BE58199B4A957210D9C
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/22973CFC20EA68162A0B2E837D45FB8266ACDBCF/C529469053D9F95810A8F7F2DB9A6596A7655732 b/spss/handbook/conf/moa-spss/certstore/22973CFC20EA68162A0B2E837D45FB8266ACDBCF/C529469053D9F95810A8F7F2DB9A6596A7655732
new file mode 100644
index 000000000..13abede5c
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/22973CFC20EA68162A0B2E837D45FB8266ACDBCF/C529469053D9F95810A8F7F2DB9A6596A7655732
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/238ACC1D03DA5A2E7E580D760FB3EE218FDC5A97/D3C063F219ED073E34AD5D750B327629FFD59AF2 b/spss/handbook/conf/moa-spss/certstore/238ACC1D03DA5A2E7E580D760FB3EE218FDC5A97/D3C063F219ED073E34AD5D750B327629FFD59AF2
new file mode 100644
index 000000000..33e776369
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/238ACC1D03DA5A2E7E580D760FB3EE218FDC5A97/D3C063F219ED073E34AD5D750B327629FFD59AF2
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/1C43C0BA36CC8DE659180B2FAC9A6F54430D5941 b/spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/1C43C0BA36CC8DE659180B2FAC9A6F54430D5941
new file mode 100644
index 000000000..d2e7db667
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/1C43C0BA36CC8DE659180B2FAC9A6F54430D5941
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/AC36A78C66FEC87CC0FD2C32B49214C65676E0C5 b/spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/AC36A78C66FEC87CC0FD2C32B49214C65676E0C5
new file mode 100644
index 000000000..f2f1c6562
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/AC36A78C66FEC87CC0FD2C32B49214C65676E0C5
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/C92238A7178A6C61F8BACA22D6CF7E50772BA9F0 b/spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/C92238A7178A6C61F8BACA22D6CF7E50772BA9F0
new file mode 100644
index 000000000..476a3efb2
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/C92238A7178A6C61F8BACA22D6CF7E50772BA9F0
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/DFAE695342AC81A521025904406884399822B233 b/spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/DFAE695342AC81A521025904406884399822B233
new file mode 100644
index 000000000..5c88b668a
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/DFAE695342AC81A521025904406884399822B233
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/2962CDAADFA0BF8EE53B80870C53E551A43EA72A/12B06E039F1A36D8238AFC508009E1ADF88BF66F b/spss/handbook/conf/moa-spss/certstore/2962CDAADFA0BF8EE53B80870C53E551A43EA72A/12B06E039F1A36D8238AFC508009E1ADF88BF66F
new file mode 100644
index 000000000..4d1852203
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/2962CDAADFA0BF8EE53B80870C53E551A43EA72A/12B06E039F1A36D8238AFC508009E1ADF88BF66F
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/2C976220B378E08DF5E68CBC54C05CE41224FD29/0CC37CC35E18F9909E43E4E9894D0CDF06EE9A38 b/spss/handbook/conf/moa-spss/certstore/2C976220B378E08DF5E68CBC54C05CE41224FD29/0CC37CC35E18F9909E43E4E9894D0CDF06EE9A38
new file mode 100644
index 000000000..69a8e4872
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/2C976220B378E08DF5E68CBC54C05CE41224FD29/0CC37CC35E18F9909E43E4E9894D0CDF06EE9A38
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/2F5DA022AAFF668F34C35A80049D690F3CFE3040/D62327E6B19B7968A8BE6588DEAB0BC0DB684D8D b/spss/handbook/conf/moa-spss/certstore/2F5DA022AAFF668F34C35A80049D690F3CFE3040/D62327E6B19B7968A8BE6588DEAB0BC0DB684D8D
new file mode 100644
index 000000000..807fa786c
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/2F5DA022AAFF668F34C35A80049D690F3CFE3040/D62327E6B19B7968A8BE6588DEAB0BC0DB684D8D
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/31B5BA02D476873C5220CDCFA0C095C4A31DEFDF/88D6151358A5E3C81D7AE1A536121DC03011BC03 b/spss/handbook/conf/moa-spss/certstore/31B5BA02D476873C5220CDCFA0C095C4A31DEFDF/88D6151358A5E3C81D7AE1A536121DC03011BC03
new file mode 100644
index 000000000..376d0753f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/31B5BA02D476873C5220CDCFA0C095C4A31DEFDF/88D6151358A5E3C81D7AE1A536121DC03011BC03
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/328AA897B7E6270202B2FC0889FF88D66BB41122/35A40EF932B1F23980E2C672FC939E91EEBD0317 b/spss/handbook/conf/moa-spss/certstore/328AA897B7E6270202B2FC0889FF88D66BB41122/35A40EF932B1F23980E2C672FC939E91EEBD0317
new file mode 100644
index 000000000..73553b996
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/328AA897B7E6270202B2FC0889FF88D66BB41122/35A40EF932B1F23980E2C672FC939E91EEBD0317
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/3314CE3E42175EACC28D57C35F192430BBADAC1A/B1D0BC027906A3B7E7518C93ACB26D978233ED27 b/spss/handbook/conf/moa-spss/certstore/3314CE3E42175EACC28D57C35F192430BBADAC1A/B1D0BC027906A3B7E7518C93ACB26D978233ED27
new file mode 100644
index 000000000..5171276f4
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/3314CE3E42175EACC28D57C35F192430BBADAC1A/B1D0BC027906A3B7E7518C93ACB26D978233ED27
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/337F895A0435AA7E2629C5282B5A0DBBE19EE1C7/75F792DE2CF544007F470F1B924961C2BD2EF517 b/spss/handbook/conf/moa-spss/certstore/337F895A0435AA7E2629C5282B5A0DBBE19EE1C7/75F792DE2CF544007F470F1B924961C2BD2EF517
new file mode 100644
index 000000000..f8a8957ac
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/337F895A0435AA7E2629C5282B5A0DBBE19EE1C7/75F792DE2CF544007F470F1B924961C2BD2EF517
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/3868959083AA986194E58E73798BCD724D785A0E/66AB66128A44574873E54E6584E450C4EB3B9A1E b/spss/handbook/conf/moa-spss/certstore/3868959083AA986194E58E73798BCD724D785A0E/66AB66128A44574873E54E6584E450C4EB3B9A1E
new file mode 100644
index 000000000..ed5ba194c
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/3868959083AA986194E58E73798BCD724D785A0E/66AB66128A44574873E54E6584E450C4EB3B9A1E
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/3A095C38EB5D5824FE61BE43F9CDF6515DC94805/65698A39E03FF00FD552D4AD99FB290C2B9D4BEA b/spss/handbook/conf/moa-spss/certstore/3A095C38EB5D5824FE61BE43F9CDF6515DC94805/65698A39E03FF00FD552D4AD99FB290C2B9D4BEA
new file mode 100644
index 000000000..836ba3767
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/3A095C38EB5D5824FE61BE43F9CDF6515DC94805/65698A39E03FF00FD552D4AD99FB290C2B9D4BEA
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/0F5A0342F5CD448799C3C6D178607E3F2B5BCB8F b/spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/0F5A0342F5CD448799C3C6D178607E3F2B5BCB8F
new file mode 100644
index 000000000..69de75609
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/0F5A0342F5CD448799C3C6D178607E3F2B5BCB8F
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/51A44C28F313E3F9CB5E7C0A1E0E0DD2843758AE b/spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/51A44C28F313E3F9CB5E7C0A1E0E0DD2843758AE
new file mode 100644
index 000000000..efa28178e
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/51A44C28F313E3F9CB5E7C0A1E0E0DD2843758AE
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/9E0512DD61DA5949D1D8631C3F19D75F496C3733 b/spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/9E0512DD61DA5949D1D8631C3F19D75F496C3733
new file mode 100644
index 000000000..289fc2198
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/9E0512DD61DA5949D1D8631C3F19D75F496C3733
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/E6E6FC88719177C9B7421825757C5E47BCAC85F6 b/spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/E6E6FC88719177C9B7421825757C5E47BCAC85F6
new file mode 100644
index 000000000..b7d4b08a6
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/E6E6FC88719177C9B7421825757C5E47BCAC85F6
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/3B76D7A5CE7EC6022D7990CFEA534C908717DF54/C0C699EFE6E837CB5E4CFC3A61077617A22C1A9E b/spss/handbook/conf/moa-spss/certstore/3B76D7A5CE7EC6022D7990CFEA534C908717DF54/C0C699EFE6E837CB5E4CFC3A61077617A22C1A9E
new file mode 100644
index 000000000..b2beddaa5
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/3B76D7A5CE7EC6022D7990CFEA534C908717DF54/C0C699EFE6E837CB5E4CFC3A61077617A22C1A9E
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/3C627C9D89A5BFB5E4E385982DF33B7E7F6E8D2D/C5AC86EC5B771BEBDF8B6E040F109A1186E229B9 b/spss/handbook/conf/moa-spss/certstore/3C627C9D89A5BFB5E4E385982DF33B7E7F6E8D2D/C5AC86EC5B771BEBDF8B6E040F109A1186E229B9
new file mode 100644
index 000000000..54893c9d6
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/3C627C9D89A5BFB5E4E385982DF33B7E7F6E8D2D/C5AC86EC5B771BEBDF8B6E040F109A1186E229B9
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/3C7CE93947421CB66603DC7DBAB0F04C4788382F/23E594945195F2414803B4D564D2A3A3F5D88B8C b/spss/handbook/conf/moa-spss/certstore/3C7CE93947421CB66603DC7DBAB0F04C4788382F/23E594945195F2414803B4D564D2A3A3F5D88B8C
new file mode 100644
index 000000000..8588ce58a
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/3C7CE93947421CB66603DC7DBAB0F04C4788382F/23E594945195F2414803B4D564D2A3A3F5D88B8C
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/405D86C9D39B1061885678ED90780A0F04A76327/6F61A0C50B4E6ED821F032A4DF3DA7DDDFD2FE6A b/spss/handbook/conf/moa-spss/certstore/405D86C9D39B1061885678ED90780A0F04A76327/6F61A0C50B4E6ED821F032A4DF3DA7DDDFD2FE6A
new file mode 100644
index 000000000..141b05ef4
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/405D86C9D39B1061885678ED90780A0F04A76327/6F61A0C50B4E6ED821F032A4DF3DA7DDDFD2FE6A
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/4224231A54F64581FBA2AB6ED82ADE467F144BDC/65EF37033859C2F709A64086D3A5BD1B8F1A85A4 b/spss/handbook/conf/moa-spss/certstore/4224231A54F64581FBA2AB6ED82ADE467F144BDC/65EF37033859C2F709A64086D3A5BD1B8F1A85A4
new file mode 100644
index 000000000..6e17b9db5
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/4224231A54F64581FBA2AB6ED82ADE467F144BDC/65EF37033859C2F709A64086D3A5BD1B8F1A85A4
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/427765A998398EE1B138ABDBA20313DC4A3738A0/07298E24461954E4696D2ED9FFB7D52B57F325B3 b/spss/handbook/conf/moa-spss/certstore/427765A998398EE1B138ABDBA20313DC4A3738A0/07298E24461954E4696D2ED9FFB7D52B57F325B3
new file mode 100644
index 000000000..33e1ee94b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/427765A998398EE1B138ABDBA20313DC4A3738A0/07298E24461954E4696D2ED9FFB7D52B57F325B3
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/45E2F3F807C6EAB9EDC1B3250F7558CA12A063DE/3A77E9B577661D99F9BBA5A352B29C7FF58A3D26 b/spss/handbook/conf/moa-spss/certstore/45E2F3F807C6EAB9EDC1B3250F7558CA12A063DE/3A77E9B577661D99F9BBA5A352B29C7FF58A3D26
new file mode 100644
index 000000000..55707d69f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/45E2F3F807C6EAB9EDC1B3250F7558CA12A063DE/3A77E9B577661D99F9BBA5A352B29C7FF58A3D26
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/47ED4C584F9DCD54A6C2925252C5603ADAC93F49/84E4E75DBB2FD6397E6ABBD27FBE16D5BA71923E b/spss/handbook/conf/moa-spss/certstore/47ED4C584F9DCD54A6C2925252C5603ADAC93F49/84E4E75DBB2FD6397E6ABBD27FBE16D5BA71923E
new file mode 100644
index 000000000..3be7b6a06
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/47ED4C584F9DCD54A6C2925252C5603ADAC93F49/84E4E75DBB2FD6397E6ABBD27FBE16D5BA71923E
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/487F4DEE9E63DADEB4CAAB07E0E166ACC9F584B6/9891BBEA9FDA665EEEC31C403A00A5CA5628D0FA b/spss/handbook/conf/moa-spss/certstore/487F4DEE9E63DADEB4CAAB07E0E166ACC9F584B6/9891BBEA9FDA665EEEC31C403A00A5CA5628D0FA
new file mode 100644
index 000000000..4e18de8d7
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/487F4DEE9E63DADEB4CAAB07E0E166ACC9F584B6/9891BBEA9FDA665EEEC31C403A00A5CA5628D0FA
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/52B42552A440A54C21A39D46D7F176AF28BEB5AA/51AC8CFF36818AA25498A293DF48EBCFFFF6D0B4 b/spss/handbook/conf/moa-spss/certstore/52B42552A440A54C21A39D46D7F176AF28BEB5AA/51AC8CFF36818AA25498A293DF48EBCFFFF6D0B4
new file mode 100644
index 000000000..9b2ee0fc6
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/52B42552A440A54C21A39D46D7F176AF28BEB5AA/51AC8CFF36818AA25498A293DF48EBCFFFF6D0B4
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/53CF955B19387A437659158BC050B7BC4B238132/F5F2456D79490C268569970E900C68FD1C7DC8E5 b/spss/handbook/conf/moa-spss/certstore/53CF955B19387A437659158BC050B7BC4B238132/F5F2456D79490C268569970E900C68FD1C7DC8E5
new file mode 100644
index 000000000..b2a1e145f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/53CF955B19387A437659158BC050B7BC4B238132/F5F2456D79490C268569970E900C68FD1C7DC8E5
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/550E9627E9094A2D1BB6385821334D02122BCF26/B7BCA7BC3C41FD0DC835175486FAB3FB4626EC0F b/spss/handbook/conf/moa-spss/certstore/550E9627E9094A2D1BB6385821334D02122BCF26/B7BCA7BC3C41FD0DC835175486FAB3FB4626EC0F
new file mode 100644
index 000000000..5dd9558d0
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/550E9627E9094A2D1BB6385821334D02122BCF26/B7BCA7BC3C41FD0DC835175486FAB3FB4626EC0F
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/562428A359B1CC3A820ABCC9C8F625CBB6A6A510/620127A8E5886A4805403977C3EF7D5EAF881526 b/spss/handbook/conf/moa-spss/certstore/562428A359B1CC3A820ABCC9C8F625CBB6A6A510/620127A8E5886A4805403977C3EF7D5EAF881526
new file mode 100644
index 000000000..da38ce028
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/562428A359B1CC3A820ABCC9C8F625CBB6A6A510/620127A8E5886A4805403977C3EF7D5EAF881526
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/562428A359B1CC3A820ABCC9C8F625CBB6A6A510/FCD9E881BCCCB9352EEF337C8D4EAAD65C4EC830 b/spss/handbook/conf/moa-spss/certstore/562428A359B1CC3A820ABCC9C8F625CBB6A6A510/FCD9E881BCCCB9352EEF337C8D4EAAD65C4EC830
new file mode 100644
index 000000000..7e9fd5b0b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/562428A359B1CC3A820ABCC9C8F625CBB6A6A510/FCD9E881BCCCB9352EEF337C8D4EAAD65C4EC830
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/5650A465FD3B5EF83639E11F324A2A0EA98AF935/4B5B0C2A0BF944CD467A6140F8C782E2BE9D15F9 b/spss/handbook/conf/moa-spss/certstore/5650A465FD3B5EF83639E11F324A2A0EA98AF935/4B5B0C2A0BF944CD467A6140F8C782E2BE9D15F9
new file mode 100644
index 000000000..640918641
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/5650A465FD3B5EF83639E11F324A2A0EA98AF935/4B5B0C2A0BF944CD467A6140F8C782E2BE9D15F9
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/58090A698038FEDAD56B4B976F23C29950D1D5A5/6BDA1FF41EEBC5DA66912F3C69B60C2A41C6E25B b/spss/handbook/conf/moa-spss/certstore/58090A698038FEDAD56B4B976F23C29950D1D5A5/6BDA1FF41EEBC5DA66912F3C69B60C2A41C6E25B
new file mode 100644
index 000000000..b15880c29
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/58090A698038FEDAD56B4B976F23C29950D1D5A5/6BDA1FF41EEBC5DA66912F3C69B60C2A41C6E25B
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/59484253C7D4C5BEAB7D2BABFAC13DDD1CA53FCC/341EA32E448659125A67DD04177FD17468FCFCB1 b/spss/handbook/conf/moa-spss/certstore/59484253C7D4C5BEAB7D2BABFAC13DDD1CA53FCC/341EA32E448659125A67DD04177FD17468FCFCB1
new file mode 100644
index 000000000..6da18c620
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/59484253C7D4C5BEAB7D2BABFAC13DDD1CA53FCC/341EA32E448659125A67DD04177FD17468FCFCB1
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/5E043AA9A832C33C7065B7633F4C007E0394BA19/069519EC949AC6B91D4C33A3F3665441F0220D20 b/spss/handbook/conf/moa-spss/certstore/5E043AA9A832C33C7065B7633F4C007E0394BA19/069519EC949AC6B91D4C33A3F3665441F0220D20
new file mode 100644
index 000000000..8b501d747
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/5E043AA9A832C33C7065B7633F4C007E0394BA19/069519EC949AC6B91D4C33A3F3665441F0220D20
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/5E043AA9A832C33C7065B7633F4C007E0394BA19/2F5EBA5055E9F7444852ADCEEB769E5DE157A03D b/spss/handbook/conf/moa-spss/certstore/5E043AA9A832C33C7065B7633F4C007E0394BA19/2F5EBA5055E9F7444852ADCEEB769E5DE157A03D
new file mode 100644
index 000000000..b4b128903
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/5E043AA9A832C33C7065B7633F4C007E0394BA19/2F5EBA5055E9F7444852ADCEEB769E5DE157A03D
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/60EF765436B4F314F2285BE2D89A511073AC0D58/334710B9169BCD20687A6302EEB16AEB97F288CD b/spss/handbook/conf/moa-spss/certstore/60EF765436B4F314F2285BE2D89A511073AC0D58/334710B9169BCD20687A6302EEB16AEB97F288CD
new file mode 100644
index 000000000..c19647ad8
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/60EF765436B4F314F2285BE2D89A511073AC0D58/334710B9169BCD20687A6302EEB16AEB97F288CD
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/6144BFC0CBE85C63DEFB6F208D80385B89F68046/D031945D982820B92FADBC7F71F6D1D9DFFDA2C9 b/spss/handbook/conf/moa-spss/certstore/6144BFC0CBE85C63DEFB6F208D80385B89F68046/D031945D982820B92FADBC7F71F6D1D9DFFDA2C9
new file mode 100644
index 000000000..39f88d881
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/6144BFC0CBE85C63DEFB6F208D80385B89F68046/D031945D982820B92FADBC7F71F6D1D9DFFDA2C9
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/68AF646E90A6FF370230F64ACD4E8A4F12C03916/CA80A13D41116E24CB1479E970CDC1C030C5907C b/spss/handbook/conf/moa-spss/certstore/68AF646E90A6FF370230F64ACD4E8A4F12C03916/CA80A13D41116E24CB1479E970CDC1C030C5907C
new file mode 100644
index 000000000..277b6083a
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/68AF646E90A6FF370230F64ACD4E8A4F12C03916/CA80A13D41116E24CB1479E970CDC1C030C5907C
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/6F5F08A3A5D59CA877CB146F00BB0264369B2304/ADEC5673B57A18F16EFAF75EEFBFAD4841E2CD2B b/spss/handbook/conf/moa-spss/certstore/6F5F08A3A5D59CA877CB146F00BB0264369B2304/ADEC5673B57A18F16EFAF75EEFBFAD4841E2CD2B
new file mode 100644
index 000000000..d361d919f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/6F5F08A3A5D59CA877CB146F00BB0264369B2304/ADEC5673B57A18F16EFAF75EEFBFAD4841E2CD2B
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/6F86F897C45679B45F03C67D44B6447EFF43B758/53CB69CF933C2D28FB9DF91F2852A99EC3352EA0 b/spss/handbook/conf/moa-spss/certstore/6F86F897C45679B45F03C67D44B6447EFF43B758/53CB69CF933C2D28FB9DF91F2852A99EC3352EA0
new file mode 100644
index 000000000..89cfe44fd
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/6F86F897C45679B45F03C67D44B6447EFF43B758/53CB69CF933C2D28FB9DF91F2852A99EC3352EA0
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/728C819D737EE42627F96F839C33BB6E68E85F68/00845B74CA13FE0A9056E6C0B5126FECF73B0D8C b/spss/handbook/conf/moa-spss/certstore/728C819D737EE42627F96F839C33BB6E68E85F68/00845B74CA13FE0A9056E6C0B5126FECF73B0D8C
new file mode 100644
index 000000000..cc8b505ec
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/728C819D737EE42627F96F839C33BB6E68E85F68/00845B74CA13FE0A9056E6C0B5126FECF73B0D8C
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/738B34854780955AE8FAF12349F2C9C52105A52C/474BC41135FB88BF58B5A8D976A1D5583378D85E b/spss/handbook/conf/moa-spss/certstore/738B34854780955AE8FAF12349F2C9C52105A52C/474BC41135FB88BF58B5A8D976A1D5583378D85E
new file mode 100644
index 000000000..c9da41583
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/738B34854780955AE8FAF12349F2C9C52105A52C/474BC41135FB88BF58B5A8D976A1D5583378D85E
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/738B34854780955AE8FAF12349F2C9C52105A52C/6B618820CE6A5EC0B5E63A9170335E5EA9F3BA01 b/spss/handbook/conf/moa-spss/certstore/738B34854780955AE8FAF12349F2C9C52105A52C/6B618820CE6A5EC0B5E63A9170335E5EA9F3BA01
new file mode 100644
index 000000000..28fbdf42f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/738B34854780955AE8FAF12349F2C9C52105A52C/6B618820CE6A5EC0B5E63A9170335E5EA9F3BA01
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/76011AE57123CC4E476C094C48C461DC37A0DEDD/FDC348410699803DE7D8276813BC2232EA99A878 b/spss/handbook/conf/moa-spss/certstore/76011AE57123CC4E476C094C48C461DC37A0DEDD/FDC348410699803DE7D8276813BC2232EA99A878
new file mode 100644
index 000000000..424f849a1
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/76011AE57123CC4E476C094C48C461DC37A0DEDD/FDC348410699803DE7D8276813BC2232EA99A878
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/7A9DC855647136050A8D75D6571AC64739F36C6C/BF648929E7DAABD8D97B3202F48D6C4A19C78F6C b/spss/handbook/conf/moa-spss/certstore/7A9DC855647136050A8D75D6571AC64739F36C6C/BF648929E7DAABD8D97B3202F48D6C4A19C78F6C
new file mode 100644
index 000000000..4989f3e73
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/7A9DC855647136050A8D75D6571AC64739F36C6C/BF648929E7DAABD8D97B3202F48D6C4A19C78F6C
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/88D9F0C0EBB72C58516EC96AEED397FA86B40E39/6DCD5118D1542E6C205C580775C5420B7509506B b/spss/handbook/conf/moa-spss/certstore/88D9F0C0EBB72C58516EC96AEED397FA86B40E39/6DCD5118D1542E6C205C580775C5420B7509506B
new file mode 100644
index 000000000..06b40aa67
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/88D9F0C0EBB72C58516EC96AEED397FA86B40E39/6DCD5118D1542E6C205C580775C5420B7509506B
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/8B23D64DBA1572885563DF070BE9C22A39A3BD26/3B8484BF1370941BF03F206B5C4958DA4E1559BB b/spss/handbook/conf/moa-spss/certstore/8B23D64DBA1572885563DF070BE9C22A39A3BD26/3B8484BF1370941BF03F206B5C4958DA4E1559BB
new file mode 100644
index 000000000..6f97837a2
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/8B23D64DBA1572885563DF070BE9C22A39A3BD26/3B8484BF1370941BF03F206B5C4958DA4E1559BB
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/8B23D64DBA1572885563DF070BE9C22A39A3BD26/C0EF3E7A54B4C501295F77974B1995E36B25C92B b/spss/handbook/conf/moa-spss/certstore/8B23D64DBA1572885563DF070BE9C22A39A3BD26/C0EF3E7A54B4C501295F77974B1995E36B25C92B
new file mode 100644
index 000000000..508f7f076
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/8B23D64DBA1572885563DF070BE9C22A39A3BD26/C0EF3E7A54B4C501295F77974B1995E36B25C92B
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/8FDB1CB752D82C88C89F9E9DA7AD2F54C6FA6F3B/842B3870A64001CDD90978D0E554DAF94D9ABDFE b/spss/handbook/conf/moa-spss/certstore/8FDB1CB752D82C88C89F9E9DA7AD2F54C6FA6F3B/842B3870A64001CDD90978D0E554DAF94D9ABDFE
new file mode 100644
index 000000000..a0e3fdda1
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/8FDB1CB752D82C88C89F9E9DA7AD2F54C6FA6F3B/842B3870A64001CDD90978D0E554DAF94D9ABDFE
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/9014D44A2072A5D74E12C7FE47F37D68371E1C42/679A4F81FC705DDEC419778DD2EBD875F4C242C6 b/spss/handbook/conf/moa-spss/certstore/9014D44A2072A5D74E12C7FE47F37D68371E1C42/679A4F81FC705DDEC419778DD2EBD875F4C242C6
new file mode 100644
index 000000000..36a442b89
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/9014D44A2072A5D74E12C7FE47F37D68371E1C42/679A4F81FC705DDEC419778DD2EBD875F4C242C6
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/91C4DD783D6D38F0325FE74930BF61F656364EA9/53A6B611F8CEE0315BCCE5D59898931ED390E400 b/spss/handbook/conf/moa-spss/certstore/91C4DD783D6D38F0325FE74930BF61F656364EA9/53A6B611F8CEE0315BCCE5D59898931ED390E400
new file mode 100644
index 000000000..6c0216239
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/91C4DD783D6D38F0325FE74930BF61F656364EA9/53A6B611F8CEE0315BCCE5D59898931ED390E400
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/92E5C38466AECA677325C25C3C3011C97D24CCF6/A149EE01A250491C07D5A279D3B58A646288DA22 b/spss/handbook/conf/moa-spss/certstore/92E5C38466AECA677325C25C3C3011C97D24CCF6/A149EE01A250491C07D5A279D3B58A646288DA22
new file mode 100644
index 000000000..7c6adedf5
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/92E5C38466AECA677325C25C3C3011C97D24CCF6/A149EE01A250491C07D5A279D3B58A646288DA22
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/92E5C38466AECA677325C25C3C3011C97D24CCF6/AD8ECBB67B9DC59406F92A296A38192297A4F169 b/spss/handbook/conf/moa-spss/certstore/92E5C38466AECA677325C25C3C3011C97D24CCF6/AD8ECBB67B9DC59406F92A296A38192297A4F169
new file mode 100644
index 000000000..70f5b7c91
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/92E5C38466AECA677325C25C3C3011C97D24CCF6/AD8ECBB67B9DC59406F92A296A38192297A4F169
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/96107213A757FFB88DECEE469373162636D7146C/45B43346251FDF9E95DCB7F36928785D46D63913 b/spss/handbook/conf/moa-spss/certstore/96107213A757FFB88DECEE469373162636D7146C/45B43346251FDF9E95DCB7F36928785D46D63913
new file mode 100644
index 000000000..f3cf5e676
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/96107213A757FFB88DECEE469373162636D7146C/45B43346251FDF9E95DCB7F36928785D46D63913
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/96107213A757FFB88DECEE469373162636D7146C/E33619C88426E4FE956041E6751ADDEC9C10F0BC b/spss/handbook/conf/moa-spss/certstore/96107213A757FFB88DECEE469373162636D7146C/E33619C88426E4FE956041E6751ADDEC9C10F0BC
new file mode 100644
index 000000000..fc5bd433b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/96107213A757FFB88DECEE469373162636D7146C/E33619C88426E4FE956041E6751ADDEC9C10F0BC
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/975729FFAF7EB667BCF68E9B886EA876E44F46D0/35202B14F69409EAA51CD8AB547AC0CD5E993F3F b/spss/handbook/conf/moa-spss/certstore/975729FFAF7EB667BCF68E9B886EA876E44F46D0/35202B14F69409EAA51CD8AB547AC0CD5E993F3F
new file mode 100644
index 000000000..3beb4529a
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/975729FFAF7EB667BCF68E9B886EA876E44F46D0/35202B14F69409EAA51CD8AB547AC0CD5E993F3F
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/9C5C7CD895AABBFF23E79907A97FB2D68423CA8E/41E3FCC9470F8634DBCB5CEA7FB688E04E7575BA b/spss/handbook/conf/moa-spss/certstore/9C5C7CD895AABBFF23E79907A97FB2D68423CA8E/41E3FCC9470F8634DBCB5CEA7FB688E04E7575BA
new file mode 100644
index 000000000..8ddc7d79b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/9C5C7CD895AABBFF23E79907A97FB2D68423CA8E/41E3FCC9470F8634DBCB5CEA7FB688E04E7575BA
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/9D3E6FACCD6AF894CDD2B91D1B9E3C2E310EAB93/3F4E01DF7547CDD38DCCFCCD76170C299ECEB9F6 b/spss/handbook/conf/moa-spss/certstore/9D3E6FACCD6AF894CDD2B91D1B9E3C2E310EAB93/3F4E01DF7547CDD38DCCFCCD76170C299ECEB9F6
new file mode 100644
index 000000000..781d1e4f2
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/9D3E6FACCD6AF894CDD2B91D1B9E3C2E310EAB93/3F4E01DF7547CDD38DCCFCCD76170C299ECEB9F6
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/9D3E6FACCD6AF894CDD2B91D1B9E3C2E310EAB93/9D4CB7E3DBF24AE596972D59C375DD6384BB5E8B b/spss/handbook/conf/moa-spss/certstore/9D3E6FACCD6AF894CDD2B91D1B9E3C2E310EAB93/9D4CB7E3DBF24AE596972D59C375DD6384BB5E8B
new file mode 100644
index 000000000..8286cabbc
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/9D3E6FACCD6AF894CDD2B91D1B9E3C2E310EAB93/9D4CB7E3DBF24AE596972D59C375DD6384BB5E8B
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/9D3E6FACCD6AF894CDD2B91D1B9E3C2E310EAB93/A562C4B99E2847251CB4A1F05DA1FF43E7296F0B b/spss/handbook/conf/moa-spss/certstore/9D3E6FACCD6AF894CDD2B91D1B9E3C2E310EAB93/A562C4B99E2847251CB4A1F05DA1FF43E7296F0B
new file mode 100644
index 000000000..a0148f63b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/9D3E6FACCD6AF894CDD2B91D1B9E3C2E310EAB93/A562C4B99E2847251CB4A1F05DA1FF43E7296F0B
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/9F5A9B8D0F919C96B9472442BFBBDD34232A627D/9039DBD29DB8AD0F8E2015F05FCD40582CCCBE8C b/spss/handbook/conf/moa-spss/certstore/9F5A9B8D0F919C96B9472442BFBBDD34232A627D/9039DBD29DB8AD0F8E2015F05FCD40582CCCBE8C
new file mode 100644
index 000000000..61d346a8f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/9F5A9B8D0F919C96B9472442BFBBDD34232A627D/9039DBD29DB8AD0F8E2015F05FCD40582CCCBE8C
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/9F5A9B8D0F919C96B9472442BFBBDD34232A627D/9F0E0FBB25F66FF88C8E033EFF358923C84A2926 b/spss/handbook/conf/moa-spss/certstore/9F5A9B8D0F919C96B9472442BFBBDD34232A627D/9F0E0FBB25F66FF88C8E033EFF358923C84A2926
new file mode 100644
index 000000000..9ae7ffa0c
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/9F5A9B8D0F919C96B9472442BFBBDD34232A627D/9F0E0FBB25F66FF88C8E033EFF358923C84A2926
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/9F5A9B8D0F919C96B9472442BFBBDD34232A627D/C87D1855227D995C332C4C9072A2E2053F2CC623 b/spss/handbook/conf/moa-spss/certstore/9F5A9B8D0F919C96B9472442BFBBDD34232A627D/C87D1855227D995C332C4C9072A2E2053F2CC623
new file mode 100644
index 000000000..a68ae2db7
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/9F5A9B8D0F919C96B9472442BFBBDD34232A627D/C87D1855227D995C332C4C9072A2E2053F2CC623
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/A07E912CAA2AB620034B05353E7D4B91807880ED/42AD1897A4643D2AA634D980F16349E6694F3B1B b/spss/handbook/conf/moa-spss/certstore/A07E912CAA2AB620034B05353E7D4B91807880ED/42AD1897A4643D2AA634D980F16349E6694F3B1B
new file mode 100644
index 000000000..f1d7b6a28
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/A07E912CAA2AB620034B05353E7D4B91807880ED/42AD1897A4643D2AA634D980F16349E6694F3B1B
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/A07E912CAA2AB620034B05353E7D4B91807880ED/FE7891B6ED7B178F528A28B21478299F865889BD b/spss/handbook/conf/moa-spss/certstore/A07E912CAA2AB620034B05353E7D4B91807880ED/FE7891B6ED7B178F528A28B21478299F865889BD
new file mode 100644
index 000000000..c1b90c0f4
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/A07E912CAA2AB620034B05353E7D4B91807880ED/FE7891B6ED7B178F528A28B21478299F865889BD
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/A15B5DBE14A19CF859F48E2DA2A29A4C3DB4D680/3AC12E21FFF9ACAB2BCFF52BBD885FB7AAC9A02B b/spss/handbook/conf/moa-spss/certstore/A15B5DBE14A19CF859F48E2DA2A29A4C3DB4D680/3AC12E21FFF9ACAB2BCFF52BBD885FB7AAC9A02B
new file mode 100644
index 000000000..e27a87038
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/A15B5DBE14A19CF859F48E2DA2A29A4C3DB4D680/3AC12E21FFF9ACAB2BCFF52BBD885FB7AAC9A02B
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/A24C49B7F1B637E7F72C12CAB35910EC8EF1C6CF/8784ED81F5A22779EB0B081945FD151992557FBE b/spss/handbook/conf/moa-spss/certstore/A24C49B7F1B637E7F72C12CAB35910EC8EF1C6CF/8784ED81F5A22779EB0B081945FD151992557FBE
new file mode 100644
index 000000000..cc35ba691
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/A24C49B7F1B637E7F72C12CAB35910EC8EF1C6CF/8784ED81F5A22779EB0B081945FD151992557FBE
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/A4B140FBD4D5EA2AC3A570299945D8FCBBAD2231/20CAECDCA766243AAD6FA1327618FC81BA65DC0F b/spss/handbook/conf/moa-spss/certstore/A4B140FBD4D5EA2AC3A570299945D8FCBBAD2231/20CAECDCA766243AAD6FA1327618FC81BA65DC0F
new file mode 100644
index 000000000..b596d82e3
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/A4B140FBD4D5EA2AC3A570299945D8FCBBAD2231/20CAECDCA766243AAD6FA1327618FC81BA65DC0F
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/A4B140FBD4D5EA2AC3A570299945D8FCBBAD2231/96D5D179016A5A6546973BA63733617EE1F1540D b/spss/handbook/conf/moa-spss/certstore/A4B140FBD4D5EA2AC3A570299945D8FCBBAD2231/96D5D179016A5A6546973BA63733617EE1F1540D
new file mode 100644
index 000000000..4adc3b7ec
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/A4B140FBD4D5EA2AC3A570299945D8FCBBAD2231/96D5D179016A5A6546973BA63733617EE1F1540D
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/A95F0C3FA54CA93E3D5BA61AD23459300FA498D6/DFA7DDEF5C212F0F0651E2A9DE1CE4A1AC63AF7A b/spss/handbook/conf/moa-spss/certstore/A95F0C3FA54CA93E3D5BA61AD23459300FA498D6/DFA7DDEF5C212F0F0651E2A9DE1CE4A1AC63AF7A
new file mode 100644
index 000000000..b6f39e354
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/A95F0C3FA54CA93E3D5BA61AD23459300FA498D6/DFA7DDEF5C212F0F0651E2A9DE1CE4A1AC63AF7A
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/A95F0C3FA54CA93E3D5BA61AD23459300FA498D6/E619D25B380B7B13FDA33E8A58CD82D8A88E0515 b/spss/handbook/conf/moa-spss/certstore/A95F0C3FA54CA93E3D5BA61AD23459300FA498D6/E619D25B380B7B13FDA33E8A58CD82D8A88E0515
new file mode 100644
index 000000000..f9fef65fc
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/A95F0C3FA54CA93E3D5BA61AD23459300FA498D6/E619D25B380B7B13FDA33E8A58CD82D8A88E0515
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/A95F0C3FA54CA93E3D5BA61AD23459300FA498D6/F825578F8F5484DFB40F81867C392D6CB0012B92 b/spss/handbook/conf/moa-spss/certstore/A95F0C3FA54CA93E3D5BA61AD23459300FA498D6/F825578F8F5484DFB40F81867C392D6CB0012B92
new file mode 100644
index 000000000..f9f27442b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/A95F0C3FA54CA93E3D5BA61AD23459300FA498D6/F825578F8F5484DFB40F81867C392D6CB0012B92
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/AAB27F0E98B28AF253454415F6490CB5F43A4B49/A9D28607928FA8615E2615CC9D71B535C5D0D419 b/spss/handbook/conf/moa-spss/certstore/AAB27F0E98B28AF253454415F6490CB5F43A4B49/A9D28607928FA8615E2615CC9D71B535C5D0D419
new file mode 100644
index 000000000..10a1f7141
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/AAB27F0E98B28AF253454415F6490CB5F43A4B49/A9D28607928FA8615E2615CC9D71B535C5D0D419
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/AC1B67D7D5A300767C0944ACE8458DD49960F1BD/4D523730501ADB80A76B0B473A4D21C7D86F8374 b/spss/handbook/conf/moa-spss/certstore/AC1B67D7D5A300767C0944ACE8458DD49960F1BD/4D523730501ADB80A76B0B473A4D21C7D86F8374
new file mode 100644
index 000000000..61a7ccb15
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/AC1B67D7D5A300767C0944ACE8458DD49960F1BD/4D523730501ADB80A76B0B473A4D21C7D86F8374
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/AF03510E8BCAE72BB7C4E9D1910B4E12057075A4/7AC3EFA52DE27A930EC8754DB5E061476948E914 b/spss/handbook/conf/moa-spss/certstore/AF03510E8BCAE72BB7C4E9D1910B4E12057075A4/7AC3EFA52DE27A930EC8754DB5E061476948E914
new file mode 100644
index 000000000..911640d0e
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/AF03510E8BCAE72BB7C4E9D1910B4E12057075A4/7AC3EFA52DE27A930EC8754DB5E061476948E914
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/B310CEED301C503EDB15720F94D5D7E76BF423DA/AA94FD422AEB8F5B6E8508314CE0DC68BCD53305 b/spss/handbook/conf/moa-spss/certstore/B310CEED301C503EDB15720F94D5D7E76BF423DA/AA94FD422AEB8F5B6E8508314CE0DC68BCD53305
new file mode 100644
index 000000000..ea3512e3d
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/B310CEED301C503EDB15720F94D5D7E76BF423DA/AA94FD422AEB8F5B6E8508314CE0DC68BCD53305
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/B3EB7B59ECFF1E25E16C64BB24993D1B20DCFC28/07A6DEED70213CCF598F278789680DA4C04A0331 b/spss/handbook/conf/moa-spss/certstore/B3EB7B59ECFF1E25E16C64BB24993D1B20DCFC28/07A6DEED70213CCF598F278789680DA4C04A0331
new file mode 100644
index 000000000..46dd968f0
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/B3EB7B59ECFF1E25E16C64BB24993D1B20DCFC28/07A6DEED70213CCF598F278789680DA4C04A0331
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/B749506C821467F7D6F4E8943D07DDED771A7B47/A5A00B223EF24AED92D03F652CFE367CA9D1B200 b/spss/handbook/conf/moa-spss/certstore/B749506C821467F7D6F4E8943D07DDED771A7B47/A5A00B223EF24AED92D03F652CFE367CA9D1B200
new file mode 100644
index 000000000..05a8b86f9
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/B749506C821467F7D6F4E8943D07DDED771A7B47/A5A00B223EF24AED92D03F652CFE367CA9D1B200
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/BAA9ADD095E87E0B490B6DD933AA2F450C6B9492/7A430B6E3592BEEDFAA0DD5DD6262C27EB8D26D2 b/spss/handbook/conf/moa-spss/certstore/BAA9ADD095E87E0B490B6DD933AA2F450C6B9492/7A430B6E3592BEEDFAA0DD5DD6262C27EB8D26D2
new file mode 100644
index 000000000..63ba5cce5
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/BAA9ADD095E87E0B490B6DD933AA2F450C6B9492/7A430B6E3592BEEDFAA0DD5DD6262C27EB8D26D2
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/BE47A5DA41A35F740D98305DA8FF4096B71492BE/D1474E7D99512D05B98DD37B3FE86496A03D088D b/spss/handbook/conf/moa-spss/certstore/BE47A5DA41A35F740D98305DA8FF4096B71492BE/D1474E7D99512D05B98DD37B3FE86496A03D088D
new file mode 100644
index 000000000..0bab77032
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/BE47A5DA41A35F740D98305DA8FF4096B71492BE/D1474E7D99512D05B98DD37B3FE86496A03D088D
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/BED4C70D83B5042F4254459064FDEACD43DD1EDF/7BE0C8E441786C69A3CB35BDBEF235F8B5310E04 b/spss/handbook/conf/moa-spss/certstore/BED4C70D83B5042F4254459064FDEACD43DD1EDF/7BE0C8E441786C69A3CB35BDBEF235F8B5310E04
new file mode 100644
index 000000000..0a8de4bb9
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/BED4C70D83B5042F4254459064FDEACD43DD1EDF/7BE0C8E441786C69A3CB35BDBEF235F8B5310E04
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/BF375B55D8D7CFC31FD8E3FBF7B1981A91A1A6CA/42EFDDE6BFF35ED0BAE6ACDD204C50AE86C4F4FA b/spss/handbook/conf/moa-spss/certstore/BF375B55D8D7CFC31FD8E3FBF7B1981A91A1A6CA/42EFDDE6BFF35ED0BAE6ACDD204C50AE86C4F4FA
new file mode 100644
index 000000000..ab9e0cd7d
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/BF375B55D8D7CFC31FD8E3FBF7B1981A91A1A6CA/42EFDDE6BFF35ED0BAE6ACDD204C50AE86C4F4FA
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/C15FFFE6EFAD484909C9EFC6CD5C20435E326685/DDBAE68B1FF60FFBB2854C78727B76C95EC83BBE b/spss/handbook/conf/moa-spss/certstore/C15FFFE6EFAD484909C9EFC6CD5C20435E326685/DDBAE68B1FF60FFBB2854C78727B76C95EC83BBE
new file mode 100644
index 000000000..6428b8256
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/C15FFFE6EFAD484909C9EFC6CD5C20435E326685/DDBAE68B1FF60FFBB2854C78727B76C95EC83BBE
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/C2A7CAE9E68EB7945828D193CB22CDD246BC7F95/6955D95F6B0799F7D96F4FC28E6E6C64758C1240 b/spss/handbook/conf/moa-spss/certstore/C2A7CAE9E68EB7945828D193CB22CDD246BC7F95/6955D95F6B0799F7D96F4FC28E6E6C64758C1240
new file mode 100644
index 000000000..f11bd6247
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/C2A7CAE9E68EB7945828D193CB22CDD246BC7F95/6955D95F6B0799F7D96F4FC28E6E6C64758C1240
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/C52E4A04A22D98C70E19F1969AD71C838E4371B3/F96FE4F59166EFA9000B21A16EF22CF14468890C b/spss/handbook/conf/moa-spss/certstore/C52E4A04A22D98C70E19F1969AD71C838E4371B3/F96FE4F59166EFA9000B21A16EF22CF14468890C
new file mode 100644
index 000000000..348257122
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/C52E4A04A22D98C70E19F1969AD71C838E4371B3/F96FE4F59166EFA9000B21A16EF22CF14468890C
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/C7E1D3604D2A960201D70F29B8A80EDA11475EEB/C18ECC8FD712ACAFBEAEDC1FA13F5AB19930E3ED b/spss/handbook/conf/moa-spss/certstore/C7E1D3604D2A960201D70F29B8A80EDA11475EEB/C18ECC8FD712ACAFBEAEDC1FA13F5AB19930E3ED
new file mode 100644
index 000000000..a3f8a7409
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/C7E1D3604D2A960201D70F29B8A80EDA11475EEB/C18ECC8FD712ACAFBEAEDC1FA13F5AB19930E3ED
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/C976280EC7FECF169577E31D8CA0BB00967904B1/7666A8BD2C2513DE489C06D08D566F177ECE84AA b/spss/handbook/conf/moa-spss/certstore/C976280EC7FECF169577E31D8CA0BB00967904B1/7666A8BD2C2513DE489C06D08D566F177ECE84AA
new file mode 100644
index 000000000..3c1f2f8a2
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/C976280EC7FECF169577E31D8CA0BB00967904B1/7666A8BD2C2513DE489C06D08D566F177ECE84AA
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/CABD2EA6CA438084840DCCAE875F341E2D3A2C43/02A0E6456442E35198532ACFFB6FEE3B606D9FA3 b/spss/handbook/conf/moa-spss/certstore/CABD2EA6CA438084840DCCAE875F341E2D3A2C43/02A0E6456442E35198532ACFFB6FEE3B606D9FA3
new file mode 100644
index 000000000..5026d395f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/CABD2EA6CA438084840DCCAE875F341E2D3A2C43/02A0E6456442E35198532ACFFB6FEE3B606D9FA3
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/CD2D87A57D1568A515128BE9DA8B3CAE7AC007A4/C6658C25AFB8A9D738F2BC591775D167549FFD3A b/spss/handbook/conf/moa-spss/certstore/CD2D87A57D1568A515128BE9DA8B3CAE7AC007A4/C6658C25AFB8A9D738F2BC591775D167549FFD3A
new file mode 100644
index 000000000..f6df0f4fd
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/CD2D87A57D1568A515128BE9DA8B3CAE7AC007A4/C6658C25AFB8A9D738F2BC591775D167549FFD3A
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/CE91CC7CF2DDDEE6623A1A91B3298DCAD2375F2B/8AB0A3519AFA7F3C04074522678BAA1CB3DC734F b/spss/handbook/conf/moa-spss/certstore/CE91CC7CF2DDDEE6623A1A91B3298DCAD2375F2B/8AB0A3519AFA7F3C04074522678BAA1CB3DC734F
new file mode 100644
index 000000000..c34d0f380
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/CE91CC7CF2DDDEE6623A1A91B3298DCAD2375F2B/8AB0A3519AFA7F3C04074522678BAA1CB3DC734F
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/CE91CC7CF2DDDEE6623A1A91B3298DCAD2375F2B/DF47B3040E7632614464BD2EC4ECD1B8030F53E3 b/spss/handbook/conf/moa-spss/certstore/CE91CC7CF2DDDEE6623A1A91B3298DCAD2375F2B/DF47B3040E7632614464BD2EC4ECD1B8030F53E3
new file mode 100644
index 000000000..d894e92ca
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/CE91CC7CF2DDDEE6623A1A91B3298DCAD2375F2B/DF47B3040E7632614464BD2EC4ECD1B8030F53E3
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/CE91CC7CF2DDDEE6623A1A91B3298DCAD2375F2B/E117479B4A41D7F3223FCAE50560B0D57B22217D b/spss/handbook/conf/moa-spss/certstore/CE91CC7CF2DDDEE6623A1A91B3298DCAD2375F2B/E117479B4A41D7F3223FCAE50560B0D57B22217D
new file mode 100644
index 000000000..380486f65
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/CE91CC7CF2DDDEE6623A1A91B3298DCAD2375F2B/E117479B4A41D7F3223FCAE50560B0D57B22217D
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/D4D40BD33958CD9169A7AB6304AA2BBAD22DC595/07976A2A16EC182670161B46886B05E1FEAC16B1 b/spss/handbook/conf/moa-spss/certstore/D4D40BD33958CD9169A7AB6304AA2BBAD22DC595/07976A2A16EC182670161B46886B05E1FEAC16B1
new file mode 100644
index 000000000..22d64fb5f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/D4D40BD33958CD9169A7AB6304AA2BBAD22DC595/07976A2A16EC182670161B46886B05E1FEAC16B1
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/D708C897515970D33EF7CD0C2474449D3AB6AA83/52ED0FAFBD38A868C678174D7EB03D266ADB221C b/spss/handbook/conf/moa-spss/certstore/D708C897515970D33EF7CD0C2474449D3AB6AA83/52ED0FAFBD38A868C678174D7EB03D266ADB221C
new file mode 100644
index 000000000..42a64da07
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/D708C897515970D33EF7CD0C2474449D3AB6AA83/52ED0FAFBD38A868C678174D7EB03D266ADB221C
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/DD29E76659D18371B78E61E7DF4D4B8FEDCAF8E7/8BA5C0847597612C7E16970EAE55EF58D32E9CF3 b/spss/handbook/conf/moa-spss/certstore/DD29E76659D18371B78E61E7DF4D4B8FEDCAF8E7/8BA5C0847597612C7E16970EAE55EF58D32E9CF3
new file mode 100644
index 000000000..010c5d5b6
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/DD29E76659D18371B78E61E7DF4D4B8FEDCAF8E7/8BA5C0847597612C7E16970EAE55EF58D32E9CF3
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/DF5F53FDADAFC93F4789141B5A7627EB9F3BD29F/27337257493B86B9BFF78D569F938D692A430EAE b/spss/handbook/conf/moa-spss/certstore/DF5F53FDADAFC93F4789141B5A7627EB9F3BD29F/27337257493B86B9BFF78D569F938D692A430EAE
new file mode 100644
index 000000000..5375c57c3
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/DF5F53FDADAFC93F4789141B5A7627EB9F3BD29F/27337257493B86B9BFF78D569F938D692A430EAE
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/DF5F53FDADAFC93F4789141B5A7627EB9F3BD29F/4832F0A28C3724A92F6CB3314F747D0E74FC7344 b/spss/handbook/conf/moa-spss/certstore/DF5F53FDADAFC93F4789141B5A7627EB9F3BD29F/4832F0A28C3724A92F6CB3314F747D0E74FC7344
new file mode 100644
index 000000000..7085c5ac9
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/DF5F53FDADAFC93F4789141B5A7627EB9F3BD29F/4832F0A28C3724A92F6CB3314F747D0E74FC7344
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/E6A4C843059A6043B4DC967F9EF892B695990777/B4B77C83465979E3679E3A33F972F48EE3730A18 b/spss/handbook/conf/moa-spss/certstore/E6A4C843059A6043B4DC967F9EF892B695990777/B4B77C83465979E3679E3A33F972F48EE3730A18
new file mode 100644
index 000000000..6225c0ca7
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/E6A4C843059A6043B4DC967F9EF892B695990777/B4B77C83465979E3679E3A33F972F48EE3730A18
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/EA7E6D37E678C1BCA5060F97DAF09F559DFD04B7/3AAD23B00CA10E54E6368DF7952E3F4B5108B65C b/spss/handbook/conf/moa-spss/certstore/EA7E6D37E678C1BCA5060F97DAF09F559DFD04B7/3AAD23B00CA10E54E6368DF7952E3F4B5108B65C
new file mode 100644
index 000000000..a3aa0000d
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/EA7E6D37E678C1BCA5060F97DAF09F559DFD04B7/3AAD23B00CA10E54E6368DF7952E3F4B5108B65C
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/EEE6351C5C6EBD8644AB88E7648D44FA07C72A80/14E59C02A6877B0EBD2C4203886BA25959C1D267 b/spss/handbook/conf/moa-spss/certstore/EEE6351C5C6EBD8644AB88E7648D44FA07C72A80/14E59C02A6877B0EBD2C4203886BA25959C1D267
new file mode 100644
index 000000000..332aa817a
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/EEE6351C5C6EBD8644AB88E7648D44FA07C72A80/14E59C02A6877B0EBD2C4203886BA25959C1D267
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/F1B84756A1EAB09C171B2783DD163B42A9BD0BBB/ED5608CE67EA5CB79AC024CEA7445F9BCBE48703 b/spss/handbook/conf/moa-spss/certstore/F1B84756A1EAB09C171B2783DD163B42A9BD0BBB/ED5608CE67EA5CB79AC024CEA7445F9BCBE48703
new file mode 100644
index 000000000..069640ffc
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/F1B84756A1EAB09C171B2783DD163B42A9BD0BBB/ED5608CE67EA5CB79AC024CEA7445F9BCBE48703
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/F3DA7C495789E656FA27E611CCAFA05F232ADEA0/F3AE9FEA4DECEE5330770A2520BD86909929E7BE b/spss/handbook/conf/moa-spss/certstore/F3DA7C495789E656FA27E611CCAFA05F232ADEA0/F3AE9FEA4DECEE5330770A2520BD86909929E7BE
new file mode 100644
index 000000000..c3fc91352
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/F3DA7C495789E656FA27E611CCAFA05F232ADEA0/F3AE9FEA4DECEE5330770A2520BD86909929E7BE
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/F48B57F89BACD8687EBB12223A5B8E5EF3774583/CAF84A42305615AC2C582F6412BDA3E36DAC3D25 b/spss/handbook/conf/moa-spss/certstore/F48B57F89BACD8687EBB12223A5B8E5EF3774583/CAF84A42305615AC2C582F6412BDA3E36DAC3D25
new file mode 100644
index 000000000..83aeb1fce
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/F48B57F89BACD8687EBB12223A5B8E5EF3774583/CAF84A42305615AC2C582F6412BDA3E36DAC3D25
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/F613568C1D7A1300B32609998288211959DBDFB0/D7EDAF7381F7FC93B4C28FA372190D7A59CFA696 b/spss/handbook/conf/moa-spss/certstore/F613568C1D7A1300B32609998288211959DBDFB0/D7EDAF7381F7FC93B4C28FA372190D7A59CFA696
new file mode 100644
index 000000000..5631441a9
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/F613568C1D7A1300B32609998288211959DBDFB0/D7EDAF7381F7FC93B4C28FA372190D7A59CFA696
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/F7D331850EC13D22284909E0FC3493A65FFA7F30/EC988340526163D5B7AC80481B2AC76828EDDC6C b/spss/handbook/conf/moa-spss/certstore/F7D331850EC13D22284909E0FC3493A65FFA7F30/EC988340526163D5B7AC80481B2AC76828EDDC6C
new file mode 100644
index 000000000..585047fa2
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/F7D331850EC13D22284909E0FC3493A65FFA7F30/EC988340526163D5B7AC80481B2AC76828EDDC6C
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/keys/common/moa-signaturdienst-allekunden.der b/spss/handbook/conf/moa-spss/keys/common/moa-signaturdienst-allekunden.der
new file mode 100644
index 000000000..a4a327a3a
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/keys/common/moa-signaturdienst-allekunden.der
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/keys/common/moa-signaturdienst-allekunden[pwd=allekunden].p12 b/spss/handbook/conf/moa-spss/keys/common/moa-signaturdienst-allekunden[pwd=allekunden].p12
new file mode 100644
index 000000000..fe837fd6e
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/keys/common/moa-signaturdienst-allekunden[pwd=allekunden].p12
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/keys/customer1/moa-signaturdienst-kunde1.der b/spss/handbook/conf/moa-spss/keys/customer1/moa-signaturdienst-kunde1.der
new file mode 100644
index 000000000..505e7dd05
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/keys/customer1/moa-signaturdienst-kunde1.der
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/keys/customer1/moa-signaturdienst-kunde1[pwd=kunde1].p12 b/spss/handbook/conf/moa-spss/keys/customer1/moa-signaturdienst-kunde1[pwd=kunde1].p12
new file mode 100644
index 000000000..a8073b02b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/keys/customer1/moa-signaturdienst-kunde1[pwd=kunde1].p12
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/keys/customer2/moa-signaturdienst-kunde2.der b/spss/handbook/conf/moa-spss/keys/customer2/moa-signaturdienst-kunde2.der
new file mode 100644
index 000000000..3c21c9b2b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/keys/customer2/moa-signaturdienst-kunde2.der
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/keys/customer2/moa-signaturdienst-kunde2[pwd=kunde2].p12 b/spss/handbook/conf/moa-spss/keys/customer2/moa-signaturdienst-kunde2[pwd=kunde2].p12
new file mode 100644
index 000000000..dce18ac78
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/keys/customer2/moa-signaturdienst-kunde2[pwd=kunde2].p12
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/log4j.properties b/spss/handbook/conf/moa-spss/log4j.properties
new file mode 100644
index 000000000..02b767b87
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/log4j.properties
@@ -0,0 +1,37 @@
+#
+# Sample log4j configuration for the MOA-SPSS web service
+#
+
+# commons-logging setup
+org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.Log4jFactory
+
+# Configure root logger and loggers for moa-spss
+log4j.rootLogger=info, stdout
+log4j.logger.moa.spss.server=info, moaspss
+log4j.logger.iaik.server=info, moaspss
+
+# Configure the 'stdout' appender to write logging output to the console
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%5p | %d{dd HH:mm:ss,SSS} | %20c | %10t | %m%n
+
+# Configure the 'moaspss' appender to write moa-spss related logging output
+# to the file '${catalina.base}/logs/moa-spss.log'. The file is rolled over every 1000KB,
+# and a maximum history of 10 log files is being kept.
+log4j.appender.moaspss=org.apache.log4j.RollingFileAppender
+log4j.appender.moaspss.File=${catalina.base}/logs/moa-spss.log
+log4j.appender.moaspss.MaxFileSize=1000KB
+log4j.appender.moaspss.MaxBackupIndex=10
+log4j.appender.moaspss.layout=org.apache.log4j.PatternLayout
+log4j.appender.moaspss.layout.ConversionPattern=%5p | %d{dd HH:mm:ss,SSS} | %20c | %10t | %m%n
+
+# Configure the jdbc appender 'JDBC' to write logging output
+# to the given PostgreSQL database
+# a suitable table called 'spss_log' must have been created in the
+# database using the command:
+# create table spss_log (log_time timestamp, log_level char(5), log_msg text)
+#log4j.appender.JDBC=org.apache.log4j.jdbc.JDBCAppender
+#log4j.appender.JDBC.driver=org.postgresql.Driver
+#log4j.appender.JDBC.URL=jdbc:postgresql://10.16.46.108/moa?user=moa&password=moatest
+#log4j.appender.JDBC.layout=org.apache.log4j.PatternLayout
+#log4j.appender.JDBC.sql=INSERT INTO spss_log (log_time, log_level, log_msg) VALUES ('%d{ yyyy-MM-dd HH:mm:ss.SSS}', '%5p', '%m')
diff --git a/spss/handbook/conf/moa-spss/sp.minimum.config.xml b/spss/handbook/conf/moa-spss/sp.minimum.config.xml
new file mode 100644
index 000000000..bc154ae00
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/sp.minimum.config.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--MOA SP 1.4 Configuration File-->
+<cfg:MOAConfiguration xmlns:cfg="http://reference.e-government.gv.at/namespace/moaconfig/20021122#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
+ <cfg:SignatureVerification>
+ <cfg:CertificateValidation>
+ <cfg:PathConstruction>
+ <cfg:AutoAddCertificates>true</cfg:AutoAddCertificates>
+ <cfg:UseAuthorityInformationAccess>true</cfg:UseAuthorityInformationAccess>
+ <cfg:CertificateStore>
+ <cfg:DirectoryStore>
+ <cfg:Location>certstore</cfg:Location>
+ </cfg:DirectoryStore>
+ </cfg:CertificateStore>
+ </cfg:PathConstruction>
+ <cfg:PathValidation>
+ <cfg:ChainingMode>
+ <cfg:DefaultMode>pkix</cfg:DefaultMode>
+ </cfg:ChainingMode>
+ <cfg:TrustProfile>
+ <cfg:Id>Test-Signaturdienste</cfg:Id>
+ <cfg:TrustAnchorsLocation>trustProfiles/test</cfg:TrustAnchorsLocation>
+ </cfg:TrustProfile>
+ </cfg:PathValidation>
+ <cfg:RevocationChecking>
+ <cfg:EnableChecking>true</cfg:EnableChecking>
+ <cfg:MaxRevocationAge>0</cfg:MaxRevocationAge>
+ <cfg:ServiceOrder>
+ <cfg:Service>CRL</cfg:Service>
+ <cfg:Service>OCSP</cfg:Service>
+ </cfg:ServiceOrder>
+ <cfg:Archiving>
+ <cfg:EnableArchiving>false</cfg:EnableArchiving>
+ <cfg:ArchiveDuration>365</cfg:ArchiveDuration>
+ <cfg:Archive>
+ <cfg:DatabaseArchive>
+ <cfg:JDBCURL>jdbc:url</cfg:JDBCURL>
+ <cfg:JDBCDriverClassName>fully.qualified.classname</cfg:JDBCDriverClassName>
+ </cfg:DatabaseArchive>
+ </cfg:Archive>
+ </cfg:Archiving>
+ <cfg:CrlRetentionIntervals>
+ <cfg:CA>
+ <cfg:X509IssuerName>CN=a-sign-Premium-Sig-01,OU=a-sign-Premium-Sig-01,O=A-Trust Ges. f. Sicherheitssysteme im elektr. Datenverkehr GmbH,C=AT</cfg:X509IssuerName>
+ <cfg:Interval>12775</cfg:Interval>
+ </cfg:CA>
+ <cfg:CA>
+ <cfg:X509IssuerName>CN=a-sign-Premium-Sig-02,OU=a-sign-Premium-Sig-02,O=A-Trust Ges. f. Sicherheitssysteme im elektr. Datenverkehr GmbH,C=AT</cfg:X509IssuerName>
+ <cfg:Interval>12775</cfg:Interval>
+ </cfg:CA>
+ </cfg:CrlRetentionIntervals>
+ </cfg:RevocationChecking>
+ </cfg:CertificateValidation>
+ </cfg:SignatureVerification>
+</cfg:MOAConfiguration>
diff --git a/spss/handbook/conf/moa-spss/spss.config.xml b/spss/handbook/conf/moa-spss/spss.config.xml
new file mode 100644
index 000000000..020939891
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/spss.config.xml
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--MOA SPSS 1.4 Configuration File-->
+<cfg:MOAConfiguration xmlns:cfg="http://reference.e-government.gv.at/namespace/moaconfig/20021122#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
+ <cfg:SignatureCreation>
+ <cfg:KeyModules>
+ <cfg:SoftwareKeyModule>
+ <cfg:Id>SKM_Kunde1</cfg:Id>
+ <cfg:FileName>keys/customer1/moa-signaturdienst-kunde1[pwd=kunde1].p12</cfg:FileName>
+ <cfg:Password>kunde1</cfg:Password>
+ </cfg:SoftwareKeyModule>
+ <cfg:SoftwareKeyModule>
+ <cfg:Id>SKM_Kunde2</cfg:Id>
+ <cfg:FileName>keys/customer2/moa-signaturdienst-kunde2[pwd=kunde2].p12</cfg:FileName>
+ <cfg:Password>kunde2</cfg:Password>
+ </cfg:SoftwareKeyModule>
+ <cfg:SoftwareKeyModule>
+ <cfg:Id>SKM_allgemein</cfg:Id>
+ <cfg:FileName>keys/common/moa-signaturdienst-allekunden[pwd=allekunden].p12</cfg:FileName>
+ <cfg:Password>allekunden</cfg:Password>
+ </cfg:SoftwareKeyModule>
+ </cfg:KeyModules>
+ <cfg:KeyGroup>
+ <cfg:Id>KG_Kunde1</cfg:Id>
+ <cfg:Key>
+ <cfg:KeyModuleId>SKM_Kunde1</cfg:KeyModuleId>
+ <cfg:KeyCertIssuerSerial>
+ <dsig:X509IssuerName>CN=MOA Test CA,OU=EGIZ,O=TU Graz,C=AT</dsig:X509IssuerName>
+ <dsig:X509SerialNumber>17</dsig:X509SerialNumber>
+ </cfg:KeyCertIssuerSerial>
+ </cfg:Key>
+ </cfg:KeyGroup>
+ <cfg:KeyGroup>
+ <cfg:Id>KG_Kunde2</cfg:Id>
+ <cfg:Key>
+ <cfg:KeyModuleId>SKM_Kunde2</cfg:KeyModuleId>
+ <cfg:KeyCertIssuerSerial>
+ <dsig:X509IssuerName>CN=MOA Test CA,OU=EGIZ,O=TU Graz,C=AT</dsig:X509IssuerName>
+ <dsig:X509SerialNumber>18</dsig:X509SerialNumber>
+ </cfg:KeyCertIssuerSerial>
+ </cfg:Key>
+ </cfg:KeyGroup>
+ <cfg:KeyGroup>
+ <cfg:Id>KG_allgemein</cfg:Id>
+ <cfg:Key>
+ <cfg:KeyModuleId>SKM_allgemein</cfg:KeyModuleId>
+ <cfg:KeyCertIssuerSerial>
+ <dsig:X509IssuerName>CN=MOA Test CA,OU=EGIZ,O=TU Graz,C=AT</dsig:X509IssuerName>
+ <dsig:X509SerialNumber>19</dsig:X509SerialNumber>
+ </cfg:KeyCertIssuerSerial>
+ </cfg:Key>
+ </cfg:KeyGroup>
+ <cfg:KeyGroupMapping>
+ <cfg:KeyGroupId>KG_allgemein</cfg:KeyGroupId>
+ </cfg:KeyGroupMapping>
+ <cfg:KeyGroupMapping>
+ <cfg:CustomerId>
+ <dsig:X509IssuerName>CN=MOA Test CA Server,OU=EGIZ,O=TU Graz,C=AT</dsig:X509IssuerName>
+ <dsig:X509SerialNumber>0</dsig:X509SerialNumber>
+ </cfg:CustomerId>
+ <cfg:KeyGroupId>KG_Kunde1</cfg:KeyGroupId>
+ </cfg:KeyGroupMapping>
+ <cfg:KeyGroupMapping>
+ <cfg:CustomerId>
+ <dsig:X509IssuerName>CN=MOA Test CA Server,OU=EGIZ,O=TU Graz,C=AT</dsig:X509IssuerName>
+ <dsig:X509SerialNumber>1</dsig:X509SerialNumber>
+ </cfg:CustomerId>
+ <cfg:KeyGroupId>KG_Kunde2</cfg:KeyGroupId>
+ </cfg:KeyGroupMapping>
+ <cfg:XMLDSig>
+ <cfg:CanonicalizationAlgorithm>http://www.w3.org/TR/2001/REC-xml-c14n-20010315</cfg:CanonicalizationAlgorithm>
+ <cfg:DigestMethodAlgorithm>http://www.w3.org/2000/09/xmldsig#sha1</cfg:DigestMethodAlgorithm>
+ </cfg:XMLDSig>
+ </cfg:SignatureCreation>
+ <cfg:SignatureVerification>
+ <cfg:CertificateValidation>
+ <cfg:PathConstruction>
+ <cfg:AutoAddCertificates>true</cfg:AutoAddCertificates>
+ <cfg:UseAuthorityInformationAccess>true</cfg:UseAuthorityInformationAccess>
+ <cfg:CertificateStore>
+ <cfg:DirectoryStore>
+ <cfg:Location>certstore</cfg:Location>
+ </cfg:DirectoryStore>
+ </cfg:CertificateStore>
+ </cfg:PathConstruction>
+ <cfg:PathValidation>
+ <cfg:ChainingMode>
+ <cfg:DefaultMode>pkix</cfg:DefaultMode>
+ <cfg:TrustAnchor>
+ <cfg:Identification>
+ <dsig:X509IssuerName>CN=A-Trust-nQual-0,OU=A-Trust-nQual-0,O=A-Trust,C=AT</dsig:X509IssuerName>
+ <dsig:X509SerialNumber>536</dsig:X509SerialNumber>
+ </cfg:Identification>
+ <cfg:Mode>chaining</cfg:Mode>
+ </cfg:TrustAnchor>
+ </cfg:ChainingMode>
+ <cfg:TrustProfile>
+ <cfg:Id>Test-Signaturdienste</cfg:Id>
+ <cfg:TrustAnchorsLocation>trustProfiles/test</cfg:TrustAnchorsLocation>
+ </cfg:TrustProfile>
+ <cfg:TrustProfile>
+ <cfg:Id>CertifiedSignature</cfg:Id>
+ <cfg:TrustAnchorsLocation>trustProfiles/certifiedSignature</cfg:TrustAnchorsLocation>
+ </cfg:TrustProfile>
+ <cfg:TrustProfile>
+ <cfg:Id>CertifiedSignature+Test</cfg:Id>
+ <cfg:TrustAnchorsLocation>trustProfiles/certifiedSignature+Test</cfg:TrustAnchorsLocation>
+ </cfg:TrustProfile>
+ <cfg:TrustProfile>
+ <cfg:Id>SecureSignature</cfg:Id>
+ <cfg:TrustAnchorsLocation>trustProfiles/secureSignature</cfg:TrustAnchorsLocation>
+ </cfg:TrustProfile>
+ <cfg:TrustProfile>
+ <cfg:Id>SecureSignature-Qual-Only</cfg:Id>
+ <cfg:TrustAnchorsLocation>trustProfiles/secureSignature-qual-only</cfg:TrustAnchorsLocation>
+ </cfg:TrustProfile>
+ <cfg:TrustProfile>
+ <cfg:Id>SecureSignature+Test</cfg:Id>
+ <cfg:TrustAnchorsLocation>trustProfiles/secureSignature+Test</cfg:TrustAnchorsLocation>
+ </cfg:TrustProfile>
+ <cfg:TrustProfile>
+ <cfg:Id>IdentityLink</cfg:Id>
+ <cfg:TrustAnchorsLocation>trustProfiles/identityLink</cfg:TrustAnchorsLocation>
+ </cfg:TrustProfile>
+ <cfg:TrustProfile>
+ <cfg:Id>IdentityLink+Test</cfg:Id>
+ <cfg:TrustAnchorsLocation>trustProfiles/identityLink+Test</cfg:TrustAnchorsLocation>
+ </cfg:TrustProfile>
+ </cfg:PathValidation>
+ <cfg:RevocationChecking>
+ <cfg:EnableChecking>true</cfg:EnableChecking>
+ <cfg:MaxRevocationAge>0</cfg:MaxRevocationAge>
+ <cfg:ServiceOrder>
+ <cfg:Service>CRL</cfg:Service>
+ <cfg:Service>OCSP</cfg:Service>
+ </cfg:ServiceOrder>
+ <cfg:Archiving>
+ <cfg:EnableArchiving>false</cfg:EnableArchiving>
+ <cfg:ArchiveDuration>365</cfg:ArchiveDuration>
+ <cfg:Archive>
+ <cfg:DatabaseArchive>
+ <cfg:JDBCURL>jdbc:url</cfg:JDBCURL>
+ <cfg:JDBCDriverClassName>fully.qualified.classname</cfg:JDBCDriverClassName>
+ </cfg:DatabaseArchive>
+ </cfg:Archive>
+ </cfg:Archiving>
+ <cfg:CrlRetentionIntervals>
+ <cfg:CA>
+ <cfg:X509IssuerName>CN=a-sign-Premium-Sig-01,OU=a-sign-Premium-Sig-01,O=A-Trust Ges. f. Sicherheitssysteme im elektr. Datenverkehr GmbH,C=AT</cfg:X509IssuerName>
+ <cfg:Interval>12775</cfg:Interval>
+ </cfg:CA>
+ <cfg:CA>
+ <cfg:X509IssuerName>CN=a-sign-Premium-Sig-02,OU=a-sign-Premium-Sig-02,O=A-Trust Ges. f. Sicherheitssysteme im elektr. Datenverkehr GmbH,C=AT</cfg:X509IssuerName>
+ <cfg:Interval>12775</cfg:Interval>
+ </cfg:CA>
+ </cfg:CrlRetentionIntervals>
+ </cfg:RevocationChecking>
+ </cfg:CertificateValidation>
+ <cfg:PermitFileURIs>false</cfg:PermitFileURIs>
+ </cfg:SignatureVerification>
+</cfg:MOAConfiguration>
diff --git a/spss/handbook/conf/moa-spss/ss.minimum.config.xml b/spss/handbook/conf/moa-spss/ss.minimum.config.xml
new file mode 100644
index 000000000..815ae8de6
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/ss.minimum.config.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--MOA SS 1.4 Configuration File-->
+<cfg:MOAConfiguration xmlns:cfg="http://reference.e-government.gv.at/namespace/moaconfig/20021122#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
+ <cfg:SignatureCreation>
+ <cfg:KeyModules>
+ <cfg:SoftwareKeyModule>
+ <cfg:Id>SKM_Kunde1</cfg:Id>
+ <cfg:FileName>keys/customer1/moa-signaturdienst-kunde1(pwd=kunde1).p12</cfg:FileName>
+ <cfg:Password>kunde1</cfg:Password>
+ </cfg:SoftwareKeyModule>
+ </cfg:KeyModules>
+ <cfg:KeyGroup>
+ <cfg:Id>KG_Kunde1</cfg:Id>
+ <cfg:Key>
+ <cfg:KeyModuleId>SKM_Kunde1</cfg:KeyModuleId>
+ <cfg:KeyCertIssuerSerial>
+ <dsig:X509IssuerName>CN=MOA Test CA,OU=EGIZ,O=TU Graz,C=AT</dsig:X509IssuerName>
+ <dsig:X509SerialNumber>17</dsig:X509SerialNumber>
+ </cfg:KeyCertIssuerSerial>
+ </cfg:Key>
+ </cfg:KeyGroup>
+ <cfg:KeyGroupMapping>
+ <cfg:CustomerId>
+ <dsig:X509IssuerName>CN=MOA Test CA Server,OU=EGIZ,O=TU Graz,C=AT</dsig:X509IssuerName>
+ <dsig:X509SerialNumber>0</dsig:X509SerialNumber>
+ </cfg:CustomerId>
+ <cfg:KeyGroupId>KG_Kunde1</cfg:KeyGroupId>
+ </cfg:KeyGroupMapping>
+ <cfg:XMLDSig>
+ <cfg:CanonicalizationAlgorithm>http://www.w3.org/TR/2001/REC-xml-c14n-20010315</cfg:CanonicalizationAlgorithm>
+ <cfg:DigestMethodAlgorithm>http://www.w3.org/2000/09/xmldsig#sha1</cfg:DigestMethodAlgorithm>
+ </cfg:XMLDSig>
+ </cfg:SignatureCreation>
+</cfg:MOAConfiguration>
diff --git a/spss/handbook/conf/moa-spss/sslKeys/server/moa-ssl-server.der b/spss/handbook/conf/moa-spss/sslKeys/server/moa-ssl-server.der
new file mode 100644
index 000000000..e0f78a82c
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/sslKeys/server/moa-ssl-server.der
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/sslKeys/server/moa-ssl-server[pwd=server].p12 b/spss/handbook/conf/moa-spss/sslKeys/server/moa-ssl-server[pwd=server].p12
new file mode 100644
index 000000000..f012d584e
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/sslKeys/server/moa-ssl-server[pwd=server].p12
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/sslKeys/tomcat/tomcat[pwd=server].keystore b/spss/handbook/conf/moa-spss/sslKeys/tomcat/tomcat[pwd=server].keystore
new file mode 100644
index 000000000..da42549d4
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/sslKeys/tomcat/tomcat[pwd=server].keystore
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/sslKeys/tomcat/trustedClients[pwd=clients].keystore b/spss/handbook/conf/moa-spss/sslKeys/tomcat/trustedClients[pwd=clients].keystore
new file mode 100644
index 000000000..bdc296cf4
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/sslKeys/tomcat/trustedClients[pwd=clients].keystore
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust-nQual-01.20040326-20070326.SerNo6632(CertifiedKeypair).cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust-nQual-01.20040326-20070326.SerNo6632(CertifiedKeypair).cer
new file mode 100644
index 000000000..8c434777e
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust-nQual-01.20040326-20070326.SerNo6632(CertifiedKeypair).cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust-nQual-01.20041201-20141201.SerNoe242.cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust-nQual-01.20041201-20141201.SerNoe242.cer
new file mode 100644
index 000000000..efa28178e
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust-nQual-01.20041201-20141201.SerNoe242.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cer
new file mode 100644
index 000000000..33e776369
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.A-Trust-nQual-01.20010427-20040427.SerNo006f[CertifiedKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.A-Trust-nQual-01.20010427-20040427.SerNo006f[CertifiedKeypair].cer
new file mode 100644
index 000000000..b7d4b08a6
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.A-Trust-nQual-01.20010427-20040427.SerNo006f[CertifiedKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0213[CertifiedKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0213[CertifiedKeypair].cer
new file mode 100644
index 000000000..289fc2198
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0213[CertifiedKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0218[CertifiedKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0218[CertifiedKeypair].cer
new file mode 100644
index 000000000..69de75609
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0218[CertifiedKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.der b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.der
new file mode 100644
index 000000000..3be7b6a06
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.der
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/EGIZ_Test_CA_-_Root.20070829-20180101.SerNo00.cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/EGIZ_Test_CA_-_Root.20070829-20180101.SerNo00.cer
new file mode 100644
index 000000000..ed5ba194c
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/EGIZ_Test_CA_-_Root.20070829-20180101.SerNo00.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/MOA_Test_CA.20070823-20131022.Serno01.cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/MOA_Test_CA.20070823-20131022.Serno01.cer
new file mode 100644
index 000000000..05a8b86f9
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/MOA_Test_CA.20070823-20131022.Serno01.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/a-sign-TEST-nQual-01a.20041117-20080630.SerNo00da8b.cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/a-sign-TEST-nQual-01a.20041117-20080630.SerNo00da8b.cer
new file mode 100644
index 000000000..32893db7f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/a-sign-TEST-nQual-01a.20041117-20080630.SerNo00da8b.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/mobilkom.A1-Signatur.20040326-20140326.SerNo6646[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/mobilkom.A1-Signatur.20040326-20140326.SerNo6646[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..06b40aa67
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/mobilkom.A1-Signatur.20040326-20140326.SerNo6646[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cer
new file mode 100644
index 000000000..7e9fd5b0b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cer
new file mode 100644
index 000000000..da38ce028
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust-nQual-01.20040326-20070326.SerNo6632(CertifiedKeypair).cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust-nQual-01.20040326-20070326.SerNo6632(CertifiedKeypair).cer
new file mode 100644
index 000000000..8c434777e
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust-nQual-01.20040326-20070326.SerNo6632(CertifiedKeypair).cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust-nQual-01.20041201-20141201.SerNoe242.cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust-nQual-01.20041201-20141201.SerNoe242.cer
new file mode 100644
index 000000000..efa28178e
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust-nQual-01.20041201-20141201.SerNoe242.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cer
new file mode 100644
index 000000000..33e776369
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust.A-Trust-nQual-01.20010427-20040427.SerNo006f[CertifiedKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust.A-Trust-nQual-01.20010427-20040427.SerNo006f[CertifiedKeypair].cer
new file mode 100644
index 000000000..b7d4b08a6
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust.A-Trust-nQual-01.20010427-20040427.SerNo006f[CertifiedKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0213[CertifiedKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0213[CertifiedKeypair].cer
new file mode 100644
index 000000000..289fc2198
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0213[CertifiedKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0218[CertifiedKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0218[CertifiedKeypair].cer
new file mode 100644
index 000000000..69de75609
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0218[CertifiedKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.der b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.der
new file mode 100644
index 000000000..3be7b6a06
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.der
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/mobilkom.A1-Signatur.20040326-20140326.SerNo6646.cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/mobilkom.A1-Signatur.20040326-20140326.SerNo6646.cer
new file mode 100644
index 000000000..06b40aa67
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/mobilkom.A1-Signatur.20040326-20140326.SerNo6646.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cer
new file mode 100644
index 000000000..7e9fd5b0b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cer
new file mode 100644
index 000000000..da38ce028
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test-signerCerts/Dr. Waltraut Kotschy.20070119-20120119.SerNo02de1c.cer b/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test-signerCerts/Dr. Waltraut Kotschy.20070119-20120119.SerNo02de1c.cer
new file mode 100644
index 000000000..592c96230
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test-signerCerts/Dr. Waltraut Kotschy.20070119-20120119.SerNo02de1c.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test-signerCerts/EGIZ_Administrator.20070829-20120829.SerNo00.cer b/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test-signerCerts/EGIZ_Administrator.20070829-20120829.SerNo00.cer
new file mode 100644
index 000000000..694e6828b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test-signerCerts/EGIZ_Administrator.20070829-20120829.SerNo00.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test-signerCerts/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cer b/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test-signerCerts/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cer
new file mode 100644
index 000000000..376d0753f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test-signerCerts/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test/EGIZ_Test_CA_-_Signaturdienst.20070829-20140101.SerNo02.cer b/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test/EGIZ_Test_CA_-_Signaturdienst.20070829-20140101.SerNo02.cer
new file mode 100644
index 000000000..277b6083a
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test/EGIZ_Test_CA_-_Signaturdienst.20070829-20140101.SerNo02.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cer b/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cer
new file mode 100644
index 000000000..376d0753f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test/a-sign-corporate-light-03-20051114-20151114.SerNo01aaed.der b/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test/a-sign-corporate-light-03-20051114-20151114.SerNo01aaed.der
new file mode 100644
index 000000000..5171276f4
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test/a-sign-corporate-light-03-20051114-20151114.SerNo01aaed.der
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/identityLink-signerCerts/Dr. Waltraut Kotschy-20070119-20120119.SerNo02de1c.der b/spss/handbook/conf/moa-spss/trustProfiles/identityLink-signerCerts/Dr. Waltraut Kotschy-20070119-20120119.SerNo02de1c.der
new file mode 100644
index 000000000..592c96230
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/identityLink-signerCerts/Dr. Waltraut Kotschy-20070119-20120119.SerNo02de1c.der
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/identityLink-signerCerts/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cer b/spss/handbook/conf/moa-spss/trustProfiles/identityLink-signerCerts/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cer
new file mode 100644
index 000000000..376d0753f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/identityLink-signerCerts/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/identityLink/Nikolaus-Schwab-BM-f-Inneres-20040219-20070219.SerNo5c39.der b/spss/handbook/conf/moa-spss/trustProfiles/identityLink/Nikolaus-Schwab-BM-f-Inneres-20040219-20070219.SerNo5c39.der
new file mode 100644
index 000000000..376d0753f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/identityLink/Nikolaus-Schwab-BM-f-Inneres-20040219-20070219.SerNo5c39.der
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/identityLink/a-sign-corporate-light-03-20051114-20151114.SerNo01aaed.der b/spss/handbook/conf/moa-spss/trustProfiles/identityLink/a-sign-corporate-light-03-20051114-20151114.SerNo01aaed.der
new file mode 100644
index 000000000..5171276f4
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/identityLink/a-sign-corporate-light-03-20051114-20151114.SerNo01aaed.der
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust-Qual-01.20041201-20141201.SerNoE243.cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust-Qual-01.20041201-20141201.SerNoE243.cer
new file mode 100644
index 000000000..f9fef65fc
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust-Qual-01.20041201-20141201.SerNoE243.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust-Qual-02.20041203-20141203.SerNoE248.cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust-Qual-02.20041203-20141203.SerNoE248.cer
new file mode 100644
index 000000000..36a442b89
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust-Qual-02.20041203-20141203.SerNoE248.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust-Qual-03.20080425-20180425.SerNoe694(SecureSignatureKeypair).cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust-Qual-03.20080425-20180425.SerNoe694(SecureSignatureKeypair).cer
new file mode 100644
index 000000000..ab9e0cd7d
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust-Qual-03.20080425-20180425.SerNoe694(SecureSignatureKeypair).cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20011130-20041130.SerNo01f6[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20011130-20041130.SerNo01f6[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..d361d919f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20011130-20041130.SerNo01f6[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20011215-20041215.SerNo021e[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20011215-20041215.SerNo021e[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..ad13d7b28
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20011215-20041215.SerNo021e[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo0291[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo0291[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..f9f27442b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo0291[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo210d[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo210d[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..b6f39e354
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo210d[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.der b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.der
new file mode 100644
index 000000000..3be7b6a06
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.der
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/EGIZ_Test_CA_-_Root.20070829-20180101.SerNo00.cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/EGIZ_Test_CA_-_Root.20070829-20180101.SerNo00.cer
new file mode 100644
index 000000000..ed5ba194c
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/EGIZ_Test_CA_-_Root.20070829-20180101.SerNo00.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/MOA_Test_CA.20070823-20131022.Serno01.cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/MOA_Test_CA.20070823-20131022.Serno01.cer
new file mode 100644
index 000000000..05a8b86f9
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/MOA_Test_CA.20070823-20131022.Serno01.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/a-sign-TEST-Qual-01a.20041117-20141117.SerNo00da88.cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/a-sign-TEST-Qual-01a.20041117-20141117.SerNo00da88.cer
new file mode 100644
index 000000000..cac44093a
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/a-sign-TEST-Qual-01a.20041117-20141117.SerNo00da88.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/mobilkom.A1-Signatur.20040326-20140326.SerNo6646[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/mobilkom.A1-Signatur.20040326-20140326.SerNo6646[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..06b40aa67
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/mobilkom.A1-Signatur.20040326-20140326.SerNo6646[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cer
new file mode 100644
index 000000000..7e9fd5b0b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cer
new file mode 100644
index 000000000..da38ce028
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust-Qual-01.20041201-20141201.SerNoE243[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust-Qual-01.20041201-20141201.SerNoE243[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..f9fef65fc
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust-Qual-01.20041201-20141201.SerNoE243[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust-Qual-02.20041203-20141203.SerNoE248[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust-Qual-02.20041203-20141203.SerNoE248[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..36a442b89
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust-Qual-02.20041203-20141203.SerNoE248[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust-Qual-03.20080425-20180425.SerNoe694(SecureSignatureKeypair).cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust-Qual-03.20080425-20180425.SerNoe694(SecureSignatureKeypair).cer
new file mode 100644
index 000000000..ab9e0cd7d
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust-Qual-03.20080425-20180425.SerNoe694(SecureSignatureKeypair).cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20011130-20041130.SerNo01f6[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20011130-20041130.SerNo01f6[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..d361d919f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20011130-20041130.SerNo01f6[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20011215-20041215.SerNo021e[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20011215-20041215.SerNo021e[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..ad13d7b28
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20011215-20041215.SerNo021e[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo0291[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo0291[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..f9f27442b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo0291[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo210d[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo210d[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..b6f39e354
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo210d[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust-Qual-01.20041201-20141201.SerNoE243.cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust-Qual-01.20041201-20141201.SerNoE243.cer
new file mode 100644
index 000000000..f9fef65fc
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust-Qual-01.20041201-20141201.SerNoE243.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust-Qual-02.20041203-20141203.SerNoE248.cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust-Qual-02.20041203-20141203.SerNoE248.cer
new file mode 100644
index 000000000..36a442b89
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust-Qual-02.20041203-20141203.SerNoE248.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust-Qual-03.20080425-20180425.SerNoe694(SecureSignatureKeypair).cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust-Qual-03.20080425-20180425.SerNoe694(SecureSignatureKeypair).cer
new file mode 100644
index 000000000..ab9e0cd7d
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust-Qual-03.20080425-20180425.SerNoe694(SecureSignatureKeypair).cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20011130-20041130.SerNo01f6[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20011130-20041130.SerNo01f6[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..d361d919f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20011130-20041130.SerNo01f6[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20011215-20041215.SerNo021e[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20011215-20041215.SerNo021e[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..ad13d7b28
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20011215-20041215.SerNo021e[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo0291[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo0291[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..f9f27442b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo0291[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo210d[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo210d[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..b6f39e354
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo210d[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.der b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.der
new file mode 100644
index 000000000..3be7b6a06
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.der
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/mobilkom.A1-Signatur.20040326-20140326.SerNo6646[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/mobilkom.A1-Signatur.20040326-20140326.SerNo6646[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..06b40aa67
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/mobilkom.A1-Signatur.20040326-20140326.SerNo6646[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cer
new file mode 100644
index 000000000..7e9fd5b0b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cer
new file mode 100644
index 000000000..da38ce028
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/test/EGIZ_Test_CA_-_Root.20070829-20180101.SerNo00.cer b/spss/handbook/conf/moa-spss/trustProfiles/test/EGIZ_Test_CA_-_Root.20070829-20180101.SerNo00.cer
new file mode 100644
index 000000000..ed5ba194c
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/test/EGIZ_Test_CA_-_Root.20070829-20180101.SerNo00.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/test/MOA_Test_CA.20070823-20131022.Serno01.cer b/spss/handbook/conf/moa-spss/trustProfiles/test/MOA_Test_CA.20070823-20131022.Serno01.cer
new file mode 100644
index 000000000..05a8b86f9
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/test/MOA_Test_CA.20070823-20131022.Serno01.cer
Binary files differ
diff --git a/spss/handbook/handbook.html b/spss/handbook/handbook.html
new file mode 100644
index 000000000..2497d7f70
--- /dev/null
+++ b/spss/handbook/handbook.html
@@ -0,0 +1,6 @@
+<html>
+ <head>
+ <meta http-equiv="refresh" content="0; URL=handbook/index.html">
+ </head>
+ <body><p><a href="handbook/index.html">Zum Handbuch ...</a></p></body>
+</html> \ No newline at end of file
diff --git a/spss/handbook/handbook/common/LogoBKA.png b/spss/handbook/handbook/common/LogoBKA.png
new file mode 100644
index 000000000..6a92647fd
--- /dev/null
+++ b/spss/handbook/handbook/common/LogoBKA.png
Binary files differ
diff --git a/spss/handbook/handbook/common/LogoMoa4c.3148x3545.jpg b/spss/handbook/handbook/common/LogoMoa4c.3148x3545.jpg
new file mode 100644
index 000000000..a5ba135ef
--- /dev/null
+++ b/spss/handbook/handbook/common/LogoMoa4c.3148x3545.jpg
Binary files differ
diff --git a/spss/handbook/handbook/common/LogoMoa4c.jpg b/spss/handbook/handbook/common/LogoMoa4c.jpg
new file mode 100644
index 000000000..a1102090b
--- /dev/null
+++ b/spss/handbook/handbook/common/LogoMoa4c.jpg
Binary files differ
diff --git a/spss/handbook/handbook/common/LogoMoaBw.jpg b/spss/handbook/handbook/common/LogoMoaBw.jpg
new file mode 100644
index 000000000..5a31e3e15
--- /dev/null
+++ b/spss/handbook/handbook/common/LogoMoaBw.jpg
Binary files differ
diff --git a/spss/handbook/handbook/common/MOA.css b/spss/handbook/handbook/common/MOA.css
new file mode 100644
index 000000000..81e0a3f8d
--- /dev/null
+++ b/spss/handbook/handbook/common/MOA.css
@@ -0,0 +1,300 @@
+body
+{
+ font-family: "Times New Roman", Times, serif;
+ font-size: medium;
+ font-weight: normal;
+ margin-left: 2.5em;
+ margin-right: 2.5em;
+}
+
+p
+{
+ margin-top: 0pt;
+ margin-bottom: 0.5em;
+ text-align: justify
+}
+
+pre
+{
+ font-family: "Courier New", monospace;
+ font-size: 90%;
+ background-color: #cccccc;
+ color: #000000;
+ margin-left:1.5%;
+ margin-right:1.5%;
+ margin-top: 1em;
+ margin-bottom: 1em;
+ border: #008000 none;
+}
+
+hr
+{
+ color: #000080;
+ background-color: #000080;
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+table.fixedWidth
+{
+ width: 97%;
+ margin-left:1.5%;
+ margin-right:1.5%;
+ margin-top: 1em;
+ margin-bottom: 1em;
+}
+
+
+table.varWidth
+{
+ margin-left:1.5%;
+ margin-top: 1em;
+ margin-bottom: 1em;
+}
+
+th
+{
+ text-align: left;
+}
+
+h1
+{
+ color: #000080;
+ text-align: left;
+ font-size: 167%;
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: normal
+}
+
+h2
+{
+ color: #000080;
+ font-size: 150%;
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: normal
+}
+
+h3
+{
+ color: #000080;
+ font-size: 133%;
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: normal
+}
+
+h4
+{
+ color: #000080;
+ font-size: 116%;
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: normal
+}
+
+h5
+{
+ color: #000080;
+ font-size: 100%;
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: normal
+}
+
+h6
+{
+ color: #000080;
+ font-size: 83%;
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: normal
+}
+
+code
+{
+ font-family: "Courier New", Courier, monospace;
+ font-size: 90%;
+ color: #000000
+}
+
+dd
+{
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+ text-align: justify
+
+}
+
+dt
+{
+ margin-top: 0.8em;
+ font-family: Arial, Helvetica, sans-serif;
+ color: #000080
+}
+
+ol
+{
+ margin-top: 0.5em;
+ margin-bottom: 0.5em
+}
+
+ol.alpha
+{
+ list-style-type: lower-alpha
+}
+
+li
+{
+ margin-top: 0.25em;
+ margin-bottom: 0.25em;
+ text-align: justify
+}
+
+a:hover
+{
+ color: #990000
+}
+
+
+.title
+{
+ text-align: left;
+ font-size: 167%;
+ color: #000080;
+ font-family: Arial, Helvetica, sans-serif;
+ margin-top: 0.4em;
+ margin-bottom: 0.4em
+}
+
+.subtitle
+{
+ text-align: left;
+ font-size: 133%;
+ color: #000080;
+ font-family: Arial, Helvetica, sans-serif;
+ margin-top: 0.4em;
+ margin-bottom: 0.4em
+}
+
+.glossaryTerm
+{
+ font-style: italic;
+ color: #006699
+}
+
+.example
+{
+ font-family: "Courier New", monospace;
+ background-color: #CCFFFF;
+ color: #000000;
+ margin: 0pt 0pt;
+ border: #008000 none
+}
+
+.schema
+{
+ font-family: "Courier New", monospace;
+ background-color: #FFFFCC;
+ color: #000000;
+ margin: 0pt 0pt;
+ border: #008000 none
+}
+
+.documentinfo
+{
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 100%;
+}
+
+.ol-contents
+{
+ font-size: 100%;
+ margin-top: 0.0em;
+ margin-bottom: 0.0em;
+}
+
+.li-contents
+{
+ font-size: 100%;
+ margin-top: 0.0em;
+ margin-bottom: 0.0em;
+}
+
+.logoTitle
+{
+ text-align: center;
+ font-size: 133%;
+ color: #000080;
+ font-family: Arial, Helvetica, sans-serif;
+}
+
+.logoTable
+{
+ margin-bottom: 0px;
+ margin-left: 0px
+}
+
+.superscript
+{
+ vertical-align: super;
+ font-size: 66%;
+}
+
+.term
+{
+ font-style: italic;
+}
+
+.comment
+{
+ color: #000000;
+ background: #ffff00;
+ font-style: italic
+}
+
+.addedErrata12
+{
+ color: #FF0000;
+ background-color: #FFEEEE;
+ text-decoration: underline
+}
+
+.deletedErrata12
+{
+ color: #999999;
+ background-color: #EEEEEE;
+ text-decoration: line-through
+}
+
+.added12
+{
+ color: #FF0000;
+ text-decoration: underline
+; background-color: #F8F0FF
+}
+
+.deleted12
+{
+ color: #999999;
+ text-decoration: line-through
+; background-color: #f8f0ff
+}
+
+.rfc2119Keyword
+{
+ font-variant: small-caps;
+ font-style: normal;
+}
+
+.remark { font-style: italic}
+
+li.faq
+{
+ margin-top: 1.5em;
+ margin-bottom: 1.5em;
+}
+
+.faq-question
+{
+ color: #000080;
+ font-size: 100%;
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: normal;
+ margin-bottom: 0.4em;
+}
diff --git a/spss/handbook/handbook/config/MOA-SPSS-config-1.4.7.xsd b/spss/handbook/handbook/config/MOA-SPSS-config-1.4.7.xsd
new file mode 100644
index 000000000..ce1dd3747
--- /dev/null
+++ b/spss/handbook/handbook/config/MOA-SPSS-config-1.4.7.xsd
@@ -0,0 +1,268 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ MOA SP/SS 1.4.7 Configuration Schema
+-->
+<xs:schema targetNamespace="http://reference.e-government.gv.at/namespace/moaconfig/20021122#" elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:config="http://reference.e-government.gv.at/namespace/moaconfig/20021122#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
+ <xs:element name="MOAConfiguration">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Common" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="HardwareCryptoModule" minOccurs="0" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Name" type="xs:string"/>
+ <xs:element name="SlotId" type="xs:string" minOccurs="0"/>
+ <xs:element name="UserPIN" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="SignatureCreation" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="KeyModules">
+ <xs:complexType>
+ <xs:choice maxOccurs="unbounded">
+ <xs:element name="HardwareKeyModule">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Id" type="xs:token"/>
+ <xs:element name="Name" type="xs:string"/>
+ <xs:element name="SlotId" type="xs:string" minOccurs="0"/>
+ <xs:element name="UserPIN" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="SoftwareKeyModule">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Id" type="xs:token"/>
+ <xs:element name="FileName" type="xs:string"/>
+ <xs:element name="Password" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="KeyGroup" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Id" type="xs:token"/>
+ <xs:sequence maxOccurs="unbounded">
+ <xs:element name="Key">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="KeyModuleId" type="xs:token"/>
+ <xs:element name="KeyCertIssuerSerial" type="dsig:X509IssuerSerialType"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="KeyGroupMapping" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="CustomerId" type="dsig:X509IssuerSerialType" minOccurs="0"/>
+ <xs:element name="KeyGroupId" type="xs:token" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="XMLDSig">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="CanonicalizationAlgorithm" type="xs:anyURI" minOccurs="0"/>
+ <xs:element name="DigestMethodAlgorithm" type="xs:anyURI" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="CreateTransformsInfoProfile" type="config:ProfileType" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="CreateSignatureEnvironmentProfile" type="config:ProfileType" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="SignatureVerification" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="CertificateValidation">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="PathConstruction">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="AutoAddCertificates" type="xs:boolean"/>
+ <xs:element name="UseAuthorityInformationAccess" type="xs:boolean"/>
+ <xs:element name="CertificateStore">
+ <xs:complexType>
+ <xs:choice>
+ <xs:element name="DirectoryStore">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Location" type="xs:token"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="PathValidation">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="ChainingMode">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="DefaultMode" type="config:ChainingModeType"/>
+ <xs:element name="TrustAnchor" minOccurs="0" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Identification" type="dsig:X509IssuerSerialType"/>
+ <xs:element name="Mode" type="config:ChainingModeType"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="TrustProfile" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Id" type="xs:token"/>
+ <xs:element name="TrustAnchorsLocation" type="xs:anyURI"/>
+ <xs:element name="SignerCertsLocation" type="xs:anyURI" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="RevocationChecking">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="EnableChecking" type="xs:boolean"/>
+ <xs:element name="MaxRevocationAge" type="xs:integer"/>
+ <xs:element name="ServiceOrder" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence minOccurs="1" maxOccurs="2">
+ <xs:element name="Service">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="OCSP"/>
+ <xs:enumeration value="CRL"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="Archiving">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="EnableArchiving" type="xs:boolean"/>
+ <xs:element name="ArchiveDuration" type="xs:nonNegativeInteger" minOccurs="0"/>
+ <xs:element name="Archive" minOccurs="0">
+ <xs:complexType>
+ <xs:choice>
+ <xs:element name="DatabaseArchive">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="JDBCURL" type="xs:anyURI"/>
+ <xs:element name="JDBCDriverClassName" type="xs:token"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="DistributionPoint" minOccurs="0" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="CAIssuerDN" type="xs:token"/>
+ <xs:choice maxOccurs="unbounded">
+ <xs:element name="CRLDP">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Location" type="xs:anyURI"/>
+ <xs:element name="ReasonCode" minOccurs="0" maxOccurs="unbounded">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="unused"/>
+ <xs:enumeration value="keyCompromise"/>
+ <xs:enumeration value="cACompromise"/>
+ <xs:enumeration value="affiliationChanged"/>
+ <xs:enumeration value="superseded"/>
+ <xs:enumeration value="cessationOfOperation"/>
+ <xs:enumeration value="certificateHold"/>
+ <xs:enumeration value="privilegeWithdrawn"/>
+ <xs:enumeration value="aACompromise"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="OCSPDP">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Location" type="xs:anyURI"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="CrlRetentionIntervals" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence maxOccurs="unbounded">
+ <xs:element name="CA">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="X509IssuerName" type="xs:string"/>
+ <xs:element name="Interval" type="xs:integer"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="VerifyTransformsInfoProfile" type="config:ProfileType" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="SupplementProfile" type="config:ProfileType" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="PermitFileURIs" type="xs:boolean" default="false" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:simpleType name="ChainingModeType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="chaining"/>
+ <xs:enumeration value="pkix"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:complexType name="ProfileType">
+ <xs:sequence>
+ <xs:element name="Id" type="xs:token"/>
+ <xs:element name="Location" type="xs:anyURI"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
diff --git a/spss/handbook/handbook/config/config.html b/spss/handbook/handbook/config/config.html
new file mode 100644
index 000000000..42684ccee
--- /dev/null
+++ b/spss/handbook/handbook/config/config.html
@@ -0,0 +1,1078 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+ <title>MOA SS und SP - Konfiguration</title>
+ <link rel="stylesheet" href="../common/MOA.css" type="text/css">
+</head>
+<body bgcolor="white" text="#000000" link="#990000" vlink="#666666" alink="#cc9966">
+ <table class="logoTable" width="100%" border="0" cellspacing="0" cellpadding="10">
+ <tr>
+ <td align="center" class="logoTitle" width="267"><img src="../common/LogoBKA.png" alt="Logo BKA" width="267" height="37" align="left"></td>
+ <td align="center" class="logoTitle">Open Source<br>
+ f&uuml;r das E-Government</td>
+ <td align="center" class="logoTitle" width="123"><img src="../common/LogoMoa4c.jpg" alt="Logo MOA" width="123" height="138" align="right"></td>
+ </tr>
+ </table>
+ <hr/>
+ <p class="title"><a href="../index.html">MOA: Serversignatur (SS) und Signaturpr&uuml;fung (SP), V 1.5.0</a></p>
+ <p class="subtitle">Konfiguration</p>
+ <hr/>
+ <h1>Inhalt</h1>
+ <ol>
+ <li>
+ <p><a href="#&#252;bersicht">&Uuml;bersicht</a></p>
+ <ol>
+ <li><a href="#&#252;bersicht_allgemeines">Allgemeines</a>
+ <ol>
+ <li><a href="#&#252;bersicht_allgemeines_namenskonventionen">Namenskonventionen</a></li>
+ </ol>
+ </li>
+ <li><a href="#&#252;bersicht_zentraledatei">Zentrale Konfigurationsdatei</a>
+ <ol>
+ <li><a href="#&#252;bersicht_zentraledatei_aktualisierung">Aktualisierung auf das Format von MOA SP/SS 1.3</a></li>
+ </ol>
+ </li>
+ <li><a href="#&#252;bersicht_bekanntmachung">Bekanntmachung der Konfigurationsdatei
+ </a>
+ <ol>
+ <li><a href="#&#252;bersicht_bekanntmachung_laufenderbetrieb">Aktualisierung der Konfiguration im laufenden Betrieb</a></li>
+ </ol>
+ </li>
+ <li><a href="#&#252;bersicht_logging">Konfiguration des Loggings</a></li>
+ </ol>
+ </li>
+ <li><a href="#konfigurationsparameter">Konfigurationsparameter</a>
+ <ol>
+ <li><a href="#konfigurationsparameter_allgemein">Allgemeines Parameter</a> <ol>
+ <li><a href="#konfigurationsparameter_allgemein_hardwarecryptomodule">Hardwarebasiertes Kryptographiemodul</a></li>
+ </ol>
+ </li>
+ <li><a href="#konfigurationsparameter_ss">Parameter f&uuml;r MOA SS</a> <ol>
+ <li><a href="#konfigurationsparameter_ss_keymodules">Schl&uuml;sselspeicher</a> <ol>
+ <li><a href="#konfigurationsparameter_ss_keymodules_hardwarekeymodule">Hardware-Schl&uuml;sselspeicher</a></li>
+ <li><a href="#konfigurationsparameter_ss_keymodules_softwarekeymodule">Software-Schl&uuml;sselspeicher</a></li>
+ </ol>
+ </li>
+ <li><a href="#konfigurationsparameter_ss_keygroup">Schl&uuml;sselgruppe</a></li>
+ <li><a href="#konfigurationsparameter_ss_keygroupmapping">Zuordnung von Schl&uuml;sselgruppen zu einem
+ Kunden</a></li>
+ <li><a href="#konfigurationsparameter_ss_xmldsig">Parameter f&uuml;r XML-Signaturen</a> </li>
+ <li><a href="#konfigurationsparameter_ss_createtransformsinfoprofile">Profil f&uuml;r Transformationen</a></li>
+ <li><a href="#konfigurationsparameter_ss_createsignatureenvironmentprofile">Profil f&uuml;r Signaturumgebung </a></li>
+ </ol>
+ </li>
+ <li><a href="#konfigurationsparameter_sp">Parameter f&uuml;r MOA SP</a> <ol>
+ <li><a href="#konfigurationsparameter_sp_certificatevalidation">Zertifikatsvalidierung</a> <ol>
+ <li><a href="#konfigurationsparameter_sp_certificatevalidation_pathconstruction">Konstruktion des Zertifikatspfads</a>
+ <ol>
+ <li><a href="#konfigurationsparameter_sp_certificatevalidation_pathconstruction_autoaddcertificates">Cachen von Zertifikaten</a></li>
+ <li><a href="#konfigurationsparameter_sp_certificatevalidation_pathconstruction_useauthorityinfoaccess">Auswertung der Zertifikatserweiterung <span class="term">Authority Information Access</span></a></li>
+ <li><a href="#konfigurationsparameter_sp_certificatevalidation_pathconstruction_certificatestore">Lokalisierung des Zertifikatsspeichers</a></li>
+ </ol>
+ </li>
+ <li><a href="#konfigurationsparameter_sp_certificatevalidation_pathvalidation">Valdierung des Zertifikatspfads</a>
+ <ol>
+ <li><a href="#konfigurationsparameter_sp_certificatevalidation_pathvalidation_chainingmode">G&uuml;ltigkeitsmodell f&uuml;r die Zertifikatskettenpr&uuml;fung</a></li>
+ <li><a href="#konfigurationsparameter_sp_certificatevalidation_pathvalidation_trustprofile">Vertrauensprofile</a></li>
+ </ol>
+ </li>
+ <li><a href="#konfigurationsparameter_sp_certificatevalidation_revocationchecking">Widerrufspr&uuml;fung</a>
+ <ol>
+ <li><a href="#konfigurationsparameter_sp_certificatevalidation_revocationchecking_enablechecking">Aktivieren
+ der Widerrufspr&uuml;fung</a></li>
+ <li><a href="#konfigurationsparameter_sp_certificatevalidation_revocationchecking_maxrevocationage">Maximales Alter der Widerrufsinformation</a></li>
+ <li><a href="#konfigurationsparameter_sp_certificatevalidation_revocationchecking_serviceorder">Reihenfolge der Widerrufsdienste</a></li>
+ <li><a href="#konfigurationsparameter_sp_certificatevalidation_revocationchecking_archiving">Archivierung von Widerrufsinformationen</a></li>
+ <li><a href="#konfigurationsparameter_sp_certificatevalidation_revocationchecking_distributionpoint">Manuelle
+ Konfiguration von Verteilungspunkten f&uuml;r Widerrufsinformationen</a></li>
+ </ol>
+ </li>
+ </ol>
+ </li>
+ <li><a href="#konfigurationsparameter_sp_verifytransformsinfoprofile">Profil f&uuml;r Transformationen</a></li>
+ <li><a href="#konfigurationsparameter_sp_supplementprofile">Profil f&uuml;r Erg&auml;nzungsobjekte</a></li>
+ <li><a href="#konfigurationsparameter_sp_permitfileuris">file-URIs</a></li>
+ </ol>
+ </li>
+ </ol>
+ </li>
+ <li><a href="#beispielkonfigurationen">Beispielkonfigurationen</a>
+ <ol>
+ <li><a href="#beispielkonfigurationen_minss">Minimale Konfiguration f&uuml;r MOA SS</a></li>
+ <li><a href="#beispielkonfigurationen_minsp">Minimale Konfiguration f&uuml;r MOA SP</a></li>
+ <li><a href="#beispielkonfigurationen_typspss">Typische Konfiguration f&uuml;r MOA SP/SS</a></li>
+ </ol>
+ </li>
+ </ol>
+ <hr/>
+ <h1><a name="übersicht" id="übersicht"></a>1 &Uuml;bersicht </h1>
+ <p>Dieses Handbuch beschreibt detailliert die Konfigurationsm&ouml;glichkeiten f&uuml;r MOA SP/SS. Wenn nicht anders angegeben, beziehen sich die Erl&auml;uterungen sowohl auf die Konfiguration des Webservices als auch auf die Konfiguration von MOA SP/SS f&uuml;r den Einsatz als Klassenbibliothek.</p>
+ <h2><a name="&uuml;bersicht_allgemeines" id="&uuml;bersicht_allgemeines"></a>1.1 Allgemeines</h2>
+ <h3><a name="&uuml;bersicht_allgemeines_namenskonventionen" id="&uuml;bersicht_allgemeines_namenskonventionen"></a>1.1.1 Namenskonventionen </h3>
+ <p>Folgende Namenraum-Pr&auml;fixe werden in diesem Handbuch zur Kennzeichnung der Namenr&auml;ume
+ von XML-Elementen verwendet: </p>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <th scope="col">Pr&auml;fix</th>
+ <th scope="col">Namenraum</th>
+ </tr>
+ <tr>
+ <td><code>cfg</code></td>
+ <td><code>http://reference.e-government.gv.at/namespace/moaconfig/20021122#</code></td>
+ </tr>
+ <tr>
+ <td><code>dsig</code></td>
+ <td><code>http://www.w3.org/2000/09/xmldsig#</code></td>
+ </tr>
+ <tr>
+ <td>moa</td>
+ <td><code>http://reference.e-government.gv.at/namespace/moa/20020822#</code></td>
+ </tr>
+ <tr>
+ <td><code>xs</code></td>
+ <td><code>http://www.w3.org/2001/XMLSchema</code></td>
+ </tr>
+ </table>
+ <h2><a name="übersicht_zentraledatei" id="übersicht_zentraledatei"></a>1.2 Zentrale Konfigurationsdatei</h2>
+ <p>Die Konfiguration von MOA SP/SS erfolgt zentral &uuml;ber eine einzige Konfigurationsdatei. Das Format der Konfigurationsdatei ist XML und muss dem Schema <a href="./MOA-SPSS-config-1.4.7.xsd">MOA-SPSS-config-1.4.7.xsd</a> entsprechen. <a href="#konfigurationsparameter">Abschnitt 2</a> erl&auml;utert die Konfigurationsm&ouml;glichkeiten im Einzelnen.</p>
+ <h3><a name="&uuml;bersicht_zentraledatei_aktualisierung" id="&uuml;bersicht_zentraledatei_aktualisierung"></a>1.2.1
+ Aktualisierung auf das Format von MOA SP/SS 1.3</h3>
+ <p>Mit dem Wechsel auf Version 1.3 verwendet MOA SP/SS ein neues, &uuml;bersichtlicheres Format f&uuml;r die
+ XML-Konfigurationsdatei. </p>
+ <p>Wenn Sie von einer &auml;lteren Version von MOA SP/SS auf die Version 1.3 wechseln und Ihre bestehende
+ Konfiguration beibehalten wollen, steht Ihnen ein einfaches Kommandozeilenwerkzeug zur Verf&uuml;gung, mit dem
+ Sie Ihre Konfigurationsdatei vom bisherigen auf das neue Format migrieren k&ouml;nnen. </p>
+ <p>Dieses Werkzeug k&ouml;nnen Sie durch Ausf&uuml;hren des Scripts <code>configtool</code> aus dem Verzeichnis
+ <code>tools</code> im MOA-Installationsverzeichnis verwenden:</p>
+ <pre>configtool c:\pfad\zur\konfiguration\config.alt.xml c:\pfad\zur\konfiguration\config.neu.xml</pre>
+ <p>Der erste Parameter f&uuml;r das Script gibt also Pfad und Dateiname der bestehenden, alten Konfigurationsdatei
+ an, der zweite Parameter Pfad und Dateiname f&uuml;r die zu erzeugende Konfigurationsdatei im neuen Format (<span class="remark">Hinweis:
+ Die Beispielpfade beziehen sich auf Windows-Betriebssysteme; f&uuml;r Unix-Betriebssysteme w&auml;hlen Sie bitte sinngem&auml;&szlig;e
+ Pfade.</span>). </p>
+ <h2><a name="übersicht_bekanntmachung" id="übersicht_bekanntmachung"></a>1.3 Bekanntmachung der Konfigurationsdatei</h2>
+ <p>Die zentrale Konfigurationsdatei von MOA SP/SS wird der <span class="term">Java Virtual Machine</span>, in der MOA SP/SS l&auml;uft, durch eine <span class="term">System Property </span> mitgeteilt (wird beim Starten der <span class="term">Java Virtual Machine</span> in der Form <code>-D&lt;name&gt;=&lt;wert&gt;</code> gemacht). Der Name der <span class="term">System Property</span> lautet <code>moa.spss.server.configuration</code>; als Wert der <span class="term">System Property</span> ist der Pfad sowie der Name der Konfigurationsdatei im Dateisystem anzugeben, z.B.</p>
+ <pre>moa.spss.server.configuration=C:/Programme/apache/tomcat-4.1.30/conf/moa-spss/moa-spss.config.xml
+</pre>
+<p>Weitere Informationen zum Bekanntmachen der zentralen Konfigurationsdatei f&uuml;r MOA SP/SS erhalten Sie in <a href="../install/install.html#webservice_basisinstallation_installation_spssdeploy">Abschnitt 2.1.2.3</a> des Installationshandbuchs.</p>
+<h3><a name="übersicht_bekanntmachung_laufenderbetrieb" id="übersicht_bekanntmachung_laufenderbetrieb"></a>1.3.1
+ Aktualisierung der Konfiguration im laufenden Betrieb</h3>
+<p>Wird MOA SP/SS als Webservice eingesetzt, kann durch Aufrufen einer speziellen URL des Webservice ein erneutes Einlesen der Konfigurationsdatei erzwungen werden. Damit ist es m&ouml;glich, &Auml;nderungen an der Konfigurationsdatei vorzunehmen, und diese &Auml;nderungen ohne Neustart des zu Grunde liegenden Servlet Containers in den Betrieb zu &uuml;bernehmen.</p>
+<p>Weitere Informationen zum erneuten Einlesen der Konfigurationsdatei im Webservice-Betrieb erhalten Sie in <a href="../install/install.html#webservice_basisinstallation_installation_changeonthefly">Abschnitt 2.1.2.5</a> des Installationshandbuchs.</p>
+<h2><a name="übersicht_logging" id="übersicht_logging"></a>1.4 Konfiguration des Loggings</h2>
+ <p>MOA SP/SS verwendet als Framework f&uuml;r Logging-Information die Open Source Software <code>log4j</code>. Die Konfiguration der Logging-Information erfolgt nicht direkt durch MOA SP/SS, sondern &uuml;ber eine eigene Konfigurationsdatei, die der <span class="term">Java Virtual Machine</span> durch eine <span class="term">System Property </span> mitgeteilt wird. Der Name der <span class="term">System Property </span> lautet <code>log4j.configuration</code>; als Wert der <span class="term">System Property </span> ist eine URL anzugeben, die auf die <code>log4j</code>-Konfigurationsdatei verweist, z.B.</p>
+ <p>
+ <pre>log4j.configuration=file:/C:/Programme/apache/tomcat-4.1.30/conf/moa-spss/log4j.properties</pre>
+ Weitere Informationen zur Konfiguration des Loggings erhalten Sie in <a href="../install/install.html#webservice_basisinstallation_logging">Abschnitt 2.1.3</a> des Installationshandbuchs.
+<p></p>
+ <h1><a name="konfigurationsparameter"></a>2 Konfigurationsparameter</h1>
+ <p>Nachfolgend werden die verf&uuml;gbaren Konfigurationsparameter der zentralen Konfigurationsdatei im Detail erl&auml;utert. Die Reihenfolge der Abhandlung entspricht der Reihenfolge des vorgeschriebenen Auftretens in der Konfigurationsdatei. F&uuml;r beispielhafte Konfigurationsdateien siehe <a href="#beispielkonfigurationen">Abschnitt 3</a>. </p>
+ <p>Muss der Wert eines Konfigurationsparameters eine URL oder eine Pfadangabe sein, und wird als konkreter Wert eine relative URL bzw. ein relativer Pfad angegeben, so wird diese Angabe relativ zum Pfad jenes Verzeichnisses interpretiert, in dem die zentrale Konfigurationsdatei gespeichert ist.</p>
+ <h2><a name="konfigurationsparameter_allgemein" id="konfigurationsparameter_allgemein"></a>2.1
+ Allgemeine Parameter</h2>
+ <h3><a name="konfigurationsparameter_allgemein_hardwarecryptomodule" id="konfigurationsparameter_allgemein_hardwarecryptomodule"></a>2.1.1 Hardwarebasiertes Kryptographiemodul</h3>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:Common/cfg:HardwareCryptoModule</code></td>
+ </tr>
+ <tr>
+ <td> Gebrauch</td>
+ <td>Null mal bis unbeschr&auml;nkt oft </td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p> Mit diesem Element wird MOA SP bzw. SS die Verf&uuml;gbarkeit eines Hardware-Kryptographiemoduls
+ mitgeteilt. Wird ein solches Hardware-Kryptographiemodul konfiguriert, versucht MOA SP/SS das
+ Hardware-Kryptographiemodul f&uuml;r die Verifikation des Signaturwerts (MOA SP) bzw. f&uuml;r die Berechnung
+ von Hashwerten (MOA SP und MOA SS) anstatt des standardm&auml;&szlig;ig konfigurierten Software-Kryptographiemoduls
+ zu verwenden. </p>
+ <p>Werden mehrere Hardware-Kryptographiemodule konfiguriert, pr&uuml;ft MOA SP/SS entsprechend
+ der Konfigurationsreihenfolge der Hardware-Kryptographiemodule, ob eines der Module die ben&ouml;tigte
+ Funktion (Hashwertberechnung, Siganturpr&uuml;fung) zur Verf&uuml;gung stellt. Verwendet wird das erste Hardware-Kryptographiemodul,
+ das ide ben&ouml;tigte Funktion zur Verf&uuml;gung stellen kann. </p>
+ <p>Das Element weist bis zu drei Kindelemente auf:</p>
+ <ul>
+ <li>Element <code>cfg:Name</code>: Dieses obligatorische Element vom Typ <code>xs:string</code> enth&auml;lt
+ den Dateinamen der DLL (Windows) oder der Shared-Library (Unix), welche die PKCS#11-Schnittstelle
+ zum Hardware-Kryptographiemodul implementiert; der Wert enth&auml;lt entweder einen Dateinamen
+ mit absoluter Pfadangabe oder einen Dateinamen ohne Pfadangabe. Im letzteren Fall wird der Dateiname
+ relativ zum Suchpfad des Betriebssystems interpretiert. </li>
+ <li>Element <code>cfg:SlotId</code>: Dieses optionale Element vom Typ <code>xs:string</code> gibt
+ des Slot der PKCS#11-Schnittstelle an, &uuml;ber den das Hardware-Kryptographiemodul von MOA
+ SP/SS angesprochen werden soll. Fehlt dieses Attribut, w&auml;hlt MOA SP/SS selbst einen Slot
+ aus der Liste der verf&uuml;gbaren Slots aus. </li>
+ <li>Element <code>cfg:UserPIN</code>: Dieses obligatorische Element vom Typ <code>xs:string</code> enth&auml;lt
+ den PIN-Code zur Freischaltung der Kryptographiefunktionen &uuml;ber die PKCS#11-Schnittstelle
+ des Hardware-Kryptographiemoduls. </li>
+ </ul></td>
+ </tr>
+ </table>
+ <h2><a name="konfigurationsparameter_ss" id="konfigurationsparameter_ss"></a>2.2 Parameter f&uuml;r MOA SS</h2>
+ <h3><a name="konfigurationsparameter_ss_keymodules" id="konfigurationsparameter_ss_keymodules"></a>2.2.1 Schl&uuml;sselspeicher</h3>
+ <h4><a name="konfigurationsparameter_ss_keymodules_hardwarekeymodule" id="konfigurationsparameter_ss_keymodules_hardwarekeymodule"></a>2.2.1.1 Hardware-Schl&uuml;sselspeicher</h4>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:SignatureCreation/cfg:KeyModules/cfg:HardwareKeyModule</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>Null mal bis unbeschr&auml;nkt oft; zumindest ein Hardware- (<code>cfg:HardwareKeyModule</code>) oder
+ Software-Schl&uuml;sselspeicher (<code>cfg:SoftwareKeyModule</code>) muss
+ jedoch vorhanden sein</td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p>Mit diesem Element wird MOA SS die Verf&uuml;gbarkeit eines Hardware-Schl&uuml;sselspeichers mitgeteilt. </p>
+ <p>Das Element weist bis zu vier Kindelemente auf:</p>
+ <ul>
+ <li>Element <code>cfg:Id</code>: Dieses obligatorische Element vom Typ <code>xs:token</code> enth&auml;lt
+ einen frei w&auml;hlbaren Identifikator f&uuml;r dieses Konfigurationselement, der innerhalb der
+ XML-Konfigurationsdatei eindeutig sein muss. Mit Hilfe dieses Identifikators wird im Konfigurationselement <code>cfg:SignatureCreation/cfg:KeyGroup</code> auf
+ dieses Konfigurationselement referenziert.</li>
+ <li> Element <code>cfg:Name</code>: Dieses obligatorische Element vom Typ <code>xs:string</code> enth&auml;lt
+ den Dateinamen der DLL (Windows) oder der Shared-Library (Unix), welche die PKCS#11-Schnittstelle
+ zum Hardware-Schl&uuml;sselspeicher implementiert; der Wert enth&auml;lt entweder einen Dateinamen
+ mit absoluter Pfadangabe oder einen Dateinamen ohne Pfadangabe. Im letzteren Fall wird der Dateiname
+ relativ zum Suchpfad des Betriebssystems interpretiert. </li>
+ <li>Element <code>cfg:SlotId</code>: Dieses optionale Element vom Typ <code>xs:string</code> gibt des
+ Slot der PKCS#11-Schnittstelle an, &uuml;ber den der Hardware-Schl&uuml;sselspeicher von MOA SS
+ angesprochen werden soll. Fehlt dieses Attribut, w&auml;hlt MOA SS selbst einen Slot aus der Liste
+ der verf&uuml;gbaren Slots aus. </li>
+ <li>Element <code>cfg:UserPIN</code>: Dieses obligatorische Element vom Typ <code>xs:string</code> enth&auml;lt
+ den PIN-Code zur Freischaltung der Schl&uuml;sselverwendung &uuml;ber die PKCS#11-Schnittstelle
+ des Hardware-Schl&uuml;sselspeichers. </li>
+ </ul> </td>
+ </tr>
+ </table>
+ <h4><a name="konfigurationsparameter_ss_keymodules_softwarekeymodule" id="konfigurationsparameter_ss_keymodules_softwarekeymodule"></a>2.2.1.2
+ Software-Schl&uuml;sselspeicher</h4>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:SignatureCreation/cfg:KeyModules/cfg:SoftwareKeyModule</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>Null mal bis unbeschr&auml;nkt oft; zumindest ein Hardware- (<code>cfg:HardwareKeyModule</code>) oder
+ Software-Schl&uuml;sselspeicher (<code>cfg:SoftwareKeyModule</code>) muss jedoch vorhanden sein</td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p>Mit diesem Element wird MOA SS die Verf&uuml;gbarkeit eines Software-Schl&uuml;sselspeichers in
+ Form einer PKCS#12-Datei mitgeteilt. </p>
+ <p>Das Element weist drei obligatorische Kindelemente auf:</p>
+ <ul>
+ <li>Element <code>cfg:Id</code>: Dieses Element vom Typ <code>xs:token</code> enth&auml;lt einen
+ frei w&auml;hlbaren Identifikator f&uuml;r dieses Konfigurationselement, der innerhalb der XML-Konfigurationsdatei
+ eindeutig sein muss. Mit Hilfe dieses Identifikators wird im Konfigurationselement <code>cfg:SignatureCreation/cfg:KeyGroup</code> auf
+ dieses Konfigurationselement referenziert.</li>
+ <li> Element <code>cfg:Filename</code>: Dieses Element vom Typ <code>xs:string</code> enth&auml;lt
+ den Dateinamen der PKCS#12-Datei, die den Software-Schl&uuml;sselspeicher repr&auml;sentiert. Der
+ Wert enth&auml;lt einen Dateinamen mit absoluter oder relativer Pfadangabe. Eine relative Pfadangabe
+ wird von MOA SS relativ zum Pfad jenes Verzeichnisses interpretiert, in dem die zentrale Konfigurationsdatei
+ gespeichert ist.</li>
+ <li>Element <code>cfg:Password</code>: Dieses Element vom Typ <code>xs:string</code> enth&auml;lt
+ das Passwort zum Entschl&uuml;sseln der Inhalte der PKCS#12-Datei. </li>
+ </ul> </td>
+ </tr>
+ </table>
+ <h3><a name="konfigurationsparameter_ss_keygroup" id="konfigurationsparameter_ss_keygroup"></a>2.2.2 Schl&uuml;sselgruppe</h3>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:SignatureCreation/cfg:KeyGroup</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>einmal bis unbeschr&auml;nkt oft </td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p>Mit diesem Element wird in MOA SS eine Schl&uuml;sselgruppe definiert. Eine Schl&uuml;sselgruppe
+ ist eine Zusammenfassung von einem oder mehreren privaten Schl&uuml;sseln, die in Hardware- bzw. Softwareschl&uuml;sselspeichern
+ (vergleiche Abschnitte <a href="#konfigurationsparameter_ss_keymodules_hardwarekeymodule">2.2.1.1</a> bzw. <a href="#konfigurationsparameter_ss_keymodules_softwarekeymodule">2.2.1.2</a>)
+ verwaltet werden. Die Schl&uuml;sselgruppe wird vom Kunden von MOA SS &uuml;ber einen eindeutigen Bezeichner
+ im Request zur Signaturerstellung angesprochen. </p>
+ <p>Sinn der Zusammenfassung von mehreren privaten Schl&uuml;sseln zu einer Schl&uuml;sselgruppe ist
+ es, dass MOA SS selbst entscheidet, welcher konkrete Schl&uuml;ssel aus der Schl&uuml;sselgruppe
+ zur Erstellung der Signatur verwendet wird. Durch die somit m&ouml;gliche Parallelisierung (mehrere
+ private Schl&uuml;ssel werden parallel f&uuml;r Anfragen, die auf die gleiche Schl&uuml;sselgruppe
+ referenzieren) l&auml;sst sich der Durchsatz der erstellten Signaturen verbessern. </p>
+ <p>Das Element <code>cfg:SignatureCreation/cfg:KeyGroup</code> hat folgenden Element-Inhalt:</p>
+ <ul>
+ <li>Element <code>cfg:Id</code>: Dieses obligatorische Element vom Typ <code>xs:token</code> enth&auml;lt
+ einen frei w&auml;hlbaren Identifikator f&uuml;r dieses Konfigurationselement, der innerhalb der
+ XML-Konfigurationsdatei eindeutig sein muss. Mit Hilfe dieses Identifikators wird im Konfigurationselement <code>cfg:SignatureCreation/cfg:KeyGroupMapping</code> auf
+ dieses Konfigurationselement referenziert. Weiters wird dieser Identifikator im Request zur Erstellung
+ der Signatur verwendet, um die zu verwendende Schl&uuml;sselgruppe anzugeben.</li>
+ <li>Element <code>cfg:Key</code>: Dieses Element muss zumindest einmal vorkommen. Jedes Element beschreibt
+ einen der privaten Schl&uuml;ssel, aus denen sich die Schl&uuml;sselgruppe zusammensetzt. Das Element
+ hat folgenden Element-Inhalt:
+ <ul>
+ <li>Element <code>cfg:KeyModuleId</code>: Dieses Element kommt genau einmal vor. Mit ihm wird
+ auf einen der konfigurierten Hardware- oder Software-Schl&uuml;sselspeicher referenziert.
+ Sein Textinhalt vom Typ <code>xs:token</code> enth&auml;lt den Identifikator des Hardware-
+ oder Software-Schl&uuml;sselspeichers, so wie er in <code>cfg:SignatureCreation/cfg:KeyModules/cfg:HardwareKeyModule/cfg:Id</code> bzw. <code>cfg:SignatureCreation/cfg:KeyModules/cfg:SoftwareKeyModule/cfg:Id</code> festgelegt
+ wurde. </li>
+ <li>Element <code>cfg:KeyCertIssuerSerial</code>: Dieses Element kommt ebenfalls genau einmal
+ vor. Mit ihm wird ein privater Schl&uuml;ssel innerhalb des mit <code>cfg:KeyModuleId</code> ausgew&auml;hlten
+ Schl&uuml;sselspeichers ausgew&auml;hlt (sowohl Hardware- als auch Softwareschl&uuml;sselspeicher
+ k&ouml;nnen ja prinzipiell mehr als nur einen einzigen privaten Schl&uuml;ssel verwalten).
+ Das Element hat folgenden Element-Inhalt:
+ <ul>
+ <li>Element <code>dsig:X509IssuerName</code>: Dieses Element kommt genau einmal vor.
+ Sein Textinhalt vom Typ <code>xs:string</code> enth&auml;lt den Namen des Ausstellers
+ des Zertifikats f&uuml;r den ausgew&auml;hlten privaten Schl&uuml;ssel.</li>
+ <li>Element <code>dsig:X509SerialNumber</code>: Dieses Element kommt genau einmal vor.
+ Sein Textinhalt vom Typ <code>xs:integer</code> enth&auml;lt die Seriennummer des Zertifikats
+ f&uuml;r den ausgew&auml;hlten privaten Schl&uuml;ssel. </li>
+ </ul>
+ </li>
+ </ul>
+ </li>
+ </ul>
+ <p>Um auf einfache Weise f&uuml;r alle in Ihren Schl&uuml;sselspeichern enthaltenen privaten Schl&uuml;ssel
+ die jeweiligen Werte f&uuml;r <code>dsig:X509IssuerName</code> und <code>dsig:X509SerialNumber</code> zu
+ erhalten, gehen Sie am besten wie folgt vor:</p>
+ <ol>
+ <li>Erfassen Sie in der zentralen Konfigurationsdatei alle Ihre Schl&uuml;sselspeicher mit Hilfe
+ der Konfigurationselemente <code>cfg:SignatureCreation/cfg:KeyModules/cfg:HardwareKeyModule</code> bzw. <code>cfg:SignatureCreation/cfg:KeyModules/cfg:SoftwareKeyModule</code>. </li>
+ <li>Starten Sie nun - mit bewusst fehlenden <code>cfg:SignatureCreation/cfg:KeyGroup</code> Elementen - den MOA SP/SS Server.
+ Stellen Sie dabei sicher, dass das Log-Level f&uuml;r den Logger <code>moa.spss.server</code> zumindest
+ auf das Niveau <code>info</code> eingestellt ist (Informationen zur Konfiguration des Loggings
+ von MOA SP/SS finden Sie in <a href="../install/install.html#webservice_basisinstallation_logging">Abschnitt
+ 2.1.3</a> des Installationshandbuchs). Im Log-File werden dann alle verf&uuml;gbaren privaten Schl&uuml;ssel
+ an Hand der Werte <code>dsig:X509IssuerName</code> und <code>dsig:X509SerialNumber</code> aufgelistet.
+ Vergleichen Sie den folgenden beispielhaften Auszug:<br>
+ <pre>INFO | 15 15:10:14,737 | moa.spss.server | TID=startup NID=node1 MSG=Key <br> ID=SKM_Kunde1;CN=Test CA - Signaturdienste,OU=Technik und Standards,O=Stabstelle IKT-Strategie des Bundes,C=AT;7
+INFO | 15 15:10:14,737 | moa.spss.server | TID=startup NID=node1 MSG=Key
+ ID=SKM_allgemein;CN=Test CA - Signaturdienste,OU=Technik und Standards,O=Stabstelle IKT-Strategie des Bundes,C=AT;9<br>INFO | 15 15:10:14,737 | moa.spss.server | TID=startup NID=node1 MSG=Key <br> ID=SKM_Kunde2;CN=Test CA - Signaturdienste,OU=Technik und Standards,O=Stabstelle IKT-Strategie des Bundes,C=AT;8</pre>
+ Der Wert der Eigenschaft <code>ID</code> des Logging-Eintrags gliedert sich in drei Teile:
+ <ol>
+ <li>Der erste Teil enth&auml;lt den Identifikator des Hardware- bzw. Softwareschl&uuml;sselspeichers,
+ so wie er im entsprechenden Konfigurationselement <code>cfg:SignatureCreation/cfg:KeyModules/cfg:HardwareKeyModule</code> bzw. <code>cfg:SignatureCreation/cfg:KeyModules/cfg:SoftwareKeyModule</code> erfasst
+ wurde. </li>
+ <li>Der zweite Teil enth&auml;lt nach dem ersten Semikolon den Namen des Ausstellers des Zertifikats
+ f&uuml;r den privaten Schl&uuml;ssel, so wie er in <code>dsig:X509IssuerName</code> ben&ouml;tigt
+ wird. </li>
+ <li>Der dritte Teil enth&auml;lt nach dem zweiten Semikolon die Seriennummer des Zertifikats f&uuml;r
+ den privaten Schl&uuml;ssel, so wie er in <code>dsig:X509SerialNumber</code> ben&ouml;tigt wird. </li>
+ </ol>
+ </li>
+ <li>Erfassen Sie nun mit Hilfe der neu gewonnenen Informationen die Schl&uuml;sselgruppen, die in
+ MOA SS zur Verf&uuml;gung stehen sollen. </li>
+ </ol>
+ <p>Wenn Ihnen f&uuml;r einen privaten Schl&uuml;ssel, den Sie in eine Schl&uuml;sselgruppe aufnehmen
+ wollen, das Zertifikat bekannt ist und es in Form einer DER-kodierten Datei vorliegt, k&ouml;nnen
+ Sie alternativ das Script <code>certtool</code> aus dem Verzeichnis <code>tools</code> im MOA-Installationsverzeichnis
+ verwenden, um zu den Werten f&uuml;r <code>dsig:X509IssuerName</code> und <code>dsig:X509SerialNumber</code> zu
+ kommen: </p>
+ <pre>certtool -info &lt;certfilename&gt;</pre> <p><code>&lt;certfilename&gt;</code> enth&auml;lt den Namen der DER-kodierten Zertifikatsdatei, f&uuml;r
+ die die beiden Werte <code>dsig:X509IssuerName</code> und <code>dsig:X509SerialNumber</code> geliefert
+ werden sollen. Eine beispielhafte Ausgabe des Scripts sieht wie folgt aus: </p>
+ <pre>SubjectDN (RFC2253):
+ CN=Test: Signaturdienst aller Kunden: ECDSA (P192v1),OU=Technik und Standards,O=Stabsstelle IKT-Strategie des Bundes,C=AT
+IssuerDN (RFC2253) :
+ CN=Test CA - Signaturdienste,OU=Technik und Standards,O=Stabstelle IKT-Strategie des Bundes,C=AT<br>Serial Number :
+ 9</pre> <p>Die Werte f&uuml;r <code>IssuerDN (RFC2253)</code> sowie <code>Serial Number</code> entsprechen
+ den Werten f&uuml;r <code>dsig:X509IssuerName</code> und <code>dsig:X509SerialNumber</code>.</p></td>
+ </tr>
+ </table>
+ <h3><a name="konfigurationsparameter_ss_keygroupmapping" id="konfigurationsparameter_ss_keygroupmapping"></a>2.2.3
+ Zuordnung von Schl&uuml;sselgruppen zu Kunden</h3>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:SignatureCreation/cfg:KeyGroupMapping</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>einmal bis unbeschr&auml;nkt oft </td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p> Das Element <code>cfg:SignatureCreation/cfg:KeyGroupMapping</code> ordnet einem Kunden von MOA SS die ihm zur Verf&uuml;gung
+ stehenden Schl&uuml;sselgruppen zu, indem das den Kunden repr&auml;sentierende SSL-Clientzertifikat
+ mit einer oder mehreren Schl&uuml;sselgruppen assoziiert wird. </p>
+ <p>Das Element hat folgenden Element-Inhalt:</p>
+ <ul>
+ <li>Element <code>cfg:CustomerId</code>: Dieses Element bezeichnet auf eindeutige
+ Weise das den Kunden repr&auml;sentierende SSL-Clientzertifikat. Der Aufbau des Elements enspricht
+ dem Aufbau des Elements <code>cfg:KeyCertIssuerSerial</code> in Abschnitt <a href="#konfigurationsparameter_ss_keygroup">2.2.2</a>.
+ Um zu den Werten f&uuml;r Ausstellername und Seriennummer des SSL-Clientzertifikats zu kommen,
+ k&ouml;nnen Sie auch hier das Script <code>certtool</code> (vergleiche Abschnitt <a href="#konfigurationsparameter_ss_keygroup">2.2.2</a>)
+ verwenden. </li>
+ <li>Element <code>cfg:KeyGroupId</code>: Dieses Element vom Typ <code>xs:token</code> kommt so oft
+ vor, wie Schl&uuml;sselgruppen
+ einem bestimmten SSL-Clientzertifikat zugeordnet werden sollen, mindestens jedoch einmal. Sein
+ Wert repr&auml;sentiert dem Identifikator der Schl&uuml;sselgruppe, so wie er in <code>cfg:SignatureCreation/cfg:KeyGroup/cfg:Id</code> festgelegt
+ wurde. </li>
+ </ul>
+ <p class="remark">Bitte beachten Sie: F&uuml;r maximal ein Konfigurationselement <code>cfg:SignatureCreation/cfg:KeyGroupMapping</code> kann <code>cfg:CustomerId</code> auch
+ weggelassen werden. Die darin enthaltenen Schl&uuml;sselgruppen stehen dann allen Kunden von MOA
+ SS gleicherma&szlig;en zur Verf&uuml;gung.</p></td>
+ </tr>
+ </table>
+ <h3><a name="konfigurationsparameter_ss_xmldsig" id="konfigurationsparameter_ss_xmldsig"></a>2.2.4 Parameter
+ f&uuml;r XML-Signaturen </h3>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:SignatureCreation/cfg:XMLDSig/cfg:CanonicalizationAlgorithm</code></td>
+ </tr>
+ <tr>
+ <td> Gebrauch</td>
+ <td>Null mal oder einmal </td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p> Als Inhalt des Elements kann der Kanonisierungs-Algorithmus, der f&uuml;r das Erstellen von XML-Signaturen verwendet werden soll und in der Signatur als Inhalt von <code>dsig:Signature/dsig:SignedInfo/dsig:CanonicalizationMethod</code> aufscheint, spezifiziert werden. Folgende Werte d&uuml;rfen verwendet werden:</p>
+ <p>
+ <pre>http://www.w3.org/TR/2001/REC-xml-c14n-20010315 <br>http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments <br>http://www.w3.org/2001/10/xml-exc-c14n# <br>http://www.w3.org/2001/10/xml-exc-c14n#WithComments </pre>
+ <p></p> <p>Wird das Element nicht angegeben, wird folgender Wert als Default-Wert verwendet:</p>
+ <pre>http://www.w3.org/TR/2001/REC-xml-c14n-20010315 </pre> <p>F&uuml;r die genaue Bedeutung der Werte siehe die <a href="http://www.w3.org/TR/xmldsig-core/" target="_blank">Spezifikation f&uuml;r XML-Signaturen</a>.</p></td>
+ </tr>
+ </table>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:SignatureCreation/cfg:XMLDSig/cfg:DigestMethodAlgorithm</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>Null mal oder einmal </td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p> Als Inhalt des Elements kann der Digest-Algorithmus, der f&uuml;r das Erstellen von XML-Signaturen verwendet werden soll und in der Signatur als Inhalt von <code>dsig:Signature/dsig:SignedInfo/dsig:Reference/dsig:DigestMethod</code> aufscheint, spezifiziert werden. Folgende Werte d&uuml;rfen verwendet werden:</p>
+ <p>
+ <pre>http://www.w3.org/2000/09/xmldsig#sha1
+</pre>
+ <p></p>
+ <p>Wird das Element nicht angegeben, wird folgender Wert als Default-Wert verwendet:</p>
+ <pre>http://www.w3.org/2000/09/xmldsig#sha1</pre> <p>F&uuml;r die genaue Bedeutung der Werte siehe die <a href="http://www.w3.org/TR/xmldsig-core/" target="_blank">Spezifikation f&uuml;r XML-Signaturen</a>.</p></td>
+ </tr>
+ </table>
+ <h3><a name="konfigurationsparameter_ss_createtransformsinfoprofile" id="konfigurationsparameter_ss_createtransformsinfoprofile"></a>2.2.5 Profil f&uuml;r Transformationen</h3>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:SignatureCreation/cfg:CreateTransformsInfoProfile</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>Null mal bis unbeschr&auml;nkt oft</td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p>MOA SS erlaubt die Hinterlegung von vordefinierten Profilen f&uuml;r Transformationen, die im Rahmen
+ einer XML-Signaturerstellung zur Anwendung kommen sollen. Im Request zur XML-Signaturerstellung
+ reicht es dann aus, auf dieses Profil zu referenzieren, anstatt die gesamten Transformationen explizit
+ anzugeben. </p>
+ <p><code>cfg:CreateTransformsInfoProfile</code> enth&auml;lt f&uuml;r ein bestimmtes Datenobjekt
+ f&uuml;r eine zu erstellende XML-Signatur die auf dieses Datenobjekt anzuwendenden Transformationen,
+ sowie allenfalls f&uuml;r die Durchf&uuml;hrung der Transformationen notwendige Erg&auml;nzungsobjekte
+ (z.B. einen zu importierenden Stylesheet f&uuml;r eine XSL-Transformation).</p>
+ <p><code>cfg:CreateTransformsInfoProfile</code> weist folgende obligatorische Kindelemene auf: </p>
+ <ul>
+ <li>Element<code> Id</code>: Dieses Element<code></code> vom Typ <code>xs:token</code> enth&auml;lt einen frei
+ w&auml;hlbaren Identifikator f&uuml;r dieses Konfigurationselement, der innerhalb der XML-Konfigurationsdatei
+ eindeutig sein muss. Dieser Identifikator wird im Request zur Erstellung der XML-Signatur verwendet,
+ um das hinterlegte Profil zu referenzieren (vergleiche Element <code>moa:CreateTransformsInfoProfileID</code>). </li>
+ <li>Element<code></code> <code>Location</code>: Dieses Element<code></code> vom Typ <code>xs:anyURI</code> enth&auml;lt
+ den Namen der XML-Datei, die das hinterlegte Profil beinhaltet. Der Wert enth&auml;lt eine relative
+ oder absolute URI. Eine relative URI
+ wird von MOA SS als File-URI relativ zum Lage jenes Verzeichnisses interpretiert, in dem die zentrale
+ Konfigurationsdatei gespeichert ist. Die XML-Datei muss als Wurzelelement das Element<code> moa:CreateTransformsInfoProfile
+ </code>enthalten.</li>
+ </ul> </td>
+ </tr>
+ </table>
+ <h3><a name="konfigurationsparameter_ss_createsignatureenvironmentprofile" id="konfigurationsparameter_ss_createsignatureenvironmentprofile"></a>2.2.6 Profil f&uuml;r Signaturumgebung </h3>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:SignatureCreation/cfg:CreateSignatureEnvironmentProfile</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>Null mal bis unbeschr&auml;nkt oft</td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p>MOA SS erlaubt die Hinterlegung von vordefinierten Profilen f&uuml;r die Signaturumgebung,
+ die im Rahmen einer XML-Signaturerstellung zur Anwendung kommen soll. Im Request zur XML-Signaturerstellung
+ reicht es dann aus, auf dieses Profil zu referenzieren, anstatt die Informationen zur Signaturumgebung
+ explizit anzugeben. </p>
+ <p><code>cfg:CreateSignatureEnvironmentProfile</code> enth&auml;lt f&uuml;r eine zu erstellende XML-Signatur,
+ die in ein bereits bestehendes XML-Dokument integriert werden soll, die Stelle, an der die XML-Signatur
+ eingef&uuml;gt werden soll, sowie allenfalls f&uuml;r die Verarbeitung des bestehenden XML-Dokuments
+ notwendige Erg&auml;nzungsobjekte (z.B. ein XML-Schema f&uuml;r das validierende Parsen des bestehenden
+ XML-Dokuments).</p>
+ <p><code>cfg:</code><code>CreateSignatureEnvironmentProfile</code> weist folgende obligatorische Kindelemene
+ auf: </p>
+ <ul>
+ <li>Element<code> Id</code>: Dieses Element<code></code> vom Typ <code>xs:token</code> enth&auml;lt
+ einen frei w&auml;hlbaren Identifikator f&uuml;r dieses Konfigurationselement, der innerhalb der
+ XML-Konfigurationsdatei eindeutig sein muss. Dieser Identifikator wird im Request zur Erstellung
+ der XML-Signatur verwendet, um das hinterlegte Profil zu referenzieren (vergleiche Element <code>moa:</code><code>CreateSignatureEnvironmentProfileID</code>). </li>
+ <li>Element<code></code> <code>Location</code>: Dieses Element<code></code> vom Typ <code>xs:anyURI</code> enth&auml;lt
+ den Namen der XML-Datei, die das hinterlegte Profil beinhaltet. Der Wert enth&auml;lt eine relative
+ oder absolute URI. Eine relative URI wird von MOA SS als File-URI relativ zum Lage jenes Verzeichnisses
+ interpretiert, in dem die zentrale Konfigurationsdatei gespeichert ist. Die XML-Datei muss als
+ Wurzelelement das Element<code> moa:CreateSignatureEnvironmentProfile </code>enthalten.</li>
+ </ul></td>
+ </tr>
+ </table>
+ <h2><a name="konfigurationsparameter_sp" id="konfigurationsparameter_sp"></a>2.3
+ Parameter f&uuml;r MOA SP </h2>
+ <h3> <a name="konfigurationsparameter_sp_certificatevalidation" id="konfigurationsparameter_sp_certificatevalidation"></a>2.3.1
+ Zertifikatsvalidierung</h3>
+ <h4><a name="konfigurationsparameter_sp_certificatevalidation_pathconstruction" id="konfigurationsparameter_sp_certificatevalidation_pathconstruction"></a>2.3.1.1
+ Konstruktion des Zertifikatspfads</h4>
+ <h5><a name="konfigurationsparameter_sp_certificatevalidation_pathconstruction_autoaddcertificates" id="konfigurationsparameter_sp_certificatevalidation_pathconstruction_autoaddcertificates"></a>2.3.1.1.1 Cachen von Zertifikaten </h5>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td> Name </td>
+ <td><code>cfg:SignatureVerification/cfg:CertificateValidation/cfg:PathConstruction/cfg:AutoAddCertificates</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>genau einmal</td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p> Der Inhalt dieses Elements vom Typ <code>xs:boolean</code> gibt an, ob Zertifikate, die in einer
+ zu pr&uuml;fenden
+ Signatur enthalten sind bzw. bei der Zertifikatspfaderstellung durch Auswertung der Zertifikatserweiterung <span class="term">Authority
+ Information Access</span> (siehe
+ auch Parameter <code>cfg:UseAuthorityInfoAccess</code>) aus dem Internet geladen werden, automatisch
+ in den lokalen Zertifikatsspeicher hinzugef&uuml;gt werden sollen.</p>
+ <p>Zul&auml;ssige Werte f&uuml;r diesen Parameter sind <code>true</code> oder <code>false</code>.</p>
+ </td>
+ </tr>
+ </table>
+ <h5><a name="konfigurationsparameter_sp_certificatevalidation_pathconstruction_useauthorityinfoaccess" id="konfigurationsparameter_sp_certificatevalidation_pathconstruction_useauthorityinfoaccess"></a>2.3.1.1.2 Auswertung
+ der Zertifikatserweiterung <span class="term">Authority Information Access</span>
+ </h5>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td> Name </td>
+ <td><code>cfg:SignatureVerification/cfg:CertificateValidation/cfg:PathConstruction/cfg:UseAuthorityInfoAccess</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>genau einmal</td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p> Der Inhalt dieses Elements vom Typ <code>xs:boolean</code> gibt an, ob die Zertifikatserweiterung <span class="term">Authority
+ Information Access</span> f&uuml;r die Zertifikatspfaderstellung verwendet werden soll. Wird der
+ Wert auf <code>true</code> gesetzt, dann setzt MOA auch den Parameter <code>cfg:AutoAddCertificate</code> automatisch
+ auf <code>true</code> und ignoriert den gegebenenfalls in der Konfigurationsdatei daf&uuml;r gesetzten
+ Wert. </p>
+ <p>Zul&auml;ssige Werte f&uuml;r diesen Parameter sind <code>true</code> oder <code>false</code>.</p></td>
+ </tr>
+ </table>
+ <h5><a name="konfigurationsparameter_sp_certificatevalidation_pathconstruction_certificatestore" id="konfigurationsparameter_sp_certificatevalidation_pathconstruction_certificatestore"></a>2.3.1.1.3 Lokalisierung
+ des Zertifikatsspeichers </h5>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td> Name </td>
+ <td><code>cfg:SignatureVerification/cfg:CertificateValidation/cfg:PathConstruction/cfg:CertificateStore/cfg:DirectoryStore/cfg:Location</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>genau einmal</td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p> Der Inhalt dieses Elements vom Typ <code>xs:token</code> gibt ein Verzeichnis im lokalen Dateisystem
+ an, das von MOA als lokaler Zertifikatsspeicher verwendet werden soll.
+Zul&auml;ssige Werte f&uuml;r diesen Parameter sind absolute oder relative Pfadangaben, wobei relative Pfadangaben
+als relativ zum Pfad jenes Verzeichnisses interpretiert werden, in dem die zentrale
+ Konfigurationsdatei gespeichert ist. Beispiele f&uuml;r zul&auml;ssige Werte lauten:</p>
+ <pre>C:/Programme/apache/tomcat-4.1.30/conf/moa-spss/certstore</pre>
+ <pre>certstore</pre></td>
+ </tr>
+ </table>
+ <h4><a name="konfigurationsparameter_sp_certificatevalidation_pathvalidation" id="konfigurationsparameter_sp_certificatevalidation_pathvalidation"></a>2.3.1.2
+ Valdierung des Zertifikatspfads</h4>
+ <h5><a name="konfigurationsparameter_sp_certificatevalidation_pathvalidation_chainingmode" id="konfigurationsparameter_sp_certificatevalidation_pathvalidation_chainingmode"></a>2.3.1.2.1 G&uuml;ltigkeitsmodell
+ f&uuml;r die Zertifikatskettenpr&uuml;fung</h5>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:SignatureVerification/cfg:CertificateValidation/cfg:PathValidation/cfg:ChainingMode</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>genau einmal </td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p> Dieses Element legt fest, ob MOA SP f&uuml;r die Pr&uuml;fung der G&uuml;ltigkeit
+ einer konstruierten Zertifikatskette das Kettenmodell aus ISIS-MTT oder das Schalenmodell aus dem PKIX
+ RFC 3280 verwenden soll. Es hat folgende Kindelemente:</p>
+ <ul>
+ <li><code>cfg:DefaultMode</code>: Dieses obligatorische Element gibt das Default-Modell f&uuml;r die Pr&uuml;fung
+ der G&uuml;ltigkeit einer konstruierten Zertifikatskette an. G&uuml;ltige Werte sind <code>chaining</code> (Kettenmodell)
+ oder <code>pkix</code> (Schalenmodell). </li>
+ <li><code>cfg:TrustAnchor</code>: Dieses Element kann beliebig oft (auch gar nicht) verwendet
+ werden, um f&uuml;r bestimmte Vertrauensanker (vergleiche n&auml;chsten Parameter <code>cfg:TrustProfile</code>)
+ Ausnahmen vom Default-Modell vorzugeben.
+ Das Element weist folgende Kindelemente auf:
+ <ul>
+ <li><code>cfg:Identification</code>: Dieses obligatorische Element identifiziert den Vertrauensanker,
+ f&uuml;r den ein bestimmtes Modell konfiguriert werden soll. Es entspricht vom Aufbau jenem
+ von <code>cfg:KeyCertIssuerSerial</code> in
+ Abschnitt <a href="#konfigurationsparameter_ss_keygroup">2.2.2</a>. Um zu den Werten f&uuml;r
+ Ausstellername und Seriennummer des Vertrauensankers zu kommen, k&ouml;nnen Sie auch hier
+ das Script <code>certtool</code> (vergleiche Abschnitt <a href="#konfigurationsparameter_ss_keygroup">2.2.2</a>)
+ verwenden. </li>
+ <li><code>cfg:Mode</code>: Dieses obligatorische Element vom Typ <code>xs:string</code> gibt
+ jenes Modell an, das von MOA SP f&uuml;r die
+ Pr&uuml;fung von konstruierten Zertifikatsketten zu verwenden ist, die im mittels <code>cfg:Identification/dsig:X509IssuerName</code> und <code>cfg:Identification/dsig:X509SerialNumber</code> angegebenen
+ Vertrauensanker m&uuml;nden. G&uuml;ltige Werte sind <code>chaining</code> (Kettenmodell)
+ oder <code>pkix</code> (Schalenmodell).</li>
+ </ul>
+ </li>
+ </ul> </td>
+ </tr>
+ </table>
+ <h5><a name="konfigurationsparameter_sp_certificatevalidation_pathvalidation_trustprofile" id="konfigurationsparameter_sp_certificatevalidation_pathvalidation_trustprofile"></a>2.3.1.2.2 Vertrauensprofile </h5>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:SignatureVerification/cfg:CertificateValidation/cfg:PathValidation/cfg:TrustProfile</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>einmal bis unbeschr&auml;nkt oft (zumindest ein Vertrauensprofil muss vorhanden sein) </td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p> Das Element <code>cfg:</code><code>TrustProfile</code> wird dazu verwendet, um in MOA SP ein Vertrauensprofil
+ f&uuml;r die Signaturpr&uuml;fung einzurichten. Ein Vertrauensprofil besteht aus einer Menge von Vertrauensankern
+ und einer optionalen Menge von explizit erlaubten Signatorzertifikaten. </p>
+ <p>Ein Vertrauensanker ist ein CA-Zertifikat, das explizit als vertrauensw&uuml;rdig eingestuft wird.
+ MOA SP versucht bei der Konstruktion einer Zertifikatskette, einen Pfad vom Signatorzertifikat bis
+ hin zu einem der konfigurierten Vertrauensanker zu finden. Gelingt dies, wird auch das Signatorzertifikat
+ als vertrauensw&uuml;rdig betrachtet, ansonsten nicht. </p>
+ <p>Wird neben der Menge von Vertrauensankern auch noch eine Menge von explizit erlaubten Signatorzertifikaten
+ angegeben, pr&uuml;ft MOA SP nicht nur, ob sich ein Pfad vom Signatorzertifikat zu einem konfigurierten
+ Vertrauensanker konstruieren l&auml;sst, sondern dar&uuml;ber hinaus auch noch, ob das Signatorzertifikat
+ aus der zu pr&uuml;fenden Signatur in der Menge der explizit erlaubten Signatorzertifikate vorkommt.
+ Explizit erlaubte Signatorzertifikate sollten Sie dann konfigurieren, wenn nicht allen von einer
+ als Vertrauensanker konfigurierten CA ausgestellten Zertifikaten vertraut werden soll, sondern nur
+ ganz bestimmten Zertifikaten dieser CA. </p>
+ <p>In MOA SP k&ouml;nnen beliebig viele solcher Vertrauensprofile konfiguriert werden. Der Kunde von
+ MOA SP gibt im Request zur Signaturpr&uuml;fung an, gegen welches Vertrauensprofil MOA SP die Zertifikatspr&uuml;fung
+ vornehmen soll.</p>
+ <p>Das Element <code>cfg:</code><code>TrustProfile</code> weist folgende Kindelemente
+ auf:</p>
+ <ul>
+ <li><code>Id</code>: Dieses obligatorische Element vom Typ <code>xs:token</code> enth&auml;lt einen
+ frei w&auml;hlbaren Identifikator f&uuml;r dieses Konfigurationselement, der innerhalb der XML-Konfigurationsdatei
+ eindeutig sein muss. Dieser Identifikator wird im Request zur Signaturpr&uuml;fung verwendet, um
+ das zu verwendende Vertrauensprofil auszuw&auml;hlen. </li>
+ <li>Element <code>TrustAnchorsLocation</code>: Dieses obligatorische Element vom Typ <code>xs:anyURI </code> enth&auml;lt
+ eine relative oder absolute URL, die ein Verzeichnis im lokalen Dateisystem referenziert.
+ Eine relative URL wird relativ zum Pfad jenes Verzeichnisses interpretiert, in dem die zentrale
+ Konfigurationsdatei gespeichert ist. Eine absolute URL muss als Protokoll-Teil <code>file</code> verwenden.
+ Das referenzierte Verzeichnis muss eine oder mehrere DER-kodierte Zertifikatsdateien beinhalten.
+ Jede Zertifikatsdatei repr&auml;sentiert einen Vertrauensanker. </li>
+ <li>Element <code>SignerCertsLocation</code>: Dieses optionale Element vom Typ <code>xs:anyURI </code> enth&auml;lt
+ eine relative oder absolute URL, die ein Verzeichnis im lokalen Dateisystem referenziert. Eine
+ relative URL wird relativ zum Pfad jenes Verzeichnisses interpretiert, in dem die zentrale Konfigurationsdatei
+ gespeichert ist. Eine absolute URL muss als Protokoll-Teil <code>file</code> verwenden. Das referenzierte
+ Verzeichnis muss eine oder mehrere DER-kodierte Zertifikatsdateien beinhalten. Jede Zertifikatsdatei
+ repr&auml;sentiert ein explizit erlaubtes Signatorzertifikat. </li>
+ </ul></td>
+ </tr>
+ </table>
+ <h4><a name="konfigurationsparameter_sp_certificatevalidation_revocationchecking" id="konfigurationsparameter_sp_certificatevalidation_revocationchecking"></a>2.3.1.3
+ Widerrufspr&uuml;fung</h4>
+ <h5><a name="konfigurationsparameter_sp_certificatevalidation_revocationchecking_enablechecking" id="konfigurationsparameter_sp_certificatevalidation_revocationchecking_enablechecking"></a>2.3.1.3.1 Aktivieren
+ der Widerrufspr&uuml;fung</h5>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td> Name </td>
+ <td><code> cfg:SignatureVerification/cfg:CertificateValidation/cfg:RevocationChecking/cfg:EnableChecking</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>genau einmal </td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p> Der Inhalt dieses Elements vom Typ <code>xs:boolean</code> gibt an, ob bei der Zertifikats&uuml;berpr&uuml;fung im Zuge einer Signaturpr&uuml;fung auch der
+ Zertifikatsstatus jedes einzelnen Zertifikats des gebildeten Zertifikatspfads &uuml;berpr&uuml;ft werden
+ soll. </p>
+ <p class="remark">Bitte beachten Sie: Die Widerrufspr&uuml;fung ist ein sehr wichtiger Schritt der
+ Zertifikats&uuml;berpr&uuml;fung und somit der Signaturpr&uuml;fung. Eine Deaktivierung sollte nur
+ in begr&uuml;ndeten Ausnahmef&auml;llen in Erw&auml;gung gezogen werden, z.B. f&uuml;r Testsituationen. </p>
+ <p>Zul&auml;ssige Werte f&uuml;r diesen Parameter sind <code>true</code> oder <code>false</code>.</p> </td>
+ </tr>
+ </table>
+ <h5><a name="konfigurationsparameter_sp_certificatevalidation_revocationchecking_maxrevocationage" id="konfigurationsparameter_sp_certificatevalidation_revocationchecking_maxrevocationage"></a>2.3.1.3.2
+ Maximales Alter der Widerrufsinformation </h5>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td> Name </td>
+ <td><code> cfg:SignatureVerification/cfg:CertificateValidation/cfg:RevocationChecking/cfg:MaxRevocationAge</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>genau einmal</td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p> Der Inhalt dieses Elements vom Typ <code>xs:integer</code> gibt an, wie aktuell eine ggf. lokal
+ gespeicherte Widerrufsinformation sein muss, damit sie von MOA SP als g&uuml;ltig angesehen wird. Ist
+ die lokal gespeicherte Widerrufsinformation nicht aktuell genug, wird sie von MOA SP erneut aus dem
+ Internet geladen.</p>
+ <p>Dieser Parameter wird nur ausgewertet, wenn die Widerrufspr&uuml;fung aktiviert ist (siehe Parameter <code>cfg:EnableChecking</code>). </p>
+ <p>Zul&auml;ssige Werte f&uuml;r diesen Parameter sind ganze Zahlen: </p>
+ <ul>
+ <li>Ein beliebiger negativer Wert bedeutet, dass eine Widerrufsinformation jedes Mal, wenn sie ben&ouml;tigt
+ wird, neu aus dem Internet geladen wird. </li>
+ <li>Der Wert <code>0</code> bedeutet, dass eine Widerrufsinformation dann neu geladen wird, wenn
+ das Datum im Feld <code>nextUpdate</code> der entsprechenden Widerrufsliste bereits &uuml;berschritten
+ ist.</li>
+ <li>Ein positiver Wert gibt gibt die Zeitspanne in Millisekunden an, nach der eine ggf. vorhandene
+ lokale Widerrufsinformation sp&auml;testens durch erneutes Laden aus dem Internet aktualisiert
+ wird.</li>
+ </ul> </td>
+ </tr>
+ </table>
+ <h5><a name="konfigurationsparameter_sp_certificatevalidation_revocationchecking_serviceorder" id="konfigurationsparameter_sp_certificatevalidation_revocationchecking_serviceorder"></a>2.3.1.3.3
+ Reihenfolge der Widerrufsdienste</h5>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td> Name </td>
+ <td><code> cfg:SignatureVerification/cfg:CertificateValidation/cfg:RevocationChecking/cfg:ServiceOrder</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>Null mal oder einmal </td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p> Dieses Element gibt an, in welcher Reihenfolge MOA SP die Widerrufsdienste f&uuml;r die Pr&uuml;fung des
+ Widerrufs f&uuml;r ein Zertifikat kontaktieren soll, wenn f&uuml;r das Zertifikat mehrere unterschiedliche Widerrufsdienste
+ (CRL, OCSP) verf&uuml;gbar sind. Das Element weist folgendes Kindelement auf: </p>
+ <ul>
+ <li><code>cfg:Service</code>: Dieses Element vom Typ <code>xs:token</code> muss genau ein oder zwei mal vorkommen. G&uuml;tlige Werte f&uuml;r den
+ Textinhalt des Elements sind <code>OCSP</code> und <code>CRL</code>. Damit kann entweder die Reihenfolge (CRL, OCSP) oder (OCSP,
+ CRL) festgelegt werden. Wird nur ein Element angegeben, so wird auch nur der jeweilige Dienst verwendet. </li>
+ </ul> <p>Wird das Element nicht angegeben, so lautet die von MOA SP dann verwendete Default-Reihenfolge (CRL,
+ OCSP).</p> </td>
+ </tr>
+ </table>
+ <h5><a name="konfigurationsparameter_sp_certificatevalidation_revocationchecking_archiving" id="konfigurationsparameter_sp_certificatevalidation_revocationchecking_archiving"></a>2.3.1.3.4
+ Archivierung von Widerrufsinformationen</h5>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td> Name </td>
+ <td><code> cfg:SignatureVerification/cfg:CertificateValidation/cfg:RevocationChecking/cfg:Archiving/cfg:EnableArchiving</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>genau einmal </td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p> Der Inhalt dieses Elements vom Typ <code>xs:boolean</code> gibt an, ob mittlerweile ung&uuml;ltig
+ gewordene (i.e. historische) CRL-Widerrufsinformationen von MOA SP archiviert werden soll. </p>
+ <p>Wird dieser
+ Parameter auf den Wert <code>true</code> gesetzt, muss auch der Parameter <code>cfg:Archive</code> (siehe
+ unten) angegeben werden. Zul&auml;ssige Werte f&uuml;r diesen Parameter sind <code>true</code> oder <code>false</code>.</p> </td>
+ </tr>
+ </table>
+
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:SignatureVerification/cfg:CertificateValidation/cfg:RevocationChecking/cfg:Archiving/cfg:ArchiveDuration</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>Null mal oder einmal </td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p> Dieses Element vom Typ <code>xs:nonNegativeInteger</code> gibt (in Tagen) an, wie lange Widerrufsinformationen
+ von MOA SP archiviert werden m&uuml;ssen. Das Element wird von MOA SP nur dann ausgewertet, wenn der
+ Konfigurationsparameter <code>cfg:EnableArchiving</code> auf
+ true gesetzt ist. </p>
+ <p>Wird das Element nicht angegeben, so verwendet MOA SP den Default-Wert von 365 Tagen.</p> </td>
+ </tr>
+ </table>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td> Name </td>
+ <td><code> cfg:SignatureVerification/cfg:CertificateValidation/cfg:RevocationChecking/cfg:Archiving/cfg:Archive</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>Null mal oder einmal </td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p>Dieses Element gibt an, welches Archiv MOA SP zur Archivierung von mittlerweile ung&uuml;ltig
+ gewordene (i.e. historische) CRL-Widerrufsinformationen verwenden soll, falls der Konfigurationsparameter <code>cfg:EnableArchiving</code> auf
+ <code>true</code> gesetzt ist. Es muss angegeben werden, wenn der
+ Konfigurationsparameter <code>cfg:EnableArchiving</code> auf true gesetzt ist. Das Element weist folgendes
+ Kindelement auf:</p>
+ <ul>
+ <li><code>cfg:DatabaseArchive</code>: Dieses obligatorische Element dient zur Angabe der notwendigen
+ Informationen f&uuml;r die Benutzung eines datenbankbasierten CRL-Archivs durch MOA SP. Das Datenbankarchiv
+ ist die einzige derzeit unterst&uuml;tzte Archivform. Das Element weist folgende Kindelemente auf:
+ <ul>
+ <li> <code>cfg:JDBCURL</code>: Dieses obligatorische Element vom Typ <code>xs:anyURI</code> gibt
+ die JDBC-URL zu jener Datenbank an, in der MOA historische Widerrufsinformationen archivieren
+ soll. Der genaue Aufbau der JDBC-URL ist abh&auml;ngig von der verwendeten Datenbank. Im Fall von
+ PostgreSQL kann folgende URL verwendet werden:
+ <pre>jdbc:postgresql://&lt;host&gt;/&lt;moadb&gt;?user=&lt;moauser&gt;&amp;amp;password=&lt;moapassword&gt;</pre>
+ <p> Die Platzhalter <code>&lt;host&gt;</code>, <code>&lt;moadb&gt;</code>, <code>&lt;moauser&gt;</code> und <code>&lt;moapassword&gt;</code> m&uuml;ssen
+ dabei an die tats&auml;chlich verwendete Datenbank angepasst werden.</p>
+ <p class="remark"> Bitte beachten Sie: Die Kodierung des Zeichens &quot;&amp;&quot; als "&amp;amp;" ist
+ erforderlich, da es andernfalls zu einem Validierungsfehler beim Parsen der XML-Konfigurationsdatei
+ durch MOA kommen w&uuml;rde.</p>
+ <p class="remark"> Bitte beachten Sie: MOA SP legt eigenst&auml;ndig eine passende Tabelle in der angegebenen
+ Datenbank an und bef&uuml;llt diese dann in weiterer Folge. Der in der JDBC-URL angegebene Benutzer
+ muss mit den dazu passenden Rechten ausgestattet sein. </p>
+ </li>
+ <li><p><code>cfg:JDBCDriverClassName</code>: Dieses obligatorische Element vom Typ <code>xs:token</code> gibt den
+ vollst&auml;ndig
+ qualifizierten Java-Klassennamen des JDBC-Treibers an, der von MOA SP zur Ansprache der f&uuml;r
+ die CRL-Archivierung zu verwendenden Datenbank ben&uuml;tzt werden soll.</p>
+ <p class="remark">Bitte beachten Sie: Informationen zum Anlegen einer Datenbank in postgreSQL finden Sie in <a href="../install/install.html#webservice_erweiterungsm&#246;glichkeiten_datenbank_postgresql">Abschnitt
+ 2.2.2.1</a> des Installationshandbuchs.</p>
+ </li>
+ </ul>
+ </li>
+ </ul> </td>
+ </tr>
+ </table>
+ <h5><a name="konfigurationsparameter_sp_certificatevalidation_revocationchecking_distributionpoint" id="konfigurationsparameter_sp_certificatevalidation_revocationchecking_distributionpoint"></a>2.3.1.3.5
+ Manuelle Konfiguration von Verteilungspunkten f&uuml;r Widerrufsinformationen</h5>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:SignatureVerification/cfg:CertificateValidation/cfg:RevocationChecking/cfg:DistributionPoint</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>Null mal bis unbeschr&auml;nkt oft </td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p> Das Element <code>cfg:</code><code>CRLDistributionPoint</code> kann dazu verwendet werden, manuelle
+ Verteilungspunkte f&uuml;r Widerrufsinformationen einer bestimmten CA zu konfigurieren. </p>
+ <p>Dies macht f&uuml;r veraltete Zertifikate Sinn, die nicht den aktuellen Vorgaben aus dem PKIX RFC 3280 entsprechen und im Zertifikat selbst keine Zertifikatserweiterung mit einem solchen Verteilungspunkt enthalten.</p>
+ <p>Weiters kann diese manuelle Konfiguration verwendet werden, wenn die in einem Zertifikat enthaltenen Verteilungspunkte f&uuml;r eine bestimmte CA durch einen manuellen Eintrag &uuml;berschrieben werden soll (etwa weil die im Zertifikat enthaltenen Verteilungspunkte in Form von ldap-URLs angegeben sind, MOA SP aber der Zugriff auf ldap-URLs per Firewall-Einstellungen untersagt ist; dann k&ouml;nnte man stattdessen manuell eine (lokale) http-URL als Verteilungspunkt angeben, die von MOA SP dann aufgel&ouml;st werden kann). </p>
+ <p>Das Element weist folgende Kind-Elemente auf:</p>
+ <ul>
+ <li>Element <code>cfg:CAIssuerDN</code>: Dieses Element enth&auml;lt als Textinhalt vom Typ <code>xs:string</code> den
+ Namen jener CA, die das Zertifikat ausgestellt hat, dessen Widerruf mit Hilfe des zu konfigurierenden
+ Verteilungspunktes gepr&uuml;ft werden soll. Um zu diesem Wert zu kommen, k&ouml;nnen Sie auch
+ hier das Script <code>certtool</code> (vergleiche Abschnitt<a href="#konfigurationsparameter_ss_keygroup"> 2.2.2</a>)
+ verwenden, in dem Sie es f&uuml;r das Zertifikat anwenden, dessen Widerruf mit Hilfe des zu konfigurierenden
+ Verteilungspunktes gepr&uuml;ft werden soll.</li>
+ <li>Element <code>cfg:CRLDP</code>: Dieses Element verweist auf einen Verteilungspunkt, an dem eine
+ Widerrufsliste abgeholt werden kann. Es weist folgende Kind-Elemente auf:
+ <ul>
+ <li>Element<code> cfg:Location</code>: Der Wert dieses obligatorischen Elements vom Typ<code> xs:anyURI</code> enth&auml;lt
+ die URL f&uuml;r den zu konfigurierenden Verteilungspunkt. Es werden die Protokolle HTTP, HTTPS
+ und LDAP unterst&uuml;tzt.</li>
+ <li>Element<code> cfg:ReasonCode</code>: Dieses Element vom Typ <code>xs:token</code> kann
+ null mal bis unbeschr&auml;nkt
+ oft vorkommen und enth&auml;lt
+ jeweils einen laut PKIX RFC 3280 m&ouml;glichen Grund eines Widerrufs,
+ f&uuml;r
+ welche die &uuml;ber den zu konfigurierenden Verteilungspunkt zu beziehende Widerrufsliste
+ ausgestellt ist. G&uuml;ltige Gr&uuml;nde sind <code>unused</code>, <code>keyCompromise</code>, <code>cACompromise</code>, <code>affiliationChanged</code>, <code>superseded</code>, <code>cessationOfOperation</code>, <code>certificateHold</code>, <code>privilegeWithdrawn</code> und <code>aACompromise</code>.
+ Wird eine Widerrufsliste f&uuml;r mehrere Gr&uuml;nde ausgestellt, muss also das Element <code>cfg:ReasonCode</code> mehrmals
+ angegeben werden. Wird das Element null mal angegeben, gilt der Verteilungspunkt f&uuml;r alle m&ouml;glichen
+ Widerrufsgr&uuml;nde.</li>
+ </ul>
+ </li>
+ <li>Element <code>cfg:OCSPDP</code>: Dieses Element verweist auf einen Verteilungspunkt, an dem die
+ Widerrufsinformation von einem OCSP-Responder bezogen werden kann. Es weist folgendes Kind-Element
+ auf:
+ <ul>
+ <li></li>
+ </ul>
+ Element<code> cfg:Location</code>: Der Wert dieses obligatorischen Elements vom Typ<code> xs:anyURI</code> enth&auml;lt
+ die URL f&uuml;r den zu konfigurierenden Verteilungspunkt. Es werden die Protokolle HTTP, HTTPS und
+ LDAP unterst&uuml;tzt.</li>
+ </ul>
+ <p>Hinweis: Die Elemente <code>cfg:CRLDP</code> bzw. <code>cfg:OSCPDP</code> k&ouml;nnen beliebig oft als Kinder von <code>cfg:CRLDistributionPoint</code> angegeben
+ werden. Die Reihenfolge spielt dabei keine Rolle. Jedenfalls muss aber eines dieser beiden Elemente
+ angegeben werden. </p></td>
+ </tr>
+ </table>
+
+<h5><a name="konfigurationsparameter_sp_certificatevalidation_revocationchecking_crlretention" id="konfigurationsparameter_sp_certificatevalidation_revocationchecking_crlretention"></a>2.3.1.3.6
+ Konfiguration CRL Retention Intervallen </h5>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:SignatureVerification/cfg:CertificateValidation/cfg:RevocationChecking/cfg:CrlRetentionIntervals</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>Null oder einmal </td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p>Das Element <code>cfg:</code><code>CrlRetentionIntervals</code> kann
+ dazu verwendet werden, um Retention Intervalle f&uuml;r bestimmte CAs zu
+ konfigurieren. <br />
+ Gem&auml;ß <a href="http://www.ietf.org/rfc/rfc5280.txt" target="_blank">RFC 5280</a>
+ muss ein widerrufenes Zertifikat solange auf Widerrufslisten
+ aufscheinen, bis das Zertifikat abgelaufen ist und noch eine CRL-Periode
+ dar&uuml;ber hinaus. Auf allen weiteren CRLs muss das Zertifikat nicht mehr
+ gef&uuml;hrt werden. Daraus folgt, dass MOA SP f&uuml;r abgelaufene Zertifikate in
+ der Regel keine CRL-Statusabfrage durchf&uuml;hren kann, da nicht sichergestellt
+ ist, dass eine aktuell geladene Widerrufssliste f&uuml;r derartige
+ Zertifikate noch adeqaute Widerrufsinformationen enth&auml;lt. <br />
+ Garantiert eine CA jedoch, dass widerrufene Zertifikate noch &uuml;ber deren
+ Ablauf hinaus auf der Widerrufsliste gef&uuml;hrt werden, so kann f&uuml;r diese
+ CA ein Retention Intervall definiert werden. <p />
+ Das <code>cfg:</code><code>CrlRetentionIntervals</code> Element weist folgendes Kind-Element auf:</p>
+ <ul>
+<li>Element <code>cfg:CA</code>: Dieses Element legt ein Retention Intervall f&uuml;r eine CA fest und kann beliebig oft vorkommen. Es weist folgende Kind-Elemente auf:</li>
+<ul>
+<li>Element <code>cfg:X509IssuerName</code>: Dieses Element vom Typ <code>xs:string</code> muss einmal vorkommen und definiert die entsprechende CA &uuml;ber einen RFC2253 String. Das (im folgenden Element) festgelegte Intervall wird f&uuml;r alle Widerrufslisten, die von dieser CA ausgestellt werden, verwendet.</li></li>
+<li>Element <code>cfg:Interval</code>: Dieses Element vom Typ <code>xs:integer</code> muss einmal vorkommen und enth&auml;lt das Retention Intervall. Es gibt den Zeitraum in Tagen an, &uuml;ber
+den widerrufene Zertifikate &uuml;ber deren Ablauf hinaus auf Widerrufslisten gef&uuml;hrt werden.
+Wird der Wert auf -1 gesetzt, dann bedeutet das ein unendlich langes Intervall. In diesem Fall wird ein widerrufenes Zertifikat niemals von den Widerrufslisten entfernt.<br />
+</ul>
+</ul>
+ </td>
+ </tr>
+ </table>
+
+
+ <h3><a name="konfigurationsparameter_sp_verifytransformsinfoprofile" id="konfigurationsparameter_sp_verifytransformsinfoprofile"></a>2.3.2 Profil f&uuml;r Transformationen</h3>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:SignatureVerification/cfg:VerifyTransformsInfoProfile</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>Null mal bis unbeschr&auml;nkt oft</td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p>MOA SP erlaubt die Hinterlegung eines vordefinierten Profils f&uuml;r eine erlaubte Transformationsfolge,
+ deren Einhaltung im Rahmen einer XML-Signaturpr&uuml;fung kontrolliert wird. Im Request
+ zur XML-Signaturpr&uuml;fung reicht es dann aus, auf dieses Profil zu referenzieren, anstatt die
+ gesamten Transformationen explizit anzugeben. </p>
+ <p><code>cfg:VerifyTransformsInfoProfile</code> enth&auml;lt f&uuml;r ein bestimmtes Datenobjekt f&uuml;r
+ eine zu pr&uuml;fende XML-Signatur eine
+ f&uuml;r dieses Datenobjekt erlaubte Transformationsfolge, bestehend aus den anzuwendenden Transformationen,
+ sowie allenfalls f&uuml;r die Durchf&uuml;hrung der Transformationen erlaubte implizite Transformationsparameter
+ (z.B. einen zu importierenden Stylesheet f&uuml;r eine XSL-Transformation).</p>
+ <p><code>cfg:</code><code>VerifyTransformsInfoProfile</code> weist folgende obligatorische Kindelemene
+ auf: </p>
+ <ul>
+ <li>Element<code> Id</code>: Dieses Element<code></code> vom Typ <code>xs:token</code> enth&auml;lt
+ einen frei w&auml;hlbaren Identifikator f&uuml;r dieses Konfigurationselement, der innerhalb der
+ XML-Konfigurationsdatei eindeutig sein muss. Dieser Identifikator wird im Request zur Pr&uuml;fung
+ der XML-Signatur verwendet, um das hinterlegte Profil zu referenzieren (vergleiche Element <code>moa:</code><code>VerifyTransformsInfoProfileID</code>). </li>
+ <li>Element<code></code> <code>Location</code>: Dieses Element<code></code> vom Typ <code>xs:anyURI</code> enth&auml;lt
+ den Namen der XML-Datei, die das hinterlegte Profil beinhaltet. Der Wert enth&auml;lt eine relative
+ oder absolute URI. Eine relative URI wird von MOA SP als File-URI relativ zum Lage jenes Verzeichnisses
+ interpretiert, in dem die zentrale Konfigurationsdatei gespeichert ist. Die XML-Datei muss als
+ Wurzelelement das Element<code> moa:VerifyTransformsInfoProfile </code>enthalten.</li>
+ </ul></td>
+ </tr>
+ </table>
+ <h3><a name="konfigurationsparameter_sp_supplementprofile" id="konfigurationsparameter_sp_supplementprofile"></a>2.3.3 Profil f&uuml;r Erg&auml;nzungsobjekte</h3>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:SignatureVerification/cfg:SupplementProfile</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>Null mal bis unbeschr&auml;nkt oft</td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p>MOA SS erlaubt die Hinterlegung eines vordefinierten Profils f&uuml;r ein Erg&auml;nzungsobjekt,
+ das im Rahmen einer XML-Signaturpr&uuml;fung verwendet werden soll. Im Request zur XML-Signaturpr&uuml;fung reicht es dann aus, auf dieses Profil zu referenzieren, anstatt die Informationen zur Signaturumgebung
+ explizit anzugeben. </p>
+ <p><code>cfg:SupplementProfile</code> enth&auml;lt f&uuml;r ein Datenobjekt in der zu pr&uuml;fenden
+ XML-Signatur ein allenfalls f&uuml;r die Durchf&uuml;hrung der vorgegebenen Transformationen notwendiges
+ Erg&auml;nzungsobjekt (z.B. einen zu importierenden Stylesheet f&uuml;r eine XSL-Transformation).</p>
+ <p><code>cfg:</code><code>SupplementProfile</code> weist folgende obligatorische Kindelemene auf: </p>
+ <ul>
+ <li>Element<code> Id</code>: Dieses Element<code></code> vom Typ <code>xs:token</code> enth&auml;lt
+ einen frei w&auml;hlbaren Identifikator f&uuml;r dieses Konfigurationselement, der innerhalb der
+ XML-Konfigurationsdatei eindeutig sein muss. Dieser Identifikator wird im Request zur Pr&uuml;fung
+ der XML-Signatur verwendet, um das hinterlegte Profil zu referenzieren (vergleiche Element <code>moa:</code><code>SupplementProfileID</code>). </li>
+ <li>Element<code></code> <code>Location</code>: Dieses Element<code></code> vom Typ <code>xs:anyURI</code> enth&auml;lt
+ den Namen der XML-Datei, die das hinterlegte Profil beinhaltet. Der Wert enth&auml;lt eine relative
+ oder absolute URI. Eine relative URI wird von MOA SP als File-URI relativ zum Lage jenes Verzeichnisses
+ interpretiert, in dem die zentrale Konfigurationsdatei gespeichert ist. Die XML-Datei muss als
+ Wurzelelement das Element<code> moa:SupplementProfile </code>enthalten.</li>
+ </ul></td>
+ </tr>
+ </table>
+ <h3><a name="konfigurationsparameter_sp_permitfileuris" id="konfigurationsparameter_sp_permitfileuris"></a>2.3.4 file-URIs</h3>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:SignatureVerification/cfg:PermitFileURIs</code></td>
+
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>Null mal oder einmal</td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+
+ <td><p>Der Inhalt dieses Elements vom Typ <code>xs:boolean</code> gibt an, ob file-URIs innerhalb von MOA-SP zugelassen werden sollen. In MOA-SS werden file-URIs strikt verboten.</p>
+ <p class="remark">Bitte beachten Sie: Das Erlauben von file-URIs birgt Sicherheitsrisikien. Eine Deaktivierung sollte nur in begr&uuml;ndeten Ausnahmef&auml;llen in Erw&auml;gung gezogen werden. </p>
+ <p class="remark">Bitte beachten Sie: Es werden keine file-URIs in Erg&auml;nzungsobjekten unterst&uuml;tzt.</p>
+ <p>Zul&auml;ssige Werte f&uuml;r diesen Parameter sind <code>true</code> oder <code>false</code>. Wird dieses Element nicht angegeben, so nimmt MOA den Wert <code>false</code> an.</p>
+ </td>
+ </tr>
+ </table>
+ <h1><a name="beispielkonfigurationen"></a>3 Beispielkonfigurationen</h1>
+ <h2><a name="beispielkonfigurationen_minss" id="beispielkonfigurationen_minss"></a>3.1 Minimale Konfiguration f&uuml;r MOA SS</h2>
+ <p>Nachfolgend finden Sie eine zentrale Konfigurationsdatei mit den minimal notwendigen Eintr&auml;gen f&uuml;r
+ den alleinigen Betrieb von MOA SS. Darin sind als Kinder des Wurzelelements <code>cfg:MOAConfiguration</code> folgende
+ Konfigurationselemente enthalten:</p>
+ <ul>
+ <li>Ein Software-Schl&uuml;sselspeicher (<code>cfg:SignatureCreation/cfg:KeyModules/cfg:SoftwareKeyModule</code>);</li>
+ <li>Eine Schl&uuml;sselgruppe (<code>cfg:SignatureCreation/</code><code>cfg:KeyGroup</code>);</li>
+ <li>Eine Zuordnung dieser Schl&uuml;sselgruppe f&uuml;r einen bestimmten Kunden (<code>cfg:SignatureCreation/cfg:KeyGroupMapping</code>). </li>
+ </ul>
+ <p><a href="../../conf/moa-spss/ss.minimum.config.xml">Minimale Konfiguration f&uuml;r MOA SS</a> </p>
+ <h2><a name="beispielkonfigurationen_minsp" id="beispielkonfigurationen_minsp"></a>3.2 Minimale Konfiguration f&uuml;r MOA SP</h2>
+ <p>Nachfolgend finden Sie eine zentrale Konfigurationsdatei mit den minimal notwendigen Eintr&auml;gen f&uuml;r
+ den alleinigen Betrieb von MOA SP. Darin sind als Kinder des Wurzelelements <code>cfg:MOAConfiguration</code> folgende
+ Konfigurationselemente enthalten:</p>
+ <ul>
+ <li>Einstellungen betreffend die Konstruktion des Zertifikatspfades (<code>cfg:SignatureVerification/cfg:CertificateValidation/cfg:PathConstruction</code>);</li>
+ <li>Einstellungen betreffend die Validierung des Zertifikatspfades (<code>cfg:SignatureVerification/cfg:CertificateValidation/cfg:PathValidation</code>),
+ unter anderem ein Vertrauensprofil (<code>cfg:TrustProfile</code>);</li>
+ <li>Einstellungen betreffend die Widerrufspr&uuml;fung von Zertifikaten des Zertifikatspfades (<code>cfg:SignatureVerification/cfg:CertificateValidation/cfg:RevocationChecking</code>) . </li>
+ </ul>
+ <p><a href="../../conf/moa-spss/sp.minimum.config.xml">Minimale Konfiguration f&uuml;r MOA SP</a> </p>
+ <h2><a name="beispielkonfigurationen_typspss" id="beispielkonfigurationen_typspss"></a>3.3 Typische Konfiguration f&uuml;r MOA SP/SS</h2>
+ <p>Nachfolgend finden Sie eine typische zentrale Konfigurationsdatei mit Eintr&auml;gen f&uuml;r den kombinierten Betrieb von MOA SP und SS. Diese Datei wird auch als Konfiguration von MOA SP und SS verwendet, die f&uuml;r das Ausf&uuml;hren der Beispiele des <a href="../usage/usage.html">Anwenderhandbuchs</a> notwendig ist.</p>
+ <p><a href="../../conf/moa-spss/spss.config.xml">Typische Konfiguration f&uuml;r MOA SP/SS</a> </p>
+ <p>&nbsp; </p>
+</body>
+</html>
diff --git a/spss/handbook/handbook/faq/faq.html b/spss/handbook/handbook/faq/faq.html
new file mode 100644
index 000000000..c2bc36814
--- /dev/null
+++ b/spss/handbook/handbook/faq/faq.html
@@ -0,0 +1,126 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+ <title>MOA SS und SP - FAQ</title>
+ <link rel="stylesheet" href="../common/MOA.css" type="text/css">
+</head>
+<body bgcolor="white" text="#000000" link="#990000" vlink="#666666" alink="#cc9966">
+ <table class="logoTable" width="100%" border="0" cellspacing="0" cellpadding="10">
+ <tr>
+ <td align="center" class="logoTitle" width="267"><img src="../common/LogoBKA.png" alt="Logo BKA" width="267" height="37" align="left"></td>
+ <td align="center" class="logoTitle">Open Source<br>
+ f&uuml;r das E-Government</td>
+ <td align="center" class="logoTitle" width="123"><img src="../common/LogoMoa4c.jpg" alt="Logo MOA" width="123" height="138" align="right"></td>
+ </tr>
+ </table>
+ <hr/>
+ <p class="title"><a href="../index.html">MOA: Serversignatur (SS) und Signaturpr&uuml;fung (SP), V 1.5.0</a></p>
+ <p class="subtitle">FAQ</p>
+ <hr/>
+ <h1>Inhalt</h1>
+ <ol>
+ <li>
+ <p><a href="#allgemeines">Allgemeines</a></p>
+ </li>
+ <li>
+ <p><a href="#uebersicht_fragen">&Uuml;bersicht der Fragen </a></p>
+ </li>
+ <li>
+ <p><a href="#antworten">Antworten</a></p>
+ </li>
+ </ol>
+<hr/>
+ <h1><a name="allgemeines"></a>1 Allgemeines</h1>
+ <p> Dieses Dokument enth&auml;lt eine Reihe von h&auml;ufig gestellten Fragen zu Installation, Konfiguration und Verwendung von MOA Serversignatur (SS) und Signaturpr&uuml;fung (SP). </p>
+ <h1><a name="uebersicht_fragen" id="uebersicht_fragen"></a>2 &Uuml;bersicht der Fragen </h1>
+ <h2> Installation</h2>
+ <ol>
+ <li>Beim Starten von MOA SPSS tritt folgende Exception auf: <code>java.lang.ClassCastException: iaik.asn1.structures.Name</code>. Was kann der Fehler sein? [<a href="#installation_1">Zur Antwort</a>]</li>
+ <li>Ich m&ouml;chte MOA SS/SP in einer Umgebung betreiben, die einen Internet-Zugang nur &uuml;ber einen Proxy erlaubt. Funktioniert das? [<a href="#installation_1">Zur Antwort</a>] </li>
+ </ol>
+ <h2>Konfiguration</h2>
+ <ol>
+ <li>Ich m&ouml;chte gerne die CRL-Archivierung von MOA verwenden, m&ouml;chte aber eine andere als die in der Konfiguration erw&auml;hnte postgreSQL-Datenbank verwenden. Geht das? [<a href="#konfiguration_1">Zur Antwort</a>]</li>
+ <li>Ich m&ouml;chte ein Zertifikat (z.B. einer Zwischen-Zertifizierungsstelle) manuell in den internen Zertifikatsspeicher von MOA SP importieren. Wie funktioniert das? [<a href="#konfiguration_2">Zur Antwort</a>]</li>
+ <li>Meine bestehende Konfigurationsdatei funktioniert mit MOA SP/SS 1.3 oder h&ouml;her nicht mehr. Was ist passiert?
+ [<a href="#konfiguration_3">Zur Antwort</a>]</li>
+ </ol>
+ <h2>Verwendung</h2>
+ <ol>
+ <li>Bei der Pr&uuml;fung einer Signatur liefert die Pr&uuml;fung des Zertifikatsstatus den Code 1. Was kann der Fehler sein? [<a href="#verwendung_1">Zur Antwort</a>] </li>
+ </ol>
+ <h1><a name="antworten" id="antworten"></a>3 Antworten</h1>
+ <h2>Installation</h2>
+ <ol>
+ <li class="faq"><div class="faq-question"><a name="installation_1"></a>Beim Starten von MOA SPSS tritt folgende Exception auf: <code>java.lang.ClassCastException: iaik.asn1.structures.Name</code>. Was kann der Fehler sein?</div>
+ <p>Auf Grund einer mangelhaften Implementierung in einigen Versionen des JDK 1.3.1 kann es beim Betrieb von MOA zu folgendem Problem kommen: Sun macht in der Implementierung von <code>PKCS7.getCertificate()</code> einen Downcast vom Interface<code> java.security.Principal</code> auf die eigene Implementierung, was zu einer <span class="term">ClassCastException</span> f&uuml;hrt, wenn der JCE-Provider von Sun nicht an erster Stelle in der List der Security-Provider installiert ist. MOA geht nun aber so vor, dass der JCE-Provider des IAIK an die erste Stelle installiert wird, wenn er zum Zeitpunkt der Konfiguration noch nicht installiert war. Wird dann von irgendeinem ClassLoader der jar-Verifier ben&uuml;tzt, wird <code>PKCS7.getCertificate()</code> verwendet, und es kommt zu einer <span class="term">ClassCastException</span>. </p>
+ <p>Wird MOA &uuml;ber die API-Schnittstelle verwendet, ist ein Workaround die manuelle Installation des IAIK-JCE-Providers nach dem Sun JCE-Provider (etwa an die letzte Stelle), bevor die MOA-Konfiguration aufgerufen wird. Bei Verwendung der Webservices ist die M&ouml;glichkeit der statischen Konfiguration der JCE-Provider mittels Angabe in der Datei <code>$JAVA_HOME/jre/lib/security/java.security</code> der einzige bekannte Workaround. Hierzu m&uuml;ssen die Eintr&auml;ge </p>
+ <pre> security.provider.1=sun.security.provider.Sun
+ security.provider.2=com.sun.rsajca.Provider </pre>
+ <p>durch folgenden Eintrag erg&auml;nzt werden:</p>
+ <pre>security.provider.3=iaik.security.provider.IAIK</pre>
+ </li>
+ <li class="faq">
+ <div class="faq-question"><a name="installation_2" id="installation_2"></a>Ich m&ouml;chte MOA SS/SP in einer Umgebung betreiben, die einen Internet-Zugang nur &uuml;ber einen Proxy erlaubt. Funktioniert das?</div>
+ <p>Ja, zumindest f&uuml;r Zugriffe &uuml;ber HTTP. Sie m&uuml;ssen dazu die nachfolgenden JAVA System-Properties setzen:</p>
+ <pre>http.proxyHost=&lt;proxyhost&gt;
+http.proxyPort=&lt;proxyport&gt;
+http.nonProxyHosts=&quot;&lt;exceptionhosts&gt;&quot;</pre>
+ <p><code>&lt;proxyhost&gt;</code> gibt den Namen oder die IP-Adresse des Proxies an.</p>
+ <p><code>&lt;proxyport&gt;</code> gibt den Port des Proxies an.</p>
+ <p><code>&lt;exceptionhosts&gt;</code> enth&auml;lt eine Liste von Rechnernamen, die nicht &uuml;ber den Proxy laufen sollen. Jedenfalls m&uuml;ssen sie hier <code>localhost</code> angeben. Einzelne Namen sind durch eine Pipe (<code>|</code>) zu trennen. Bitte beachten Sie, dass IP-Addressen nicht angegeben werden d&uuml;rfen, sowie die verpflichtend zu verwendenen Anf&uuml;hrungszeichen.<br>
+ </p>
+ </li>
+ </ol>
+ <h2>Konfiguration</h2>
+ <ol>
+ <li class="faq"><div class="faq-question"><a name="konfiguration_1" id="konfiguration_1"></a>Ich m&ouml;chte gerne die CRL-Archivierung von MOA verwenden, m&ouml;chte aber eine andere als die in der Konfiguration erw&auml;hnte postgreSQL-Datenbank verwenden. Geht das?</div>
+ <p>Ja, das ist m&ouml;glich. Wenn Sie eine mySQL-Datenbank verwenden m&ouml;chten, sind folgende Ma&szlig;nahmen zu treffen:</p>
+ <ul>
+ <li><a href="http://www.mysql.com/downloads/api-jdbc.html">Laden</a> Sie den mySQL-JDBC-Connector herunter und f&uuml;gen Sie das im Download enthaltene jar-File <code>mysql-connector-java-3.x.x-stable-bin.jar</code> zum Klassenpfad f&uuml;r MOA SPSS hinzu.</li>
+ <li>Geben Sie im MOA-Konfigurationsfile mit Hilfe des generischen Konfigurationsparameters <code>DataBaseArchiveParameter.JDBCUrl</code> eine g&uuml;ltige JDBC-URL zu Ihrer mySQL-Datenbank angeben. Hinweise zum Format dieser URL f&uuml;r mySQL finden Sie <a href="http://www.mysql.com/documentation/connector-j/index.html">hier</a>. </li>
+ </ul>
+ <p>Wenn Sie eine andere Datenbank verwenden m&ouml;chten, beispielsweise Oracle, gehen Sie sinngem&auml;&szlig; wie oben vor und setzen zus&auml;tzlich noch folgenden Schritt:</p>
+ <ul>
+ <li>Geben Sie im MOA-Konfigurationsfile mit Hilfe des generischen Konfigurationsparameters <code>DataBaseArchiveParameter.JDBCDriverClass</code> den vollst&auml;ndig qualifizierten Klassennamen des JDBC-Treibers an, der die Verbindung zu Ihrer Datenbank herstellt. </li>
+ </ul>
+ </li>
+ <li class="faq">
+ <div class="faq-question"><a name="konfiguration_2" id="konfiguration_2"></a>Ich m&ouml;chte ein Zertifikat (z.B. einer Zwischen-Zertifizierungsstelle) manuell in den internen Zertifikatsspeicher von MOA SP importieren. Wie funktioniert das?</div>
+ <p>Sie k&ouml;nnen f&uuml;r diesen Zweck ein mit MOA SP/SS mitgeliefertes Kommandozeilen-Tool verwenden, das Sie im Verzeichnis <code>$MOA_SPSS_INST/tools</code> finden. Wechseln Sie zu diesem Verzeichnis und rufen Sie die Script-Datei <code>certtools.bat</code> bzw. <code>certtools.sh</code> (je nach Betriebssystem) auf. Achten Sie darauf, dass die Umgebungsvariable <code>$JAVA_HOME</code> korrekt gesetzt ist. Die Syntax f&uuml;r dieses Tool lautet:</p>
+ <pre>certtool -add &lt;cert&gt; &lt;store&gt;</pre>
+ <p><code>&lt;cert&gt;</code> bezeichnet dabei Pfad und Dateiname des zu importierenden X509-Zertifikats. Das Zertifikat muss DER-kodiert vorliegen.</p>
+ <p><code>&lt;store&gt;</code> bezeichnet den Pfad des internen Zertifikatsspeichers von MOA SP. Wenn Sie nach der Installationsanleitung vorgegangen sind, lautet dieser Pfad <code>$CATALINA_HOME/conf/moa-spss/certstore</code>.</p>
+ </li>
+ <li class="faq">
+ <div class="faq-question"><a name="konfiguration_3" id="konfiguration_3"></a>
+ Meine bestehende Konfigurationsdatei
+ funktioniert mit MOA SP/SS 1.3 oder h&ouml;her nicht mehr. Was ist passiert?</div>
+ <p>Mit dem Wechsel auf Version 1.3 verwendet MOA SP/SS ein neues, &uuml;bersichtlicheres Format f&uuml;r die
+ XML-Konfigurationsdatei. </p>
+ <p>Wenn Sie von einer &auml;lteren Version von MOA SP/SS auf die Version 1.3 wechseln und Ihre bestehende
+ Konfiguration beibehalten wollen, steht Ihnen ein einfaches Kommandozeilenwerkzeug zur Verf&uuml;gung, mit
+ dem Sie Ihre Konfigurationsdatei vom bisherigen auf das neue Format migrieren k&ouml;nnen.</p>
+ <p>Informationen zur Verwendung des Werkzeugs finden Sie in <a href="../config/config.html#&#252;bersicht_zentraledatei_aktualisierung">Abschnitt 1.2.1</a> des Konfigurationshandbuchs. </p>
+ </li>
+ </ol>
+ <h2>Verwendung</h2>
+ <ol>
+ <li class="faq"><div class="faq-question"><a name="verwendung_1" id="verwendung_1"></a>Bei der Pr&uuml;fung einer Signatur liefert die Pr&uuml;fung des Zertifikatsstatus den Code 1. Was kann der Fehler sein? </div>
+ <p>Dieser Fehlercode bedeutet: Es konnte keine formal korrekte Zertifikatskette vom Signatorzertifikat zu einem vertrauensw&uuml;rdigen Wurzelzertifikat konstruiert werden. Das kann grunds&auml;tzlich eine der beiden folgenden Ursachen haben:</p>
+ <ul>
+ <li>Keines der Zertifikate in der Kette vom Signatorzertifikat bis zu einem selbstsignierten Wurzelzertifikat ist im anzuwendenden <span class="term">TrustProfile</span> enthalten. </li>
+ <li>Die Zertifikatskette konnte nicht bis zu einem im anzuwendenden <span class="term">TrustProfile</span> enthaltenen vertrauensw&uuml;rdigen Zertifikat gebildet werden. </li>
+ </ul>
+ <p>Pr&uuml;fen Sie also zun&auml;chst, ob sie im anzuwendenden <span class="term">TrustProfile</span> ein passendes vertrauensw&uuml;rdiges Zertifikat konfiguriert haben. Das kann beispielsweise das Zertifikat jener CA sein, die das Signatorzertifikat ausgestellt hat, oder aber auch das Zertifikat einer CA weiter oben in der Hierarchie des Zertifizierungsdiensteanbieters, beispielsweise das selbstsignierte Wurzelzertifikat.</p>
+ <p>Wenn diese Pr&uuml;fung das Problem nicht behebt, gelingt des MOA SP vermutlich nicht, ein f&uuml;r die Bildung der Zertifikatskette notwendiges Zertifikat zu lokalisieren. M&ouml;gliche Gr&uuml;nde sowie L&ouml;sungsm&ouml;glichkeiten daf&uuml;r sind:</p>
+ <ul>
+ <li>Das aktuell letzte Zertifikat in der bereits gebildeten Zertifikatskette besitzt zwar die Zertifikatserweiterung <span class="term">AuthorityInformationAccess</span> mit einem Hinweis auf das n&auml;chste Zertifikat der zu bildenden Kette, das darin per URL referenzierte Zertifikat kann jedoch nicht geladen werden. Pr&uuml;fen Sie daher zun&auml;chst, ob MOA SP/SS per HTTP oder LDAP Zugriffe nach au&szlig;en t&auml;tigen darf. </li>
+ <li>Das aktuell letzte Zertifikat in der bereits gebildeten Zertifikatskette besitzt keine Zertifikatserweiterung <span class="term">AuthorityInformationAccess</span> mit einem Hinweis auf das n&auml;chste Zertifikat der zu bildenden Kette, und auch im internen Zertifikatsspeicher von MOA SP ist das n&auml;chste Zertifikat nicht enthalten. Ist Ihnen das n&auml;chste Zertifikat bekannt (z.B. durch manuellen Download von der Webseite des Zertifizierungsdiensteanbieters), k&ouml;nnen Sie es manuell in den internen Zertifikatsspeicher importieren. Eine Anleitung dazu finden Sie <a href="#konfiguration_2">hier</a>. <br>
+ </li>
+ </ul>
+ </li>
+ </ol>
+</body>
+</html>
diff --git a/spss/handbook/handbook/index.html b/spss/handbook/handbook/index.html
new file mode 100644
index 000000000..b4fddc1c0
--- /dev/null
+++ b/spss/handbook/handbook/index.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+ <title>MOA SS und SP - &Uuml;bersicht</title>
+ <link rel="stylesheet" href="./common/MOA.css" type="text/css">
+</head>
+<body bgcolor="white" text="#000000" link="#990000" vlink="#666666" alink="#cc9966">
+ <table class="logoTable" width="100%" border="0" cellspacing="0" cellpadding="10">
+ <tr>
+ <td align="center" class="logoTitle" width="267"><img src="common/LogoBKA.png" alt="Logo BKA" width="267" height="37" align="left"></td>
+ <td align="center" class="logoTitle">Open Source<br>
+ f&uuml;r das E-Government</td>
+ <td align="center" class="logoTitle" width="123"><img src="common/LogoMoa4c.jpg" alt="Logo MOA" width="123" height="138" align="right"></td>
+ </tr>
+ </table>
+ <hr/>
+ <p class="title">MOA: Serversignatur (SS) und Signaturpr&uuml;fung (SP) </p>
+ <p class="subtitle">&Uuml;bersicht zur Dokumentation der Version 1.5.0 </p>
+ <hr/>
+ <dl>
+ <dt><a href="./intro/intro.html">Einf&uuml;hrung</a></dt>
+ <dd>&Uuml;bersicht &uuml;ber die beiden Module.</dd>
+ <dt><a href="./install/install.html">Installation</a></dt>
+ <dd>Detaillierte Anleitung f&uuml;r die Installation. </dd>
+ <dt><a href="./config/config.html">Konfiguration</a></dt>
+ <dd>Erl&auml;uterung aller Konfigurationsoptionen sowie Leitfaden f&uuml;r h&auml;ufige Konfigurationsaufgaben.</dd>
+ <dt><a href="./usage/usage.html">Anwendung</a></dt>
+ <dd>Beispiele zur Verwendung der beiden Module.</dd>
+ <dt><a href="./faq/faq.html">FAQ</a></dt>
+ <dd>H&auml;ufig gestellte Fragen zu Installation, Konfiguration und Anwendung. </dd>
+ </dl>
+</body>
+</html>
diff --git a/spss/handbook/handbook/install/install.html b/spss/handbook/handbook/install/install.html
new file mode 100644
index 000000000..8ff511a7e
--- /dev/null
+++ b/spss/handbook/handbook/install/install.html
@@ -0,0 +1,489 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+ <title>MOA SS und SP - Installation</title>
+ <link rel="stylesheet" href="../common/MOA.css" type="text/css">
+</head>
+<body bgcolor="white" text="#000000" link="#990000" vlink="#666666" alink="#cc9966">
+ <table class="logoTable" width="100%" border="0" cellspacing="0" cellpadding="10">
+ <tr>
+ <td align="center" class="logoTitle" width="267"><img src="../common/LogoBKA.png" alt="Logo BKA" width="267" height="37" align="left"></td>
+ <td align="center" class="logoTitle">Open Source<br>
+ f&uuml;r das E-Government</td>
+ <td align="center" class="logoTitle" width="123"><img src="../common/LogoMoa4c.jpg" alt="Logo MOA" width="123" height="138" align="right"></td>
+ </tr>
+ </table>
+ <hr/>
+ <p class="title"><a href="../index.html">MOA: Serversignatur (SS) und Signaturpr&uuml;fung (SP), V 1.5.0</a></p>
+ <p class="subtitle">Installation</p>
+ <hr/>
+ <h1>Inhalt</h1>
+ <ol>
+ <li>
+ <p><a href="#&#220;bersicht">&Uuml;bersicht</a></p>
+ </li>
+ <li>
+ <p><a href="#webservice">Webservice</a></p>
+ <ol>
+ <li><a href="#webservice_basisinstallation">Basisinstallation</a>
+ <ol>
+ <li><a href="#webservice_basisinstallation_einf&#252;hrung">Einf&uuml;hrung</a></li>
+ <li><a href="#webservice_basisinstallation_installation">Installation</a>
+ <ol>
+ <li><a href="#webservice_basisinstallation_installation_vorbereitung">Vorbereitung</a></li>
+ <li><a href="#webservice_basisinstallation_installation_tomcatconfig">Konfiguration von Apache Tomcat</a>
+ <ol>
+ <li><a href="#webservice_basisinstallation_installation_tomcatconfig_httpconn">Konfiguration des HTTP Connectors</a></li>
+ <li><a href="#webservice_basisinstallation_installation_tomcatconfig_httpsconn">Konfiguration des HTTPS Connectors</a></li>
+ <li><a href="#webservice_basisinstallation_installation_tomcatconfig_moaadmin">Einrichten des MOA SP/SS Administrators</a></li>
+ </ol>
+ </li>
+ <li><a href="#webservice_basisinstallation_installation_spssdeploy">Einsatz des MOA SP/SS Webservices in Tomcat</a></li>
+ <li><a href="#webservice_basisinstallation_installation_tomcatconfig_httpsconn">Starten und Stoppen von Tomcat</a>
+ <ol>
+ <li><a href="#webservice_basisinstallation_installation_tomcatstartstop_windows">Unter Windows</a></li>
+ <li><a href="#webservice_basisinstallation_installation_tomcatstartstop_unix">Unter Unix</a></li>
+ <li><a href="#webservice_basisinstallation_installation_tomcatstartstop_verify">Pr&uuml;fen des erfolgreichen Starts</a> </li>
+ </ol>
+ </li>
+ <li><a href="#webservice_basisinstallation_installation_changeonthefly">&Auml;nderung der Konfiguration im laufenden Betrieb</a></li>
+ </ol>
+ </li>
+ <li><a href="#webservice_basisinstallation_logging">Logging</a>
+ <ol>
+ <li><a href="#webservice_basisinstallation_logging_format">Format der Log-Meldungen</a></li>
+ <li><a href="#webservice_basisinstallation_logging_messages">Wichtige Log-Meldungen</a></li>
+ </ol>
+ </li>
+ </ol>
+ </li>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten">Erweiterungsm&ouml;glichkeiten</a> <ol>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten_webserver">Vorgeschalteter Webserver</a> <ol>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten_webserver_iis">Microsoft Internet Information Server (MS IIS)</a> <ol>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten_webserver_iis_jk">Konfiguration von <span class="term">Jakarta mod_jk</span> im MS IIS</a></li>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten_webserver_iis_tomcat">Konfiguration von Tomcat</a></li>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten_webserver_iis_ssl">Konfiguration von SSL</a></li>
+ </ol>
+ </li>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten_webserver_apache">Apache</a> <ol>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten_webserver_apache_jk">Konfiguration von <span class="term">Jakarta mod_jk</span> im Apache </a></li>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten_webserver_apache_tomcat">Konfiguration von Tomcat</a></li>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten_webserver_apache_ssl">Konfiguration von SSL mit <span class="term">mod_SSL</span></a></li>
+ </ol>
+ </li>
+ </ol>
+ </li>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten_datenbank">Datenbank</a> <ol>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten_datenbank_postgresql">PostgreSQL</a> <ol>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten_datenbank_postgresql_benutzer">Anlegen eines Benutzers und einer Datenbank f&uuml;r MOA SP/SS</a></li>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten_datenbank_postgresql_crls">Archivierung von CRLs</a> </li>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten_datenbank_postgresql_logging">Logging</a></li>
+ </ol>
+ </li>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten_datenbank_andere">Andere Datenbanken</a> </li>
+ </ol>
+ </li>
+ </ol>
+ </li>
+ </ol>
+ <li><a href="#klassenbibliothek">Klassenbibliothek</a>
+ <ol>
+ <li><a href="#klassenbibliothek_basisinstallation">Basisinstallation</a>
+ <ol>
+ <li><a href="#klassenbibliothek_basisinstallation_einfuehrung">Einf&uuml;hrung</a></li>
+ <li><a href="#klassenbibliothek_basisinstallation_vorbereitung">Vorbereitung</a></li>
+ <li><a href="#klassenbibliothek_basisinstallation_verwendung">Verwendung</a></li>
+ <li><a href="#klassenbibliothek_basisinstallation_logging">Logging</a></li>
+ </ol>
+ </li>
+ <li><a href="#klassenbibliothek_erweiterungsm&#246;glichkeiten">Erweiterungsm&ouml;glichkeiten</a></li>
+ </ol>
+ </li>
+ </ol>
+ <ol type="A">
+ <li><a href="#referenzierte_software">Referenzierte Software</a></li>
+ </ol>
+ <hr/>
+ <h1><a name="übersicht" id="übersicht"></a>1 &Uuml;bersicht</h1>
+ <p> Die Module Signaturpr&uuml;fung (SP) und Serversignatur (SS) sind als plattformunabh&auml;ngige Module ausgelegt, die entweder als Webservice &uuml;ber HTTP bzw. HTTPS oder als Klassenbibliothek &uuml;ber ein API angesprochen werden k&ouml;nnen. Dieses Handbuch beschreibt die Installation der beiden Module als Webservice oder als Klassenbibliothek, sowie die Einrichtung der Systemumgebung.</p>
+ <h1><a name="webservice"></a>2 Webservice </h1>
+ <p>Dieser Abschnitt beschreibt die Installation von MOA SP/SS als Webservice. Im ersten Unterkapitel wird eine minimale Basisinstallation beschrieben. Das zweite Unterkapitel zeigt eine Reihe von optionalen Erweiterungsm&ouml;glichkeiten auf.</p>
+ <h2><a name="webservice_basisinstallation" id="webservice_basisinstallation"></a>2.1 Basisinstallation</h2>
+ <h3><a name="webservice_basisinstallation_einführung" id="webservice_basisinstallation_einführung"></a>2.1.1 Einf&uuml;hrung </h3>
+ <p> Die Basisinstallation des Webservices stellt einerseits die minimalen Anforderungen f&uuml;r den Betrieb von MOA SP/SS als Webservices dar, andererseits dient sie als Ausgangspunkt f&uuml;r optionale <a href="#webservice_erweiterungsm&#246;glichkeiten">Erweiterungsm&ouml;glichkeiten</a>.</p>
+ <p> Folgende Software ist Voraussetzung f&uuml;r die Basisinstallation des Webservices: </p>
+ <ul>
+ <li><a href="#referenziertesoftware">J2SE 1.4.x SDK oder J2SE 5.0 SDK </a></li>
+ <li><a href="#referenziertesoftware">Apache Tomcat 4.1.18 oder h&ouml;her </a></li>
+ </ul>
+ <p>In diesem Betriebs-Szenario wird das MOA SP/SS Webservice in Tomcat zum Einsatz gebracht. Tomcat fungiert gleichzeitig als HTTP- und HTTPS-Endpunkt f&uuml;r das MOA SP/SS Webservice. Beide Protokolle werden direkt in Tomcat konfiguriert. Das MOA SP/SS Webservice verwendet Log4j als Logging Toolkit.</p>
+ <h3><a name="webservice_basisinstallation_installation" id="webservice_basisinstallation_installation"></a>2.1.2 Installation</h3>
+ <h4><a name="webservice_basisinstallation_installation_vorbereitung" id="webservice_basisinstallation_installation_vorbereitung"></a>2.1.2.1 Vorbereitung</h4>
+ <p>Die folgenden Schritte dienen der Vorbereitung der Installation.</p>
+ <dl>
+ <dt>Installation von J2SE SDK</dt>
+ <dd>Installieren Sie <a href="#referenziertesoftware">J2SE 1.4.x SDK</a> oder <a href="#referenziertesoftware">J2SE 5.0 SDK</a> in ein beliebiges Verzeichnis. Wir empfehlen die Installation von <a href="#referenziertesoftware">J2SE 5.0 SDK</a>. Das Wurzelverzeichnis der J2SE SDK Installation wird im weiteren Verlauf als <code>$JAVA_HOME</code> bezeichnet. </dd>
+ <dt>Installation von Apache Tomcat 4.1</dt>
+ <dd> Installieren Sie <a href="#referenziertesoftware">Apache Tomcat 4.1.18</a> oder h&ouml;her in ein Verzeichnis, das keine Leerzeichen im Pfadnamen enth&auml;lt. Wir empfehlen die Installation von <a href="#referenziertesoftware">Apache Tomcat 4.1.31</a>. Verwenden Sie bitte die zu Ihrem J2SE SDK passende Distribution von Tomcat. Das Wurzelverzeichnis der Tomcat-Installation wird im weiteren Verlauf als <code>$CATALINA_HOME</code> bezeichnet.</dd>
+ <dt>Entpacken der MOA SP/SS Webservice Distribution</dt>
+ <dd> Entpacken Sie die Datei <code>moa-spss-1.5.0.zip</code> in ein beliebiges Verzeichnis. Dieses Verzeichnis wird im weiteren Verlauf als <code>$MOA_SPSS_INST</code> bezeichnet. </dd>
+ <dt>Installation der Krypographiebibliotheken von SIC/IAIK</dt>
+ <dd>
+ <p>Die Installation der Kryptographiebibliotheken von <a href="http://jce.iaik.tugraz.at/" target="_blank">SIC/IAIK</a>:</p>
+ <dl>
+ <dt>J2SE 1.4.2 SDK oder JSE 5.0 SDK </dt>
+ <dd>Kopieren Sie alle Dateien aus dem Verzeichnis <code>$MOA_SPSS_INST/ext</code> in das Verzeichnis <code>$JAVA_HOME/jre/lib/ext</code>. Zus&auml;tzlich m&uuml;ssen Sie die Rechtedateien Ihres J2SE 1.4.x SDK bzw. J2SE 5.0 SDK austauschen. Laden Sie dazu die <span class="term">Unlimited Strength
+
+
+ Jurisdiction Policy Files</span> von der <a href="http://java.sun.com/j2se/1.4.2/download.html" target="_blank">J2SE 1.4.x SDK Downloadseite</a> bzw. <a href="http://java.sun.com/j2se/1.5.0/download.html">J2SE 5.0 SDK Downloadseite</a> und folgen Sie der darin enthaltenen Installationsanweisung. </dd>
+ </dl>
+ </dd>
+ </dl>
+ <h4><a name="webservice_basisinstallation_installation_tomcatconfig" id="webservice_basisinstallation_installation_tomcatconfig"></a>2.1.2.2 Konfiguration von Apache Tomcat</h4>
+ <p> Die zentrale Konfigurations-Datei von Tomcat ist <code>$CATALINA_HOME/conf/server.xml</code>. Tomcat wird grunds&auml;tzlich mit einer funktionierenden Default-Konfiguration ausgeliefert, die jedoch einiges an Ballast enth&auml;lt und viele Ports offen l&auml;sst. </p>
+ <h5><a name="webservice_basisinstallation_installation_tomcatconfig_httpconn" id="webservice_basisinstallation_installation_tomcatconfig_httpconn"></a>2.1.2.2.1 Konfiguration des HTTP Connectors</h5>
+ <p> Die Datei <code>$MOA_SPSS_INST/tomcat/server.xml</code> enth&auml;lt eine minimale Tomcat-Konfiguration, die ausschlie&szlig;lich den Connector f&uuml;r HTTP auf Port 8080 freischaltet. Durch kopieren dieser Datei nach <code>$CATALINA_HOME/conf/server.xml</code> kann Tomcat mit dieser Konfiguration gestartet werden. Wir empfehlen diese Konfiguration nur f&uuml;r F&auml;lle, in denen das MOA SP/SS Webservice in einer abgeschlossenen Netzwerkumgebung betrieben wird. </p>
+ <h5><a name="webservice_basisinstallation_installation_tomcatconfig_httpsconn" id="webservice_basisinstallation_installation_tomcatconfig_httpsconn"></a>2.1.2.2.2 Konfiguration des HTTPS Connectors</h5>
+ <p>Wird das MOA SP/SS Webservice in einer nicht abgeschlossenen Umgebung (z.B. Erreichbarkeit &uuml;ber das Internet) betrieben, ist die gegenseitige Identit&auml;tsfeststellung von Kunde und Webservice essentiell: </p>
+ <ul>
+ <li> Nutzt ein Kunde MOA SP, ist es f&uuml;r ihn wichtig, die Identit&auml;t des Webservice eindeutig feststellen zu k&ouml;nnen, denn er vertraut dem Webservice ja die Pr&uuml;fung einer elektronischen Signatur an.</li>
+ <li>Nutzt ein Kunde MOA SS, ist es f&uuml;r ihn wesentlich, dass nur er Zugriff auf die f&uuml;r ihn vom Webservice verwalteten privaten Schl&uuml;ssel hat, um elektronische Signaturen zu erstellen. Das Webservice muss also die Identit&auml;t des Kunden pr&uuml;fen. </li>
+ </ul>
+ <p>Beide Identit&auml;tspr&uuml;fungen k&ouml;nnen mit hoher Qualit&auml;t vorgenommen werden, wenn die Erreichbarkeit des Webservice auf SSL mit Server- (f&uuml;r MOA SP) bzw. Client- und Serverauthentisierung (f&uuml;r MOA SS) eingeschr&auml;nkt wird. </p>
+ <p>F&uuml;r die dazu notwendige Konfiguration kann die im vorigen Abschnitt besprochene minimale Tomcat-Konfiguration als Ausgangspunkt verwendet werden: Zun&auml;chst ist der HTTP Connector abzuschalten (auszukommentieren). Anschlie&szlig;end ist der HTTPS Connector zu konfigurieren. Das Dokument <a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html">Tomcat SSL Configuration HOW-TO </a> gibt einen guten &Uuml;berblick dazu. Grob zusammengefasst sind folgende Schritte durchzuf&uuml;hren: </p>
+ <ul>
+ <li>Erstellung eines <span class="term">Server-Keystores</span>, der den privaten Schl&uuml;ssel sowie das zugeh&ouml;rige Zertifikat des Webservices enth&auml;lt, mit dem es sich bei Aufbau einer SSL-Verbindung gegen&uuml;ber dem Kunden ausweist.sowie das dazugeh&ouml;rige ZertiServer-Zertifikat enth&auml;lt. Sie k&ouml;nnen diesen Keystore z.B. mit <code>keytool</code> erstellen, einem Programm, das Ihrem J2SE SDK beiliegt.</li>
+ <li>Erstellung eines <span class="term">Client-Keystores</span>, der die Zertifikate aller Kunden des Webservices enth&auml;lt. Nur Kunden des Webservices, die sich beim Aufbau einer SSL-Verbindung gegen&uuml;ber dem Webservice mit einem im <span class="term">Client-Keystore</span> enthaltenen Zertifikat ausweisen, erhalten grunds&auml;tzlich Zugriff zu den Diensten des Webservices (f&uuml;r die Konfiguration, welcher Kunde welche Schl&uuml;ssel von MOA SS verwenden darf, siehe <a href="../config/config.html#konfigurationsparameter_ss_keygroupmapping">Abschnitt 2.2.3 des Konfigurationshandbuchs</a>). Auch dieser Keystore kann z.B. mit <code>keytool</code> erstellt werden. Dieser Keystore ist optional und braucht nur erstellt zu werden, wenn sich die Kunden gegen&uuml;ber dem Webservice authentisieren m&uuml;ssen. </li>
+ <li>Konfiguration des HTTPS Connectors in <code>$CATALINA_HOME/conf/server.xml</code>.</li>
+ </ul>
+ <p>Die Konfiguration des HTTPS Connectors kann entfallen, wenn Tomcat ein Webserver vorgeschaltet ist, und dieser die SSL-Kommunikation mit dem Kunden &uuml;bernimmt (siehe <a href="#webservice_erweiterungsm&#246;glichkeiten_webserver">Abschnitt 2.2.1</a>).</p>
+ <h5><a name="webservice_basisinstallation_installation_tomcatconfig_moaadmin" id="webservice_basisinstallation_installation_tomcatconfig_moaadmin"></a>2.1.2.2.3 Einrichten des MOA SP/SS Administrators </h5>
+ <p>Das MOA SP/SS Webservice kann <span class="term">remote</span> durch den Aufruf einer speziellen URL des Webservices dazu veranlasst werden, seine Konfiguration neu einzulesen (vergleiche Abschnitt <a href="#webservice_basisinstallation_installation_changeonthefly">2.1.2.5</a>). Der Zugriff auf diese URL ist durch eine Passwort-Abfrage gesch&uuml;tzt, und kann nur von Tomcat-Benutzern aufgerufen werden, denen die Tomcat-Benutzer-Rolle <code>moa-admin</code> zugeordnet wurde.</p>
+ <p> Um diese Benutzer-Rolle und einen oder mehrere Benutzer einzurichten, m&uuml;ssen in der Datei <code>$CATALINA_HOME/conf/tomcat-users.xml </code>unter dem Element <code>&lt;tomcat-users&gt;</code> sinngem&auml;&szlig; folgende Eintr&auml;ge hinzugef&uuml;gt werden: </p>
+ <p>
+ <pre>&lt;role rolename="moa-admin"/&gt;
+&lt;user username="moa-chief" password="openSesam" roles="moa-admin"/&gt; </pre>
+<p>Soll der Aufruf dieser URL niemandem erm&ouml;glicht werden, sind die oben beschriebenen Eintr&auml;ge einfach nicht vorzunehmen.</p>
+
+<h4><a name="webservice_basisinstallation_installation_spssdeploy" id="webservice_basisinstallation_installation_spssdeploy"></a>2.1.2.3 Einsatz des MOA SP/SS Webservices in Tomcat</h4>
+<p> Um das MOA SP/SS Webservice in Tomcat f&uuml;r den Einsatz vorzubereiten, sind folgende Schritte notwendig:</p>
+<ul>
+ <li>Die Datei <code>$MOA_SPSS_INST/moa-spss.war</code> enth&auml;lt das einsatzfertige MOA SP/SS Webarchiv und muss ins Verzeichnis <code>$CATALINA_HOME/webapps</code> kopiert werden. Dort wird sie beim ersten Start von Tomcat automatisch ins Verzeichnis <code>$CATALINA_HOME/webapps/moa-spss</code> entpackt. </li>
+ <li>Die zentrale Konfigurationsdatei f&uuml;r MOA SP/SS und die zugeh&ouml;rigen Profil-Verzeichnisse m&uuml;ssen in ein beliebiges Verzeichnis im Dateisystem kopiert werden (z.B. <code>$CATALINA_HOME/conf/moa-spss</code>). Eine funktionsf&auml;hige Konfiguration, die als Ausgangspunkt f&uuml;r die Konfiguration des MOA SP/SS Webservices dienen kann, finden Sie <a href="../../conf/moa-spss/spss.config.xml">hier</a>. </li>
+ <li>Wird Tomcat unter J2SE 1.4.x SDK oder h&ouml;her betrieben, m&uuml;ssen die Dateien <code>xalan.jar</code>, <code>xercesImpl.jar, serializer.jar </code> und <code>xml-apis.jar</code> aus dem Verzeichnis <code>$MOA_SPSS_INST/endorsed</code> in das Tomcat-Verzeichnis <code>$CATALINA_HOME/common/endorsed</code> kopiert werden. Sind gleichnamige Dateien dort bereits vorhanden, m&uuml;ssen sie &uuml;berschrieben werden. Die ggf. in diesem Verzeichnis vorhandene Datei <code>xmlParserAPIs.jar</code> muss gel&ouml;scht werden.</li>
+ <li>Folgende <span class="term">System Properties</span> k&ouml;nnen gesetzt werden (wird beim Starten von Tomcat der <span class="term">Java Virtual Machine</span> in der Umgebungsvariablen <code>CATALINA_OPTS</code> in der Form <code>-D&lt;name&gt;=&lt;wert&gt;</code> &uuml;bergeben):
+ <ul>
+ <li id="klein"><code>moa.spss.server.configuration</code>: Pfad und Name der zentralen Konfigurationsdatei f&uuml;r MOA SP/SS. Eine beispielhafte Konfigurationsdatei finden Sie <a href="../../conf/moa-spss/spss.config.xml">hier</a>. Wird ein relativer Pfad angegeben, wird dieser relativ zum Startverzeichnis der <span class="term">Java Virtual Machine</span> interpretiert. Ist diese <span class="term">System Property</span> nicht gesetzt, wird automatisch eine im Webarchiv unter <code>WEB-INF/conf</code> enthaltene Default-Konfiguration herangezogen.</li>
+ <li id="klein"><code>log4j.configuration</code>: URL der Log4j Konfigurationsdatei. Eine beispielhafte Log4j-Konfiguration finden Sie <a href="../../conf/moa-spss/log4j.properties">hier</a>. Wird eine relative URL angegeben, wird diese als File-URL relativ zum Startverzeichnis der <span class="term">Java Virtual Machine</span> interpretiert. Ist diese <span class="term">System Property</span> nicht gesetzt, wird automatisch eine im Webarchiv unter <code>WEB-INF/classes</code> enthaltene Default-Konfiguration herangezogen.</li>
+ <li id="klein"><code>moa.node.id</code>: Frei w&auml;hlbarer Name des Rechner-Knotens, auf dem MOA SP/SS l&auml;uft. Der Name des Knotens wird bei Log-Ausgaben von MOA SP/SS angef&uuml;hrt und dient zur Unterscheidung mehrerer gleichzeitig betriebener MOA SP/SS Webservice-Instanzen. </li>
+ <li id="klein"><code>javax.net.ssl.trustStore</code>: Pfad und Dateiname des <span class="term">Truststores</span> f&uuml;r vertrauensw&uuml;rdige SSL Client-Zertifikate (optional; nur, wenn SSL Client-Authentisierung durchgef&uuml;hrt werden soll). Ein relativer Pfad werden relativ zum Startverzeichnis der <span class="term">Java Virtual Machine</span> interpretiert.</li>
+ <li id="klein"><code>javax.net.ssl.trustStorePassword</code>: Passwort f&uuml;r den <span class="term">Truststore</span> (optional; nur, wenn SSL Client-Authentisierung durchgef&uuml;hrt werden soll). </li>
+ <li id="klein"><code>javax.net.ssl.trustStoreType</code>: Truststore-Typ (optional; nur, wenn SSL Client-Authentisierung durchgef&uuml;hrt werden soll). Je nach verwendetem Keystore-Typ muss <code>jks</code> (<span class="term">Java Key Store</span>) oder <code>pkcs12</code> (PKCS#12-Datei) angegeben werden.</li>
+ </ul>
+ </li>
+</ul>
+<h4><a name="webservice_basisinstallation_installation_tomcatstartstop" id="webservice_basisinstallation_installation_tomcatstartstop"></a>2.1.2.4 Starten und Stoppen von Tomcat</h4>
+<h5><a name="webservice_basisinstallation_installation_tomcatstartstop_windows" id="webservice_basisinstallation_installation_tomcatstartstop_windows"></a>2.1.2.4.1 Unter Windows</h5>
+<div id="block">
+ <p>Das Verzeichnis <code>$MOA_SPSS_INST/tomcat/win32</code> enth&auml;lt Script-Dateien zum Starten und Stoppen von Tomcat. Vor der erstmaligen Verwendung der Scripts m&uuml;ssen in den ersten Zeilen die Umgebungsvariablen <code>JAVA_HOME</code> (Basisverzeichnis des eingesetzten J2SE SDK) und <code>CATALINA_HOME</code> (Basisverzeichnis der eingesetzten Tomcat-Installation) angepasst werden. Evtl. m&uuml;ssen Sie auch noch die in den Script-Dateien gesetzten, in Abschnitt 2.1.2.3 besprochenen <span class="term">System Properties</span> anpassen. </p>
+</div>
+<h5><a name="webservice_basisinstallation_installation_tomcatstartstop_unix" id="webservice_basisinstallation_installation_tomcatstartstop_unix"></a>2.1.2.4.2 Unter Unix</h5>
+<p>Zun&auml;chst m&uuml;ssen die in Abschnitt 2.1.2.3 besprochenen <span class="term">System Properties</span> mit Hilfe der Umgebungsvariablen <code>CATALINA_OPTS</code> gesetzt sein. Die Datei <code>$MOA_SPSS_INST/tomcat/unix/moa-env.sh</code> enth&auml;lt ein Beispiel daf&uuml;r. Weiters m&uuml;ssen noch die Umgebungsvariablen <code>JAVA_HOME</code> (Basisverzeichnis des eingesetzten J2SE SDK) und <code>CATALINA_HOME</code> (Basisverzeichnis der eingesetzten Tomcat-Installation) angepasst werden.</p>
+<p>Nun kann Tomcat aus seinem Basisverzeichnis mit </p>
+<pre>bin/catalina.sh start</pre>
+gestartet werden. Das Stoppen von Tomcat erfolgt analog mit
+<pre>bin/catalina.sh stop</pre>
+<h5><a name="webservice_basisinstallation_installation_tomcatstartstop_verify" id="webservice_basisinstallation_installation_tomcatstartstop_verify"></a>2.1.2.4.3 Pr&uuml;fen des erfolgreichen Starts </h5>
+<div id="block">
+ <p>Ein erfolgreicher Start des MOA SP/SS Webservices ist an folgender Log-Meldung ersichtlich: <br>
+ </p>
+</div>
+<pre>INFO | 18 10:09:45,155 | main | TID=startup NID=&lt;null&gt; MSG=MOA Konfiguration erfolgreich geladen
+</pre>
+<p>Bei leichten Fehlern in der Konfiguration geben <code>WARN</code> Log-Meldungen unmittelbar davor Aufschluss &uuml;ber fehlerhafte Konfigurations-Eintr&auml;ge.
+ Nach dem Starten von Tomcat steht das MOA SP/SS Webservice f&uuml;r die Server-Signatur und Signatur-Pr&uuml;fung unter den Endpunkten </p>
+<pre>http://&lt;host&gt;:&lt;port&gt;/moa-spss/services/SignatureCreation
+</pre>
+<p>bzw.
+</p>
+<pre>http://&lt;host&gt;:&lt;port&gt;/moa-spss/services/SignatureVerification
+</pre>
+<p>zur Verf&uuml;gung. Die Verf&uuml;gbarkeit des Services k&ouml;nnen Sie einfach &uuml;berpr&uuml;fen, indem Sie die Endpunkte mit einem Web-Browser aufgerufen; dies sollte nach erfolgreichem Start zur Anzeige einer Informationsseite f&uuml;hren. </p>
+<p>Konnte das MOA SP/SS Webservice nicht ordnungsgem&auml;&szlig; gestartet werden, f&uuml;hrt das zu folgender Log-Meldung:</p>
+<pre>FATAL | 18 10:17:03,475 | main | TID=startup NID=&lt;null&gt; <br> MSG=Fehler beim Lesen der MOA Konfiguration: das Service steht nicht zur Verf&uuml;gung
+</pre>
+In diesem Fall geben die <code>WARN</code> bzw. <code>ERROR</code> Log-Meldungen unmittelbar davor Aufschluss &uuml;ber den genaueren Grund.
+<h4><a name="webservice_basisinstallation_installation_changeonthefly" id="webservice_basisinstallation_installation_changeonthefly"></a>2.1.2.5 &Auml;nderung der Konfiguration im laufenden Betrieb </h4>
+<p> Sie k&ouml;nnen die Konfiguration f&uuml;r MOA SP/SS im laufenden Betrieb aktualisieren, in dem Sie mittels eines Web-Browsers folgende URL aufrufen:</p>
+<pre> http://&lt;host&gt;:&lt;port&gt;/moa-spss/ConfigurationUpdate </pre>
+<p>Damit dies funktioniert, muss in der Konfiguration von Tomcat ein spezieller Benutzer sowie eine spezielle Benutzerrolle eingerichtet werden (vergleiche Abschnitt <a href="#webservice_basisinstallation_installation_tomcatconfig_moaadmin">2.1.2.2.3</a>). </p>
+<h3><a name="webservice_basisinstallation_logging" id="webservice_basisinstallation_logging"></a>2.1.3 Logging </h3>
+<p>Das MOA SP/SS Webservice verwendet <a href="#referenziertesoftware">Jakarta Log4j</a> f&uuml;r die Ausgabe von Log-Meldungen am Bildschirm bzw. in Log-Dateien. Log4j bietet zahlreiche Konfigurationsm&ouml;glichkeiten, die ausf&uuml;hrlich im <a href="#referenziertesoftware">Jakarta Log4j</a> Handbuch beschrieben sind. Unter anderem gibt es die M&ouml;glichkeit, folgende Einstellungen vorzunehmen:
+<ul>
+ <li id="klein">
+ <p>Das verwendete Log-Level (<code>DEBUG</code>, <code>INFO</code>, <code>WARN</code>, <code>ERROR</code>, <code>FATAL</code>);</p>
+ </li>
+ <li id="klein">
+ <p>Name und maximale Gr&ouml;&szlig;e der Log-Datei(en);</p>
+ </li>
+ <li id="klein">
+ <p>Das Aussehen der Log-Eintr&auml;ge.</p>
+ </li>
+</ul>
+ <p>Das MOA SP/SS Webservice verwendet folgende Log-Hierarchien: </p>
+<ul>
+ <li>
+ <p><code>moa.spss.server</code> f&uuml;r alle Log-Meldungen aus dem MOA/SPSS Webservice; </p>
+ </li>
+ <li>
+ <p><code>iaik.server</code> f&uuml;r alle Log-Meldungen aus den SIC/IAIK Kryptographie-Modulen. </p>
+ </li>
+</ul>
+ <p>Eine f&uuml;r MOA SP/SS passende Konfigurationsdatei f&uuml;r Log4j finden Sie <a href="../../conf/moa-spss/log4j.properties">hier</a>. Wird diese Datei als Logging-Konfiguration verwendet, so werden alle Log-Meldungen sowohl in die Konsole, als auch in die Datei <code>moa-spss.log</code> geschrieben. </p>
+ <h4><a name="webservice_basisinstallation_logging_format" id="webservice_basisinstallation_logging_format"></a>2.1.3.1 Format der Log-Meldungen</h4>
+ <p> Anhand einer konkreten Log-Meldung wird das Format der MOA SP/SS Log-Meldungen erl&auml;utert: </p>
+ <pre>INFO | 01 21:25:26,540 | Thread-3 | TID=1049225059594-100 NID=node1
+ MSG=Starte neue Transaktion: TID=1049225059594-100, Service=SignatureVerification
+</pre>
+<p> Der Wert <code>INFO</code> besagt, dass die Log-Meldung im Log-Level <code>INFO</code> entstanden ist. Folgende Log-Levels existieren:</p>
+ <ul>
+ <li>
+ <p><code>DEBUG</code>: Log-Meldungen im Log-Level <code>DEBUG</code> geben Auskunft &uuml;ber die innere Arbeitsweise des Systems. Sie sind haupts&auml;chlich f&uuml;r Entwickler interessant.</p>
+ </li>
+ <li>
+ <p><code>INFO</code>: Diese Log-Meldungen geben Status-Informationen &uuml;ber den Ablauf des Webservices, wie z.B. &uuml;ber das Einlangen einer neuen Anfrage.</p>
+ </li>
+ <li>
+ <p><code>WARN</code>: Bei der Ausf&uuml;hrung einer Anfrage sind leichte Fehler aufgetreten. Der Ablauf des Webservices ist nicht weiter beeintr&auml;chtigt.</p>
+ </li>
+ <li>
+ <p><code>ERROR</code>: Die Ausf&uuml;hrung einer Anfrage musste abgebrochen werden. Das Webservice ist davon nicht beeintr&auml;chtigt. </p>
+ </li>
+ <li>
+ <p><code>FATAL</code>: Es ist ein Fehler aufgetreten, der den weiteren Betrieb des Webservices nicht mehr erlaubt.</p>
+ </li>
+ </ul>
+ <p>Der n&auml;chste Wert <code>01 21:25:26,540</code> gibt den Zeitpunkt an, zu dem die Log-Meldung generiert wurde (in diesem Fall den 1. Tag im aktuellen Monat, sowie die genaue Uhrzeit). </p>
+ <p> Der Wert <code>Thread-3</code> bezeichnet den Thread, von dem die Anfrage bearbeitet wird.</p>
+ <p> Der Wert von <code>TID</code> gibt die f&uuml;r jede Anfrage eindeutige Transaktions-ID an. Log-Meldungen, die bei der Abarbeitung dieser Anfrage geschrieben werden, enthalten alle einen Hinweis auf die entsprechende Transaktions-ID.</p>
+ <p> Der Wert von <code>NID</code> gibt den Rechner-Knoten an, auf dem das MOA SP/SS Webservice l&auml;uft (bei <code>NID=&lt;null&gt;</code> ist dieser Wert nicht konfiguriert, vergleiche Abschnitt <a href="#webservice_basisinstallation_installation_spssdeploy">2.1.2.3</a>).</p>
+ <p> Der Rest der Zeile einer Log-Meldung ist der eigentliche Text, mit dem das System bestimmte Informationen anzeigt. Im Fehlerfall ist h&auml;ufig ein Java Stack-Trace angef&uuml;gt, der eine genauere Ursachen-Forschung erm&ouml;glicht.</p>
+ <h4> <a name="webservice_basisinstallation_logging_messages" id="webservice_basisinstallation_logging_messages"></a>2.1.3.2 Wichtige Log-Meldungen</h4>
+ <p> Neben den im Abschnitt <a href="#webservice_basisinstallation_installation_tomcatstartstop_verify">2.1.2.4.3</a> beschriebenen Log-Meldungen, die anzeigen, ob das Service ordnungsgem&auml;&szlig; gestartet wurde, geben nachfolgenden Log-Meldungen Aufschluss &uuml;ber die Abarbeitung von Anfragen. </p>
+ <p>Die Entgegennahme einer Anfrage wird angezeigt durch:
+
+ </p>
+ <pre>INFO | 01 21:25:26,540 | Thread-3 | TID=1049225059594-100 NID=&lt;null&gt;
+ MSG=Starte neue Transaktion: TID=1049225059594-100, Service=SignatureVerification
+INFO | 01 21:25:26,540 | Thread-3 | TID=1049225059594-100 NID=&lt;null&gt;
+ MSG=Aufruf von Adresse=127.0.0.1
+INFO | 01 21:25:26,540 | Thread-3 | TID=1049225059594-100 NID=&lt;null&gt;
+ MSG=Client-Zertifikat nicht verf&uuml;gbar</pre>
+ <p> Die dritte Log-Meldung besagt, dass f&uuml;r die Abarbeitung dieser Anfrage kein Client-Zertifikat verf&uuml;gbar ist (entweder, weil die Anfrage &uuml;ber HTTP eingelangt ist, oder weil die SSL Client-Authentisierung nicht eingeschaltet ist). Bei erfolgreicher SSL Client-Authentisierung, gibt beispielsweise folgende Log-Meldung Informationen &uuml;ber das Client-Zertifikat aus:
+ <pre>INFO | 12 13:58:08,772 | Thread-10 | TID=1045054687159-2 NID=&lt;null&gt;
+ MSG=Client-Zertifikat: Subject=CN=Testuser, OU=MOA, O=BRZ, L=Vienna, ST=Vienna, C=AT,
+ Serial=1.039.104.204, Issuer=CN=TestCA, OU=MOA, O=BRZ, L=Vienna, ST=Vienna, C=AT</pre>
+ <p>Eine erfolgreich abgearbeitete Anfrage wird angezeigt durch:
+ </p>
+ <pre>INFO | 01 21:25:53,168 | Thread-3 | TID=1049225059594-106 NID=&lt;null&gt;
+ MSG=Anfrage erfolgreich abgearbeitet</pre>
+ <p>Ein Fehler beim Abarbeiten der Anfrage wird angezeigt durch: </p>
+ <pre>INFO | 01 21:25:27,642 | Thread-3 | TID=1049225059594-100 NID=&lt;null&gt;
+ MSG=Fehler beim Abarbeiten der Anfrage</pre>
+ <div id="block">
+ <p>In diesem Fall gibt der mitgeloggte Stacktrace Auskunft &uuml;ber die Art des Fehlers. Der Aufrufer des MOA SP/SS Webservices bekommt einen Fehlercode sowie eine kurze Beschreibung des Fehlers als Antwort zur&uuml;ck. </p>
+ <p> Die Tats&auml;chlich &uuml;bertragenen Anfragen bzw. Antworten werden aus Effizienzgr&uuml;nden nur im Log-Level <code>DEBUG</code> angezeigt. </p>
+ </div>
+ <h2><a name="webservice_erweiterungsmöglichkeiten" id="webservice_erweiterungsmöglichkeiten"></a>2.2 Erweiterungsm&ouml;glichkeiten</h2>
+<p>Ausgehend von der <a href="#webservice_basisinstallation">Basisinstallation</a> k&ouml;nnen die optionalen Erweiterungen, die in den nachfolgenden Abschnitten beschrieben werden, unabh&auml;ngig und in beliebiger Kombination aufgesetzt werden.</p>
+ <h3><a name="webservice_erweiterungsmöglichkeiten_webserver" id="webservice_erweiterungsmöglichkeiten_webserver"></a>2.2.1 Vorgeschalteter Webserver</h3>
+ <h4><a name="webservice_erweiterungsmöglichkeiten_webserver_iis" id="webservice_erweiterungsmöglichkeiten_webserver_iis"></a>2.2.1.1 Microsoft Internet Information Server (MS IIS) </h4>
+ <p>Den MOA SP/SS Webservices kann optional ein MS IIS vorgeschaltet sein. In diesem Fall &uuml;bernimmt der MS IIS die HTTP- bzw. HTTPS-Kommunikation mit dem Aufrufer des Webservices. Die Kommunikation zwischen MS IIS und dem in Tomcat eingerichteten MOA SP/SS Webservice wird durch <span class="term">Jakarta mod_jk</span> durchgef&uuml;hrt. Die angef&uuml;hrten Konfigurationsschritte gehen von einer MS IIS Standard-Installation aus.</p>
+ <h5><a name="webservice_erweiterungsmöglichkeiten_webserver_iis_jk" id="webservice_erweiterungsmöglichkeiten_webserver_iis_jk"></a>2.2.1.1.1 Konfiguration von <span class="term">Jakarta mod_jk</span> im MS IIS</h5>
+ <p> F&uuml;r die Kommunikation des MS IIS mit dem im Tomcat eingerichteten MOA SP/SS Webservice wird das <span class="term">ISAPI</span>-Modul von <span class="term">Jakarta mod_jk</span> im MS IIS installiert und konfiguriert. Eine detaillierte Installations- und Konfigurationsanleitung gibt das <span class="term"><a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/howto/iis.html" target="_blank">mod_jk</a></span><a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/iishowto.html"> IIS HowTo</a>. Beispiele f&uuml;r <code>workers.properties</code> und <code>uriworkermap.properties</code> Dateien liegen im Verzeichnis <code>$MOA_SPSS_INST/tomcat</code> bei.</p>
+ <h5><a name="webservice_erweiterungsmöglichkeiten_webserver_iis_tomcat" id="webservice_erweiterungsmöglichkeiten_webserver_iis_tomcat"></a>2.2.1.1.2 Konfiguration von Tomcat</h5>
+ <p> Damit Tomcat die Aufrufe entgegennehmen kann, die von MS IIS mittels <span class="term">Jakarta mod_jk</span> weiterleitet werden, muss in <code>$CATALINA_HOME/conf/server.xml</code> der <span class="term">AJP 1.3 Connector</span> aktiviert werden. Im Gegenzug k&ouml;nnen die Konnektoren f&uuml;r HTTP und HTTPS deaktiviert werden. Das geschieht am einfachsten durch Ein- bzw. Auskommentieren der entsprechenden <code>Connector</code> Konfigurations-Elemente in dieser Datei. Die Datei <code>$MOA_SPSS_INST/tomcat/server.mod_jk.xml</code> enth&auml;lt eine Konfiguration, die ausschlie&szlig;lich den Port f&uuml;r den <span class="term">AJP 1.3 Connector</span> offen l&auml;sst.</p>
+ <h5><a name="webservice_erweiterungsmöglichkeiten_webserver_iis_ssl" id="webservice_erweiterungsmöglichkeiten_webserver_iis_ssl"></a>2.2.1.1.3 Konfiguration von SSL</h5>
+ <p> Die Dokumentation zum Einrichten von SSL auf dem MS IIS steht nach Installation des IIS unter http://localhost/iisHelp/ oder aber auch auf den Websiten vo Mircrosoft zur Verf&uuml;gung. </p>
+ <h4><a name="webservice_erweiterungsm&ouml;glichkeiten_webserver_apache" id="webservice_erweiterungsm&ouml;glichkeiten_webserver_apache"></a>2.2.1.2 Apache</h4>
+ <p>Den MOA SP/SS Webservices kann ein Apache Webserver vorgeschaltet sein. Das Prinzip funktioniert wie bei MS IIS, auch hier wird <span class="term">Jakarta mod_jk</span> f&uuml;r die Kommunikation zwischen Webserver und Tomcat eingesetzt. Die angef&uuml;hrten Konfigurationsschritte gehen von einer Standard-Installation des Apache Webservers aus und sind ident f&uuml;r die Versionen 1.3.x und 2.0.x.</p>
+ <h5><a name="webservice_erweiterungsmöglichkeiten_webserver_apache_jk" id="webservice_erweiterungsmöglichkeiten_webserver_apache_jk"></a>2.2.1.2.1 Konfiguration von <span class="term">Jakarta mod_jk</span> im Apache </h5>
+ <p>Um das MOA-SPSS Webservice hinter einem Apache Webserver zu betreiben, ist die Konfiguration des Apache-Moduls <span class="term">mod_jk</span> erforderlich. Eine detaillierte Installations- und Konfigurationsanleitung gibt das <span class="term"><a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/howto/apache.html" target="_blank">mod_jk</a></span><a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/howto/apache.html" target="_blank"> Apache HowTo</a>. Ein Beispiel f&uuml;r eine <code>workers.properties</code> Datei liegt im Verzeichnis <code>$MOA_SPSS_INST/tomcat</code> bei.</p>
+ <p>Um das MOA SP/SS Webservice dem Apache Webserver bekannt zu machen, sind zumindest folgende Eintr&auml;ge im globalen Kontext der Apache-Konfigurationsdatei notwendig:</p>
+ <pre>LoadModule jk_module /usr/lib/apache/mod_jk.so<br>AddModule jk_module<br>JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories<br>JkWorkersFile conf/workers.properties <br>JkMount /moa-spss/* moaworker </pre>
+ <p>Die Pfad- und Dateinamen k&ouml;nnen je nach existierender Apache Installation geringf&uuml;gig variieren.</p>
+ <h5><a name="webservice_erweiterungsmöglichkeiten_webserver_apache_tomcat" id="webservice_erweiterungsmöglichkeiten_webserver_apache_tomcat"></a>2.2.1.2.2 Konfiguration von Tomcat</h5>
+ <p>Die Konfiguration von Tomcat ist analog zu Abschnitt <a href="#webservice_erweiterungsm&#246;glichkeiten_webserver_iis_tomcat">2.2.1.1.2</a> durchzuf&uuml;hren.</p>
+ <h5><a name="webservice_erweiterungsmöglichkeiten_webserver_apache_ssl" id="webservice_erweiterungsmöglichkeiten_webserver_apache_ssl"></a>2.2.1.2.2 Konfiguration von SSL mit <span class="term">mod_SSL</span></h5>
+ <p>Apache kann in Verbindung mit <span class="term">mod_SSL</span> als SSL-Endpunkt f&uuml;r das MOA SP/SS Webservice fungieren. In diesem Fall entf&auml;llt die SSL-Konfiguration in Tomcat, da Apache und Tomcat auch im Fall von SSL Daten via <span class="term">mod_jk</span> austauschen. Eine detaillierte Installations- und Konfigurationsanleitung enth&auml;lt die <a href="http://www.modssl.org/docs/" target="_blank">Online-Dokumentation</a> von <span class="term">mod_SSL</span>.</p>
+ <p>Bei der Verwendung von Client-Authentisierung muss darauf geachtet werden, dass <span class="term">mod_ssl</span> die HTTP-Header mit den Informationen &uuml;ber das Client-Zertifikat exportiert. Dies wird durch Angabe der folgenden Option in der Apache-Konfiguration erreicht: </p>
+ <pre>SSLOptions +ExportCertData +StdEnvVars</pre>
+ <p>Je nach vorhandener SSL-Konfiguration des Apache Webservers kann diese Option im globalen Kontext, im Kontext des Virtual Hosts oder im Kontexts eines Verzeichnisses spezifiziert werden.</p>
+ <h3><a name="webservice_erweiterungsmöglichkeiten_datenbank" id="webservice_erweiterungsmöglichkeiten_datenbank"></a>2.2.2 Datenbank</h3>
+ <p>Die MOA SP/SS Module k&ouml;nnen eine Datenbank zum Archivieren von Certificate Revocation Lists (CRLs), sowie zum Abspeichern von Log-Meldungen verwenden. In beiden F&auml;llen wird eine installierte und konfigurierte Datenbank vorausgesetzt.</p>
+ <h4><a name="webservice_erweiterungsmöglichkeiten_datenbank_postgresql" id="webservice_erweiterungsmöglichkeiten_datenbank_postgresql"></a>2.2.2.1 PostgreSQL</h4>
+ <p>Eine detaillierte &Uuml;bersicht &uuml;ber die Installation und Konfiguration von <span class="term">PostgreSQL</span> gibt die <a href="http://techdocs.postgresql.org/" target="_blank">Online-Dokumentation</a>. </p>
+ <p class="term">Bitte beachten Sie: Eine M&ouml;glichkeit, PostgreSQL unter MS Windows zu installieren, besteht darin, <a href="http://sources.redhat.com/cygwin/" target="_blank">Cygwin</a> mit dem PostgreSQL-Package zu installieren. Alternative Installationsvarianten werden auf <a href="http://techdocs.postgresql.org/guides/Windows" target="_blank">dieser Seite</a> angef&uuml;hrt.</p>
+ <h5><a name="webservice_erweiterungsmöglichkeiten_datenbank_postgresql_benutzer" id="webservice_erweiterungsmöglichkeiten_datenbank_postgresql_benutzer"></a>2.2.2.1.1 Anlegen eines Benutzers und einer Datenbank f&uuml;r MOA SP/SS</h5>
+ <p>Damit die MOA SP/SS Module eine Verbindung zu <span class="term">PostgreSQL</span> aufbauen kann, m&uuml;ssen der Name eines <span class="term">PostgreSQL</span>-Benutzers und einer <span class="term">PostgreSQL</span>-Datenbank bekannt sein. Sollten diese nicht vorhanden sein, kann mit folgenden Kommandos ein Benutzer namens <code>moa</code> und eine Datenbank namens <code>moadb</code> angelegt werden:</p>
+ <pre>createuser -U postgres -d -A -P moa<br>createdb -U moa moadb</pre>
+ <p>Da die MOA SP/SS Module &uuml;ber <span class="term">JDBC</span> mit der Datenbank kommunizieren, ist in der Folge die Angabe einer <span class="term">JDBC</span>-URL notwendig, welche die Verbindungsparameter enth&auml;lt. Wurden der Benutzer und die Datenbank wie im obigen Beispiel angelegt, ist folgende <span class="term">JDBC</span>-URL anzugeben (Annahme: als Passwort f&uuml;r den Benutzer moa wurde moapass gew&auml;hlt):</p>
+ <pre> jdbc:postgresql://host/moadb?user=moa&amp;password=moapass</pre>
+ <p>Die Zeichen <code>jdbc:postgresql://</code> sind unver&auml;nderliche Bestandteile einer <span class="term">PostgreSQL</span> <span class="term">JDBC</span>-URL. <code>host</code> gibt den Rechner an, auf dem <span class="term">PostgreSQL</span> l&auml;uft. <code>moadb</code> identifiziert den Namen der Datenbank. &Uuml;ber die Parameter <code>user=</code> und <code>pass=</code> werden Benutzername und Passwort f&uuml;r den DB-User bekanntgegeben.</p>
+ <h5><a name="webservice_erweiterungsmöglichkeiten_datenbank_postgresql_crls" id="webservice_erweiterungsmöglichkeiten_datenbank_postgresql_crls"></a>2.2.2.1.2 Archivierung von CRLs</h5>
+ <p>Zum Archivieren von CRLs m&uuml;ssen in der MOA SP/SS Konfigurationsdatei die Kinder des Elements <code>cfg:MOAConfiguration/cfg:SignatureVerification/cfg:CertificateValidation/cfg:RevocationChecking/cfg:Archiving</code> entsprechend
+ konfiguriert werden: </p>
+ <ul>
+ <li><code>cfg:EnableArchiving</code> muss auf den Wert <code>true</code> gesetzt sein;</li>
+ <li><code>cfg:ArchiveDuration</code> muss als nichtnegative Ganzzahl die maximale Archivierungsdauer in Tagen enthalten;</li>
+ <li><code>cfg:Archive</code> muss genau ein Element <code>cfg:DatabaseArchive</code> enthalten, das wiederum aus zwei Elementen
+ bestehen muss:
+ <ul>
+ <li><code>cfg:JDBCURL</code> muss eine g&uuml;ltige JDBC-URL enthalten, mit der auf die Datenbank zur Archivierung
+ zugegriffen werden kann (<span class="remark">Hinweis: da es sich hierbei um einen Eintrag
+ in eine XML-Datei handelt, muss das Zeichen <code>&amp;</code> in der in Abschnitt <a href="#webservice_erweiterungsm&#246;glichkeiten_datenbank_postgresql_benutzer">2.2.2.1.1</a> gezeigten
+ JDBC-URL
+ durch die Zeichenfolge <code>&amp;amp;</code> ersetzt werden.</span>);</li>
+ <li><code>cfg:JDBCDriverClassName</code> muss den vollst&auml;ndig qualifizierten Java-Klassennamen des JDBC-Treibers
+ enthalten. </li>
+ </ul>
+ </li>
+ </ul>
+ <p>Vergleiche auch Abschnitt <a href="../config/config.html#konfigurationsparameter_sp_certificatevalidation_revocationchecking_archiving">2.3.1.3.4</a> im
+ Konfigurationshandbuch.</p>
+ <h5><a name="webservice_erweiterungsmöglichkeiten_datenbank_postgresql_logging" id="webservice_erweiterungsmöglichkeiten_datenbank_postgresql_logging"></a>2.2.2.1.3 Logging</h5>
+ <p>F&uuml;r das Logging in eine <span class="term">PostgreSQL</span> Datenbank mittels <span class="term">Jakarta Log4j</span> muss zun&auml;chst eine Tabelle f&uuml;r die Log-Meldungen angelegt werden. Dies kann mit folgendem SQL-Statement erreicht werden:</p>
+ <pre> create table spss_log (log_time timestamp, log_level varchar(5), log_msg text);</pre>
+ <p>Damit <span class="term">Log4j</span> die Log-Meldungen in diese Datenbanktabelle schreibt, muss die <span class="term">Log4j</span>-Konfiguration adaptiert werden. Die mit MOA SP/SS mitgelieferte, beispielhafte <a href="../../conf/moa-spss/log4j.properties">Log4j-Konfiguration</a> enth&auml;lt bereits die notwendigen Eintr&auml;ge f&uuml;r das Logging in eine PostgreSQL Datenbank, die jedoch standardm&auml;&szlig;ig ausgeschaltet sind. </p>
+ <p>Wie beim Caching von CRLs ist auch hier die Angabe einer <span class="term">JDBC</span>-URL notwendig, damit die MOA SP/SS Module eine Verbindung zur Datenbank aufnehmen k&ouml;nnen.</p>
+ <p><span class="remark">Bitte beachten Sie: Bei Tests hat sich das Logging in eine Datenbank mit Jakarta Log4j als Performance-Engpass herausgestellt. Es wird deshalb empfohlen, dieses Feature mit Bedacht einzusetzen.</span></p>
+ <h4><a name="webservice_erweiterungsmöglichkeiten_datenbank_andere" id="webservice_erweiterungsmöglichkeiten_datenbank_andere"></a>2.2.2.2 Andere Datenbanken </h4>
+ <p>&Uuml;ber die generische Anbindung JDBC k&ouml;nnen auch andere Datenbanken f&uuml;r die Archivierung von CRLs bzw. f&uuml;r die Speicherung der Log-Meldungen eingesetzt werden. Hinweise zu bestimmten Datenbanken finden Sie in den <a href="../faq/faq.html">FAQ</a>. </p>
+ <p>Die in Abschnitt <a href="#webservice_erweiterungsm&#246;glichkeiten_datenbank_postgresql">2.2.2.1</a> gemachten Angaben zu Archivierung von CRLs bzw. zur Speicherung von Log-Meldungen gelten sinngem&auml;&szlig;. </p>
+ <h3><a name="webservice_erweiterungsmöglichkeiten_hsm" id="webservice_erweiterungsmöglichkeiten_hsm"></a>2.2.3 Hardware Security Module (HSM)</h3>
+ <p>MOA SS kann f&uuml;r die Erstellung von Signaturen auf die Dienste eines HSM zur&uuml;ckgreifen. Voraussetzung daf&uuml;r ist, dass f&uuml;r das HSM eine Implementierung der Schnittstelle PCKS#11 (PKCS#11-Bibliothek) angeboten wird. </p>
+ <p>F&uuml;r die Einbindung des HSM in MOA SS m&uuml;ssen zun&auml;chst die Bibliotheken aus <code>$MOA_SPSS_INST/pkcs11</code> in ein beliebiges Verzeichnis kopiert werden, welches dann in den Libray-Pfad des jeweiligen Betriebssystems aufgenommen werden muss (Windows: Umgebungsvariable <code>PATH</code>; Linux: Umgebungsvariable <code>LD_LIBRARY_PATH</code>). </p>
+ <p>Der Name der f&uuml;r das HSM spezifischen PKCS#11-Bibliothek muss in der Konfigurationsdatei eingetragen werden (vergleiche Abschnitt <a href="../config/config.html#konfigurationsparameter_ss_keymodules_hardwarekeymodule">2.2.1.1</a> des Konfigurationshandbuchs).</p>
+ <h1><a name="klassenbibliothek"></a>3 Klassenbibliothek</h1>
+ <p>Dieser Abschnitt beschreibt die Verwendung von MOA SP/SS als Klassenbibliothek. Im ersten Unterkapitel wird eine minimale Basisinstallation beschrieben. Das zweite Unterkapitel zeigt eine Reihe von optionalen Erweiterungsm&ouml;glichkeiten auf.</p>
+ <h2><a name="klassenbibliothek_basisinstallation" id="klassenbibliothek_basisinstallation"></a>3.1 Basisinstallation</h2>
+ <h3><a name="klassenbibliothek_basisinstallation_einfuehrung" id="klassenbibliothek_basisinstallation_einfuehrung"></a>3.1.1 Einf&uuml;hrung </h3>
+ <p>Die Basisinstallation der Klassenbibliothek stellt einerseits die minimalen Anforderungen f&uuml;r den Einsatz von MOA SP/SS als Klassenbibliothek dar, andererseits dient sie als Ausgangspunkt f&uuml;r optionale Erweiterungsm&ouml;glichkeiten.</p>
+ <p> Folgende Software ist Voraussetzung f&uuml;r die Basisinstallation der Klassenbibliothek: </p>
+ <ul>
+ <li><a href="#referenziertesoftware">J2SE 1.4.x JRE</a> oder <a href="#referenziertesoftware">J2SE 5.0 JRE</a> </li>
+ </ul>
+ <h3><a name="klassenbibliothek_basisinstallation_vorbereitung" id="klassenbibliothek_basisinstallation_vorbereitung"></a>3.1.2 Vorbereitung </h3>
+ <p>Die folgenden Schritte dienen der Vorbereitung der Installation.</p>
+ <dl>
+ <dt>Installation von J2SE SDK</dt>
+ <dd>Installieren Sie<a href="#referenziertesoftware"> J2SE 1.4.x SDK</a> oder <a href="#referenziertesoftware">J2SE 5.0 SDK</a> in ein beliebiges Verzeichnis. Wir empfehlen die Installation von <a href="#referenziertesoftware">J2SE 5.0 SDK</a>. Das Wurzelverzeichnis der J2SE SDK Installation wird im weiteren Verlauf als <code>$JAVA_HOME</code> bezeichnet. </dd>
+ <dt>Entpacken der MOA SP/SS Klassenbibliotheks-Distribution</dt>
+ <dd> Entpacken Sie die Datei <code>moa-spss-1.5.0-lib.zip</code> in ein beliebiges Verzeichnis. Dieses Verzeichnis wird im weiteren Verlauf als <code>$MOA_SPSS_INST</code> bezeichnet. </dd>
+ <dt>Installation der Krypographiebibliotheken von SIC/IAIK</dt>
+ <dd>
+ <p>Die Installation der Kryptographiebibliotheken von <a href="http://jce.iaik.tugraz.at/" target="_blank">SIC/IAIK</a>:</p>
+ <dl>
+ <dt>J2SE 1.4.x SDK oder JSE 5.0 SDK </dt>
+ <dd>Kopieren Sie alle Dateien aus dem Verzeichnis <code>$MOA_SPSS_INST/ext</code> in das Verzeichnis <code>$JAVA_HOME/jre/lib/ext</code>. Zus&auml;tzlich m&uuml;ssen Sie die Rechtedateien Ihres J2SE 1.4.x SDK bzw. J2SE 5.0 SDK austauschen. Laden Sie dazu die <span class="term">Unlimited Strength Jurisdiction Policy Files</span> von der <a href="http://java.sun.com/j2se/1.4.2/download.html" target="_blank">J2SE 1.4.x SDK Downloadseite</a> bzw. <a href="http://java.sun.com/j2se/1.5.0/download.html">J2SE 5.0 SDK Downloadseite</a> und folgen Sie der darin enthaltenen Installationsanweisung. </dd>
+ </dl>
+ </dd>
+ </dl>
+ <h3><a name="klassenbibliothek_basisinstallation_verwendung" id="klassenbibliothek_basisinstallation_verwendung"></a>3.1.3 Verwendung</h3>
+ <p> Um die MOA SP/SS Klassenbibliothek in einer Applikation verwenden zu k&ouml;nnen, m&uuml;ssen die mit MOA SP/SS ausgelieferten Bibliotheken in den Java Klassenpfad der Applikation eingebunden werden. </p>
+ <p>Die nachfolgende Tabelle listet diese Klassenbibliotheken auf; die Eintr&auml;ge in der Spalte Dateien sind relativ zum Verzeichnis <code>$MOA_SPSS_INST</code> zu interpretieren.</p>
+<table class="fixedWidth" border="1" cellpadding="2">
+<tbody><tr>
+<th>Klassenbibliothek</th><th>Version</th><th>Dateien</th>
+
+</tr><tr>
+<td>MOA SP/SS</td>
+<td>1.5.0&nbsp; </td>
+<td><code>moa-spss.jar</code>, <code>moa-common.jar</code></td>
+</tr><tr>
+<td>MOA IAIK</td>
+<td>1.26&nbsp; </td>
+<td><p><code>lib/iaik_moa-1.26.jar</code>,
+ <code>lib/iaik_cms-3.2.jar</code>, <code>lib/iaik_ixsil-1.2.2.4.jar</code></p>
+ </td>
+</tr>
+<tr>
+ <td>Mail</td>
+ <td>1.4&nbsp; </td>
+ <td><code>lib/mail-1.4.jar</code></td>
+</tr>
+<tr>
+ <td>Activation</td>
+ <td>1.4&nbsp; </td>
+ <td><code>lib/activation-1.1.jar</code></td>
+</tr>
+<tr>
+<td>Xerces-J</td>
+<td>2.7.1&nbsp; </td>
+<td><code>lib/xercesImpl.jar</code></td>
+</tr><tr>
+<td>Xalan-J</td>
+<td>2.7.0&nbsp; </td>
+<td><p><code>lib/xalan.jar</code>, <code>lib/xml-apis.jar</code>, <code>lib/serializer.jar</code></p>
+ <p class="remark">Bitte beachten Sie: Wenn Sie J2SE 1.4.2 JRE oder J2SE 5.0 JRE verwenden, m&uuml;ssen Sie diese Bibliothek der Java VM als endorsed bekanntgeben. Sie k&ouml;nnen dies tun, indem Sie entweder</p>
+ <ul>
+ <li class="remark">die Bibliothek in das (ggf. vorher anzulegende) Verzeichnis <code>$JAVA_HOME/jre/lib/endorsed/</code> kopieren; oder</li>
+ <li class="remark">die System Property <code>java.endorsed.dirs</code> verwenden, und als Wert den Pfad zu jenem Verzeichnis angeben, in dem Sie die Bibliothek vorhalten (also z.B. <code>java.endorsed.dirs=c:/mylibdir</code>).</li>
+ </ul></td>
+</tr><tr>
+<td>Jaxen</td><td>1.0&nbsp; </td>
+<td><code>lib/jaxen-1.0-FCS.jar</code>, <code>lib/saxpath-1.0-FCS.jar</code></td>
+
+</tr><tr>
+<td>Commons-Logging</td>
+<td>1.0.4&nbsp; </td>
+<td><code>lib/commons-logging-1.0.4.jar</code></td>
+</tr><tr>
+<td>Log4j</td>
+<td>1.2.8&nbsp; </td>
+<td><code>lib/log4j-1.2.8.jar</code></td>
+</tr>
+<tr>
+ <td>Commons-Discovery</td><td>0.2&nbsp; </td><td><code>lib/commons-discovery-0.2.jar</code></td>
+</tr>
+<tr>
+ <td>Postgres JDBC2</td><td>7.3&nbsp; </td><td><p><code>lib/postgresql-7.2.jar</code></p>
+ <p><span class="remark">Bitte beachten Sie: Wenn Sie keine Datenbank f&uuml;r MOA SP/SS verwenden (vergleiche </span><a href="#webservice_erweiterungsm&#246;glichkeiten_datenbank">2.2.2</a><span class="remark">), ben&ouml;tigen Sie diese Bibliothek nicht.</span></p></td>
+</tr><tr>
+</tr>
+<tr>
+ <td>Axis</td><td>1.4&nbsp; </td><td><code>lib/axis-1.4.jar, lib/axis-jaxrpc-1.4.jar, lib/axis-saaj-1.4.jar, lib/axis-wsdl4j-1.5.1.jar</code></td>
+</tr>
+</tbody></table>
+
+ <h3><a name="klassenbibliothek_basisinstallation_logging" id="klassenbibliothek_basisinstallation_logging"></a>3.1.4 Logging</h3>
+ <p> Die MOA SP/SS Klassenbibliothek verwendet <a href="#referenziertesoftware">Jakarta Log4j</a> f&uuml;r die Ausgabe von Log-Meldungen am Bildschirm bzw. in Log-Dateien. Die im Abschnitt <a href="#webservice_basisinstallation_logging">2.1.3</a> gemachten Aussagen lassen sich gro&szlig;teils auf den Einsatz der MOA SP/SS Klassenbibliothek &uuml;bertragen. </p>
+ <h2><a name="klassenbibliothek_erweiterungsmöglichkeiten" id="klassenbibliothek_erweiterungsmöglichkeiten"></a>3.2 Erweiterungsm&ouml;glichkeiten </h2>
+ <p>Die im Abschnitt <a href="#webservice_erweiterungsm&#246;glichkeiten">2.2</a> angef&uuml;hrten Erweiterungsm&ouml;glichkeiten f&uuml;r die MOA SP/SS Webservices gelten in analoger Weise auch f&uuml;r die Klassenbibliothek.</p>
+ <h1><a name="referenzierte_software"></a>A Referenzierte Software</h1>
+<p>Auf folgende Software-Pakete wird in diesem Handbuch verwiesen:</p>
+<table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <th scope="col">Name</th>
+ <th scope="col">Beschreibung</th>
+ </tr>
+ <tr>
+ <td><a href="http://jakarta.apache.org/tomcat/index.html" target="_blank">Apache Tomcat 4.1.x </a></td>
+ <td>Servlet-Container des Apache Jakarta Projekts in der Version 4.1.x </td>
+ </tr>
+ <tr>
+ <td><a href="http://java.sun.com/j2se/1.4.2/" target="_blank">J2SE 1.4.x SDK/JRE</a></td>
+ <td>Java 2 Standard Edition in der Version 1.4.x (Software Development Kit bzw. Java Runtime Environment) </td>
+ </tr>
+ <tr>
+ <td><a href="http://java.sun.com/j2se/1.5.0/" target="_blank">J2SE 5.0 SDK/JRE</a> </td>
+ <td>Java 2 Standard Edition in der Version 5.0 (Software Development Kit bzw. Java Runtime Environment) </td>
+ </tr>
+ <tr>
+ <td><a href="http://jakarta.apache.org/log4j/" target="_blank">Jakarta Log4J </a></td>
+ <td>Logging Framework des Apache Jakarta Projekts </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/spss/handbook/handbook/intro/intro.html b/spss/handbook/handbook/intro/intro.html
new file mode 100644
index 000000000..5fef6eae7
--- /dev/null
+++ b/spss/handbook/handbook/intro/intro.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+ <title>MOA SS und SP - Einf&uuml;hrung</title>
+ <link rel="stylesheet" href="../common/MOA.css" type="text/css">
+</head>
+<body bgcolor="white" text="#000000" link="#990000" vlink="#666666" alink="#cc9966">
+ <table class="logoTable" width="100%" border="0" cellspacing="0" cellpadding="10">
+ <tr>
+ <td align="center" class="logoTitle" width="267"><img src="../common/LogoBKA.png" alt="Logo BKA" width="267" height="37" align="left"></td>
+ <td align="center" class="logoTitle">Open Source<br>
+ f&uuml;r das E-Government</td>
+ <td align="center" class="logoTitle" width="123"><img src="../common/LogoMoa4c.jpg" alt="Logo MOA" width="123" height="138" align="right"></td>
+ </tr>
+ </table>
+ <hr/>
+ <p class="title"><a href="../index.html">MOA: Serversignatur (SS) und Signaturpr&uuml;fung (SP), V 1.5.0</a></p>
+ <p class="subtitle">Einf&uuml;hrung</p>
+ <hr/>
+ <h1>Inhalt</h1>
+ <ol>
+ <li>
+ <p><a href="#allgemeines">Allgemeines</a></p>
+ </li>
+ <li>
+ <p><a href="#ss">Modul Serversignatur (SS) </a></p>
+ </li>
+ <li><a href="#sp">Modul Signaturpr&uuml;fung (SP) </a></li>
+ </ol>
+<hr/>
+ <h1><a name="allgemeines"></a>1 Allgemeines</h1>
+ <p> Die Module Serversignatur (SS) und Signaturpr&uuml;fung (SP) k&ouml;nnen von Anwendungen verwendet werden, um elektronische Signaturen zu erstellen bzw. vorliegende elektronische Signaturen zu &uuml;berpr&uuml;fen.</p>
+ <p> Die Funktionalit&auml;t und der Aufbau der Schnittstelle zu den beiden Modulen ist in der <a href="../spec/MOA-SPSS-1.3.pdf" target="_blank" class="term">Spezifikation MOA SP/SS (V1.3)</a> detailliert beschrieben. Da diese Spezifikation auf der <a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20020831/core/Core.html" target="_blank" class="term"> Schnittstellenspezifikation des Security-Layers (V 1.1)</a> aufbaut, ist deren Kenntnis zum Verstehen der Schnittstellen zu SS und SP erforderlich. </p>
+ <h1><a name="ss"></a>2 Modul Serversignatur (SS) </h1>
+ <p> Das Modul Serversignatur (SS) dient zum Erstellen von XML-Signaturen in Anlehnung an die <a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20020831/core/Core.html"> </a><a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20020831/core/Core.html" target="_blank" class="term">Schnittstellenspezifikation des Security-Layers (V 1.1)</a>. Eine Signatur kann entweder rein in Software erstellt werden, oder aber unter Zuhilfenahme eines Hardware Security Modules (HSM), das den privaten Schl&uuml;ssel gesch&uuml;tzt enth&auml;lt und die Signatur berechnet.</p>
+ <p> Der Zugriff auf einzelne Signaturschl&uuml;ssel in MOA SS kann basierend auf dem f&uuml;r TLS-Client-Authentisierung verwendeten Zertifikat eingeschr&auml;nkt werden. </p>
+ <p> Anwendungen k&ouml;nnen das Modul entweder als Web-Service oder &uuml;ber ein Java-API ansprechen. </p>
+ <h1><a name="sp"></a>3 Modul Signaturpr&uuml;fung (SP) </h1>
+ <p> Das Modul Signaturpr&uuml;fung (SP) dient zum &Uuml;berpr&uuml;fen von <a href="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/" target="_blank">XML-Signaturen</a> und <a href="http://www.ietf.org/rfc/rfc2630.txt" target="_blank">CMS-Signaturen</a>. </p>
+ <p>Im Zuge der Verifikation einer XML-Signatur werden die Signatur, gegebenenfalls vorhandene XMLDSIG-Manifeste, als auch die G&uuml;ltigkeit und Anwendbarkeit des Zertifikats &uuml;berpr&uuml;ft. Bei XML-Signaturen kann zus&auml;tzlich &uuml;berpr&uuml;ft werden, ob sie den speziellen Anforderungen <a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20020831/core/Core.html" target="_blank" class="term">Schnittstellenspezifikation des Security-Layers (V 1.1)</a> entsprechen (vgl. Signaturmanifest). </p>
+ <p> Anwendungen k&ouml;nnen das Modul entweder als Web-Service oder &uuml;ber ein Java-API ansprechen.</p>
+</body>
+</html>
diff --git a/spss/handbook/handbook/spec/MOA-SPSS-1.3.pdf b/spss/handbook/handbook/spec/MOA-SPSS-1.3.pdf
new file mode 100644
index 000000000..6709a4081
--- /dev/null
+++ b/spss/handbook/handbook/spec/MOA-SPSS-1.3.pdf
Binary files differ
diff --git a/spss/handbook/handbook/spec/MOA-SPSS-1.3.wsdl b/spss/handbook/handbook/spec/MOA-SPSS-1.3.wsdl
new file mode 100644
index 000000000..8ae1c1ff4
--- /dev/null
+++ b/spss/handbook/handbook/spec/MOA-SPSS-1.3.wsdl
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Web Service Description for MOA SP/SS 1.3
+-->
+<definitions name="MOA" targetNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:moa="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <import namespace="http://reference.e-government.gv.at/namespace/moa/20020822#" location="MOA-SPSS-1.3.xsd"/>
+ <message name="CreateXMLSignatureInput">
+ <part name="body" element="moa:CreateXMLSignatureRequest"/>
+ </message>
+ <message name="CreateXMLSignatureOutput">
+ <part name="body" element="moa:CreateXMLSignatureResponse"/>
+ </message>
+ <message name="VerifyCMSSignatureInput">
+ <part name="body" element="moa:VerifyCMSSignatureRequest"/>
+ </message>
+ <message name="VerifyCMSSignatureOutput">
+ <part name="body" element="moa:VerifyCMSSignatureResponse"/>
+ </message>
+ <message name="VerifyXMLSignatureInput">
+ <part name="body" element="moa:VerifyXMLSignatureRequest"/>
+ </message>
+ <message name="VerifyXMLSignatureOutput">
+ <part name="body" element="moa:VerifyXMLSignatureResponse"/>
+ </message>
+ <message name="MOAFault">
+ <part name="body" element="moa:ErrorResponse"/>
+ </message>
+ <portType name="SignatureCreationPortType">
+ <operation name="createXMLSignature">
+ <input message="tns:CreateXMLSignatureInput"/>
+ <output message="tns:CreateXMLSignatureOutput"/>
+ <fault name="MOAFault" message="tns:MOAFault"/>
+ </operation>
+ </portType>
+ <portType name="SignatureVerificationPortType">
+ <operation name="verifyCMSSignature">
+ <input message="tns:VerifyCMSSignatureInput"/>
+ <output message="tns:VerifyCMSSignatureOutput"/>
+ <fault name="MOAFault" message="tns:MOAFault"/>
+ </operation>
+ <operation name="verifyXMLSignature">
+ <input message="tns:VerifyXMLSignatureInput"/>
+ <output message="tns:VerifyXMLSignatureOutput"/>
+ <fault name="MOAFault" message="tns:MOAFault"/>
+ </operation>
+ </portType>
+ <binding name="SignatureCreationBinding" type="tns:SignatureCreationPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="createXMLSignature">
+ <soap:operation soapAction="urn:CreateXMLSignatureAction"/>
+ <input>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </output>
+ <fault name="MOAFault">
+ <soap:fault use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </fault>
+ </operation>
+ </binding>
+ <binding name="SignatureVerificationBinding" type="tns:SignatureVerificationPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="verifyCMSSignature">
+ <soap:operation soapAction="urn:VerifyCMSSignatureAction"/>
+ <input>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </output>
+ <fault name="MOAFault">
+ <soap:fault use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </fault>
+ </operation>
+ <operation name="verifyXMLSignature">
+ <soap:operation soapAction="urn:VerifyXMLSignatureAction"/>
+ <input>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </output>
+ <fault name="MOAFault">
+ <soap:fault use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </fault>
+ </operation>
+ </binding>
+ <service name="SignatureCreationService">
+ <port name="SignatureCreationPort" binding="tns:SignatureCreationBinding">
+ <!--
+ Please note that the location URL must be adapted to the actual service URL.
+ -->
+ <soap:address location="http://localhost/moa-spss/services/SignatureCreation"/>
+ </port>
+ </service>
+ <service name="SignatureVerificationService">
+ <port name="SignatureVerificationPort" binding="tns:SignatureVerificationBinding">
+ <!--
+ Please note that the location URL must be adapted to the actual service URL.
+ -->
+ <soap:address location="http://localhost/moa-spss/services/SignatureVerification"/>
+ </port>
+ </service>
+</definitions>
diff --git a/spss/handbook/handbook/spec/MOA-SPSS-1.3.xsd b/spss/handbook/handbook/spec/MOA-SPSS-1.3.xsd
new file mode 100644
index 000000000..756b51279
--- /dev/null
+++ b/spss/handbook/handbook/spec/MOA-SPSS-1.3.xsd
@@ -0,0 +1,469 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ MOA SP/SS 1.3 Schema
+-->
+<xsd:schema targetNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#">
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+ <!--########## Create XML Signature ###-->
+ <!--### Create XML Signature Request ###-->
+ <xsd:element name="CreateXMLSignatureRequest">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="CreateXMLSignatureRequestType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:complexType name="CreateXMLSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="KeyIdentifier" type="KeyIdentifierType"/>
+ <xsd:element name="SingleSignatureInfo" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Ermöglichung der Stapelsignatur durch wiederholte Angabe dieses Elements</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="DataObjectInfo" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="DataObjectInfoType">
+ <xsd:attribute name="ChildOfManifest" type="xsd:boolean" use="optional" default="false"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="CreateSignatureInfo" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="CreateSignatureEnvironment" type="ContentOptionalRefType"/>
+ <xsd:choice>
+ <xsd:annotation>
+ <xsd:documentation>Auswahl: Entweder explizite Angabe des Signaturorts sowie ggf. sinnvoller Supplements im Zshg. mit der Signaturumgebung, oder Verweis auf ein benanntes Profil</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element ref="CreateSignatureEnvironmentProfile"/>
+ <xsd:element name="CreateSignatureEnvironmentProfileID" type="ProfileIdentifierType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="SecurityLayerConformity" type="xsd:boolean" use="optional" default="true"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Create XML Signature Response ###-->
+ <xsd:complexType name="CreateXMLSignatureResponseType">
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Kardinalität 1..oo erlaubt die Antwort auf eine Stapelsignatur-Anfrage</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element name="SignatureEnvironment">
+ <xsd:annotation>
+ <xsd:documentation>Resultat, falls die Signaturerstellung erfolgreich war</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="lax"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element ref="ErrorResponse"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:element name="CreateXMLSignatureResponse" type="CreateXMLSignatureResponseType"/>
+ <!--########## Verify CMS Signature ###-->
+ <!--### Verifiy CMS Signature Request ###-->
+ <xsd:element name="VerifyCMSSignatureRequest">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="VerifyCMSSignatureRequestType">
+ <xsd:attribute name="Signatories" type="SignatoriesType" use="optional" default="1"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:complexType name="VerifyCMSSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="DateTime" type="xsd:dateTime" minOccurs="0"/>
+ <xsd:element name="CMSSignature" type="xsd:base64Binary"/>
+ <xsd:element name="DataObject" type="CMSDataObjectOptionalMetaType" minOccurs="0"/>
+ <xsd:element name="TrustProfileID" type="xsd:token">
+ <xsd:annotation>
+ <xsd:documentation>mit diesem Profil wird eine Menge von vertrauenswürdigen Wurzelzertifikaten spezifiziert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Verify CMS Signature Response ###-->
+ <xsd:element name="VerifyCMSSignatureResponse" type="VerifyCMSSignatureResponseType"/>
+ <xsd:complexType name="VerifyCMSSignatureResponseType">
+ <xsd:sequence maxOccurs="unbounded">
+ <xsd:element name="SignerInfo" type="dsig:KeyInfoType">
+ <xsd:annotation>
+ <xsd:documentation>only ds:X509Data and RetrievalMethod is supported; QualifiedCertificate is included as X509Data/any;publicAuthority is included as X509Data/any</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="SignatureCheck" type="CheckResultType"/>
+ <xsd:element name="CertificateCheck" type="CheckResultType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--########## Verify XML Signature ###-->
+ <!--### Verify XML Signature Request ###-->
+ <xsd:element name="VerifyXMLSignatureRequest" type="VerifyXMLSignatureRequestType"/>
+ <xsd:complexType name="VerifyXMLSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="DateTime" type="xsd:dateTime" minOccurs="0"/>
+ <xsd:element name="VerifySignatureInfo">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="VerifySignatureEnvironment" type="ContentOptionalRefType"/>
+ <xsd:element name="VerifySignatureLocation" type="xsd:token"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element ref="SupplementProfile"/>
+ <xsd:element name="SupplementProfileID" type="xsd:string"/>
+ </xsd:choice>
+ <xsd:element name="SignatureManifestCheckParams" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ReferenceInfo" type="VerifyTransformsDataType" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Pro dsig:Reference-Element in der zu überprüfenden XML-Signatur muss hier ein ReferenceInfo-Element erscheinen. Die Reihenfolge der einzelnen ReferenceInfo Elemente entspricht jener der dsig:Reference Elemente in der XML-Signatur.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="ReturnReferenceInputData" type="xsd:boolean" use="optional" default="true"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ReturnHashInputData" minOccurs="0"/>
+ <xsd:element name="TrustProfileID" type="xsd:token">
+ <xsd:annotation>
+ <xsd:documentation>mit diesem Profil wird eine Menge von vertrauenswürdigen Wurzelzertifikaten spezifiziert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Verify XML Signature Response ###-->
+ <xsd:element name="VerifyXMLSignatureResponse" type="VerifyXMLSignatureResponseType"/>
+ <xsd:complexType name="VerifyXMLSignatureResponseType">
+ <xsd:sequence>
+ <xsd:element name="SignerInfo" type="dsig:KeyInfoType">
+ <xsd:annotation>
+ <xsd:documentation>only ds:X509Data and ds:RetrievalMethod is supported; QualifiedCertificate is included as X509Data/any; PublicAuthority is included as X509Data/any</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="HashInputData" type="InputDataType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="ReferenceInputData" type="InputDataType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="SignatureCheck" type="ReferencesCheckResultType"/>
+ <xsd:element name="SignatureManifestCheck" type="ReferencesCheckResultType" minOccurs="0"/>
+ <xsd:element name="XMLDSIGManifestCheck" type="ManifestRefsCheckResultType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="CertificateCheck" type="CheckResultType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:simpleType name="ProfileIdentifierType">
+ <xsd:restriction base="xsd:token"/>
+ </xsd:simpleType>
+ <xsd:complexType name="InputDataType">
+ <xsd:complexContent>
+ <xsd:extension base="ContentExLocRefBaseType">
+ <xsd:attribute name="PartOf" use="optional" default="SignedInfo">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="SignedInfo"/>
+ <xsd:enumeration value="XMLDSIGManifest"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="ReferringSigReference" type="xsd:nonNegativeInteger" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="MetaInfoType">
+ <xsd:sequence>
+ <xsd:element name="MimeType" type="MimeTypeType"/>
+ <xsd:element name="Description" type="xsd:anyURI" minOccurs="0"/>
+ <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="FinalDataMetaInfoType">
+ <xsd:complexContent>
+ <xsd:extension base="MetaInfoType">
+ <xsd:sequence>
+ <xsd:element name="Type" type="xsd:anyURI" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="DataObjectInfoType">
+ <xsd:sequence>
+ <xsd:element name="DataObject">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="ContentOptionalRefType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:choice>
+ <xsd:annotation>
+ <xsd:documentation>Auswahl: Entweder explizite Angabe EINER Transformationskette inklusive ggf. sinnvoller Supplements oder Verweis auf ein benanntes Profil</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element ref="CreateTransformsInfoProfile"/>
+ <xsd:element name="CreateTransformsInfoProfileID" type="ProfileIdentifierType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ <xsd:attribute name="Structure" use="required">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="detached"/>
+ <xsd:enumeration value="enveloping"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ </xsd:complexType>
+ <xsd:complexType name="TransformsInfoType">
+ <xsd:sequence>
+ <xsd:element ref="dsig:Transforms" minOccurs="0"/>
+ <xsd:element name="FinalDataMetaInfo" type="FinalDataMetaInfoType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="XMLDataObjectAssociationType">
+ <xsd:sequence>
+ <xsd:element name="MetaInfo" type="MetaInfoType" minOccurs="0"/>
+ <xsd:element name="Content" type="ContentRequiredRefType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CMSDataObjectOptionalMetaType">
+ <xsd:sequence>
+ <xsd:element name="MetaInfo" type="MetaInfoType" minOccurs="0"/>
+ <xsd:element name="Content" type="CMSContentBaseType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CMSContentBaseType">
+ <xsd:complexContent>
+ <xsd:restriction base="ContentOptionalRefType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ </xsd:choice>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="AnyChildrenType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ReferencesCheckResultType">
+ <xsd:complexContent>
+ <xsd:restriction base="CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="ReferencesCheckResultInfoType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ReferencesCheckResultInfoType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:restriction base="AnyChildrenType">
+ <xsd:sequence>
+ <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="FailedReference" type="xsd:positiveInteger" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ManifestRefsCheckResultType">
+ <xsd:complexContent>
+ <xsd:restriction base="CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="ManifestRefsCheckResultInfoType"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ManifestRefsCheckResultInfoType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:restriction base="AnyChildrenType">
+ <xsd:sequence>
+ <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="FailedReference" type="xsd:positiveInteger" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="ReferringSigReference" type="xsd:positiveInteger"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <!--########## Error Response ###-->
+ <xsd:element name="ErrorResponse" type="ErrorResponseType">
+ <xsd:annotation>
+ <xsd:documentation>Resultat, falls die Signaturerstellung gescheitert ist</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:complexType name="ErrorResponseType">
+ <xsd:sequence>
+ <xsd:element name="ErrorCode" type="xsd:integer"/>
+ <xsd:element name="Info" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--########## Auxiliary Types ###-->
+ <xsd:simpleType name="KeyIdentifierType">
+ <xsd:restriction base="xsd:string"/>
+ </xsd:simpleType>
+ <xsd:simpleType name="KeyStorageType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="Software"/>
+ <xsd:enumeration value="Hardware"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="MimeTypeType">
+ <xsd:restriction base="xsd:token"/>
+ </xsd:simpleType>
+ <xsd:complexType name="AnyChildrenType" mixed="true">
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="XMLContentType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:extension base="AnyChildrenType">
+ <xsd:attribute ref="xml:space" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ContentBaseType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ <xsd:element name="LocRefContent" type="xsd:anyURI"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:complexType name="ContentExLocRefBaseType">
+ <xsd:complexContent>
+ <xsd:restriction base="ContentBaseType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ </xsd:choice>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ContentOptionalRefType">
+ <xsd:complexContent>
+ <xsd:extension base="ContentBaseType">
+ <xsd:attribute name="Reference" type="xsd:anyURI" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ContentRequiredRefType">
+ <xsd:complexContent>
+ <xsd:restriction base="ContentOptionalRefType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ <xsd:element name="LocRefContent" type="xsd:anyURI"/>
+ </xsd:choice>
+ <xsd:attribute name="Reference" type="xsd:anyURI" use="required"/>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="VerifyTransformsDataType">
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Ein oder mehrere Transformationswege können von der Applikation an MOA mitgeteilt werden. Die zu prüfende Signatur hat zumindest einem dieser Transformationswege zu entsprechen. Die Angabe kann explizit oder als Profilbezeichner erfolgen.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element ref="VerifyTransformsInfoProfile"/>
+ <xsd:element name="VerifyTransformsInfoProfileID" type="xsd:string">
+ <xsd:annotation>
+ <xsd:documentation>Profilbezeichner für einen Transformationsweg</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:element name="QualifiedCertificate"/>
+ <xsd:element name="PublicAuthority" type="PublicAuthorityType"/>
+ <xsd:complexType name="PublicAuthorityType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:string" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:simpleType name="SignatoriesType">
+ <xsd:union memberTypes="AllSignatoriesType">
+ <xsd:simpleType>
+ <xsd:list itemType="xsd:positiveInteger"/>
+ </xsd:simpleType>
+ </xsd:union>
+ </xsd:simpleType>
+ <xsd:simpleType name="AllSignatoriesType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="all"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:complexType name="CreateSignatureLocationType">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:token">
+ <xsd:attribute name="Index" type="xsd:integer" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ <xsd:complexType name="TransformParameterType">
+ <xsd:choice minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Die Angabe des Transformationsparameters (explizit oder als Hashwert) kann unterlassen werden, wenn die Applikation von der Unveränderlichkeit des Inhalts der in "Transformationsparamter", Attribut "URI" angegebenen URI ausgehen kann.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element name="Base64Content" type="xsd:base64Binary">
+ <xsd:annotation>
+ <xsd:documentation>Der Transformationsparameter explizit angegeben.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="Hash">
+ <xsd:annotation>
+ <xsd:documentation>Der Hashwert des Transformationsparameters.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="dsig:DigestMethod"/>
+ <xsd:element ref="dsig:DigestValue"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ <xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:element name="CreateSignatureEnvironmentProfile">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="CreateSignatureLocation" type="CreateSignatureLocationType"/>
+ <xsd:element name="Supplement" type="XMLDataObjectAssociationType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="VerifyTransformsInfoProfile">
+ <xsd:annotation>
+ <xsd:documentation>Explizite Angabe des Transformationswegs</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="dsig:Transforms" minOccurs="0"/>
+ <xsd:element name="TransformParameter" type="TransformParameterType" minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Alle impliziten Transformationsparameter, die zum Durchlaufen der oben angeführten Transformationskette bekannt sein müssen, müssen hier angeführt werden. Das Attribut "URI" bezeichnet den Transformationsparameter in exakt jener Weise, wie er in der zu überprüfenden Signatur gebraucht wird.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Supplement" type="XMLDataObjectAssociationType"/>
+ <xsd:element name="SupplementProfile" type="XMLDataObjectAssociationType"/>
+ <xsd:element name="CreateTransformsInfoProfile">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="CreateTransformsInfo" type="TransformsInfoType"/>
+ <xsd:element ref="Supplement" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+</xsd:schema>
diff --git a/spss/handbook/handbook/usage/usage.html b/spss/handbook/handbook/usage/usage.html
new file mode 100644
index 000000000..ca27f4f24
--- /dev/null
+++ b/spss/handbook/handbook/usage/usage.html
@@ -0,0 +1,1232 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+ <title>MOA SS und SP - Anwendung</title>
+ <link rel="stylesheet" href="../common/MOA.css" type="text/css">
+</head>
+<body bgcolor="white" text="#000000" link="#990000" vlink="#666666" alink="#cc9966">
+ <table class="logoTable" width="100%" border="0" cellspacing="0" cellpadding="10">
+ <tr>
+ <td align="center" class="logoTitle" width="267"><img src="../common/LogoBKA.png" alt="Logo BKA" width="267" height="37" align="left"></td>
+ <td align="center" class="logoTitle">Open Source<br>
+ f&uuml;r das E-Government</td>
+ <td align="center" class="logoTitle" width="123"><img src="../common/LogoMoa4c.jpg" alt="Logo MOA" width="123" height="138" align="right"></td>
+ </tr>
+ </table>
+ <hr/>
+ <p class="title"><a href="../index.html">MOA: Serversignatur (SS) und Signaturpr&uuml;fung (SP), V 1.5.0</a></p>
+ <p class="subtitle">Anwendung</p>
+ <hr/>
+ <h1>Inhalt</h1>
+ <ol>
+ <li>
+ <p><a href="#&#252;bersicht">&Uuml;bersicht</a></p>
+ </li>
+ <li>
+ <p><a href="#webservice">Verwendung des Webservices</a></p>
+ <ol>
+ <li><a href="#webservice_xmlrequests">XML-Requests</a> <ol>
+ <li><a href="#webservice_xmlrequests_erstellungxml">Erstellung einer XML-Signatur</a> <ol>
+ <li><a href="#webservice_xmlrequests_erstellungxml_simple">Einfaches Beispiel</a></li>
+ <li><a href="#webservice_xmlrequests_erstellungxml_daten">Angabe der zu signierenden Daten</a></li>
+ <li><a href="#webservice_xmlrequests_erstellungxml_transformationen">Transformationen</a></li>
+ <li><a href="#webservice_xmlrequests_erstellungxml_ergaenzungsobjekte">Erg&auml;nzungsobjekte</a> </li>
+ </ol>
+ </li>
+ <li><a href="#webservice_xmlrequests_pruefungcms">Pr&uuml;fung einer CMS-Signatur </a> <ol>
+ <li><a href="#webservice_xmlrequests_pruefungcms_einfach">Einfaches Beispiel</a></li>
+ <li><a href="#webservice_xmlrequests_pruefungcms_erweitert">Erweitertes Beispiel</a> </li>
+ </ol>
+ </li>
+ <li><a href="#webservice_xmlrequests_pruefungxml">Pr&uuml;fung einer XML-Signatur </a> <ol>
+ <li><a href="#webservice_xmlrequests_pruefungxml_einfach">Einfaches Beispiel</a></li>
+ <li><a href="#webservice_xmlrequests_pruefungxml_erweitert">Erweitertes Beispiel</a></li>
+ <li><a href="#webservice_xmlrequests_pruefungxml_xmldsigmanifest">Pr&uuml;fung eines XMLDSIG-Manifests</a></li>
+ <li><a href="#webservice_xmlrequests_pruefungxml_ergaenzungsobjekte">Erg&auml;nzungsobjekte</a></li>
+ <li><a href="#webservice_xmlrequests_pruefungxml_signaturmanifest">Signatur-Manifest des Security-Layers</a></li>
+ </ol>
+ </li>
+ </ol>
+ </li>
+ <li><a href="#webservice_clients">Webservice-Clients
+ </a> <ol>
+ <li><a href="#webservice_clients_&#252;bersicht">&Uuml;bersicht</a></li>
+ <li><a href="#webservice_clients_gemeinsamkeiten">Gemeinsamkeiten</a></li>
+ <li><a href="#webservice_clients_httpsserverauth">Besonderheiten von <code>HTTPSServerAuth.java</code></a></li>
+ <li><a href="#webservice_clients_httpsclientauth">Besonderheiten von <code>HTTPSClientAuth.java</code></a></li>
+ </ol>
+ </li>
+ </ol>
+ </li>
+ <li><a href="#klassenbibliothek">Verwendung der Klassenbibliothek</a>
+ <ol>
+ <li><a href="#klassenbibliothek_vorbereitung">Vorbereitung</a></li>
+ <li><a href="#klassenbibliothek_allgemeines">Allgemeines</a> </li>
+ <li><a href="#klassenbibliothek_beispiele">Beispiele</a></li>
+ <li><a href="#klassenbibliothek_apidoc">API-Dokumentation</a> </li>
+ </ol>
+ </li>
+ </ol>
+ <ol type="A">
+ <li><a href="#referenzierte_software">Referenzierte Software</a></li>
+ </ol>
+<hr/>
+ <h1><a name="übersicht" id="übersicht"></a>1 &Uuml;bersicht</h1>
+ <p> Die Module Signaturpr&uuml;fung (SP) und Serversignatur (SS) sind als plattformunabh&auml;ngige Module ausgelegt, die entweder als Webservice &uuml;ber HTTP bzw. HTTPS oder als Klassenbibliothek &uuml;ber ein API angesprochen werden k&ouml;nnen. Dieses Handbuch beschreibt die Anwendung der beiden Module auf jede dieser beiden Arten.</p>
+ <h1><a name="webservice"></a>2 Verwendung des Webservices </h1>
+ <p>Dieser Abschnitt beschreibt die Verwendung der Module SP und SS &uuml;ber die Webservice-Schnittstelle. Im ersten Unterabschnitt werden typische XML-Requests zur Signaturerstellung mittels SS bzw. zur Signaturpr&uuml;fung mittels SP vorgestellt, wie sie an das Webservice gesendet werden k&ouml;nnen. Der zweite Unterabschnitt stellt beispielhafte Implementierungen eines Webservice-Clients in Java vor, mit dem die Requests aus dem ersten Unterabschnitt an das Webservice gesendet werden k&ouml;nnen.</p>
+ <h2><a name="webservice_xmlrequests" id="webservice_xmlrequests"></a>2.1 XML-Requests </h2>
+ <p>Dieser Abschnitt stellt typische XML-Requests f&uuml;r die Erstellung einer XML-Signatur mittels SS bzw. zur Pr&uuml;fung einer CMS- bzw. XML-Signatur mittels SP vor. Zu jedem Request wird jeweils auch eine typische Response des Services besprochen. </p>
+ <p class="remark">Bitte beachten Sie: Einige der vorgestellten Requests referenzieren beispielhafte Daten auf <code>localhost</code>, z.B. <code>http://localhost:8080/referencedData/Text.txt</code>. Wenn Sie diese Beispiele ausprobieren m&ouml;chten, m&uuml;ssen Sie daf&uuml;r sorgen, dass MOA SS bzw. SP diese Daten auch tats&auml;chlich aufl&ouml;sen kann. Wenn Sie Ihre Tomcat-Installation auf <code>localhost:8080</code> betreiben, ist es ausreichend, wenn sie die diesem Handbuch beiliegende Webapplikation <code><a href="../../clients/common/referencedData/referencedData.war">referencedData.war</a></code> in das Verzeichnis <code>webapps</code> Ihrer Tomcat-Installation kopieren. Ansonsten m&uuml;ssen Sie zus&auml;tzlich die URLs in den Requests anpassen. </p>
+ <h3><a name="webservice_xmlrequests_erstellungxml" id="webservice_xmlrequests_erstellungxml"></a>2.1.1 Erstellung einer XML-Signatur</h3>
+ <h4><a name="webservice_xmlrequests_erstellungxml_simple" id="webservice_xmlrequests_erstellungxml_simple"></a>2.1.1.1 Einfaches Beispiel</h4>
+ <h5>Request</h5>
+ <p><code><a href="../../clients/webservice/resources/requests/CreateXMLSignatureRequest.Simple.xml" target="_blank">CreateXMLSignatureRequest.Simple.xml</a></code> ist ein einfacher XML-Request zur Erzeugung einer XML-Signatur. Sein Aufbau wird nachfolgend analysiert:</p>
+ <pre> &lt;KeyIdentifier&gt;KG_allgemein&lt;/KeyIdentifier&gt; </pre>
+ <p><code>KG_allgemein</code> bezeichnet eine Schl&uuml;sselgruppe, aus der SS einen Signaturschl&uuml;ssel selektieren soll und muss einer in der SP/SS-Konfigurationsdatei definierten Schl&uuml;sselgruppe entsprechen. </p>
+ <pre> &lt;SingleSignatureInfo SecurityLayerConformity="false"&gt;</pre>
+ <p> F&uuml;r jedes <code>SingleSignatureInfo</code>Element wird eine eigene XML-Signatur erzeugt. Wird das Attribut <code>SecurityLayerConformity</code> auf <code>true</code> gesetzt, dann wird eine XML-Signatur gem&auml;&szlig; <a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20020831/core/Core.html#signaturerstellungNachXMLDSIGAntwort" target="_blank">Security-Layer Spezifikation V1.1 </a> erzeugt; d.h. es werden signierte Properties (Zeitpunkt der Signaturerstellung, das f&uuml;r die Signatur&uuml;berpr&uuml;fung zu verwendende Zertifikat, Metainformationen zu den signierten Datenobjekten) und ein Manifest, das alle implizite Transformationsparameter enth&auml;lt, zur Signatur hinzugef&uuml;gt. </p>
+ <pre> &lt;DataObjectInfo Structure="enveloping"&gt;
+ &lt;DataObject&gt;
+ &lt;XMLContent&gt;Diese Daten werden signiert.&lt;XMLContent&gt;
+ &lt;/DataObject&gt;</pre>
+ <p> </p>
+ <p> F&uuml;r jedes Daten-Objekt, das in die XML-Signatur als <code>dsig:Reference</code> aufgenommen werden soll, muss ein <code>DataObjectInfo</code> Element spezifiziert werden. Das Attribut <code>Structure</code> gibt an, ob die Daten in die Signatur in ein <code>dsig:Object</code> Element integriert werden sollen (<code>Structure="enveloping"</code>), oder &uuml;ber einen URL referenziert werden sollen (<code>Structure="detached"</code>). </p>
+ <p> Im Fall von <code>Structure="enveloping"</code> muss im nachfolgenden <code>DataObject</code> Element entweder das Attribut <code>Reference</code> (enth&auml;lt eine URL, von der SS die Daten beziehen soll) gesetzt sein, oder aber die zu signierenden Daten werden explizit in einem der Elemente <code>Base64Content</code> (enth&auml;lt Daten in Base64 kodierter Form) oder <code>XMLContent</code> (enth&auml;lt Daten als beliebiges XML-Fragment) oder <code>LocRefContent</code> (enth&auml;lt eine URL, von der SS die Daten beziehen soll; in diesem Fall also gleichwertig wie ein gesetztes Attribut <code>Reference</code>) spezifiziert sein. Die Angabe der zu signierenden Daten &uuml;ber das Attribut <code>Reference</code> und gleichzeitig einem der Elemente <code>Base64Content</code> oder <code>XMLContent</code> oder <code>LocRefContent</code> ist nicht erlaubt.</p>
+ <p>Im Fall von <code>Structure="detached"</code> muss das Attribut <code>Reference</code> im nachfolgenden <code>DataObject</code> Element gesetzt sein. Es enth&auml;lt jene URL, die zur Referenzierung der Daten als Wert von <code>dsig:Reference/@URI</code> in die XML-Signatur aufgenommen wird. Die Angabe eines der Element <code>Base64Content</code> oder <code>XMLContent</code> oder <code>LocRefContent</code> ist optional. Unterbleibt die Angabe, bezieht SS die Daten von der URL im Attribut <code>Reference</code>. Wird eines der Elemente verwendet, bezieht SS die Daten durch Analyse des angegebenen Elements (siehe obiger Absatz). </p>
+ <p>Im konkreten Beispiel sollen die Daten in ein <code>dsig:Object</code> Element integriert werden (<code>Structure="enveloping"</code>). Die Daten werden mittels <code>XMLContent</code> als XML-Fragment (ein einfacher Textknoten) angegeben.</p>
+ <p>
+ <pre> &lt;CreateTransformsInfoProfile&gt;<br> &lt;CreateTransformsInfo&gt;
+ &lt;FinalDataMetaInfo&gt;
+ &lt;MimeType&gt;text/plain&lt;MimeType&gt;
+ &lt;/FinalDataMetaInfo&gt;
+ &lt;/CreateTransformsInfo&gt;
+ &lt;/CreateTransformsInfoProfile&gt;</pre>
+ Zu jedem Daten-Objekt k&ouml;nnen optional Transformationen (z.B. XPath, XSLT, Base64-Decodierung, etc.) angegeben werden. Werden - wie hier im Beispiel - keine Transformationen angegeben, so muss zumindest der MIME-Type der zu signierenden Daten spezifiziert werden. <p></p>
+ <h5>Response</h5>
+ <p><code><a href="../../clients/webservice/resources/requests/CreateXMLSignatureRequest.Simple.resp.xml" target="_blank">CreateXMLSignatureRequest.Simple.resp.xml</a></code> ist eine typische Response des SS Webservices auf den obigen Request. Sein Aufbau wird nachfolgend analysiert. Bitte beachten Sie, dass die dargestellte Response zur bessernen Lesbarkeit einger&uuml;ckt und gek&uuml;rzt wurde.</p>
+ <p>
+ <pre>&lt;CreateXMLSignatureResponse
+ xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot; <br> xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;<br> &lt;SignatureEnvironment&gt;<br> &lt;dsig:Signature Id=&quot;signature-1-1&quot; xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;<br> &lt;dsig:SignedInfo&gt;
+ ...
+ &lt;dsig:Reference Id=&quot;reference-1-1&quot; URI=&quot;#xpointer(id(&amp;apos;signed-data-1-1-1&amp;apos;)/node())&quot;&gt;
+ ...
+ &lt;/dsig:Reference&gt;
+ ...
+ &lt;/dsig:SignedInfo&gt;
+ ...
+ &lt;dsig:Object Id=&quot;signed-data-1-1-1&quot;&gt;Diese Daten werden signiert.&lt;/dsig:Object&gt;
+ &lt;/dsig:Signature&gt;<br> &lt;/SignatureEnvironment&gt;<br>&lt;/CreateXMLSignatureResponse&gt;</pre>
+ <p></p>
+ <p><code>CreateXMLSignatureResponse</code> enth&auml;lt je erzeugter Signatur ein Element <code>SignatureEnvironment</code> (in diesem Fall genau ein Element). <code>SignatureEnvironment</code> enth&auml;lt die von SS erzeugte XML-Signatur, die im obigen Request spezifiziert wurde. Man erkennt, dass die XML-Signatur genau ein Daten-Objekt unterzeichnet (ein <code>dsig:Reference</code> Element ist enthalten). Das unterzeichnete Datenobjekt ist in der Signaturstruktur selbst enthalten (<code>enveloping</code>), und zwar in einem <code>dsig:Object</code> Element. </p>
+ <h4><a name="webservice_xmlrequests_erstellungxml_daten" id="webservice_xmlrequests_erstellungxml_daten"></a>2.1.1.2 Angabe der zu signierenden Daten </h4>
+ <h5>Request</h5>
+ <p>Dieses Beispiel stellt die vielf&auml;ltigen M&ouml;glichkeiten vor, wie MOA SS mitgeteilt werden kann, welche Daten signiert (wenn keine Transformationen angegeben werden) bzw. als Eingangsdaten f&uuml;r die Berechnung der Transformationen verwendet werden sollen (wenn Transformationen angegeben werden).</p>
+ <p>Mit <a href="../../clients/webservice/resources/requests/CreateXMLSignatureRequest.Refs.xml" target="_blank"><code>CreateXMLSignatureRequest.Refs.xml</code></a> sollen insgesamt neun Datenobjekte signiert werden:</p>
+ <pre>&lt;CreateXMLSignatureRequest
+ xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;<br> &lt;KeyIdentifier&gt;KG_allgemein&lt;/KeyIdentifier&gt;<br> &lt;SingleSignatureInfo SecurityLayerConformity=&quot;false&quot;&gt;</pre>
+ <p>Die Signatur soll mit dem Schl&uuml;ssel <code>KG_allgemein</code> erstellt werden; jene Elemente, die speziell f&uuml;r eine Security-Layer V1.1 konforme Signatur notwendig sind (vergleiche <a href="#webservice_xmlrequests_erstellungxml_simple" class="term">Einfaches Beispiel</a>), brauchen nicht erstellt zu werden (<code>SecurityLayerConformity=&quot;false&quot;</code>).</p>
+ <pre> &lt;DataObjectInfo Structure=&quot;enveloping&quot; ChildOfManifest=&quot;true&quot;&gt;
+ &lt;DataObject&gt;
+ &lt;Base64Content&gt;RGllc2UgRGF0ZW4gd2FyZW4gYmFzZTY0IGtvZGllcnQu&lt;/Base64Content&gt;
+ &lt;/DataObject&gt;
+ &lt;CreateTransformsInfoProfile&gt;
+ &lt;CreateTransformsInfo&gt;
+ &lt;FinalDataMetaInfo&gt;
+ &lt;MimeType&gt;text/plain&lt;/MimeType&gt;
+ &lt;/FinalDataMetaInfo&gt;
+ &lt;/CreateTransformsInfo&gt;
+ &lt;/CreateTransformsInfoProfile&gt;
+ &lt;/DataObjectInfo&gt;</pre>
+ <p>Die Daten sollen in der <span class="term">Enveloping</span> Form in die Signatur integriert werden, d. h. die Daten werden in einem <code>dsig:Object</code> als Teil der XML-Struktur der Signatur aufgenommen (<code>Structure=&quot;enveloping&quot;</code>). Weiters sollen die Daten nicht &uuml;ber &uuml;ber eine <code>dsig:Reference</code> in <code>dsig:SignedInfo</code>, sondern &uuml;ber eine <code>dsig:Reference</code> in einem eigenen <code>dsig:Manifest</code> aufgenommen werden (<code>ChildOfManifest=&quot;true&quot;</code>).</p>
+ <p>Die Daten selbst werden explizit in base64 kodierter Form als Inhalt des Elements <code>Base64Content</code> angegeben. Das Attribut <code>DataObject/@Reference</code> darf nicht angegeben werden, da die Daten in der <span class="term">Enveloping</span> Form integriert werden sollen, und <code>Base64Content</code> verwendet wird.</p>
+ <p>Es werden - wie in allen &uuml;brigen F&auml;llen dieses Beispiels - keine Transformationen angegeben. Der Mime-Type der zu signierenden Daten wird als <code>text/plain</code> angegeben, da der Inhalt von <code>Base64Content</code> die base64-Kodierung des Texts <code>Diese Daten waren base64 kodiert.</code> ist. </p>
+ <pre>
+ &lt;DataObjectInfo Structure=&quot;enveloping&quot; ChildOfManifest=&quot;false&quot;&gt;
+ &lt;DataObject&gt;
+ &lt;XMLContent&gt;&lt;doc:XMLDocument xmlns:doc=&quot;urn:document&quot;&gt;
+ &lt;doc:Paragraph&gt;Ich bin der erste Absatz in diesem Dokument.&lt;/doc:Paragraph&gt;
+ &lt;doc:Paragraph ParaId=&quot;Para2&quot;&gt;Und ich bin der zweite Absatz in diesem Dokument.
+Ich habe weiters ein eigenens ID-Attribut bekommen.&lt;/doc:Paragraph&gt;
+&lt;/doc:XMLDocument&gt;&lt;/XMLContent&gt;
+ &lt;/DataObject&gt;
+ &lt;CreateTransformsInfoProfile&gt;
+ &lt;CreateTransformsInfo&gt;
+ &lt;FinalDataMetaInfo&gt;
+ &lt;MimeType&gt;application/xml&lt;/MimeType&gt;
+ &lt;/FinalDataMetaInfo&gt;
+ &lt;/CreateTransformsInfo&gt;
+ &lt;/CreateTransformsInfoProfile&gt;
+ &lt;/DataObjectInfo&gt;
+</pre>
+ <p>Die Daten sollen in der <span class="term">Enveloping</span> Form in die Signatur integriert werden, d. h. die Daten werden in einem <code>dsig:Object</code> als Teil der XML-Struktur der Signatur aufgenommen (<code>Structure=&quot;enveloping&quot;</code>). Diesmal sollen die Daten direkt &uuml;ber eine <code>dsig:Reference</code> in <code>dsig:SignedInfo</code> aufgenommen werden (<code>ChildOfManifest=&quot;false&quot;</code>).</p>
+ <p>Die Daten selbst werden explizit als XML-Fragment als Inhalt des Elements <code>XMLContent</code> angegeben. Das Attribut <code>DataObject/@Reference</code> darf nicht angegeben werden, da die Daten in der <span class="term">Enveloping</span> Form integriert werden sollen, und <code>XMLContent</code> verwendet wird.</p>
+ <p>Der Mime-Type der zu signierenden Daten wird als <code>application/xml</code> angegeben.</p>
+<pre>
+ &lt;DataObjectInfo Structure=&quot;enveloping&quot; ChildOfManifest=&quot;false&quot;&gt;
+ &lt;DataObject Reference=&quot;http://localhost:8080/referencedData/Text.txt&quot;/&gt;
+ &lt;CreateTransformsInfoProfile&gt;
+ &lt;CreateTransformsInfo&gt;
+ &lt;FinalDataMetaInfo&gt;
+ &lt;MimeType&gt;text/plain&lt;/MimeType&gt;
+ &lt;/FinalDataMetaInfo&gt;
+ &lt;/CreateTransformsInfo&gt;
+ &lt;/CreateTransformsInfoProfile&gt;
+ &lt;/DataObjectInfo&gt;
+</pre>
+<p>Die Daten sollen in der <span class="term">Enveloping</span> Form in die Signatur integriert werden, d. h. die Daten werden in einem <code>dsig:Object</code> als Teil der XML-Struktur der Signatur aufgenommen (<code>Structure=&quot;enveloping&quot;</code>). Wiederum sollen die Daten direkt &uuml;ber eine <code>dsig:Reference</code> in <code>dsig:SignedInfo</code> aufgenommen werden (<code>ChildOfManifest=&quot;false&quot;</code>).
+</p>
+<p>Die Daten werden diesmal nicht explizit angegeben, sondern mittels der URL in <code>DataObject/@Reference</code> referenziert. MOA SS versucht diese URL aufzul&ouml;sen, um zu den zu signierenden Daten zu gelangen. <code>Base64Content</code> oder <code>XMLContent</code> oder <code>LocRefContent</code> d&uuml;rfen nicht verwendet werden, da die Daten in der <span class="term">Enveloping</span> Form integriert werden sollen, und bereits <code>DataObject/@Reference</code> eingesetzt wird. </p>
+<p>Der Mime-Type der zu signierenden Daten wird als <code>text/plain</code> angegeben.</p>
+<pre>
+ &lt;DataObjectInfo Structure=&quot;enveloping&quot; ChildOfManifest=&quot;false&quot;&gt;
+ &lt;DataObject&gt;
+ &lt;LocRefContent&gt;http://localhost:8080/referencedData/Text.txt&lt;/LocRefContent&gt;
+ &lt;/DataObject&gt;
+ &lt;CreateTransformsInfoProfile&gt;
+ &lt;CreateTransformsInfo&gt;
+ &lt;FinalDataMetaInfo&gt;
+ &lt;MimeType&gt;text/plain&lt;/MimeType&gt;
+ &lt;/FinalDataMetaInfo&gt;
+ &lt;/CreateTransformsInfo&gt;
+ &lt;/CreateTransformsInfoProfile&gt;
+ &lt;/DataObjectInfo&gt;
+</pre>
+<p>Die Daten sollen wiederum in der <span class="term">Enveloping</span> Form in die Signatur integriert werden, d. h. die Daten werden in einem <code>dsig:Object</code> als Teil der XML-Struktur der Signatur aufgenommen (<code>Structure=&quot;enveloping&quot;</code>). Wiederum sollen die Daten direkt &uuml;ber eine <code>dsig:Reference</code> in <code>dsig:SignedInfo</code> aufgenommen werden (<code>ChildOfManifest=&quot;false&quot;</code>). </p>
+<p>Die Daten werden wie im vorhergehenden Fall nicht explizit angegeben, sondern referenziert. Diesmal wird die URL jedoch nicht <code>DataObject/@Reference</code> verwendet, sondern als Textinhalt des Elements <code>LocRefContent</code> (<code>LocRef</code> steht f&uuml;r <span class="term">Location Reference</span>). <code>DataObject/@Reference</code> darf in diesem Fall nicht verwendet werden. Diese Methode ist semantisch v&ouml;llig ident mit dem vorhergehenden Fall. </p>
+<p>Der Mime-Type der zu signierenden Daten wird als <code>text/plain</code> angegeben.</p>
+<pre>
+ &lt;DataObjectInfo Structure=&quot;detached&quot; ChildOfManifest=&quot;true&quot;&gt;
+ &lt;DataObject Reference=&quot;http://localhost:8080/referencedData/Text.b64&quot;&gt;
+ &lt;Base64Content&gt;RGllc2UgRGF0ZW4gd2FyZW4gYmFzZTY0IGtvZGllcnQu&lt;/Base64Content&gt;
+ &lt;/DataObject&gt;
+ &lt;CreateTransformsInfoProfile&gt;
+ &lt;CreateTransformsInfo&gt;
+ &lt;FinalDataMetaInfo&gt;
+ &lt;MimeType&gt;text/plain&lt;/MimeType&gt;
+ &lt;/FinalDataMetaInfo&gt;
+ &lt;/CreateTransformsInfo&gt;
+ &lt;/CreateTransformsInfoProfile&gt;
+ &lt;/DataObjectInfo&gt;
+</pre>
+<p>Die Daten sollen diesmal in der <span class="term">Detached</span> Form in die Signatur aufgenommen werden, d. h. die Daten werden nicht direkt in die Signaturstruktur integriert, sondern lediglich mittels URI im Attribut <code>URI</code> der anzufertigenden <code>dsig:Reference</code> referenziert (<code>Structure=&quot;detached&quot;</code>). Die Daten sollen indirekt &uuml;ber eine <code>dsig:Reference</code> eines <code>dsig:Manifest</code>s aufgenommen werden (<code>ChildOfManifest=&quot;true&quot;</code>). </p>
+<p>Die URI in <code>DataObject/@Reference</code> enth&auml;lt dabei die URI, die zur Referenzierung in <code>dsig:Reference/@URI</code> aufgenommen werden soll. Die Daten selbst hingegen werden im diesem Beispiel explizit in base64 kodierter Form als Inhalt des Elements <code>Base64Content</code> angegeben. MOA SS l&ouml;st also keine URL zur Erlangung der Daten auf, sondern verwendet den Inhalt von <code>Base64Content</code>. </p>
+<p>Der Mime-Type der zu signierenden Daten wird als <code>text/plain</code> angegeben.</p>
+<pre>
+ &lt;DataObjectInfo Structure="detached" ChildOfManifest="false"&gt;
+ &lt;DataObject Reference="NichtAufloesbareReferenz1"&gt;
+ &lt;XMLContent&gt;&lt;doc:XMLDocument xmlns:doc="urn:document"&gt;
+ &lt;doc:Paragraph&gt;Ich bin der erste Absatz in diesem Dokument.&lt;/doc:Paragraph&gt;
+ &lt;doc:Paragraph ParaId="Para2"&gt;Und ich bin der zweite Absatz in diesem Dokument.
+Ich habe weiters ein eigenens ID-Attribut bekommen.&lt;/doc:Paragraph&gt;
+&lt;/doc:XMLDocument&gt;&lt;/XMLContent&gt;
+ &lt;/DataObject&gt;
+ &lt;CreateTransformsInfoProfile&gt;
+ &lt;CreateTransformsInfo&gt;
+ &lt;FinalDataMetaInfo&gt;
+ &lt;MimeType&gt;application/xml&lt;/MimeType&gt;
+ &lt;/FinalDataMetaInfo&gt;
+ &lt;/CreateTransformsInfo&gt;
+ &lt;/CreateTransformsInfoProfile&gt;
+ &lt;/DataObjectInfo&gt;
+</pre>
+<p>Die Daten sollen auch diesmal in der <span class="term">Detached</span> Form in die Signatur aufgenommen werden, d. h. die Daten werden nicht direkt in die Signaturstruktur integriert, sondern lediglich mittels URI im Attribut <code>URI</code> der anzufertigenden <code>dsig:Reference</code> referenziert (<code>Structure=&quot;detached&quot;</code>). Diesmal sollen die Daten direkt &uuml;ber eine <code>dsig:Reference</code> in <code>dsig:SignedInfo</code> aufgenommen werden (<code>ChildOfManifest=&quot;false&quot;</code>).
+</p>
+<p>Die URI in <code>DataObject/@Reference</code> enth&auml;lt dabei die URI, die zur Referenzierung in <code>dsig:Reference/@URI</code> aufgenommen werden soll. Die Daten selbst hingegen werden im diesem Beispiel explizit als XML-Fragment in <code>XMLContent</code> angegeben. MOA SS l&ouml;st auch hier keine URL zur Erlangung der Daten auf, sondern verwendet den Inhalt von <code>XMLContent</code>. Zur Verdeutlichung dieses Umstandes wurde die URI in <code>DataObject/@Reference</code> auf einen Wert gesetzt, der von MOA SS ganz sicher nicht aufgel&ouml;st werden kann (<code>NichtAufloesbareReferenz1</code>). </p>
+<p>Der Mime-Type der zu signierenden Daten wird als <code>application/xml</code> angegeben.</p>
+<pre>
+ &lt;DataObjectInfo Structure=&quot;detached&quot; ChildOfManifest=&quot;false&quot;&gt;
+ &lt;DataObject Reference=&quot;http://localhost:8080/referencedData/Text.txt&quot;&gt;
+ &lt;/DataObject&gt;
+ &lt;CreateTransformsInfoProfile&gt;
+ &lt;CreateTransformsInfo&gt;
+ &lt;FinalDataMetaInfo&gt;
+ &lt;MimeType&gt;text/plain&lt;/MimeType&gt;
+ &lt;/FinalDataMetaInfo&gt;
+ &lt;/CreateTransformsInfo&gt;
+ &lt;/CreateTransformsInfoProfile&gt;
+ &lt;/DataObjectInfo&gt;
+</pre>
+<p>Wiederum sollen die Daten in der <span class="term">Detached</span> Form in die Signatur aufgenommen werden (<code>Structure=&quot;detached&quot;</code>). Wie zuvor sollen die Daten direkt &uuml;ber eine <code>dsig:Reference</code> in <code>dsig:SignedInfo</code> aufgenommen werden (<code>ChildOfManifest=&quot;false&quot;</code>). </p>
+<p>Die URI in <code>DataObject/@Reference</code> enth&auml;lt dabei die URI, die zur Referenzierung in <code>dsig:Reference/@URI</code> aufgenommen werden soll. Nachdem eine explizite Angabe der Daten mittels <code>Base64Content</code>, <code>XMLContent</code> oder <code>LocRefContent</code> unterbleibt, wird MOA SS versuchen, die URI in <code>dsig:Reference/@URI</code> als URL aufzul&ouml;sen, um so zu den zu signierenden Daten zu gelangen. </p>
+<p>Der Mime-Type der zu signierenden Daten wird als <code>text/plain</code> angegeben.</p>
+<pre>
+ &lt;DataObjectInfo Structure=&quot;detached&quot; ChildOfManifest=&quot;false&quot;&gt;
+ &lt;DataObject Reference=&quot;NichtAufloesbareReferenz2&quot;&gt;
+ &lt;LocRefContent&gt;http://localhost:8080/referencedData/Text.txt&lt;/LocRefContent&gt;
+ &lt;/DataObject&gt;
+ &lt;CreateTransformsInfoProfile&gt;
+ &lt;CreateTransformsInfo&gt;
+ &lt;FinalDataMetaInfo&gt;
+ &lt;MimeType&gt;text/plain&lt;/MimeType&gt;
+ &lt;/FinalDataMetaInfo&gt;
+ &lt;/CreateTransformsInfo&gt;
+ &lt;/CreateTransformsInfoProfile&gt;
+ &lt;/DataObjectInfo&gt;
+</pre>
+<p>Wiederum sollen die Daten in der <span class="term">Detached</span> Form in die Signatur aufgenommen werden (<code>Structure=&quot;detached&quot;</code>). Wie zuvor sollen die Daten direkt &uuml;ber eine <code>dsig:Reference</code> in <code>dsig:SignedInfo</code> aufgenommen werden (<code>ChildOfManifest=&quot;false&quot;</code>).</p>
+<p>Die URI in <code>DataObject/@Reference</code> enth&auml;lt dabei die URI, die zur Referenzierung in <code>dsig:Reference/@URI</code> aufgenommen werden soll. Den Hinweis, wie MOA SS zu den zu signierenden Daten gelangen soll, ist jedoch in LocRefContent enthalten. MOA SS wird also versuchen, die dort enthaltene URL aufzul&ouml;sen, um zu den zu signierenden Daten zu gelangen. Zur Verdeutlichung dieses Umstandes wurde die URI in <code>DataObject/@Reference</code> auf einen Wert gesetzt, der von MOA SS ganz sicher nicht aufgel&ouml;st werden kann (<code>NichtAufloesbareReferenz2</code>). Diese Art der Datenangabe kann eingesetzt werden, wenn die Daten zum Zeitpunkt der Signaturerstellung von einem anderen Ort bezogen werden m&uuml;ssen, als sp&auml;ter dann bei der Signaturpr&uuml;fung.</p>
+<p>Der Mime-Type der zu signierenden Daten wird als <code>text/plain</code> angegeben.</p>
+<pre>
+ &lt;DataObjectInfo Structure=&quot;detached&quot; ChildOfManifest=&quot;false&quot;&gt;
+ &lt;DataObject Reference=&quot;&quot;/&gt;
+ &lt;CreateTransformsInfoProfile&gt;
+ &lt;CreateTransformsInfo&gt;
+ &lt;dsig:Transforms&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#enveloped-signature&quot;/&gt;
+ &lt;/dsig:Transforms&gt;
+ &lt;FinalDataMetaInfo&gt;
+ &lt;MimeType&gt;application/xml&lt;/MimeType&gt;
+ &lt;/FinalDataMetaInfo&gt;
+ &lt;/CreateTransformsInfo&gt;
+ &lt;/CreateTransformsInfoProfile&gt;
+ &lt;/DataObjectInfo&gt;
+</pre>
+<p>Im letzten Fall schlie&szlig;lich sollen wiederum Daten in der <span class="term">Detached</span> Form in die Signatur aufgenommen werden (<code>Structure=&quot;detached&quot;</code>). Wie zuvor sollen die Daten direkt &uuml;ber eine <code>dsig:Reference</code> in <code>dsig:SignedInfo</code> aufgenommen werden (<code>ChildOfManifest=&quot;false&quot;</code>).</p>
+<p>Die Referenz auf die zu signierenden Daten ist wiederum in <code>DataObject/@Reference</code> enthalten; sie verweist diesmal jedoch nicht auf ein externes Dokument, sondern auf das gesamte (XML-)Dokument, in das die zu erstellende Signatur integriert werden soll, und zwar, indem <code>DataObject/@Reference</code> den leeren String (<code>&quot;&quot;</code>) enth&auml;lt. Nachdem dadurch zwangsl&auml;ufig auch die Signatur in den zu signierenden Daten enthalten w&auml;re, wird die Signatur durch die Angabe einer Enveloped Signature Transform aus den zu signierenden Daten herausgenommen, bevor dar&uuml;ber der Hashwert berechnet wird (dsig:Transform).</p>
+<p>Offen bleibt die Frage, wie MOA SS nun wei&szlig;, in welches (XML-)Dokument es die die Signatur integrieren soll. Siehe dazu die Erl&auml;uterungen zum n&auml;chsten Ausschnitts des Requests. </p>
+<p>Der Mime-Type der zu signierenden Daten wird als <code>application/xml</code> angegeben.</p>
+<pre>
+ &lt;CreateSignatureInfo&gt;
+ &lt;CreateSignatureEnvironment&gt;
+ &lt;LocRefContent&gt;http://localhost:8080/referencedData/XMLDocument.xml&lt;/LocRefContent&gt;
+ &lt;/CreateSignatureEnvironment&gt;
+ &lt;CreateSignatureEnvironmentProfile&gt;
+ &lt;CreateSignatureLocation Index=&quot;4&quot; xmlns:doc=&quot;urn:document&quot;&gt;/doc:XMLDocument&lt;/CreateSignatureLocation&gt;
+ &lt;/CreateSignatureEnvironmentProfile&gt;
+ &lt;/CreateSignatureInfo&gt;
+</pre>
+<p>Das Element <code>CreateSignatureInfo</code> ist grunds&auml;tzlich optional, und muss nur angegeben werden, wenn die zu erstellende Signatur von MOA SS in ein bestehendes XML-Dokument integriert werden soll (was in diesem Beispiel ja der Fall ist).</p>
+<p><code>CreateSignatureEnvironment</code> enth&auml;lt das XML-Dokument, in das die zu erstellende Signatur integriert werden soll. In diesem Beispiel wird dieses Dokument mit Hilfe von <code>LocRefContent</code> referenziert, d. h. MOA SS wird versuchen, die darin enthaltene URL aufzul&ouml;sen, um das XML-Dokument zu erhalten. Alternativ k&ouml;nnte auch <code>Base64Content</code> (explizite Angabe des XML-Dokuments in base64 kodierter Form) oder <code>XMLContent</code> (direkte Angabe des XML-Dokuments im Request) verwendet werden.</p>
+<p><a name="webservice_xmlrequests_erstellungxml_daten_hinweisCreateSignatureLocation"></a><code>CreateSignatureLocation</code> enth&auml;lt die Angabe jener Stelle, an der die Signatur in das XML-Dokument eingesetzt werden soll. Der Inhalt dieses Elements bezeichnet mittels <span class="term">XPath</span>-Ausdruck das <span class="term">Parent</span>-Element der Signatur, der Wert des Attributs <code>CreateSignatureLocation/@Index</code> enth&auml;lt den Offset innerhalb dieses <span class="term">Parent</span>-Elements. Betrachten Sie zur Verdeutlichung das XML-Dokument <a href="../../clients/referencedData/src/main/webapp/XMLDocument.xml" target="_blank"><code>XMLDocument.xml</code></a>, in das die Signatur integriert werden soll: Die Signatur soll unmittelbar nach dem zweiten <code>doc:Paragraph</code> Element in das XML-Dokument eingef&uuml;gt werden. Der Inhalt von <code>CreateSignatureLocation</code> (<code>/doc:XMLDocument</code>) selektiert das zuk&uuml;nftige <span class="term">Parent</span>-Element der Signatur, also <code>doc:XMLDocument</code>. Das Attribut <code>Index</code> enth&auml;lt deshalb den Wert <code>4</code> (und nicht etwa <code>2</code> oder <code>3</code>), da erstens bei <code>0</code> zu z&auml;hlen begonnen wird, und zweitens auch die Text-Knoten, die lediglich Whitespace enthalten, f&uuml;r diesen Offset z&auml;hlen (um diese Textknoten erkennen zu k&ouml;nnen, m&uuml;ssen Sie das XML-Dokument in einem Text-Editor &ouml;ffnen). Beachten Sie weiters, dass das im <span class="term">XPath</span>-Ausdruck verwendete Namespace-Prefix <code>doc</code> im Kontext des Elements <code>CreateSignatureLocation</code> bekannt sein muss. Deshalb enth&auml;lt dieses Element auch die entsprechende Namespace-Deklaration (<code>xmlns:doc=&quot;urn:document&quot;</code>).</p>
+<h5>Response</h5>
+<p><code><a href="../../clients/webservice/resources/requests/CreateXMLSignatureRequest.Refs.resp.xml" target="_blank">CreateXMLSignatureRequest.Refs.resp.xml</a></code> ist eine typische Response des SS Webservices auf den obigen Request. Sein Aufbau wird nachfolgend analysiert. Bitte beachten Sie, dass die dargestellte Response zur bessernen Lesbarkeit einger&uuml;ckt und gek&uuml;rzt wurde.</p>
+<pre>
+&lt;CreateXMLSignatureResponse
+ xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;
+ &lt;SignatureEnvironment&gt;
+ &lt;doc:XMLDocument xmlns:doc=&quot;urn:document&quot;&gt;
+ &lt;doc:Paragraph&gt;Ich bin der erste Absatz in diesem Dokument.&lt;/doc:Paragraph&gt;
+ &lt;doc:Paragraph ParaId=&quot;Para2&quot;&gt;Und ich bin der zweite Absatz in diesem Dokument.
+Ich habe weiters ein eigenens ID-Attribut bekommen.&lt;/doc:Paragraph&gt;&lt;dsig:Signature Id=&quot;signature-1-1&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;
+ &lt;dsig:SignedInfo&gt;
+ &lt;dsig:CanonicalizationMethod Algorithm=&quot;http://www.w3.org/TR/2001/REC-xml-c14n-20010315&quot;/&gt;
+ &lt;dsig:SignatureMethod Algorithm=&quot;http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1&quot;/&gt;
+</pre>
+<p>Die Antwort enth&auml;lt in <code>SignatureEnvironment</code> das Ergebnis der Signaturerstellung. Nachdem die Signatur in ein bestehendes XML-Dokument integriert werden sollte, enth&auml;lt <code>SignatureEnvironment</code> das Dokument-Element dieses XML-Dokuments (<code>doc:XMLDocument</code>). Man erkennt auch gut, dass die XML-Signatur als f&uuml;nfter Kindknoten (Offset <code>4</code>) von <code>doc:XMLDocument</code> eingef&uuml;gt wurde.</p>
+<pre>
+ &lt;dsig:Reference Id=&quot;reference-1-2&quot; URI=&quot;#xpointer(id(&apos;signed-data-1-2-1&apos;)/node())&quot;&gt;
+ &lt;dsig:DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot;/&gt;
+ &lt;dsig:DigestValue&gt;A8ml6/aZKCmj1hONwvLItIwGHoc=&lt;/dsig:DigestValue&gt;
+ &lt;/dsig:Reference&gt;
+</pre>
+<p>Diese <code>dsig:Reference</code> wurde auf Grund des zweiten <code>DataObjectInfo</code> Elements im Request erstellt. Man erkennt gut den Verweis in <code>dsig:Reference/@URI</code> auf das <code>dsig:Object</code>, das die signierten Daten enth&auml;lt (der XPointer verweist auf s&auml;mtliche Kindknoten jenes Elements, das ein ID-Attribut mit dem Wert <code>signed-data-1-2-1</code> aufweist, des ersten vorkommenden <code>dsig:Object</code>s der Signatur). </p>
+<pre>
+ &lt;dsig:Reference Id=&quot;reference-1-3&quot; URI=&quot;#xpointer(id(&apos;signed-data-1-3-1&apos;)/node())&quot;&gt;
+ &lt;dsig:Transforms&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#base64&quot;/&gt;
+ &lt;/dsig:Transforms&gt;
+ &lt;dsig:DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot;/&gt;
+ &lt;dsig:DigestValue&gt;0P878Dsmtxv5goj+6KgNmj6S/EE=&lt;/dsig:DigestValue&gt;
+ &lt;/dsig:Reference&gt;
+</pre>
+<p>Diese <code>dsig:Reference</code> wurde auf Grund des dritten <code>DataObjectInfo</code> Elements im Request erstellt. Die Text-Daten wurden von der angegebenen URL (<code>http://localhost:8080/referencedData/Text.txt</code>) aufgel&ouml;st und in das <code>dsig:Object</code> mit dem ID-Attribut <code>signed-data-1-3-1</code> gesteckt. Um Probleme mit nicht in XML darstellbare Zeichen zu vermeiden, wurde der Text nicht direkt signiert, sondern in base64 kodierter Form in das <code>dsig:Object</code> integriert, und eine Transformation zur base64 Dekodierung spezifiziert. </p>
+<pre>
+ &lt;dsig:Reference Id=&quot;reference-1-4&quot; URI=&quot;#xpointer(id(&apos;signed-data-1-4-1&apos;)/node())&quot;&gt;
+ &lt;dsig:Transforms&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#base64&quot;/&gt;
+ &lt;/dsig:Transforms&gt;
+ &lt;dsig:DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot;/&gt;
+ &lt;dsig:DigestValue&gt;0P878Dsmtxv5goj+6KgNmj6S/EE=&lt;/dsig:DigestValue&gt;
+ &lt;/dsig:Reference&gt;
+</pre>
+<p>Diese <code>dsig:Reference</code> wurde auf Grund des vierten <code>DataObjectInfo</code> Elements im Request erstellt. Wie schon bei der Beschreibung des Requests angef&uuml;hrt, ist die erstellte<code> dsig:Reference</code> semantisch genau gleich wie die vorhergehende. </p>
+<pre>
+ &lt;dsig:Reference Id=&quot;reference-1-6&quot; URI=&quot;NichtAufloesbareReferenz1&quot;&gt;
+ &lt;dsig:DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot;/&gt;
+ &lt;dsig:DigestValue&gt;2b83+NbXDFijHzz+sH0T7fM36sA=&lt;/dsig:DigestValue&gt;
+ &lt;/dsig:Reference&gt;
+</pre>
+<p>Diese <code>dsig:Reference</code> wurde auf Grund des sechsten <code>DataObjectInfo</code> Elements im Request erstellt. Die zu signierenden Daten wurden aus dem <code>XMLContent</code> des Requests entnommen, als Wert von <code>dsig:Reference/@URI</code> wurde der Wert von <code>DataObjectInfo/@Reference</code> &uuml;bernommen. </p>
+<pre>
+ &lt;dsig:Reference Id=&quot;reference-1-7&quot; URI=&quot;http://localhost:8080/referencedData/Text.txt&quot;&gt;
+ &lt;dsig:DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot;/&gt;
+ &lt;dsig:DigestValue&gt;0P878Dsmtxv5goj+6KgNmj6S/EE=&lt;/dsig:DigestValue&gt;
+ &lt;/dsig:Reference&gt;
+</pre>
+<p>Diese <code>dsig:Reference</code> wurde auf Grund des siebenten <code>DataObjectInfo</code> Elements im Request erstellt. Um zu den zu signierenden Daten zu gelangen, wurde von MOA SS die URL in <code>DataObjectInfo/@Reference</code> aufgel&ouml;st. Gleicherma&szlig;en wurde die URL in <code>dsig:Reference/@URI</code> &uuml;bernommen. </p>
+<pre>
+ &lt;dsig:Reference Id=&quot;reference-1-8&quot; URI=&quot;NichtAufloesbareReferenz2&quot;&gt;
+ &lt;dsig:DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot;/&gt;
+ &lt;dsig:DigestValue&gt;0P878Dsmtxv5goj+6KgNmj6S/EE=&lt;/dsig:DigestValue&gt;
+ &lt;/dsig:Reference&gt;
+</pre>
+<p>Diese <code>dsig:Reference</code> wurde auf Grund des achten <code>DataObjectInfo</code> Elements im Request erstellt. Um zu den zu signierenden Daten zu gelangen, wurde von MOA SS die URL in LocRefContent aufgel&ouml;st. In <code>dsig:Reference/@URI</code> wurde der Wert aus <code>DataObjectInfo/@Reference</code> &uuml;bernommen.</p>
+<pre>
+ &lt;dsig:Reference Id=&quot;reference-1-9&quot; URI=&quot;&quot;&gt;
+ &lt;dsig:Transforms&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#enveloped-signature&quot;/&gt;
+ &lt;/dsig:Transforms&gt;
+ &lt;dsig:DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot;/&gt;
+ &lt;dsig:DigestValue&gt;2b83+NbXDFijHzz+sH0T7fM36sA=&lt;/dsig:DigestValue&gt;
+ &lt;/dsig:Reference&gt;
+</pre>
+<p>Diese <code>dsig:Reference</code> wurde auf Grund des neunten <code>DataObjectInfo</code> Elements im Request erstellt. Als zu signierende Daten wurde das XML-Dokument ausgew&auml;hlt, in das die XML-Signatur integriert werden solle. Vor der Berechnung des Hashwerts wurde eine <span class="term">Enveloped Signature</span> Transformation zwischengeschaltet, welche die XML-Struktur der Signatur selbst aus den Hash-Eingangsdaten herausschneidet. </p>
+<pre>
+ &lt;dsig:Reference Type=&quot;http://www.w3.org/2000/09/xmldsig#Manifest&quot; URI=&quot;#dsig-manifest-1-1&quot;&gt;
+ &lt;dsig:DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot;/&gt;
+ &lt;dsig:DigestValue&gt;mNsxUkFoF46XZVBivBo4aasFCTQ=&lt;/dsig:DigestValue&gt;
+ &lt;/dsig:Reference&gt;
+</pre>
+<p>Diese <code>dsig:Reference</code> verweist auf das <code>dsig:Manifest</code> weiter unten in der XML-Struktur der Signatur. Das <code>dsig:Manifest</code> wurde angelegt, weil bei zwei <code>DataObjectInfo</code>s im Request das Attribut <code>ChildOfManifest</code> auf den Wert <code>true</code> gesetzt wurde.</p>
+<pre>
+ &lt;/dsig:SignedInfo&gt;
+ &lt;dsig:SignatureValue&gt;...&lt;/dsig:SignatureValue&gt;
+ &lt;dsig:KeyInfo&gt;...&lt;/dsig:KeyInfo&gt;
+ &lt;dsig:Object Id=&quot;signed-data-1-2-1&quot;&gt;
+ &lt;doc:XMLDocument xmlns:doc=&quot;urn:document&quot;&gt;
+ &lt;doc:Paragraph&gt;Ich bin der erste Absatz in diesem Dokument.&lt;/doc:Paragraph&gt;
+ &lt;doc:Paragraph ParaId=&quot;Para2&quot;&gt;Und ich bin der zweite Absatz in diesem Dokument.
+Ich habe weiters ein eigenens ID-Attribut bekommen.&lt;/doc:Paragraph&gt;
+ &lt;/doc:XMLDocument&gt;
+ &lt;/dsig:Object&gt;
+ &lt;dsig:Object Id=&quot;signed-data-1-3-1&quot;&gt;RGllc2UgRGF0ZW4gc2luZCByZWluZXIgVGV4dC4=&lt;/dsig:Object&gt;
+ &lt;dsig:Object Id=&quot;signed-data-1-4-1&quot;&gt;RGllc2UgRGF0ZW4gc2luZCByZWluZXIgVGV4dC4=&lt;/dsig:Object&gt;
+ &lt;dsig:Object Id=&quot;signed-data-1-1-1&quot;&gt;RGllc2UgRGF0ZW4gd2FyZW4gYmFzZTY0IGtvZGllcnQu&lt;/dsig:Object&gt;
+</pre>
+<p><code>SignatureValue</code> und <code>KeyInfo</code> werden an dieser Stelle nicht n&auml;her betrachtet.</p>
+<p>Das erste <code>dsig:Object</code> enth&auml;lt die Daten aus dem zweiten <code>DataObjectInfo</code>; das zweite <code>dsig:Object</code> jene aus dem dritten <code>DataObjectInfo</code>; das dritte <code>dsig:Object</code> jene aus dem vierten <code>DataObjectInfo</code>; das vierte <code>dsig:Object</code> schlie&szlig;lich jene aus dem ersten <code>DataObjectInfo</code>.</p>
+<pre>
+ &lt;dsig:Object&gt;
+ &lt;dsig:Manifest Id=&quot;dsig-manifest-1-1&quot;&gt;
+ &lt;dsig:Reference Id=&quot;reference-1-1&quot; URI=&quot;#xpointer(id(&apos;signed-data-1-1-1&apos;)/node())&quot;&gt;
+ &lt;dsig:Transforms&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#base64&quot;/&gt;
+ &lt;/dsig:Transforms&gt;
+ &lt;dsig:DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot;/&gt;
+ &lt;dsig:DigestValue&gt;a53jOsL7KbyltpByAK87FoMZphI=&lt;/dsig:DigestValue&gt;
+ &lt;/dsig:Reference&gt;
+ &lt;dsig:Reference Id=&quot;reference-1-5&quot; URI=&quot;http://localhost:8080/referencedData/Text.b64&quot;&gt;
+ &lt;dsig:DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot;/&gt;
+ &lt;dsig:DigestValue&gt;a53jOsL7KbyltpByAK87FoMZphI=&lt;/dsig:DigestValue&gt;
+ &lt;/dsig:Reference&gt;
+ &lt;/dsig:Manifest&gt;
+ &lt;/dsig:Object&gt;
+</pre>
+<p>Das f&uuml;nfte <code>dsig:Object</code> enth&auml;lt das <code>dsig:Manifest</code>, das von MOA SS auf Grund des ersten bzw. f&uuml;nften <code>DataObjectInfo</code> des Requests erstellt wurde. Darin enthalten sind die zum ersten und f&uuml;nten <code>DataObjectInfo</code> korrespondierenden <code>dsig:Reference</code> Elemente. Die Daten f&uuml;r die erste im <code>dsig:Manifest</code> enthaltene <code>dsig:Reference</code> wurden aus dem <code>Base64Content</code> Element des ersten <code>DataObjectInfo</code> entnommen, jene f&uuml;r die zweite <code>dsig:Reference</code> aus dem <code>Base64Content</code> Element des f&uuml;nften <code>DataObjectInfo</code>. Der Wert des <code>URI</code> Attributs der zweiten <code>dsig:Reference</code> wurde aus dem <code>DataObject/@Reference</code> des f&uuml;nften <code>DataObjectInfo</code> &uuml;bernommen. </p>
+<h4><a name="webservice_xmlrequests_erstellungxml_transformationen" id="webservice_xmlrequests_erstellungxml_transformationen"></a>2.1.1.3 Transformationen</h4>
+<h5>Request</h5>
+<p>Dieses Beispiel (<a href="../../clients/webservice/resources/requests/CreateXMLSignatureRequest.Transforms.xml" target="_blank"><code>CreateXMLSignatureRequest.Transforms.xml</code></a>) stellt die wichtigsten Transformationen vor, die von MOA SS bei der Erstellung einer Signatur verwendet werden k&ouml;nnen. Eine Transformation bzw. eine Kette mehrerer hintereinandergeschalteter Transformationen werden auf die Referenz-Eingangsdaten (also jene Daten, die in DataObjectInfo/DataObject angegeben werden) angewendet; das Ergebnis flie&szlig;t dann in die Hashwert-Berechnung ein. </p>
+<pre>&lt;CreateXMLSignatureRequest
+ xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;<br> &lt;KeyIdentifier&gt;KG_allgemein&lt;/KeyIdentifier&gt;<br> &lt;SingleSignatureInfo SecurityLayerConformity=&quot;false&quot;&gt;</pre>
+<p>Die Signatur soll mit dem Schl&uuml;ssel <code>KG_allgemein</code> erstellt werden; jene Elemente, die speziell f&uuml;r eine Security-Layer V1.1 konforme Signatur notwendig sind (vergleiche <a href="#webservice_xmlrequests_erstellungxml_simple" class="term">Einfaches Beispiel</a>), brauchen nicht erstellt zu werden (<code>SecurityLayerConformity=&quot;false&quot;</code>).</p>
+<pre>
+ &lt;DataObjectInfo Structure=&quot;detached&quot;&gt;
+ &lt;DataObject Reference=&quot;http://localhost:8080/referencedData/Text.b64&quot;/&gt;
+ &lt;CreateTransformsInfoProfile&gt;
+ &lt;CreateTransformsInfo&gt;
+ &lt;dsig:Transforms&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#base64&quot;/&gt;
+ &lt;/dsig:Transforms&gt;
+ &lt;FinalDataMetaInfo&gt;
+ &lt;MimeType&gt;text/plain&lt;/MimeType&gt;
+ &lt;/FinalDataMetaInfo&gt;
+ &lt;/CreateTransformsInfo&gt;
+ &lt;/CreateTransformsInfoProfile&gt;
+ &lt;/DataObjectInfo&gt;
+</pre>
+<p>F&uuml;r das erste zu signierende Datenobjekt werden die Referenz-Eingangsdaten mittels <code>DataObject/@Reference</code> referenziert, d. h. MOA SS l&ouml;st die darin enthaltene URL auf, um zu den Daten zu gelangen. Es handelt sich dabei um einen <a href="../../clients/referencedData/src/main/webapp/Text.b64" target="_blank">base64 kodierten Text</a>.</p>
+<p>Unterschrieben werden soll nun aber nicht dieser base64 kodierte Text, sondern der entsprechend dekodierte Text. Dies l&auml;sst sich elegant durch die Angabe einer <span class="term"><a href="http://www.w3.org/TR/xmldsig-core/#sec-Base-64" target="_blank">Base64 Decoding</a></span><a href="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/#sec-Base-64" target="_blank"> Transformation</a> bewerkstelligen. Dazu wird als erstes Kindelement von <code>CreateTransformsInfo</code> ein <code>dsig:Transforms</code> Element im Request angegeben. Dieses <code>dsig:Transforms</code> Element nimmt ein oderer mehrere <code>dsig:Transform</code> Elemente auf, wobei jedes <code>dsig:Transform</code> Element f&uuml;r eine Transformation steht. In unserem Fall wird nur eine einzige Transformation ben&ouml;tigt; die Angabe, um welche Transformation es sich handelt, wird durch das Attribut <code>dsig:Transform/@Algorithm</code> angegeben. F&uuml;r die <span class="term">Base64 Decoding</span> Transformation muss der Wert auf <code>http://www.w3.org/2000/09/xmldsig#base64</code> gesetzt werden. Sie ist eine parameterlose Transformation, d. h. <code>dsig:Transform</code> hat keine Kindelemente.</p>
+<p>Der Mime-Type der zu signierenden Daten wird als <code>text/plain</code> angegeben, da ja tats&auml;chlich nach der durchgef&uuml;hrten Transformation dekodierter Text vorliegt, &uuml;ber den dann der Hashwert berechnet wird. </p>
+<pre>
+ &lt;DataObjectInfo Structure=&quot;detached&quot;&gt;
+ &lt;DataObject Reference=&quot;http://localhost:8080/referencedData/XMLDocument.xml&quot;/&gt;
+ &lt;CreateTransformsInfoProfile&gt;
+ &lt;CreateTransformsInfo&gt;
+ &lt;dsig:Transforms&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/2002/06/xmldsig-filter2&quot;&gt;
+ &lt;xp2:XPath
+ xmlns:xp2=&quot;http://www.w3.org/2002/06/xmldsig-filter2&quot;
+ xmlns:doc=&quot;urn:document&quot;
+ Filter=&quot;subtract&quot;&gt;/doc:XMLDocument/doc:Paragraph[2]&lt;/xp2:XPath&gt;
+ &lt;/dsig:Transform&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/TR/1999/REC-xslt-19991116&quot;&gt;
+ &lt;xsl:stylesheet version=&quot;1.0&quot;
+ xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot; xmlns:doc=&quot;urn:document&quot;&gt;
+ &lt;xsl:output encoding=&quot;UTF-8&quot; method=&quot;xml&quot; indent=&quot;yes&quot;/&gt;
+ &lt;xsl:template match=&quot;/doc:XMLDocument&quot;&gt;
+ &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
+ &lt;head&gt;
+ &lt;title&gt;HTML-Dokument&lt;/title&gt;
+ &lt;/head&gt;
+ &lt;body&gt;
+ &lt;xsl:for-each select=&quot;doc:Paragraph&quot;&gt;
+ &lt;p&gt;
+ &lt;xsl:value-of select=&quot;child::text()&quot;/&gt;
+ &lt;/p&gt;
+ &lt;/xsl:for-each&gt;
+ &lt;/body&gt;
+ &lt;/html&gt;
+ &lt;/xsl:template&gt;
+&lt;/xsl:stylesheet&gt;&lt;/dsig:Transform&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/TR/2001/REC-xml-c14n-20010315&quot;/&gt;
+ &lt;/dsig:Transforms&gt;
+ &lt;FinalDataMetaInfo&gt;
+ &lt;MimeType&gt;application/xhtml+xml&lt;/MimeType&gt;
+ &lt;/FinalDataMetaInfo&gt;
+ &lt;/CreateTransformsInfo&gt;
+ &lt;/CreateTransformsInfoProfile&gt;
+ &lt;/DataObjectInfo&gt;
+</pre>
+<p>F&uuml;r das zweite zu signierende Datenobjekt werden die Referenz-Eingangsdaten wiederum mittels <code>DataObject/@Reference</code> referenziert, d. h. MOA SS l&ouml;st die darin enthaltene URL auf, um zu den Daten zu gelangen. Es handelt sich dabei um ein <a href="../../clients/webservice/resources/requests/CreateXMLSignatureRequest.Transforms.xml" target="_blank">XML-Dokument</a>.</p>
+<p>Zun&auml;chst soll von diesem XML-Dokument jedoch ein Teil weggeschnitten werden, da er nicht mitsigniert werden soll. F&uuml;r diesen Zweck bietet sich die<a href="http://www.w3.org/TR/2002/REC-xmldsig-filter2-20021108/" target="_blank" class="term"> XPath Filter 2 Transformation</a> an. Das Attribut <code>dsig:Transform/@Algorithm</code> ist dazu auf den Wert <code>http://www.w3.org/2002/06/xmldsig-filter2</code> zu setzen. Diese Transformation ben&ouml;tigt weiters Transformationsparameter. Diese werden als Kindelement <code>xp2:XPath</code> in <code>dsig:Transform</code> angegeben. Das Attribut <code>Filter</code> selektiert den Filtermodus; f&uuml;r das Bespiel wird den Modus <code>subtract</code> ben&ouml;tigt, da ein Teil weggefiltert werden soll. Der Textinhalt von <code>xp2:XPath</code> ist ein XPath-Ausdruck, der den Wurzelknoten jenes Teilbaums selektiert, der weggefiltert werden soll. F&uuml;r das Beispiel soll das zweite <code>doc:Paragraph</code> Element des XML-Dokuments weggefiltert werden. Beachten Sie, dass das im XPath-Ausdruck verwendete Namespace-Prefix <code>doc</code> im Kontext des <code>xp2:XPath</code> Elements deklariert sein muss.</p>
+<p>Als n&auml;chstes soll nun das XML-Dokument mit Hilfe eines Stylesheets in ein XHTML-Dokument &uuml;bergef&uuml;hrt werden. Dazu kann die <a href="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/#sec-XSLT" target="_blank" class="term">XSLT Transformation</a> verwendet werden. Das Attribut <code>dsig:Transform/@Algorithm</code> ist dazu auf den Wert <code>http://www.w3.org/TR/1999/REC-xslt-19991116</code> zu setzen. Auch diese Transformation ben&ouml;tigt Transformationsparameter: Als Kindelement von <code>dsig:Transform</code> wird jener Stylesheet angegeben, mit dem die Stylesheet-Transformation ausgef&uuml;hrt werden soll.</p>
+<p>Abschlie&szlig;end soll, wie in der Spezifikation der<span class="term"> XSLT-Transformation</span> <a href="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/#sec-XSLT" target="_blank">empfohlen</a>, eine Kanonisierungstransformation angewendet werden. Damit k&ouml;nnen Unterschiede im Output unterschiedlicher XSLT-Engines, wie sie in der Praxis vorkommen, abgefangen werden. Beachten Sie, dass als Voraussetzung dazu die Output-Methode im Stylesheet auf <code>xml</code> festgelegt werden muss (<code>&lt;xsl:output method=&quot;xml&quot;&gt;</code>), denn nur XML-Output kann anschlie&szlig;end kanonisiert werden. Das Attribut <code>dsig:Transform/@Algorithm</code> ist f&uuml;r die <a href="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/#sec-c14nAlg" target="_blank"><span class="term">Canonical XML Transformation</span></a> auf den Wert http://www.w3.org/TR/2001/REC-xml-c14n-20010315 zu setzen. Die Transformation ben&ouml;tigt keine Transformationsparameter.</p>
+<p>Das Ergebnis der drei hintereinandergeschalteten Transformationen, welches der Hashwert-Berechnung zuflie&szlig;t, finden Sie <a href="../../clients/webservice/resources/requests/transformResults/CreateXMLSignatureRequest.Transforms.hashinput.ref2.txt" target="_blank">hier</a>. </p>
+<h5>Response</h5>
+<p><code><a href="../../clients/webservice/resources/requests/CreateXMLSignatureRequest.Transforms.resp.xml" target="_blank">CreateXMLSignatureRequest.Transforms.resp.xml</a></code> ist eine typische Response des SS Webservices auf den obigen Request. Sein Aufbau wird nachfolgend analysiert. Bitte beachten Sie, dass die dargestellte Response zur bessernen Lesbarkeit einger&uuml;ckt und gek&uuml;rzt wurde.</p>
+<pre>
+&lt;CreateXMLSignatureResponse
+ xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;
+ &lt;SignatureEnvironment&gt;
+ &lt;dsig:Signature Id=&quot;signature-1-1&quot; xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;
+ &lt;dsig:SignedInfo&gt;
+ &lt;dsig:CanonicalizationMethod Algorithm=&quot;http://www.w3.org/TR/2001/REC-xml-c14n-20010315&quot;/&gt;
+ &lt;dsig:SignatureMethod Algorithm=&quot;http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1&quot;/&gt;
+</pre>
+<p>Die Antwort enth&auml;lt in <code>SignatureEnvironment</code> das Ergebnis der Signaturerstellung. Nachdem die Signatur in kein bestehendes Dokument eingef&uuml;gt werden sollte, enh&auml;lt <code>SignatureEnvironment</code> direkt die erzeugte XML-Signatur (<code>dsig:Signature</code>).</p>
+<pre>
+ &lt;dsig:Reference Id=&quot;reference-1-1&quot; URI=&quot;http://localhost:8080/referencedData/Text.b64&quot;&gt;
+ &lt;dsig:Transforms&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#base64&quot;/&gt;
+ &lt;/dsig:Transforms&gt;
+ &lt;dsig:DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot;/&gt;
+ &lt;dsig:DigestValue&gt;a53jOsL7KbyltpByAK87FoMZphI=&lt;/dsig:DigestValue&gt;
+ &lt;/dsig:Reference&gt;
+</pre>
+<p>Die erste <code>dsig:Reference</code> wurde auf Grund des ersten <code>DataObjectInfo</code> im Request erstellt. Man erkennt dass die URL auf die Referenz-Eingangsdaten (Wert des Attributs <code>dsig:Reference/@URI</code>) aus <code>DataObject/@Reference</code> &uuml;bernommen und eine <span class="term">Base64 Decoding Transformation</span> eingef&uuml;gt w&uuml;rde. Die im Request spezifizierten Transformationen werden also eins zu eins in die XML-Signatur &uuml;bernommen.</p>
+<pre>
+ &lt;dsig:Reference Id=&quot;reference-1-2&quot; URI=&quot;http://localhost:8080/referencedData/XMLDocument.xml&quot;&gt;
+ &lt;dsig:Transforms&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/2002/06/xmldsig-filter2&quot;&gt;
+ &lt;xp2:XPath Filter=&quot;subtract&quot; xmlns:doc=&quot;urn:document&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;
+ xmlns:xf2=&quot;http://www.w3.org/2002/06/xmldsig-filter2&quot;
+ xmlns:xp2=&quot;http://www.w3.org/2002/06/xmldsig-filter2&quot;&gt;/doc:XMLDocument/doc:Paragraph[2]&lt;/xp2:XPath&gt;
+ &lt;/dsig:Transform&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/TR/1999/REC-xslt-19991116&quot;&gt;
+ &lt;xsl:stylesheet version=&quot;1.0&quot;
+ xmlns:doc=&quot;urn:document&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;&gt;
+ &lt;xsl:output encoding=&quot;UTF-8&quot; indent=&quot;yes&quot; method=&quot;xml&quot;/&gt;
+ &lt;xsl:template match=&quot;/doc:XMLDocument&quot;&gt;...&lt;/xsl:template&gt;
+ &lt;/xsl:stylesheet&gt;
+ &lt;/dsig:Transform&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/TR/2001/REC-xml-c14n-20010315&quot;/&gt;
+ &lt;/dsig:Transforms&gt;
+ &lt;dsig:DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot;/&gt;
+ &lt;dsig:DigestValue&gt;fIPwneCpjVqTXwHMN9DFfx6tJIU=&lt;/dsig:DigestValue&gt;
+ &lt;/dsig:Reference&gt;
+</pre>
+<p>Die zweite <code>dsig:Reference</code> wurde auf Grund des zweiten <code>DataObjectInfo</code> im Request erstellt. Man erkennt auch hier gut, dass die URL auf die Referenz-Eingangsdaten (Wert des Attributs <code>dsig:Reference/@URI</code>) aus <code>DataObject/@Reference</code> &uuml;bernommen und die drei Transformationen wie im Request angegeben eingef&uuml;gt wurden. </p>
+<h4><a name="webservice_xmlrequests_erstellungxml_ergaenzungsobjekte"></a>2.1.1.4 Erg&auml;nzungsobjekte </h4>
+<h5>Request</h5>
+<p>Dieses Beispiel (<a href="../../clients/webservice/resources/requests/CreateXMLSignatureRequest.Supplements.xml" target="_blank"><code>CreateXMLSignatureRequest.Supplements.xml</code></a>) stellt die Verwendung von Erg&auml;nzungsobjekten vor. Ein Erg&auml;nzungsobjekt betrifft entweder ein zu signierendes Datum (Zusammenhang mit einem <code>DataObject</code>) oder jenes Dokument, in das eine zu erzeugende Signatur eingef&uuml;gt werden soll (Zusammenhang mit <code>CreateSignatureEnvironment</code>). Es muss dann angegeben werden, wenn in einem zu signierenden Datum bzw. im Einf&uuml;gedokument auf Daten per Referenz verwiesen wird, diese referenzierten Daten aber von MOA SS nicht aufgel&ouml;st werden k&ouml;nnen. Das Erg&auml;nzungsobjekt enth&auml;lt dann genau diese Daten, die nicht von MOA SS aufgel&ouml;st werden k&ouml;nnen.</p>
+<pre>
+&lt;CreateXMLSignatureRequest
+ xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;
+ &lt;KeyIdentifier&gt;KG_allgemein&lt;/KeyIdentifier&gt;
+ &lt;SingleSignatureInfo SecurityLayerConformity=&quot;false&quot;&gt;
+</pre>
+<p>Die Signatur soll mit dem Schl&uuml;ssel <code>KG_allgemein</code> erstellt werden; jene Elemente, die speziell f&uuml;r eine Security-Layer V1.1 konforme Signatur notwendig sind (vergleiche <a href="#webservice_xmlrequests_erstellungxml_simple" class="term">Einfaches Beispiel</a>), brauchen nicht erstellt zu werden (<code>SecurityLayerConformity=&quot;false&quot;</code>).</p>
+<pre>
+ &lt;DataObjectInfo Structure=&quot;detached&quot;&gt;
+ &lt;DataObject Reference=&quot;#Para2&quot;/&gt;
+</pre>
+<p>Das zu signierende Datum in diesem Beispiel ist ein Teil des Dokuments, in das die zu erstellende Signatur eingef&uuml;gt werden soll. Der Wert des <code>Reference</code> Attributs ist <code>#Para2</code>, das bedeutet, dass jenes Element des Einf&uuml;gedokuments signiert werden soll, das ein ID-Attribut mit dem Wert <code>#Para2</code> aufweist. Damit MOA SS diesen Hinweis auswerten kann, muss es das Einf&uuml;gedokument validierend parsen, denn sonst w&uuml;sste es ja nicht, welche Attribute &uuml;berhaupt ID-Attribute sind. Das zum validierenden Parsen notwendige XML-Schema wird MOA SS in diesem Beispiel &uuml;ber ein Erg&auml;nzungsobjekt zum Einf&uuml;gedokument mitgeteilt (siehe weiter unten). </p>
+<pre>
+ &lt;CreateTransformsInfoProfile&gt;
+ &lt;CreateTransformsInfo&gt;
+ &lt;dsig:Transforms&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/TR/1999/REC-xslt-19991116&quot;&gt;
+ &lt;xsl:stylesheet version=&quot;1.0&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;&gt;
+ &lt;xsl:include href=&quot;XMLDocument.Para.xsl&quot;/&gt;
+&lt;/xsl:stylesheet&gt;
+ &lt;/dsig:Transform&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/2001/10/xml-exc-c14n#&quot;/&gt;
+ &lt;/dsig:Transforms&gt;
+ &lt;FinalDataMetaInfo&gt;
+ &lt;MimeType&gt;application/xhtml+xml&lt;/MimeType&gt;
+ &lt;/FinalDataMetaInfo&gt;
+</pre>
+<p>Das Beispiel enth&auml;lt als erste Transformation eine <span class="term">XSLT-Transformation</span>. Der als Kindelement von <code>dsig:Transform</code> angegebene Stylesheet verweist dabei mittels <code>xsl:include</code> auf einen weiteren Stylesheet. Dieser weitere Stylesheet kann jedoch von MOA nicht direkt aufgel&ouml;st werden, da er als relative Referenz angegeben wird. Deshalb ist es notwendig, diesen weiteren Stylesheet als Erg&auml;nzungsobjekt zu den signierenden Daten anzugeben:</p>
+<
+ &lt;/CreateTransformsInfo&gt;
+ &lt;Supplement&gt;
+ &lt;Content Reference=&quot;XMLDocument.Para.xsl&quot;&gt;
+ &lt;LocRefContent&gt;http://localhost:8080/referencedData/XMLDocument.Para.xsl&lt;/LocRefContent&gt;
+ &lt;/Content&gt;
+ &lt;/Supplement&gt;
+ &lt;/CreateTransformsInfoProfile&gt;
+ &lt;/DataObjectInfo&gt;
+</pre>
+<p>Ein Erg&auml;nzungsobjekt f&uuml;r zu signierende Daten wird im entsprechenden <code>DataObjectInfo</code> Element angegeben, und zwar als Inhalt des Elements <code>CreateTransformsInfoProfile/Supplement</code>. Das verpflichtend zu verwendende Attribut <code>Content/@Reference</code> enth&auml;lt dabei die Referenz auf das Erg&auml;nzungsobjekt in exakt jener Schreibweise, wie sie in der <code>xsl:include</code> Direktive vorkommt, hier also <code>XMLDocument.Para.xsl</code>. Das Element <code>Content</code> beinhaltet das Erg&auml;nzungsobjekt so, wie es MOA SS verwenden soll (Elemente <code>Base64Content</code> oder <code>XMLContent</code>, vergleiche <a href="#webservice_xmlrequests_erstellungxml_simple"><span class="term">Einfaches Beispiel</span></a>), bzw. enth&auml;lt eine von MOA SS aufl&ouml;sbare Referenz auf das Erg&auml;nzungsobjekt (Element <code>LocRefContent</code>, vergleiche <a href="#webservice_xmlrequests_erstellungxml_simple"><span class="term">Einfaches Beispiel</span></a>). Im konkreten Beispiel wird <code>LocRefContent</code> verwendet. </p>
+<pre>
+ &lt;CreateSignatureInfo&gt;
+ &lt;CreateSignatureEnvironment
+ Reference=&quot;http://localhost:8080/referencedData/XMLDocument.withSchemaHint.xml&quot;/&gt;
+ &lt;CreateSignatureEnvironmentProfile&gt;
+ &lt;CreateSignatureLocation
+ Index=&quot;4&quot; xmlns:doc=&quot;urn:document&quot;&gt;/doc:XMLDocument&lt;/CreateSignatureLocation&gt;
+</pre>
+<p>Eingef&uuml;gt werden soll die zu erzeugende Signatur in ein <a href="../../clients/referencedData/src/main/webapp/XMLDocument.withSchemaHint.xml" target="_blank">bestehendes Dokument</a>, das MOA SS durch Aufl&ouml;sen der in <code>CreateSignatureEnvironment/@Reference</code> angegebenen URL erh&auml;lt. Eingef&uuml;gt werden soll die Signatur als f&uuml;nfter Kindknoten des Wurzelelements <code>doc:XMLDocument</code>. Beachten Sie wiederum die <a href="#webservice_xmlrequests_erstellungxml_daten_hinweisCreateSignatureLocation">Hinweise</a> zur Z&auml;hlweise f&uuml;r das Attribut <code>Index</code> bzw. zur Deklaration der im XPath-Ausdruck verwendeten Namespace-Deklarationen (hier <code>doc</code>). </p>
+<pre>
+ &lt;Supplement&gt;
+ &lt;Content Reference=&quot;urn:XMLDocument.xsd&quot;&gt;
+ &lt;LocRefContent&gt;http://localhost:8080/referencedData/XMLDocument.xsd&lt;/LocRefContent&gt;
+ &lt;/Content&gt;
+ &lt;/Supplement&gt;
+ &lt;/CreateSignatureEnvironmentProfile&gt;
+ &lt;/CreateSignatureInfo&gt;
+</pre>
+<p>Wie oben bereits angemerkt, muss MOA SS zur Aufl&ouml;sung der ID-Referenz <code>#Para2</code> das Einf&uuml;gedokument validierend parsen. Im Einf&uuml;gedokument ist zwar nun ein Hinweis auf die dazu notwendige Grammatikinformation in Form eines XML-Schemas enthalten (Attribut <code>xsi:schemaLocation</code> enth&auml;lt den Wert <code>&quot;urn:document urn:XMLDocument.xsd&quot;</code>). Nachdem die darin angegebene URI <code>urn:XMLDocument.xsd</code> jedoch von MOA nicht direkt aufgel&ouml;st werden kann, wird im Request ein Erg&auml;nzungsobjekt zum Einf&uuml;gedokument angegeben (<code>CreateSignatureEnvironmentProfile/Supplement</code>). Das Attribut <code>Content/@Reference</code> enth&auml;lt die Referenz auf das Erg&auml;nzungsobjekt in exakt jener Schreibweise, wie sie im Attribut <code>xsi:schemaLocation</code> angegeben wurde (<code>urn:XMLDocument.xsd</code>). Das Element <code>Content</code> beinhaltet das Erg&auml;nzungsobjekt so, wie es MOA SS verwenden soll (Elemente <code>Base64Content</code> oder <code>XMLContent</code>, vergleiche <a href="#webservice_xmlrequests_erstellungxml_simple"><span class="term">Einfaches Beispiel</span></a>), bzw. enth&auml;lt eine von MOA SS aufl&ouml;sbare Referenz auf das Erg&auml;nzungsobjekt (Element <code>LocRefContent</code>, vergleiche <a href="#webservice_xmlrequests_erstellungxml_simple"><span class="term">Einfaches Beispiel</span></a>). Im konkreten Beispiel wird <code>LocRefContent</code> verwendet. </p>
+<p>Beachten Sie bitte, dass die Verwendung von Erg&auml;nzungsobjekten f&uuml;r die Mitteilung von XML-Schemata nur dann funktioniert, wenn die Referenz auf das XML-Schema in der <code>xsi:schemaLocation</code> eine absolute URI ist (also z.B. wie hier <code>urn:XMLDocument.xsd</code> oder auch <code>http://example.org/XMLDocument.xsd</code>, nicht aber z.B. <code>XMLDocument.xsd</code> oder <code>../schemas/XMLDocument.xsd</code>).</p>
+<p>Auch f&uuml;r das Aufl&ouml;sen eines Verweises in einer DTD kann in analoger Weise von Erg&auml;nzungsobjekten Gebrauch gemacht werden. </p>
+<h5>Response</h5>
+<p><code><a href="../../clients/webservice/resources/requests/CreateXMLSignatureRequest.Supplements.resp.xml" target="_blank">CreateXMLSignatureRequest.Supplements.resp.xml</a></code> ist eine typische Response des SS Webservices auf den obigen Request. Er wird an dieser Stelle nicht n&auml;her analysiert, da er keine f&uuml;r das Thema des Beispiels relevanten Besonderheiten aufweist.</p>
+<h3><a name="webservice_xmlrequests_pruefungcms" id="webservice_xmlrequests_pruefungcms"></a>2.1.2 Pr&uuml;fung einer CMS-Signatur</h3>
+<h4><a name="webservice_xmlrequests_pruefungcms_einfach" id="webservice_xmlrequests_pruefungcms_einfach"></a>2.1.2.1 Einfaches Beispiel</h4>
+<h5>Request</h5>
+<p>Dieses Beispiel (<a href="../../clients/webservice/resources/requests/VerifyCMSSignatureRequest.Simple.xml" target="_blank"><code>VerifyCMSSignatureRequest.Simple.xml</code></a>) ist ein einfacher Request zur Pr&uuml;fung einer CMS-Signatur. Sein Aufbau wird nachfolgend analysiert. Bitte beachten Sie, dass der nachfolgende Ausschnitt aus dem Request aus Gr&uuml;nden der &Uuml;bersichtlichkeit gek&uuml;rzt wurde.</p>
+<pre>
+&lt;VerifyCMSSignatureRequest
+ xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;&gt;
+ &lt;CMSSignature&gt;MIIHsAYJKo...4sLL6kpOPJaLg==&lt;/CMSSignature&gt;
+ &lt;TrustProfileID&gt;Test-Signaturdienste&lt;/TrustProfileID&gt;
+&lt;/VerifyCMSSignatureRequest&gt;
+</pre>
+<p>Der Request enth&auml;lt zun&auml;chst in <code>CMSSignature</code> die zu pr&uuml;fende CMS-Signatur, und zwar in base64 kodierter Form. In diesem Beispiel wird davon ausgegangen, dass es sich dabei um eine <span class="term">Enveloping</span> Signature handelt, d. h. dass die signierten Daten als Teil der CMS-Struktur vorhanden sind. F&uuml;r die Behandlung einer <span class="term">Detached</span> Signature sei auf das <a href="#webservice_xmlrequests_pruefungcms_detached">n&auml;chste Beispiel</a> verwiesen.</p>
+<p>Abschlie&szlig;end enth&auml;lt der Request in <code>TrustProfileID</code> die Angabe des Vertrauensprofils, gegen das die Vertrauenspr&uuml;fung des Zertifikats durchgef&uuml;hrt werden soll. Ein Vertrauensprofil mit dem angegebenen Namen muss in der f&uuml;r die Signaturpr&uuml;fung verwendeten Instanz von MOA SP eingerichtet sein. </p>
+<h5>Response</h5>
+<p><code><a href="../../clients/webservice/resources/requests/VerifyCMSSignatureRequest.Simple.resp.xml" target="_blank">VerifyCMSSignatureRequest.Simple.resp.xml</a></code> ist eine typische Response des SP Webservices auf den obigen Request. Sein Aufbau wird nachfolgend analysiert. Bitte beachten Sie, dass die dargestellte Response zur bessernen Lesbarkeit einger&uuml;ckt und gek&uuml;rzt wurde.</p>
+<pre>
+&lt;VerifyCMSSignatureResponse
+ xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;
+ &lt;SignerInfo&gt;
+ &lt;dsig:X509Data&gt;
+ &lt;dsig:X509SubjectName&gt;serialNumber=615536615920,givenName=Gregor,SN=Karlinger,
+CN=Gregor Karlinger,C=AT&lt;/dsig:X509SubjectName&gt;
+ &lt;dsig:X509IssuerSerial&gt;
+ &lt;dsig:X509IssuerName&gt;CN=TrustSignTest-Sig-01,OU=TrustSignTest-Sig-01,
+O=A-Trust Ges. f&uuml;r Sicherheitssysteme im elektr. Datenverkehr GmbH,C=AT&lt;/dsig:X509IssuerName&gt;
+ &lt;dsig:X509SerialNumber&gt;2892&lt;/dsig:X509SerialNumber&gt;
+ &lt;/dsig:X509IssuerSerial&gt;
+ &lt;dsig:X509Certificate&gt;...&lt;/dsig:X509Certificate&gt;
+ &lt;QualifiedCertificate/&gt;
+ &lt;/dsig:X509Data&gt;
+ &lt;/SignerInfo&gt;
+</pre>
+<p>Die Response enth&auml;lt zun&auml;chst in <code>SignerInfo/dsig:X509Data</code> Informationen &uuml;ber den Signator, die aus dem in der CMS-Signatur enthaltenen Signatorzertifikat entnommen sind. </p>
+<p><code>dsig:X509SubjectName</code> ist immer vorhanden und enth&auml;lt den Namen des Signators. <code>dsig:X509IssuerSerial</code> ist ebenfalls immer vorhanden und enth&auml;lt den Namen des Austellers des Signatorzertifikats (<code>dsig:X509IssuerName</code>) sowie die Seriennummer des Zertifikats (<code>dsig:X509SerialNumber</code>). Auch <code>dsig:X509Certificate</code> ist immer vorhanden und enth&auml;lt das Signatorzertifikat in base64 kodierter Form. </p>
+<p>Optional vorhanden ist das inhaltslose Element <code>QualifiedCertificate</code>, und zwar dann, wenn es sich beim Signatorzertifikat um ein qualifiziertes Zertifikat handelt. Ebenfalls optional vorhanden ist schlie&szlig;lich - in diesem Beispiel nicht ersichtlich - das Element <code>PublicAuthority</code>, und zwar dann, wenn das Signatorzertifikat die &ouml;sterreichspezifische Zertifikatserweiterung <a href="http://www.cio.gv.at/it-infrastructure/pki/" target="_blank">Verwaltungseigenschaft</a> aufweist. Ist in dieser Zertifikatserweiterung das Verwaltungskennzeichen mitkodiert, wird dieses Kennzeichen als Textinhalt des optionalen Elements <code>PublicAuthority/Code</code> geliefert.</p>
+<pre>
+ &lt;SignatureCheck&gt;
+ &lt;Code&gt;0&lt;/Code&gt;
+ &lt;/SignatureCheck&gt;
+</pre>
+<p> Anschlie&szlig;end an <code>SignerInfo</code> enth&auml;lt die Response mit <code>SignatureCheck/Code</code> das Resultat der kryptographischen Pr&uuml;fung der Signatur. In unserem Beispiel ist dort der Wert <code>0</code> enthalten, d. h. die Signatur konnte erfolgreich validiert werden. F&uuml;r eine &Uuml;bersicht der m&ouml;glichen Kodes siehe <a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20040514/core/Core.html#signaturpruefungNachCMSAntwort" target="_blank">Security-Layer 1.2</a>.</p>
+<pre>
+ &lt;CertificateCheck&gt;
+ &lt;Code&gt;1&lt;/Code&gt;
+ &lt;/CertificateCheck&gt;
+</pre>
+<p>Abschlie&szlig;end enth&auml;lt die Response mit <code>CertificateCheck/Code</code> das Resultat der Pr&uuml;fung des Signatorzertifikats. Zun&auml;chst pr&uuml;ft MOA SP, ob ausgehend vom Signatorzertifikat eine Zertifikatskette zu einem im zugeh&ouml;rigen Vertrauensprofil konfigurierten sog. <span class="term">Trust Anchor</span> gebildet werden kann. Gelingt dies, wird die G&uuml;ltigkeit jedes Zertifikats dieser Kette &uuml;berpr&uuml;ft. In unserem Beispiel enth&auml;lt <code>Code</code> den Wert <code>1</code>, d. h. MOA SP konnte die oben erl&auml;uterte Zertifikatskette nicht bilden. F&uuml;r eine &Uuml;bersicht der m&ouml;glichen Kodes siehe <a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20040514/core/Core.html#signaturpruefungNachCMSAntwort" target="_blank">Security-Layer 1.2</a>.</p>
+<h4><a name="webservice_xmlrequests_pruefungcms_erweitert" id="webservice_xmlrequests_pruefungcms_erweitert"></a>2.1.2.2 Erweitertes Beispiel</h4>
+<h5>Request</h5>
+<p>Dieses erweiterte Beispiel zur Pr&uuml;fung einer CMS-Signatur (<a href="../../clients/webservice/resources/requests/VerifyCMSSignatureRequest.Extended.xml" target="_blank"><code>VerifyCMSSignatureRequest.Extended.xml</code></a>) demonstriert die Pr&uuml;fung mehrerer Signatoren einer CMS-Signatur, die Angabe des Pr&uuml;fzeitpunkts sowie die Pr&uuml;fung einer <span class="term">Detached Signature</span>, d. h. einer Signatur, in der die signierten Daten nicht enthalten sind und daher extra angegeben werden m&uuml;ssen. </p>
+<pre>
+&lt;VerifyCMSSignatureRequest
+ xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;
+ Signatories=&quot;1&quot;&gt;
+ &lt;DateTime&gt;2004-08-17T08:00:00+02:00&lt;/DateTime&gt;
+ &lt;CMSSignature&gt;MIIHiwYJKoZI...kfiwsvqSk48lou&lt;/CMSSignature&gt;
+ &lt;DataObject&gt;
+ &lt;Content&gt;
+ &lt;Base64Content&gt;RGllc2UgRGF0ZW4gd2FyZW4gYmFzZTY0IGtvZGllcnQu&lt;/Base64Content&gt;
+ &lt;/Content&gt;
+ &lt;/DataObject&gt;
+ &lt;TrustProfileID&gt;Test-Signaturdienste&lt;/TrustProfileID&gt;
+&lt;/VerifyCMSSignatureRequest&gt;
+</pre>
+<p> Liegt eine zu pr&uuml;fende CMS-Signatur vor, die von mehreren Unterzeichnenden signiert worden ist, kann das Attribut <code>VerifyCMSSignatureRequest/@Signatories</code> verwendet werden, um jene Unterzeichnenden auszuw&auml;hlen, deren Unterschriften von MOA SP gepr&uuml;ft werden sollen. Der Default-Wert f&uuml;r dieses optionale Attribut ist <code>1</code>. Soll nicht die Unterschrift allein des ersten Unterzeichnenden gepr&uuml;ft werden, muss das Attribut explizit angegeben werden. Es enth&auml;lt dann eine oder mehrere Ganzzahlwerte, getrennt durch Leerzeichen. Jede Ganzzahl bezeichnet einen Unterzeichnenden, wobei die Reihenfolge der Auflistung der Unterzeichner in der CMS-Signatur entspricht. Der Wert <code>&quot;1 3&quot;</code> w&uuml;rde beispielsweise aussagen, dass MOA SP die Unterschrift des ersten sowie des dritten Unterzeichnenden pr&uuml;fen soll.</p>
+<p>Mit dem optionalen Element <code>DateTime</code> kann der Zeitpunkt der Signaturpr&uuml;fung explizit vorgegeben werden. Inhalt dieses Elements ist die Angabe von Datum und Uhrzeit entsprechend dem XML-Schema Datentyp <a href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#dateTime" target="_blank"><span class="term">dateTime</span></a>. Enth&auml;lt der angegebene Zeitpunkt keinen Zeitzonen-Offset zur UTC, wird der Zeitpunkt als lokale Zeit des Servers interpretiert, auf dem MOA SP l&auml;uft. Wird <code>DateTime</code> nicht angegeben, versucht MOA SP, den Zeitpunkt der Signaturerstellung aus der Signatur zu ermitteln (anhand des Signaturattributs <a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20040514/core/Core.html#ref-etsicms" target="_blank" class="term">SigningTime</a>). Enth&auml;lt die Signatur keinen Zeitpunkt der Signaturerstellung, verwendet MOA SP die aktuelle Systemzeit des Servers, auf dem es l&auml;uft. </p>
+<p>Das optionale Element <code>DataObject</code> muss dann angegeben werden, wenn eine <span class="term">Detached Signature</span> gepr&uuml;ft werden soll, d. h. wenn in der CMS-Signatur die signierten Daten nicht mitkodiert sind. In <code>DataObject/Content/Base64Content</code> sind in einem solchen Fall diese Daten in base64 kodierter Form bereit zu stellen.</p>
+<h5>Response</h5>
+<p><code><a href="../../clients/webservice/resources/requests/VerifyCMSSignatureRequest.Extended.resp.xml" target="_blank">VerifyCMSSignatureRequest.Extended.resp.xml</a></code> ist eine typische Response des SP Webservices auf den obigen Request. Er wird an dieser Stelle nicht n&auml;her analysiert, da er keine f&uuml;r das Thema des Beispiels relevanten Besonderheiten aufweist.</p>
+<h3><a name="webservice_xmlrequests_pruefungxml"></a>2.1.3 Pr&uuml;fen einer XML-Signatur</h3>
+<h4><a name="webservice_xmlrequests_pruefungxml_einfach"></a>2.1.3.1 Einfaches Beispiel</h4>
+<h5>Request</h5>
+<p><code><a href="../../clients/webservice/resources/requests/VerifyXMLSignatureRequest.Simple.xml" target="_blank">VerifyXMLSignatureRequest.Simple.xml</a></code> ist ein einfacher XML-Request zur Pr&uuml;fung einer XML-Signatur. Sein Aufbau wird nachfolgend analysiert. Bitte beachten Sie, dass der dargestellte Request zur bessernen Lesbarkeit einger&uuml;ckt und gek&uuml;rzt wurde.</p>
+<pre>
+&lt;VerifyXMLSignatureRequest xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;&gt;
+ &lt;VerifySignatureInfo&gt;
+ &lt;VerifySignatureEnvironment&gt;
+ &lt;XMLContent&gt;
+ &lt;dsig:Signature Id=&quot;signature-1-1&quot; xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;
+ &lt;dsig:SignedInfo&gt;
+ &lt;dsig:CanonicalizationMethod Algorithm=&quot;http://www.w3.org/TR/2001/REC-xml-c14n-20010315&quot;/&gt;
+ &lt;dsig:SignatureMethod
+ Algorithm=&quot;http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1&quot;/&gt;
+ &lt;dsig:Reference Id=&quot;reference-1-1&quot; URI=&quot;#xpointer(id(&apos;signed-data-1-1-1&apos;)/node())&quot;&gt;
+ &lt;dsig:DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot;/&gt;
+ &lt;dsig:DigestValue&gt;tLODyeiWFbAkQKwhrR23jtcgu4k=&lt;/dsig:DigestValue&gt;
+ &lt;/dsig:Reference&gt;
+ &lt;/dsig:SignedInfo&gt;
+ &lt;dsig:SignatureValue&gt;...&lt;/dsig:SignatureValue&gt;
+ &lt;dsig:KeyInfo&gt;...&lt;/dsig:KeyInfo&gt;
+ &lt;dsig:Object Id=&quot;signed-data-1-1-1&quot;&gt;Diese Daten werden signiert.&lt;/dsig:Object&gt;
+ &lt;/dsig:Signature&gt;
+ &lt;/XMLContent&gt;
+ &lt;/VerifySignatureEnvironment&gt;
+</pre>
+<p>Das Element <code>VerifySignatureEnvironment</code> enth&auml;lt jenes XML-Dokument, das die zu pr&uuml;fende XML-Signatur enth&auml;lt. Auch hier stehen eine Reihe von M&ouml;glichkeiten zur Verf&uuml;gung, dieses XML-Dokument anzugeben. Im Beispiel wurde das Element <code>XMLContent</code> verwendet; alternativ stehen die Elemente <code>Base64Content</code> und <code>LocRefContent</code> bzw. gleichwertig zu <code>LocRefContent</code> das Attribut <code>Reference</code> zur Verf&uuml;gung.</p>
+<p>Im konkreten Beispiel enth&auml;lt das angegebene XML-Dokument direkt als Root-Element die zu pr&uuml;fende Signatur (<code>dsig:Signature</code>). Es handelt sich dabei um eine <span class="term">Enveloping Signature</span>, d. h. die signierten Daten sind in einem <code>dsig:Object</code> als Teil der XML-Struktur der Signatur kodiert. Tats&auml;chlich signiert ist hier die Zeichenkette <code>Diese Daten werden signiert.</code></p>
+<pre>
+ &lt;VerifySignatureLocation
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;/dsig:Signature&lt;/VerifySignatureLocation&gt;
+ &lt;/VerifySignatureInfo&gt;
+</pre>
+<p>Das Element <code>VerifySignatureLocation</code> enth&auml;lt als Text den XPath-Ausdruck zur Selektion der XML-Signatur innerhalb des zu pr&uuml;fenden XML-Dokuments. Die Auswertung des XPath-Ausdrucks muss genau ein Element <code>dsig:Signature</code> ergeben. Bitte beachten Sie, dass im Kontext des Elements <code>VerifySignatureLocation</code> alle im XPath-Ausdruck verwendeten Namespace-Pr&auml;fixe bekannt sein m&uuml;ssen (hier das Pr&auml;fix <code>dsig</code>). </p>
+<pre>
+ &lt;TrustProfileID&gt;Test-Signaturdienste&lt;/TrustProfileID&gt;
+&lt;/VerifyXMLSignatureRequest&gt;
+</pre>
+<p>Das Element <code>TrustProfileID</code> schlie&szlig;lich enth&auml;lt den Bezeichner des Vertrauensprofils, gegen das die Zertifikatspr&uuml;fung von MOA SP durchgef&uuml;hrt wird. Ein Vertrauensprofil enth&auml;lt die Zertifikate jene Zertifizierungsdiensteanbieter, denen als Aussteller von Signatorzertifikaten vertraut wird. Ein Vertrauensprofil mit dem gew&auml;hlten Namen (hier <code>Test-Signaturdienste</code>) muss in der Konfiguration von MOA SP hinterlegt sein. </p>
+<h5>Response</h5>
+<p><code><a href="../../clients/webservice/resources/requests/VerifyXMLSignatureRequest.Simple.resp.xml" target="_blank">VerifyXMLSignatureRequest.Simple.resp.xml</a></code> ist eine typische Response des SP Webservices auf den obigen Request. Sein Aufbau wird nachfolgend analysiert. Bitte beachten Sie, dass die dargestellte Response zur bessernen Lesbarkeit einger&uuml;ckt und gek&uuml;rzt wurde.</p>
+<pre>
+&lt;VerifyXMLSignatureResponse
+ xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;
+ &lt;SignerInfo&gt;
+ &lt;dsig:X509Data&gt;
+ &lt;dsig:X509SubjectName&gt;CN=Test: Signaturdienst aller Kunden: ECDSA (P192v1),OU=Technik und Standards,
+ O=Stabsstelle IKT-Strategie des Bundes,C=AT&lt;/dsig:X509SubjectName&gt;
+ &lt;dsig:X509IssuerSerial&gt;
+ &lt;dsig:X509IssuerName&gt;CN=Test CA - Signaturdienste,OU=Technik und Standards,
+ O=Stabstelle IKT-Strategie des Bundes,C=AT&lt;/dsig:X509IssuerName&gt;
+ &lt;dsig:X509SerialNumber&gt;9&lt;/dsig:X509SerialNumber&gt;
+ &lt;/dsig:X509IssuerSerial&gt;
+ &lt;dsig:X509Certificate&gt;...&lt;/dsig:X509Certificate&gt;
+ &lt;PublicAuthority&gt;
+ &lt;Code&gt;BKA-IKT&lt;/Code&gt;
+ &lt;/PublicAuthority&gt;
+ &lt;/dsig:X509Data&gt;
+ &lt;/SignerInfo&gt;
+</pre>
+<p>Die Response enth&auml;lt zun&auml;chst in <code>SignerInfo/dsig:X509Data</code> Informationen &uuml;ber den Signator, die aus dem in der XML-Signatur enthaltenen Signatorzertifikat entnommen sind. </p>
+<p><code>dsig:X509SubjectName</code> ist immer vorhanden und enth&auml;lt den Namen des Signators. <code>dsig:X509IssuerSerial</code> ist ebenfalls immer vorhanden und enth&auml;lt den Namen des Austellers des Signatorzertifikats (<code>dsig:X509IssuerName</code>) sowie die Seriennummer des Zertifikats (<code>dsig:X509SerialNumber</code>). Auch <code>dsig:X509Certificate</code> ist ist immer vorhanden und enth&auml;lt das Signatorzertifikat in base64 kodierter Form. </p>
+<p>Optional vorhanden - in diesem Beispiel nicht ersichtlich - ist das inhaltslose Element <code>QualifiedCertificate</code>, und zwar dann, wenn es sich beim Signatorzertifikat um ein qualifiziertes Zertifikat handelt. Ebenfalls optional vorhanden ist schlie&szlig;lich das Element <code>PublicAuthority</code>, und zwar dann, wenn das Signatorzertifikat die &ouml;sterreichspezifische Zertifikatserweiterung <a href="http://www.cio.gv.at/it-infrastructure/pki/" target="_blank">Verwaltungseigenschaft</a> aufweist. Ist in dieser Zertifikatserweiterung das Verwaltungskennzeichen mitkodiert, wird dieses Kennzeichen als Textinhalt des optionalen Elements <code>PublicAuthority/Code</code> geliefert.</p>
+<pre>
+ &lt;SignatureCheck&gt;
+ &lt;Code&gt;0&lt;/Code&gt;
+ &lt;/SignatureCheck&gt;
+</pre>
+<p> Anschlie&szlig;end an <code>SignerInfo</code> enth&auml;lt die Response mit <code>SignatureCheck/Code</code> das Resultat der kryptographischen Pr&uuml;fung der Signatur. In unserem Beispiel ist dort der Wert <code>0</code> enthalten, d. h. die Signatur konnte erfolgreich validiert werden. F&uuml;r eine &Uuml;bersicht der m&ouml;glichen Kodes siehe <a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20040514/core/Core.html#signaturpruefungNachXMLDSIGAntwort" target="_blank">Security-Layer 1.2</a>.</p>
+<pre>
+ &lt;CertificateCheck&gt;
+ &lt;Code&gt;0&lt;/Code&gt;
+ &lt;/CertificateCheck&gt;
+</pre>
+<p>Abschlie&szlig;end enth&auml;lt die Response mit <code>CertificateCheck/Code</code> das Resultat der Pr&uuml;fung des Signatorzertifikats. Zun&auml;chst pr&uuml;ft MOA SP, ob ausgehend vom Signatorzertifikat eine Zertifikatskette zu einem im zugeh&ouml;rigen Vertrauensprofil konfigurierten sog. <span class="term">Trust Anchor</span> gebildet werden kann. Gelingt dies, wird die G&uuml;ltigkeit jedes Zertifikats dieser Kette &uuml;berpr&uuml;ft. In unserem Beispiel enth&auml;lt <code>Code</code> den Wert <code>0</code>, d. h. MOA SP konnte die Kette bilden, und alle Zertifikate der Kette sind g&uuml;ltig. F&uuml;r eine &Uuml;bersicht der m&ouml;glichen Kodes siehe <a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20040514/core/Core.html#signaturpruefungNachCMSAntwort" target="_blank">Security-Layer 1.2</a>.</p>
+<h4><a name="webservice_xmlrequests_pruefungxml_erweitert"></a>2.1.3.2 Erweitertes Beispiel </h4>
+<h5>Request</h5>
+<p>Dieses erweiterte Beispiel zur Pr&uuml;fung einer XML-Signatur (<a href="../../clients/webservice/resources/requests/VerifyXMLSignatureRequest.Enveloped.xml" target="_blank"><code>VerifyXMLSignatureRequest.Enveloped.xml</code></a>) demonstriert die Pr&uuml;fung einer <span class="term">Enveloped Signature</span>, d. h. einer Signatur, die in ein XML-Dokument integriert ist, die Angabe des Pr&uuml;fzeitpunkts sowie die Anweisung an MOA SP, in der Response die von der Signatur abgedeckten Daten zu retournieren.</p>
+<pre>
+&lt;VerifyXMLSignatureRequest xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;&gt;
+ &lt;DateTime&gt;2004-08-18T17:00:00+02:00&lt;/DateTime&gt;
+</pre>
+<p>Mit dem optionalen Element <code>DateTime</code> kann der Zeitpunkt der Signaturpr&uuml;fung explizit vorgegeben werden. Inhalt dieses Elements ist die Angabe von Datum und Uhrzeit entsprechend dem XML-Schema Datentyp <a href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#dateTime" target="_blank"><span class="term">dateTime</span></a>. Enth&auml;lt der angegebene Zeitpunkt keinen Zeitzonen-Offset zur UTC, wird der Zeitpunkt als lokale Zeit des Servers interpretiert, auf dem MOA SP l&auml;uft. Wird <code>DateTime</code> nicht angegeben, versucht MOA SP, den Zeitpunkt der Signaturerstellung aus der Signatur zu ermitteln (anhand des Signaturattributs <a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20040514/core/Core.html#ref-etsicms" target="_blank" class="term">SigningTime</a>). Enth&auml;lt die Signatur keinen Zeitpunkt der Signaturerstellung, verwendet MOA SP die aktuelle Systemzeit des Servers, auf dem es l&auml;uft.</p>
+<pre>
+ &lt;VerifySignatureInfo&gt;
+ &lt;VerifySignatureEnvironment Reference=&quot;http://localhost:8080/referencedData/XMLDocument.signed.xml&quot;/&gt;
+ &lt;VerifySignatureLocation xmlns:doc=&quot;urn:document&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;/doc:XMLDocument/dsig:Signature&lt;/VerifySignatureLocation&gt;
+ &lt;/VerifySignatureInfo&gt;
+</pre>
+<p>Das Element <code>VerifySignatureEnvironment</code> enth&auml;lt in diesem Fall mit dem Attribut <code>Reference</code> eine Referenz auf das XML-Dokument (<code><a href="../../clients/referencedData/src/main/webapp/XMLDocument.signed.xml" target="_blank">XMLDocument.signed.xml</a></code>), das die zu pr&uuml;fende Signatur beinhaltet. Als Textinhalt von <code>VerifySignatureLocation</code> ist ein XPath-Ausdruck angegeben, der die zu pr&uuml;fende Signatur innerhalb des XML-Dokuments ausw&auml;hlt. Bitte beachten Sie, dass im Kontext des Elements <code>VerifySignatureLocation</code> alle im XPath-Ausdruck verwendeten Namespace-Pr&auml;fixe bekannt sein m&uuml;ssen (hier die Pr&auml;fixe <code>doc</code> und <code>dsig</code>). </p>
+<pre>
+ &lt;ReturnHashInputData/&gt;
+ &lt;TrustProfileID&gt;Test-Signaturdienste&lt;/TrustProfileID&gt;
+&lt;/VerifyXMLSignatureRequest&gt;
+</pre>
+<p>Durch Angabe des optionalen, leeren Elements <code>ReturnHashInputData</code> wird MOA SP angewiesen, im Response jene Daten zur&uuml;ckzuliefern, die von der Signatur abgedeckt sind, d. h. tats&auml;chlich signiert wurden (siehe unten). Diese Information ist f&uuml;r die MOA SP verwendende Anwendung essentiell, da sie wissen muss, ob tats&auml;chlich die von ihr geforderten Daten signiert wurden. Wird <code>HashInputData</code> im Request nicht angegeben, muss die Anwendung selbst die Signatur analysieren, um diese Information zu erhalten. </p>
+<h5>Response</h5>
+<p><code><a href="../../clients/webservice/resources/requests/VerifyXMLSignatureRequest.Enveloped.resp.xml" target="_blank">VerifyXMLSignatureRequest.Enveloped.resp.xml</a></code> ist eine typische Response des SP Webservices auf den obigen Request. Sein Aufbau wird nachfolgend analysiert. Bitte beachten Sie, dass die dargestellte Response zur bessernen Lesbarkeit einger&uuml;ckt und gek&uuml;rzt wurde.</p>
+<pre>
+&lt;VerifyXMLSignatureResponse
+ xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;
+ &lt;SignerInfo&gt;
+ &lt;dsig:X509Data&gt;...&lt;/dsig:X509Data&gt;
+ &lt;/SignerInfo&gt;
+</pre>
+<p>Die Response enth&auml;lt zun&auml;chst in <code>SignerInfo/dsig:X509Data</code> Informationen &uuml;ber den Signator, die aus dem in der XML-Signatur enthaltenen Signatorzertifikat entnommen sind (siehe <a href="#webservice_xmlrequests_pruefungxml_einfach">Einfaches Beispiel</a>).</p>
+<pre>
+ &lt;HashInputData PartOf=&quot;SignedInfo&quot;&gt;
+ &lt;Base64Content&gt;PGRvYzp...hNTERvY3VtZW50Pg==&lt;/Base64Content&gt;
+ &lt;/HashInputData&gt;
+</pre>
+<p>Wurde im Request - so wie in diesem Beispiel - das Element <code>ReturnHashInputData</code> angegeben, enth&auml;lt
+ die Response nach <code>SignerInfo</code> f&uuml;r jede <code>dsig:Reference</code> in <code>dsig:SignedInfo</code> der
+ XML-Signatur (bzw. auch f&uuml;r jede <code>dsig:Reference</code> aus einem <code>dsig:Manifest</code>, auf
+ das mittels des Attributs <code>Type=&quot;http://www.w3.org/2000/09/xmldsig#Manifest&quot;</code> in einer <code>dsig:Reference</code> aus <code>dsig:SignedInfo</code> verwiesen
+ wird; solche Manifeste kommen aber in diesem Beispiel nicht vor) ein Element <code>HashInputData</code>.</p>
+<p>Die Reihenfolge der <code>HashInputData</code>-Elemente
+ entspricht der Reihenfolge der <code>dsig:Reference</code>-Elemente in <code>dsig:SignedInfo</code> der
+ XML-Signatur (enth&auml;lt die XML-Signatur auch <code>dsig:Manifest</code>-Elemente, auf die jeweils in einer <code>dsig:Reference</code> aus <code>dsig:SignedInfo</code> verwiesen wird, werden zuerst <code>HashInputData</code>-Elemente f&uuml;r alle <code>dsig:Reference</code>-Elemente
+ aus <code>dsig:SignedInfo</code> und anschlie&szlig;end <code>HashInputData</code>-Elemente f&uuml;r alle <code>dsig:Reference</code>-Elemente
+ aus den einzelnen <code>dsig:Manifest</code>-Elementen geliefert). </p>
+<p>Das Attribut PartOf weist mit dem Wert SignedInfo darauf hin, dass die <code>dsig:Reference</code>,
+f&uuml;r welche die Hasheingangsdaten gelten, Teil von <code>dsig:SignedInfo</code> ist (f&uuml;r eine <code>dsig:Reference</code> aus
+einem <code>dsig:SignedInfo</code> w&uuml;rde der gelieferte Wert <code>XMLDSIGManifest</code> lauten; weiters
+w&uuml;rde<code> HashInputData</code> in einem solchen Fall ein weiteres Attribut
+
+
+<code>ReferringSigReference</code> aufweisen, dessen Wert die Nummer jener <code>dsig:Reference</code> aus <code>dsig:SignedInfo </code>als
+positive Ganzzahl repr&auml;sentiert, die auf das beinhaltende <code>dsig:Manifest</code> verweist.). </p>
+<p>Der Inhalt wird dabei stets mittels <code>Base64Content</code> in
+ base64-kodierter Form geliefert.</p>
+<pre>
+ &lt;SignatureCheck&gt;
+ &lt;Code&gt;0&lt;/Code&gt;
+ &lt;/SignatureCheck&gt;
+ &lt;CertificateCheck&gt;
+ &lt;Code&gt;0&lt;/Code&gt;
+ &lt;/CertificateCheck&gt;
+&lt;/VerifyXMLSignatureResponse&gt;
+</pre>
+<p>Die Elemente <code>SignatureCheck</code> und <code>CertificateCheck</code> enthalten die Resultate der kryptographischen Pr&uuml;fung der Signatur sowie der Zertifikatspr&uuml;fung (siehe <a href="#webservice_xmlrequests_pruefungxml_einfach">Einfaches Beispiel</a>).</p>
+<h4><a name="webservice_xmlrequests_pruefungxml_xmldsigmanifest"></a>2.1.3.3 Pr&uuml;fung eines XMLDSIG-Manifests </h4>
+<h5>Request</h5>
+<p>Dieses Beispiel zur Pr&uuml;fung einer XML-Signatur (<a href="../../clients/webservice/resources/requests/VerifyXMLSignatureRequest.XMLDSigManifest.xml" target="_blank"><code>VerifyXMLSignatureRequest.XMLDSigManifest.xml</code></a>) demonstriert die Pr&uuml;fung eines in der XML-Signatur vorhandenden <a href="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/#sec-Manifest" target="_blank">Manifests nach XMLDSig</a>. Bitte beachten Sie, dass der dargestellte Request zur bessernen Lesbarkeit einger&uuml;ckt und gek&uuml;rzt wurde.</p>
+<pre>
+&lt;VerifyXMLSignatureRequest
+ xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;
+ &lt;VerifySignatureInfo&gt;
+ &lt;VerifySignatureEnvironment&gt;
+ &lt;XMLContent&gt;
+ &lt;dsig:Signature xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot; Id=&quot;signature-1-1&quot;&gt;
+ &lt;dsig:SignedInfo&gt;
+ &lt;dsig:CanonicalizationMethod Algorithm=&quot;http://www.w3.org/TR/2001/REC-xml-c14n-20010315&quot;/&gt;
+ &lt;dsig:SignatureMethod
+ Algorithm=&quot;http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1&quot;/&gt;
+ &lt;dsig:Reference Type=&quot;http://www.w3.org/2000/09/xmldsig#Manifest&quot; URI=&quot;#dsig-manifest-1-1&quot;&gt;
+ &lt;dsig:DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot;/&gt;
+ &lt;dsig:DigestValue&gt;nUUaW6OtcsNvV/QhqmkU2QXT1Mw=&lt;/dsig:DigestValue&gt;
+ &lt;/dsig:Reference&gt;
+ &lt;/dsig:SignedInfo&gt;
+ &lt;dsig:SignatureValue&gt;315gCwZI...OXFwr+&lt;/dsig:SignatureValue&gt;
+ &lt;dsig:KeyInfo&gt;...&lt;/dsig:KeyInfo&gt;
+ &lt;dsig:Object Id=&quot;signed-data-1-1-1&quot;&gt;Diese Daten sind signiert.&lt;/dsig:Object&gt;
+ &lt;dsig:Object&gt;
+ &lt;dsig:Manifest Id=&quot;dsig-manifest-1-1&quot;&gt;
+ &lt;dsig:Reference Id=&quot;reference-1-1&quot; URI=&quot;#xpointer(id(&apos;signed-data-1-1-1&apos;)/node())&quot;&gt;
+ &lt;dsig:DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot;/&gt;
+ &lt;dsig:DigestValue&gt;EYxznGxNRAIcHQeUsj+zsK+uaHA=&lt;/dsig:DigestValue&gt;
+ &lt;/dsig:Reference&gt;
+ &lt;/dsig:Manifest&gt;
+ &lt;/dsig:Object&gt;
+ &lt;/dsig:Signature&gt;
+ &lt;/XMLContent&gt;
+ &lt;/VerifySignatureEnvironment&gt;
+</pre>
+<p>Das Element <code>VerifySignatureEnvironment</code> enth&auml;lt als <code>XMLContent</code> die zu pr&uuml;fende XML-Signatur. Man erkennt, dass sich die einzige <code>dsig:Reference</code> im <code>dsig:SignedInfo</code> der XML-Signatur auf ein Manifest nach XMLDSig bezieht (erkennbar am Attribut <code>Type</code>, das auf den Wert <code>http://www.w3.org/2000/09/xmldsig#Manifest</code> gesetzt ist). Im Response (siehe unten) werden wir deshalb ein eigenes Resultat f&uuml;r die Manifest-Pr&uuml;fung erhalten.</p>
+<p>Das Manifest selbst ist in einem <code>dsig:Object</code>, also innerhalb der XML-Struktur der XML-Signatur kodiert. Es enth&auml;lt eine <code>dsig:Reference</code>, welche sich auf die Zeichenkette <code>Diese Daten sind signiert.</code> bezieht.</p>
+<pre>
+ &lt;VerifySignatureLocation&gt;//dsig:Signature&lt;/VerifySignatureLocation&gt;
+ &lt;/VerifySignatureInfo&gt;
+ &lt;TrustProfileID&gt;Test-Signaturdienste&lt;/TrustProfileID&gt;
+&lt;/VerifyXMLSignatureRequest&gt;
+</pre>
+<p>Das Element <code>VerifySignatureLocation</code> w&auml;hlt die zu pr&uuml;fende Signatur innerhalb des in <code>VerifySignatureEnvironment</code> angegebenen XML-Dokuments aus. Das Element <code>TrustProfileID</code> w&auml;hlt das Vertrauensprofil aus, gegen das die Zertifikatspr&uuml;fung durchgef&uuml;hrt werden soll. </p>
+<h5>Response</h5>
+<p><code><a href="../../clients/webservice/resources/requests/VerifyXMLSignatureRequest.XMLDSigManifest.resp.xml" target="_blank">VerifyXMLSignatureRequest.XMLDSigManifest.resp.xml</a></code> ist eine typische Response des SP Webservices auf den obigen Request. Sein Aufbau wird nachfolgend analysiert. Bitte beachten Sie, dass die dargestellte Response zur bessernen Lesbarkeit einger&uuml;ckt und gek&uuml;rzt wurde.</p>
+<pre>
+&lt;VerifyXMLSignatureResponse
+ xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;
+ &lt;SignerInfo&gt;
+ &lt;dsig:X509Data&gt;...&lt;/dsig:X509Data&gt;
+ &lt;/SignerInfo&gt;
+ &lt;SignatureCheck&gt;
+ &lt;Code&gt;0&lt;/Code&gt;
+ &lt;/SignatureCheck&gt;
+</pre>
+<p>Die Response enth&auml;lt zun&auml;chst in <code>SignerInfo/dsig:X509Data</code> Informationen &uuml;ber den Signator, die aus dem in der XML-Signatur enthaltenen Signatorzertifikat entnommen sind (siehe <a href="#webservice_xmlrequests_pruefungxml_einfach">Einfaches Beispiel</a>). Das Element<code> SignatureCheck</code> enth&auml;lt das Resultat der kryptographischen Pr&uuml;fung der Signatur (siehe <a href="#webservice_xmlrequests_pruefungxml_einfach">Einfaches Beispiel</a>).</p>
+<pre>
+ &lt;XMLDSIGManifestCheck&gt;
+ &lt;Code&gt;0&lt;/Code&gt;
+ &lt;Info&gt;
+ &lt;ReferringSigReference&gt;1&lt;/ReferringSigReference&gt;
+ &lt;/Info&gt;
+ &lt;/XMLDSIGManifestCheck&gt;
+</pre>
+<p>Neu ist in dieser Response das an <code>SignatureCheck</code> anschlie&szlig;ende Element <code>XMLDSIGManifestCheck</code>. Ein oder mehrere solche Elemente werden immer dann zur&uuml;ckgeliefert, wenn in <code>dsig:SignedInfo</code> der XML-Signatur <code>dsig:Reference</code> Elemente existieren, die sich auf ein Manifest nach XMLDSIG beziehen (siehe oben). Je solcher <code>dsig:Reference</code> enth&auml;lt die Antwort ein korrespondierendes Element <code>XMLDSIGManifestCheck</code>, im konkreten Beispiel als eines.</p>
+<p>Das Element <code>Code</code> gibt das Ergebnis der durchgef&uuml;hrten Pr&uuml;fung des XMLDSIG-Manifests an. In diesem Fall bedeutet <code>0</code>, dass die Pr&uuml;fung jeder <code>dsig:Reference </code>im <code>dsig:Manifest</code> (im konkreten Beispiel also genau einer <code>dsig:Reference</code>) erfolgreich durchgef&uuml;hrt werden konnte. F&uuml;r eine &Uuml;bersicht der m&ouml;glichen Kodes siehe <a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20040514/core/Core.html#signaturpruefungNachXMLDSIGAntwort" target="_blank">Security-Layer 1.2</a>.</p>
+<p>Das Element <code>Info/ReferringSigReference</code> enth&auml;lt als Textinhalt die Nummer jenes <code>dsig:Reference</code> Elements in <code>dsig:SignedInfo</code> der XML-Signatur, welches auf das untersuchte Manifest nach XMLDSIG verweist, wobei mit <code>1</code> zu z&auml;hlen begonnen wird.</p>
+<pre>
+ &lt;CertificateCheck&gt;
+ &lt;Code&gt;0&lt;/Code&gt;
+ &lt;/CertificateCheck&gt;
+&lt;/VerifyXMLSignatureResponse&gt;
+</pre>
+<p>Das Element<code> CertificateCheck</code> enth&auml;lt das Resultat der Zertifikatspr&uuml;fung (siehe <a href="#webservice_xmlrequests_pruefungxml_einfach">Einfaches Beispiel</a>).</p>
+<h4><a name="webservice_xmlrequests_pruefungxml_ergaenzungsobjekte"></a>2.3.1.4 Erg&auml;nzungsobjekte </h4>
+<p>Dieses Beispiel zur Pr&uuml;fung einer XML-Signatur (<a href="../../clients/webservice/resources/requests/VerifyXMLSignatureRequest.Supplements.xml" target="_blank"><code>VerifyXMLSignatureRequest.Supplements.xml</code></a>) demonstriert die Verwendung von Erg&auml;nzungsobjekten. Ein Erg&auml;nzungsobjekt betrifft entweder ein signiertes Datum (Zusammenhang mit einem <code>dsig:Reference</code> der XML-Signatur) oder jenes Dokument, in dem sich die zu pr&uuml;fende XML-Signatur befindet (Zusammenhang mit <code>VerifySignatureEnvironment</code>). Es muss dann angegeben werden, wenn auf ein signiertes Datum bzw. in einem signierten Datum bzw. in dem die XML-Signatur enthaltenden XML-Dokument auf weitere Daten per Referenz verwiesen wird, diese Referenz aber von MOA SP nicht aufgel&ouml;st werden kann. Das Erg&auml;nzungsobjekt enth&auml;lt dann genau diese Daten die nicht von MOA SS aufgel&ouml;st werden k&ouml;nnen.</p>
+<p>Bitte beachten Sie, dass der dargestellte Request zur bessernen Lesbarkeit einger&uuml;ckt und gek&uuml;rzt wurde.</p>
+<pre>
+&lt;VerifyXMLSignatureRequest xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;&gt;
+ &lt;VerifySignatureInfo&gt;
+ &lt;VerifySignatureEnvironment&gt;
+ &lt;XMLContent&gt;
+ &lt;doc:XMLDocument ... xsi:schemaLocation=&quot;urn:document urn:XMLDocument.xsd&quot;&gt;
+ &lt;doc:Paragraph&gt;Ich bin der erste Absatz in diesem Dokument.&lt;/doc:Paragraph&gt;
+ &lt;doc:Paragraph ParaId=&quot;Para2&quot;&gt;Und ich bin der zweite Absatz in diesem Dokument.
+Ich habe weiters ein eigenens ID-Attribut bekommen.&lt;/doc:Paragraph&gt;
+ &lt;dsig:Signature Id=&quot;signature-1-1&quot; xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;
+ &lt;dsig:SignedInfo&gt;
+ ...
+ &lt;dsig:Reference Id=&quot;reference-1-1&quot; URI=&quot;#Para2&quot;&gt;
+ &lt;dsig:Transforms&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/TR/1999/REC-xslt-19991116&quot;&gt;
+ &lt;xsl:stylesheet version=&quot;1.0&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;&gt;
+ &lt;xsl:include href=&quot;XMLDocument.Para.xsl&quot;/&gt;
+ &lt;/xsl:stylesheet&gt;
+ &lt;/dsig:Transform&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/2001/10/xml-exc-c14n#&quot;/&gt;
+ &lt;/dsig:Transforms&gt;
+ ...
+ &lt;/dsig:Reference&gt;
+ &lt;/dsig:SignedInfo&gt;
+ &lt;dsig:SignatureValue&gt;5rXIIkbP/djWmTgQEICy...0Sf8jvnz+d&lt;/dsig:SignatureValue&gt;
+ &lt;dsig:KeyInfo&gt;...&lt;/dsig:KeyInfo&gt;
+ &lt;/dsig:Signature&gt;
+ &lt;/doc:XMLDocument&gt;
+ &lt;/XMLContent&gt;
+ &lt;/VerifySignatureEnvironment&gt;
+</pre>
+<p>Das Element <code>VerifySignatureEnvironment</code> enth&auml;lt das XML-Dokument mit der zu pr&uuml;fenden XML-Signatur. </p>
+<p>Man erkennt, dass das Attribut <code>dsig:Reference/@URI</code> das Element<code> doc:Paragraph</code> mit dem auf den Wert <code>Para2</code> gesetzten ID-Attribut <code>ParaId</code> referenziert. MOA kann jedoch den Umstand, dass es sich bei <code>doc:Paragraph/@ParaId</code> um ein ID-Attribut handelt, nur dann erkennen, wenn es das XML-Dokument validierend parst. Der dazu n&ouml;tige Verweis auf das passende XML-Schema ist zwar mit dem Attribut <code>xsi:schemaLocation</code> vorhanden, jedoch handelt es sich dabei mit <code>urn:XMLDocument.xsd</code> um eine nicht aufl&ouml;sbare Referenz. Deshalb wird im Request ein passendes Erg&auml;nzungsobjekt ben&ouml;tigt (siehe unten).</p>
+<p>Weiters erkennt man, dass <code>dsig:Reference</code> ein XSLT-Transformation enth&auml;lt. Im darin kodierten Stylesheet-Parameter (<code>dsig:Transform/xsl:stylesheet</code>) wird ein weiterer Stylesheet inkludiert (<code>XMLDocument.Para.xsl</code>). Diese Referenz ist aber wiederum f&uuml;r MOA SP nicht aufl&ouml;sbar. Auch hier wird also ein passendes Erg&auml;nzungsobjekt ben&ouml;tigt (siehe unten). </p>
+<pre>
+ &lt;VerifySignatureLocation xmlns:doc=&quot;urn:document&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;/doc:XMLDocument/dsig:Signature&lt;/VerifySignatureLocation&gt;
+ &lt;/VerifySignatureInfo&gt;
+</pre>
+<p>Das Element <code>VerifySignatureLocation</code> w&auml;hlt die zu pr&uuml;fende Signatur innerhalb des in <code>VerifySignatureEnvironment</code> angegebenen XML-Dokuments aus.</p>
+<pre>
+ &lt;SupplementProfile&gt;
+ &lt;Content Reference=&quot;XMLDocument.Para.xsl&quot;&gt;
+ &lt;LocRefContent&gt;http://localhost:8080/referencedData/XMLDocument.Para.xsl&lt;/LocRefContent&gt;
+ &lt;/Content&gt;
+ &lt;/SupplementProfile&gt;
+</pre>
+<p>Das erste Element <code>SupplementProfile</code> enth&auml;lt nun das Erg&auml;nzungsobjekt f&uuml;r den oben beschriebenen inkludierten Stylesheet. <code>Content/@Reference</code> enth&auml;lt die Referenz genau so, wie sie oben im Attribut <code>xsl:stylesheet/@href</code> angegeben wurde. Im Inhalt von <code>Content</code> werden entweder explizit jene Daten angegeben, die von MOA statt des Aufl&ouml;sens der Referenz verwendet werden sollen (<code>Base64Content</code> oder<code> XMLContent</code>), oder aber es wird - wie im konkreten Beispiel - <code></code>mit <code>LocRefContent</code> eine aufl&ouml;sbare Referenz f&uuml;r diese Daten an MOA SP &uuml;bergeben. </p>
+<pre>
+ &lt;SupplementProfile&gt;
+ &lt;Content Reference=&quot;urn:XMLDocument.xsd&quot;&gt;
+ &lt;XMLContent&gt;
+ &lt;xs:schema targetNamespace=&quot;urn:document&quot; xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;
+ xmlns=&quot;urn:document&quot; elementFormDefault=&quot;qualified&quot; attributeFormDefault=&quot;unqualified&quot;&gt;
+ ...
+ &lt;/xs:schema&gt;
+ &lt;/XMLContent&gt;
+ &lt;/Content&gt;
+ &lt;/SupplementProfile&gt;
+ &lt;TrustProfileID&gt;Test-Signaturdienste&lt;/TrustProfileID&gt;
+&lt;/VerifyXMLSignatureRequest&gt;
+</pre>
+<p>Das zweite Element <code>SupplementProfile</code> enth&auml;lt analog das Erg&auml;nzungsobjekt f&uuml;r das oben beschriebene XML-Schema. <code>Content/@Reference</code> enth&auml;lt die Referenz genau so, wie sie oben im Attribut <code>xsi:schemaLocation</code> angegeben wurde. </p>
+<h5>Response</h5>
+<p><code><a href="../../clients/webservice/resources/requests/VerifyXMLSignatureRequest.Supplements.resp.xml" target="_blank">VerifyXMLSignatureRequest.Supplements.resp.xml</a></code> ist eine typische Response des SP Webservices auf den obigen Request. Er wird an dieser Stelle nicht n&auml;her analysiert, da er keine f&uuml;r das Thema des Beispiels relevanten Besonderheiten aufweist.</p>
+<h4><a name="webservice_xmlrequests_pruefungxml_signaturmanifest" id="webservice_xmlrequests_pruefungxml_signaturmanifest"></a>2.1.3.5 Signatur-Manifest des Security-Layers </h4>
+<h5>Request</h5>
+<p>Dieses Beispiel zur Pr&uuml;fung einer XML-Signatur (<a href="../../clients/webservice/resources/requests/VerifyXMLSignatureRequest.SigManifest.xml" target="_blank"><code>VerifyXMLSignatureRequest.SigManifest.xml</code></a>) demonstriert die &Uuml;berpr&uuml;fung des Zusammenhangs zwischen den <a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20040514/core/Core.html#glossar_Referenz-Eingangsdaten" target="_blank">Referenz-Eingangsdaten</a> und den <a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20040514/core/Core.html#glossar_Hash-Eingangsdaten" target="_blank">Hash-Eingangsdaten</a> f&uuml;r die <code>dsig:Reference</code>-Elemente einer XML-Signatur. Mit Hilfe dieser Pr&uuml;fung kann eine Anwendung feststellen, ob bei der Erstellung einer XML-Signatur jene Transformationen bzw. auch jene inkludierten Stylesheets (vgl. <a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20040514/core/Core.html#signaturerstellungNachXMLDSIGAntwortImplTransParam" target="_blank">Implizite Transformationsparameter</a>) einer XSLT-Transformation angewendet wurden, welche die Anwendung vorgegeben hat. Bei erfolgreicher Pr&uuml;fung dieses Zusammenhangs kann die Anwendung die Referenz-Eingangsdaten einer <code>dsig:Reference</code> als gesichert ansehen, obwohl eigentlich die Hash-Eingangsdaten durch die Signatur gesichert sind. Dies ist jenen F&auml;llen sinnvoll, in denen die Anwendung grunds&auml;tzlich mit XML-Daten arbeitet, diese Daten jedoch f&uuml;r das Signieren durch eine Person in ein f&uuml;r diese Person verst&auml;ndliches Format wie z.B. HTML umgewandelt werden sollen.</p>
+<pre>
+&lt;VerifyXMLSignatureRequest
+ xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;
+ &lt;VerifySignatureInfo&gt;
+ &lt;VerifySignatureEnvironment&gt;
+ &lt;XMLContent&gt;
+ &lt;doc:XMLDocument xmlns:doc=&quot;urn:document&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
+ xsi:schemaLocation=&quot;urn:document http://localhost:8080/referencedData/XMLDocument.xsd&quot;&gt;
+ &lt;doc:Paragraph&gt;Ich bin der erste Absatz in diesem Dokument.&lt;/doc:Paragraph&gt;
+ &lt;doc:Paragraph ParaId=&quot;Para2&quot;&gt;Und ich bin der zweite Absatz in diesem Dokument.
+Ich habe weiters ein eigenens ID-Attribut bekommen.&lt;/doc:Paragraph&gt;
+ &lt;dsig:Signature xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot; Id=&quot;signature-1-1&quot;&gt;
+ &lt;dsig:SignedInfo&gt;
+ ...
+ &lt;dsig:Reference Id=&quot;reference-1-1&quot; URI=&quot;#Para2&quot;&gt;
+ &lt;dsig:Transforms&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/TR/1999/REC-xslt-19991116&quot;&gt;
+ &lt;xsl:stylesheet version=&quot;1.0&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;&gt;
+ &lt;xsl:include href=&quot;http://localhost:8080/referencedData/XMLDocument.Para.xsl&quot;/&gt;
+ &lt;/xsl:stylesheet&gt;
+ &lt;/dsig:Transform&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/2001/10/xml-exc-c14n#&quot;/&gt;
+ &lt;/dsig:Transforms&gt;
+ ...
+ &lt;/dsig:Reference&gt;
+ &lt;dsig:Reference
+ Type=&quot;http://www.buergerkarte.at/specifications/Security-Layer/20020225#SignatureManifest&quot;
+ URI=&quot;#manifest-1-1&quot;&gt;
+ ...
+ &lt;/dsig:Reference&gt;
+ &lt;dsig:Reference Type=&quot;http://uri.etsi.org/01903/v1.1.1#SignedProperties&quot; ...&gt;...&lt;/dsig:Reference&gt;
+ &lt;/dsig:SignedInfo&gt;
+ &lt;dsig:SignatureValue&gt;jnXc/X+hUY...uBxo9q&lt;/dsig:SignatureValue&gt;
+ &lt;dsig:KeyInfo&gt;...&lt;/dsig:KeyInfo&gt;
+ &lt;dsig:Object&gt;
+ &lt;dsig:Manifest Id=&quot;manifest-1-1&quot;&gt;
+ &lt;dsig:Reference URI=&quot;http://localhost:8080/referencedData/XMLDocument.Para.xsl&quot;&gt;
+ ...
+ &lt;/dsig:Reference&gt;
+ &lt;/dsig:Manifest&gt;
+ &lt;/dsig:Object&gt;
+ &lt;dsig:Object Id=&quot;etsi-signed-1-1&quot;&gt;
+ &lt;etsi:QualifyingProperties Target=&quot;#signature-1-1&quot; xmlns:etsi=&quot;http://uri.etsi.org/01903/v1.1.1#&quot;&gt;
+ ...
+ &lt;/etsi:QualifyingProperties&gt;
+ &lt;/dsig:Object&gt;
+ &lt;/dsig:Signature&gt;
+ &lt;/doc:XMLDocument&gt;
+ &lt;/XMLContent&gt;
+ &lt;/VerifySignatureEnvironment&gt;
+</pre>
+<p>Das Element <code>VerifySignatureEnvironment</code> enth&auml;lt das XML-Dokument mit der zu pr&uuml;fenden XML-Signatur. Die XML-Signatur wurde von einer B&uuml;rgerkarten-Umgebung erstellt. Man erkennt, dass das Element <code>dsig:SignedInfo</code> der XML-Signatur drei <code>dsig:Reference</code>-Elemente enth&auml;lt. </p>
+<p>Die erste <code>dsig:Reference</code> bezieht sich auf die eigentlich signierten Nutzdaten. Das zweite <code>doc:Paragraph</code>-Element stellt die Referenz-Eingangsdaten f&uuml;r diese <code>dsig:Reference</code> dar, welche mit Hilfe einer XSLT-Transformation in ein kleines HTML-Dokument &uuml;bergef&uuml;hrt wird, wor&uuml;ber dann der Hashwert der dsig:Reference gebildet wird (Hash-Eingangsdaten).</p>
+<p>Die zweite <code>dsig:Reference</code> bezieht sich auf das von der B&uuml;rgerkarten-Umgebung angefertigte Signaturmanifest. Das Signaturmanifest ist vorhanden, weil die XSLT-Transformation der ersten <code>dsig:Reference</code> einen weiteren Stylesheet inkludiert, und die Daten dieses weiteren Stylesheets ansonsten nicht von der XML-Signatur abgedeckt w&auml;ren (vgl. <a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20040514/core/Core.html#signaturerstellungNachXMLDSIGAntwortImplTransParam" target="_blank">Implizite Transformationsparameter</a>). Das Signaturmanifest enth&auml;lt eine einzige <code>dsig:Reference</code>, die den inkludierten Stylesheet referenziert und so in die XML-Signatur einbindet.</p>
+<p>Die dritte <code>dsig:Reference</code> bezieht sich auf die von der B&uuml;rgerkarten-Umgebung angefertigten Signatureigenschaften, die hier nicht n&auml;her betrachtet werden. </p>
+<pre>
+ &lt;VerifySignatureLocation xmlns:doc=&quot;urn:document&quot;&gt;/doc:XMLDocument/dsig:Signature&lt;/VerifySignatureLocation&gt;
+ &lt;/VerifySignatureInfo&gt;
+</pre>
+<p>Das Element <code>VerifySignatureLocation</code> w&auml;hlt die zu pr&uuml;fende Signatur innerhalb des in <code>VerifySignatureEnvironment</code> angegebenen XML-Dokuments aus.</p>
+<pre>
+ &lt;SignatureManifestCheckParams ReturnReferenceInputData=&quot;true&quot;&gt;
+ &lt;ReferenceInfo&gt;
+ &lt;VerifyTransformsInfoProfile&gt;
+ &lt;dsig:Transforms&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/TR/1999/REC-xslt-19991116&quot;&gt;
+ &lt;xsl:stylesheet version=&quot;1.0&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;&gt;
+ &lt;xsl:include href=&quot;http://localhost:8080/referencedData/XMLDocument.Para.xsl&quot;/&gt;
+ &lt;/xsl:stylesheet&gt;
+ &lt;/dsig:Transform&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/2001/10/xml-exc-c14n#&quot;/&gt;
+ &lt;/dsig:Transforms&gt;
+ &lt;TransformParameter URI=&quot;http://localhost:8080/referencedData/XMLDocument.Para.xsl&quot;/&gt;
+ &lt;/VerifyTransformsInfoProfile&gt;
+ &lt;VerifyTransformsInfoProfile&gt;
+ &lt;dsig:Transforms&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#enveloped-signature&quot;/&gt;
+ &lt;/dsig:Transforms&gt;
+ &lt;/VerifyTransformsInfoProfile&gt;
+ &lt;/ReferenceInfo&gt;
+ &lt;/SignatureManifestCheckParams&gt;
+ &lt;TrustProfileID&gt;Test-Signaturdienste&lt;/TrustProfileID&gt;
+&lt;/VerifyXMLSignatureRequest&gt;
+</pre>
+<p>Mit Angabe des optionalen Elements <code>SignatureManifestCheckParams</code> wird MOA SP angewiesen, den oben skizzierten Zusammenhang zwischen Referenz-Eingangsdaten und Hash-Eingangsdaten zu &uuml;berpr&uuml;fen. Wird das Attribut <code>ReturnReferenceInputData</code> wie im Beispiel auf den Wert <code>true</code> gesetzt, liefert MOA SP in der Response die Hash-Eingangsdaten f&uuml;r alle Referenzen in <code>dsig:SignedInfo</code> der XML-Signatur an die Anwendung zur&uuml;ck, was in der Regel von der Anwendung wohl gew&uuml;nscht wird, wenn MOA SP schon den Zusammenhang zwischen Referenz-Eingangsdaten und Hash-Eingangsdaten pr&uuml;fen soll.</p>
+<p>Die Pr&uuml;fung des Zusammenhangs untergliedert sich in zwei Teilpr&uuml;fungen:</p>
+<ul>
+ <li>&Uuml;berpr&uuml;fung, ob jede <code>dsig:Reference</code> in <code>dsig:SignedInfo</code> der Signatur eine vorgegebene Transformationskette inkludiert;</li>
+ <li>&Uuml;berpr&uuml;fung, ob die in der vorgegebenen Transformationskette ggf. enthaltenen inkludierten Stylesheets (implizite Transformationsparameter) durch ein Signaturmanifest mitsigniert sind.</li>
+</ul>
+<p>Damit MOA SP die erste Teilpr&uuml;fung durchf&uuml;hren kann, muss in <code>SignatureManifestCheckParams</code> je <code>dsig:Reference</code> Element in <code>dsig:SignedInfo</code> der XML-Signatur ein Element <code>ReferenceInfo</code> angeben. Ausgenommen sind <code>dsig:Reference</code>-Elemente, die auf ein Signaturmanifest (Attribut <code>Type</code> ist gesetzt und hat den Wert <code>http://www.buergerkarte.at/specifications/Security-Layer/20020225#SignatureManifest</code>), auf ein XMLDSIG-Manifest (Attribut <code>Type</code> ist gesetzt und hat den Wert <code>http://www.w3.org/2000/09/xmldsig#Manifest</code>) oder auf Signatureigenschaften (Attribut <code>Type</code> ist gesetzt und hat den Wert <code>http://uri.etsi.org/01903/v1.1.1#SignedProperties</code>) verweisen. </p>
+<p>Das Element <code>ReferenceInfo</code> enth&auml;lt eine oder mehrere erlaubte Transformationsketten, die jeweils durch ein Element <code>VerifyTransformsInfoProfile/dsig:Transforms</code> repr&auml;sentiert werden. Im konkreten Beispiel werden f&uuml;r die einzige zu pr&uuml;fende <code>dsig:Reference</code> zwei erlaubte Transformationsketten angegeben. Die Transformationen in der <code>dsig:Reference</code> m&uuml;ssen einer dieser beiden Ketten entsprechen; im konkreten Beispiel entsprechen sie der ersten. </p>
+<p>Nachdem die erste erlaubte Transformationskette eine XSLT-Transformation mit einem inkludierten Stylesheet enth&auml;lt, muss MOA SP auch &uuml;berpr&uuml;fen, ob dieser inkludierte Stylesheet korrekt durch ein Signaturmanifest mitunterschrieben wurde. Nachdem wichtig ist, dass nicht irgendein beliebiger Stylesheet verwendet und mitunterschrieben wurde, sondern genau jener, den die Anwendung bei der Signaturerstellung vorgegeben hat, muss die Anwendung MOA SP mitteilen, welcher Stylesheet das sein muss. Die Anwendung verwendet dazu das Element <code>VerifyTransformsInfoProfile/TransformParameter</code>. Das Attribut <code>TransformParameter/@URI</code> enth&auml;lt die Referenz auf den Stylesheet genau so, wie er im Stylesheet-Parameter der zu pr&uuml;fenden Signatur verwendet wird (<code>dsig:Transform/xsl:stylesheet/xsl:inlcude/@href</code>). F&uuml;r den Inhalt dieses Elements hat die Anwendung drei M&ouml;glichkeiten: </p>
+<ul>
+ <li>Die Anwendung l&auml;sst den Inhalt leer. Dies wird sie dann machen, wenn sie darauf vertrauen kann, dass die Aufl&ouml;sung der in <code>TransformParameter/@URI</code> angegebenen Referenz bei der Signaturpr&uuml;fung zum gleichen Resultat f&uuml;hrt wie seinerzeit beim Erstellen der Signatur (z.B. weil die Referenz auf einen Webserver unter Kontrolle der Anwendung zeigt);</li>
+ <li>Die Anwendung gibt im Element <code>TransformParameter/Base64Content</code> explizit den inkludierten Stylesheet an. MOA SP verwendet dann diesen Stylesheet, um den Hashwert der <code>dsig:Reference</code> im Signaturmanifest zu kontrollieren;</li>
+ <li>Die Anwendung gibt im Element <code>TransformParameter/Hash </code>den Hashwert des inkludierten Stylesheets an. MOA SP l&ouml;st dann die Referenz in <code>dsig:Transform/xsl:stylesheet/xsl:inlcude/@href</code> auf und stellt sicher, dass der &uuml;ber das Aufl&ouml;sungsergebnis gebildete Hashwert jenem in <code>TransformParameter/Hash </code>entspricht. Diese M&ouml;glichkeit wird die Anwendung dann verwenden, wenn es sich um einen sehr umfangreichen Stylesheet handelt, der nicht im Request mit&uuml;bertragen werden soll.</li>
+</ul>
+<h5>Response</h5>
+<p><code><a href="../../clients/webservice/resources/requests/VerifyXMLSignatureRequest.SigManifest.resp.xml" target="_blank">VerifyXMLSignatureRequest.SigManifest.resp.xml</a></code> ist eine typische Response des SP Webservices auf den obigen Request. Sein Aufbau wird nachfolgend analysiert. Bitte beachten Sie, dass die dargestellte Response zur bessernen Lesbarkeit einger&uuml;ckt und gek&uuml;rzt wurde. </p>
+<pre>
+&lt;VerifyXMLSignatureResponse
+ xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;
+ &lt;SignerInfo&gt;...&lt;/SignerInfo&gt;
+</pre>
+<p>Die Response enth&auml;lt zun&auml;chst in <code>SignerInfo/dsig:X509Data</code> Informationen &uuml;ber den Signator, die aus dem in der XML-Signatur enthaltenen Signatorzertifikat entnommen sind (siehe <a href="#webservice_xmlrequests_pruefungxml_einfach">Einfaches Beispiel</a>). </p>
+<pre>
+ &lt;ReferenceInputData PartOf=&quot;SignedInfo&quot;&gt;
+ &lt;XMLContent xml:space=&quot;preserve&quot;&gt;
+ &lt;doc:Paragraph ParaId=&quot;Para2&quot; xmlns:doc=&quot;urn:document&quot;
+ xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&gt;...&lt;/doc:Paragraph&gt;
+ &lt;/XMLContent&gt;
+ &lt;/ReferenceInputData&gt;
+ &lt;ReferenceInputData PartOf=&quot;SignedInfo&quot;&gt;
+ &lt;XMLContent xml:space=&quot;preserve&quot;&gt;
+ &lt;dsig:Manifest Id=&quot;manifest-1-1&quot; xmlns:doc=&quot;urn:document&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
+ ...
+ &lt;/dsig:Manifest&gt;
+ &lt;/XMLContent&gt;
+ &lt;/ReferenceInputData&gt;
+ &lt;ReferenceInputData PartOf=&quot;SignedInfo&quot;&gt;
+ &lt;XMLContent xml:space=&quot;preserve&quot;&gt;
+ &lt;etsi:SignedProperties xmlns:doc=&quot;urn:document&quot;
+ xmlns:etsi=&quot;http://uri.etsi.org/01903/v1.1.1#&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
+ ...
+ &lt;/etsi:SignedProperties&gt;
+ &lt;/XMLContent&gt;
+ &lt;/ReferenceInputData&gt;
+</pre>
+<p>Nachdem im Request spezifiziert wurde, dass in der Response die Referenzeingangsdaten f&uuml;r alle <code>dsig:Reference</code>-Elemente
+ von <code>dsig:SignedInfo</code> (bzw. auch f&uuml;r jede <code>dsig:Reference</code> aus einem <code>dsig:Manifest</code>,
+ auf das mittels des Attributs <code>Type=&quot;http://www.w3.org/2000/09/xmldsig#Manifest&quot;</code> in einer <code>dsig:Reference</code> aus <code>dsig:SignedInfo</code> verwiesen
+ wird; solche Manifeste kommen aber in diesem Beispiel nicht vor) der gepr&uuml;ften
+ XML-Signatur &uuml;bermittelt
+ werden sollen, enth&auml;lt
+ die Response nach <code>SignerInfo</code> drei <code>ReferenceInputData</code>-Elemente. Das erste <code>ReferenceInputData</code>-Element
+ enth&auml;lt das zuvor besprochene <code>doc:Paragraph</code> Element, das zweite das Signaturmanifest, das
+ dritte die Signatureigenschaften. Das Attribut <code>PartOf</code> jedes Elements weist mit dem Wert <code>SignedInfo</code> darauf hin,
+ dass die <code>dsig:Reference</code>, f&uuml;r welche die Referenzeingangsdaten gelten, Teil von <code>dsig:SignedInfo</code> ist. </p>
+<pre>
+ &lt;SignatureCheck&gt;
+ &lt;Code&gt;0&lt;/Code&gt;
+ &lt;/SignatureCheck&gt;
+</pre>
+<p>Das Element<code> SignatureCheck</code> enth&auml;lt das Resultat der kryptographischen Pr&uuml;fung der Signatur (siehe <a href="#webservice_xmlrequests_pruefungxml_einfach">Einfaches Beispiel</a>).</p>
+<pre>
+ &lt;SignatureManifestCheck&gt;
+ &lt;Code&gt;0&lt;/Code&gt;
+ &lt;/SignatureManifestCheck&gt;
+</pre>
+<p>Das Element <code>SignatureManifestCheck</code> enh&auml;lt das Resultat der Pr&uuml;fung des Zusammenhangs zwischen Referenz-Eingangsdaten und Hash-Eingangsdaten. Der Kode <code>0</code> im konkreten Beispiel bedeutet, dass alle Referenzen die in der Anfrage zur &Uuml;berpr&uuml;fung der XML-Signatur gemachten Einschr&auml;nkungen bez&uuml;glich der erlaubten Transformationskette(n) einhalten, sowie dass die Anforderungen hinsichtlich des Signaturmanifests werden eingehalten. F&uuml;r eine &Uuml;bersicht der m&ouml;glichen Kodes siehe die <a href="../spec/MOA-SPSS-1.2.pdf" target="_blank">Spezifikation zu MOA SP/SS</a>, Abschnitt 5.1.3.1.4.</p>
+<pre>
+ &lt;CertificateCheck&gt;
+ &lt;Code&gt;0&lt;/Code&gt;
+ &lt;/CertificateCheck&gt;
+&lt;/VerifyXMLSignatureResponse&gt;
+</pre>
+<p>Das Element<code> CertificateCheck</code> enth&auml;lt das Resultat der Zertifikatspr&uuml;fung (siehe <a href="#webservice_xmlrequests_pruefungxml_einfach">Einfaches Beispiel</a>).</p>
+<h2><a name="webservice_clients" id="webservice_clients"></a>2.2 Webservice-Clients</h2>
+<p><a href="#webservice_xmlrequests">Abschnitt 2.1</a> bespricht eine Reihe von typischen XML-Requests, die &uuml;ber die Webservice-Schnittstelle an MOA SP/SS gesendet werden k&ouml;nnen, um entweder Signaturen zu erstellen (MOA SS) oder Signaturen zu pr&uuml;fen (MOA SP). Dieser Abschnitt zeigt die Verwendung des prototypischen Webservice-Clients, der mit dieser Dokumentation zu MOA SP/SS ausgeliefert wird.</p>
+<h3><a name="webservice_clients_übersicht" id="webservice_clients_übersicht"></a>2.2.1 &Uuml;bersicht</h3>
+<p>Der Webservice-Client existiert in drei Varianten, wobei jede Variante in einer eigenen Java-Klasse implementiert ist:</p>
+<ul>
+ <li>Der einfache Client (<code><a href="../../clients/webservice/src/main/java/at/gv/egovernment/moa/spss/handbook/clients/webservice/HTTP.java">HTTP.java</a></code>) arbeitet ohne Authentifikation. Er pr&uuml;ft weder die Authentizit&auml;t des verwendeten MOA-Webservices, noch identifiziert er sich selbst gegen&uuml;ber dem MOA-Webservice.</li>
+ <li>Der Client mit Server-Authentisierung (<code><a href="../../clients/webservice/src/main/java/at/gv/egovernment/moa/spss/handbook/clients/webservice/HTTPSServerAuth.java">HTTPSServerAuth.java</a></code>) pr&uuml;ft die Authentizit&auml;t des verwendeten MOA-Websservices an Hand dessen SSL-Serverzertifikats, identifiziert sich selbst jedoch nicht gegen&uuml;ber dem MOA-Webservice.</li>
+ <li>Der Client mit Client- und Server-Authentisierung (<code><a href="../../clients/webservice/src/main/java/at/gv/egovernment/moa/spss/handbook/clients/webservice/HTTPSClientAuth.java">HTTPSClientAuth.java</a></code>) pr&uuml;ft einerseits die Authentizit&auml;t des verwendeten MOA-Websservices an Hand dessen SSL-Serverzertifikats; andererseits weist er sich selbst mittels eines SSL-Client-Zertifikats gegen&uuml;ber dem MOA-Webservice aus. </li>
+</ul>
+<p>Welcher der drei Varianten des Webservice-Clients zum Einsatz kommen soll, h&auml;ngt von der Art ab, wie das MOA-Webservice betrieben wird, d.h. ob es Server- bzw. Client-Authentisierung unterst&uuml;tzt bzw. verlangt. Befinden sich sowohl MOA-Webservice als auch der Webservice-Client im gleichen, abgeschotteten Netzwerk, kann auch eine Kommunikation ohne Authenifikation in Betracht gezogen werden. Ansonsten wird der Standardfall wohl der Betrieb mit Server-Authentisierung (Verwendung von MOA SP) bzw. mit Server- und Client-Authentisierung (Verwendung von MOA SS) sein.</p>
+<p class="remark">Hinweis: Das <a href="../../">Wurzelverzeichnis</a> dieses Handbuchs stellt ein komplettes und sofort verwendbares Eclipse Projekt dar. </p>
+<h3><a name="webservice_clients_gemeinsamkeiten" id="webservice_clients_gemeinsamkeiten"></a>2.2.2 Gemeinsamkeiten</h3>
+<p>Dieser Abschnitt beschreibt die Gemeinsamkeiten aller drei Varianten des Webservice-Clients. </p>
+<p>Zun&auml;chst einmal ben&ouml;tigen alle drei Varianten die folgenden Java-Bibliotheken, die im Ordner <a href="../../clients/webservice/lib/">clients/webservice/lib/</a> dieses Handbuchs bereits enthalten sind:</p>
+<table class="fixedwidth" border="1" cellpadding="2">
+ <TBODY>
+ <TR>
+ <TH>Java-Bibliothek</TH>
+ <TH>Bemerkung</TH>
+ </TR><TR>
+ <TD><a href="#referenzierte_software">J2SE</a></TD>
+ <TD> J2SE 1.3.1 SDK oder J2SE 1.4.2 SDK oder J2SE 5.0 SDK. </TD>
+ </TR>
+ <TR>
+ <TD><a href="#referenzierte_software">Apache Xerces</a></TD>
+ <TD>XML-Parser, Version 2.0.2 oder h&ouml;her; nicht n&ouml;tig wenn JDSE 1.4.2 oder h&ouml;her verwendet wird. </TD>
+ </TR>
+ <TR>
+ <TD><a href="#referenzierte_software">AXIS Framework</a></TD>
+ <TD>Webservice-Framework, Version 1.1.</TD>
+ </TR>
+ <TR>
+ <TD><a href="#referenzierte_software">JSSE</a></TD>
+ <TD>Java Secure Socket Extension, Version 1.0.3 oder h&ouml;her; nur notwendig f&uuml;r die Varianten <code>HTTPServerAuth</code> und <code>HTTPClientAuth</code>.</TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<p>Weiters ist allen drei Varianten der folgende Kern-Ablauf gemeinsam:</p>
+<ol>
+ <li>Der Webservice-Client liest einen vorbereiteten MOA-XML-Request (z. B. einen der in <a href="#webservice_xmlrequests">Abschnitt 2.1</a> gezeigten) vom Dateisystem ein.</li>
+ <li>Der Webservice-Client erstellt einen SOAP-Request mit dem vom Dateisystem gelesenen MOA-XML-Request als Nutzlast.</li>
+ <li>Der Webservice-Client sendet den erstellten SOAP-Request &uuml;ber HTTP an MOA SP/SS. </li>
+ <li>Der Webservice-Client empf&auml;ngt die SOAP-Response von MOA SP/SS.</li>
+ <li>Der Webservice-Client extrahiert die Nutzlast des SOAP-Responses (d. h. die zum MOA-XML-Request aus Schritt 1 passende MOA-XML-Response), gibt diese auf die Konsole aus und speichert sie im Dateisystem. </li>
+</ol>
+<p>Konfiguriert werden k&ouml;nnen alle drei Varianten mit Hilfe von zwei Kommandozeilen-Parametern:</p>
+<ol>
+ <li>Der erste Kommandozeilenparameter gibt an, ob MOA SS (Wert <code>sign</code>) oder MOA SP (Wert <code>verify</code>) kontaktiert werden soll. </li>
+ <li>Der zweite Kommandozeilenparameter enth&auml;lt Pfad und Dateiname einer Java-Properties-Datei, die die weiteren Konfigurationsparameter f&uuml;r den Webservice-Client enth&auml;lt. Ein relativer Pfad wird als relativ zum Arbeitsverzeichnis der Java Virtual Machine interpretiert. Genaue Infos zu den m&ouml;glichen Konfigurationsparametern entnehmen Sie bitte der Quellcodedokumentation der jeweiligen Variante des Webservice-Clients. <a href="../../clients/webservice/conf/http.properties"><code>http.properties</code></a> enth&auml;lt eine auf dieses Handbuch abgestimmte Konfiguration.</li>
+</ol>
+<h3><a name="webservice_clients_httpsserverauth" id="webservice_clients_httpsserverauth"></a>2.2.3 Besonderheiten von <code>HTTPSServerAuth.java</code></h3>
+<p>Diese Variante des Webservice-Clients verwendet JSSE, um im Schritt 3 des Kernablaufs aus <a href="#webservice_clients_gemeinsamkeiten">Abschnitt 2.2.2</a> eine SSL-Verbindung mit Server-Authentifizierung zum MOA SP/SS Server aufzubauen. In dieser SSL-Verbindung sendet der Webservice-Client dann den erstellten SOAP-Request &uuml;ber HTTPS.</p>
+<p>Die Konfiguration von JSSE (Speicher f&uuml;r die vertrauensw&uuml;rdigen Serverzertifikate, Typ dieses Speichers, Passwort f&uuml;r diesen Speicher) wird mittels zus&auml;tzlicher Parameter in der in <a href="#webservice_clients_gemeinsamkeiten">Abschnitt 2.2.2</a> besprochenen Java-Properties-Datei vorgenommen. Genaue Infos zu diesen Konfigurationsparametern entnehmen Sie bitte der Quellcodedokumentation von <code><a href="../../clients/webservice/src/main/java/at/gv/egovernment/moa/spss/handbook/clients/webservice/HTTPSServerAuth.java">HTTPSServerAuth.java</a></code>. <a href="../../clients/webservice/conf/http.properties"><code>http.properties</code></a> enth&auml;lt eine auf dieses Handbuch abgestimmte Konfiguration.</p>
+<p>Falls Sie Probleme beim SSL-Verbindungsaufbau zwischen Webservice-Client und MOA SP/SS Webservice haben, empfiehlt sich die Aktivierung des JSSE Loggings. Das Setzen der daf&uuml;r notwendigen Java System Property ist im Quellcode von <code><a href="../../clients/webservice/src/main/java/at/gv/egovernment/moa/spss/handbook/clients/webservice/HTTPSServerAuth.java">HTTPSServerAuth.java</a></code> bereits enthalten, jedoch auskommentiert. Suchen Sie einfach nach dem String <code>javax.net.debug</code>, um zur entsprechenden Stelle im Quellcode zu gelangen. </p>
+<h3><a name="webservice_clients_httpsclientauth" id="webservice_clients_httpsclientauth"></a>2.2.4 Besonderheiten von <code>HTTPSClientAuth.java</code> </h3>
+<p>Diese Variante des Webservice-Clients verwendet JSSE, um im Schritt 3 des Kernablaufs aus <a href="#webservice_clients_gemeinsamkeiten">Abschnitt 2.2.2</a> eine SSL-Verbindung mit Server- und Client-Authentifizierung zum MOA SP/SS Server aufzubauen. In dieser SSL-Verbindung sendet der Webservice-Client dann den erstellten SOAP-Request &uuml;ber HTTPS.</p>
+<p>Die gegen&uuml;ber <a href="#webservice_clients_httpsserverauth">Abschnitt 2.2.3</a> zus&auml;tzlich notwendige Konfiguration von JSSE (Speicher f&uuml;r das SSL-Client-Zertifikat sowie den dazugeh&ouml;rigen privaten Schl&uuml;ssel, Typ dieses Speichers, Passwort f&uuml;r diesen Speicher) wird mittels zus&auml;tzlicher Parameter in der in <a href="#webservice_clients_gemeinsamkeiten">Abschnitt 2.2.2</a> besprochenen Java-Properties-Datei vorgenommen. Genaue Infos zu diesen Konfigurationsparametern entnehmen Sie bitte der Quellcodedokumentation von <code><a href="../../clients/webservice/src/main/java/at/gv/egovernment/moa/spss/handbook/clients/webservice/HTTPSClientAuth.java">HTTPSClientAuth.java</a></code>. <a href="../../clients/webservice/conf/http.properties"><code>http.properties</code></a> enth&auml;lt eine auf dieses Handbuch abgestimmte Konfiguration.</p>
+<p>Beachten Sie bitte auch den Hinweis zum JSSE Logging aus <a href="#webservice_clients_httpsserverauth">Abschnitt 2.2.3</a>.</p>
+<h1><a name="klassenbibliothek" id="klassenbibliothek"></a>3 Verwendung der Klassenbibliothek</h1>
+<p>Neben dem Betrieb von MOA SP/SS als Webservice ist als Alternative auch die Verwendung von MOA SP/SS als Klassenbibliothek m&ouml;glich, also die direkte Einbindung in ein Java-Programm unter Verwendung des Application Programmers Interface (API) von MOA SP/SS. </p>
+<h2><a name="klassenbibliothek_vorbereitung" id="klassenbibliothek_vorbereitung"></a>3.1 Vorbereitung</h2>
+<p>Um das API von MOA SP/SS verwenden zu k&ouml;nnen, m&uuml;ssen einerseits die MOA-Bibliotheken selbst, andererseits eine Reihe von unterst&uuml;tzenden Bibliotheken in den Klassenpfad aufgenommen werden. Eine &Uuml;bersicht dazu finden Sie im Installationshandbuch im <a href="../install/install.html#klassenbibliothek">Abschnitt 3</a>.
+<h2><a name="klassenbibliothek_allgemeines" id="klassenbibliothek_allgemeines"></a>3.2 Allgemeines </h2>
+<p>Der strukturelle Aufbau der API entspricht weitgehend der Struktur eines MOA-XML-Requests. Es werden daher in diesem Abschnitt nur zwei grundlegende Beispiele gebracht; f&uuml;r komplexere Aufgaben k&ouml;nnen die XML-Beispiele aus <a href="#webservice_xmlrequests">Abschnitt 2.1</a> als Vorlage verwendet und einfach in die &quot;API-Welt&quot; &uuml;bertragen werden.
+<h2><a name="klassenbibliothek_beispiele" id="klassenbibliothek_beispiele"></a>3.3 Beispiele </h2>
+<p>Dieses Handbuch enth&auml;lt zwei Beispiele f&uuml;r die Verwendung der API von MOA SP/SS:
+<ol>
+ <li><code><a href="../../clients/api/src/main/java/at/gv/egovernment/moa/spss/handbook/clients/api/CreateXMLSignature.java">CreateXMLSignature.java</a></code>: Erstellung einer einfachen XML-Signatur; dieses Beispiel entspricht dem MOA-XML-Request aus <a href="#webservice_xmlrequests_erstellungxml_simple">Abschnitt 2.1.1.1</a>. <br>
+ Die Konfiguration der API erfolgt &uuml;ber Kommandozeilenparameter (Lage der Konfigurationsdatei f&uuml;r MOA SP/SS, Lage der Konfigurationsdatei f&uuml;r das Logging mit Log4j). Detaillierte Informationen dazu finden Sie in der Quellcodedokumentation des Beispiels. </li>
+ <li><code><a href="../../clients/api/src/main/java/at/gv/egovernment/moa/spss/handbook/clients/api/VerifyXMLSignature.java">VerifyXMLSignature.java</a></code>: Pr&uuml;fung einer einfachen XML-Signatur; dieses Beispiel entspricht dem MOA-XML-Request aus <a href="#webservice_xmlrequests_pruefungxml_einfach">Abschnitt 2.1.3.1</a>. <br>
+ Die Konfiguration der API erfolgt &uuml;ber Kommandozeilenparameter (Lage der Konfigurationsdatei f&uuml;r MOA SP/SS, Lage der Konfigurationsdatei f&uuml;r das Logging mit Log4j). Detaillierte Informationen dazu finden Sie in der Quellcodedokumentation des Beispiels. <br>
+ Die Auswahl der zu pr&uuml;fenden Signatur erfolgt ebenfalls per Kommandozeilenparameter. Detaillierte Informationen dazu finden Sie ebenfalls in der Quellcodedokumentation des Beispiels. </li>
+</ol>
+<h2><a name="klassenbibliothek_apidoc" id="klassenbibliothek_apidoc"></a>3.4 API-Dokumentation </h2>
+<p>F&uuml;r die vollst&auml;ndige Dokumentation des API von MOA SP/SS sei auf die <a href="../../api-doc/index.html">Java Doc der API</a> verwiesen.
+<p>
+<h1><a name="referenzierte_software" id="referenzierte_software"></a>A Referenzierte Software</h1>
+<p>Auf folgende Software-Pakete wird in diesem Handbuch verwiesen:</p>
+<table class="fixedWidth" border="1" cellpadding="2">
+ <tbody>
+ <tr>
+ <th scope="col">Name</th>
+ <th scope="col">Beschreibung</th>
+ </tr>
+ <tr>
+ <td><a href="http://xml.apache.org/xerces2-j/">Apache Xerces 2</a> </td>
+ <td>XML-Parser aus dem Apache Project</td>
+ </tr>
+ <tr>
+ <td><a href="http://xml.apache.org/axis/">Apache Axis</a></td>
+ <td>Webservice-Framework aus dem Apache Project</td>
+ </tr>
+ <tr>
+ <td><a href="http://java.sun.com/j2se/1.4.2/" target="_blank">J2SE 1.4.2 SDK/JRE</a></td>
+ <td>Java 2 Standard Edition in der Version 1.4.2 (Software Development Kit bzw. Java Runtime Environment) </td>
+ </tr>
+ <tr>
+ <td><a href="http://java.sun.com/j2se/1.5.0/" target="_blank">J2SE 5.0 SDK/JRE</a> </td>
+ <td>Java 2 Standard Edition in der Version 5.0 (Software Development Kit bzw. Java Runtime Environment) </td>
+ </tr>
+ <tr>
+ <td><a href="http://java.sun.com/products/jsse/">JSSE</a></td>
+ <td>Java Secure Socket Extension </td>
+ </tr>
+ </tbody>
+</table>
+<p>&nbsp;</p>
+</body>
+</html>
diff --git a/spss/handbook/pom.xml b/spss/handbook/pom.xml
new file mode 100644
index 000000000..9caf5c181
--- /dev/null
+++ b/spss/handbook/pom.xml
@@ -0,0 +1,24 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>MOA</groupId>
+ <artifactId>spss</artifactId>
+ <version>1.5.x</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>MOA.spss.handbook</groupId>
+ <artifactId>moa-spss-handbook</artifactId>
+ <packaging>pom</packaging>
+ <version>1.5</version>
+ <name>MOA SP/SS Handbook</name>
+
+ <modules>
+ <module>clients</module>
+ </modules>
+
+ <properties>
+ <repositoryPath>${basedir}/../../../repository</repositoryPath>
+ </properties>
+
+</project>
diff --git a/spss/pom.xml b/spss/pom.xml
new file mode 100644
index 000000000..c5ecda04d
--- /dev/null
+++ b/spss/pom.xml
@@ -0,0 +1,25 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>MOA</groupId>
+ <artifactId>MOA</artifactId>
+ <version>1.5.0</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>MOA</groupId>
+ <artifactId>spss</artifactId>
+ <packaging>pom</packaging>
+ <version>1.5.0</version>
+ <name>MOA SP/SS</name>
+
+ <properties>
+ <repositoryPath>${basedir}/../repository</repositoryPath>
+ </properties>
+
+ <modules>
+ <module>server</module>
+ <module>handbook</module>
+ </modules>
+
+</project>
diff --git a/spss/server/.classpath b/spss/server/.classpath
new file mode 100644
index 000000000..f93d181b5
--- /dev/null
+++ b/spss/server/.classpath
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/spss/server/.project b/spss/server/.project
new file mode 100644
index 000000000..797ccb7d2
--- /dev/null
+++ b/spss/server/.project
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>moa-spss</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
diff --git a/spss/server/.settings/org.eclipse.jdt.core.prefs b/spss/server/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..02fbf27fb
--- /dev/null
+++ b/spss/server/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,5 @@
+#Tue Jul 07 16:07:22 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.source=1.4
diff --git a/spss/server/.settings/org.maven.ide.eclipse.prefs b/spss/server/.settings/org.maven.ide.eclipse.prefs
new file mode 100644
index 000000000..c76587513
--- /dev/null
+++ b/spss/server/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,9 @@
+#Tue Jul 07 16:06:49 CEST 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
diff --git a/spss/server/history.txt b/spss/server/history.txt
new file mode 100644
index 000000000..52790e1d1
--- /dev/null
+++ b/spss/server/history.txt
@@ -0,0 +1,410 @@
+##############
+1.5.0
+##############
+
+- Fixed Bug #548 (http://egovlabs.gv.at/tracker/index.php?func=detail&aid=548&group_id=6&atid=105)
+- IAIK Libraries aktualisiert:
+ iaik-moa: Version 1.29
+ iaik_jce_full: Version 4.0_MOA
+ iaik_cms: Version 4.1_MOA
+
+
+##############
+1.4.8
+##############
+
+- IAIK Libraries aktualisiert:
+ iaik-moa: Version 1.28 (Unterstützung XAdES Versionen)
+
+##############
+1.4.7
+##############
+
+- Update Konfiguration:
+ Im Element ServiceOrder unter dem Element RevocationChecking kann nun auch nur ein
+ Service eingetragen werden (bspw. nur CRL)
+- IAIK Libraries aktualisiert:
+ iaik-moa: Version 1.27
+##############
+1.4.6
+##############
+
+- Keine Änderung in MOA-SPSS
+
+##############
+1.4.5
+##############
+
+- IAIK Libraries aktualisiert:
+ iaik-moa: Version 1.26
+ iaik-ecc: Version 2.19
+ iaik-jce: Version 3.18_MOA
+ iaikPkcs11Provider: Version 1.2.6
+ iaikPkcs11Wrapper: Version 1.2.17
+
+- Überprüfung von ArchiveCutOff und Implementierung eines Retention Intervalls für CRLs.
+- Hinzufügen der Möglichkeit Retention Intervalle für bestimmte CAs zu konfigurieren.
+ Dadurch wurde auch das Konfigurations Schema geändert.
+- Weitere Änderung des Konfigurations Schemas: Bei der ServiceOrder für das Revocation
+ Checking kann nun auch nur jeweils ein Dienst (CRL oder OCSP) angegeben werden.
+
+##############
+1.4.4
+##############
+
+- IAIK Libraries aktualisiert:
+ iaik-moa: Version 1.24
+ iaik-ixsil: Version 1.2.2.4
+
+##############
+1.4.3-1
+##############
+
+- Fix von falscher Schemabenennung in Constants.java des common-Projekts.
+
+##############
+1.4.3
+##############
+
+- Unnötige Abhängigkeit zu JSSE-Implementierung von Sun wurden entfernt, welcher den Einsatz von MOA SP/SS in
+ Java-Laufzeitumgebungen anderer Hersteller als Sun (z.B. IBM) erschwert.
+
+- Ein Konfigurationsparameter für MOA SP wurde eingeführt (cfg:SignatureVerification/cfg:PermitFileURIs) welcher
+ file-URIs erlauben oder verbieten soll.
+
+- Das Herauslösen des Verarbeitungsrequests aus dem SOAP-Request endete in einer
+ ClassCastException, wenn zwischen dem Body-Element des SOAP-Envelopes und dem
+ Request white spaces vorhanden sind bzw. dieses Element nicht unmittelbar nach
+ dem Body-Element steht. Das Herauslösen ist nun gegen white spaces robust.
+
+- Bei der Signaturverifikation (zusätzlich zu den bisherigen) folgende Algorithmen unterstützt:
+ 1. Added the following signature algorithms for XML signatures:
+ o http://www.w3.org/2001/04/xmldsig-more#rsa-sha384
+ o http://www.w3.org/2001/04/xmldsig-more#rsa-sha512
+ o http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha224
+ o http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256
+ o http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384
+ o http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512
+ o http://www.w3.org/2007/05/xmldsig-more#ecdsa-ripemd160
+ 2. Added the following hash algorithms for XML signatures:
+ o http://www.w3.org/2001/04/xmldsig-more#sha224
+ o http://www.w3.org/2001/04/xmldsig-more#sha384
+ o http://www.w3.org/2001/04/xmlenc#sha512
+ 3. Added the following signature algorithms for verifying CMS signatures:
+ o SHA224withRSA
+ o SHA384withRSA
+ o SHA512withRSA
+ o SHA224withECDSA
+ o SHA256withECDSA
+ o SHA384withECDSA
+ o SHA512withECDSA
+ o RIPEMD160withECDSAPlain
+ 4. Added the following hash algorithms for CMS signatures:
+ o SHA-224
+ o SHA-384
+ o SHA-512
+
+- IAIK Libraries aktualisiert:
+ Versionsnummern:
+ iaik-cms: Version 4.01_MOA
+ iaik-moa: Version 1.23
+ iaik-ecc: Version 2.16
+
+##############
+1.4.2
+##############
+
+- IAIK Libraries aktualisiert:
+ Versionsnummern:
+ iaik-jce: Version 3.16_MOA
+ iaik-cms: Version 4.0_MOA
+
+##############
+1.4.2 beta1
+##############
+
+- Performance-Verbesserungen bei der Verwendnung von externen Referenzen. Diese
+ werden nur mehr einmal gelesen und dann gecashed
+
+- Das Lesen von Streams wurde beschleunigt
+
+- Axis wird wieder in Version 1.0 eingesetzt, da es sonst bei Verwendung von
+ eingebetteten Dokumenten (Stylesheets usf.) zu Verlusten von Namespace-
+ Deklarationen kommt (dsig, xsi).
+
+##############
+1.4.1
+##############
+
+- Die Projektstruktur wurde eimem Maven Build-Prozess unterlegt. Der Sourcocde
+ ab dieser Version unter http://egovlabs.gv.at/scm/?group_id=6 verfügbar.
+
+##############
+1.4.0
+##############
+
+- Unterstützung von SOAP with Attachments. LocRefContent kann nun auch über SOAP
+ attachments übergeben werden. Dadurch können alle notwendigen Teile für einen
+ Request platzsparend in einem Schritt übermittelt werden.
+
+- Axis Libraries aktualisiert (auf Version 1.4)
+
+- Ermöglichung von Signaturpositionen die sich am Ende des Dokuments befinden
+ (CreateSignatureLocation=-1).
+
+- IAIK Libraries aktualisiert:
+ Versionsnummern:
+ iaik-jce: Version 3.142_MOA
+ iaik-cms: Version 3.2
+ iaikPkcs11Provider: Version 1.2.4
+ iaikPkcs11Wrapper: Version 1.2.16
+ ixsil: Version IXSIL-1.2.2.3
+ ecc: Version v2.15
+ iaik-moa: Version 1.20
+
+- Neue Mindestanforderung an Java: Version 1.4.0 (1.3.* wird nicht mehr
+ unterstützt)
+
+##############
+1.3.1D01
+##############
+
+- IAIK-MOA: CRL wird nun auch akzeptiert, wenn im CLRSigner-Zertifikat KeyUsage
+ crlSign-Bit nicht gesetzt ist, allerdings nur wenn das Zertifikat
+ ein Trust-Anchor ist.
+- IAIK-MOA: Eine indirekte CRL wird nun auch akzeptiert, wenn die
+ "IssuingDistributionPoint"-Extension fehlt
+
+- Logging: commons-logging-1.0.4-Libraries (unterstützt auch Tomcat 5*)
+
+##############
+1.3.0
+##############
+
+- "E-CARD"-Release
+- Update der Zertifikatsspeicher und Trustprofile
+- Update PKI auf OCSP (auch schon in 1.3.0D01 enthalten)
+- Update IAIK-Libraries (ab sofort wieder in der Distribution enthalten)
+ Versionsnummern:
+ iaik-jce: Version 3.13_3.13_NONEwithRSA (MOA-SPSS kann nun auch mit
+ JDK1.5 verwendet werden)
+ iaik-cms: Version 3.2
+ iaikPkcs11Provider: Version 1.1.9
+ iaikPkcs11Wrapper: Version 1.2.14
+ ixsil: Version IXSIL-1_2_2
+ ecc: Version 2.0
+
+##############
+1.3.0D01
+##############
+
+- Default-Wert für Archivierungsdauer von Widerrufsinformation von 0 auf 365
+ Tage geändert.
+ Siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=305.
+
+- Default-Reihenfolge der Verwendung von Widerrufspunkten von (CRL, OCSP) auf
+ (OCSP, CRL) geändert.
+ Siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=304.
+
+- XML-Schema für die Konfiguration von MOA SP/SS komplett überarbeitet.
+ Siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=271.
+
+- Änderungen der Semantik des Elements VerifyXMLSignatureRequest/ReturnHashInputData
+ bzw. des Attributs VerifyXMLSignatureRequest/SignatureManifestCheckParams/
+ @ReturnReferenceInputData. Es werden nunmehr auch die Hash-Eingangsdaten bzw.
+ die Referenz-Eingangsdaten für dsig:Reference-Elemente in XMLDSIG-Manifesten
+ zurückgeliefert.
+ Siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=232.
+
+- TCP-Verbindungen zur Auflösung von externen Referenzen wurden bisher nicht
+ sauber geschlossen. Damit kam es bei sehr komplexen XML-Signaturen unter
+ Umständen zu einem Ressourcen-Problem, da zu viele TCP-Verbindungen gleich-
+ zeitig geöffnet wurden. Dieses Probem wurde behoben.
+ Siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=283.
+
+- Trustprofil um eine Menge explizit erlaubter Signatorzertifikate erweitert.
+ Dadurch ist es nun möglich, nicht nur generell allen von einer als Vertrauens-
+ anker gesetzten CA ausgestellten Zertifikate zu vertrauen, sondern diese Zerti-
+ fikate weiter auf eine taxativ aufgezählte Liste von Signatorzertifikaten ein-
+ zuschränken.
+ Siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=267.
+
+- MOA SS Webservice Clients, die sich mit einem Zertifikat ausweisen, können nun
+ auch auf die Key-Groups des anonymen Key-Group-Mappings zugreifen.
+ Siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=224.
+
+- MOA SS fit für Mehrfachsignaturen, d.h. mehrere XML-Signaturen in einem XML-
+ Dokument gemacht. Bisher scheiterte das an den fix vergebenen Id-Attributen
+ innerhalb der dsig:Signature-Struktur.
+ Siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=214.
+
+- MOA SP so verändert, dass die Prüfungen zum Signaturmanifest laut SL 1.2 jeden-
+ falls durchgeführt werden, auch wenn das Element SignatureManifestCheckParams
+ in VerifyXMLSignatureRequest nicht angegeben wird.
+ Siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=269.
+
+- Verwendete JSSE Bibliothek auf Version 1.0.3 aktualisiert, da frühere Versionen
+ einen sicherheitskritischen Fehler enthalten.
+ Siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=124.
+
+##############
+1.2.1
+##############
+
+- Packaging umgestellt. Ab dieser Release werden die Kryptographiebibliotheken
+ des IAIK nicht mehr mit den Distributionen von MOA SP/SS mitgeliefert, sondern
+ sind vom Kunden selbst zu besorgen.
+
+##############
+1.2.0
+##############
+
+- Fehler beim validierenden Parsen des SignatureEnvironments eines Signaturer-
+ stellungsrequests behoben. War das Debug-Level ungleich debug, kam es bisher
+ zu einem Fehler.
+ Siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=220.
+
+- Default-Wert für das Konfigurationsattribut cfg:CRLDistributionPoint/
+ cfg:DistributionPoint/@reasonCodes so verändert, dass bei Weglassen des
+ Attributs alle Reason-Codes gesetzt werden.
+ Siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=244.
+
+- Commons Logging Bibliothek auf die Version 1.0.4 aktualisiert, damit Logging
+ auch beim Betrieb unter Tomcat 5 funktioniert.
+ Siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=245.
+
+- Werden bei der Zusammenstellung eines Signaturprüfrequests über das MOA API
+ keine Supplements angegeben (null), kommt es nunmehr zu keinem Fehler mehr.
+ Siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=247.
+
+##############
+1.2.0D04
+##############
+
+- Update des MOA-Kerns von IAIK. Gepatched wurde darin die fehlerhafte Kodierung
+ des Signaturwerts für ECDSA-Signaturen. Bisher wurde das Paar (r,s) fehlerhafter
+ Weise in eine ASN.1-Struktur eingepackt.
+ Siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=218.
+
+##############
+1.2.0D03
+##############
+
+- Update auf eine neuere Version der XML-Signaturbibliothek sowie damit ver-
+ bunden ein Update auf neuere Versionen von Xalan (2.5.1) sowie Xerces (2.4.0).
+ Grund: Mit der neuen Xerces-Version funktioniert nun auch das Parsen einer
+ XML-Personenbindung mit ECDSA-Schlüsseln.
+ Siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=215.
+
+- Update des MOA-Kerns von IAIK. Es werden nun ECDSA-Signaturen, welche den
+ Signaturalgorithmus mit "http://www.w3.org/2004/01/xmldsig-more#"
+ kennzeichnen, erfolgreich von MOA SP erkannt und geprüft. Ebenso erstellt
+ MOA SP nun ECDSA-Signaturen mit dem erwähnten Signaturalgorithmus.
+ Siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=217.
+
+- Prüfung des Signaturmanifests funktioniert nun auch bei vorhandener EC14N
+ Transformation. Siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=197.
+
+- Das Element SignerInfo/QualifiedCertificate der Antwort auf eine XML-
+ Signaturprüfung erscheint nun im korrekten Namespace.
+ Siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=189.
+
+- Eine falsche Fehlermeldung im Zusammenhang mit Ergänzungsobjekten wurde
+ korrigiert. Siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=174.
+
+- Fehlender Typ des Elements TrustProfileID im XML-Schema wurde ergänzt.
+ Siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=163.
+
+- Stack Overflow bei Prüfung bestimmter XML-Signaturen tritt nun nicht mehr
+ auf. Siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=132.
+
+- Unpräzise Fehlermeldungen verbessert.
+ Siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=127.
+ Siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=74.
+
+
+##############
+1.2.0D02
+##############
+
+- Im Befehl CreateXMLSignatureRequest kann nun in FinalDataMetaInfo das
+ zusätzliche Element "Type" angegeben werden. Der Textinhalt dieses Elements
+ wird als Type-Attribut der korrespondierenden dsig:Reference gesetzt. Siehe
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=54.
+
+- Die Verwendung von EC14N-Transformationen ohne InclusiveNamespaces funktioniert
+ nun auch. Siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=44.
+
+- Signaturerstellung mit DSA-Schlüssel funktioniert nun. Siehe
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=52.
+
+##############
+1.2.0D01
+##############
+
+- In den Befehlen CreateXMLSignatureRequest sowie VerifyXMLSignatureRequest kann
+ nun in allen Fällen, in denen bisher entweder Base64Content oder XMLContent
+ angegeben werden konnte, auch eine dritte Spielart verwendet werden, nämlich
+ LocRefContent. LocRefContent hat als Text-Inhalt eine URL, von der MOA den
+ Content bezieht
+ (siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=41).
+
+##############
+1.1.0
+##############
+
+- Einfach verwendbare Scripts für Starten/Stopen sowie Install/Uninstall als
+ Service unter Windows in die Auslieferung aufgenommen
+ (siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=36).
+
+- Drei neue Fragen in die FAQ aufgenommen
+ (siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=34,
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=35,
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=37).
+
+- Zertifikatsspeicher der Default-Konfiguration enthält nun alle CA-Zertifikate
+ A-Trust sowie das Root-Zertifikats des Mobilkom-Bürgerkarten-Versuchs
+ (siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=33).
+
+- Konfigurationsparameter "checkRevocation" ist hat nun Default-Wert "false"
+ (siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=32).
+
+- Fehlerhafte Einträge in den minimalen Default-Konfigurationsfiles behoben
+ (siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=30,
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=31).
+
+- Ein CreateXMLSignatureRequest, der nicht den Default-Namespace verwendet, sondern
+ ein ns-Präfix verwendet, wird nun auch korrekt verarbeitet
+ (siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=19).
+
+- Wird eine Enveloped Signature erzeugt, wird nun das korrekte XML-Dokument mit der
+ erzeugten Signatur in der Antwort zurückgeliefert
+ (siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=12).
+
+- WSDL-File, das über die URI <MOA-SPSS-Basis-URL>/services/SignatureCreation?wsdl
+ bzw. <MOA-SPSS-Basis-URL>/services/SignatureVerification?wsdl abgefragt werden
+ kann, ist nun aktuell (MOA-SPSS-Schema 1.1) und enthält einen korrekten Verweis
+ auf das MOA-SPSS-Schema 1.1
+ (siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=6).
+
+- Problem mit Auflösung von LDAP-URLs beim Einsatz als Webservice in Tomcat behoben.
+ (siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=2).
+
+- Bei der Prüfung auf Security-Layer-Konformität wird nun das korrekte Resultat
+ zurückgeliefert, wenn die Signatur keine impliziten Transformationsparameter
+ enthält
+ (siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=3).
+
+- Unterstützung anderer Datenbanken als postgreSQL und mySQL für das CRL-Archiv
+ (siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=7).
+
+- Diverse Fehler in der Dokumentation beseitigt
+ (siehe https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=8,
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=9,
+ https://forge.cio.gv.at/bugzilla/show_bug.cgi?id=29).
+
+##############
+1.0.9
+##############
+
+- Erste öffentliche Release
diff --git a/spss/server/pom.xml b/spss/server/pom.xml
new file mode 100644
index 000000000..a78496017
--- /dev/null
+++ b/spss/server/pom.xml
@@ -0,0 +1,26 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>MOA</groupId>
+ <artifactId>spss</artifactId>
+ <version>1.5.x</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>MOA.spss</groupId>
+ <artifactId>moa-spss</artifactId>
+ <packaging>pom</packaging>
+ <version>1.5.x</version>
+ <name>MOA SP/SS Server</name>
+
+ <modules>
+ <module>tools</module>
+ <module>serverlib</module>
+ <module>serverws</module>
+ </modules>
+
+ <properties>
+ <repositoryPath>${basedir}/../../repository</repositoryPath>
+ </properties>
+
+</project>
diff --git a/spss/server/readme.inst.txt b/spss/server/readme.inst.txt
new file mode 100644
index 000000000..82e061dbb
--- /dev/null
+++ b/spss/server/readme.inst.txt
@@ -0,0 +1,56 @@
+Willkommen zur Installation von MOA SP/SS!
+
+Für eine Anleitung zur Installation verwenden Sie bitte das
+Installationshandbuch "handbook.html" im Verzeichnis "doc" dieser
+Distribution.
+
+BEVOR SIE STARTEN BEACHTEN SIE BITTE FOLGENDE HINWEISE ZUR
+LIZENSIERUNG VON MOA SP/SS SOWIE DER VON IHM VERWENDETEN
+BIBLIOTHEKEN:
+
+1. MOA SP/SS selbst ist freie Software und wird von Bundeskanzler-
+ amt und Bundesministerium für Finanzen zu den Bedingungen der
+ Apache 2.0 Lizenz zur Verfügung gestellt. Eine Kopie dieser
+ Lizenz finden Sie in der Datei "Apache-2.0.txt" im Verzeichnis
+ "licenses" dieser Distribution.
+
+2. MOA SP/SS verwendet Kryptographie-Biliotheken, deren Rechte bei
+ der Stiftung Secure Information and Communication Technologies
+ (http://jcewww.iaik.tugraz.at) liegen. Für diese Kryptographie-
+ Bibliotheken besteht folgende Situation:
+
+ Stiftung SIC gewährt dem Lizenznehmer eine nicht-exklusive,
+ nicht-übertragbare Runtime Lizenz für die "IAIK MOA" Module
+ im Kontext von MOA SP/SS und MOA ID. Alle Versuche, Teile oder
+ die kompletten IAIK Crypto Toolkits, die zusammen mit dem MOA
+ Produktbündel ausgeliefert werden, für andere Zwecke als jenem
+ für Applikationen im MOA Kontext zu verwenden, sind nicht erlaubt.
+ Auch weitere Versuche, die sich auf die Entwicklung von Anwendungen,
+ oder aber darüber hinaus auf die Schaffung eines eigenen Toolkits,
+ oder die Aufnahme in ein weiters weiteres Toolkit beziehen, sind
+ nicht erlaubt. Die hier beschriebene Runtime Lizenz ist nicht
+ übertragbar auf weitere Vertragspartner des Kunden, Personen,
+ Organisationen oder Unternehmen außerhalb der Organisation des
+ Lizenznehmers.
+
+3. MOA SP/SS verwendet folgende weitere Bibliotheken, die allesamt
+ freie Software und in dieser Distribution bereits enthalten
+ sind. Es gelten jedoch unterschiedliche Lizenzbedingungen:
+
+ * Die Produkte Xerces Java 2, Xalan Java 2, Axis, Commons
+ und Log4J werden von der Apache Software Foundation zu den
+ Bedingungen der Apache 2.0 Lizenz zur Verfügung gestellt.
+ Eine Kopie dieser Lizenz finden Sie in der Datei
+ "Apache-2.0.txt" im Verzeichnis "licenses" dieser
+ Distribution.
+
+ * Das Produkt Jaxen wird von The Werken Company zu den Bedin-
+ gungen einer BSD-ähnlichen Lizenz zur Verfügung gestellt.
+ Eine Kopie dieser Lizenz finden Sie in der Datei "Jaxen.txt"
+ im Verzeichnis "licenses" dieser Distribution.
+
+ * Das Produkt PostgreSQL JDBC Driver wird von PostgreSQL Global
+ Development Group zu den Bedingungen einer BSD-ähnlichen
+ Lizenz zur Verfügung gestellt. Eine Kopie dieser Lizenz finden
+ Sie in der Datei "PostgreSQL-JDBC.txt" im Verzeichnis
+ "licenses" dieser Distribution. \ No newline at end of file
diff --git a/spss/server/readme.update.txt b/spss/server/readme.update.txt
new file mode 100644
index 000000000..703de0dc0
--- /dev/null
+++ b/spss/server/readme.update.txt
@@ -0,0 +1,133 @@
+
+======================================================================
+ Update einer bestehenden MOA-SPSS-Installation auf Version 1.5.0
+======================================================================
+
+Es gibt zwei Möglichkeiten (im Folgenden als "Update Variante A" und
+"Update Variante B" bezeichnet), das Update von MOA-SPSS auf Version
+1.5.0 durchzuführen. Update Variante A geht dabei den Weg über eine
+vorangestellte Neuinstallation, während Variante B direkt eine
+bestehende Installation aktualisiert.
+
+Folgende Begriffe werden verwendet:
+
+JAVA_HOME bezeichnet das Wurzelverzeichnis der JDK-Installation
+
+CATALINA_HOME bezeichnet das Wurzelverzeichnis der Tomcat-Installation
+
+MOA_SPSS_INST bezeichnet das Verzeichnis, in das Sie die Datei
+moa-spss-1.5.0.zip entpackt haben.
+
+=================
+Update Variante A
+=================
+
+1.) Erstellen Sie eine Sicherungskopie des kompletten Tomcat-Verzeichnisses
+ Ihrer MOA-SPSS-Installation.
+
+2.) Erstellen Sie eine Sicherungskopie aller "iaik*.jar"-Dateien im Verzeichnis
+ JAVA_HOME\jre\lib\ext, und löschen Sie diese Dateien danach.
+
+3.) Führen Sie eine Neuinstallation gemäß Handbuch durch.
+
+4.) Kopieren Sie etwaige Konfigurationsdateien, Trust-Profile und Key-Stores,
+ die Sie aus Ihrer alten Installation beibehalten möchten, aus Ihrer
+ Sicherungskopie in die entsprechenden Verzeichnisse der neuen
+ Installation.
+ Anmerkung: Falls Sie Ihre alten Trustprofile beibehalten wollen, gehen Sie wie unter
+ Update Variante B, Punkt 9 beschrieben vor, um Ihre alten Trustprofile
+ auf einen aktuellen Stand zu bringen.
+
+5.) Nur wenn alte Installation älter als Version 1.3.0:
+ Falls Sie Ihre alte MOA-SP Konfigurationsdatei weiterverwenden wollen:
+ Seit dem Wechsel auf Version 1.3.1 verwendet MOA SP ein neues Format für die
+ XML-Konfigurationsdatei. Sie müssen die Konfigurationsdatei für MOA-SP aus
+ Ihrer alten Installation auf das neue Format konvertieren.
+ Details dazufinden Sie im MOA-SPSS-Installationshandbuch.
+
+
+=================
+Update Variante B
+=================
+
+1.) Erstellen Sie eine Sicherungskopie des kompletten Tomcat-Verzeichnisses
+ Ihrer MOA-SPSS-Installation.
+
+2.) Entpacken Sie die Datei "moa-spss-1.5.0.zip" in das Verzeichnis MOA_SPSS_INST.
+
+3.) Erstellen Sie eine Sicherungskopie aller "iaik*.jar"-Dateien im Verzeichnis
+ JAVA_HOME\jre\lib\ext und löschen Sie diese Dateien danach.
+
+4.) Kopieren Sie alle Dateien aus dem Verzeichnis MOA_SPSS_INST\ext in das
+ Verzeichnis JAVA_HOME\jre\lib\ext (Achtung: Java 1.3.x wird nicht mehr
+ unterstützt).
+
+5.) Kopieren Sie die Dateien aus dem Verzeichnis MOA_SPSS_INST\endorsed
+ in das Verzeichnis CATALINA_HOME\common\endorsed. Überschreiben Sie dabei
+ etwaige gleichnamige Dateien. Die dort eventuell vorhandene Datei
+ xmlParserAPIs.jar ist zu löschen.
+
+6.) Löschen Sie das Verzeichnis CATALINA_HOME\webapps\moa-spss.
+
+7.) Ersetzen Sie die Datei CATALINA_HOME\webapps\moa-spss.war durch die Datei
+ MOA_SPSS_INST\moa-spss.war.
+
+8.) Löschen Sie das Verzeichnis CATALINA_HOME\work.
+
+9.) Update der Trust-Profile.
+ Wenn Sie Ihre alten Trust-Profile durch die neuen ersetzen wollen, dann gehen
+ Sie vor, wie in Punkt a). Wenn Sie Ihre eigenen Trust-Profile beibehalten wollen,
+ dann gehen Sie vor, wie in Punkt b).
+
+ a) Gehen Sie wie folgt vor, um die Trust-Profile auszutauschen:
+
+ 1) Löschen Sie das Verzeichnis CATALINA_HOME\conf\moa-spss\trustProfiles.
+ 2) Kopieren Sie das Verzeichnis MOA_SPSS_INST\conf\moa-spss\trustProfiles
+ in das Verzeichnis CATALINA_HOME\conf\moa-spss.
+
+ b) Falls Sie Ihre alten Trust-Profile beibehalten wollen, gehen Sie wie folgt vor,
+ um die Profile auf den aktuellen Stand zu bringen:
+
+ 1) Löschen Sie die Datei "C=AT,O=Hauptverband oesterr. Sozialvers.,CN=CRL-Signer.der"
+ aus jedem Trustprofil, in dem sie enthalten ist.
+
+ 2) Löschen Sie die Datei "OCSP Responder 02-20051027-20101027.der" aus jedem
+ Trustprofil, in dem sie enthalten ist.
+
+ 7) Ergänzen Sie ihre Trustprofile durch alle Zertifikate aus den entsprechenden Profilen
+ im Verzeichnis MOA_SPSS_INST\conf\moa-spss\trustProfiles, die nicht in Ihren
+ Profilen enthalten sind. Am einfachsten ist es, wenn Sie den Inhalt der einzelnen Profile
+ aus der Distribution (MOA_SPSS_INST\conf\moa-spss\trustProfiles) in die entsprechenden
+ Profile Ihrer Installation (CATALINA_HOME\conf\moa-spss\trustProfiles) kopieren und
+ dabei die vorhandenen gleichnamigen Zertifikate überschreiben), also z.B:
+
+ Kopieren des Inhalts von
+ MOA_SPSS_INST\conf\moa-spss\trustProfiles\certifiedSignature
+ nach
+ CATALINA_HOME\conf\moa-spss\trustProfiles\certifiedSignature
+ usw.
+
+10.) Update des Cert-Stores.
+ a) Kopieren Sie den Inhalt des Verzeichnisses MOA_SPSS_INST\conf\moa-spss\certstore
+ in das Verzeichnis CATALINA_HOME\conf\moa-spss\certstore. Wenn Sie gefragt werden, ob Sie
+ vorhandene Dateien oder Unterverzeichnisse überschreiben sollen, dann bejahen Sie das.
+
+ b) Falls vorhanden, löschen Sie die Datei "890A4C8282E95EBB398685D9501486EF213941B5" aus dem
+ Verzeichnis CATALINA_HOME\conf\moa-spss\certstore\10F17BDACD8DEAA1E8F23FBEAE7B3EC3D9773D1D.
+
+ c) Falls die Datei "E7340D1FB627D8917A9C0D23F21515C441BF1214" noch nicht im Verzeichnis
+ CATALINA_HOME\conf\moa-spss\certstore\10F17BDACD8DEAA1E8F23FBEAE7B3EC3D9773D1D
+ enthalten ist, dann kopieren Sie diese Datei aus dem Verzeichnis
+ MOA_ID_INST_AUTH\conf\moa-spss\certstore\10F17BDACD8DEAA1E8F23FBEAE7B3EC3D9773D1D
+ in das Verzeichnis
+ CATALINA_HOME\conf\moa-spss\certstore\10F17BDACD8DEAA1E8F23FBEAE7B3EC3D9773D1D.
+
+11.) Nur wenn alte Installation älter als Version 1.3.0:
+ Mit dem Wechsel auf Version 1.3.0 verwendet MOA SP ein neues Format für die
+ XML-Konfigurationsdatei. Sie müssen die Konfigurationsdatei für MOA-SP aus
+ Ihrer alten Installation auf das neue Format konvertieren. Details dazu
+ finden Sie im MOA-SPSS-Installationshandbuch.
+
+
+
+
diff --git a/spss/server/serverlib/.classpath b/spss/server/serverlib/.classpath
new file mode 100644
index 000000000..1c79cc393
--- /dev/null
+++ b/spss/server/serverlib/.classpath
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/spss/server/serverlib/.project b/spss/server/serverlib/.project
new file mode 100644
index 000000000..973671634
--- /dev/null
+++ b/spss/server/serverlib/.project
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>moa-spss-lib</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ </natures>
+</projectDescription>
diff --git a/spss/server/serverlib/.settings/org.eclipse.jdt.core.prefs b/spss/server/serverlib/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..c7b8a7c31
--- /dev/null
+++ b/spss/server/serverlib/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Wed Oct 10 21:50:15 CEST 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
+org.eclipse.jdt.core.compiler.source=1.4
diff --git a/spss/server/serverlib/.settings/org.eclipse.wst.common.component b/spss/server/serverlib/.settings/org.eclipse.wst.common.component
new file mode 100644
index 000000000..e4ceae723
--- /dev/null
+++ b/spss/server/serverlib/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+<wb-module deploy-name="moa-spss-lib">
+<wb-resource deploy-path="/" source-path="/src/main/java"/>
+<wb-resource deploy-path="/" source-path="/src/main/resources"/>
+</wb-module>
+</project-modules>
diff --git a/spss/server/serverlib/.settings/org.eclipse.wst.common.project.facet.core.xml b/spss/server/serverlib/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 000000000..30c02fe23
--- /dev/null
+++ b/spss/server/serverlib/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <fixed facet="jst.java"/>
+ <fixed facet="jst.utility"/>
+ <installed facet="jst.java" version="1.4"/>
+ <installed facet="jst.utility" version="1.0"/>
+</faceted-project>
diff --git a/spss/server/serverlib/.settings/org.maven.ide.eclipse.prefs b/spss/server/serverlib/.settings/org.maven.ide.eclipse.prefs
new file mode 100644
index 000000000..373d31d5c
--- /dev/null
+++ b/spss/server/serverlib/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,9 @@
+#Tue Jul 07 16:06:50 CEST 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
diff --git a/spss/server/serverlib/pom.xml b/spss/server/serverlib/pom.xml
new file mode 100644
index 000000000..555376fe0
--- /dev/null
+++ b/spss/server/serverlib/pom.xml
@@ -0,0 +1,245 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>MOA.spss</groupId>
+ <artifactId>moa-spss</artifactId>
+ <version>1.5.x</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>MOA.spss.server</groupId>
+ <artifactId>moa-spss-lib</artifactId>
+ <packaging>jar</packaging>
+ <version>1.5.0</version>
+ <name>MOA SP/SS API</name>
+
+ <properties>
+ <repositoryPath>${basedir}/../../../repository</repositoryPath>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>axis</groupId>
+ <artifactId>axis</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>axis</groupId>
+ <artifactId>axis-jaxrpc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>axis</groupId>
+ <artifactId>axis-saaj</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>axis</groupId>
+ <artifactId>axis-wsdl4j</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-discovery</groupId>
+ <artifactId>commons-discovery</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.activation</groupId>
+ <artifactId>activation</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>xalan</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>xml-apis</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>serializer</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_moa</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_ixsil</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_jce_full</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_ecc</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_cms</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Provider</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Wrapper</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Wrapper</artifactId>
+ <classifier>win32</classifier>
+ <type>dll</type>
+ <scope>runtime</scope>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>MOA</groupId>
+ <artifactId>moa-common</artifactId>
+ <type>jar</type>
+ </dependency>
+
+ <dependency>
+ <groupId>MOA</groupId>
+ <artifactId>moa-common</artifactId>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>MOA.spss.server</groupId>
+ <artifactId>moa-spss-tools</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <addMavenDescriptor>false</addMavenDescriptor>
+ </archive>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.2</version>
+ <configuration>
+ <quiet>true</quiet>
+ <author>false</author>
+ <version>false</version>
+ <use>true</use>
+ <excludePackageNames>at.gv.egovernment.moa.spss.server.*;at.gv.egovernment.moa.spss.api.impl.*;at.gv.egovernment.moa.spss.impl.*</excludePackageNames>
+ <tags>
+ <tag>
+ <name>pre</name>
+ <placement>a</placement>
+ <head>Preconditions:</head>
+ </tag>
+ <tag>
+ <name>post</name>
+ <placement>a</placement>
+ <head>Postconditions:</head>
+ </tag>
+ </tags>
+ <groups>
+ <group>
+ <title>API Factory and Services</title>
+ <packages>at.gv.egovernment.moa.spss.api</packages>
+ </group>
+ <group>
+ <title>Exceptions</title>
+ <packages>at.gv.egovernment.moa.spss</packages>
+ </group>
+ <group>
+ <title>API Objects for Signature Creation</title>
+ <packages>at.gv.egovernment.moa.spss.api.xmlsign</packages>
+ </group>
+ <group>
+ <title>API Objects for CMS Signature Verification</title>
+ <packages>at.gv.egovernment.moa.spss.api.cmsverify</packages>
+ </group>
+ <group>
+ <title>API Objects for XML Signature Verification</title>
+ <packages>at.gv.egovernment.moa.spss.api.xmlverify</packages>
+ </group>
+ <group>
+ <title>Common API Objects</title>
+ <packages>at.gv.egovernment.moa.spss.api.common</packages>
+ </group>
+ <group>
+ <title>Builders and Parsers to convert API Objects to and from XML</title>
+ <packages>at.gv.egovernment.moa.spss.api.xmlbind</packages>
+ </group>
+ <group>
+ <title>Utilities</title>
+ <packages>at.gv.egovernment.moa.util</packages>
+ <packages>at.gv.egovernment.moa.spss.util</packages>
+ </group>
+ <group>
+ <title>Logging</title>
+ <packages>at.gv.egovernment.moa.logging</packages>
+ </group>
+ </groups>
+ <links>
+ <link>http://java.sun.com/j2se/1.4/docs/api/</link>
+ <link>http://java.sun.com/j2se/1.5.0/docs/api/</link>
+ <link>http://logging.apache.org/log4j/docs/api/</link>
+ </links>
+ <target>1.4</target>
+ </configuration>
+ <executions>
+ <execution>
+ <id>generate-javadoc</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/spss/server/serverlib/resources/data/deploy/tomcat/server.mod_jk.xml b/spss/server/serverlib/resources/data/deploy/tomcat/server.mod_jk.xml
new file mode 100644
index 000000000..e6035b8be
--- /dev/null
+++ b/spss/server/serverlib/resources/data/deploy/tomcat/server.mod_jk.xml
@@ -0,0 +1,166 @@
+<!-- Alternate Example-less Configuration File -->
+<!-- Note that component elements are nested corresponding to their
+ parent-child relationships with each other -->
+
+<!-- A "Server" is a singleton element that represents the entire JVM,
+ which may contain one or more "Service" instances. The Server
+ listens for a shutdown command on the indicated port.
+
+ Note: A "Server" is not itself a "Container", so you may not
+ define subcomponents such as "Valves" or "Loggers" at this level.
+ -->
+
+<Server port="8005" shutdown="SHUTDOWN" debug="0">
+
+
+ <!-- Uncomment this entry to enable JMX MBeans support -->
+<!--
+ <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
+ debug="0" port="-1" login="admin" password="admin"/>
+-->
+
+
+ <!-- A "Service" is a collection of one or more "Connectors" that share
+ a single "Container" (and therefore the web applications visible
+ within that Container). Normally, that Container is an "Engine",
+ but this is not required.
+
+ Note: A "Service" is not itself a "Container", so you may not
+ define subcomponents such as "Valves" or "Loggers" at this level.
+ -->
+
+ <!-- Define the Tomcat Stand-Alone Service -->
+ <Service name="Tomcat-Standalone">
+
+ <!-- A "Connector" represents an endpoint by which requests are received
+ and responses are returned. Each Connector passes requests on to the
+ associated "Container" (normally an Engine) for processing.
+
+ By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
+ You can also enable an SSL HTTP/1.1 Connector on port 8443 by
+ following the instructions below and uncommenting the second Connector
+ entry. SSL support requires the following steps (see the SSL Config
+ HOWTO in the Tomcat 4.0 documentation bundle for more detailed
+ instructions):
+ * Download and install JSSE 1.0.2 or later, and put the JAR files
+ into "$JAVA_HOME/jre/lib/ext".
+ * Execute:
+ %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
+ $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix)
+ with a password value of "changeit" for both the certificate and
+ the keystore itself.
+
+ By default, DNS lookups are enabled when a web application calls
+ request.getRemoteHost(). This can have an adverse impact on
+ performance, so you can disable it by setting the
+ "enableLookups" attribute to "false". When DNS lookups are disabled,
+ request.getRemoteHost() will return the String version of the
+ IP address of the remote client.
+ -->
+
+ <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
+ <!--
+ <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
+ port="8009" minProcessors="5" maxProcessors="75"
+ enableLookups="true" redirectPort="8443"
+ acceptCount="10" debug="0" connectionTimeout="0"
+ useURIValidationHack="false"
+ protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>
+ -->
+
+ <!-- Define an AJP 1.3 Connector on port 8009 -->
+ <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
+ port="8009" minProcessors="5" maxProcessors="75"
+ acceptCount="10" debug="0"/>
+
+ <!-- An Engine represents the entry point (within Catalina) that processes
+ every request. The Engine implementation for Tomcat stand alone
+ analyzes the HTTP headers included with the request, and passes them
+ on to the appropriate Host (virtual host). -->
+
+ <!-- Define the top level container in our container hierarchy -->
+ <Engine name="Standalone" defaultHost="localhost" debug="0">
+
+ <!-- The request dumper valve dumps useful debugging information about
+ the request headers and cookies that were received, and the response
+ headers and cookies that were sent, for all requests received by
+ this instance of Tomcat. If you care only about requests to a
+ particular virtual host, or a particular application, nest this
+ element inside the corresponding <Host> or <Context> entry instead.
+
+ For a similar mechanism that is portable to all Servlet 2.3
+ containers, check out the "RequestDumperFilter" Filter in the
+ example application (the source for this filter may be found in
+ "$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").
+
+ Request dumping is disabled by default. Uncomment the following
+ element to enable it. -->
+ <!--
+ <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
+ -->
+
+ <!-- Global logger unless overridden at lower levels -->
+ <Logger className="org.apache.catalina.logger.FileLogger"
+ prefix="catalina_log." suffix=".txt"
+ timestamp="true"/>
+
+ <!-- Because this Realm is here, an instance will be shared globally -->
+
+ <Realm className="org.apache.catalina.realm.MemoryRealm" />
+
+ <!-- Replace the above Realm with one of the following to get a Realm
+ stored in a database and accessed via JDBC -->
+
+ <!-- Define the default virtual host -->
+ <Host name="localhost" debug="0" appBase="webapps"
+ unpackWARs="true" autoDeploy="true">
+
+ <!-- Normally, users must authenticate themselves to each web app
+ individually. Uncomment the following entry if you would like
+ a user to be authenticated the first time they encounter a
+ resource protected by a security constraint, and then have that
+ user identity maintained across *all* web applications contained
+ in this virtual host. -->
+ <!--
+ <Valve className="org.apache.catalina.authenticator.SingleSignOn"
+ debug="0"/>
+ -->
+
+ <!-- Access log processes all requests for this virtual host. By
+ default, log files are created in the "logs" directory relative to
+ $CATALINA_HOME. If you wish, you can specify a different
+ directory with the "directory" attribute. Specify either a relative
+ (to $CATALINA_HOME) or absolute path to the desired directory.
+ -->
+ <Valve className="org.apache.catalina.valves.AccessLogValve"
+ directory="logs" prefix="localhost_access_log." suffix=".txt"
+ pattern="common"/>
+
+ <!-- Logger shared by all Contexts related to this virtual host. By
+ default (when using FileLogger), log files are created in the "logs"
+ directory relative to $CATALINA_HOME. If you wish, you can specify
+ a different directory with the "directory" attribute. Specify either a
+ relative (to $CATALINA_HOME) or absolute path to the desired
+ directory.-->
+ <Logger className="org.apache.catalina.logger.FileLogger"
+ directory="logs" prefix="localhost_log." suffix=".txt"
+ timestamp="true"/>
+
+ <!-- Define properties for each web application. This is only needed
+ if you want to set non-default properties, or have web application
+ document roots in places other than the virtual host's appBase
+ directory. -->
+
+ <!-- Tomcat Root Context -->
+ <!--
+ <Context path="" docBase="ROOT" debug="0"/>
+ -->
+
+ </Host>
+
+ </Engine>
+
+ </Service>
+
+</Server>
+
diff --git a/spss/server/serverlib/resources/data/deploy/tomcat/server.xml b/spss/server/serverlib/resources/data/deploy/tomcat/server.xml
new file mode 100644
index 000000000..3e5966ca9
--- /dev/null
+++ b/spss/server/serverlib/resources/data/deploy/tomcat/server.xml
@@ -0,0 +1,169 @@
+<!-- Alternate Example-less Configuration File -->
+<!-- Note that component elements are nested corresponding to their
+ parent-child relationships with each other -->
+
+<!-- A "Server" is a singleton element that represents the entire JVM,
+ which may contain one or more "Service" instances. The Server
+ listens for a shutdown command on the indicated port.
+
+ Note: A "Server" is not itself a "Container", so you may not
+ define subcomponents such as "Valves" or "Loggers" at this level.
+ -->
+
+<Server port="8005" shutdown="SHUTDOWN" debug="0">
+
+
+ <!-- Uncomment this entry to enable JMX MBeans support -->
+<!--
+ <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
+ debug="0" port="-1" login="admin" password="admin"/>
+-->
+
+
+ <!-- A "Service" is a collection of one or more "Connectors" that share
+ a single "Container" (and therefore the web applications visible
+ within that Container). Normally, that Container is an "Engine",
+ but this is not required.
+
+ Note: A "Service" is not itself a "Container", so you may not
+ define subcomponents such as "Valves" or "Loggers" at this level.
+ -->
+
+ <!-- Define the Tomcat Stand-Alone Service -->
+ <Service name="Tomcat-Standalone">
+
+ <!-- A "Connector" represents an endpoint by which requests are received
+ and responses are returned. Each Connector passes requests on to the
+ associated "Container" (normally an Engine) for processing.
+
+ By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
+ You can also enable an SSL HTTP/1.1 Connector on port 8443 by
+ following the instructions below and uncommenting the second Connector
+ entry. SSL support requires the following steps (see the SSL Config
+ HOWTO in the Tomcat 4.0 documentation bundle for more detailed
+ instructions):
+ * Download and install JSSE 1.0.2 or later, and put the JAR files
+ into "$JAVA_HOME/jre/lib/ext".
+ * Execute:
+ %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
+ $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix)
+ with a password value of "changeit" for both the certificate and
+ the keystore itself.
+
+ By default, DNS lookups are enabled when a web application calls
+ request.getRemoteHost(). This can have an adverse impact on
+ performance, so you can disable it by setting the
+ "enableLookups" attribute to "false". When DNS lookups are disabled,
+ request.getRemoteHost() will return the String version of the
+ IP address of the remote client.
+ -->
+
+ <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
+ <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
+ port="8080" minProcessors="5" maxProcessors="75"
+ enableLookups="true" redirectPort="8443"
+ acceptCount="100" debug="0" connectionTimeout="20000"
+ useURIValidationHack="false" disableUploadTimeout="true" />
+ <!-- Note : To disable connection timeouts, set connectionTimeout value
+ to -1 -->
+
+ <!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
+ <!--
+ <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
+ port="8443" minProcessors="5" maxProcessors="75"
+ enableLookups="uri"
+ acceptCount="100" debug="0" scheme="https" secure="true"
+ useURIValidationHack="false" disableUploadTimeout="true">
+ <Factory className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory"
+ clientAuth="false" protocol="TLS"/>
+ </Connector>
+ -->
+
+ <!-- An Engine represents the entry point (within Catalina) that processes
+ every request. The Engine implementation for Tomcat stand alone
+ analyzes the HTTP headers included with the request, and passes them
+ on to the appropriate Host (virtual host). -->
+
+ <!-- Define the top level container in our container hierarchy -->
+ <Engine name="Standalone" defaultHost="localhost" debug="0">
+
+ <!-- The request dumper valve dumps useful debugging information about
+ the request headers and cookies that were received, and the response
+ headers and cookies that were sent, for all requests received by
+ this instance of Tomcat. If you care only about requests to a
+ particular virtual host, or a particular application, nest this
+ element inside the corresponding <Host> or <Context> entry instead.
+
+ For a similar mechanism that is portable to all Servlet 2.3
+ containers, check out the "RequestDumperFilter" Filter in the
+ example application (the source for this filter may be found in
+ "$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").
+
+ Request dumping is disabled by default. Uncomment the following
+ element to enable it. -->
+ <!--
+ <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
+ -->
+
+ <!-- Global logger unless overridden at lower levels -->
+ <Logger className="org.apache.catalina.logger.FileLogger"
+ prefix="catalina_log." suffix=".txt"
+ timestamp="true"/>
+
+ <!-- Because this Realm is here, an instance will be shared globally -->
+
+ <Realm className="org.apache.catalina.realm.MemoryRealm" />
+
+ <!-- Define the default virtual host -->
+ <Host name="localhost" debug="0" appBase="webapps"
+ unpackWARs="true" autoDeploy="true">
+
+ <!-- Normally, users must authenticate themselves to each web app
+ individually. Uncomment the following entry if you would like
+ a user to be authenticated the first time they encounter a
+ resource protected by a security constraint, and then have that
+ user identity maintained across *all* web applications contained
+ in this virtual host. -->
+ <!--
+ <Valve className="org.apache.catalina.authenticator.SingleSignOn"
+ debug="0"/>
+ -->
+
+ <!-- Access log processes all requests for this virtual host. By
+ default, log files are created in the "logs" directory relative to
+ $CATALINA_HOME. If you wish, you can specify a different
+ directory with the "directory" attribute. Specify either a relative
+ (to $CATALINA_HOME) or absolute path to the desired directory.
+ -->
+ <Valve className="org.apache.catalina.valves.AccessLogValve"
+ directory="logs" prefix="localhost_access_log." suffix=".txt"
+ pattern="common"/>
+
+ <!-- Logger shared by all Contexts related to this virtual host. By
+ default (when using FileLogger), log files are created in the "logs"
+ directory relative to $CATALINA_HOME. If you wish, you can specify
+ a different directory with the "directory" attribute. Specify either a
+ relative (to $CATALINA_HOME) or absolute path to the desired
+ directory.-->
+ <Logger className="org.apache.catalina.logger.FileLogger"
+ directory="logs" prefix="localhost_log." suffix=".txt"
+ timestamp="true"/>
+
+ <!-- Define properties for each web application. This is only needed
+ if you want to set non-default properties, or have web application
+ document roots in places other than the virtual host's appBase
+ directory. -->
+
+ <!-- Tomcat Root Context -->
+ <!--
+ <Context path="" docBase="ROOT" debug="0"/>
+ -->
+
+ </Host>
+
+ </Engine>
+
+ </Service>
+
+</Server>
+
diff --git a/spss/server/serverlib/resources/data/deploy/tomcat/unix/moa-env.sh b/spss/server/serverlib/resources/data/deploy/tomcat/unix/moa-env.sh
new file mode 100644
index 000000000..49d6723a3
--- /dev/null
+++ b/spss/server/serverlib/resources/data/deploy/tomcat/unix/moa-env.sh
@@ -0,0 +1,12 @@
+MOA_START=`pwd`
+
+CONFIG_OPT=-Dmoa.spss.server.configuration=$MOA_START/conf/moa-spss/spss.config.xml
+LOGGING_OPT=-Dlog4j.configuration=file:$MOA_START/conf/moa-spss/log4j.properties
+# NODE_ID_OPT=-Dmoa.node-id=node1
+# TRUST_STORE_OPT=-Djavax.net.ssl.trustStore=truststore.jks
+# TRUST_STORE_PASS_OPT=-Djavax.net.ssl.trustStorePassword=changeit
+# TRUST_STORE_TYPE_OPT=-Djavax.net.ssl.trustStoreType=jks
+
+export CATALINA_OPTS="$CONFIG_OPT $LOGGING_OPT $NODE_ID_OPT $TRUST_STORE_OPT $TRUST_STORE_PASS_OPT $TRUST_STORE_TYPE_OPT"
+
+echo CATALINA_OPTS=$CATALINA_OPTS
diff --git a/spss/server/serverlib/resources/data/deploy/tomcat/uriworkermap.properties b/spss/server/serverlib/resources/data/deploy/tomcat/uriworkermap.properties
new file mode 100644
index 000000000..673acf65d
--- /dev/null
+++ b/spss/server/serverlib/resources/data/deploy/tomcat/uriworkermap.properties
@@ -0,0 +1,4 @@
+# a sample mod_jk uriworkermap.properties file for mapping
+# MOA SP/SS web service requests to workers
+
+/moa-spss/*=moaworker \ No newline at end of file
diff --git a/spss/server/serverlib/resources/data/deploy/tomcat/win32/startTomcat.bat b/spss/server/serverlib/resources/data/deploy/tomcat/win32/startTomcat.bat
new file mode 100644
index 000000000..b7d740d12
--- /dev/null
+++ b/spss/server/serverlib/resources/data/deploy/tomcat/win32/startTomcat.bat
@@ -0,0 +1,27 @@
+rem ----------------------------------------------------------------------------------------------
+rem Modify these entries according to your needs
+
+rem JDK home directory (no trailing path separator)
+set JAVA_HOME=<jdk home directory>
+
+rem Tomcat 4.1.x home directory (no trailing path separator)
+set CATALINA_HOME=<Tomcat 4.1.x home directory>
+
+rem ----------------------------------------------------------------------------------------------
+
+set MOA_SPSS_CFG_HOME=%CATALINA_HOME%\conf\moa-spss
+
+set PARAM_SPSSCONFIG=-Dmoa.spss.server.configuration=%MOA_SPSS_CFG_HOME%\spss.config.xml
+set PARAM_LOGGING=-Dlog4j.configuration=file:%MOA_SPSS_CFG_HOME%\log4j.properties
+set PARAM_NODEID=-Dmoa.node-id=Node1
+set PARAMS_MOA=%PARAM_SPSSCONFIG% %PARAM_LOGGING% %PARAM_NODEID%
+
+rem set PARAM_TRUST_STORE=-Djavax.net.ssl.trustStore=truststore.jks
+rem set PARAM_TRUST_STORE_PASS=-Djavax.net.ssl.trustStorePassword=changeit
+rem set PARAM_TRUST_STORE_TYPE=-Djavax.net.ssl.trustStoreType=jks
+rem set PARAMS_SSL=%PARAM_TRUST_STORE% %PARAM_TRUST_STORE_PASS% %PARAM_TRUST_STORE_TYPE%
+
+set CATALINA_OPTS=%PARAMS_MOA% %PARAMS_SSL%
+
+cd %CATALINA_HOME%
+bin\catalina.bat start \ No newline at end of file
diff --git a/spss/server/serverlib/resources/data/deploy/tomcat/win32/stopTomcat.bat b/spss/server/serverlib/resources/data/deploy/tomcat/win32/stopTomcat.bat
new file mode 100644
index 000000000..09dd83f2d
--- /dev/null
+++ b/spss/server/serverlib/resources/data/deploy/tomcat/win32/stopTomcat.bat
@@ -0,0 +1,13 @@
+rem ----------------------------------------------------------------------------------------------
+rem Modify these entries according to your needs
+
+rem JDK home directory (no trailing path separator)
+set JAVA_HOME=<jdk home directory>
+
+rem Tomcat 4.1.x home directory (no trailing path separator)
+set CATALINA_HOME=<Tomcat 4.1.x home directory>
+
+rem ----------------------------------------------------------------------------------------------
+
+cd %CATALINA_HOME%
+bin\catalina.bat stop \ No newline at end of file
diff --git a/spss/server/serverlib/resources/data/deploy/tomcat/workers.properties b/spss/server/serverlib/resources/data/deploy/tomcat/workers.properties
new file mode 100644
index 000000000..9350ddc77
--- /dev/null
+++ b/spss/server/serverlib/resources/data/deploy/tomcat/workers.properties
@@ -0,0 +1,6 @@
+# a sample workers.properties file defining a single mod_jk worker
+
+worker.list=moaworker
+worker.moaworker.type=ajp13
+worker.moaworker.host=localhost
+worker.moaworker.port=8009
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOAApplicationException.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOAApplicationException.java
new file mode 100644
index 000000000..a356e2dbd
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOAApplicationException.java
@@ -0,0 +1,56 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss;
+/**
+ * Base class of application specific MOA exceptions.
+ *
+ * Application exceptions are exceptions that originate from application
+ * code (e.g. inconsistent data provided by the user, no permission to access
+ * certain resources, etc.)
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class MOAApplicationException extends MOAException {
+
+ /**
+ * Create a new <code>MOAApplicationException</code>.
+ *
+ * @param messageId The identifier of the message associated with this
+ * exception.
+ * @param parameters Additional message parameters.
+ */
+ public MOAApplicationException(String messageId, Object[] parameters) {
+ super(messageId, parameters);
+ }
+
+ /**
+ * Create a new <code>MOAApplicationException</code>.
+ *
+ * @param messageId The identifier of the message associated with this
+ * <code>MOAApplicationException</code>.
+ * @param parameters Additional message parameters.
+ * @param wrapped The exception wrapped by this
+ * <code>MOAApplicationException</code>.
+ */
+ public MOAApplicationException(
+ String messageId,
+ Object[] parameters,
+ Throwable wrapped) {
+ super(messageId, parameters, wrapped);
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOAException.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOAException.java
new file mode 100644
index 000000000..160914fb3
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOAException.java
@@ -0,0 +1,176 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.util.Constants;
+
+import at.gv.egovernment.moa.spss.util.MessageProvider;
+
+/**
+ * Base class of MOA specific exceptions.
+ *
+ * This class has the ability to wrap other exceptions which may be seen
+ * as the root cause for this exception. A similar mechanism is in place
+ * since JDK1.4 (see the <code>getClause()</code> method) but will not be used
+ * because of required compatibility with JDK1.3.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public abstract class MOAException extends Exception {
+ /** The message ID. */
+ private String messageId;
+ /** The wrapped <code>Throwable</code>. */
+ private Throwable wrapped;
+
+ /**
+ * Create a <code>MOAException</code>.
+ *
+ * @param messageId The message ID of the message contained in the created
+ * <code>MOAException</code>.
+ * @param parameters The parameters needed to fill in the message arguments.
+ */
+ public MOAException(String messageId, Object[] parameters) {
+ super(MessageProvider.getInstance().getMessage(messageId, parameters));
+ this.messageId = messageId;
+ }
+
+ /**
+ * Create a <code>MOAException</code>.
+ *
+ * @param messageId The message ID of the message contained in the created
+ * <code>MOAException</code>.
+ * @param parameters The parameters needed to fill in the message arguments.
+ * @param wrapped The exception wrapped by the created
+ * <code>MOAException</code>.
+ */
+ public MOAException(String messageId, Object[] parameters, Throwable wrapped) {
+
+ super(MessageProvider.getInstance().getMessage(messageId, parameters));
+ this.messageId = messageId;
+ this.wrapped = wrapped;
+ }
+
+ /**
+ * Returns the message ID of this exception.
+ *
+ * @return The message ID as provided in the constructor.
+ */
+ public String getMessageId() {
+ return messageId;
+ }
+
+ /**
+ * Returns the exception wrapped by this <code>MOAException</code>.
+ *
+ * @return The exception wrapped by this exception. Possibly
+ * <code>null</code>, if none was provided at construction time.
+ */
+ public Throwable getWrapped() {
+ return wrapped;
+ }
+
+ /**
+ * Convert this <code>MOAException</code> to an <code>ErrorResponse</code>
+ * element from the MOA namespace.
+ *
+ * @return An <code>ErrorResponse</code> element, containing the subelements
+ * <code>ErrorCode</code> and <code>Info</code> required by the MOA schema.
+ */
+ public Element toErrorResponse() {
+ DocumentBuilder builder;
+ DOMImplementation impl;
+ Document doc;
+ Element errorResponse;
+ Element errorCode;
+ Element info;
+
+ // create a new document
+ try {
+ builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ impl = builder.getDOMImplementation();
+ } catch (ParserConfigurationException e) {
+ return null;
+ }
+
+ // build the ErrorResponse element
+ doc = impl.createDocument(Constants.MOA_NS_URI, "ErrorResponse", null);
+ errorResponse = doc.getDocumentElement();
+
+ // add MOA namespace declaration
+ errorResponse.setAttributeNS(
+ Constants.XMLNS_NS_URI,
+ "xmlns",
+ Constants.MOA_NS_URI);
+
+ // build the child elements
+ errorCode = doc.createElementNS(Constants.MOA_NS_URI, "ErrorCode");
+ errorCode.appendChild(doc.createTextNode(messageId));
+ info = doc.createElementNS(Constants.MOA_NS_URI, "Info");
+ info.appendChild(doc.createTextNode(getMessage()));
+ errorResponse.appendChild(errorCode);
+ errorResponse.appendChild(info);
+ return errorResponse;
+ }
+
+ /**
+ * Print a stack trace of this exception to <code>System.err</code>.
+ *
+ * @see java.lang.Throwable#printStackTrace()
+ */
+ public void printStackTrace() {
+ printStackTrace(System.err);
+ }
+
+ /**
+ * Print a stack trace of this exception, including the wrapped exception.
+ *
+ * @param s The stream to write the stack trace to.
+ * @see java.lang.Throwable#printStackTrace(java.io.PrintStream)
+ */
+ public void printStackTrace(PrintStream s) {
+ super.printStackTrace(s);
+ if (getWrapped() != null) {
+ s.print("Caused by: ");
+ getWrapped().printStackTrace(s);
+ }
+ }
+
+ /**
+ * Print a stack trace of this exception, including the wrapped exception.
+ *
+ * @param s The stream to write the stacktrace to.
+ * @see java.lang.Throwable#printStackTrace(java.io.PrintWriter)
+ */
+ public void printStackTrace(PrintWriter s) {
+ super.printStackTrace(s);
+ if (getWrapped() != null) {
+ s.print("Caused by: ");
+ getWrapped().printStackTrace(s);
+ }
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOARuntimeException.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOARuntimeException.java
new file mode 100644
index 000000000..d1c02d1e7
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOARuntimeException.java
@@ -0,0 +1,178 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.spss.util.MessageProvider;
+import at.gv.egovernment.moa.util.Constants;
+
+/**
+ * Base class of MOA specific runtime exceptions.
+ *
+ * This class has the ability to wrap other exceptions which may be seen
+ * as the root cause for this exception. A similar mechanism is in place
+ * since JDK1.4 (see the <code>getClause()</code> method) but will not be used
+ * because of required compatibility with JDK1.3.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class MOARuntimeException extends RuntimeException {
+ /** The message ID. */
+ private String messageId;
+ /** The wrapped <code>Throwable</code>. */
+ private Throwable wrapped;
+
+ /**
+ * Create a <code>MOAException</code>.
+ *
+ * @param messageId The message ID of the message contained in the created
+ * <code>MOAException</code>.
+ * @param parameters The parameters needed to fill in the message arguments.
+ */
+ public MOARuntimeException(String messageId, Object[] parameters) {
+ super(MessageProvider.getInstance().getMessage(messageId, parameters));
+ this.messageId = messageId;
+ }
+
+ /**
+ * Create a <code>MOAException</code>.
+ *
+ * @param messageId The message ID of the message contained in the created
+ * <code>MOAException</code>.
+ * @param parameters The parameters needed to fill in the message arguments.
+ * @param wrapped The exception wrapped by the created
+ * <code>MOAException</code>.
+ */
+ public MOARuntimeException(
+ String messageId,
+ Object[] parameters,
+ Throwable wrapped) {
+
+ super(MessageProvider.getInstance().getMessage(messageId, parameters));
+ this.messageId = messageId;
+ this.wrapped = wrapped;
+ }
+
+ /**
+ * Returns the message ID of this exception.
+ *
+ * @return The message ID as provided in the constructor.
+ */
+ public String getMessageId() {
+ return messageId;
+ }
+
+ /**
+ * Returns the exception wrapped by this <code>MOARuntimeException</code>.
+ *
+ * @return The exception wrapped by this exception. Possibly
+ * <code>null</code>, if none was provided at construction time.
+ */
+ public Throwable getWrapped() {
+ return wrapped;
+ }
+
+ /**
+ * Convert this <code>MOARuntimeException</code> to an <code>ErrorResponse</code>
+ * element from the MOA namespace.
+ *
+ * @return An <code>ErrorResponse</code> element, containing the subelements
+ * <code>ErrorCode</code> and <code>Info</code> required by the MOA schema.
+ */
+ public Element toErrorResponse() {
+ DocumentBuilder builder;
+ DOMImplementation impl;
+ Document doc;
+ Element errorResponse;
+ Element errorCode;
+ Element info;
+
+ // create a new document
+ try {
+ builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ impl = builder.getDOMImplementation();
+ } catch (ParserConfigurationException e) {
+ return null;
+ }
+
+ // build the ErrorResponse element
+ doc = impl.createDocument(Constants.MOA_NS_URI, "ErrorResponse", null);
+ errorResponse = doc.getDocumentElement();
+
+ // add MOA namespace declaration
+ errorResponse.setAttributeNS(
+ Constants.XMLNS_NS_URI,
+ "xmlns",
+ Constants.MOA_NS_URI);
+
+ // build the child elements
+ errorCode = doc.createElementNS(Constants.MOA_NS_URI, "ErrorCode");
+ errorCode.appendChild(doc.createTextNode(messageId));
+ info = doc.createElementNS(Constants.MOA_NS_URI, "Info");
+ info.appendChild(doc.createTextNode(getMessage()));
+ errorResponse.appendChild(errorCode);
+ errorResponse.appendChild(info);
+ return errorResponse;
+ }
+
+ /**
+ * Print a stack trace of this exception to <code>System.err</code>.
+ *
+ * @see java.lang.Throwable#printStackTrace()
+ */
+ public void printStackTrace() {
+ printStackTrace(System.err);
+ }
+
+ /**
+ * Print a stack trace of this exception, including the wrapped exception.
+ *
+ * @param s The stream to write the stack trace to.
+ * @see java.lang.Throwable#printStackTrace(java.io.PrintStream)
+ */
+ public void printStackTrace(PrintStream s) {
+ super.printStackTrace(s);
+ if (getWrapped() != null) {
+ s.print("Caused by: ");
+ getWrapped().printStackTrace(s);
+ }
+ }
+
+ /**
+ * Print a stack trace of this exception, including the wrapped exception.
+ *
+ * @param s The stream to write the stacktrace to.
+ * @see java.lang.Throwable#printStackTrace(java.io.PrintWriter)
+ */
+ public void printStackTrace(PrintWriter s) {
+ super.printStackTrace(s);
+ if (getWrapped() != null) {
+ s.print("Caused by: ");
+ getWrapped().printStackTrace(s);
+ }
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOASystemException.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOASystemException.java
new file mode 100644
index 000000000..fd8178d26
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOASystemException.java
@@ -0,0 +1,55 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss;
+/**
+ * Base class of technical MOA exceptions.
+ *
+ * Technical exceptions are exceptions that originate from system failure (e.g.,
+ * a database connection fails, a component is not available, etc.)
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class MOASystemException extends MOAException {
+
+ /**
+ * Create a new <code>MOASystemException</code>.
+ *
+ * @param messageId The identifier of the message associated with this
+ * exception.
+ * @param parameters Additional message parameters.
+ */
+ public MOASystemException(String messageId, Object[] parameters) {
+ super(messageId, parameters);
+ }
+
+ /**
+ * Create a new <code>MOASystemException</code>.
+ *
+ * @param messageId The identifier of the message associated with this
+ * <code>MOASystemException</code>.
+ * @param parameters Additional message parameters.
+ * @param wrapped The exception wrapped by this
+ * <code>MOASystemException</code>.
+ */
+ public MOASystemException(
+ String messageId,
+ Object[] parameters,
+ Throwable wrapped) {
+ super(messageId, parameters, wrapped);
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/Configurator.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/Configurator.java
new file mode 100644
index 000000000..6b2eee1e4
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/Configurator.java
@@ -0,0 +1,75 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api;
+
+import org.apache.commons.discovery.tools.DiscoverClass;
+
+import at.gv.egovernment.moa.spss.MOAException;
+
+/**
+ * Configures the SP/SS API.
+ *
+ * Also handles dynamic configuration updates.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public abstract class Configurator {
+
+ /** The default implementation class. */
+ private static final String DEFAULT_IMPLEMENTATION =
+ "at.gv.egovernment.moa.spss.server.init.ConfiguratorImpl";
+
+ /** The single instance of this class. */
+ private static Configurator instance = null;
+
+ public static synchronized Configurator getInstance() {
+ if (instance == null) {
+ try {
+ DiscoverClass discover = new DiscoverClass();
+ instance =
+ (Configurator) discover.newInstance(
+ Configurator.class,
+ DEFAULT_IMPLEMENTATION);
+ } catch (Exception e) {
+ // this can not happen since we provide a valid default
+ // implementation
+ }
+ }
+ return instance;
+ }
+
+ /**
+ * Initialize the SP/SS configuration.
+ *
+ * Only a single call to this method will have an effect. Use
+ * <code>update()</code> for reflecting changes in the configuration instead.
+ *
+ * @throws MOAException An error occurred updating the SP/SS configuration.
+ */
+ public abstract void init() throws MOAException;
+
+ /**
+ * Update the SP/SS configuration.
+ *
+ * This will only have an effect after the system has been initialized once
+ * using <code>init()</code>.
+ *
+ * @throws MOAException An error occurred updating the SP/SS configuration.
+ */
+ public abstract void update() throws MOAException;
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SPSSFactory.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SPSSFactory.java
new file mode 100644
index 000000000..daca95eb2
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SPSSFactory.java
@@ -0,0 +1,1028 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api;
+
+import java.io.InputStream;
+import java.math.BigInteger;
+import java.security.cert.X509Certificate;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.discovery.tools.DiscoverClass;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSContent;
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSDataObject;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponseElement;
+import at.gv.egovernment.moa.spss.api.common.CheckResult;
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+import at.gv.egovernment.moa.spss.api.common.SignerInfo;
+import at.gv.egovernment.moa.spss.api.common.Transform;
+import at.gv.egovernment.moa.spss.api.common.X509IssuerSerial;
+import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation;
+import at.gv.egovernment.moa.spss.api.common.XPathFilter;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfile;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureLocation;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfile;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse;
+import at.gv.egovernment.moa.spss.api.xmlsign.DataObjectInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.ErrorResponse;
+import at.gv.egovernment.moa.spss.api.xmlsign.SignatureEnvironmentResponse;
+import at.gv.egovernment.moa.spss.api.xmlsign.SingleSignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.ManifestRefsCheckResult;
+import at.gv.egovernment.moa.spss.api.xmlverify.ManifestRefsCheckResultInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferenceInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResult;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResultInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.SignatureManifestCheckParams;
+import at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfile;
+import at.gv.egovernment.moa.spss.api.xmlverify.TransformParameter;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureLocation;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfile;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse;
+
+/**
+ * An abstract factory for creating MOA SP/SS API objects.
+ *
+ * Use <code>getInstance()</code> to get a concrete factory instance. Using
+ * this instance, concrete MOA SP/SS API object can be created.
+ *
+ * @author Patrick Peck
+ * @author Gregor Karlinger
+ * @version $Id$
+ */
+public abstract class SPSSFactory {
+
+ /** The default implementation of this class. */
+ private static final String DEFAULT_IMPLEMENTATION =
+ "at.gv.egovernment.moa.spss.api.impl.SPSSFactoryImpl";
+
+ /** The single instance of this class. */
+ private static SPSSFactory instance = null;
+
+ /**
+ * Returns the single instance of this class.
+ *
+ * @return The single instance of this class.
+ */
+ public static synchronized SPSSFactory getInstance() {
+ if (instance == null) {
+ try {
+ DiscoverClass discover = new DiscoverClass();
+ instance =
+ (SPSSFactory) discover.newInstance(
+ SPSSFactory.class,
+ DEFAULT_IMPLEMENTATION);
+ } catch (Exception e) {
+ // this can not happen since we provide a valid default
+ // implementation
+ }
+ }
+ return instance;
+ }
+
+ //
+ // Factory methods for creating XML signatures
+ //
+
+ /**
+ * Create a new <code>CreateXMLSignatureRequest</code> object.
+ *
+ * @param keyIdentifier The identifier for the key group to use for signing.
+ * @param singleSignatureInfos A <code>List</code> of
+ * <code>SingleSignatureInfo</code> objects containing information about a
+ * single signature to be created.
+ * @return The <code>CreateXMLSignatureRequest</code> containing the above
+ * data.
+ *
+ * @pre keyIdentifier != null && keyIdentifier.length() > 0
+ * @pre singleSignatureInfos != null
+ * @pre forall Object o in singleSignatureInfos |
+ * o instanceof at.gv.egovernment.moa.spss.api.common.SingleSignatureInfo
+ * @post return != null
+ */
+ public abstract CreateXMLSignatureRequest createCreateXMLSignatureRequest(
+ String keyIdentifier,
+ List singleSignatureInfos);
+
+ /**
+ * Create a new <code>SingleSignatureInfo</code> object.
+ *
+ * @param dataObjectInfos The data objects that will be signed (including
+ * transformations).
+ * @param createSignatureInfo Information about the signature environment. May
+ * be <code>null</code>.
+ * @param securityLayerConform If <code>true</code>, a Security Layer conform
+ * signature manifest is created, otherwise not.
+ * @return The <code>SingleSignatureInfo</code> containing the above data.
+ *
+ * @pre dataObjectInfos != null && dataObjectInfos.size() > 0
+ * @pre forall Object o in dataObjectInfos |
+ * o instanceof at.gv.egovernment.moa.spss.api.xmlsign.DataObjectInfo
+ * @post return != null
+ */
+ public abstract SingleSignatureInfo createSingleSignatureInfo(
+ List dataObjectInfos,
+ CreateSignatureInfo createSignatureInfo, boolean securityLayerConform);
+
+ /**
+ * Create a new <code>DataObjectInfo</code> object.
+ *
+ * @param structure The type of signature to create.
+ * @param childOfManifest If <code>true</code>, references will be returned
+ * as children of an XMLDsig manifest. Otherwise, they will be returned as
+ * children of the signature itself.
+ * @param dataObject The data object that will be signed.
+ * @param createTransformsInfoProfile Additional transformations to apply
+ * to the data object.
+ * @return The <code>DataObjectInfo</code> containing the above data.
+ *
+ * @pre DataObjectInfo.STRUCTURE_DETACHED.equals(structure) ||
+ * DataObjectInfo.STRUCTURE_ENVELOPING.equals(structure)
+ * @pre dataObject != null
+ * @pre createTransformsInfoProfile != null
+ * @post return != null
+ */
+ public abstract DataObjectInfo createDataObjectInfo(
+ String structure,
+ boolean childOfManifest,
+ Content dataObject,
+ CreateTransformsInfoProfile createTransformsInfoProfile);
+
+ /**
+ * Create a new <code>CreateTransformsInfoProfile</code> object containing a
+ * reference to a locally stored profile.
+ *
+ * @param profileID The profile ID to resolve during signature creation.
+ * @return The <code>CreateTransformsInfoProfile</code> containing the given
+ * profile ID.
+ *
+ * @pre profileID != null && profileID.length() > 0
+ * @post return != null
+ */
+ public abstract CreateTransformsInfoProfile createCreateTransformsInfoProfile(String profileID);
+
+ /**
+ * Create a new <code>CreateTransformsInfoProfile</code> object by providing
+ * the profile data explicitly.
+ *
+ * @param transformsInfo The transformations to apply to the associated
+ * data object.
+ * @param supplements Supplemental information for the transformation. May be
+ * <code>null</code>.
+ * @return The <code>CreateTransformsInfoProfile</code> containing the above
+ * data.
+ *
+ * @pre transformsInfo != null
+ * @pre supplements != null implies
+ * forall Object o in supplements |
+ * o instanceof at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation
+ * @post return != null
+ */
+ public abstract CreateTransformsInfoProfile createCreateTransformsInfoProfile(
+ CreateTransformsInfo transformsInfo,
+ List supplements);
+
+ /**
+ * Create a new <code>CreateTransformsInfo</code> object.
+ *
+ * @param transforms The <code>Transform</code>s to apply to the associated
+ * data object. May be <code>null</code>.
+ * @param finalDataMetaInfo Information about the type of the transformed
+ * data.
+ * @return The <code>CreateTransformsInfo</code> containing the above data.
+ *
+ * @pre transforms != null implies transforms.size > 0
+ * @pre transforms != null implies
+ * forall Object o in transforms |
+ * o instanceof at.gv.egovernment.moa.spss.api.common.Transform
+ * @pre finalDataMetaInfo != null
+ * @post return != null
+ */
+ public abstract CreateTransformsInfo createCreateTransformsInfo(
+ List transforms,
+ MetaInfo finalDataMetaInfo);
+
+ /**
+ * Create a new <code>CreateSignatureInfo</code> object.
+ *
+ * @param createSignatureEnvironment The signature environment that will
+ * contain the signature.
+ * @param createSignatureEnvironmentProfile Additional information about
+ * the signture environment.
+ * @return The <code>CreateSignatureInfo</code> containing the above data.
+ *
+ * @pre createSignatureEnvironment != null
+ * @pre createSignatureEnvironmentProfile != null
+ * @post return != null
+ */
+ public abstract CreateSignatureInfo createCreateSignatureInfo(
+ Content createSignatureEnvironment,
+ CreateSignatureEnvironmentProfile createSignatureEnvironmentProfile);
+
+ /**
+ * Create a new <code>CreateSignatureEnvironmentProfile</code> object
+ * containing a reference to a locally stored profile.
+ *
+ * @param profileID The profile ID to resolve during signature creation.
+ * @return The <code>CreateSignatureEnvironmentProfile</code> containing
+ * the given profile ID.
+ *
+ * @pre profileID != null && profileID.length() > 0
+ * @post return != null
+ */
+ public abstract CreateSignatureEnvironmentProfile createCreateSignatureEnvironmentProfile(String profileID);
+
+ /**
+ * Create a new <code>CreateSignatureEnvironmentProfile</code> object by
+ * providing the profile data explicitly.
+ *
+ * @param createSignatureLocation The location where the signature will be
+ * inserted.
+ * @param supplements Additional information about the signature environment.
+ * @return The <code>CreateSignatureEnvironmentProfile</code> containing the
+ * above data.
+ *
+ * @pre createSignatureLocation != null
+ * @pre supplements != null
+ * @pre forall Object o in supplements |
+ * o instanceof at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation
+ * @post return != null
+ */
+ public abstract CreateSignatureEnvironmentProfile createCreateSignatureEnvironmentProfile(
+ CreateSignatureLocation createSignatureLocation,
+ List supplements);
+
+ /**
+ * Create a new <code>CreateSignatureLocation</code> object.
+ *
+ * @param xPathExpression The XPath expression to select the signature
+ * parent element within the signature environment.
+ * @param index The index of the node, after which the signature will be
+ * inserted.
+ * @param namespaceDeclarations The namespace prefix to URI mapping to apply
+ * while evaluating the XPath expression.
+ * @return The <code>CreateSignatureLocation</code> containing the above data.
+ *
+ * @pre xPathExpression != null
+ * @pre index >= 0
+ * @pre namespaceDeclarations != null
+ */
+ public abstract CreateSignatureLocation createCreateSignatureLocation(
+ String xPathExpression,
+ int index,
+ Map namespaceDeclarations);
+
+ /**
+ * Create a new <code>CreateXMLSignatureResponse</code> object.
+ *
+ * @param responseElements The elements of the response, either
+ * <code>SignatureEnvironmentResponse</code> objects, or
+ * <code>ErrorResponse</code> objects.
+ * @return The new <code>CreateXMLSignatureResponse</code> containing the
+ * above data.
+ *
+ * @pre responseElements != null && responseElements.size() > 0
+ * @pre forall Object o in responseElements |
+ * o instanceof at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureResponseElement
+ * @post return != null
+ */
+ public abstract CreateXMLSignatureResponse createCreateXMLSignatureResponse(List responseElements);
+
+ /**
+ * Create a new <code>SignatureEnvironmentResponse</code> object.
+ *
+ * @param signatureEnvironment The signature environment containing the
+ * signature.
+ * @return The <code>SignatureEnvironmentResponse</code> containing the
+ * <code>signatureEnvironment</code>.
+ *
+ * @pre signatureEnvironment != null
+ * @post return != null
+ */
+ public abstract SignatureEnvironmentResponse createSignatureEnvironmentResponse(Element signatureEnvironment);
+
+ /**
+ * Create a new <code>ErrorResponse</code> object.
+ *
+ * @param code The numerical error code.
+ * @param info Verbose error information.
+ * @return The new <code>ErrorResponse</code> containing the above data.
+ *
+ * @pre code > 0
+ * @pre info != null
+ * @post return != null
+ */
+ public abstract ErrorResponse createErrorResponse(int code, String info);
+
+ //
+ // Factory methods for verifying CMS signatures
+ //
+
+ /**
+ * Create a new <code>VerifyCMSSignatureRequest</code> object.
+ *
+ * @param signatories The indexes of the signatories whose signature is to
+ * be verified.
+ * @param dateTime The date for which the verification is to be performed.
+ * May be <code>null</code>.
+ * @param cmsSignature The CMS signature.
+ * @param dataObject The signed data. May be <code>null</code>.
+ * @param trustProfileID The ID of the trust profile containing the trusted
+ * root certificates.
+ * @return The <code>VerifyCMSSignatureRequest</code> containing the above
+ * data.
+ *
+ * @pre signatories != null && signatories.length > 0
+ * @pre signaturies != VerifyCMSSignatureRequest.ALL_SIGNATORIES implies
+ * for (int i = 0; i < signatories.length; i++)
+ * signatories[i] >= 1
+ * @pre cmsSignature != null
+ * @pre trustProfileID != null && trustProfileID.length() > 0
+ * @post return != null
+ */
+ public abstract VerifyCMSSignatureRequest createVerifyCMSSignatureRequest(
+ int[] signatories,
+ Date dateTime,
+ InputStream cmsSignature,
+ CMSDataObject dataObject,
+ String trustProfileID);
+
+ /**
+ * Create a new <code>CMSDataObject</code> object from data at a given URI.
+ *
+ * @param metaInfo Type information about the <code>CMSDataObject</code>.
+ * May be <code>null</code>.
+ * @param content The CMS content containing the data.
+ * @return The new <code>CMSDataObject</code> containing the data.
+ *
+ * @pre referenceURI != null
+ * @pre content != null
+ * @post return != null
+ */
+ public abstract CMSDataObject createCMSDataObject(
+ MetaInfo metaInfo,
+ CMSContent content);
+
+ /**
+ * Create a new <code>CMSContent</code> object from the data contained at the
+ * given URI.
+ *
+ * @param referenceURI The URI identifying the data. Must be resolvable.
+ * @return The <code>CMSContent</code> containing a reference to the signed
+ * data.
+ *
+ * @pre referenceURI != null
+ * @post return != null
+ */
+ public abstract CMSContent createCMSContent(String referenceURI);
+
+ /**
+ * Create a new <code>CMSContent</code> object from a byte stream.
+ *
+ * @param binaryContent The byte stream containing the signed data.
+ * @return The new <code>CMSContent</code> containing the data from the
+ * byte stream.
+ *
+ * @pre binaryContent != null
+ * @post return != null
+ */
+ public abstract CMSContent createCMSContent(InputStream binaryContent);
+
+ /**
+ * Create a new <code>VerifyCMSSignatureResponse</code> object.
+ *
+ * @param responseElements Verification information about each signature.
+ * @return The new <code>VerifyCMSSignatureResponse</code> containing the
+ * status of signature verification for each signature contained in the
+ * request.
+ *
+ * @pre responseElements != null && responseElements.size() > 0
+ * @pre forall Object o in responseElements |
+ * o instanceof at.gv.egovernment.moa.spss.api.cmssign.VerifyCMSSignatureResponseElement
+ * @post return != null
+ */
+ public abstract VerifyCMSSignatureResponse createVerifyCMSSignatureResponse(List responseElements);
+
+ /**
+ * Create a new <code>VerifyCMSSignatureResponseElement</code> object.
+ *
+ * @param signerInfo Information about the signer certificate.
+ * @param signatureCheck Result of the singature value check.
+ * @param certificateCheck Result of the certificate status check.
+ * @return The new <code>VerifyCMSSignatureResponseElement</code> containing
+ * the above data.
+ *
+ * @pre signerInfo != null && signatureCheck != null &&
+ * certificateCheck != null
+ * @post return != null
+ */
+ public abstract VerifyCMSSignatureResponseElement createVerifyCMSSignatureResponseElement(
+ SignerInfo signerInfo,
+ CheckResult signatureCheck,
+ CheckResult certificateCheck);
+
+ //
+ // Factory methods for verifying XML signatures
+ //
+
+ /**
+ * Create a new <code>VerifyXMLSignatureRequest</code> object.
+ *
+ * @param dateTime The date for which the verification is to be performed.
+ * May be <code>null</code>.
+ * @param verifySignatureInfo Information about the signature environment and
+ * the location of the signature.
+ * @param supplementProfiles Supplemental information for the signature
+ * environment. May be <code>null</code>.
+ * @param signatureManifestParams Additional information for checking the
+ * signature manifest. May be <code>null</code>.
+ * @param returnHashInputData If <code>true</code>, hash input data will
+ * be returned in the response, otherwise not.
+ * @param trustProfileID The ID of the trust profile containing the trusted
+ * root certificates.
+ * @return The new <code>VerifyXMLSignatureRequest</code> containing the
+ * above data.
+ *
+ * @pre verifySignatureInfo != null
+ * @pre supplementProfiles != null implies
+ * forall Object o in supplementProfiles |
+ * o instanceof at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfile
+ * @pre trustProfileID != null && trustProfileID.length() > 0
+ * @post return != null
+ */
+ public abstract VerifyXMLSignatureRequest createVerifyXMLSignatureRequest(
+ Date dateTime,
+ VerifySignatureInfo verifySignatureInfo,
+ List supplementProfiles,
+ SignatureManifestCheckParams signatureManifestParams,
+ boolean returnHashInputData,
+ String trustProfileID);
+
+ /**
+ * Create a new <code>VerifySignatureInfo</code> object.
+ *
+ * @param verifySignatureEnvironment The signature environment containing
+ * the signature to be verified.
+ * @param verifySignatureLocation The location of the signature within the
+ * signature environment.
+ * @return The new <code>VerifySignatureInfo</code> containing the above data.
+ *
+ * @pre verifySignatureEnvironment != null
+ * @pre verifySignatureLocation != null
+ * @post return != null
+ */
+ public abstract VerifySignatureInfo createVerifySignatureInfo(
+ Content verifySignatureEnvironment,
+ VerifySignatureLocation verifySignatureLocation);
+
+ /**
+ * Create a new <code>VerifySignatureLocation</code> object.
+ *
+ * @param xPathExpression The XPath expression to select the signature
+ * element within the signature environment.
+ * @param namespaceDeclarations The namespace prefix to URI mapping to apply
+ * while evaluating the XPath expression.
+ * @return The new <code>VerifySignatureLocation</code> containing the above
+ * data.
+ *
+ * @pre xPathExpression != null
+ * @pre namespaceDeclarations != null
+ * @post return != null
+ */
+ public abstract VerifySignatureLocation createVerifySignatureLocation(
+ String xPathExpression,
+ Map namespaceDeclarations);
+
+ /**
+ * Create a new <code>SupplementProfile</code> object containing a reference
+ * to a locally stored profile.
+ *
+ * @param profileID The profile ID to resolve during signature verification.
+ * @return The <code>SupplementProfile</code> containing the profile ID.
+ *
+ * @pre profileID != null && profileID.length() > 0
+ * @post return != null
+ */
+ public abstract SupplementProfile createSupplementProfile(String profileID);
+
+ /**
+ * Create a new <code>SupplementProfile</code> object by providing the profile
+ * data explicitly.
+ *
+ * @param supplementProfile The profile data.
+ * @return The <code>SupplementProfile</code> containing the profile data.
+ */
+ public abstract SupplementProfile createSupplementProfile(XMLDataObjectAssociation supplementProfile);
+
+ /**
+ * Create a new <code>SignatureManifestCheckParams</code> object.
+ *
+ * @param referenceInfos Information for checking the validity of a
+ * a reference.
+ * @param returnReferenceInputData If <code>true</code>, the input data to
+ * the calculation of reference digest values will be returned in the
+ * response, otherwise not.
+ * @return The <code>SignatureManifestCheckParams</code> containing the
+ * above data.
+ *
+ * @pre referenceInfos != null && referenceInfos.size() > 0
+ * @pre forall Object o in referenceInfos |
+ * o instanceof at.gv.egovernment.moa.spss.api.xmlverify.ReferenceInfo
+ * @post return != null
+ */
+ public abstract SignatureManifestCheckParams createSignatureManifestCheckParams(
+ List referenceInfos,
+ boolean returnReferenceInputData);
+
+ /**
+ * Create a new <code>ReferenceInfo</code> object.
+ *
+ * @param verifyTransformsInfoProfiles The transformation profiles valid for
+ * the associated reference.
+ * @return The <code>ReferenceInfo</code> containing the transformation
+ * profiles.
+ *
+ * @pre verifyTransformsInfoProfiles != null &&
+ * verifyTransformsInfoProfiles.size() > 0
+ * @pre forall Object o in verifyTransformsInfoProfiles |
+ * o instanceof at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfile
+ * @post return != null
+ */
+ public abstract ReferenceInfo createReferenceInfo(List verifyTransformsInfoProfiles);
+
+ /**
+ * Create a new <code>VerifyTransformsInfoProfile</code> object containing
+ * a reference to a locally stored profile.
+ *
+ * @param profileID The profile ID to resolve during signature verification.
+ * @return The <code>VerifyTransformsInfoProfile</code> containing the
+ * given profile ID.
+ *
+ * @pre profileID != null && profileID.length() > 0
+ * @post return != null
+ */
+ public abstract VerifyTransformsInfoProfile createVerifyTransformsInfoProfile(String profileID);
+
+ /**
+ * Create a new <code>VerifyTransformsInfoProfile</code> object by providing
+ * the profile data explicitly.
+ *
+ * @param transforms A valid chain of transformations for the reference.
+ * May be <code>null</code>.
+ * @param transformParameters Additional transformation information.
+ * @return The <code>VerifyTransformsInfoProfile</code> containing the above
+ * data.
+ *
+ * @pre transforms != null implies
+ * (transforms.size() > 0 &&
+ * forall Object o in transforms | o instanceof Transform)
+ * @pre transformParameters != null implies
+ * forall Object o in transformParameters |
+ * o instanceof at.gv.egovernment.moa.spss.api.xmlverify.TransformParameter
+ * @post return != null
+ */
+ public abstract VerifyTransformsInfoProfile createVerifyTransformsInfoProfile(
+ List transforms,
+ List transformParameters);
+
+ /**
+ * Create a new <code>TransformParameter</code> object with the data
+ * contained at the given URI.
+ *
+ * @param URI The URI identifying the data. The URI will be resolved during
+ * signature verification.
+ * @return The <code>TransformParameter</code> containing the URI of the
+ * data.
+ *
+ * @pre URI != null
+ * @post return != null
+ */
+ public abstract TransformParameter createTransformParameter(String URI);
+
+ /**
+ * Creata a new <code>TransformParameter</code> object containing the
+ * binary data.
+ *
+ * @param URI The URI identifying the data.
+ * @param binaryData The binary data.
+ * @return The <code>TransformParameter</code> containig the binary data.
+ *
+ * @pre URI != null
+ * @pre binary != null
+ * @post return != null
+ */
+ public abstract TransformParameter createTransformParameter(
+ String URI,
+ InputStream binaryData);
+
+ /**
+ * Create a new <code>TransformParameter</code> object containing the hash
+ * value of the transformation data.
+ *
+ * @param URI The URI identifying the data. It will be resolved during
+ * signature verification.
+ * @param digestMethod The digest method used for calculating the digest
+ * value.
+ * @param digestValue The hash value of the transformation data.
+ * @return The <code>TransformParameter</code> containing the above data.
+ *
+ * @pre URI != null
+ * @pre digestMethod != null
+ * @pre digestValue != null
+ */
+ public abstract TransformParameter createTransformParameter(
+ String URI,
+ String digestMethod,
+ byte[] digestValue);
+
+ /**
+ * Create a new <code>VerifyXMLSignatureResponse</code> object.
+ *
+ * @param signerInfo Information about the signer certificate.
+ * @param hashInputDatas The signed data objects. May be <code>null</code>.
+ * @param referenceInputDatas The reference input data objects.
+ * May be <code>null</code>.
+ * @param signatureCheck Status information about the signature check.
+ * @param signatureManifestCheck Status information about the signature
+ * manifest check.
+ * @param xmlDsigManifestChecks Status information about each XMLDsig manifest
+ * check.
+ * @param certificateCheck Status information about the signer certificate
+ * check.
+ * @return The <code>VerifyXMLSignatureResponse</code> containing the above
+ * data.
+ *
+ * @pre signerInfo != null
+ * @pre hashInputDatas != null implies
+ * forall Object o in hashInputDatas |
+ * o instanceof at.gv.egovernment.moa.spss.api.common.Content
+ * @pre referenceInputDatas != null implies
+ * forall Object o in referenceInputDatas |
+ * o instanceof at.gv.egovernment.moa.spss.api.common.Content
+ * @pre signatureCheck != null
+ * @pre xmlDsigManifestChecks != null implies
+ * forall Object o in xmlDsigManifestChecks |
+ * o instanceof at.gv.egovernment.moa.spss.api.xmlverifyManifestRefsCheckResult
+ * @pre certificateCheck != null
+ * @post return != null
+ */
+ public abstract VerifyXMLSignatureResponse createVerifyXMLSignatureResponse(
+ SignerInfo signerInfo,
+ List hashInputDatas,
+ List referenceInputDatas,
+ ReferencesCheckResult signatureCheck,
+ ReferencesCheckResult signatureManifestCheck,
+ List xmlDsigManifestChecks,
+ CheckResult certificateCheck);
+
+ /**
+ * Create a new <code>ReferencesCheckResult</code> object.
+ *
+ * @param code The status code.
+ * @param info Additional information about the reference check.
+ * @return The <code>ReferencesCheckResult</code> containing the above data.
+ *
+ * @pre code >= 0
+ * @post return != null
+ */
+ public abstract ReferencesCheckResult createReferencesCheckResult(
+ int code,
+ ReferencesCheckResultInfo info);
+
+ /**
+ * Create a new <code>ReferencesCheckResultInfo</code> object.
+ *
+ * @param anyOtherInfo Arbitrary XML content describing the check result.
+ * May be <code>null</code>.
+ * @param failedReferences The indexes of the failed references. May be
+ * <code>null</code>.
+ * @return The <code>ReferencesCheckResultInfo</code> containing the above
+ * data.
+ *
+ * @post return != null
+ */
+ public abstract ReferencesCheckResultInfo createReferencesCheckResultInfo(
+ NodeList anyOtherInfo,
+ int[] failedReferences);
+
+ /**
+ * Create a new <code>ManifestRefsCheckResult</code> object.
+ *
+ * @param code The status code.
+ * @param info Additional information about the manifest check. May be
+ * <code>null</code>.
+ * @return The <code>ManifestRefsCheckResult</code> containing the above
+ * data.
+ *
+ * @pre code >= 0
+ * @post return != null
+ */
+ public abstract ManifestRefsCheckResult createManifestRefsCheckResult(
+ int code,
+ ManifestRefsCheckResultInfo info);
+
+ /**
+ * Create a new <code>ManifestRefsCheckResultInfo</code> object.
+ *
+ * @param anyOtherInfo Arbitrary XML content describing the check result.
+ * May be <code>null</code>.
+ * @param failedReferences The indexes of the failed references. May be
+ * <code>null</code>.
+ * @param referringSigReference The index of the reference in the signature.
+ * @return The <code>ManifestRefsCheckResultInfo</code> containing the
+ * above data.
+ *
+ * @pre referringSigReference > 0
+ * @post return != null
+ */
+ public abstract ManifestRefsCheckResultInfo createManifestRefsCheckResultInfo(
+ NodeList anyOtherInfo,
+ int[] failedReferences,
+ int referringSigReference);
+
+ //
+ // Factory methods for common objects
+ //
+
+ /**
+ * Create a new <code>Content</code> object referencing data via a URI.
+ *
+ * @param referenceURI The URI pointing to the content.
+ * @return The <code>Content</code> object containing the reference.
+ *
+ * @pre referenceURI != null && referenceURI.length() > 0
+ * @post return != null
+ */
+ public abstract Content createContent(String referenceURI);
+
+ /**
+ * Create a new <code>Content</code> object containing binary data.
+ *
+ * @param binaryData An <code>InputStream</code> containing the binary data.
+ * @param referenceURI An URI identifying the data. May be <code>null</code>.
+ * @return The <code>Content</code> object containing the data.
+ *
+ * @pre binaryData != null
+ * @post return != null
+ */
+ public abstract Content createContent(
+ InputStream binaryData,
+ String referenceURI);
+
+ /**
+ * Create a new <code>Content</code> object containing location reference data.
+ *
+ * @param locationReferenceURI a URI pointing to the actual remote location of the content.
+ *
+ * @param referenceURI An URI identifying the data. May be <code>null</code>.
+ *
+ * @return The <code>Content</code> object containing the data.
+ *
+ * @pre locationReferenceURI != null
+ * @post return != null
+ */
+ public abstract Content createContent(
+ String locationReferenceURI,
+ String referenceURI);
+
+ /**
+ * Create a new <code>Content</code> object containing XML data.
+ *
+ * @param xmlData The XML data contained in the new <code>Content</code>.
+ * @param referenceURI An URI identifying the data. May be <code>null</code>.
+ * @return The <code>Content</code> object containing the data.
+ *
+ * @pre xmlData != null
+ * @post return != null
+ */
+ public abstract Content createContent(NodeList xmlData, String referenceURI);
+
+ /**
+ * Create a new <code>XMLDataObjectAssociation</code> object.
+ *
+ * @param metaInfo Information about the content type. May be
+ * <code>null</code>.
+ * @param content The <code>Content</code> object containing the data.
+ * @return The <code>XMLDataObjectAssociation</code> containing the above
+ * data.
+ *
+ * @pre content != null
+ * @pre content.getContentType() == Content.CONTENT_XML ||
+ * content.getContentType() == Contetn.CONTENT_BINARY
+ * @pre content.getReference() != null
+ * @post return != null
+ */
+ public abstract XMLDataObjectAssociation createXMLDataObjectAssociation(
+ MetaInfo metaInfo,
+ Content content);
+
+ /**
+ * Create a new <code>MetaInfo</code> object.
+ *
+ * @param mimeType The MIME type part of the meta information.
+ * @param description Descriptive meta information. May be <code>null</code>.
+ * @param otherInfo XML meta information. May be <code>null</code>.
+ * @param type Type information for XML signature creation. May be <code>null</code>.
+ * @return The <code>MetaInfo</code> object containing the above data.
+ *
+ * @pre mimeType != null && mimeType.length() > 0
+ * @pre otherInfo != null implies
+ * forall Node n in otherInfo | n.getNodeType() == Node.ELEMENT
+ */
+ public abstract MetaInfo createMetaInfo(
+ String mimeType,
+ String description,
+ NodeList otherInfo,
+ String type);
+
+ /**
+ * Create a <code>CanonicalizationTransform</code> type of <code>Transform</code>.
+ *
+ * @param algorithmURI The algorithm URI of the canonicalization.
+ * @return The created <code>CanonicalizationTransform</code> object.
+ *
+ * @pre CanonicalizationTransform.CANONICAL_XML.equals(algorithmURI) ||
+ * CanonicalizationTransform.CANONICAL_XML_WITH_COMMENTS.equals(algorithmURI)
+ * @post return != null
+ */
+ public abstract Transform createCanonicalizationTransform(String algorithmURI);
+
+ /**
+ * Create an <code>ExclusiveCanonicalizationTransform</code> type of
+ * <code>Transform</code>.
+ *
+ * @param algorithmURI The algorithm URI of the exclusive canonicalization.
+ * @param inclusiveNamespacePrefixes The prefixes of the namespaces to
+ * treat according to canonical XML.
+ * @return The new <code>ExclusiveCanonicalizationTransform</code>
+ *
+ * @pre ExclusiveCanonicalizationTransform.EXCLUSIVE_CANONICAL_XML.equals(algorithmURI) ||
+ * ExclusiveCanonicalizationTransform.EXCLUSIVE_CANONICAL_XML_WITH_COMMENTS.equals(algorithmURI)
+ * @pre inclusiveNamespacePrefixes != null
+ * @pre forall Object o in inclusiveNamespacePrefixes | o instanceof String
+ * @post return != null
+ */
+ public abstract Transform createExclusiveCanonicalizationTransform(
+ String algorithmURI,
+ List inclusiveNamespacePrefixes);
+
+ /**
+ * Create a <code>Base64Transform</code> type of <code>Transform</code>.
+ *
+ * @return A <code>Transform</code> denoting a Base64 decoding.
+ *
+ * @post return != null
+ */
+ public abstract Transform createBase64Transform();
+
+ /**
+ * Create a <code>EnvelopedSignatureTransform</code> type of
+ * <code>Transform</code>.
+ *
+ * @return A <code>Transform</code> denoting an enveloped signature.
+ *
+ * @post return != null
+ */
+ public abstract Transform createEnvelopedSignatureTransform();
+
+ /**
+ * Create an <code>XSLTTransform</code> type of <code>Transform</code>.
+ *
+ * @param styleSheet The XSLT stylesheet contained in the
+ * <code>Transform</code>.
+ * @return A <code>Transform</code> containing the XSLT stylesheet.
+ *
+ * @post return != null
+ */
+ public abstract Transform createXSLTTransform(Element styleSheet);
+
+ /**
+ * Create an <code>XPathTransform</code> type of <code>Transform</code>.
+ *
+ * @param xPathExpression The XPath expression to use in the created
+ * <code>Transform</code>.
+ * @param namespaceDeclarations The namespace prefix to URI mapping to
+ * apply on evaluation of the XPath expression.
+ * @return The <code>XPathTransform</code> containing the above data.
+ *
+ * @pre xPathExpression != null
+ * @pre namespaceDeclarations != null
+ * @post return != null
+ */
+ public abstract Transform createXPathTransform(
+ String xPathExpression,
+ Map namespaceDeclarations);
+
+ /**
+ * Create a new <code>XPathFilter2Transform</code> type of
+ * <code>Transform</code>.
+ *
+ * @param xPathFilters The filters contained in the newly created
+ * <code>XPathFilter2Transform</code>.
+ * @return The <code>XPathFilter2Transform</code> containing the given
+ * filters.
+ *
+ * @pre xPathFilters != null &&
+ * forall Object o in xPathFilters |
+ * o instanceof at.gv.egovernment.moa.spss.api.common.XPathFilter
+ * @post return != null
+ */
+ public abstract Transform createXPathFilter2Transform(List xPathFilters);
+
+ /**
+ * Create a new <code>XPathFilter</code> object.
+ *
+ * @param filterType The type of filter.
+ * @param xPathExpression The XPath expression contained in this filter.
+ * @param namespaceDeclarations The namespace prefix to URI mapping to apply
+ * on evaluation of the XPath expression.
+ * @return The <code>XPathFilter</code> containing the above data.
+ *
+ * @pre XPathFilter.SUBTRACT_TYPE.equals(filterType) ||
+ * XPathFilter.INTERSECT_TYPE.equals(filterType) ||
+ * XPathFilter.UNION_TYPE.equals(filterType)
+ * @pre xPathExpression != null
+ * @pre namespaceDeclarations != null
+ * @post return != null
+ */
+ public abstract XPathFilter createXPathFilter(
+ String filterType,
+ String xPathExpression,
+ Map namespaceDeclarations);
+
+ /**
+ * Create a new <code>CheckResult</code> object.
+ *
+ * @param code The check code.
+ * @param info Verbose information about the check. May be <code>null</code>.
+ * @return The <code>CheckResult</code> containing the above data.
+ *
+ * @pre code >= 0
+ * @post return != null
+ */
+ public abstract CheckResult createCheckResult(int code, NodeList info);
+
+
+
+ /**
+ * Create a new <code>SignerInfo</code> object.
+ *
+ * @param signerCertificate The signer certificate in binary form.
+ * @param qualifiedCertificate <code>true</code>, if the signer certificate is
+ * a qualified certificate, otherwise <code>false</code>.
+ * @param publicAuthority <code>true</code>, if the signer certificate is a
+ * public authority certificate, otherwise <code>false</code>.
+ * @param publicAuthorityID The identification of the public authority
+ * (if <code>publicAuthority</code> is <code>true</code>). May be
+ * <code>null</code>.
+ * @return The <code>SignerInfo</code> containing the above data.
+ *
+ * @pre signerCertSubjectName != null
+ * @pre signerCertIssuerSerial != null
+ * @pre signerCertificate != null
+ */
+ public abstract SignerInfo createSignerInfo(
+ X509Certificate signerCertificate,
+ boolean qualifiedCertificate,
+ boolean publicAuthority,
+ String publicAuthorityID);
+
+ /**
+ * Create a new <code>X509IssuerSerial</code> object.
+ *
+ * @param issuerName The distinguished name of the issuer.
+ * @param issuerSerial The certificate serial number.
+ * @return The <code>X509IssuerSerial</code> containing the above data.
+ *
+ * @pre issuerName != null
+ * @pre issuerSerial != null
+ */
+ public abstract X509IssuerSerial createX509IssuerSerial(
+ String issuerName,
+ BigInteger issuerSerial);
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SignatureCreationService.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SignatureCreationService.java
new file mode 100644
index 000000000..3333fff9c
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SignatureCreationService.java
@@ -0,0 +1,72 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api;
+
+import at.gv.egovernment.moa.spss.MOAException;
+
+import org.apache.commons.discovery.tools.DiscoverClass;
+
+
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse;
+
+/**
+ * Interface providing functions for signature creation.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public abstract class SignatureCreationService {
+
+ /** The default implementation class. */
+ private static final String DEFAULT_IMPLEMENTATION =
+ "at.gv.egovernment.moa.spss.server.invoke.SignatureCreationServiceImpl";
+
+ /** The single instance of this class. */
+ private static SignatureCreationService instance = null;
+
+ /**
+ * Get an instance of the <code>SignatureCreationService</code>.
+ *
+ * @return A concrete instance of the <code>SignatureCreationService</code>.
+ */
+ public static synchronized SignatureCreationService getInstance() {
+ if (instance == null) {
+ try {
+ DiscoverClass discover = new DiscoverClass();
+ instance =
+ (SignatureCreationService) discover.newInstance(
+ SignatureCreationService.class,
+ DEFAULT_IMPLEMENTATION);
+ } catch (Exception e) {
+ // this can not happen since we provide a valid default
+ // implementation
+ }
+ }
+ return instance;
+ }
+
+ /**
+ * Create an XML signature.
+ *
+ * @param request Information on how to create the signature.
+ * @return A <code>CreateXMLSignatureResponse</code> containing the
+ * signature.
+ * @throws MOAException Error in server side MOA module.
+ */
+ public abstract CreateXMLSignatureResponse createXMLSignature(CreateXMLSignatureRequest request)
+ throws MOAException;
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SignatureVerificationService.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SignatureVerificationService.java
new file mode 100644
index 000000000..0203e2ae1
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SignatureVerificationService.java
@@ -0,0 +1,84 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api;
+
+import org.apache.commons.discovery.tools.DiscoverClass;
+
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse;
+
+/**
+ * Interface providing functions for verifying signatures.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public abstract class SignatureVerificationService {
+
+ /** The default implementation class. */
+ private static final String DEFAULT_IMPLEMENTATION =
+ "at.gv.egovernment.moa.spss.server.invoke.SignatureVerificationServiceImpl";
+
+ /** The single instance of this class. */
+ private static SignatureVerificationService instance = null;
+
+ /**
+ * Get an instance of the <code>SignatureVerificationService</code>.
+ *
+ * @return A concrete instance of the
+ * <code>SignatureVerificationService</code>.
+ */
+ public static synchronized SignatureVerificationService getInstance() {
+ if (instance == null) {
+ try {
+ DiscoverClass discover = new DiscoverClass();
+ instance =
+ (SignatureVerificationService) discover.newInstance(
+ SignatureVerificationService.class,
+ DEFAULT_IMPLEMENTATION);
+ } catch (Exception e) {
+ // this can not happen since we provide a valid default
+ // implementation
+ }
+ }
+ return instance;
+ }
+
+ /**
+ * Verify a CMS signature.
+ *
+ * @param request Detailed information on the verification that should be
+ * performed.
+ * @return A <code>VerifyCMSSignatureResponse</code> object that contains
+ * information about the performed verification.
+ * @throws MOAException Error in server side MOA module.
+ */
+ public abstract VerifyCMSSignatureResponse verifyCMSSignature(VerifyCMSSignatureRequest request)
+ throws MOAException;
+ /**
+ * Verfiy an XML Signature.
+ *
+ * @param request information on the verification that should be performed.
+ * @return A <code>VerifyXMLSignatureResponse</code> object that contains
+ * information about the performed verification.
+ * @throws MOAException Error in server side MOA module.
+ */
+ public abstract VerifyXMLSignatureResponse verifyXMLSignature(VerifyXMLSignatureRequest request)
+ throws MOAException;
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSContent.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSContent.java
new file mode 100644
index 000000000..8aed9fa72
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSContent.java
@@ -0,0 +1,43 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.cmsverify;
+
+/**
+ * Base class for objects containing CMS content.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CMSContent {
+ /**
+ * Indicates that this object contains a reference to the CMS content.
+ */
+ public static final int REFERENCE_CONTENT = 0;
+ /**
+ * Indicates that this object contains the CMS content explicitly.
+ */
+ public static final int EXPLICIT_CONTENT = 1;
+
+ /**
+ * Gets the type of the contained content.
+ *
+ * @return The type of content, either <code>REFERENCE_CONTENT</code> or
+ * <code>EXPLICIT_CONTENT</code>.
+ */
+ public int getContentType();
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentExcplicit.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentExcplicit.java
new file mode 100644
index 000000000..23e534cf3
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentExcplicit.java
@@ -0,0 +1,34 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.cmsverify;
+
+import java.io.InputStream;
+
+/**
+ * Encapsulates binary CMS content.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CMSContentExcplicit extends CMSContent {
+ /**
+ * Gets the content as a stream.
+ *
+ * @return A stream containing the binary content.
+ */
+ public InputStream getBinaryContent();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentReference.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentReference.java
new file mode 100644
index 000000000..a2bf5bae8
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentReference.java
@@ -0,0 +1,32 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.cmsverify;
+
+/**
+ * Encapsulates CMS content that is referenced by an URI.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CMSContentReference extends CMSContent {
+ /**
+ * Gets the reference URI from wher the content can be retrieved.
+ *
+ * @return The reference URI.
+ */
+ public String getReference();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSDataObject.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSDataObject.java
new file mode 100644
index 000000000..1a2571aab
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSDataObject.java
@@ -0,0 +1,40 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.cmsverify;
+
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+
+/**
+ * A data object used for verification of CMS signatures.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CMSDataObject {
+ /**
+ * Gets the meta information of the content.
+ *
+ * @return An object containig the meta information.
+ */
+ public MetaInfo getMetaInfo();
+ /**
+ * Gets the actual content of the data object.
+ *
+ * @return The actual content.
+ */
+ public CMSContent getContent();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureRequest.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureRequest.java
new file mode 100644
index 000000000..e96da67fd
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureRequest.java
@@ -0,0 +1,67 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.cmsverify;
+
+import java.io.InputStream;
+import java.util.Date;
+
+/**
+ * Object that encapsulates a request to verify a CMS signature.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface VerifyCMSSignatureRequest {
+ /**
+ * Indicates, that signature checks for all signatories must be returned.
+ */
+ public static int[] ALL_SIGNATORIES = new int[] { -1 };
+ /**
+ * Gets the positions of signatories whose signature must be verified.
+ *
+ * @return The positions of signatories.
+ */
+ public int[] getSignatories();
+ /**
+ * Gets the date and time for which the signature verification has to
+ * be performed.
+ *
+ * @return Date and time for which the signature verification has
+ * to be performed.
+ */
+ public Date getDateTime();
+ /**
+ * Gets the binary CMS signature.
+ *
+ * @return An <code>InputStream</code> from which the binary CMS signature
+ * can be read.
+ */
+ public InputStream getCMSSignature();
+ /**
+ * Gets the data object necessary for the verification.
+ *
+ * @return The data object necessary for verification.
+ */
+ public CMSDataObject getDataObject();
+ /**
+ * Gets the profile ID of trusted certificates to be used for signature
+ * verification.
+ *
+ * @return The profile ID of trusted certificates.
+ */
+ public String getTrustProfileId();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponse.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponse.java
new file mode 100644
index 000000000..144f51716
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponse.java
@@ -0,0 +1,36 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.cmsverify;
+
+import java.util.List;
+
+
+/**
+ * Object that encapsulates the response on a request to verify a CMS
+ * signature.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface VerifyCMSSignatureResponse {
+ /**
+ * Gets the response elements.
+ *
+ * @return The response elements.
+ */
+ public List getResponseElements();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponseElement.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponseElement.java
new file mode 100644
index 000000000..4920aac0c
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponseElement.java
@@ -0,0 +1,48 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.cmsverify;
+
+import at.gv.egovernment.moa.spss.api.common.CheckResult;
+import at.gv.egovernment.moa.spss.api.common.SignerInfo;
+
+/**
+ * Contains detailed information about the verification of a signature.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface VerifyCMSSignatureResponseElement {
+ /**
+ * Gets a SignerInfo element according to CMS.
+ *
+ * @return The SignerInfo element according to CMS.
+ */
+ public SignerInfo getSignerInfo();
+ /**
+ * Gets the result of the signature verification.
+ *
+ * @return The result of the signature verification.
+ */
+ public CheckResult getSignatureCheck();
+ /**
+ * Gets the result of the certificate verification.
+ *
+ * @return The result of the certificate verification.
+ */
+ public CheckResult getCertificateCheck();
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/Base64Transform.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/Base64Transform.java
new file mode 100644
index 000000000..5cf31ee79
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/Base64Transform.java
@@ -0,0 +1,28 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.common;
+
+/**
+ * A <code>Transform</code> performing a Base64 decoding.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface Base64Transform extends Transform {
+ /** Algorithm URI of the Base64 <code>Transform</code> type. */
+ public static final String BASE64_DECODING =
+ "http://www.w3.org/2000/09/xmldsig#base64";
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/CanonicalizationTransform.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/CanonicalizationTransform.java
new file mode 100644
index 000000000..5082ad212
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/CanonicalizationTransform.java
@@ -0,0 +1,32 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.common;
+
+import at.gv.egovernment.moa.util.Constants;
+
+/**
+ * A canonicalization type of <code>Transform</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface CanonicalizationTransform extends Transform {
+ /** Algorithm URI of canonical XML. */
+ public static final String CANONICAL_XML = Constants.C14N_URI;
+ /** Algorithm URI of canonical XML with comments. */
+ public static final String CANONICAL_XML_WITH_COMMENTS =
+ Constants.C14N_WITH_COMMENTS_URI;
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/CheckResult.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/CheckResult.java
new file mode 100644
index 000000000..3745e3918
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/CheckResult.java
@@ -0,0 +1,40 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.common;
+
+import org.w3c.dom.NodeList;
+
+/**
+ * Object encapsulating the result of a signature verification.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CheckResult {
+ /**
+ * Gets the result code.
+ *
+ * @return The result code.
+ */
+ public int getCode();
+ /**
+ * Gets descriptive information.
+ *
+ * @return Descriptive information.
+ */
+ public NodeList getInfo();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/Content.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/Content.java
new file mode 100644
index 000000000..859681e1f
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/Content.java
@@ -0,0 +1,62 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.common;
+
+/**
+ * Encapsulates content data.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @author Gregor Karlinger
+ * @version $Id$
+ */
+public interface Content {
+
+ /**
+ * Indicates that this object contains a URI reference to some content.
+ */
+ public static final int REFERENCE_CONTENT = 0;
+
+ /**
+ * Indicates that this object contains binary content.
+ */
+ public static final int BINARY_CONTENT = 1;
+
+ /**
+ * Indicates that this object contains XML content.
+ */
+ public static final int XML_CONTENT = 2;
+
+ /**
+ * Indicates that this object contains a location reference content.
+ */
+ public static final int LOCREF_CONTENT = 3;
+
+ /**
+ * Gets the type of content contained in this object.
+ *
+ * @return The type of content, one of <code>BINARY_CONTENT</code>, <code>XML_CONTENT</code>, <code>
+ * REFERENCE_CONTENT</code> or <code>LOCREF_CONTENT</code>.
+ */
+ public int getContentType();
+
+ /**
+ * Gets the reference to the content data (a URI).
+ *
+ * @return The reference to the content data.
+ */
+ public String getReference();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentBinary.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentBinary.java
new file mode 100644
index 000000000..d7fc16938
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentBinary.java
@@ -0,0 +1,36 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.common;
+
+import java.io.InputStream;
+
+/**
+ * Encapsulates binary content.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface ContentBinary extends Content {
+ /**
+ * Get the binary content.
+ *
+ * @return An <code>InputStream</code> from which the binary content can
+ * be read.
+ */
+ public InputStream getBinaryContent();
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentLocRef.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentLocRef.java
new file mode 100644
index 000000000..01a1cd56d
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentLocRef.java
@@ -0,0 +1,32 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.common;
+
+/**
+ * Encapsulates location reference content.
+ *
+ * @author Gregor Karlinger
+ * @version $Id$
+ */
+public interface ContentLocRef extends Content
+{
+ /**
+ * Gets the location reference URI pointing to the actual remote location of the content.
+ *
+ * @return the location reference URI.
+ */
+ public String getLocationReferenceURI();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentReference.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentReference.java
new file mode 100644
index 000000000..7250dfedc
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentReference.java
@@ -0,0 +1,26 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.common;
+
+/**
+ * Content containing a reference to content data.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface ContentReference extends Content {
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentXML.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentXML.java
new file mode 100644
index 000000000..f242f7c1c
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentXML.java
@@ -0,0 +1,34 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.common;
+
+import org.w3c.dom.NodeList;
+
+/**
+ * Encapsulates arbitrary XML content.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface ContentXML extends Content {
+ /**
+ * Gets the XML content stored in this object.
+ *
+ * @return The XML content.
+ */
+ public NodeList getXMLContent();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ElementSelector.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ElementSelector.java
new file mode 100644
index 000000000..c9a026a54
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ElementSelector.java
@@ -0,0 +1,43 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.common;
+
+import java.util.Map;
+
+/**
+ * A class containing data for selecting single elements using an XPath
+ * expression.
+ *
+ * Derived classes are used to point to the <code>CreateSignatureLocation</code>
+ * and the <code>VerifySignatureLocation</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface ElementSelector {
+ /**
+ * Gets the XPath expression pointing to a single element.
+ *
+ * @return The XPath expression to select the signature parent element.
+ */
+ public String getXPathExpression();
+ /**
+ * Gets the namespace prefix to URI mapping to use when evaluating the XPath.
+ *
+ * @return The namespace prefix to URI mapping.
+ */
+ public Map getNamespaceDeclarations();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/EnvelopedSignatureTransform.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/EnvelopedSignatureTransform.java
new file mode 100644
index 000000000..267709fb8
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/EnvelopedSignatureTransform.java
@@ -0,0 +1,30 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.common;
+
+/**
+ * An enveloped signature type of <code>Transform</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface EnvelopedSignatureTransform extends Transform {
+ /**
+ * Algorithm URI of the enveloped signature type of <code>Transform</code>.
+ */
+ public static final String ENVELOPED_SIGNATURE =
+ "http://www.w3.org/2000/09/xmldsig#enveloped-signature";
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ExclusiveCanonicalizationTransform.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ExclusiveCanonicalizationTransform.java
new file mode 100644
index 000000000..0c200ef1f
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ExclusiveCanonicalizationTransform.java
@@ -0,0 +1,42 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.common;
+
+import java.util.List;
+
+import at.gv.egovernment.moa.util.Constants;
+
+/**
+ * An exclusive canonicalization type of <code>Transform</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface ExclusiveCanonicalizationTransform extends Transform {
+ /** Algorithm URI of exclusive canonical XML. */
+ public static final String EXCLUSIVE_CANONICAL_XML = Constants.EXC_C14N_URI;
+ /** Algorithm URI of exclusive canonical XML with comments. */
+ public static final String EXCLUSIVE_CANONICAL_XML_WITH_COMMENTS =
+ Constants.EXC_C14N_WITH_COMMENTS_URI;
+
+ /**
+ * Sets the namespace prefixes that are handled in the same manner as in
+ * canonical XML.
+ *
+ * @return The inclusive namespace prefixes.
+ */
+ public List getInclusiveNamespacePrefixes();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/InputData.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/InputData.java
new file mode 100644
index 000000000..89e977e29
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/InputData.java
@@ -0,0 +1,62 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.common;
+
+/**
+ * Interface specifying accessors for two attributes needed for returning
+ * <code>HashInputData</code> and <code>ReferenceInputData</code> information
+ * as part of <code>VerifyXMLSignatureResponse</code>.
+ *
+ * @author Gregor Karlinger
+ *
+ * @version $Id$
+ */
+public interface InputData extends Content
+{
+ /**
+ * Possible value returned by {@link #getPartOf}.
+ */
+ public static String CONTAINER_SIGNEDINFO_ = "SignedInfo";
+
+ /**
+ * Possible value returned by {@link #getPartOf}.
+ */
+ public static String CONTAINER_XMLDSIGMANIFEST_ = "XMLDSIGManifest";
+
+ /**
+ * Value returned by {link getReferringReferenceNumber}, signalling that the
+ * attribute is not used.
+ */
+ public static int REFERER_NONE_ = -1;
+
+ /**
+ * Returns a <code>String</code> signalling what kind of container the
+ * XMLDSIG <code>Reference</code> this <code>InputData</code> belongs
+ * to is part of.
+ *
+ * @return the kind of container.
+ */
+ public String getPartOf();
+
+ /**
+ * If this <code>InputData</code> belongs to an XMLDSIG <code>Reference</code>
+ * being part of either a XMLDSIGManifest or a SignatureManifest, this method
+ * returns a positive int value signalling the particular <code>Reference</code>
+ * of the XMLDSIG <code>SignedInfo</code> referring to the XMLDSIGManifest or
+ * SignatureManifest respectively.
+ */
+ public int getReferringReferenceNumber();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/MetaInfo.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/MetaInfo.java
new file mode 100644
index 000000000..a65572e1f
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/MetaInfo.java
@@ -0,0 +1,52 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.common;
+
+import org.w3c.dom.NodeList;
+
+/**
+ * Object encapsulating descriptive meta information.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface MetaInfo {
+ /**
+ * Gets the mime type of the associated object.
+ *
+ * @return The mimetype of the associated object.
+ */
+ public String getMimeType();
+ /**
+ * Gets the descriptive information (URI).
+ *
+ * @return URI referencing the descriptive information.
+ */
+ public String getDescription();
+ /**
+ * Gets the elemental informations.
+ *
+ * @return The elemental informations.
+ */
+ public NodeList getAnyElements();
+ /**
+ * Gets the XML signature creation type information of the associated object.
+ *
+ * @return the XML signature creation type information of the associated object.
+ */
+ public String getType();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/SignerInfo.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/SignerInfo.java
new file mode 100644
index 000000000..4a7ca8d3b
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/SignerInfo.java
@@ -0,0 +1,58 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.common;
+
+import java.security.cert.X509Certificate;
+
+
+/**
+ * Contains information about the signer.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface SignerInfo {
+ /**
+ * Gets the signer certificate.
+ *
+ * @return The signer certificate.
+ */
+ public X509Certificate getSignerCertificate();
+ /**
+ * Checks, whether the certificate contained in this object is qualified.
+ *
+ * @return <code>true</code>, if the certificate is qualified, otherwise
+ * <code>false</code>.
+ */
+ public boolean isQualifiedCertificate();
+ /**
+ * Checks, whether the certificate contained in this object is a
+ * public authority certificate.
+ *
+ * @return <code>true</code>, if the certificate is a public authority
+ * certificate, otherwise <code>false</code>.
+ */
+ public boolean isPublicAuthority();
+ /**
+ * Gets the public authority ID, if the certificate contained in this
+ * object is from a public authority.
+ *
+ * @return The public authority ID.
+ */
+ public String getPublicAuhtorityID();
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/Transform.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/Transform.java
new file mode 100644
index 000000000..68720526e
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/Transform.java
@@ -0,0 +1,31 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.common;
+
+/**
+ * Base class for XMLDsig <code>Transform</code> elements.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface Transform {
+ /**
+ * Gets the algorithm URI of this <code>Transform</code>.
+ *
+ * @return The algorithm URI of this <code>Transform</code>.
+ */
+ public String getAlgorithmURI();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/X509IssuerSerial.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/X509IssuerSerial.java
new file mode 100644
index 000000000..95d07a3f7
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/X509IssuerSerial.java
@@ -0,0 +1,40 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.common;
+
+import java.math.BigInteger;
+
+/**
+ * Contains an X.509 issuer distinguished name/serial number pair.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface X509IssuerSerial {
+ /**
+ * Gets the issuer distinguished name.
+ *
+ * @return The issuer distinguished name.
+ */
+ public String getX509IssuerName();
+ /**
+ * Gets the issuer serial number.
+ *
+ * @return The issuer serial number.
+ */
+ public BigInteger getX509SerialNumber();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XMLDataObjectAssociation.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XMLDataObjectAssociation.java
new file mode 100644
index 000000000..cc975f281
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XMLDataObjectAssociation.java
@@ -0,0 +1,40 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.common;
+
+
+/**
+ * Object encapsulating arbitrary content and optional descriptive meta
+ * information.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface XMLDataObjectAssociation {
+ /**
+ * Gets descriptive meta information.
+ *
+ * @return The descriptive meta information.
+ */
+ public MetaInfo getMetaInfo();
+ /**
+ * Gets the actual content.
+ *
+ * @return The content of this association.
+ */
+ public Content getContent();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathFilter.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathFilter.java
new file mode 100644
index 000000000..427cc639d
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathFilter.java
@@ -0,0 +1,53 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.common;
+
+import java.util.Map;
+
+/**
+ * An XPath expression set operation.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface XPathFilter {
+ /** Subtract this filter's node set from the resulting node set. */
+ public static final String SUBTRACT_TYPE = "subtract";
+ /** Intersect this filter's node set with the resulting node set. */
+ public static final String INTERSECT_TYPE = "intersect";
+ /** Compute the union of this filter's node set and the resulting node set. */
+ public static final String UNION_TYPE = "union";
+
+ /**
+ * Gets the type of this <code>XPathFilter</code>.
+ *
+ * @return The type of this <code>XPathFilter</code>.
+ */
+ public String getFilterType();
+ /**
+ * Gets the XPath expression for selecting the nodes.
+ *
+ * @return The XPath expression for selecting the nodes.
+ */
+ public String getXPathExpression();
+ /**
+ * Gets The namespace prefix to URI mapping used during evaluation of the
+ * XPath expression.
+ *
+ * @return The namespace prefix to URI mapping.
+ */
+ public Map getNamespaceDeclarations();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathFilter2Transform.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathFilter2Transform.java
new file mode 100644
index 000000000..79f289783
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathFilter2Transform.java
@@ -0,0 +1,40 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.common;
+
+import java.util.List;
+
+/**
+ * An XPath type of <code>Transform</code> containing multiple filters for
+ * performing set operations on XPath selections.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface XPathFilter2Transform extends Transform {
+ /** Algorithm URI for the XPath Filter2 <code>Transform</code>. */
+ public static final String XPATH_FILTER2 =
+ "http://www.w3.org/2002/06/xmldsig-filter2";
+
+ /**
+ * Gets the <code>XPathFilter</code>s contained in this
+ * <code>XPathFilter2Transform</code>.
+ *
+ * @return The <code>XPathFilter</code>s.
+ */
+ public List getFilters();
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathTransform.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathTransform.java
new file mode 100644
index 000000000..a00516064
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathTransform.java
@@ -0,0 +1,45 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.common;
+
+import java.util.Map;
+
+/**
+ * A <code>Transform</code> performing an XPath selection.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface XPathTransform extends Transform {
+ /** Algorithm URI of the XPath <code>Transform</code>. */
+ public static final String XPATH =
+ "http://www.w3.org/TR/1999/REC-xpath-19991116";
+
+ /**
+ * Gets the XPath expression used for selection.
+ *
+ * @return The XPath expression used for selection.
+ */
+ public String getXPathExpression();
+ /**
+ * Gets The namespace prefix to URI mapping used during evaluation of the
+ * XPath expression.
+ *
+ * @return The namespace prefix to URI mapping.
+ */
+ public Map getNamespaceDeclarations();
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XSLTTransform.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XSLTTransform.java
new file mode 100644
index 000000000..634a6fc85
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XSLTTransform.java
@@ -0,0 +1,38 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.common;
+
+import org.w3c.dom.Element;
+
+/**
+ * A <code>Transform</code> containing an XSLT stylesheet.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface XSLTTransform extends Transform {
+ /** Algorithm URI for the XSLT type of <code>Transform</code>. */
+ public static final String XSLT =
+ "http://www.w3.org/TR/1999/REC-xslt-19991116";
+
+ /**
+ * Gets the XSLT stylesheet element used for the transformation.
+ *
+ * @return The XSLT stylesheet element used for the transformation.
+ */
+ public Element getStylesheet();
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/Base64TransformImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/Base64TransformImpl.java
new file mode 100644
index 000000000..3372a3164
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/Base64TransformImpl.java
@@ -0,0 +1,37 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.common.Base64Transform;
+
+/**
+ * Default implementation of <code>Base64Transform</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class Base64TransformImpl
+ extends TransformImpl
+ implements Base64Transform {
+
+ /**
+ * Create a new <code>Base64TransformImpl</code> object.
+ */
+ public Base64TransformImpl() {
+ setAlgorithmURI(BASE64_DECODING);
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSContentExplicitImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSContentExplicitImpl.java
new file mode 100644
index 000000000..d9b129ffa
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSContentExplicitImpl.java
@@ -0,0 +1,55 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.io.InputStream;
+
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSContentExcplicit;
+
+/**
+ * Default implementation of <code>CMSContentExplicit</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class CMSContentExplicitImpl implements CMSContentExcplicit {
+
+ /** The binary content, as a stream. */
+ private InputStream binaryContent;
+
+ /**
+ * Sets the binary content as a stream.
+ *
+ * @param content The binary content as a stream.
+ */
+ public void setBinaryContent(InputStream content) {
+ this.binaryContent = content;
+ }
+
+ public InputStream getBinaryContent() {
+ return binaryContent;
+ }
+
+ /**
+ * Gets the type of content.
+ *
+ * @return EXPLICIT_CONTENT
+ */
+ public int getContentType() {
+ return EXPLICIT_CONTENT;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSContentReferenceImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSContentReferenceImpl.java
new file mode 100644
index 000000000..7694e108d
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSContentReferenceImpl.java
@@ -0,0 +1,53 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSContentReference;
+
+/**
+ * Default implementation of <code>CMSContentReference</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class CMSContentReferenceImpl implements CMSContentReference {
+
+ /** The reference pointing to the actual data. */
+ private String reference;
+
+ /**
+ * Sets the reference URI.
+ *
+ * @param referenceURI The URI pointing to the content data.
+ */
+ public void setReference(String referenceURI) {
+ this.reference = referenceURI;
+ }
+
+ public String getReference() {
+ return reference;
+ }
+
+ /**
+ * Gets the content type.
+ *
+ * @return REFERENCE_CONTENT
+ */
+ public int getContentType() {
+ return REFERENCE_CONTENT;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSDataObjectImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSDataObjectImpl.java
new file mode 100644
index 000000000..d9bc6f88a
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSDataObjectImpl.java
@@ -0,0 +1,61 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSContent;
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSDataObject;
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+
+/**
+ * Default implementation of <code>CMLSDataObject</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class CMSDataObjectImpl implements CMSDataObject {
+
+ /** The <code>MetaInfo</code> associated with the CMS data object. */
+ private MetaInfo metaInfo;
+ /** The <code>CMSContent</code> contained in this data object. */
+ private CMSContent cmsContent;
+
+ /**
+ * Sets the meta information associated with the CMS data object.
+ *
+ * @param metaInfo The meta information.
+ */
+ public void setMetaInfo(MetaInfo metaInfo) {
+ this.metaInfo = metaInfo;
+ }
+
+ public MetaInfo getMetaInfo() {
+ return metaInfo;
+ }
+
+ /**
+ * Sets the data of this <code>CMSDataObject</code>.
+ *
+ * @param cmsContent The actual data of this <code>CMSDataObject</code>.
+ */
+ public void setContent(CMSContent cmsContent) {
+ this.cmsContent = cmsContent;
+ }
+
+ public CMSContent getContent() {
+ return cmsContent;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CanonicalizationTransformImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CanonicalizationTransformImpl.java
new file mode 100644
index 000000000..adfc3176d
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CanonicalizationTransformImpl.java
@@ -0,0 +1,40 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.common.CanonicalizationTransform;
+
+/**
+ * Default implementation of <code>CanonicalizationTransform</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class CanonicalizationTransformImpl
+ extends TransformImpl
+ implements CanonicalizationTransform {
+
+ /**
+ * Create a new <code>CanonicalizationTransformImpl</code> object.
+ *
+ * @param algorithmURI Algorithm URI of the canonicalization
+ * <code>Transform</code> type.
+ */
+ public CanonicalizationTransformImpl(String algorithmURI) {
+ setAlgorithmURI(algorithmURI);
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CheckResultImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CheckResultImpl.java
new file mode 100644
index 000000000..7f3be4933
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CheckResultImpl.java
@@ -0,0 +1,67 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.spss.api.common.CheckResult;
+
+/**
+ * Default implementation of <code>CheckResult</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class CheckResultImpl implements CheckResult {
+ /** The result code. */
+ private int code;
+
+ /** Additional information. */
+ private NodeList info;
+
+ /**
+ * Sets a result code.
+ *
+ * @param code The result code.
+ */
+ public void setCode(int code) {
+ this.code = code;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.spss.api.common.CheckResult#getCode()
+ */
+ public int getCode() {
+ return code;
+ }
+
+ /**
+ * Sets a descriptive information.
+ *
+ * @param info The descriptive information.
+ */
+ public void setInfo(NodeList info) {
+ this.info = info;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.spss.api.common.CheckResult#getInfo()
+ */
+ public NodeList getInfo() {
+ return info;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentBinaryImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentBinaryImpl.java
new file mode 100644
index 000000000..99974d0e2
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentBinaryImpl.java
@@ -0,0 +1,55 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.io.InputStream;
+
+import at.gv.egovernment.moa.spss.api.common.ContentBinary;
+
+/**
+ * Default implementation of <code>ContentBinary</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class ContentBinaryImpl extends ContentImpl implements ContentBinary {
+
+ /** The binary content as a stream. */
+ private InputStream binaryContent;
+
+ /**
+ * Sets the binary content as a stream.
+ *
+ * @param binaryContent The binary content as a stream.
+ */
+ public void setBinaryContent(InputStream binaryContent) {
+ this.binaryContent = binaryContent;
+ }
+
+ public InputStream getBinaryContent() {
+ return binaryContent;
+ }
+
+ /**
+ * Gets the type of content.
+ *
+ * @return BINARY_CONTENT
+ */
+ public int getContentType() {
+ return BINARY_CONTENT;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentImpl.java
new file mode 100644
index 000000000..77ce9a75b
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentImpl.java
@@ -0,0 +1,43 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.common.Content;
+
+/**
+ * Default base class for <code>Content</code> implementations.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public abstract class ContentImpl implements Content {
+ /** The reference pointing to the content data. */
+ private String reference;
+
+ /**
+ * Sets the reference pointing to the content data.
+ *
+ * @param referenceURI The URI of the content data.
+ */
+ public void setReference(String referenceURI) {
+ this.reference = referenceURI;
+ }
+
+ public String getReference() {
+ return reference;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentLocRefImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentLocRefImpl.java
new file mode 100644
index 000000000..c4fcf99e6
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentLocRefImpl.java
@@ -0,0 +1,59 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.common.ContentLocRef;
+
+/**
+ * Default implementation of <code>ContentLocRef</code>.
+ *
+ * @author Gregor Karlinger
+ * @version $Id$
+ */
+public class ContentLocRefImpl extends ContentImpl implements ContentLocRef
+{
+ /**
+ * The location reference URI pointing to the actual remote location of the content.
+ */
+ private String locationReferenceURI_;
+
+ /**
+ * @see at.gv.egovernment.moa.spss.api.common.ContentLocRef#getLocationReferenceURI()
+ */
+ public String getLocationReferenceURI()
+ {
+ return locationReferenceURI_;
+ }
+
+ /**
+ * Sets the location reference URI pointing to the actual remote location of the content.
+ *
+ * @param locationReferenceURI the location reference URI.
+ */
+ public void setLocationReferenceURI(String locationReferenceURI)
+ {
+ locationReferenceURI_ = locationReferenceURI;
+ }
+
+ /**
+ * Gets the type of content.
+ *
+ * @return LOCREF_CONTENT.
+ */
+ public int getContentType() {
+ return LOCREF_CONTENT;
+ }
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentReferenceImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentReferenceImpl.java
new file mode 100644
index 000000000..25d54f38b
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentReferenceImpl.java
@@ -0,0 +1,39 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.common.ContentReference;
+
+/**
+ * Default implementation of <code>ContentReference</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ContentReferenceImpl
+ extends ContentImpl
+ implements ContentReference {
+
+ /**
+ * Gets the type of content.
+ *
+ * @return REFERENCE_CONTENT
+ */
+ public int getContentType() {
+ return REFERENCE_CONTENT;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentXMLImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentXMLImpl.java
new file mode 100644
index 000000000..e4fcd123f
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentXMLImpl.java
@@ -0,0 +1,55 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.spss.api.common.ContentXML;
+
+/**
+ * Default implementation of <code>ContentXML</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class ContentXMLImpl extends ContentImpl implements ContentXML {
+
+ /** The nodes making up the XML content. */
+ private NodeList xmlContent;
+
+ /**
+ * Sets the nodes making up the XML content.
+ *
+ * @param xmlContent The XML content.
+ */
+ public void setXMLContent(NodeList xmlContent) {
+ this.xmlContent = xmlContent;
+ }
+
+ public NodeList getXMLContent() {
+ return xmlContent;
+ }
+
+ /**
+ * Gets the type of content.
+ *
+ * @return XML_CONTENT
+ */
+ public int getContentType() {
+ return XML_CONTENT;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileExplicitImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileExplicitImpl.java
new file mode 100644
index 000000000..bab853b02
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileExplicitImpl.java
@@ -0,0 +1,81 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfileExplicit;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureLocation;
+
+/**
+ * Default implementation of
+ * <codeCreateSignatureEnvironmentProfileExplicit</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CreateSignatureEnvironmentProfileExplicitImpl
+ implements CreateSignatureEnvironmentProfileExplicit {
+
+ /** The insertion location of the signature to be created. */
+ private CreateSignatureLocation createSignatureLocation;
+
+ /** Supplemental information for evaluating the signature environment. */
+ private List supplements;
+
+ /**
+ * Sets the insertion location of the signature to be created.
+ *
+ * @param createSignatureLocation The insertion location of the signature to
+ * be created.
+ */
+ public void setCreateSignatureLocation(CreateSignatureLocation createSignatureLocation) {
+ this.createSignatureLocation = createSignatureLocation;
+ }
+
+ public CreateSignatureLocation getCreateSignatureLocation() {
+ return createSignatureLocation;
+ }
+
+ /**
+ * Sets the supplemental information for evaluating the signature
+ * environment.
+ *
+ * @param supplements The supplemental information.
+ */
+ public void setSupplements(List supplements) {
+ this.supplements =
+ supplements != null
+ ? Collections.unmodifiableList(new ArrayList(supplements))
+ : null;
+ }
+
+ public List getSupplements() {
+ return supplements;
+ }
+
+ /**
+ * Gets the type of profile.
+ *
+ * @return EXPLICIT_CREATESIGNATUREENVIRONMENTPROFILE
+ */
+ public int getCreateSignatureEnvironmentProfileType() {
+ return EXPLICIT_CREATESIGNATUREENVIRONMENTPROFILE;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileIDImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileIDImpl.java
new file mode 100644
index 000000000..171ed0202
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileIDImpl.java
@@ -0,0 +1,54 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfileID;
+
+/**
+ * Default implementation of <code>CreateSignatureEnvironmentProfileID</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CreateSignatureEnvironmentProfileIDImpl
+ implements CreateSignatureEnvironmentProfileID {
+
+ /** The profile ID. */
+ private String createSignatureEnvironmentProfileID;
+
+ /**
+ * Sets the profile ID.
+ *
+ * @param profileID The profile ID.
+ */
+ public void setCreateSignatureEnvironmentProfileID(String profileID) {
+ this.createSignatureEnvironmentProfileID = profileID;
+ }
+
+ public String getCreateSignatureEnvironmentProfileID() {
+ return createSignatureEnvironmentProfileID;
+ }
+
+ /**
+ * Gets the type of profile.
+ *
+ * @return ID_CREATESIGNATUREENVIRONMENTPROFILE
+ */
+ public int getCreateSignatureEnvironmentProfileType() {
+ return ID_CREATESIGNATUREENVIRONMENTPROFILE;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureInfoImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureInfoImpl.java
new file mode 100644
index 000000000..cfe4583a6
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureInfoImpl.java
@@ -0,0 +1,65 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfile;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureInfo;
+
+/**
+ * Default implementation of <code>CreateSignatureInfo</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class CreateSignatureInfoImpl implements CreateSignatureInfo {
+
+ /** The signature environment that will contain the newly created
+ * signature. */
+ private Content createSignatureEnvironment;
+
+ /** Additional information about the signature environment. */
+ private CreateSignatureEnvironmentProfile createSignatureEnvironmentProfile;
+
+ /**
+ * Sets the signature environment that will contain the newly created
+ * signature.
+ *
+ * @param createSignatureEnvironment The signature environment.
+ */
+ public void setCreateSignatureEnvironment(Content createSignatureEnvironment) {
+ this.createSignatureEnvironment = createSignatureEnvironment;
+ }
+
+ public Content getCreateSignatureEnvironment() {
+ return createSignatureEnvironment;
+ }
+
+ /**
+ * Sets the signature environment profile containing additional information
+ * about the signature environment.
+ *
+ * @param profile The signature environment profile.
+ */
+ public void setCreateSignatureEnvironmentProfile(CreateSignatureEnvironmentProfile profile) {
+ this.createSignatureEnvironmentProfile = profile;
+ }
+
+ public CreateSignatureEnvironmentProfile getCreateSignatureEnvironmentProfile() {
+ return createSignatureEnvironmentProfile;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureLocationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureLocationImpl.java
new file mode 100644
index 000000000..22241c44b
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureLocationImpl.java
@@ -0,0 +1,46 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureLocation;
+
+/**
+ * Default implementation of <code>CreateSignatureLocation</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class CreateSignatureLocationImpl
+ extends ElementSelectorImpl
+ implements CreateSignatureLocation {
+
+ /** The index of the newly created signature. */
+ private int index;
+
+ /**
+ * Sets the index of the newly created signature.
+ *
+ * @param index The index of the newly created signature.
+ */
+ public void setIndex(int index) {
+ this.index = index;
+ }
+
+ public int getIndex() {
+ return index;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoImpl.java
new file mode 100644
index 000000000..4572e21fd
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoImpl.java
@@ -0,0 +1,66 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfo;
+
+/**
+ * Default implementation of <code>CreateTransformsInfo</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class CreateTransformsInfoImpl implements CreateTransformsInfo {
+ /** The dsig:Transforms. */
+ private List transforms;
+ /** Meta information about the data resulting from the transforms. */
+ private MetaInfo finalDataMetaInfo;
+
+ /**
+ * Sets the transforms.
+ *
+ * @param transforms The transforms.
+ */
+ public void setTransforms(List transforms) {
+ this.transforms =
+ transforms != null
+ ? Collections.unmodifiableList(new ArrayList(transforms))
+ : null;
+ }
+
+ public List getTransforms() {
+ return transforms;
+ }
+
+ /**
+ * Sets the meta information about the data resulting from the transforms.
+ *
+ * @param finalDataMetaInfo The meta information.
+ */
+ public void setFinalDataMetaInfo(MetaInfo finalDataMetaInfo) {
+ this.finalDataMetaInfo = finalDataMetaInfo;
+ }
+
+ public MetaInfo getFinalDataMetaInfo() {
+ return finalDataMetaInfo;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileExplicitImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileExplicitImpl.java
new file mode 100644
index 000000000..4362b7721
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileExplicitImpl.java
@@ -0,0 +1,77 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfileExplicit;
+
+/**
+ * Default implementation of <code>CreateTransformsInfoProfileExplicit</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class CreateTransformsInfoProfileExplicitImpl
+ implements CreateTransformsInfoProfileExplicit {
+
+ /** Transformation information. */
+ private CreateTransformsInfo transformsInfo;
+ /** Additional data for the transformations. */
+ private List supplements = new ArrayList();
+
+ /**
+ * Sets the transformation information.
+ *
+ * @param transformsInfo The transformation information.
+ */
+ public void setCreateTransformsInfo(CreateTransformsInfo transformsInfo) {
+ this.transformsInfo = transformsInfo;
+ }
+
+ public CreateTransformsInfo getCreateTransformsInfo() {
+ return transformsInfo;
+ }
+
+ /**
+ * Sets the additional data for the transformations.
+ *
+ * @param supplements The additional data.
+ */
+ public void setSupplements(List supplements) {
+ this.supplements =
+ supplements != null
+ ? Collections.unmodifiableList(new ArrayList(supplements))
+ : null;
+ }
+
+ public List getSupplements() {
+ return supplements;
+ }
+
+ /**
+ * Gets the type of profile.
+ *
+ * @return EXPLICIT_CREATETRANSFORMSINFOPROFILE
+ */
+ public int getCreateTransformsInfoProfileType() {
+ return EXPLICIT_CREATETRANSFORMSINFOPROFILE;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileIDImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileIDImpl.java
new file mode 100644
index 000000000..85fcebb93
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileIDImpl.java
@@ -0,0 +1,53 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfileID;
+
+/**
+ * Default implementation of <code>CreateTransformsInfoProfileID</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class CreateTransformsInfoProfileIDImpl
+ implements CreateTransformsInfoProfileID {
+
+ /** The profile ID. */
+ private String createTransformsID;
+
+ /**
+ * Sets the profile ID.
+ * @param createTransformsID The profile ID.
+ */
+ public void setCreateTransformsInfoProfileID(String createTransformsID) {
+ this.createTransformsID = createTransformsID;
+ }
+
+ public String getCreateTransformsInfoProfileID() {
+ return createTransformsID;
+ }
+
+ /**
+ * Gets the type of profile.
+ *
+ * @return ID_CREATETRANSFORMSINFOPROFILE
+ */
+ public int getCreateTransformsInfoProfileType() {
+ return ID_CREATETRANSFORMSINFOPROFILE;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureRequestImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureRequestImpl.java
new file mode 100644
index 000000000..2c7f2557f
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureRequestImpl.java
@@ -0,0 +1,68 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest;
+
+/**
+ * Default implementation of <code>CreateXMLSignatureRequest</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class CreateXMLSignatureRequestImpl
+ implements CreateXMLSignatureRequest {
+
+ /** The identifier for selecting the private keys for creating the signature.*/
+ private String keyIdentifier;
+ /** Information for creating a single signature. */
+ private List singleSignatureInfos = new ArrayList();
+
+ /**
+ * Sets the identifier for selecting the private keys for creating the
+ * signature.
+ *
+ * @param keyIdentifier The identifier for selecting the private keys.
+ */
+ public void setKeyIdentifier(String keyIdentifier) {
+ this.keyIdentifier = keyIdentifier;
+ }
+
+ public String getKeyIdentifier() {
+ return keyIdentifier;
+ }
+
+ /**
+ * Sets the information for creating single signatures.
+ *
+ * @param singleSignaureInfos The information for creating single signatures.
+ */
+ public void setSingleSignatureInfos(List singleSignaureInfos) {
+ this.singleSignatureInfos =
+ singleSignaureInfos != null
+ ? Collections.unmodifiableList(new ArrayList(singleSignaureInfos))
+ : null;
+ }
+
+ public List getSingleSignatureInfos() {
+ return singleSignatureInfos;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureResponseImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureResponseImpl.java
new file mode 100644
index 000000000..f6f1ee7b4
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureResponseImpl.java
@@ -0,0 +1,52 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse;
+
+/**
+ * Default implementation of <code>CreateXMLSignatureResponse</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class CreateXMLSignatureResponseImpl
+ implements CreateXMLSignatureResponse {
+
+ /** The elements contained in the response. */
+ private List responseElements = new ArrayList();
+
+ /**
+ * Sets the elements contained in the response.
+ *
+ * @param responseElements The response elements.
+ */
+ public void setResponseElements(List responseElements) {
+ this.responseElements =
+ responseElements != null
+ ? Collections.unmodifiableList(new ArrayList(responseElements))
+ : null;
+ }
+
+ public List getResponseElements() {
+ return responseElements;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/DataObjectInfoImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/DataObjectInfoImpl.java
new file mode 100644
index 000000000..58ed3b87a
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/DataObjectInfoImpl.java
@@ -0,0 +1,94 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfile;
+import at.gv.egovernment.moa.spss.api.xmlsign.DataObjectInfo;
+
+/**
+ * Default implementation of <code>DataObjectInfo</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class DataObjectInfoImpl implements DataObjectInfo {
+ /** The signature structure type. */
+ private String stucture;
+ /** Whether a reference will be placed in the signature itself or in the
+ * manifest */
+ private boolean childOfManifest;
+ /** The data object to be signed. */
+ private Content dataObject;
+ /** The profile containing additional information for the transformations. */
+ private CreateTransformsInfoProfile createTransformsInfoProfile;
+
+ /**
+ * Sets the signature structure type.
+ *
+ * @param structure The signature structure type.
+ */
+ public void setStructure(String structure) {
+ this.stucture = structure;
+ }
+
+ public String getStructure() {
+ return stucture;
+ }
+
+ /**
+ * Sets whether a reference will be placed in the signature itself or in the
+ * manifest.
+ *
+ * @param childOfManifest Whether to put the reference in the signature of
+ * in the manifest.
+ */
+ public void setChildOfManifest(boolean childOfManifest) {
+ this.childOfManifest = childOfManifest;
+ }
+
+ public boolean isChildOfManifest() {
+ return childOfManifest;
+ }
+
+ /**
+ * Sets the data object to be signed.
+ *
+ * @param dataObject The data object to be signed.
+ */
+ public void setDataObject(Content dataObject) {
+ this.dataObject = dataObject;
+ }
+
+ public Content getDataObject() {
+ return dataObject;
+ }
+
+ /**
+ * Sets additional information for the transformations.
+ *
+ * @param profile The profile containing additional information for the
+ * transformations.
+ */
+ public void setCreateTransformsInfoProfile(CreateTransformsInfoProfile profile) {
+ this.createTransformsInfoProfile = profile;
+ }
+
+ public CreateTransformsInfoProfile getCreateTransformsInfoProfile() {
+ return createTransformsInfoProfile;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ElementSelectorImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ElementSelectorImpl.java
new file mode 100644
index 000000000..570339dd4
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ElementSelectorImpl.java
@@ -0,0 +1,62 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import at.gv.egovernment.moa.spss.api.common.ElementSelector;
+
+/**
+ * Default implementation of <code>ElementSelector</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class ElementSelectorImpl implements ElementSelector {
+ /** The XPath expression pointing to the element. */
+ private String xPathExpression;
+ /** The namespace declarations to apply for evaluating the XPath */
+ private Map namespaceDeclarations = new HashMap();
+
+ /**
+ * Sets the XPath expression pointing to the element.
+ *
+ * @param xPathExpression XPath expression pointing to the element.
+ */
+ public void setXPathExpression(String xPathExpression) {
+ this.xPathExpression = xPathExpression;
+ }
+
+ public String getXPathExpression() {
+ return xPathExpression;
+ }
+
+ /**
+ * Sets namespace declarations to apply for evaluating the XPath.
+ *
+ * @param namespaceDeclarations The namespace declarations to apply for
+ * evaluating the XPath.
+ */
+ public void setNamespaceDeclarations(Map namespaceDeclarations) {
+ this.namespaceDeclarations = namespaceDeclarations;
+ }
+
+ public Map getNamespaceDeclarations() {
+ return namespaceDeclarations;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/EnvelopedSignatureTransformImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/EnvelopedSignatureTransformImpl.java
new file mode 100644
index 000000000..a4cebd590
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/EnvelopedSignatureTransformImpl.java
@@ -0,0 +1,37 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.common.EnvelopedSignatureTransform;
+
+/**
+ * Default implementation of <code>EnvelopedSignatureTransform</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class EnvelopedSignatureTransformImpl
+ extends TransformImpl
+ implements EnvelopedSignatureTransform {
+
+ /**
+ * Create a <code>EnvelopedSignatureTransformImpl</code>.
+ */
+ public EnvelopedSignatureTransformImpl() {
+ setAlgorithmURI(ENVELOPED_SIGNATURE);
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ErrorResponseImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ErrorResponseImpl.java
new file mode 100644
index 000000000..b538ec05c
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ErrorResponseImpl.java
@@ -0,0 +1,67 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.xmlsign.ErrorResponse;
+
+/**
+ * Default implementation of <code>ErrorResponse</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class ErrorResponseImpl implements ErrorResponse {
+ /** The error code. */
+ private int code;
+ /** Verbose error message. */
+ private String info;
+
+ /**
+ * Sets the error code.
+ *
+ * @param code The error code.
+ */
+ public void setErrorCode(int code) {
+ this.code = code;
+ }
+
+ public int getErrorCode() {
+ return code;
+ }
+
+ /**
+ * Sets the verbose error information.
+ *
+ * @param info The verbose error information.
+ */
+ public void setInfo(String info) {
+ this.info = info;
+ }
+
+ public String getInfo() {
+ return info;
+ }
+
+ /**
+ * Gets the response type.
+ *
+ * @return ERROR_RESPONSE
+ */
+ public int getResponseType() {
+ return ERROR_RESPONSE;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ExclusiveCanonicalizationTransformImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ExclusiveCanonicalizationTransformImpl.java
new file mode 100644
index 000000000..42c5ff653
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ExclusiveCanonicalizationTransformImpl.java
@@ -0,0 +1,63 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.common.ExclusiveCanonicalizationTransform;
+
+/**
+ * Default implementation of <code>ExclusiveCanonicalizationTransform</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ExclusiveCanonicalizationTransformImpl
+ extends TransformImpl
+ implements ExclusiveCanonicalizationTransform {
+
+ /** The namespaces to treat according to canonical XML. */
+ private List inclusiveNamespacePrefixes;
+
+ /**
+ * Create a <code>ExclusiveCanonicalizationTransformImpl</code> object.
+ *
+ * @param algorithmURI The algorithm URI identifying the transformation
+ * algorithm.
+ */
+ public ExclusiveCanonicalizationTransformImpl(String algorithmURI) {
+ setAlgorithmURI(algorithmURI);
+ }
+
+ /**
+ * Sets the namespaces to treat according to canonical XML.
+ * @param inclusiveNamespacePrefixes The namespaces to treat according to
+ * canonical XML.
+ */
+ public void setInclusiveNamespacePrefixes(List inclusiveNamespacePrefixes) {
+ this.inclusiveNamespacePrefixes =
+ inclusiveNamespacePrefixes != null
+ ? Collections.unmodifiableList(new ArrayList(inclusiveNamespacePrefixes))
+ : null;
+ }
+
+ public List getInclusiveNamespacePrefixes() {
+ return inclusiveNamespacePrefixes;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataBinaryImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataBinaryImpl.java
new file mode 100644
index 000000000..f030a2598
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataBinaryImpl.java
@@ -0,0 +1,114 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.io.InputStream;
+
+import at.gv.egovernment.moa.spss.MOARuntimeException;
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.common.ContentBinary;
+import at.gv.egovernment.moa.spss.api.common.InputData;
+
+/**
+ * Content wrapper decorating a binary content with two additional attributes
+ * needed for returning <code>HashInputData</code> and <code>ReferenceInputData
+ * </code> information as part of <code>VerifyXMLSignatureResponse</code>.
+ *
+ * @author Gregor Karlinger
+ *
+ * @version $Id$
+ */
+public class InputDataBinaryImpl implements ContentBinary, InputData
+{
+ /**
+ * The wrapped <code>Content</code>.
+ */
+ protected ContentBinary wrapped_;
+
+ /**
+ * This attribute signals what kind of container the XMLDSIG <code>Reference</code>
+ * this <code>InputData</code> belongs to is part of.
+ */
+ protected String partOf_;
+
+ /**
+ * If this <code>InputData</code> belongs to an XMLDSIG <code>Reference</code>
+ * being part of either a XMLDSIGManifest or a SignatureManifest, this attribute
+ * (a positive int) signals the particular <code>Reference</code> of the XMLDSIG
+ * <code>SignedInfo</code> referring to the XMLDSIGManifest or SignatureManifest
+ * respectively.
+ */
+ protected int referringReferenceNumber_;
+
+ /**
+ * Creates a new instance.
+ *
+ * @param wrapped The wrapped <code>Content</code>. Must be of type {@link Content#BINARY_CONTENT}.
+ *
+ * @param partOf see {@link InputData}
+ *
+ * @param referringReferenceNumber see {@link InputData}
+ */
+ public InputDataBinaryImpl(Content wrapped, String partOf, int referringReferenceNumber) throws MOARuntimeException
+ {
+ if (wrapped.getContentType() != Content.BINARY_CONTENT) throw new MOARuntimeException("9901", null);
+
+ wrapped_ = (ContentBinary) wrapped;
+ partOf_ = partOf;
+ referringReferenceNumber_ = referringReferenceNumber;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.spss.api.common.Content#getContentType()
+ */
+ public int getContentType()
+ {
+ return wrapped_.getContentType();
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.spss.api.common.Content#getReference()
+ */
+ public String getReference()
+ {
+ return wrapped_.getReference();
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.spss.api.common.ContentBinary#getBinaryContent()
+ */
+ public InputStream getBinaryContent()
+ {
+ return wrapped_.getBinaryContent();
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.spss.api.common.InputData#getPartOf()
+ */
+ public String getPartOf()
+ {
+ return partOf_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.spss.api.common.InputData#getReferringReferenceNumber()
+ */
+ public int getReferringReferenceNumber()
+ {
+ return referringReferenceNumber_;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataXMLImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataXMLImpl.java
new file mode 100644
index 000000000..cd9c34888
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataXMLImpl.java
@@ -0,0 +1,114 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.spss.MOARuntimeException;
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.common.ContentXML;
+import at.gv.egovernment.moa.spss.api.common.InputData;
+
+/**
+ * Content wrapper decorating an XML content with two additional attributes
+ * needed for returning <code>HashInputData</code> and <code>ReferenceInputData
+ * </code> information as part of <code>VerifyXMLSignatureResponse</code>.
+ *
+ * @author Gregor Karlinger
+ *
+ * @version $Id$
+ */
+public class InputDataXMLImpl implements ContentXML, InputData
+{
+ /**
+ * The wrapped <code>ContentXML</code>.
+ */
+ protected ContentXML wrapped_;
+
+ /**
+ * This attribute signals what kind of container the XMLDSIG <code>Reference</code>
+ * this <code>InputData</code> belongs to is part of.
+ */
+ protected String partOf_;
+
+ /**
+ * If this <code>InputData</code> belongs to an XMLDSIG <code>Reference</code>
+ * being part of either a XMLDSIGManifest or a SignatureManifest, this attribute
+ * (a positive int) signals the particular <code>Reference</code> of the XMLDSIG
+ * <code>SignedInfo</code> referring to the XMLDSIGManifest or SignatureManifest
+ * respectively.
+ */
+ protected int referringReferenceNumber_;
+
+ /**
+ * Creates a new instance.
+ *
+ * @param wrapped The wrapped <code>ContentBinary</code>. Must be of type {@link Content#XML_CONTENT}.
+ *
+ * @param partOf see {@link InputData}
+ *
+ * @param referringReferenceNumber see {@link InputData}
+ */
+ public InputDataXMLImpl(Content wrapped, String partOf, int referringReferenceNumber)
+ {
+ if (wrapped.getContentType() != Content.XML_CONTENT) throw new MOARuntimeException("9901", null);
+
+ wrapped_ = (ContentXML) wrapped;
+ partOf_ = partOf;
+ referringReferenceNumber_ = referringReferenceNumber;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.spss.api.common.Content#getContentType()
+ */
+ public int getContentType()
+ {
+ return wrapped_.getContentType();
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.spss.api.common.Content#getReference()
+ */
+ public String getReference()
+ {
+ return wrapped_.getReference();
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.spss.api.common.ContentXML#getXMLContent()
+ */
+ public NodeList getXMLContent()
+ {
+ return wrapped_.getXMLContent();
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.spss.api.common.InputData#getPartOf()
+ */
+ public String getPartOf()
+ {
+ return partOf_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.spss.api.common.InputData#getReferringReferenceNumber()
+ */
+ public int getReferringReferenceNumber()
+ {
+ return referringReferenceNumber_;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultImpl.java
new file mode 100644
index 000000000..a34e4dd00
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultImpl.java
@@ -0,0 +1,59 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.xmlverify.ManifestRefsCheckResult;
+import at.gv.egovernment.moa.spss.api.xmlverify.ManifestRefsCheckResultInfo;
+
+/**
+ * Default implementation of <code>ManifestRefsCheckResult</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class ManifestRefsCheckResultImpl implements ManifestRefsCheckResult {
+ /** The numerical check code. */
+ private int code;
+ /** Additional information about the check. */
+ private ManifestRefsCheckResultInfo info;
+
+ /**
+ * Sets the check code.
+ *
+ * @param code A numerical representation of the result of the manifest check.
+ */
+ public void setCode(int code) {
+ this.code = code;
+ }
+
+ public int getCode() {
+ return code;
+ }
+
+ /**
+ * Sets a reference to the manifest.
+ *
+ * @param info The reference to the manifest.
+ */
+ public void setInfo(ManifestRefsCheckResultInfo info) {
+ this.info = info;
+ }
+
+ public ManifestRefsCheckResultInfo getInfo() {
+ return info;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultInfoImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultInfoImpl.java
new file mode 100644
index 000000000..694d99c09
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultInfoImpl.java
@@ -0,0 +1,47 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.xmlverify.ManifestRefsCheckResultInfo;
+
+/**
+ * Default implementation of <code>ManifestRefsCheckResultInfo</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class ManifestRefsCheckResultInfoImpl
+ extends ReferencesCheckResultInfoImpl
+ implements ManifestRefsCheckResultInfo {
+
+ /** The position of the signature reference containing the reference to the
+ * manifest being described by this object.*/
+ private int referringSignatureReference;
+
+ /**
+ * Sets the position of the signature reference containing the reference to
+ * the manifest being described by this object.
+ * @param referringSignatureReference The position of the signature reference.
+ */
+ public void setReferringSignatureReference(int referringSignatureReference) {
+ this.referringSignatureReference = referringSignatureReference;
+ }
+
+ public int getReferringSignatureReference() {
+ return referringSignatureReference;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/MetaInfoImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/MetaInfoImpl.java
new file mode 100644
index 000000000..309bb88e0
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/MetaInfoImpl.java
@@ -0,0 +1,90 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+
+/**
+ * Default implementation of <code>MetaInfo</code>.
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class MetaInfoImpl implements MetaInfo {
+ /** Information about the MIME type. */
+ private String mimeType;
+ /** URI pointing to a description of the content. */
+ private String description;
+ /** Descriptive XML content. */
+ private NodeList anyElements;
+ /** Type information for XML signature creation */
+ private String type;
+
+ /**
+ * Sets the MIME type.
+ *
+ * @param mimeType The MIME type to set.
+ */
+ public void setMimeType(String mimeType) {
+ this.mimeType = mimeType;
+ }
+
+ public String getMimeType() {
+ return mimeType;
+ }
+
+ /**
+ * Sets the URI pointing to a description of the content.
+ *
+ * @param description The URI pointing to a description of the content.
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * Sets descriptive XML content.
+ *
+ * @param anyElements The elements to set.
+ */
+ public void setAnyElements(NodeList anyElements) {
+ this.anyElements = anyElements;
+ }
+
+ public NodeList getAnyElements() {
+ return anyElements;
+ }
+
+ /**
+ * Sets the XML signature creation type information.
+ *
+ * @param type the XML signature creation type information to set.
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferenceInfoImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferenceInfoImpl.java
new file mode 100644
index 000000000..470532cde
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferenceInfoImpl.java
@@ -0,0 +1,53 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferenceInfo;
+
+/**
+ * Default implementation of <code>ReferenceInfo</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class ReferenceInfoImpl implements ReferenceInfo {
+ /** Profile containing the transforms allowed in the signature. */
+ private List verifyTransformsInfoProfiles;
+
+ /**
+ * Sets the transforms profile used for verifying the transforms contained
+ * in the signature.
+ *
+ * @param verifyTransformsInfoProfiles The profiles containing the transforms
+ * allowed in the signature.
+ */
+ public void setVerifyTransformsInfoProfiles(List verifyTransformsInfoProfiles) {
+ this.verifyTransformsInfoProfiles =
+ verifyTransformsInfoProfiles != null
+ ? Collections.unmodifiableList(
+ new ArrayList(verifyTransformsInfoProfiles))
+ : null;
+ }
+
+ public List getVerifyTransformsInfoProfiles() {
+ return verifyTransformsInfoProfiles;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultImpl.java
new file mode 100644
index 000000000..00f84bbd0
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultImpl.java
@@ -0,0 +1,61 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResult;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResultInfo;
+
+/**
+ * Default implementation of <code>ReferencesCheckResult</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ReferencesCheckResultImpl implements ReferencesCheckResult {
+ /** The check code. */
+ private int code;
+ /** Additional information about the reference check. */
+ private ReferencesCheckResultInfo info;
+
+ /**
+ * Sets the check code.
+ *
+ * @param code A numerical representation of the result of the reference
+ * check.
+ */
+ public void setCode(int code) {
+ this.code = code;
+ }
+
+ public int getCode() {
+ return code;
+ }
+
+ /**
+ * Sets additional information about the reference check.
+ *
+ * @param manifestRefsCheckResultInfo Additional information about the
+ * reference check.
+ */
+ public void setInfo(ReferencesCheckResultInfo manifestRefsCheckResultInfo) {
+ this.info = manifestRefsCheckResultInfo;
+ }
+
+ public ReferencesCheckResultInfo getInfo() {
+ return info;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultInfoImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultInfoImpl.java
new file mode 100644
index 000000000..700883fb9
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultInfoImpl.java
@@ -0,0 +1,61 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResultInfo;
+
+/**
+ * Default implementation of <code>ReferencesCheckResultInfo</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ReferencesCheckResultInfoImpl
+ implements ReferencesCheckResultInfo {
+
+ /** Additional information about the references check. */
+ private NodeList anyOtherInfo;
+ /** The indexes of the failed references. */
+ private int[] failedReferences = new int[0];
+
+ /**
+ * Sets additional information about the references check.
+ * @param anyOtherInfo Additional information about the references check.
+ */
+ public void setAnyOtherInfo(NodeList anyOtherInfo) {
+ this.anyOtherInfo = anyOtherInfo;
+ }
+
+ public NodeList getAnyOtherInfo() {
+ return anyOtherInfo;
+ }
+
+ /**
+ * Sets the indexes of the failed references.
+ *
+ * @param failedReferences The indexes of the failed references.
+ */
+ public void setFailedReferences(int[] failedReferences) {
+ this.failedReferences = failedReferences;
+ }
+
+ public int[] getFailedReferences() {
+ return failedReferences;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SPSSFactoryImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SPSSFactoryImpl.java
new file mode 100644
index 000000000..7c8b7b561
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SPSSFactoryImpl.java
@@ -0,0 +1,586 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.io.InputStream;
+import java.math.BigInteger;
+import java.security.cert.X509Certificate;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSContent;
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSDataObject;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponseElement;
+import at.gv.egovernment.moa.spss.api.common.CheckResult;
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+import at.gv.egovernment.moa.spss.api.common.SignerInfo;
+import at.gv.egovernment.moa.spss.api.common.Transform;
+import at.gv.egovernment.moa.spss.api.common.X509IssuerSerial;
+import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation;
+import at.gv.egovernment.moa.spss.api.common.XPathFilter;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfile;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureLocation;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfile;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse;
+import at.gv.egovernment.moa.spss.api.xmlsign.DataObjectInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.ErrorResponse;
+import at.gv.egovernment.moa.spss.api.xmlsign.SignatureEnvironmentResponse;
+import at.gv.egovernment.moa.spss.api.xmlsign.SingleSignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.ManifestRefsCheckResult;
+import at.gv.egovernment.moa.spss.api.xmlverify.ManifestRefsCheckResultInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferenceInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResult;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResultInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.SignatureManifestCheckParams;
+import at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfile;
+import at.gv.egovernment.moa.spss.api.xmlverify.TransformParameter;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureLocation;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfile;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse;
+
+/**
+ * Default implementation of <code>SPSSFactory</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class SPSSFactoryImpl extends SPSSFactory {
+
+ public CreateXMLSignatureRequest createCreateXMLSignatureRequest(
+ String keyIdentifier,
+ List singleSignatureInfos) {
+ CreateXMLSignatureRequestImpl createXMLSignatureRequest =
+ new CreateXMLSignatureRequestImpl();
+ createXMLSignatureRequest.setKeyIdentifier(keyIdentifier);
+ createXMLSignatureRequest.setSingleSignatureInfos(singleSignatureInfos);
+ return createXMLSignatureRequest;
+ }
+
+ public SingleSignatureInfo createSingleSignatureInfo(
+ List dataObjectInfos,
+ CreateSignatureInfo createSignatureInfo,
+ boolean securityLayerConform) {
+ SingleSignatureInfoImpl singleSignatureInfo = new SingleSignatureInfoImpl();
+ singleSignatureInfo.setDataObjectInfos(dataObjectInfos);
+ singleSignatureInfo.setCreateSignatureInfo(createSignatureInfo);
+ singleSignatureInfo.setSecurityLayerConform(securityLayerConform);
+ return singleSignatureInfo;
+ }
+ public DataObjectInfo createDataObjectInfo(
+ String structure,
+ boolean childOfManifest,
+ Content dataObject,
+ CreateTransformsInfoProfile createTransformsInfoProfile) {
+ DataObjectInfoImpl dataObjectInfo = new DataObjectInfoImpl();
+ dataObjectInfo.setStructure(structure);
+ dataObjectInfo.setChildOfManifest(childOfManifest);
+ dataObjectInfo.setDataObject(dataObject);
+ dataObjectInfo.setCreateTransformsInfoProfile(createTransformsInfoProfile);
+ return dataObjectInfo;
+ }
+
+ public CreateTransformsInfoProfile createCreateTransformsInfoProfile(String profileID) {
+
+ CreateTransformsInfoProfileIDImpl createTransformsInfoProfile =
+ new CreateTransformsInfoProfileIDImpl();
+ createTransformsInfoProfile.setCreateTransformsInfoProfileID(profileID);
+ return createTransformsInfoProfile;
+ }
+
+ public CreateTransformsInfoProfile createCreateTransformsInfoProfile(
+ CreateTransformsInfo transformsInfo,
+ List supplements) {
+ CreateTransformsInfoProfileExplicitImpl createTransformsInfoProfile =
+ new CreateTransformsInfoProfileExplicitImpl();
+ createTransformsInfoProfile.setCreateTransformsInfo(transformsInfo);
+ createTransformsInfoProfile.setSupplements(supplements);
+ return createTransformsInfoProfile;
+ }
+
+ public CreateTransformsInfo createCreateTransformsInfo(
+ List transforms,
+ MetaInfo finalDataMetaInfo) {
+ CreateTransformsInfoImpl createTransformsInfo =
+ new CreateTransformsInfoImpl();
+
+ createTransformsInfo.setTransforms(transforms);
+ createTransformsInfo.setFinalDataMetaInfo(finalDataMetaInfo);
+ return createTransformsInfo;
+ }
+
+ public CreateSignatureInfo createCreateSignatureInfo(
+ Content createSignatureEnvironment,
+ CreateSignatureEnvironmentProfile createSignatureEnvironmentProfile) {
+ CreateSignatureInfoImpl createSignatureInfo = new CreateSignatureInfoImpl();
+ createSignatureInfo.setCreateSignatureEnvironment(
+ createSignatureEnvironment);
+ createSignatureInfo.setCreateSignatureEnvironmentProfile(
+ createSignatureEnvironmentProfile);
+ return createSignatureInfo;
+ }
+
+ public CreateSignatureEnvironmentProfile createCreateSignatureEnvironmentProfile(
+ CreateSignatureLocation createSignatureLocation,
+ List supplements) {
+ CreateSignatureEnvironmentProfileExplicitImpl createSignatureEnvironmentProfile =
+ new CreateSignatureEnvironmentProfileExplicitImpl();
+ createSignatureEnvironmentProfile.setCreateSignatureLocation(
+ createSignatureLocation);
+ createSignatureEnvironmentProfile.setSupplements(supplements);
+ return createSignatureEnvironmentProfile;
+ }
+
+ public CreateSignatureLocation createCreateSignatureLocation(
+ String signatureLocationXPath,
+ int signatureLocationIndex,
+ Map namespaceDeclarations) {
+ CreateSignatureLocationImpl createSignatureLocation =
+ new CreateSignatureLocationImpl();
+ createSignatureLocation.setIndex(signatureLocationIndex);
+ createSignatureLocation.setNamespaceDeclarations(namespaceDeclarations);
+ createSignatureLocation.setXPathExpression(signatureLocationXPath);
+ return createSignatureLocation;
+ }
+
+ public CreateSignatureEnvironmentProfile createCreateSignatureEnvironmentProfile(String profileID) {
+ CreateSignatureEnvironmentProfileIDImpl createSignatureEnvironmentProfile =
+ new CreateSignatureEnvironmentProfileIDImpl();
+ createSignatureEnvironmentProfile.setCreateSignatureEnvironmentProfileID(
+ profileID);
+ return createSignatureEnvironmentProfile;
+ }
+
+ public CreateXMLSignatureResponse createCreateXMLSignatureResponse(List responseElements) {
+ CreateXMLSignatureResponseImpl createXMLSignatureResponse =
+ new CreateXMLSignatureResponseImpl();
+ createXMLSignatureResponse.setResponseElements(responseElements);
+ return createXMLSignatureResponse;
+ }
+
+ public SignatureEnvironmentResponse createSignatureEnvironmentResponse(Element signatureEnvironment) {
+ SignatureEnvironmentResponseImpl signatureEnvironmentResponse =
+ new SignatureEnvironmentResponseImpl();
+ signatureEnvironmentResponse.setSignatureEnvironment(signatureEnvironment);
+ return signatureEnvironmentResponse;
+ }
+
+ public ErrorResponse createErrorResponse(int code, String info) {
+ ErrorResponseImpl errorResponse = new ErrorResponseImpl();
+ errorResponse.setErrorCode(code);
+ errorResponse.setInfo(info);
+ return errorResponse;
+ }
+
+ public VerifyCMSSignatureRequest createVerifyCMSSignatureRequest(
+ int[] signatories,
+ Date dateTime,
+ InputStream cmsSignature,
+ CMSDataObject dataObject,
+ String trustProfileID) {
+ VerifyCMSSignatureRequestImpl verifyCMSSignatureRequest =
+ new VerifyCMSSignatureRequestImpl();
+ verifyCMSSignatureRequest.setDateTime(dateTime);
+ verifyCMSSignatureRequest.setCMSSignature(cmsSignature);
+ verifyCMSSignatureRequest.setDataObject(dataObject);
+ verifyCMSSignatureRequest.setTrustProfileId(trustProfileID);
+ verifyCMSSignatureRequest.setSignatories(signatories);
+ return verifyCMSSignatureRequest;
+ }
+
+ public CMSDataObject createCMSDataObject(
+ MetaInfo metaInfo,
+ CMSContent content) {
+
+ CMSDataObjectImpl cmsDataObject = new CMSDataObjectImpl();
+ cmsDataObject.setMetaInfo(metaInfo);
+ cmsDataObject.setContent(content);
+
+ return cmsDataObject;
+ }
+
+ public CMSContent createCMSContent(InputStream binaryContent) {
+ CMSContentExplicitImpl cmsContent = new CMSContentExplicitImpl();
+
+ cmsContent.setBinaryContent(binaryContent);
+ return cmsContent;
+ }
+
+ public CMSContent createCMSContent(String referenceURI) {
+ CMSContentReferenceImpl cmsContent = new CMSContentReferenceImpl();
+
+ cmsContent.setReference(referenceURI);
+ return cmsContent;
+ }
+
+
+ public CMSDataObject createCMSDataObject(
+ MetaInfo metaInfo,
+ String referenceURI) {
+ CMSDataObjectImpl cmsDataObject = new CMSDataObjectImpl();
+ CMSContentReferenceImpl cmsContent = new CMSContentReferenceImpl();
+ cmsDataObject.setMetaInfo(metaInfo);
+ cmsContent.setReference(referenceURI);
+ return cmsDataObject;
+ }
+
+ public VerifyCMSSignatureResponse createVerifyCMSSignatureResponse(List responseElements) {
+ VerifyCMSSinatureResponseImpl verifyCMSSignatureResponse =
+ new VerifyCMSSinatureResponseImpl();
+ verifyCMSSignatureResponse.setResponseElements(responseElements);
+ return verifyCMSSignatureResponse;
+ }
+
+ public VerifyCMSSignatureResponseElement createVerifyCMSSignatureResponseElement(
+ SignerInfo signerInfo,
+ CheckResult signatureCheck,
+ CheckResult certificateCheck) {
+ VerifyCMSSignatureResponseElementImpl verifyCMSSignatureResponseElement =
+ new VerifyCMSSignatureResponseElementImpl();
+ verifyCMSSignatureResponseElement.setSignerInfo(signerInfo);
+ verifyCMSSignatureResponseElement.setSignatureCheck(signatureCheck);
+ verifyCMSSignatureResponseElement.setCertificateCheck(certificateCheck);
+
+ return verifyCMSSignatureResponseElement;
+ }
+
+ public VerifyXMLSignatureRequest createVerifyXMLSignatureRequest(
+ Date dateTime,
+ VerifySignatureInfo verifySignatureInfo,
+ List supplementProfiles,
+ SignatureManifestCheckParams signatureManifestParams,
+ boolean returnHashInputData,
+ String trustProfileID) {
+ VerifyXMLSignatureRequestImpl verifyXMLSignatureRequest =
+ new VerifyXMLSignatureRequestImpl();
+ verifyXMLSignatureRequest.setDateTime(dateTime);
+ verifyXMLSignatureRequest.setSignatureInfo(verifySignatureInfo);
+ verifyXMLSignatureRequest.setSupplementProfiles(supplementProfiles);
+ verifyXMLSignatureRequest.setSignatureManifestCheckParams(
+ signatureManifestParams);
+ verifyXMLSignatureRequest.setReturnHashInputData(returnHashInputData);
+ verifyXMLSignatureRequest.setTrustProfileId(trustProfileID);
+ return verifyXMLSignatureRequest;
+ }
+
+ public VerifySignatureInfo createVerifySignatureInfo(
+ Content verifySignatureEnvironment,
+ VerifySignatureLocation verifySignatureLocation) {
+ VerifySignatureInfoImpl verifySignatureInfo = new VerifySignatureInfoImpl();
+ verifySignatureInfo.setVerifySignatureEnvironment(
+ verifySignatureEnvironment);
+ verifySignatureInfo.setVerifySignatureLocation(verifySignatureLocation);
+ return verifySignatureInfo;
+ }
+
+ public VerifySignatureLocation createVerifySignatureLocation(
+ String xPathExpression,
+ Map namespaceDeclarations) {
+ VerifySignatureLocationImpl verifySignatureLocation =
+ new VerifySignatureLocationImpl();
+ verifySignatureLocation.setXPathExpression(xPathExpression);
+ verifySignatureLocation.setNamespaceDeclarations(namespaceDeclarations);
+ return verifySignatureLocation;
+ }
+
+ public SupplementProfile createSupplementProfile(String profileID) {
+ SupplementProfileIDImpl supplementProfileID = new SupplementProfileIDImpl();
+ supplementProfileID.setSupplementProfileID(profileID);
+ return supplementProfileID;
+ }
+
+ public SupplementProfile createSupplementProfile(XMLDataObjectAssociation supplementProfile) {
+ SupplementProfileExplicitImpl supplementProfileExplicit =
+ new SupplementProfileExplicitImpl();
+ supplementProfileExplicit.setSupplementProfile(supplementProfile);
+ return supplementProfileExplicit;
+ }
+
+ public SignatureManifestCheckParams createSignatureManifestCheckParams(
+ List referenceInfos,
+ boolean returnReferenceInputData) {
+ SignatureManifestCheckParamsImpl signatureManifestCheckParams =
+ new SignatureManifestCheckParamsImpl();
+ signatureManifestCheckParams.setReferenceInfos(referenceInfos);
+ signatureManifestCheckParams.setReturnReferenceInputData(
+ returnReferenceInputData);
+ return signatureManifestCheckParams;
+ }
+
+ public ReferenceInfo createReferenceInfo(List verifyTransformsInfoProfiles) {
+ ReferenceInfoImpl referenceInfo = new ReferenceInfoImpl();
+ referenceInfo.setVerifyTransformsInfoProfiles(verifyTransformsInfoProfiles);
+ return referenceInfo;
+ }
+
+ public VerifyTransformsInfoProfile createVerifyTransformsInfoProfile(
+ List transforms,
+ List transformParameters) {
+ VerifyTransformsInfoProfileExplicitImpl verifyTransformsInfoProfile =
+ new VerifyTransformsInfoProfileExplicitImpl();
+
+ verifyTransformsInfoProfile.setTransforms(transforms);
+ verifyTransformsInfoProfile.setTransformParameters(transformParameters);
+
+ return verifyTransformsInfoProfile;
+ }
+
+ public VerifyTransformsInfoProfile createVerifyTransformsInfoProfile(String profileID) {
+ VerifyTransformsInfoProfileIDImpl verifyTransformsInfoProfile =
+ new VerifyTransformsInfoProfileIDImpl();
+ verifyTransformsInfoProfile.setVerifyTransformsInfoProfileID(profileID);
+ return verifyTransformsInfoProfile;
+ }
+
+
+ public TransformParameter createTransformParameter(String URI, String digestMethod, byte[] digestValue) {
+ TransformPatameterHashImpl transformParameter =
+ new TransformPatameterHashImpl();
+ transformParameter.setURI(URI);
+ transformParameter.setDigestMethod(digestMethod);
+ transformParameter.setDigestValue(digestValue);
+ return transformParameter;
+ }
+
+ public TransformParameter createTransformParameter(
+ String URI,
+ InputStream binaryData) {
+ TransformParameterBinaryImpl transformParameter =
+ new TransformParameterBinaryImpl();
+ transformParameter.setURI(URI);
+ transformParameter.setBinaryContent(binaryData);
+ return transformParameter;
+ }
+
+ public TransformParameter createTransformParameter(String URI) {
+ TransformParameterURIImpl transformParameter =
+ new TransformParameterURIImpl();
+ transformParameter.setURI(URI);
+ return transformParameter;
+ }
+
+ public VerifyXMLSignatureResponse createVerifyXMLSignatureResponse(
+ SignerInfo signerInfo,
+ List hashInputDatas,
+ List referenceInputDatas,
+ ReferencesCheckResult signatureCheck,
+ ReferencesCheckResult signatureManifestCheck,
+ List xmlDsigManifestChecks,
+ CheckResult certificateCheck) {
+ VerifyXMLSignatureResponseImpl verifyXMLSignatureResponse =
+ new VerifyXMLSignatureResponseImpl();
+ verifyXMLSignatureResponse.setSignerInfo(signerInfo);
+ verifyXMLSignatureResponse.setHashInputDatas(hashInputDatas);
+ verifyXMLSignatureResponse.setReferenceInputDatas(referenceInputDatas);
+ verifyXMLSignatureResponse.setSignatureCheck(signatureCheck);
+ verifyXMLSignatureResponse.setSignatureManifestCheck(
+ signatureManifestCheck);
+ verifyXMLSignatureResponse.setXMLDsigManifestChecks(xmlDsigManifestChecks);
+ verifyXMLSignatureResponse.setCertificateCheck(certificateCheck);
+
+ return verifyXMLSignatureResponse;
+ }
+
+ public ReferencesCheckResult createReferencesCheckResult(
+ int code,
+ ReferencesCheckResultInfo info) {
+ ReferencesCheckResultImpl referencesCheckResult =
+ new ReferencesCheckResultImpl();
+ referencesCheckResult.setCode(code);
+ referencesCheckResult.setInfo(info);
+ return referencesCheckResult;
+ }
+
+ public ReferencesCheckResultInfo createReferencesCheckResultInfo(
+ NodeList anyOtherInfo,
+ int[] failedReferences) {
+ ReferencesCheckResultInfoImpl referencesCheckResultInfo =
+ new ReferencesCheckResultInfoImpl();
+ referencesCheckResultInfo.setAnyOtherInfo(anyOtherInfo);
+ referencesCheckResultInfo.setFailedReferences(failedReferences);
+ return referencesCheckResultInfo;
+ }
+
+ public ManifestRefsCheckResult createManifestRefsCheckResult(
+ int code,
+ ManifestRefsCheckResultInfo info) {
+ ManifestRefsCheckResultImpl manifestRefsCheckResult =
+ new ManifestRefsCheckResultImpl();
+ manifestRefsCheckResult.setCode(code);
+ manifestRefsCheckResult.setInfo(info);
+ return manifestRefsCheckResult;
+ }
+
+ public ManifestRefsCheckResultInfo createManifestRefsCheckResultInfo(
+ NodeList anyOtherInfo,
+ int[] failedReferences,
+ int referringSigReference) {
+ ManifestRefsCheckResultInfoImpl manifestRefsCheckResultInfo =
+ new ManifestRefsCheckResultInfoImpl();
+ manifestRefsCheckResultInfo.setAnyOtherInfo(anyOtherInfo);
+ manifestRefsCheckResultInfo.setReferringSignatureReference(
+ referringSigReference);
+ manifestRefsCheckResultInfo.setFailedReferences(failedReferences);
+ return manifestRefsCheckResultInfo;
+ }
+
+ public Content createContent(InputStream binaryData, String referenceURI) {
+ ContentBinaryImpl content = new ContentBinaryImpl();
+ content.setBinaryContent(binaryData);
+ content.setReference(referenceURI);
+ return content;
+ }
+
+ public Content createContent(String locationReferenceURI, String referenceURI) {
+ ContentLocRefImpl content = new ContentLocRefImpl();
+ content.setLocationReferenceURI(locationReferenceURI);
+ content.setReference(referenceURI);
+ return content;
+ }
+
+ public Content createContent(String referenceURI) {
+ ContentReferenceImpl content = new ContentReferenceImpl();
+ content.setReference(referenceURI);
+ return content;
+ }
+
+ public Content createContent(NodeList xmlData, String referenceURI) {
+ ContentXMLImpl content = new ContentXMLImpl();
+ content.setXMLContent(xmlData);
+ content.setReference(referenceURI);
+ return content;
+ }
+
+ public XMLDataObjectAssociation createXMLDataObjectAssociation(
+ MetaInfo metaInfo,
+ Content xmlContent) {
+ XMLDataObjectAssociationImpl xmlDataObjectAssociation =
+ new XMLDataObjectAssociationImpl();
+ xmlDataObjectAssociation.setMetaInfo(metaInfo);
+ xmlDataObjectAssociation.setContent(xmlContent);
+ return xmlDataObjectAssociation;
+ }
+
+ public MetaInfo createMetaInfo(
+ String mimeType,
+ String description,
+ NodeList otherInfo,
+ String type) {
+ MetaInfoImpl metaInfo = new MetaInfoImpl();
+ metaInfo.setMimeType(mimeType);
+ metaInfo.setDescription(description);
+ metaInfo.setAnyElements(otherInfo);
+ metaInfo.setType(type);
+ return metaInfo;
+ }
+
+ public Transform createCanonicalizationTransform(String algorithmURI) {
+ CanonicalizationTransformImpl transform = new CanonicalizationTransformImpl(algorithmURI);
+ return transform;
+ }
+
+ public Transform createExclusiveCanonicalizationTransform(String algorithmURI, List inclusiveNamespacePrefixes) {
+ ExclusiveCanonicalizationTransformImpl transform = new ExclusiveCanonicalizationTransformImpl(algorithmURI);
+ transform.setInclusiveNamespacePrefixes(inclusiveNamespacePrefixes);
+ return transform;
+ }
+
+ public Transform createBase64Transform() {
+ Base64TransformImpl transform = new Base64TransformImpl();
+ return transform;
+ }
+
+ public Transform createEnvelopedSignatureTransform() {
+ EnvelopedSignatureTransformImpl transform =
+ new EnvelopedSignatureTransformImpl();
+ return transform;
+ }
+
+ public Transform createXSLTTransform(Element styleSheet) {
+ XSLTransformImpl transform = new XSLTransformImpl();
+ transform.setStylesheet(styleSheet);
+ return transform;
+ }
+
+ public Transform createXPathTransform(
+ String xPathExpression,
+ Map namespaceDeclarations) {
+ XPathTransformImpl transform = new XPathTransformImpl();
+ transform.setXPathExpression(xPathExpression);
+ transform.setNamespaceDelcarations(namespaceDeclarations);
+ return transform;
+ }
+
+ public Transform createXPathFilter2Transform(List xPathFilters) {
+ XPathFilter2TransformImpl transform = new XPathFilter2TransformImpl();
+ transform.setFilters(xPathFilters);
+ return transform;
+ }
+
+ public XPathFilter createXPathFilter(
+ String filterType,
+ String xPathExpression,
+ Map namespaceDeclarations) {
+ XPathFilterImpl xPathFilter = new XPathFilterImpl();
+ xPathFilter.setFilterType(filterType);
+ xPathFilter.setXPathExpression(xPathExpression);
+ xPathFilter.setNamespaceDelcarations(namespaceDeclarations);
+ return xPathFilter;
+ }
+
+ public CheckResult createCheckResult(int code, NodeList info) {
+ CheckResultImpl checkResult = new CheckResultImpl();
+ checkResult.setCode(code);
+ checkResult.setInfo(info);
+ return checkResult;
+ }
+
+
+ public SignerInfo createSignerInfo(
+ X509Certificate signerCertificate,
+ boolean qualifiedCertificate,
+ boolean publicAuthority,
+ String publicAuthorityID) {
+ SignerInfoImpl signerInfo = new SignerInfoImpl();
+ signerInfo.setSignerCertificate(signerCertificate);
+ signerInfo.setQualifiedCertificate(qualifiedCertificate);
+ signerInfo.setPublicAuthority(publicAuthority);
+ signerInfo.setPublicAuhtorityID(publicAuthorityID);
+ return signerInfo;
+ }
+
+ public X509IssuerSerial createX509IssuerSerial(
+ String issuerName,
+ BigInteger serialNumber) {
+ X509IssuerSerialImpl x509IssuerSerial = new X509IssuerSerialImpl();
+ x509IssuerSerial.setX509IssuerName(issuerName);
+ x509IssuerSerial.setX509SerialNumber(serialNumber);
+ return x509IssuerSerial;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignatureEnvironmentResponseImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignatureEnvironmentResponseImpl.java
new file mode 100644
index 000000000..230bcd86e
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignatureEnvironmentResponseImpl.java
@@ -0,0 +1,56 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.spss.api.xmlsign.SignatureEnvironmentResponse;
+
+/**
+ * Default implementation of <code>SignatureEnvironmentResponse</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class SignatureEnvironmentResponseImpl
+ implements SignatureEnvironmentResponse {
+
+ /** The signature environment containing the XML signature. */
+ private Element signatureEnvironment;
+
+ /**
+ * Sets the XML structure which contains the signature.
+ *
+ * @param signatureEnvironment A general XML structure containing the signature.
+ */
+ public void setSignatureEnvironment(Element signatureEnvironment) {
+ this.signatureEnvironment = signatureEnvironment;
+ }
+
+ public Element getSignatureEnvironment() {
+ return signatureEnvironment;
+ }
+
+ /**
+ * Gets the type of <code>CreateXMLSignatureResponseElement</code>.
+ *
+ * @return SIGNATURE_ENVIRONMENT_RESPONSE
+ */
+ public int getResponseType() {
+ return SIGNATURE_ENVIRONMENT_RESPONSE;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignatureManifestCheckParamsImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignatureManifestCheckParamsImpl.java
new file mode 100644
index 000000000..bfd2587fd
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignatureManifestCheckParamsImpl.java
@@ -0,0 +1,67 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.xmlverify.SignatureManifestCheckParams;
+
+/**
+ * Default implementation of <code>SignatureManifestCheckParams</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class SignatureManifestCheckParamsImpl
+ implements SignatureManifestCheckParams {
+
+ /** Referential information. */
+ private List referenceInfos;
+ /** Whether to return the signature source data. */
+ private boolean returnReferenceInputData = true;
+
+ /**
+ * Sets the referantial information.
+ *
+ * @param referenceInfos The referential information.
+ */
+ public void setReferenceInfos(List referenceInfos) {
+ this.referenceInfos =
+ referenceInfos != null
+ ? Collections.unmodifiableList(new ArrayList(referenceInfos))
+ : null;
+ }
+
+ public List getReferenceInfos() {
+ return referenceInfos;
+ }
+
+ /**
+ * Sets whether to return signature source data.
+ *
+ * @param returnReferenceInputData Whether to return signature source data.
+ */
+ public void setReturnReferenceInputData(boolean returnReferenceInputData) {
+ this.returnReferenceInputData = returnReferenceInputData;
+ }
+
+ public boolean getReturnReferenceInputData() {
+ return returnReferenceInputData;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignerInfoImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignerInfoImpl.java
new file mode 100644
index 000000000..077419af6
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignerInfoImpl.java
@@ -0,0 +1,96 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.security.cert.X509Certificate;
+
+import at.gv.egovernment.moa.spss.api.common.SignerInfo;
+
+/**
+ * Default implementation of <code>SignerInfo</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class SignerInfoImpl implements SignerInfo {
+
+ /** The signer certificate. */
+ private X509Certificate signerCertificate;
+ /** Determines, whether <code>signerCertificate</code> is a qualified
+ * certificate. */
+ private boolean qualifiedCertificate;
+ /** Determines, whether <code>signerCertificate</code> is from a public
+ * authority. */
+ private boolean publicAuthority;
+ /** The public authority ID of the <code>signerCertificate</code>. */
+ private String publicAuthorityID;
+
+ /**
+ * Sets the signer certificate.
+ *
+ * @param signerCertificate The signer certificate.
+ */
+ public void setSignerCertificate(X509Certificate signerCertificate) {
+ this.signerCertificate = signerCertificate;
+ }
+
+ public X509Certificate getSignerCertificate() {
+ return signerCertificate;
+ }
+
+ /**
+ * Sets, whether the certificate contained in this object is qualified or not.
+ *
+ * @param qualifiedCertificate Is <code>true</code>, if the certificate is
+ * qualified, otherwise <code>false</code>.
+ */
+ public void setQualifiedCertificate(boolean qualifiedCertificate) {
+ this.qualifiedCertificate = qualifiedCertificate;
+ }
+
+ public boolean isQualifiedCertificate() {
+ return qualifiedCertificate;
+ }
+
+ /**
+ * Sets, whether the certificate contained in this object is an
+ * e-government certificate or not.
+ *
+ * @param publicAuthority Is <code>true</code>, if the certificate is
+ * public authority certificate, otherwise <code>false</code>.
+ */
+ public void setPublicAuthority(boolean publicAuthority) {
+ this.publicAuthority = publicAuthority;
+ }
+
+ public boolean isPublicAuthority() {
+ return publicAuthority;
+ }
+
+ /**
+ * Sets the public authority ID of the signer certificate.
+ *
+ * @param publicAuhtorityID The public authority ID of the signer certificate.
+ */
+ public void setPublicAuhtorityID(String publicAuhtorityID) {
+ this.publicAuthorityID = publicAuhtorityID;
+ }
+
+ public String getPublicAuhtorityID() {
+ return publicAuthorityID;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SingleSignatureInfoImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SingleSignatureInfoImpl.java
new file mode 100644
index 000000000..70f5d629e
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SingleSignatureInfoImpl.java
@@ -0,0 +1,64 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.SingleSignatureInfo;
+
+/**
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class SingleSignatureInfoImpl implements SingleSignatureInfo {
+
+ private List dataObjectInfos = new ArrayList();
+
+ private CreateSignatureInfo createSignatureInfo;
+
+ private boolean securityLayerConform = true;
+
+ public void setDataObjectInfos(List dataObjectInfos) {
+ this.dataObjectInfos =
+ dataObjectInfos != null
+ ? Collections.unmodifiableList(new ArrayList(dataObjectInfos))
+ : null;
+ }
+
+ public List getDataObjectInfos() {
+ return dataObjectInfos;
+ }
+
+ public void setCreateSignatureInfo(CreateSignatureInfo createSignatureInfo) {
+ this.createSignatureInfo = createSignatureInfo;
+ }
+
+ public CreateSignatureInfo getCreateSignatureInfo() {
+ return createSignatureInfo;
+ }
+
+ public void setSecurityLayerConform(boolean securityLayerConform) {
+ this.securityLayerConform = securityLayerConform;
+ }
+
+ public boolean isSecurityLayerConform() {
+ return securityLayerConform;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SupplementProfileExplicitImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SupplementProfileExplicitImpl.java
new file mode 100644
index 000000000..41ee7c78b
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SupplementProfileExplicitImpl.java
@@ -0,0 +1,54 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation;
+import at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfileExplicit;
+
+/**
+ * Default implementation of <code>SupplementProfileExplicit</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class SupplementProfileExplicitImpl implements SupplementProfileExplicit {
+
+ /** Supplemental information for verifying a signature. */
+ private XMLDataObjectAssociation supplement;
+
+ /**
+ * Sets the supplemental information for verifying a signature.
+ *
+ * @param supplement The supplemental information for verifying a signature.
+ */
+ public void setSupplementProfile(XMLDataObjectAssociation supplement) {
+ this.supplement = supplement;
+ }
+
+ public XMLDataObjectAssociation getSupplementProfile() {
+ return supplement;
+ }
+
+ /**
+ * Gets the type of <code>SupplementProfile</code>.
+ *
+ * @return EXPLICIT_SUPPLEMENTPROFILE
+ */
+ public int getSupplementProfileType() {
+ return EXPLICIT_SUPPLEMENTPROFILE;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SupplementProfileIDImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SupplementProfileIDImpl.java
new file mode 100644
index 000000000..0d3430570
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SupplementProfileIDImpl.java
@@ -0,0 +1,52 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfileID;
+
+/**
+ * Default implementation of <code>SupplementProfileID</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class SupplementProfileIDImpl implements SupplementProfileID {
+ /** The profile ID. */
+ private String profileID;
+
+ /**
+ * Sets the <code>SupplementProfile</code> profile ID.
+ *
+ * @param profileID The profile ID.
+ */
+ public void setSupplementProfileID(String profileID) {
+ this.profileID = profileID;
+ }
+
+ public String getSupplementProfileID() {
+ return profileID;
+ }
+
+ /**
+ * Gets the type of <code>SupplementProfile</code>.
+ *
+ * @return ID_SUPPLEMENTPROFILE
+ */
+ public int getSupplementProfileType() {
+ return ID_SUPPLEMENTPROFILE;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformImpl.java
new file mode 100644
index 000000000..1842c321b
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformImpl.java
@@ -0,0 +1,41 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.common.Transform;
+
+/**
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class TransformImpl implements Transform {
+ /** The URI identifying the transformation algorithm. */
+ private String algorithmURI;
+
+ /**
+ * Sets the URI identifying the transformation algorithm.
+ *
+ * @param algorithmURI The URI identifying the transformation algorithm.
+ */
+ public void setAlgorithmURI(String algorithmURI) {
+ this.algorithmURI = algorithmURI;
+ }
+
+ public String getAlgorithmURI() {
+ return algorithmURI;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterBinaryImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterBinaryImpl.java
new file mode 100644
index 000000000..99f334e79
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterBinaryImpl.java
@@ -0,0 +1,57 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.io.InputStream;
+
+import at.gv.egovernment.moa.spss.api.xmlverify.TransformParameterBinary;
+
+/**
+ * Default implementation of <code>TransformParameterBinary</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class TransformParameterBinaryImpl
+ extends TransformParameterImpl
+ implements TransformParameterBinary {
+
+ /** The binary content as a stream. */
+ private InputStream binaryContent;
+
+ /**
+ * Sets the binary content as a stream.
+ *
+ * @param binaryContent The binary content as a stream.
+ */
+ public void setBinaryContent(InputStream binaryContent) {
+ this.binaryContent = binaryContent;
+ }
+
+ public InputStream getBinaryContent() {
+ return binaryContent;
+ }
+
+ /**
+ * Gets the <code>TransformParameter</code> type.
+ *
+ * @return BINARY_TRANSFORMPARAMETER
+ */
+ public int getTransformParameterType() {
+ return BINARY_TRANSFORMPARAMETER;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterImpl.java
new file mode 100644
index 000000000..d72be03f4
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterImpl.java
@@ -0,0 +1,40 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+/**
+ * Default base implementation of <code>TransformParameter</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public abstract class TransformParameterImpl {
+ /** An URI identifying the <code>TransformParameter</code>. */
+ private String uri;
+
+ /**
+ * Sets the URI identifying the <code>TransformParameter</code>.
+ * @param uri The URI identifying the <code>TransformParameter</code>.
+ */
+ public void setURI(String uri) {
+ this.uri = uri;
+ }
+
+ public String getURI() {
+ return uri;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterURIImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterURIImpl.java
new file mode 100644
index 000000000..7c8b8dcc4
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterURIImpl.java
@@ -0,0 +1,39 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.xmlverify.TransformParameterURI;
+
+/**
+ * Default implementation of <code>TransformParameterURI</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class TransformParameterURIImpl
+ extends TransformParameterImpl
+ implements TransformParameterURI {
+
+ /**
+ * Gets the type of <code>TransformParameter</code>.
+ *
+ * @return URI_TRANSFORMPARAMETER
+ */
+ public int getTransformParameterType() {
+ return URI_TRANSFORMPARAMETER;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformPatameterHashImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformPatameterHashImpl.java
new file mode 100644
index 000000000..64667370e
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformPatameterHashImpl.java
@@ -0,0 +1,69 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.xmlverify.TransformParameterHash;
+
+/**
+ * Default implementation of <code>TransformParameterHash</code>
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class TransformPatameterHashImpl
+ extends TransformParameterImpl
+ implements TransformParameterHash {
+
+ /** The method used to calculate the digest value. */
+ private String digestMethod;
+ /** The digest value. */
+ private byte[] digestValue;
+
+ /**
+ * Sets method used to calculate the digest value.
+ * @param digestMethod The method used to calculate the digest value.
+ */
+ public void setDigestMethod(String digestMethod) {
+ this.digestMethod = digestMethod;
+ }
+
+ public String getDigestMethod() {
+ return digestMethod;
+ }
+
+ /**
+ * Sets the digest value.
+ *
+ * @param digestValue The digest value.
+ */
+ public void setDigestValue(byte[] digestValue) {
+ this.digestValue = digestValue;
+ }
+
+ public byte[] getDigestValue() {
+ return digestValue;
+ }
+
+ /**
+ * Gets the type of <code>TransformParameter</code>.
+ *
+ * @return HASH_TRANSFORMPARAMETER
+ */
+ public int getTransformParameterType() {
+ return HASH_TRANSFORMPARAMETER;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureRequestImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureRequestImpl.java
new file mode 100644
index 000000000..8fd398c5a
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureRequestImpl.java
@@ -0,0 +1,108 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.io.InputStream;
+import java.util.Date;
+
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSDataObject;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest;
+
+/**
+ * Default implementation of <code>VerifyCMSSignatureRequest</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class VerifyCMSSignatureRequestImpl
+ implements VerifyCMSSignatureRequest {
+
+ /** The indexes of the signatories whose signature should be verified. */
+ private int[] signatories;
+ /** The profile ID of trusted certificates. */
+ private String trustProfileId;
+ /** The data object necessary for signature verification. */
+ private CMSDataObject dataObject;
+ /** The CMS signature to verify. */
+ private InputStream cmsSignature;
+ /** The date for which to verify the signature. */
+ private Date dateTime;
+
+ /**
+ * Sets the indexes of the signatories whose signature should be verified.
+ *
+ * @param signatories The indexes of the signatories whose signature should be
+ * verified.
+ */
+ public void setSignatories(int[] signatories) {
+ this.signatories = signatories;
+ }
+
+ public int[] getSignatories() {
+ return signatories;
+ }
+
+ /**
+ * Sets the date for which to verify the signature.
+ *
+ * @param dateTime The date for which to verify the signature.
+ */
+ public void setDateTime(Date dateTime) {
+ this.dateTime = dateTime;
+ }
+
+ public Date getDateTime() {
+ return dateTime;
+ }
+
+ /**
+ * Sets the CMS signature to verify.
+ * @param signature The CMS signature to verify.
+ */
+ public void setCMSSignature(InputStream signature) {
+ this.cmsSignature = signature;
+
+ }
+
+ public InputStream getCMSSignature() {
+ return cmsSignature;
+ }
+
+ /**
+ * Sets the data object necessary for signature verification.
+ * @param dataObject The data object necessary for signature verification.
+ */
+ public void setDataObject(CMSDataObject dataObject) {
+ this.dataObject = dataObject;
+ }
+
+ public CMSDataObject getDataObject() {
+ return dataObject;
+ }
+
+ /**
+ * Sets the profile ID of trusted certificates.
+ * @param trustProfileId The profile ID of trusted certificates.
+ */
+ public void setTrustProfileId(String trustProfileId) {
+ this.trustProfileId = trustProfileId;
+ }
+
+ public String getTrustProfileId() {
+ return trustProfileId;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureResponseElementImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureResponseElementImpl.java
new file mode 100644
index 000000000..6d14692fd
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureResponseElementImpl.java
@@ -0,0 +1,77 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponseElement;
+import at.gv.egovernment.moa.spss.api.common.CheckResult;
+import at.gv.egovernment.moa.spss.api.common.SignerInfo;
+
+/**
+ * Default implementation of <code>VerifyCMSSignatureResponseElement</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class VerifyCMSSignatureResponseElementImpl
+ implements VerifyCMSSignatureResponseElement {
+
+ /** Information about the signer certificate. */
+ private SignerInfo signerInfo;
+ /** Information about the signature check. */
+ private CheckResult signatureCheck;
+ /** Information about the certificate check. */
+ private CheckResult certificateCheck;
+
+ /**
+ * Sets a SignerInfo element according to CMS.
+ *
+ * @param signerInfo The SignerInfo element according to CMS.
+ */
+ public void setSignerInfo(SignerInfo signerInfo) {
+ this.signerInfo = signerInfo;
+ }
+
+ public SignerInfo getSignerInfo() {
+ return signerInfo;
+ }
+
+ /**
+ * Sets a result of the signature verification.
+ *
+ * @param signatureCheck The result of the signature verification.
+ */
+ public void setSignatureCheck(CheckResult signatureCheck) {
+ this.signatureCheck = signatureCheck;
+ }
+
+ public CheckResult getSignatureCheck() {
+ return signatureCheck;
+ }
+
+ /**
+ * Sets a result of the certificate verification.
+ *
+ * @param certificateCheck The result of the certificate verification.
+ */
+ public void setCertificateCheck(CheckResult certificateCheck) {
+ this.certificateCheck = certificateCheck;
+ }
+
+ public CheckResult getCertificateCheck() {
+ return certificateCheck;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSinatureResponseImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSinatureResponseImpl.java
new file mode 100644
index 000000000..150003892
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSinatureResponseImpl.java
@@ -0,0 +1,52 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse;
+
+/**
+ * Default implementation of <code>VerifyCMSSignatureResponse</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class VerifyCMSSinatureResponseImpl
+ implements VerifyCMSSignatureResponse {
+
+ /** The elements contained in the response. */
+ private List responseElements;
+
+ /**
+ * Sets the elements contained in the response.
+ *
+ * @param responseElements The elements contained in the response.
+ */
+ public void setResponseElements(List responseElements) {
+ this.responseElements =
+ responseElements != null
+ ? Collections.unmodifiableList(new ArrayList(responseElements))
+ : null;
+ }
+
+ public List getResponseElements() {
+ return responseElements;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifySignatureInfoImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifySignatureInfoImpl.java
new file mode 100644
index 000000000..6b2bd895a
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifySignatureInfoImpl.java
@@ -0,0 +1,62 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureLocation;
+
+/**
+ * Default implementation of <code>VerifySignatureInfo</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class VerifySignatureInfoImpl implements VerifySignatureInfo {
+ /** The location of the signature to be verified. */
+ private VerifySignatureLocation verifySignatureLocation;
+ /** The environment containing the signature to be verified. */
+ private Content verifySignatureEnvironment;
+
+ /**
+ * Sets the location of the signature to be verified.
+ *
+ * @param verifySignatureLocation The location of the signature to be
+ * verified.
+ */
+ public void setVerifySignatureLocation(VerifySignatureLocation verifySignatureLocation) {
+ this.verifySignatureLocation = verifySignatureLocation;
+ }
+
+ public VerifySignatureLocation getVerifySignatureLocation() {
+ return verifySignatureLocation;
+ }
+
+ /**
+ * Sets the signature environment containing the signature to be verified.
+ *
+ * @param verifySignatureEnvironment The signature environment containing the
+ * signature to be verified.
+ */
+ public void setVerifySignatureEnvironment(Content verifySignatureEnvironment) {
+ this.verifySignatureEnvironment = verifySignatureEnvironment;
+ }
+
+ public Content getVerifySignatureEnvironment() {
+ return verifySignatureEnvironment;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifySignatureLocationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifySignatureLocationImpl.java
new file mode 100644
index 000000000..33b0463db
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifySignatureLocationImpl.java
@@ -0,0 +1,30 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureLocation;
+
+/**
+ * Default implementation of <code>VerifySignatureLocation</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class VerifySignatureLocationImpl
+ extends ElementSelectorImpl
+ implements VerifySignatureLocation {
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsDataImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsDataImpl.java
new file mode 100644
index 000000000..b20524c77
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsDataImpl.java
@@ -0,0 +1,51 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferenceInfo;
+
+/**
+ * Default implementation of <codeReferenceInfo</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class VerifyTransformsDataImpl implements ReferenceInfo {
+ /** Information about the transformations contained in the signature. */
+ private List verifyTransformsInfoProfiles;
+
+ /**
+ * Sets the information about the transformations contained in the signature.
+ *
+ * @param verifyTransformsInfoProfiles The profiles containing transformation
+ * information.
+ */
+ public void setVerifyTransformsInfoProfiles(List verifyTransformsInfoProfiles) {
+ this.verifyTransformsInfoProfiles =
+ verifyTransformsInfoProfiles != null
+ ? Collections.unmodifiableList(
+ new ArrayList(verifyTransformsInfoProfiles))
+ : null;
+ }
+
+ public List getVerifyTransformsInfoProfiles() {
+ return verifyTransformsInfoProfiles;
+ }
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileExplicitImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileExplicitImpl.java
new file mode 100644
index 000000000..a2114fb3f
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileExplicitImpl.java
@@ -0,0 +1,76 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfileExplicit;
+
+/**
+ * Default implementation of <code>VerifyTransformsInfoProfileExplicit</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class VerifyTransformsInfoProfileExplicitImpl
+ implements VerifyTransformsInfoProfileExplicit {
+
+ /** The transforms contained in this profile. */
+ private List transforms;
+ /** Additional information for the transforms. */
+ private List transformParameters = new ArrayList();
+
+ /**
+ * Sets the transforms contained in this profile.
+ *
+ * @param transforms The transforms contained in this profile.
+ */
+ public void setTransforms(List transforms) {
+ this.transforms =
+ transforms != null
+ ? Collections.unmodifiableList(new ArrayList(transforms))
+ : null;
+ }
+
+ public List getTransforms() {
+ return transforms;
+ }
+
+ /**
+ * Sets additional information for the transforms.
+ *
+ * @param transformParameters Additional information for the transforms.
+ */
+ public void setTransformParameters(List transformParameters) {
+ this.transformParameters = new ArrayList(transformParameters);
+ }
+
+ public List getTransformParameters() {
+ return transformParameters;
+ }
+
+ /**
+ * Gets the type of <code>VerifyTransformsInfoProfile</code>.
+ *
+ * @return EXPLICIT_VERIFYTRANSFORMSINFOPROFILE
+ */
+ public int getVerifyTransformsInfoProfileType() {
+ return EXPLICIT_VERIFYTRANSFORMSINFOPROFILE;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileIDImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileIDImpl.java
new file mode 100644
index 000000000..cc360ebeb
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileIDImpl.java
@@ -0,0 +1,53 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfileID;
+
+/**
+ * Default implementation of <code>VerifyTransformsInfoProfileID</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class VerifyTransformsInfoProfileIDImpl implements VerifyTransformsInfoProfileID {
+
+ /** The profile ID. */
+ private String verifyTransformsInfoProfileID;
+
+ /**
+ * Sets the profile ID.
+ *
+ * @param profileID The profile ID.
+ */
+ public void setVerifyTransformsInfoProfileID(String profileID) {
+ this.verifyTransformsInfoProfileID = profileID;
+ }
+
+ public String getVerifyTransformsInfoProfileID() {
+ return verifyTransformsInfoProfileID;
+ }
+
+ /**
+ * Gets the type of <code>VerifyTransformsInfoProfile</code>.
+ *
+ * @return ID_VERIFYTRANSFORMSINFOPROFILE
+ */
+ public int getVerifyTransformsInfoProfileType() {
+ return ID_VERIFYTRANSFORMSINFOPROFILE;
+ }
+
+} \ No newline at end of file
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureRequestImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureRequestImpl.java
new file mode 100644
index 000000000..64cd208b0
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureRequestImpl.java
@@ -0,0 +1,128 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.xmlverify.SignatureManifestCheckParams;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest;
+
+/**
+ * Default implementation of <code>VerifyXMLSignatureRequest</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class VerifyXMLSignatureRequestImpl
+ implements VerifyXMLSignatureRequest {
+ /** Date and time for signature verification. */
+ private Date dateTime;
+ /** The signature to be verified. */
+ private VerifySignatureInfo verifySignatureInfo;
+ /** Supplemental information about the singature. */
+ private List supplementProfiles;
+ /** Additional parameters for checking the signature manifest. */
+ private SignatureManifestCheckParams signatureManifestCheckParams;
+ /** Whether to return the hash input data. */
+ private boolean returnHashInputData;
+ /** The profile ID of the trust profile containing the trusted certificates.
+ */
+ private String trustProfileId;
+
+ /**
+ * Sets the date and time for signature verification.
+ *
+ * @param dateTime The date and time for signature verification.
+ */
+ public void setDateTime(Date dateTime) {
+ this.dateTime = dateTime;
+ }
+
+ public Date getDateTime() {
+ return dateTime;
+ }
+
+ /**
+ * Sets the signature to be verified.
+ *
+ * @param signatureInfo The signature to be verified.
+ */
+ public void setSignatureInfo(VerifySignatureInfo signatureInfo) {
+ this.verifySignatureInfo = signatureInfo;
+ }
+
+ public VerifySignatureInfo getSignatureInfo() {
+ return verifySignatureInfo;
+ }
+
+ /**
+ * Sets supplemental information about the singature.
+ * @param supplementProfiles
+ */
+ public void setSupplementProfiles(List supplementProfiles) {
+ this.supplementProfiles =
+ supplementProfiles != null
+ ? Collections.unmodifiableList(new ArrayList(supplementProfiles))
+ : null;
+ }
+
+ public List getSupplementProfiles() {
+ return supplementProfiles;
+ }
+
+ /**
+ * Sets supplemental information about the singature.
+ * @param params Supplemental information about the singature.
+ */
+ public void setSignatureManifestCheckParams(SignatureManifestCheckParams params) {
+ this.signatureManifestCheckParams = params;
+ }
+
+ public SignatureManifestCheckParams getSignatureManifestCheckParams() {
+ return signatureManifestCheckParams;
+ }
+
+ /**
+ * Sets whether to return hash input data.
+ *
+ * @param returnSignedData Whether to return hash input data.
+ */
+ public void setReturnHashInputData(boolean returnSignedData) {
+ this.returnHashInputData = returnSignedData;
+ }
+
+ public boolean getReturnHashInputData() {
+ return returnHashInputData;
+ }
+
+ /**
+ * Sets the profile ID of trusted certificates.
+ *
+ * @param trustProfileId The profile ID of trusted certificates.
+ */
+ public void setTrustProfileId(String trustProfileId) {
+ this.trustProfileId = trustProfileId;
+ }
+
+ public String getTrustProfileId() {
+ return trustProfileId;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureResponseImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureResponseImpl.java
new file mode 100644
index 000000000..3cad988ff
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureResponseImpl.java
@@ -0,0 +1,157 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.common.CheckResult;
+import at.gv.egovernment.moa.spss.api.common.SignerInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResult;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse;
+
+/**
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class VerifyXMLSignatureResponseImpl
+ implements VerifyXMLSignatureResponse {
+
+ /** Information about the signer certificate. */
+ private SignerInfo signerInfo;
+
+ /**
+ * The hash input data objects. The list consists of {@link at.gv.egovernment.moa.spss.api.common.InputData}s.
+ * */
+ private List hashInputDatas = new ArrayList();
+
+ /**
+ * The reference input data objects. The list consists of {@link at.gv.egovernment.moa.spss.api.common.InputData}s.
+ * */
+ private List referenceInputDatas = new ArrayList();
+
+ /** Information about the signature check. */
+ private ReferencesCheckResult signatureCheck;
+ /** Information about the signature manifest check. */
+ private ReferencesCheckResult signatureManifestCheck;
+ /** Information about the XMLDsig manifest check. */
+ private List xmlDsigManifestChecks = new ArrayList();
+ /** Information about the certificate check. */
+ private CheckResult certificateCheck;
+
+ /**
+ * Sets information about the signer certificate.
+ *
+ * @param signerInfo Information about the signer certificate.
+ */
+ public void setSignerInfo(SignerInfo signerInfo) {
+ this.signerInfo = signerInfo;
+ }
+
+ public SignerInfo getSignerInfo() {
+ return signerInfo;
+ }
+
+ /**
+ * Sets data signed by the signatory.
+ *
+ * @param hashInputDatas The signed datas.
+ */
+ public void setHashInputDatas(List hashInputDatas) {
+ this.hashInputDatas =
+ hashInputDatas != null
+ ? Collections.unmodifiableList(new ArrayList(hashInputDatas))
+ : null;
+ }
+
+ public List getHashInputDatas() {
+ return hashInputDatas;
+ }
+
+ /**
+ * Sets the source data elements.
+ *
+ * @param referenceInputDatas The source data elements.
+ */
+ public void setReferenceInputDatas(List referenceInputDatas) {
+ this.referenceInputDatas =
+ referenceInputDatas != null
+ ? Collections.unmodifiableList(new ArrayList(referenceInputDatas))
+ : null;
+ }
+
+ public List getReferenceInputDatas() {
+ return referenceInputDatas;
+ }
+
+ /**
+ * Sets the result of the signature verification.
+ *
+ * @param signatureCheck The result of the signature verification.
+ */
+ public void setSignatureCheck(ReferencesCheckResult signatureCheck) {
+ this.signatureCheck = signatureCheck;
+ }
+
+ public ReferencesCheckResult getSignatureCheck() {
+ return signatureCheck;
+ }
+
+ /**
+ * Sets the result of the signature manifest verification.
+ *
+ * @param signatureManifestCheck The result of the signature manifest verification.
+ */
+ public void setSignatureManifestCheck(ReferencesCheckResult signatureManifestCheck) {
+ this.signatureManifestCheck = signatureManifestCheck;
+ }
+
+ public ReferencesCheckResult getSignatureManifestCheck() {
+ return signatureManifestCheck;
+ }
+
+ /**
+ * Sets the result of the certification verification.
+ *
+ * @param certificateCheck The result of the certificate verification.
+ */
+ public void setCertificateCheck(CheckResult certificateCheck) {
+ this.certificateCheck = certificateCheck;
+ }
+
+ public CheckResult getCertificateCheck() {
+ return certificateCheck;
+ }
+
+
+ /**
+ * Sets the XMLDSigManifestChecks.
+ *
+ * @param xmlDsigManifestChecks The XMLDSigManifestChecks.
+ */
+ public void setXMLDsigManifestChecks(List xmlDsigManifestChecks) {
+ this.xmlDsigManifestChecks =
+ xmlDsigManifestChecks != null
+ ? Collections.unmodifiableList(new ArrayList(xmlDsigManifestChecks))
+ : null;
+ }
+
+ public List getXMLDsigManifestChecks() {
+ return xmlDsigManifestChecks;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/X509IssuerSerialImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/X509IssuerSerialImpl.java
new file mode 100644
index 000000000..cdac75f77
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/X509IssuerSerialImpl.java
@@ -0,0 +1,60 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.math.BigInteger;
+
+import at.gv.egovernment.moa.spss.api.common.X509IssuerSerial;
+
+/**
+ * Default implementation of <code>X509IssuerSerial</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class X509IssuerSerialImpl implements X509IssuerSerial {
+ /** The certificate serial number. */
+ private BigInteger x509SerialNumber;
+ /** The certificate issuer DN. */
+ private String x509IssuerName;
+
+ /**
+ * Sets the issuer distinguished name.
+ *
+ * @param x509IssuerName The issuer distinguished name.
+ */
+ public void setX509IssuerName(String x509IssuerName) {
+ this.x509IssuerName = x509IssuerName;
+ }
+
+ public String getX509IssuerName() {
+ return x509IssuerName;
+ }
+
+ /**
+ * Sets the certificate serial number.
+ *
+ * @param x509SerialNumber The issuer serial number.
+ */
+ public void setX509SerialNumber(BigInteger x509SerialNumber) {
+ this.x509SerialNumber = x509SerialNumber;
+ }
+
+ public BigInteger getX509SerialNumber() {
+ return x509SerialNumber;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XMLDataObjectAssociationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XMLDataObjectAssociationImpl.java
new file mode 100644
index 000000000..1528ced4b
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XMLDataObjectAssociationImpl.java
@@ -0,0 +1,60 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation;
+
+/**
+ * Default implementation of <code>XMLDataObjectAssociation</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class XMLDataObjectAssociationImpl implements XMLDataObjectAssociation {
+
+ /** Meta information about the <code>Content</code> object. */
+ private MetaInfo metaInfo;
+ /** The actual data contained in this object. */
+ private Content content;
+
+ /**
+ * Sets meta information about the <code>Content</code> object.
+ * @param metaInfo Meta information about the <code>Content</code> object.
+ */
+ public void setMetaInfo(MetaInfo metaInfo) {
+ this.metaInfo = metaInfo;
+ }
+
+ public MetaInfo getMetaInfo() {
+ return metaInfo;
+ }
+
+ /**
+ * Sets the actual data contained in this object.
+ *
+ * @param content The actual data contained in this object.
+ */
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+ public Content getContent() {
+ return content;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathFilter2TransformImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathFilter2TransformImpl.java
new file mode 100644
index 000000000..e7ada103c
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathFilter2TransformImpl.java
@@ -0,0 +1,58 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.common.XPathFilter2Transform;
+
+/**
+ * Default implementation of <code>XPathFilter2Transform</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class XPathFilter2TransformImpl
+ extends TransformImpl
+ implements XPathFilter2Transform {
+
+ /** The XPath filters. */
+ private List filters;
+
+ /**
+ * Create a new <code>XPathFilter2TransformImpl</code> object.
+ */
+ public XPathFilter2TransformImpl() {
+ setAlgorithmURI(XPATH_FILTER2);
+ }
+
+ /**
+ * Sets the XPath filters contained in this
+ * <code>XPathFilter2Transform</code>.
+ *
+ * @param filters The XPath filters contained in this
+ * <code>XPathFilter2Transform</code>.
+ */
+ public void setFilters(List filters) {
+ this.filters = new ArrayList(filters);
+ }
+
+ public List getFilters() {
+ return filters;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathFilterImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathFilterImpl.java
new file mode 100644
index 000000000..cc43c2f87
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathFilterImpl.java
@@ -0,0 +1,79 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import at.gv.egovernment.moa.spss.api.common.XPathFilter;
+
+/**
+ * Default implementation of <code>XPathFilter</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class XPathFilterImpl implements XPathFilter {
+ /** The type of filter. */
+ private String filterType;
+ /** The XPath expression of the filter. */
+ private String xPathExpression;
+ /** The namespace prefix to URI mapping to while evaluating the XPath
+ * expression. */
+ private Map namespaceDeclarations = new HashMap();
+
+ /**
+ * Sets the type of filter.
+ *
+ * @param filterType The type of filter.
+ */
+ public void setFilterType(String filterType) {
+ this.filterType = filterType;
+ }
+
+ public String getFilterType() {
+ return filterType;
+ }
+
+ /**
+ * Sets the XPath expression of the filter.
+ *
+ * @param xPathExpression The XPath expression of the filter.
+ */
+ public void setXPathExpression(String xPathExpression) {
+ this.xPathExpression = xPathExpression;
+ }
+
+ public String getXPathExpression() {
+ return xPathExpression;
+ }
+
+ /**
+ * Sets the namespace prefix to URI mapping to while evaluating the XPath
+ * expression.
+ *
+ * @param namespaceDeclarations The namespace prefix to URI mapping to while
+ * evaluating the XPath expression.
+ */
+ public void setNamespaceDelcarations(Map namespaceDeclarations) {
+ this.namespaceDeclarations = namespaceDeclarations;
+ }
+
+ public Map getNamespaceDeclarations() {
+ return namespaceDeclarations;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathTransformImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathTransformImpl.java
new file mode 100644
index 000000000..4a58b0906
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathTransformImpl.java
@@ -0,0 +1,74 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import at.gv.egovernment.moa.spss.api.common.XPathTransform;
+
+/**
+ * Default implementation of <code>XPathTransform</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class XPathTransformImpl
+ extends TransformImpl
+ implements XPathTransform {
+
+ /** The XPath expression to evaluate. */
+ private String xPathExpression;
+ /** The namespace prefix to URI mapping to while evaluating the XPath
+ * expression. */
+ private Map namespaceDeclarations = new HashMap();
+
+ /**
+ * Create a new <code>XPathTransformImpl</code> object.
+ */
+ public XPathTransformImpl() {
+ setAlgorithmURI(XPATH);
+ }
+
+ /**
+ * Sets the XPath expression to evaluate.
+ *
+ * @param xPathExpression The XPath expression to evaluate.
+ */
+ public void setXPathExpression(String xPathExpression) {
+ this.xPathExpression = xPathExpression;
+ }
+
+ public String getXPathExpression() {
+ return xPathExpression;
+ }
+
+ /**
+ * Sets the namespace prefix to URI mapping to while evaluating the XPath
+ * expression.
+ *
+ * @param namespaceDeclarations The namespace prefix to URI mapping to while
+ * evaluating the XPath expression.
+ */
+ public void setNamespaceDelcarations(Map namespaceDeclarations) {
+ this.namespaceDeclarations = namespaceDeclarations;
+ }
+
+ public Map getNamespaceDeclarations() {
+ return namespaceDeclarations;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XSLTransformImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XSLTransformImpl.java
new file mode 100644
index 000000000..d411a78e4
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XSLTransformImpl.java
@@ -0,0 +1,52 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.impl;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.spss.api.common.XSLTTransform;
+
+/**
+ * Default implementation of <code>XSLTTransform</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class XSLTransformImpl extends TransformImpl implements XSLTTransform {
+ /** The XSLT stylesheet to apply. */
+ private Element styleSheet;
+
+ /**
+ * Create a new <code>XSLTransformImpl</code> object.
+ */
+ public XSLTransformImpl() {
+ setAlgorithmURI(XSLT);
+ }
+
+ /**
+ * Sets the XSLT stylesheet to apply.
+ *
+ * @param styleSheet The XSLT stylesheet to apply.
+ */
+ public void setStylesheet(Element styleSheet) {
+ this.styleSheet = styleSheet;
+ }
+
+ public Element getStylesheet() {
+ return styleSheet;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureRequestParser.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureRequestParser.java
new file mode 100644
index 000000000..2efb4f6dd
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureRequestParser.java
@@ -0,0 +1,303 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlbind;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.traversal.NodeIterator;
+
+import at.gv.egovernment.moa.util.BoolUtils;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfile;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfile;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlsign.DataObjectInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.SingleSignatureInfo;
+
+/**
+ * A parser to parse <code>CreateXMLSignatureRequest</code> DOM trees into
+ * <code>CreateXMLSignatureRequest</code> API objects.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CreateXMLSignatureRequestParser {
+
+ //
+ // XPath expresssions to select elements in the CreateXMLSignatureRequest
+ //
+ private static final String MOA = Constants.MOA_PREFIX + ":";
+ private static final String KEY_IDENTIFIER_XPATH =
+ "/" + MOA + "CreateXMLSignatureRequest/" + MOA + "KeyIdentifier";
+ private static final String SINGLE_SIGNATURE_INFO_XPATH =
+ "/" + MOA + "CreateXMLSignatureRequest/" + MOA + "SingleSignatureInfo";
+ private static final String DATA_OBJECT_INFO_XPATH = MOA + "DataObjectInfo";
+ private static final String DATA_OBJECT_XPATH = MOA + "DataObject";
+ private static final String CREATE_SIGNATURE_INFO_XPATH =
+ MOA + "CreateSignatureInfo";
+ private static final String CREATE_TRANSFORMS_INFO_PROFILE_XPATH =
+ (MOA + "CreateTransformsInfoProfile | ")
+ + (MOA + "CreateTransformsInfoProfileID");
+ private static final String CREATE_SIGNATURE_ENVIRONMENT_XPATH =
+ MOA + "CreateSignatureEnvironment";
+ private static final String CREATE_SIGNATURE_ENVIRONMENT_PROFILE_XPATH =
+ (MOA + "CreateSignatureEnvironmentProfile | ")
+ + (MOA + "CreateSignatureEnvironmentProfileID");
+ private static final String SL_CONFORM_ATTR_NAME = "SecurityLayerConformity";
+
+ /** The factory to create API objects. */
+ private SPSSFactory factory;
+
+ /**
+ * Create a new <code>CreateXMLSignatureRequestParser</code>.
+ */
+ public CreateXMLSignatureRequestParser() {
+ this.factory = SPSSFactory.getInstance();
+ }
+
+ /**
+ * Parse a <code>CreateXMLSignatureRequest</code> DOM element, as defined
+ * by the MOA schema.
+ *
+ * @param requestElem The <code>CreateXMLSignatureRequest</code> to parse. The
+ * request must have been successfully parsed against the schema for this
+ * method to succeed.
+ * @return A <code>CreateXMLSignatureRequest</code> API object containing
+ * the data from the DOM element.
+ * @throws MOAApplicationException An error occurred parsing the request.
+ */
+ public CreateXMLSignatureRequest parse(Element requestElem)
+ throws MOAApplicationException {
+
+ List singleSignatureInfos = parseSingleSignatureInfos(requestElem);
+ String keyIdentifier =
+ XPathUtils.getElementValue(requestElem, KEY_IDENTIFIER_XPATH, null);
+
+ return factory.createCreateXMLSignatureRequest(
+ keyIdentifier,
+ singleSignatureInfos);
+ }
+
+ /**
+ * Parse all <code>SingleSignatureInfo</code> elements of the
+ * <code>CreateXMLSignatureRequest</code>.
+ *
+ * @param requestElem The <code>CreateXMLSignatureRequest</code> to parse.
+ * @return A <code>List</code> of <code>SingleSignatureInfo</code> API
+ * objects.
+ * @throws MOAApplicationException An error occurred parsing on of the
+ * <code>SingleSignatureInfo</code> elements.
+ */
+ private List parseSingleSignatureInfos(Element requestElem)
+ throws MOAApplicationException {
+
+ List singleSignatureInfos = new ArrayList();
+ NodeIterator sigInfoElems =
+ XPathUtils.selectNodeIterator(requestElem, SINGLE_SIGNATURE_INFO_XPATH);
+ Element sigInfoElem;
+
+ while ((sigInfoElem = (Element) sigInfoElems.nextNode()) != null) {
+ singleSignatureInfos.add(parseSingleSignatureInfo(sigInfoElem));
+ }
+
+ return singleSignatureInfos;
+ }
+
+ /**
+ * Parse a <code>SingleSignatureInfo</code> DOM element.
+ *
+ * @param sigInfoElem The <code>SingleSignatureInfo</code> DOM element to
+ * parse.
+ * @return A <code>SingleSignatureInfo</code> API object containing the
+ * information of <code>sigInfoElem</code>.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>SingleSignatureInfo</code>.
+ */
+ private SingleSignatureInfo parseSingleSignatureInfo(Element sigInfoElem)
+ throws MOAApplicationException {
+
+ List dataObjectInfos = parseDataObjectInfos(sigInfoElem);
+ CreateSignatureInfo createSignatureInfo =
+ parseCreateSignatureInfo(sigInfoElem);
+ boolean securityLayerConform;
+
+ if (sigInfoElem.hasAttribute(SL_CONFORM_ATTR_NAME)) {
+ securityLayerConform =
+ BoolUtils.valueOf(sigInfoElem.getAttribute(SL_CONFORM_ATTR_NAME));
+ } else {
+ securityLayerConform = true;
+ }
+
+ return factory.createSingleSignatureInfo(
+ dataObjectInfos,
+ createSignatureInfo,
+ securityLayerConform);
+ }
+
+ /**
+ * Parse the <code>DataObjectInfo</code> DOM elements contained in the given
+ * <code>SingleSignatureInfo</code> DOM element.
+ *
+ * @param sigInfoElem The <code>SingleSignatureInfo</code> DOM element
+ * whose <code>DataObjectInfo</code>s to parse.
+ * @return A <code>List</code> of <code>DataObjectInfo</code> API objects
+ * containing the data from the <code>DataObjectInfo</code> DOM elements.
+ * @throws MOAApplicationException An error occurred parsing one of the
+ * <code>DataObjectInfo</code>s.
+ */
+ private List parseDataObjectInfos(Element sigInfoElem)
+ throws MOAApplicationException {
+
+ List dataObjectInfos = new ArrayList();
+ NodeIterator dataObjInfoElems =
+ XPathUtils.selectNodeIterator(sigInfoElem, DATA_OBJECT_INFO_XPATH);
+ Element dataObjInfoElem;
+
+ while ((dataObjInfoElem = (Element) dataObjInfoElems.nextNode()) != null) {
+ dataObjectInfos.add(parseDataObjectInfo(dataObjInfoElem));
+ }
+ return dataObjectInfos;
+ }
+
+ /**
+ * Parse a <code>DataObjectInfo</code> DOM element.
+ *
+ * @param dataObjInfoElem The <code>DataObjectInfo</code> DOM element to
+ * parse.
+ * @return A <code>DataObjectInfo</code> API element containing the data
+ * from <code>dataObjInfoElem</code>.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>DataObjectInfo</code>.
+ */
+ private DataObjectInfo parseDataObjectInfo(Element dataObjInfoElem)
+ throws MOAApplicationException {
+
+ String structure = dataObjInfoElem.getAttribute("Structure");
+ Element dataObjectElem =
+ (Element) XPathUtils.selectSingleNode(dataObjInfoElem, DATA_OBJECT_XPATH);
+ Content dataObject = RequestParserUtils.parseContent(dataObjectElem);
+ CreateTransformsInfoProfile createTransformsInfoProfile =
+ parseCreateTransformsInfoProfile(dataObjInfoElem);
+ boolean childOfManifest;
+
+ if (dataObjInfoElem.hasAttribute("ChildOfManifest")) {
+ childOfManifest =
+ BoolUtils.valueOf(dataObjInfoElem.getAttribute("ChildOfManifest"));
+ } else {
+ childOfManifest = false;
+ }
+
+ return factory.createDataObjectInfo(
+ structure,
+ childOfManifest,
+ dataObject,
+ createTransformsInfoProfile);
+ }
+
+ /**
+ * Parse a <code>CreateTransformsInfoProfile</code> DOM element.
+ *
+ * @param dataObjInfoElem The <code>DataObjectInfo</code> DOM element
+ * containing the <code>CreateTransformsInfoProfile</code>.
+ * @return The <code>CreateTransformsInfoProfile</code> API object containing
+ * the profile found in <code>dataObjInfoElem</code>.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>CreateTransformsInfoProfile</code>.
+ */
+ private CreateTransformsInfoProfile parseCreateTransformsInfoProfile(Element dataObjInfoElem)
+ throws MOAApplicationException {
+
+ Element profileElem =
+ (Element) XPathUtils.selectSingleNode(
+ dataObjInfoElem,
+ CREATE_TRANSFORMS_INFO_PROFILE_XPATH);
+
+ if ("CreateTransformsInfoProfile".equals(profileElem.getLocalName())) {
+ ProfileParser profileParser = new ProfileParser();
+ return profileParser.parseCreateTransformsInfoProfile(profileElem);
+
+ } else {
+ String profileID = DOMUtils.getText(profileElem);
+ return factory.createCreateTransformsInfoProfile(profileID);
+ }
+ }
+
+ /**
+ * Parse the <code>CreateSignatureInfo</code> DOM element contained in
+ * a <code>SingleSignatureInfo</code>.
+ *
+ * @param sigInfoElem The <code>SingleSignatureInfo</code> DOM element
+ * containing the <code>CreateSignatureInfo</code> to be parsed.
+ * @return A <code>CreateSignatureInfo</code> API object containing the
+ * data from the <code>CreateSignatureInfo</code> DOM element, or
+ * <code>null</code>, if none was found.
+ */
+ private CreateSignatureInfo parseCreateSignatureInfo(Element sigInfoElem) {
+ Element createInfoElem =
+ (Element) XPathUtils.selectSingleNode(
+ sigInfoElem,
+ CREATE_SIGNATURE_INFO_XPATH);
+
+ if (createInfoElem != null) {
+ Element environmentElem =
+ (Element) XPathUtils.selectSingleNode(
+ createInfoElem,
+ CREATE_SIGNATURE_ENVIRONMENT_XPATH);
+ Content environment = RequestParserUtils.parseContent(environmentElem);
+ CreateSignatureEnvironmentProfile environmentProfile =
+ parseCreateSignatureEnvironmentProfile(createInfoElem);
+
+ return factory.createCreateSignatureInfo(environment, environmentProfile);
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Parse the <code>CreateSignatureEnvironmentProfile</code> contained in
+ * the given <code>CreateSignatureInfo</code> DOM element.
+ *
+ * @param createInfoElem <code>CreateSignatureInfo</code> DOM element to
+ * parse.
+ * @return The <code>CreateSignatureEnvironmentProfile</code> contained
+ * in the given <code>CreateSignatureInfo</code> DOM element..
+ */
+ private CreateSignatureEnvironmentProfile parseCreateSignatureEnvironmentProfile(Element createInfoElem) {
+ Element profileElem =
+ (Element) XPathUtils.selectSingleNode(
+ createInfoElem,
+ CREATE_SIGNATURE_ENVIRONMENT_PROFILE_XPATH);
+
+ if ("CreateSignatureEnvironmentProfile"
+ .equals(profileElem.getLocalName())) {
+ ProfileParser profileParser = new ProfileParser();
+ return profileParser.parseCreateSignatureEnvironmentProfile(profileElem);
+ } else {
+ String profileID = DOMUtils.getText(profileElem);
+ return factory.createCreateSignatureEnvironmentProfile(profileID);
+ }
+ }
+
+} \ No newline at end of file
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureResponseBuilder.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureResponseBuilder.java
new file mode 100644
index 000000000..1b72b98ff
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureResponseBuilder.java
@@ -0,0 +1,134 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlbind;
+
+import java.util.Iterator;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+import at.gv.egovernment.moa.util.Constants;
+
+import at.gv.egovernment.moa.spss.MOASystemException;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponseElement;
+import at.gv.egovernment.moa.spss.api.xmlsign.ErrorResponse;
+import at.gv.egovernment.moa.spss.api.xmlsign.SignatureEnvironmentResponse;
+
+/**
+ * Convert a <code>CreateXMLSignatureResponse</code> API object into its
+ * XML representation, according to the MOA XML schema.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CreateXMLSignatureResponseBuilder {
+ private static final String MOA_NS_URI = Constants.MOA_NS_URI;
+
+ /** The XML document containing the response element. */
+ private Document responseDoc;
+ /** The response <code>CreateXMLSignatureResponse</code> DOM element. */
+ private Element responseElem;
+
+ /**
+ * Create a new <code>CreateXMLSignatureResponseBuilder</code>:
+ *
+ * @throws MOASystemException An error occurred setting up the resulting
+ * XML document.
+ */
+ public CreateXMLSignatureResponseBuilder() throws MOASystemException {
+ responseDoc =
+ ResponseBuilderUtils.createResponse("CreateXMLSignatureResponse");
+ responseElem = responseDoc.getDocumentElement();
+ }
+
+ /**
+ * Build a document containing a <code>CreateXMLSignatureResponse</code>
+ * DOM element being the XML representation of the given
+ * <code>CreateXMLSignatureResponse</code> API object.
+ *
+ * @param response The <code>CreateXMLSignatureResponse</code> to convert
+ * to XML.
+ * @return A document containing the <code>CreateXMLSignatureResponse</code>
+ * DOM element.
+ */
+ public Document build(CreateXMLSignatureResponse response) {
+ Iterator iter;
+
+ for (iter = response.getResponseElements().iterator(); iter.hasNext();) {
+ CreateXMLSignatureResponseElement responseElement =
+ (CreateXMLSignatureResponseElement) iter.next();
+
+ switch (responseElement.getResponseType()) {
+ case CreateXMLSignatureResponseElement.SIGNATURE_ENVIRONMENT_RESPONSE :
+ SignatureEnvironmentResponse envResponse =
+ (SignatureEnvironmentResponse) responseElement;
+ addSignatureEnvironment(envResponse);
+ break;
+
+ case CreateXMLSignatureResponseElement.ERROR_RESPONSE :
+ ErrorResponse errorResponse = (ErrorResponse) responseElement;
+ addErrorResponse(errorResponse);
+ break;
+ }
+
+ }
+
+ return responseDoc;
+ }
+
+ /**
+ * Add a <code>SignatureEnvironment</code> element to the response.
+ *
+ * @param envResponse The content to put under the
+ * <code>SignatureEnvironment</code> element. This should either be a
+ * <code>dsig:Signature</code> element (in case of a detached signature) or
+ * the signature environment containing the signature (in case of
+ * an enveloping signature).
+ */
+ private void addSignatureEnvironment(SignatureEnvironmentResponse envResponse) {
+ Element content = envResponse.getSignatureEnvironment();
+ Node importedSignature = responseDoc.importNode(content, true);
+ Element signatureEnvironment =
+ responseDoc.createElementNS(MOA_NS_URI, "SignatureEnvironment");
+ signatureEnvironment.appendChild(importedSignature);
+ responseElem.appendChild(signatureEnvironment);
+ }
+
+ /**
+ * Add a <code>ErrorResponse</code> element to the response.
+ *
+ * @param errorResponse The API object containing the information to put into
+ * the <code>ErrorResponse</code> DOM element.
+ */
+ private void addErrorResponse(ErrorResponse errorResponse) {
+ Element errorElem =
+ responseDoc.createElementNS(MOA_NS_URI, "ErrorResponse");
+ Element errorCodeElem =
+ responseDoc.createElementNS(MOA_NS_URI, "ErrorCode");
+ Element infoElem = responseDoc.createElementNS(MOA_NS_URI, "Info");
+ String errorCodeStr = Integer.toString(errorResponse.getErrorCode());
+
+ errorCodeElem.appendChild(responseDoc.createTextNode(errorCodeStr));
+ errorElem.appendChild(errorCodeElem);
+ infoElem.appendChild(responseDoc.createTextNode(errorResponse.getInfo()));
+ errorElem.appendChild(errorCodeElem);
+ errorElem.appendChild(infoElem);
+ responseElem.appendChild(errorElem);
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/ProfileParser.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/ProfileParser.java
new file mode 100644
index 000000000..d43f8b75a
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/ProfileParser.java
@@ -0,0 +1,300 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlbind;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.traversal.NodeIterator;
+
+import at.gv.egovernment.moa.util.Base64Utils;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfile;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureLocation;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfile;
+import at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfile;
+import at.gv.egovernment.moa.spss.api.xmlverify.TransformParameter;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfile;
+
+/**
+ * Parse the various profile elements contained in the MOA web service requests
+ * and given as separate files in the MOA configuration.
+ *
+ * The profiles parsed must be schema valid according to the MOA XML schema.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ProfileParser {
+
+ //
+ // XPath expressions to select parts of the profiles
+ //
+ private static final String MOA = Constants.MOA_PREFIX + ":";
+ private static final String DSIG = Constants.DSIG_PREFIX + ":";
+ private static final String CREATE_TRANSFORMS_XPATH =
+ MOA + "CreateTransformsInfo/" + DSIG + "Transforms";
+ private static final String FINAL_DATA_META_INFO_XPATH =
+ MOA + "CreateTransformsInfo/" + MOA + "FinalDataMetaInfo";
+ private static final String CREATE_SIGNATURE_LOCATION_XPATH =
+ MOA + "CreateSignatureLocation";
+ private static final String SUPPLEMENT_XPATH = MOA + "Supplement";
+ private static final String VERIFY_TRANSFORMS_XPATH = DSIG + "Transforms";
+ private static final String TRANSFORM_PARAMETER_XPATH =
+ MOA + "TransformParameter";
+ private static final String TRANSFORM_PARAMETER_CONTENT_XPATH =
+ MOA + "Base64Content | " + MOA + "Hash";
+ private static final String DIGEST_METHOD_XPATH = DSIG + "DigestMethod";
+ private static final String DIGEST_VALUE_XPATH = DSIG + "DigestValue";
+
+ /** The factory used to create API objects. */
+ private SPSSFactory factory = SPSSFactory.getInstance();
+
+ /**
+ * Parse a <code>CreateTransformsInfoProfile</code> DOM element.
+ *
+ * @param profileElem The <code>CreateTransformsInfoProfile</code> element
+ * to parse.
+ * @return The <code>CreateTransformsInfoProfile</code> API object containing
+ * the data from the <code>profileElem</code>.
+ * @throws MOAApplicationException An error occurred parsing the DOM element.
+ */
+ public CreateTransformsInfoProfile parseCreateTransformsInfoProfile(Element profileElem)
+ throws MOAApplicationException {
+ CreateTransformsInfo createTransformsInfo =
+ parseCreateTransformsInfo(profileElem);
+ List supplements = parseSupplements(profileElem);
+
+ return factory.createCreateTransformsInfoProfile(
+ createTransformsInfo,
+ supplements);
+ }
+
+ /**
+ * Parse the <code>CreateTransformsInfo</code> DOM element contained in a
+ * <code>CreateTransformsInfoProfile</code>.
+ *
+ * @param profileElem The <code>CreateTransformsInfoProfile</code> DOM
+ * element containing the <code>CreateTransformsInfo</code>.
+ * @return The <code>CreateTransformsInfo</code> API object containinig the
+ * data from the <code>CreateTransformsInfo</code> DOM element.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>CreateTransformsInfo</code> DOM element.
+ */
+ private CreateTransformsInfo parseCreateTransformsInfo(Element profileElem)
+ throws MOAApplicationException {
+
+ Element transformsElem =
+ (Element) XPathUtils.selectSingleNode(
+ profileElem,
+ CREATE_TRANSFORMS_XPATH);
+ Element metaInfoElem =
+ (Element) XPathUtils.selectSingleNode(
+ profileElem,
+ FINAL_DATA_META_INFO_XPATH);
+ MetaInfo finalDataMetaInfo;
+ List transforms;
+
+ // parse the dsig:Transforms
+ if (transformsElem != null) {
+ TransformParser transformsParser = new TransformParser();
+ transforms = transformsParser.parseTransforms(transformsElem);
+ } else {
+ transforms = null;
+ }
+
+ // parse the meta info
+ finalDataMetaInfo = RequestParserUtils.parseMetaInfo(metaInfoElem);
+
+ return factory.createCreateTransformsInfo(transforms, finalDataMetaInfo);
+ }
+
+ /**
+ * Parse a <code>CreateSignatureEnvironmentProfile</code> DOM element.
+ *
+ * @param profileElem The <code>CreateSignatureEnvironmentProfile</code>
+ * DOM element to parse.
+ * @return The <code>CreateSignatureEnvironmentProfile</code> API object
+ * containing the data from the <code>profileElem</code>.
+ */
+ public CreateSignatureEnvironmentProfile parseCreateSignatureEnvironmentProfile(Element profileElem) {
+ CreateSignatureLocation createSignatureLocation =
+ parseCreateSignatureLocation(profileElem);
+ List supplements = parseSupplements(profileElem);
+
+ return factory.createCreateSignatureEnvironmentProfile(
+ createSignatureLocation,
+ supplements);
+ }
+
+ /**
+ * Parse a <code>CreateSignatureLocation</code> DOM element contained in
+ * a <code>CreateSignatureEnvironmentProfile</code>.
+ *
+ * @param profileElem The <code>CreateSignatureEnvironmentProfile</code> DOM
+ * element containing the <code>CreateSignatureLocation</code>.
+ * @return The <code>CreateSignatureLocation</code> API object containing
+ * the data from the <code>CreateSignatureLocation</code> DOM element.
+ */
+ private CreateSignatureLocation parseCreateSignatureLocation(Element profileElem) {
+ Element locationElem =
+ (Element) XPathUtils.selectSingleNode(
+ profileElem,
+ CREATE_SIGNATURE_LOCATION_XPATH);
+ String xPathExpression = DOMUtils.getText(locationElem);
+ Map namespaceDeclarations = DOMUtils.getNamespaceDeclarations(locationElem);
+ String indexStr = locationElem.getAttribute("Index");
+ int index = Integer.parseInt(indexStr);
+
+ return factory.createCreateSignatureLocation(
+ xPathExpression,
+ index,
+ namespaceDeclarations);
+ }
+
+ /**
+ * Parse all <code>Supplement</code> DOM elements contained in a given
+ * parent DOM element.
+ *
+ * @param supplementsParentElem The DOM element being the parent of the
+ * <code>Supplement</code>s.
+ * @return A <code>List</code> of <code>Supplement</code> API objects
+ * containing the data from the <code>Supplement</code> DOM elements.
+ */
+ private List parseSupplements(Element supplementsParentElem) {
+ List supplements = new ArrayList();
+ NodeIterator supplementElems =
+ XPathUtils.selectNodeIterator(supplementsParentElem, SUPPLEMENT_XPATH);
+ Element supplementElem;
+
+ while ((supplementElem = (Element) supplementElems.nextNode()) != null) {
+ XMLDataObjectAssociation supplement =
+ RequestParserUtils.parseXMLDataObjectAssociation(supplementElem);
+ supplements.add(supplement);
+ }
+ return supplements;
+ }
+
+ /**
+ * Parse a <code>SupplementProfile</code> DOM element.
+ *
+ * @param profileElem The <code>SupplementProfile</code> DOM element to parse.
+ * @return The <code>SupplementProfile</code> API object containing the
+ * data from the <code>SupplementProfile</code> DOM element.
+ */
+ public SupplementProfile parseSupplementProfile(Element profileElem) {
+ XMLDataObjectAssociation supplementProfile =
+ RequestParserUtils.parseXMLDataObjectAssociation(profileElem);
+
+ return factory.createSupplementProfile(supplementProfile);
+ }
+
+ /**
+ * Parse a <code>VerifyTransformsInfoProfile</code> DOM element.
+ *
+ * @param profileElem The <code>VerifyTransformsInfoProfile</code> DOM
+ * element to parse.
+ * @return A <code>VerifyTransformsInfoProfile</code> API object containing
+ * the information from the <code>VerifyTransformsInfoProfile</code> DOM
+ * element.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>VerifyTransformsInfoProfile</code>.
+ */
+ public VerifyTransformsInfoProfile parseVerifyTransformsInfoProfile(Element profileElem)
+ throws MOAApplicationException {
+ Element transformsElem =
+ (Element) XPathUtils.selectSingleNode(
+ profileElem,
+ VERIFY_TRANSFORMS_XPATH);
+ List transforms = null;
+ NodeIterator paramElems =
+ XPathUtils.selectNodeIterator(profileElem, TRANSFORM_PARAMETER_XPATH);
+ Element paramElem;
+ List transformParameters = new ArrayList();
+
+ // parse the dsig:Transforms
+ if (transformsElem != null) {
+ TransformParser transformsParser = new TransformParser();
+ transforms = transformsParser.parseTransforms(transformsElem);
+ }
+
+ // parse the TransformParameter elements
+ while ((paramElem = (Element) paramElems.nextNode()) != null) {
+ transformParameters.add(parseTransformParameter(paramElem));
+ }
+
+ return factory.createVerifyTransformsInfoProfile(
+ transforms,
+ transformParameters);
+ }
+
+ /**
+ * Parse a <code>TransformParameter</code> DOM element.
+ *
+ * @param paramElem The <code>TransformParameter</code> DOM element to
+ * parse.
+ * @return The <code>TransformParameter</code> API object containing the
+ * information from the <code>TransformParameter</code> DOM element.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>TransformParameter</code> DOM element.
+ */
+ private TransformParameter parseTransformParameter(Element paramElem)
+ throws MOAApplicationException {
+ String uri = paramElem.getAttribute("URI");
+ Element contentElem =
+ (Element) XPathUtils.selectSingleNode(
+ paramElem,
+ TRANSFORM_PARAMETER_CONTENT_XPATH);
+
+ if (contentElem == null) {
+ return factory.createTransformParameter(uri);
+ } else if ("Base64Content".equals(contentElem.getLocalName())) {
+ String base64Str = DOMUtils.getText(contentElem);
+ InputStream binaryContent = Base64Utils.decodeToStream(base64Str, true);
+
+ return factory.createTransformParameter(uri, binaryContent);
+ } else { // "Hash".equals(contentElem.getLocalName())
+ String digestMethodStr =
+ XPathUtils.getElementValue(contentElem, DIGEST_METHOD_XPATH, "");
+ String digestValueStr =
+ XPathUtils.getElementValue(contentElem, DIGEST_VALUE_XPATH, "");
+ byte[] digestValue = null;
+
+ try {
+ digestValue = Base64Utils.decode(digestValueStr, true);
+ } catch (IOException e) {
+ throw new MOAApplicationException("2270", null);
+ }
+ return factory.createTransformParameter(
+ uri,
+ digestMethodStr,
+ digestValue);
+ }
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/RequestParserUtils.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/RequestParserUtils.java
new file mode 100644
index 000000000..9885a5e55
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/RequestParserUtils.java
@@ -0,0 +1,172 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlbind;
+
+import java.text.ParseException;
+import java.util.Date;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.util.Base64Utils;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.DateTimeUtils;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation;
+
+/**
+ * Utility methods for parsing XML requests definied in the MOA XML schema.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class RequestParserUtils {
+ //
+ // XPath expressions for parsing parts of a request
+ //
+ private static final String MOA = Constants.MOA_PREFIX + ":";
+ private static final String REFERENCE_ATTR_NAME = "Reference";
+ private static final String MIME_TYPE_XPATH = MOA + "MimeType";
+ private static final String DESCRIPTION_XPATH = MOA + "Description";
+ private static final String TYPE_XPATH = MOA + "Type";
+ private static final String XML_ASSOC_CONTENT_XPATH = MOA + "Content";
+ private static final String CONTENT_XPATH =
+ MOA + "Base64Content | " + MOA + "XMLContent |" + MOA + "LocRefContent";
+ private static final String ANY_OTHER_XPATH =
+ "*[namespace-uri() != \"" + Constants.MOA_NS_URI + "\"]";
+
+ /**
+ * Parse a <code>XMLDataObjectAssociationType</code> kind of DOM element.
+ *
+ * @param assocElem The <code>XMLDataObjectAssociationType</code> kind of
+ * DOM elmeent to parse.
+ * @return The <code>XMLDataObjectAssociation</code> API object containing
+ * the data from the <code>XMLDataObjectAssociationType</code> DOM element.
+ */
+ public static XMLDataObjectAssociation parseXMLDataObjectAssociation(Element assocElem) {
+ SPSSFactory factory = SPSSFactory.getInstance();
+ MetaInfo metaInfo = parseMetaInfo(assocElem);
+ Element contentElem =
+ (Element) XPathUtils.selectSingleNode(assocElem, XML_ASSOC_CONTENT_XPATH);
+ Content content = parseContent(contentElem);
+
+ return factory.createXMLDataObjectAssociation(metaInfo, content);
+ }
+
+ /**
+ * Parse a <code>MetaInfoType</code> kind of DOM element.
+ *
+ * @param metaInfoElem The <code>MetaInfoType</code> kind of DOM element.
+ * @return The <code>MetaInfo</code> API object containing the data from
+ * the <code>metaInfoElem</code>.
+ */
+ public static MetaInfo parseMetaInfo(Element metaInfoElem) {
+ SPSSFactory factory = SPSSFactory.getInstance();
+ String mimeType =
+ XPathUtils.getElementValue(metaInfoElem, MIME_TYPE_XPATH, null);
+ String description =
+ XPathUtils.getElementValue(metaInfoElem, DESCRIPTION_XPATH, null);
+ NodeList anyOther =
+ XPathUtils.selectNodeList(metaInfoElem, ANY_OTHER_XPATH);
+ String type =
+ XPathUtils.getElementValue(metaInfoElem, TYPE_XPATH, null);
+
+ return factory.createMetaInfo(mimeType, description, anyOther, type);
+ }
+
+ /**
+ * Parse a <code>ContentOptionalRefType</code> or
+ * <code>ContentRequiredRefType</code> kind of DOM element.
+ * @param contentParentElem The DOM element being the parent of the
+ * content element.
+ * @return The <code>Content</code> API object containing the data from
+ * the given DOM element.
+ */
+ public static Content parseContent(Element contentParentElem) {
+ SPSSFactory factory = SPSSFactory.getInstance();
+ String referenceURI =
+ contentParentElem.hasAttribute(REFERENCE_ATTR_NAME)
+ ? contentParentElem.getAttribute(REFERENCE_ATTR_NAME)
+ : null;
+ Element contentElem =
+ (Element) XPathUtils.selectSingleNode(contentParentElem, CONTENT_XPATH);
+
+ if (contentElem == null) {
+ return factory.createContent(referenceURI);
+ }
+
+ if ("Base64Content".equals(contentElem.getLocalName())) {
+ String base64String = DOMUtils.getText(contentElem);
+ return factory.createContent(
+ Base64Utils.decodeToStream(base64String, true),
+ referenceURI);
+ } else if ("LocRefContent".equals(contentElem.getLocalName())) {
+ String locationReferenceURI = DOMUtils.getText(contentElem);
+ return factory.createContent(
+ locationReferenceURI,
+ referenceURI);
+ } else { // "XMLContent".equals(contentElem.getLocalName())
+ return factory.createContent(
+ contentElem.getChildNodes(),
+ referenceURI);
+ }
+ }
+
+ /**
+ * Get the signing time from a Verfiy(CMS|XML)SignatureRequest.
+ *
+ * @param requestElem A <code>Verify(CMS|XML)SignatureRequest</code> DOM
+ * element.
+ * @param dateTimeXPath The XPath to lookup the <code>DateTime</code> element
+ * within the request.
+ * @return Date The date and time corresponding to the <code>DateTime</code>
+ * element in the request. If no <code>DateTime</code> element exists in the
+ * request, <code>null</code> is returned.
+ * @throws MOAApplicationException An error occurred during a parsing the
+ * <code>DateTime</code> element or creating the return value.
+ */
+ public static Date parseDateTime(Element requestElem, String dateTimeXPath)
+ throws MOAApplicationException {
+
+ Element dateTimeElem;
+ String dateTimeText;
+
+ // select the DateTime element
+ dateTimeElem =
+ (Element) XPathUtils.selectSingleNode(requestElem, dateTimeXPath);
+
+ // parse a date from the element value
+ if (dateTimeElem != null) {
+ dateTimeText = DOMUtils.getText(dateTimeElem);
+ try {
+ return DateTimeUtils.parseDateTime(dateTimeText);
+ } catch (ParseException e) {
+ throw new MOAApplicationException(
+ "1104",
+ new Object[] { dateTimeText });
+ }
+ } else {
+ return null;
+ }
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/ResponseBuilderUtils.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/ResponseBuilderUtils.java
new file mode 100644
index 000000000..30d19023a
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/ResponseBuilderUtils.java
@@ -0,0 +1,256 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlbind;
+
+import java.io.IOException;
+import java.security.cert.CertificateEncodingException;
+import java.security.cert.X509Certificate;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+import iaik.utils.RFC2253NameParser;
+import iaik.utils.RFC2253NameParserException;
+
+import at.gv.egovernment.moa.util.Base64Utils;
+import at.gv.egovernment.moa.util.Constants;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.MOASystemException;
+
+/**
+ * Utility methods used by the verious <code>ResponseBuilder</code> classes.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+class ResponseBuilderUtils {
+ //
+ // shortcuts to various XML namespace constants
+ //
+ private static final String MOA_NS_URI = Constants.MOA_NS_URI;
+ private static final String DSIG = Constants.DSIG_PREFIX + ":";
+ private static final String DSIG_NS_URI = Constants.DSIG_NS_URI;
+ private static final String XMLNS_NS_URI = Constants.XMLNS_NS_URI;
+
+ /**
+ * Create a response element with all the namespaces set.
+ *
+ * @param responseName The name of the response root element.
+ * @return A DOM document containing the response root element and predefined
+ * MOA, DSIG and XML namespace declarations.
+ * @throws MOASystemException An error building the response document.
+ */
+ public static Document createResponse(String responseName)
+ throws MOASystemException {
+
+ try {
+ DocumentBuilder docBuilder =
+ DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ DOMImplementation impl = docBuilder.getDOMImplementation();
+ Document response;
+ Element root;
+ String attrValue;
+
+ response = impl.createDocument(MOA_NS_URI, responseName, null);
+ root = response.getDocumentElement();
+
+ // add namespace prefix declarations
+ root.setAttributeNS(XMLNS_NS_URI, "xmlns", MOA_NS_URI);
+ attrValue = "xmlns:" + Constants.DSIG_PREFIX;
+ root.setAttributeNS(XMLNS_NS_URI, attrValue, DSIG_NS_URI);
+
+ return response;
+ } catch (ParserConfigurationException e) {
+ throw new MOASystemException("2200", null, e);
+ }
+ }
+
+ /**
+ * Add a <code>SignerInfo</code> element to the response.
+ *
+ * @param response The response document, in order to create new elements in
+ * it.
+ * @param root The root element into which the <code>SignerInfo</code> element
+ * will be inserted.
+ * @param cert The signer certificate to add.
+ * @param isQualified Indicates, whether <code>cert</code> is a qualified
+ * certificate.
+ * @param isPublicAuthority Indicates, whether <code>cert</code> is
+ * certificate owned by a public authority.
+ * @param publicAuthorityID Information about the public authority owning
+ * <code>cert</code>. Must not be <code>null</code>, if
+ * <code>isPublicAuthority ! = null</code>.
+ * @throws MOAApplicationException An error occurred reading data from the
+ * certificate.
+ */
+ public static void addSignerInfo(
+ Document response,
+ Element root,
+ X509Certificate cert,
+ boolean isQualified,
+ boolean isPublicAuthority,
+ String publicAuthorityID)
+ throws MOAApplicationException {
+
+ Element signerInfoElem = response.createElementNS(MOA_NS_URI, "SignerInfo");
+ Element x509DataElem =
+ response.createElementNS(DSIG_NS_URI, DSIG + "X509Data");
+ Element x509IssuerSerialElem =
+ response.createElementNS(DSIG_NS_URI, DSIG + "X509IssuerSerial");
+ Element x509IssuerElem =
+ response.createElementNS(DSIG_NS_URI, DSIG + "X509IssuerName");
+ String issuer = cert.getIssuerDN().getName();
+ Element x509SerialNumberElem =
+ response.createElementNS(DSIG_NS_URI, DSIG + "X509SerialNumber");
+ String serialNumber = cert.getSerialNumber().toString();
+ Element x509SubjectNameElem =
+ response.createElementNS(DSIG_NS_URI, DSIG + "X509SubjectName");
+ Element x509CertificateElem =
+ response.createElementNS(DSIG_NS_URI, DSIG + "X509Certificate");
+ Element qualifiedCertificateElem =
+ isQualified
+ ? response.createElementNS(MOA_NS_URI, "QualifiedCertificate")
+ : null;
+ Element publicAuthorityElem =
+ isPublicAuthority
+ ? response.createElementNS(MOA_NS_URI, "PublicAuthority")
+ : null;
+ Element codeElem =
+ publicAuthorityID != null
+ ? response.createElementNS(MOA_NS_URI, "Code")
+ : null;
+
+ // fill in text
+ x509IssuerElem.appendChild(response.createTextNode(issuer));
+ x509SerialNumberElem.appendChild(response.createTextNode(serialNumber));
+ try {
+ RFC2253NameParser parser =
+ new RFC2253NameParser(cert.getSubjectDN().getName());
+ String subjectRfc2253 = parser.parse().getRFC2253String();
+ x509SubjectNameElem.appendChild(response.createTextNode(subjectRfc2253));
+ } catch (RFC2253NameParserException e) {
+ x509SubjectNameElem.appendChild(
+ response.createTextNode(cert.getSubjectDN().getName()));
+ }
+ try {
+ x509CertificateElem.appendChild(
+ response.createTextNode(Base64Utils.encode(cert.getEncoded())));
+ } catch (CertificateEncodingException e) {
+ throw new MOAApplicationException("2245", null, e);
+ } catch (IOException e) {
+ throw new MOAApplicationException("2245", null, e);
+ }
+
+ // build structure
+ x509DataElem.appendChild(x509SubjectNameElem);
+ x509IssuerSerialElem.appendChild(x509IssuerElem);
+ x509IssuerSerialElem.appendChild(x509SerialNumberElem);
+ x509DataElem.appendChild(x509IssuerSerialElem);
+ x509DataElem.appendChild(x509CertificateElem);
+ if (isQualified) {
+ x509DataElem.appendChild(qualifiedCertificateElem);
+ }
+ if (isPublicAuthority) {
+ x509DataElem.appendChild(publicAuthorityElem);
+ if (publicAuthorityID != null) {
+ codeElem.appendChild(response.createTextNode(publicAuthorityID));
+ publicAuthorityElem.appendChild(codeElem);
+ }
+ }
+ signerInfoElem.appendChild(x509DataElem);
+ root.appendChild(signerInfoElem);
+ }
+
+ /**
+ * Add an element containing <code>Code</code> and <code>Info</code>
+ * subelements.
+ *
+ * @param response The response document, in order to create new elements in
+ * it.
+ * @param root The root element into which to insert the newly created
+ * element.
+ * @param elementName The name of the newly created element.
+ * @param code The content of the <code>Code</code> subelement.
+ * @param info The content of the <code>Info</code> subelement.
+ */
+ public static void addCodeInfoElement(
+ Document response,
+ Element root,
+ String elementName,
+ int code,
+ NodeList info) {
+
+ Element codeInfoElem = response.createElementNS(MOA_NS_URI, elementName);
+ Element codeElem = response.createElementNS(MOA_NS_URI, "Code");
+ Element infoElem;
+ int i;
+
+ codeElem.appendChild(response.createTextNode(Integer.toString(code)));
+ codeInfoElem.appendChild(codeElem);
+ if (info != null) {
+ infoElem = response.createElementNS(MOA_NS_URI, "Info");
+
+ for (i = 0; i < info.getLength(); i++) {
+ infoElem.appendChild(info.item(i).cloneNode(true));
+ }
+ codeInfoElem.appendChild(infoElem);
+ }
+ root.appendChild(codeInfoElem);
+ }
+
+ /**
+ * Add an element containing <code>Code</code> and <code>Info</code>
+ * subelements.
+ *
+ * @param response The response document, in order to create new elements in
+ * it.
+ * @param root The root element into which to insert the newly created
+ * element.
+ * @param elementName The name of the newly created element.
+ * @param code The content of the <code>Code</code> subelement.
+ * @param info The content of the <code>Info</code> subelement.
+ */
+ public static void addCodeInfoElement(
+ Document response,
+ Element root,
+ String elementName,
+ int code,
+ String info) {
+
+ Element codeInfoElem = response.createElementNS(MOA_NS_URI, elementName);
+ Element codeElem = response.createElementNS(MOA_NS_URI, "Code");
+ Element infoElem;
+ int i;
+
+ codeElem.appendChild(response.createTextNode(Integer.toString(code)));
+ codeInfoElem.appendChild(codeElem);
+
+ if (info != null) {
+ infoElem = response.createElementNS(MOA_NS_URI, "Info");
+ infoElem.appendChild(response.createTextNode(info));
+ codeInfoElem.appendChild(infoElem);
+ }
+ root.appendChild(codeInfoElem);
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/TransformParser.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/TransformParser.java
new file mode 100644
index 000000000..cc9ae0418
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/TransformParser.java
@@ -0,0 +1,261 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlbind;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.traversal.NodeIterator;
+
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.common.Base64Transform;
+import at.gv.egovernment.moa.spss.api.common.CanonicalizationTransform;
+import at.gv.egovernment.moa.spss.api.common.EnvelopedSignatureTransform;
+import at.gv.egovernment.moa.spss.api.common.ExclusiveCanonicalizationTransform;
+import at.gv.egovernment.moa.spss.api.common.Transform;
+import at.gv.egovernment.moa.spss.api.common.XPathFilter;
+import at.gv.egovernment.moa.spss.api.common.XPathFilter2Transform;
+import at.gv.egovernment.moa.spss.api.common.XPathTransform;
+import at.gv.egovernment.moa.spss.api.common.XSLTTransform;
+
+/**
+ * A parser to parse XMLDsig <code>Transform</code> DOM elements into their
+ * MOA SPSS API representation.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class TransformParser {
+ //
+ // XPath expressions for selecting information from the DOM tree
+ //
+ private static final String DSIG = Constants.DSIG_PREFIX + ":";
+ private static final String DSIG_FILTER2 =
+ Constants.DSIG_FILTER2_PREFIX + ":";
+ private static final String XSLT = Constants.XSLT_PREFIX + ":";
+ private static final String EC = Constants.DSIG_EC_PREFIX + ":";
+ private static final String TRANSFORM_XPATH = DSIG + "Transform";
+ private static final String XPATH_XPATH = DSIG + "XPath";
+ private static final String XSLT_ELEMENT_XPATH = XSLT + "stylesheet";
+ private static final String XPATH2_XPATH =
+ (DSIG_FILTER2 + "XPath[@Filter=\"intersect\"] | ")
+ + (DSIG_FILTER2 + "XPath[@Filter=\"subtract\"] | ")
+ + (DSIG_FILTER2 + "XPath[@Filter=\"union\"]");
+ private static final String INCLUSIVE_NAMESPACES_XPATH =
+ EC + "InclusiveNamespaces";
+
+ /**
+ * The <code>SPSSFactory</code> to use for creating new API objects.
+ */
+ private SPSSFactory factory = SPSSFactory.getInstance();
+
+ /**
+ * Parse an XMLDsig <code>Transforms</code> DOM element.
+ *
+ * @param transformsElem The <code>Transforms</code> DOM element to parse.
+ * @return A <code>List</code> of <code>Transform</code> API objects
+ * containing the data from the individual <code>Transform</code> DOM
+ * elements.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>Transforms</code> DOM element.
+ */
+ public List parseTransforms(Element transformsElem)
+ throws MOAApplicationException {
+ List transforms = new ArrayList();
+ NodeIterator transformElems =
+ XPathUtils.selectNodeIterator(transformsElem, TRANSFORM_XPATH);
+ Element transformElem;
+ Transform transform;
+
+ while ((transformElem = (Element) transformElems.nextNode()) != null) {
+ transform = parseTransform(transformElem);
+ transforms.add(transform);
+ }
+
+ return transforms;
+ }
+
+ /**
+ * Parse an XMLDsig <code>Transform</code> DOM element.
+ *
+ * @param transformElem <code>Transform</code> DOM element to parse.
+ * @return The <code>Transform</code> API object containing the data
+ * from the <code>Transform</code> DOM element.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>Transform</code> DOM element.
+ */
+ public Transform parseTransform(Element transformElem)
+ throws MOAApplicationException {
+
+ String algorithmUri = transformElem.getAttribute("Algorithm");
+
+ if (CanonicalizationTransform.CANONICAL_XML.equals(algorithmUri)
+ || CanonicalizationTransform.CANONICAL_XML_WITH_COMMENTS.equals(
+ algorithmUri)) {
+ return factory.createCanonicalizationTransform(algorithmUri);
+ } else if (
+ ExclusiveCanonicalizationTransform.EXCLUSIVE_CANONICAL_XML.equals(
+ algorithmUri)
+ || ExclusiveCanonicalizationTransform
+ .EXCLUSIVE_CANONICAL_XML_WITH_COMMENTS
+ .equals(
+ algorithmUri)) {
+ return parseExclusiveC14nTransform(algorithmUri, transformElem);
+ } else if (Base64Transform.BASE64_DECODING.equals(algorithmUri)) {
+ return factory.createBase64Transform();
+ } else if (
+ EnvelopedSignatureTransform.ENVELOPED_SIGNATURE.equals(algorithmUri)) {
+ return factory.createEnvelopedSignatureTransform();
+ } else if (XPathTransform.XPATH.equals(algorithmUri)) {
+ return parseXPathTransform(transformElem);
+ } else if (XPathFilter2Transform.XPATH_FILTER2.equals(algorithmUri)) {
+ return parseXPathFilter2Transform(transformElem);
+ } else if (XSLTTransform.XSLT.equals(algorithmUri)) {
+ return parseXSLTTransform(transformElem);
+ } else {
+ throw new MOAApplicationException("1108", new Object[] { algorithmUri });
+ }
+ }
+
+ /**
+ * Parse an exclusive canonicalization type of transform.
+ *
+ * @param algorithmUri The algorithm URI of the canonicalization algorithm.
+ * @param transformElem The <code>Transform</code> DOM element to parse.
+ * @return An <code>ExclusiveCanonicalizationTransform</code> API object
+ * containing the data from the <code>transformElem</code>.
+ */
+ private Transform parseExclusiveC14nTransform(
+ String algorithmUri,
+ Element transformElem)
+ {
+
+ Element inclusiveNamespacesElem =
+ (Element) XPathUtils.selectSingleNode(
+ transformElem,
+ INCLUSIVE_NAMESPACES_XPATH);
+
+ List inclusiveNamespaces = new ArrayList();
+ if (inclusiveNamespacesElem != null)
+ {
+ StringTokenizer tokenizer = new StringTokenizer(inclusiveNamespacesElem.getAttribute("PrefixList"));
+ while (tokenizer.hasMoreTokens())
+ {
+ inclusiveNamespaces.add(tokenizer.nextToken());
+ }
+ }
+ return factory.createExclusiveCanonicalizationTransform(
+ algorithmUri,
+ inclusiveNamespaces);
+ }
+
+ /**
+ * Parse an <code>XPath</code> type of <code>Transform</code>.
+ *
+ * @param transformElem The <code>Transform</code> DOM element to parse.
+ * @return The <code>Transform</code> API object representation of the
+ * <code>Transform</code> DOM element.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>Transform</code> DOM element.
+ */
+ private Transform parseXPathTransform(Element transformElem)
+ throws MOAApplicationException {
+ Element xPathElem =
+ (Element) XPathUtils.selectSingleNode(transformElem, XPATH_XPATH);
+ Map nsDecls;
+
+ if (xPathElem == null) {
+ throw new MOAApplicationException("2202", null);
+ }
+
+ nsDecls = DOMUtils.getNamespaceDeclarations(xPathElem);
+ nsDecls.remove("");
+
+ return factory.createXPathTransform(DOMUtils.getText(xPathElem), nsDecls);
+ }
+
+ /**
+ * Parse an <code>XPathFilter2</code> type of <code>Transform</code>.
+ *
+ * @param transformElem The <code>Transform</code> DOM element to parse.
+ * @return The <code>Transform</code> API object representation of the
+ * <code>Transform</code> DOM element.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>Transform</code> DOM element.
+ */
+ private Transform parseXPathFilter2Transform(Element transformElem)
+ throws MOAApplicationException {
+ List filters = new ArrayList();
+ NodeIterator iter =
+ XPathUtils.selectNodeIterator(transformElem, XPATH2_XPATH);
+ Element filterElem;
+
+ while ((filterElem = (Element) iter.nextNode()) != null) {
+ String filterAttr = filterElem.getAttribute("Filter");
+ String filterType;
+ String expression;
+ Map nsDecls;
+
+ if (filterAttr.equals("intersect")) {
+ filterType = XPathFilter.INTERSECT_TYPE;
+ } else if (filterAttr.equals("subtract")) {
+ filterType = XPathFilter.SUBTRACT_TYPE;
+ } else {
+ filterType = XPathFilter.UNION_TYPE;
+ }
+
+ expression = DOMUtils.getText(filterElem);
+ nsDecls = DOMUtils.getNamespaceDeclarations(filterElem);
+ nsDecls.remove("");
+ filters.add(factory.createXPathFilter(filterType, expression, nsDecls));
+ }
+ if (filters.size() == 0) {
+ throw new MOAApplicationException("2216", null);
+ }
+
+ return factory.createXPathFilter2Transform(filters);
+ }
+
+ /**
+ * Parse an <code>XSLT</code> type of <code>Transform</code>.
+ *
+ * @param transformElem The <code>Transform</code> DOM element to parse.
+ * @return The <code>Transform</code> API object representation of the
+ * <code>Transform</code> DOM element.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>Transform</code> DOM element.
+ */
+ private Transform parseXSLTTransform(Element transformElem)
+ throws MOAApplicationException {
+ Element xsltElem =
+ (Element) XPathUtils.selectSingleNode(transformElem, XSLT_ELEMENT_XPATH);
+
+ if (xsltElem == null) {
+ throw new MOAApplicationException("2215", null);
+ }
+
+ return factory.createXSLTTransform(xsltElem);
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureRequestParser.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureRequestParser.java
new file mode 100644
index 000000000..a2b90f273
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureRequestParser.java
@@ -0,0 +1,184 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlbind;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.util.Base64Utils;
+import at.gv.egovernment.moa.util.CollectionUtils;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSContent;
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSDataObject;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest;
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+
+/**
+ * A parser to parse <code>VerifyCMSSignatureRequest</code> DOM trees into
+ * <code>VerifyCMSSignatureRequest</code> API objects.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class VerifyCMSSignatureRequestParser {
+
+ //
+ // XPath expressions for selecting parts of the DOM message
+ //
+ private static final String MOA = Constants.MOA_PREFIX + ":";
+ private static final String DATE_TIME_XPATH = MOA + "DateTime";
+ private static final String CMS_SIGNATURE_XPATH = MOA + "CMSSignature";
+ private static final String TRUST_PROFILE_ID_XPATH = MOA + "TrustProfileID";
+ private static final String DATA_OBJECT_XPATH = MOA + "DataObject";
+ private static final String META_INFO_XPATH = MOA + "MetaInfo";
+ private static final String CONTENT_XPATH = MOA + "Content";
+ private static final String BASE64_CONTENT_XPATH = MOA + "Base64Content";
+
+ /** The <code>SPSSFactory</code> for creating new API objects. */
+ private SPSSFactory factory = SPSSFactory.getInstance();
+
+ /**
+ * Parse a <code>VerifyCMSSignatureRequest</code> DOM element, as defined
+ * by the MOA schema.
+ *
+ * @param requestElem The <code>VerifyCMSSignatureRequest</code> to parse. The
+ * request must have been successfully parsed against the schema for this
+ * method to succeed.
+ * @return A <code>VerifyCMSSignatureRequest</code> API objects containing
+ * the data from the DOM element.
+ * @throws MOAApplicationException An error occurred parsing the request.
+ */
+ public VerifyCMSSignatureRequest parse(Element requestElem)
+ throws MOAApplicationException {
+
+ int[] signatories = parseSignatories(requestElem);
+ Date dateTime =
+ RequestParserUtils.parseDateTime(requestElem, DATE_TIME_XPATH);
+ String cmsSignatureStr =
+ XPathUtils.getElementValue(requestElem, CMS_SIGNATURE_XPATH, "");
+ CMSDataObject dataObject = parseDataObject(requestElem);
+ String trustProfileID =
+ XPathUtils.getElementValue(requestElem, TRUST_PROFILE_ID_XPATH, null);
+ InputStream cmsSignature =
+ Base64Utils.decodeToStream(cmsSignatureStr, true);
+
+ return factory.createVerifyCMSSignatureRequest(
+ signatories,
+ dateTime,
+ cmsSignature,
+ dataObject,
+ trustProfileID);
+ }
+
+ /**
+ * Parse the <code>Signatories</code> attribute contained in the
+ * <code>VerifyCMSSignatureRequest</code> DOM element.
+ *
+ * @param requestElem The <code>VerifyCMSSignatureRequest</code> DOM element.
+ * @return The signatories contained in the given
+ * <code>VerifyCMSSignatureRequest</code> DOM element.
+ */
+ private int[] parseSignatories(Element requestElem) {
+ String signatoriesStr = requestElem.getAttribute("Signatories");
+
+ if ("all".equals(signatoriesStr)) {
+ return VerifyCMSSignatureRequest.ALL_SIGNATORIES;
+ } else {
+ StringTokenizer tokenizer = new StringTokenizer(signatoriesStr);
+ List signatoriesList = new ArrayList();
+ int[] signatories;
+
+ // put the signatories into a List
+ while (tokenizer.hasMoreTokens()) {
+ try {
+ signatoriesList.add(new Integer(tokenizer.nextToken()));
+ } catch (NumberFormatException e) {
+ // this cannot occur if the request has been validated
+ }
+ }
+
+ // convert the List into an int array
+ signatories = CollectionUtils.toIntArray(signatoriesList);
+
+ return signatories;
+ }
+ }
+
+ /**
+ * Parse a the <code>DataObject</code> DOM element contained in a given
+ * <code>VerifyCMSSignatureRequest</code> DOM element.
+ *
+ * @param requestElem The <code>VerifyCMSSignatureRequest</code> DOM element
+ * to parse.
+ * @return The <code>CMSDataObject</code> API object containing the data
+ * from the <code>DataObject</code> DOM element.
+ */
+ private CMSDataObject parseDataObject(Element requestElem) {
+ Element dataObjectElem =
+ (Element) XPathUtils.selectSingleNode(requestElem, DATA_OBJECT_XPATH);
+
+ if (dataObjectElem != null) {
+ Element metaInfoElem =
+ (Element) XPathUtils.selectSingleNode(dataObjectElem, META_INFO_XPATH);
+ MetaInfo metaInfo = null;
+ Element contentElem =
+ (Element) XPathUtils.selectSingleNode(dataObjectElem, CONTENT_XPATH);
+ CMSContent content = parseContent(contentElem);
+
+ if (metaInfoElem != null) {
+ metaInfo = RequestParserUtils.parseMetaInfo(metaInfoElem);
+ }
+
+ return factory.createCMSDataObject(metaInfo, content);
+ } else {
+ return null;
+ }
+
+ }
+
+ /**
+ * Parse the content contained in a <code>CMSContentBaseType</code> kind of
+ * DOM element.
+ *
+ * @param contentElem The <code>CMSContentBaseType</code> kind of element to
+ * parse.
+ * @return A <code>CMSDataObject</code> API object containing the data
+ * from the given DOM element.
+ */
+ private CMSContent parseContent(Element contentElem) {
+ Element base64ContentElem =
+ (Element) XPathUtils.selectSingleNode(contentElem, BASE64_CONTENT_XPATH);
+
+ if (base64ContentElem != null) {
+ String base64Str = DOMUtils.getText(base64ContentElem);
+ InputStream binaryContent = Base64Utils.decodeToStream(base64Str, true);
+ return factory.createCMSContent(binaryContent);
+ } else {
+ return factory.createCMSContent(
+ contentElem.getAttribute("Reference"));
+ }
+ }
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureResponseBuilder.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureResponseBuilder.java
new file mode 100644
index 000000000..1215f1ccc
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureResponseBuilder.java
@@ -0,0 +1,118 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlbind;
+
+import java.util.Iterator;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.MOASystemException;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponseElement;
+import at.gv.egovernment.moa.spss.api.common.CheckResult;
+import at.gv.egovernment.moa.spss.api.common.SignerInfo;
+
+/**
+ * Convert a <code>VerifyCMSSignatureResponse</code> API object into its
+ * XML representation, according to the MOA XML schema.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class VerifyCMSSignatureResponseBuilder {
+ /** The XML document containing the response element. */
+ private Document responseDoc;
+ /** The response <code>VerifyCMSSignatureResponse</code> DOM element. */
+ private Element responseElem;
+
+ /**
+ * Create a new <code>VerifyCMSSignatureResponseBuilder</code>:
+ *
+ * @throws MOASystemException An error occurred setting up the resulting
+ * XML document.
+ */
+ public VerifyCMSSignatureResponseBuilder() throws MOASystemException {
+ responseDoc =
+ ResponseBuilderUtils.createResponse("VerifyCMSSignatureResponse");
+ responseElem = responseDoc.getDocumentElement();
+ }
+
+ /**
+ * Build a document containing a <code>VerifyCMSSignatureResponse</code>
+ * DOM element being the XML representation of the given
+ * <code>VerifyCMSSignatureResponse</code> API object.
+ *
+ * @param response The <code>VerifyCMSSignatureResponse</code> to convert
+ * to XML.
+ * @return A document containing the <code>VerifyCMSSignatureResponse</code>
+ * DOM element.
+ * @throws MOAApplicationException An error occurred building the response.
+ */
+ public Document build(VerifyCMSSignatureResponse response)
+ throws MOAApplicationException {
+
+ Iterator iter;
+
+ for (iter = response.getResponseElements().iterator(); iter.hasNext();) {
+ VerifyCMSSignatureResponseElement responseElement =
+ (VerifyCMSSignatureResponseElement) iter.next();
+ addResponseElement(responseElement);
+ }
+
+ return responseDoc;
+ }
+
+ /**
+ * Add an element to the response.
+ *
+ * @param responseElement The element to add to the response.
+ * @throws MOAApplicationException An error occurred adding the element.
+ */
+ private void addResponseElement(VerifyCMSSignatureResponseElement responseElement)
+ throws MOAApplicationException {
+
+ SignerInfo signerInfo = responseElement.getSignerInfo();
+ CheckResult signatureCheck = responseElement.getSignatureCheck();
+ CheckResult certCheck = responseElement.getCertificateCheck();
+
+ ResponseBuilderUtils.addSignerInfo(
+ responseDoc,
+ responseElem,
+ signerInfo.getSignerCertificate(),
+ signerInfo.isQualifiedCertificate(),
+ signerInfo.isPublicAuthority(),
+ signerInfo.getPublicAuhtorityID());
+
+ ResponseBuilderUtils.addCodeInfoElement(
+ responseDoc,
+ responseElem,
+ "SignatureCheck",
+ signatureCheck.getCode(),
+ signatureCheck.getInfo());
+
+ ResponseBuilderUtils.addCodeInfoElement(
+ responseDoc,
+ responseElem,
+ "CertificateCheck",
+ certCheck.getCode(),
+ certCheck.getInfo());
+
+
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureRequestParser.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureRequestParser.java
new file mode 100644
index 000000000..665a9ed84
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureRequestParser.java
@@ -0,0 +1,290 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlbind;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.traversal.NodeIterator;
+
+import at.gv.egovernment.moa.util.BoolUtils;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferenceInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.SignatureManifestCheckParams;
+import at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfile;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureLocation;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest;
+
+/**
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class VerifyXMLSignatureRequestParser {
+
+ //
+ // XPath expressions for parsing parts of the request
+ //
+ private static final String MOA = Constants.MOA_PREFIX + ":";
+ private static final String DATE_TIME_XPATH = MOA + "DateTime";
+ private static final String RETURN_HASH_INPUT_DATA_XPATH =
+ MOA + "ReturnHashInputData";
+ private static final String TRUST_PROFILE_ID_XPATH = MOA + "TrustProfileID";
+ private static final String VERIFY_SIGNATURE_ENVIRONMENT_XPATH =
+ MOA + "VerifySignatureInfo/" + MOA + "VerifySignatureEnvironment";
+ private static final String VERIFY_SIGNATURE_LOCATION_XPATH =
+ MOA + "VerifySignatureInfo/" + MOA + "VerifySignatureLocation";
+ private static final String SUPPLEMENT_PROFILE_XPATH =
+ MOA + "SupplementProfile | " + MOA + "SupplementProfileID";
+ private static final String SIGNATURE_MANIFEST_CHECK_PARAMS_XPATH =
+ MOA + "SignatureManifestCheckParams";
+ private static final String VERIFY_TRANSFORMS_INFO_PROFILE_XPATH =
+ (MOA + "VerifyTransformsInfoProfile | ")
+ + (MOA + "VerifyTransformsInfoProfileID");
+ private static final String REFERENCE_INFO_XPATH = MOA + "ReferenceInfo";
+
+ /** The <code>SPSSFactory</code> for creating new API objects. */
+ private SPSSFactory factory = SPSSFactory.getInstance();
+
+
+ /**
+ * Parse a <code>VerifyXMLSignatureRequest</code> DOM element, as defined
+ * by the MOA schema.
+ *
+ * @param requestElem The <code>VerifyXMLSignatureRequest</code> to parse. The
+ * request must have been successfully parsed against the schema for this
+ * method to succeed.
+ * @return A <code>VerifyXMLSignatureRequest</code> API object containing
+ * the data from the DOM element.
+ * @throws MOAApplicationException An error occurred parsing the request.
+ */
+ public VerifyXMLSignatureRequest parse(Element requestElem)
+ throws MOAApplicationException {
+
+ Date dateTime =
+ RequestParserUtils.parseDateTime(requestElem, DATE_TIME_XPATH);
+ VerifySignatureInfo verifySignatureInfo =
+ parseVerifySignatureInfo(requestElem);
+ List supplementProfiles = parseSupplementProfiles(requestElem);
+ SignatureManifestCheckParams signatureManifestCheckParams =
+ parseSignatureManifestCheckParams(requestElem);
+ boolean returnHashInputData =
+ XPathUtils.selectSingleNode(requestElem, RETURN_HASH_INPUT_DATA_XPATH)
+ != null;
+ String trustProfileID =
+ XPathUtils.getElementValue(requestElem, TRUST_PROFILE_ID_XPATH, null);
+
+ return factory.createVerifyXMLSignatureRequest(
+ dateTime,
+ verifySignatureInfo,
+ supplementProfiles,
+ signatureManifestCheckParams,
+ returnHashInputData,
+ trustProfileID);
+ }
+
+ /**
+ * Parse the <code>VerifySignatureInfo</code> DOM element contained in
+ * the <code>VerifyXMLSignatureRequest</code> DOM element.
+ *
+ * @param requestElem The <code>VerifyXMLSignatureRequest</code> DOM element
+ * containing the <code>VerifySignatureInfo</code> DOM element.
+ * @return The <code>VerifySignatureInfo</code> API object containing the
+ * data from the DOM element.
+ */
+ private VerifySignatureInfo parseVerifySignatureInfo(Element requestElem) {
+ Element verifySignatureEnvironmentElem =
+ (Element) XPathUtils.selectSingleNode(
+ requestElem,
+ VERIFY_SIGNATURE_ENVIRONMENT_XPATH);
+ Content verifySignatureEnvironment =
+ RequestParserUtils.parseContent(verifySignatureEnvironmentElem);
+ VerifySignatureLocation verifySignatureLocation =
+ parseVerifySignatureLocation(requestElem);
+
+ return factory.createVerifySignatureInfo(
+ verifySignatureEnvironment,
+ verifySignatureLocation);
+ }
+
+ /**
+ * Parse the <code>VerifySignatureLocation</code> DOM element contained
+ * in the given <code>VerifyXMLSignatureRequest</code> DOM element.
+ *
+ * @param requestElem The <code>VerifyXMLSignatureRequst</code> DOM element.
+ * @return The <code>VerifySignatureLocation</code> API object containing the
+ * data from the DOM element.
+ */
+ private VerifySignatureLocation parseVerifySignatureLocation(Element requestElem) {
+ Element locationElem =
+ (Element) XPathUtils.selectSingleNode(
+ requestElem,
+ VERIFY_SIGNATURE_LOCATION_XPATH);
+ String xPathExpression = DOMUtils.getText(locationElem);
+ Map namespaceDeclarations = DOMUtils.getNamespaceDeclarations(locationElem);
+
+ return factory.createVerifySignatureLocation(
+ xPathExpression,
+ namespaceDeclarations);
+ }
+
+ /**
+ * Parse the supplement profiles contained in the given
+ * <code>VerifyXMLSignatureRequest</code> DOM element.
+ *
+ * @param requestElem The <code>VerifyXMLSignatureRequest</code> DOM element.
+ * @return A <code>List</code> of <code>SupplementProfile</code> API objects
+ * containing the data from the <code>SupplementProfile</code> DOM elements.
+ */
+ private List parseSupplementProfiles(Element requestElem) {
+ List supplementProfiles = new ArrayList();
+ NodeIterator profileElems =
+ XPathUtils.selectNodeIterator(requestElem, SUPPLEMENT_PROFILE_XPATH);
+ Element profileElem;
+
+ while ((profileElem = (Element) profileElems.nextNode()) != null) {
+ SupplementProfile profile;
+
+ if ("SupplementProfile".equals(profileElem.getLocalName())) {
+ ProfileParser profileParser = new ProfileParser();
+ profile = profileParser.parseSupplementProfile(profileElem);
+ } else {
+ String profileID = DOMUtils.getText(profileElem);
+ profile = factory.createSupplementProfile(profileID);
+ }
+ supplementProfiles.add(profile);
+ }
+ return supplementProfiles;
+ }
+
+ /**
+ * Parse the <code>SignatureManifestCheckParams</code> DOM element contained
+ * in the given <code>VerifyXMLSignatureRequest</code> DOM element.
+ * @param requestElem The <code>VerifyXMLSignatureRequest</code> DOM element.
+ * @return The <code>SignatureManifestCheckParams</code> API object containing
+ * the data from the <code>SignatureManifestCheckParams</code> DOM element.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>SignatureManifestCheckParams</code> DOM element.
+ */
+ private SignatureManifestCheckParams parseSignatureManifestCheckParams(Element requestElem)
+ throws MOAApplicationException {
+ Element paramsElem =
+ (Element) XPathUtils.selectSingleNode(
+ requestElem,
+ SIGNATURE_MANIFEST_CHECK_PARAMS_XPATH);
+
+ if (paramsElem != null) {
+ String returnReferenceInputDataStr =
+ paramsElem.getAttribute("ReturnReferenceInputData");
+ boolean returnReferencInputData =
+ BoolUtils.valueOf(returnReferenceInputDataStr);
+ List referenceInfos = parseReferenceInfos(paramsElem);
+
+ return factory.createSignatureManifestCheckParams(
+ referenceInfos,
+ returnReferencInputData);
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Parse the <code>ReferenceInfo</code> DOM elements contained in a
+ * <code>SignatureManifestCheckParams</code> DOM element.
+ *
+ * @param paramsElem The <code>SignatureManifestCheckParams</code> DOM element
+ * containing the <code>ReferenceInfo</code> DOM elements.
+ * @return A <code>List</code> of <code>RefernceInfo</code> API objects
+ * containing the data from the <code>ReferenceInfo</code> DOM elements.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>ReferenceInfo</code> DOM elements.
+ */
+ private List parseReferenceInfos(Element paramsElem)
+ throws MOAApplicationException {
+
+ List referenceInfos = new ArrayList();
+ NodeIterator refInfoElems =
+ XPathUtils.selectNodeIterator(paramsElem, REFERENCE_INFO_XPATH);
+ Element refInfoElem;
+
+ while ((refInfoElem = (Element) refInfoElems.nextNode()) != null) {
+ ReferenceInfo referenceInfo = parseReferenceInfo(refInfoElem);
+
+ referenceInfos.add(referenceInfo);
+ }
+
+ return referenceInfos;
+ }
+
+ /**
+ * Parse a <code>ReferenceInfo</code> DOM element.
+ *
+ * @param refInfoElem The <code>ReferenceInfo</code> DOM element to parse.
+ * @return The <code>ReferenceInfo</code> API object containing the data
+ * from the given <code>ReferenceInfo</code> DOM element.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>ReferenceInfo</code> DOM element.
+ */
+ private ReferenceInfo parseReferenceInfo(Element refInfoElem)
+ throws MOAApplicationException {
+ List profiles = parseVerifyTransformsInfoProfiles(refInfoElem);
+ return factory.createReferenceInfo(profiles);
+ }
+
+ /**
+ * Parse the <code>VerifyTransformsInfoProfile</code> DOM elements contained
+ * in a <code>ReferenceInfo</code> DOM element.
+ *
+ * @param refInfoElem <code>ReferenceInfo</code> DOM element containing
+ * the <code>VerifyTransformsInfoProfile</code> DOM elements.
+ * @return A <code>List</code> of <code>VerifyTransformsInfoProfile</code>
+ * API objects containing the profile data.
+ * @throws MOAApplicationException An error occurred building the
+ * <code>VerifyTransformsInfoProfile</code>s.
+ */
+ private List parseVerifyTransformsInfoProfiles(Element refInfoElem)
+ throws MOAApplicationException {
+
+ List profiles = new ArrayList();
+ NodeIterator profileElems =
+ XPathUtils.selectNodeIterator(
+ refInfoElem,
+ VERIFY_TRANSFORMS_INFO_PROFILE_XPATH);
+ Element profileElem;
+
+ while ((profileElem = (Element) profileElems.nextNode()) != null) {
+ if ("VerifyTransformsInfoProfile".equals(profileElem.getLocalName())) {
+ ProfileParser profileParser = new ProfileParser();
+ profiles.add(
+ profileParser.parseVerifyTransformsInfoProfile(profileElem));
+ } else {
+ String profileID = DOMUtils.getText(profileElem);
+ profiles.add(factory.createVerifyTransformsInfoProfile(profileID));
+ }
+ }
+ return profiles;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureResponseBuilder.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureResponseBuilder.java
new file mode 100644
index 000000000..1ca931e9c
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureResponseBuilder.java
@@ -0,0 +1,327 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlbind;
+
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.List;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.DocumentFragment;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.util.Base64Utils;
+import at.gv.egovernment.moa.util.Constants;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.MOASystemException;
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.common.ContentBinary;
+import at.gv.egovernment.moa.spss.api.common.ContentXML;
+import at.gv.egovernment.moa.spss.api.common.InputData;
+import at.gv.egovernment.moa.spss.api.xmlverify.ManifestRefsCheckResult;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResult;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse;
+
+/**
+ * Convert a <code>VerifyXMLSignatureResponse</code> API object into its
+ * XML representation, according to the MOA XML schema.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class VerifyXMLSignatureResponseBuilder {
+ private static final String MOA_NS_URI = Constants.MOA_NS_URI;
+
+ /** The XML document containing the response element. */
+ private Document responseDoc;
+ /** The response <code>VerifyXMLSignatureResponse</code> DOM element. */
+ private Element responseElem;
+
+ /**
+ * Create a new <code>VerifyXMLSignatureResponseBuilder</code>:
+ *
+ * @throws MOASystemException An error occurred setting up the resulting
+ * XML document.
+ */
+ public VerifyXMLSignatureResponseBuilder() throws MOASystemException {
+ responseDoc =
+ ResponseBuilderUtils.createResponse("VerifyXMLSignatureResponse");
+ responseElem = responseDoc.getDocumentElement();
+ }
+
+ /**
+ * Build a document containing a <code>VerifyXMLSignatureResponse</code>
+ * DOM element being the XML representation of the given
+ * <code>VerifyXMLSignatureResponse</code> API object.
+ *
+ * @param response The <code>VerifyXMLSignatureResponse</code> to convert
+ * to XML.
+ * @return A document containing the <code>VerifyXMLSignatureResponse</code>
+ * DOM element.
+ * @throws MOAApplicationException An error occurred building the response.
+ */
+ public Document build(VerifyXMLSignatureResponse response)
+ throws MOAApplicationException {
+
+ Iterator iter;
+ List responseData;
+
+ // add the SignerInfo
+ ResponseBuilderUtils.addSignerInfo(
+ responseDoc,
+ responseElem,
+ response.getSignerInfo().getSignerCertificate(),
+ response.getSignerInfo().isQualifiedCertificate(),
+ response.getSignerInfo().isPublicAuthority(),
+ response.getSignerInfo().getPublicAuhtorityID());
+
+ // add HashInputData elements
+ responseData = response.getHashInputDatas();
+ if (responseData != null && !responseData.isEmpty()) {
+ for (iter = responseData.iterator(); iter.hasNext();) {
+ InputData inputData = (InputData) iter.next();
+ addContent("HashInputData", inputData);
+ }
+ }
+
+ // add ReferenceInputData elements
+ responseData = response.getReferenceInputDatas();
+ if (responseData != null && !responseData.isEmpty()) {
+ for (iter = responseData.iterator(); iter.hasNext();) {
+ InputData inputData = (InputData) iter.next();
+ addContent("ReferenceInputData", inputData);
+ }
+ }
+
+ // add the SignatureCheck
+ addReferencesCheckResult("SignatureCheck", response.getSignatureCheck());
+
+ // add the SignatureManifestCheck
+ if (response.getSignatureManifestCheck() != null) {
+ addReferencesCheckResult(
+ "SignatureManifestCheck",
+ response.getSignatureManifestCheck());
+ }
+
+ // add the XMLDsigManifestChecks
+ responseData = response.getXMLDsigManifestChecks();
+ if (responseData != null && !responseData.isEmpty()) {
+ for (iter = responseData.iterator(); iter.hasNext();) {
+ ManifestRefsCheckResult checkResult =
+ (ManifestRefsCheckResult) iter.next();
+ addManifestRefsCheckResult("XMLDSIGManifestCheck", checkResult);
+ }
+ }
+
+ // add the CertificateCheck
+ ResponseBuilderUtils.addCodeInfoElement(
+ responseDoc,
+ responseElem,
+ "CertificateCheck",
+ response.getCertificateCheck().getCode(),
+ response.getCertificateCheck().getInfo());
+
+
+
+ return responseDoc;
+ }
+
+ /**
+ * Add an element of type <code>ContentBaseType</code> to the response.
+ *
+ * @param elementName The name of the element.
+ *
+ * @param inputData The <code>InputData</code> to add. Based on the type of
+ *
+ * the <code>InputData</code>, either a <code>Base64Content</code> element
+ * or a <code>XMLContent</code> subelement will be added. An <code>
+ * InputDataBinaryImpl</code> will be added as a <code>Base64Content</code>
+ * child element. An<code>InputDataXMLImpl</code> will be added as <code>
+ * XMLContent</code> child element.
+ *
+ * @throws MOAApplicationException An error occurred adding the content.
+ */
+ private void addContent(String elementName, InputData inputData)
+ throws MOAApplicationException {
+
+ Element contentElem = responseDoc.createElementNS(MOA_NS_URI, elementName);
+
+ contentElem.setAttributeNS(null, "PartOf", inputData.getPartOf());
+ if (inputData.getReferringReferenceNumber() != InputData.REFERER_NONE_)
+ contentElem.setAttributeNS(
+ null,
+ "ReferringSigReference",
+ Integer.toString(inputData.getReferringReferenceNumber()));
+
+ switch (inputData.getContentType()) {
+ case Content.XML_CONTENT :
+ ContentXML contentXml = (ContentXML) inputData;
+ NodeList nodes = contentXml.getXMLContent();
+ Element xmlElem;
+ int i;
+
+ xmlElem = responseDoc.createElementNS(MOA_NS_URI, "XMLContent");
+ //xmlElem.setAttributeNS(XML_NS_URI, "xml:space", "preserve");
+ xmlElem.setAttribute("xml:space", "preserve");
+
+ for (i = 0; i < nodes.getLength(); i++) {
+ xmlElem.appendChild(responseDoc.importNode(nodes.item(i), true));
+ }
+ contentElem.appendChild(xmlElem);
+ responseElem.appendChild(contentElem);
+ break;
+ case Content.BINARY_CONTENT :
+ Element binaryElem =
+ responseDoc.createElementNS(MOA_NS_URI, "Base64Content");
+ ContentBinary contentBinary = (ContentBinary) inputData;
+ String base64Str;
+
+ try {
+ base64Str = Base64Utils.encode(contentBinary.getBinaryContent());
+ } catch (IOException e) {
+ throw new MOAApplicationException("2200", null, e);
+ }
+ binaryElem.appendChild(responseDoc.createTextNode(base64Str));
+ contentElem.appendChild(binaryElem);
+ responseElem.appendChild(contentElem);
+ break;
+ }
+ }
+
+ /**
+ * Add a <code>ReferencesCheckResult</code> to the response.
+ *
+ * @param elementName The DOM element name to use.
+ * @param checkResult The <code>ReferencesCheckResult</code> to add.
+ */
+ private void addReferencesCheckResult(
+ String elementName,
+ ReferencesCheckResult checkResult) {
+
+ NodeList info = null;
+
+ if (checkResult.getInfo() != null) {
+ DocumentFragment fragment = responseDoc.createDocumentFragment();
+ NodeList anyOtherInfo = checkResult.getInfo().getAnyOtherInfo();
+ int[] failedReferences = checkResult.getInfo().getFailedReferences();
+
+ if (anyOtherInfo != null) {
+ addAnyOtherInfo(fragment, checkResult.getInfo().getAnyOtherInfo());
+ }
+
+ if (failedReferences != null) {
+ addFailedReferences(fragment, failedReferences);
+ }
+
+ info = fragment.getChildNodes();
+ }
+
+ ResponseBuilderUtils.addCodeInfoElement(
+ responseDoc,
+ responseElem,
+ elementName,
+ checkResult.getCode(),
+ info);
+ }
+
+
+ /**
+ * Add a <code>ManifestRefsCheckResult</code> to the response.
+ *
+ * @param elementName The DOM element name to use.
+ * @param checkResult The <code>ManifestRefsCheckResult</code> to add.
+ */
+ private void addManifestRefsCheckResult(
+ String elementName,
+ ManifestRefsCheckResult checkResult) {
+
+ DocumentFragment fragment = responseDoc.createDocumentFragment();
+ NodeList anyOtherInfo = checkResult.getInfo().getAnyOtherInfo();
+ int[] failedReferences = checkResult.getInfo().getFailedReferences();
+ Element referringSigRefElem;
+ String referringSigRefStr;
+
+ // add any other elements
+ if (anyOtherInfo != null) {
+ addAnyOtherInfo(fragment, checkResult.getInfo().getAnyOtherInfo());
+ }
+
+ // add the failed references
+ if (failedReferences != null) {
+ addFailedReferences(fragment, failedReferences);
+ }
+
+ // add the ReferringSigReference
+ referringSigRefElem =
+ responseDoc.createElementNS(MOA_NS_URI, "ReferringSigReference");
+ referringSigRefStr =
+ Integer.toString(checkResult.getInfo().getReferringSignatureReference());
+ referringSigRefElem.appendChild(
+ responseDoc.createTextNode(referringSigRefStr));
+ fragment.appendChild(referringSigRefElem);
+
+ // add XMLDSIGManifestCheckResult to the response
+ ResponseBuilderUtils.addCodeInfoElement(
+ responseDoc,
+ responseElem,
+ elementName,
+ checkResult.getCode(),
+ fragment.getChildNodes());
+ }
+
+ /**
+ * Add arbitrary XML content to a DOM <code>DocumentFragment</code>.
+ *
+ * @param fragment The fragment to add the XML content to.
+ * @param anyOtherInfo The XML content to add.
+ */
+ private void addAnyOtherInfo(
+ DocumentFragment fragment,
+ NodeList anyOtherInfo) {
+
+ int i;
+
+ for (i = 0; i < anyOtherInfo.getLength(); i++) {
+ fragment.appendChild(responseDoc.importNode(anyOtherInfo.item(i), true));
+ }
+ }
+
+ /**
+ * Add the failed references as <code>FailedReference</code> DOM elements to
+ * the fragment.
+ *
+ * @param fragment The DOM document fragment to add the
+ * <code>FailedReference</code> elements to.
+ * @param failedReferences The indexes of the failed references.
+ */
+ private void addFailedReferences(
+ DocumentFragment fragment,
+ int[] failedReferences) {
+ Element failedReferenceElem;
+ int i;
+
+ for (i = 0; i < failedReferences.length; i++) {
+ failedReferenceElem =
+ responseDoc.createElementNS(MOA_NS_URI, "FailedReference");
+ failedReferenceElem.appendChild(
+ responseDoc.createTextNode(Integer.toString(failedReferences[i])));
+ fragment.appendChild(failedReferenceElem);
+ }
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfile.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfile.java
new file mode 100644
index 000000000..2257ed3e8
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfile.java
@@ -0,0 +1,45 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+/**
+ * Base class for signature environment profile data used in XML signature
+ * creation.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface CreateSignatureEnvironmentProfile {
+ /**
+ * Indicates that the profile data is given explicitly.
+ */
+ public static int EXPLICIT_CREATESIGNATUREENVIRONMENTPROFILE = 0;
+ /**
+ * Indicates that the profile data is stored in the configuration and resolved
+ * using an ID.
+ */
+ public static int ID_CREATESIGNATUREENVIRONMENTPROFILE = 1;
+
+ /**
+ * Gets the type of this object.
+ *
+ * @return The type of <code>CreateSignatureEnvironmentProfile</code> denoted
+ * by this object. Either
+ * <code>EXPLICIT_CREATESIGNATUREENVIRONMENTPROFILE</code> or
+ * <code>ID_CREATESIGNATUREENVIRONMENTPROFILE</code>.
+ */
+ public int getCreateSignatureEnvironmentProfileType();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfileExplicit.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfileExplicit.java
new file mode 100644
index 000000000..cca79de6f
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfileExplicit.java
@@ -0,0 +1,45 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+import java.util.List;
+
+/**
+ * A <code>CreateSignatureEnvironmentProfile</code> containing the profile
+ * data explicitly.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface CreateSignatureEnvironmentProfileExplicit
+ extends CreateSignatureEnvironmentProfile {
+
+ /**
+ * Gets the location and index of where to insert the signature into the
+ * signature environment.
+ *
+ * @return The location and index of the signature in the signature
+ * environment.
+ */
+ public CreateSignatureLocation getCreateSignatureLocation();
+ /**
+ * Gets the supplemental information.
+ *
+ * @return The supplemental information.
+ */
+ public List getSupplements();
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfileID.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfileID.java
new file mode 100644
index 000000000..2248fd7e2
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfileID.java
@@ -0,0 +1,35 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+/**
+ * A <code>CreateSignatureEnvironmentProfile</code> containing a profile ID
+ * pointing to locally stored profile data.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface CreateSignatureEnvironmentProfileID
+ extends CreateSignatureEnvironmentProfile {
+
+ /**
+ * Gets the profile ID.
+ *
+ * @return The profile ID.
+ */
+ public String getCreateSignatureEnvironmentProfileID();
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureInfo.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureInfo.java
new file mode 100644
index 000000000..567224483
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureInfo.java
@@ -0,0 +1,40 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+import at.gv.egovernment.moa.spss.api.common.Content;
+
+/**
+ * Encapsulates a signature object used during signature creation.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CreateSignatureInfo {
+ /**
+ * Gets the XML structure where the signature will be inserted.
+ *
+ * @return The XML structure where the signature will be inserted.
+ */
+ public Content getCreateSignatureEnvironment();
+ /**
+ * Gets the supplemental data for the signature environment.
+ *
+ * @return The supplemental data for the signature envoronment.
+ */
+ public CreateSignatureEnvironmentProfile getCreateSignatureEnvironmentProfile();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureLocation.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureLocation.java
new file mode 100644
index 000000000..812147e44
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureLocation.java
@@ -0,0 +1,38 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+import at.gv.egovernment.moa.spss.api.common.ElementSelector;
+
+/**
+ * Specifies where to insert the newly created signature.
+ *
+ * An XPath expression is used to select the signature parent element. An
+ * additional index specifies the node index after which to insert the
+ * signature into the parent element.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface CreateSignatureLocation extends ElementSelector {
+ /**
+ * Gets the node index, after which the signature will be inserted into the
+ * parent elemen.
+ *
+ * @return The index of the node after which the signature will be inserted.
+ */
+ public int getIndex();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfo.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfo.java
new file mode 100644
index 000000000..4f644046c
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfo.java
@@ -0,0 +1,42 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+
+/**
+ * Encapsulates information used for the transformation of the data object.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CreateTransformsInfo {
+ /**
+ * Gets the XMLDSig transforms.
+ *
+ * @return A <code>List</code> of <code>Transform</code> objects.
+ */
+ public List getTransforms();
+ /**
+ * Gets meta information about the data resulting from the transformation.
+ *
+ * @return Meta information about the resulting data.
+ */
+ public MetaInfo getFinalDataMetaInfo();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfile.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfile.java
new file mode 100644
index 000000000..7902f0d32
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfile.java
@@ -0,0 +1,43 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+/**
+ * Base class for transformation informations used in signature creation.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CreateTransformsInfoProfile {
+ /**
+ * Indicates transformation information given explicitly.
+ */
+ public static final int EXPLICIT_CREATETRANSFORMSINFOPROFILE = 0;
+ /**
+ * Indicates transformation information given as an ID.
+ */
+ public static final int ID_CREATETRANSFORMSINFOPROFILE = 1;
+
+ /**
+ * Gets the type of profile information this object contains.
+ *
+ * @return The type of transformation information, either
+ * <code>EXPLICIT_CREATETRANSFORMSINFOPROFILE</code> or
+ * <code>ID_CREATETRANSFORMSINFOPROFILE</code>.
+ */
+ public int getCreateTransformsInfoProfileType();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfileExplicit.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfileExplicit.java
new file mode 100644
index 000000000..19f47678a
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfileExplicit.java
@@ -0,0 +1,41 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+import java.util.List;
+
+/**
+ * Encapsulates explicit transformation informations.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CreateTransformsInfoProfileExplicit
+ extends CreateTransformsInfoProfile {
+ /**
+ * Gets the transformation information of the data object.
+ *
+ * @return Transformation information of the data object.
+ */
+ public CreateTransformsInfo getCreateTransformsInfo();
+ /**
+ * Gets the supplemental information.
+ *
+ * @return The supplemental information.
+ */
+ public List getSupplements();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfileID.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfileID.java
new file mode 100644
index 000000000..283def739
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfileID.java
@@ -0,0 +1,33 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+/**
+ * Encapsulates transformation information given via an identifier.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CreateTransformsInfoProfileID
+ extends CreateTransformsInfoProfile {
+ /**
+ * Gets the ID of the transformation.
+ *
+ * @return The transformation profile ID.
+ */
+ public String getCreateTransformsInfoProfileID();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureRequest.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureRequest.java
new file mode 100644
index 000000000..978c18d4c
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureRequest.java
@@ -0,0 +1,41 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+import java.util.List;
+
+
+/**
+ * Object that encapsulates a request to create an XML Signature.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CreateXMLSignatureRequest {
+ /**
+ * Gets the identifier for the keys to be used for the signature.
+ *
+ * @return The identifier for the keys to be used.
+ */
+ public String getKeyIdentifier();
+ /**
+ * Gets the information of the singleSignatureInfo elements.
+ *
+ * @return The information of singleSignatureInfo elements.
+ */
+ public List getSingleSignatureInfos();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureResponse.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureResponse.java
new file mode 100644
index 000000000..cacde7ab7
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureResponse.java
@@ -0,0 +1,35 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+import java.util.List;
+
+/**
+ * Object that encapsulates the response on to a
+ * <code>CreateXMLSignatureRequest</code> to create an XML signature.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CreateXMLSignatureResponse {
+ /**
+ * Gets the response elements.
+ *
+ * @return The response elements.
+ */
+ public List getResponseElements();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureResponseElement.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureResponseElement.java
new file mode 100644
index 000000000..fd723c5dc
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureResponseElement.java
@@ -0,0 +1,44 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+/**
+ * Base class for <code>SignatureEnvironmentResponse</code> and
+ * <code>ErrorResponse</code> elements in a
+ * <code>CreateXMLSignatureResponse</code>.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CreateXMLSignatureResponseElement {
+ /**
+ * Indicates that this object contains a <code>SignatureEnvironment</code>.
+ */
+ public static final int SIGNATURE_ENVIRONMENT_RESPONSE = 0;
+ /**
+ * Indicates that this objet contains an <code>ErrorResponse</code>.
+ */
+ public static final int ERROR_RESPONSE = 1;
+
+ /**
+ * Gets the type of response object.
+ *
+ * @return The type of response object, either
+ * <code>SIGNATURE_ENVIRONMENT_RESPONSE</code> or <code>ERROR_RESPONSE</code>.
+ */
+ public int getResponseType();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/DataObjectInfo.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/DataObjectInfo.java
new file mode 100644
index 000000000..17296ca59
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/DataObjectInfo.java
@@ -0,0 +1,63 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+import at.gv.egovernment.moa.spss.api.common.Content;
+
+/**
+ * Encapsulates information required to create a single signature.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface DataObjectInfo {
+ /**
+ * Indicates that a detached signature will be created.
+ */
+ public static final String STRUCTURE_DETACHED = "detached";
+ /**
+ * Indicates that an enveloping signature will be created.
+ */
+ public static final String STRUCTURE_ENVELOPING = "enveloping";
+
+ /**
+ * Gets the structure of the signature.
+ *
+ * @return The structure of the signature.
+ */
+ public String getStructure();
+ /**
+ * Checks whether a refercence will be placed in the signature itself or
+ * in the manifest.
+ *
+ * @return <code>true</code> if a reference will be placed in the manifest,
+ * <code>false</code> if it will be placed in the signature.
+ */
+ public boolean isChildOfManifest();
+ /**
+ * Gets information related to a single data object.
+ *
+ * @return Information related to a single data object.
+ */
+ public Content getDataObject();
+ /**
+ * Gets information for the transformation of the data object.
+ *
+ * @return The transformation information.
+ */
+ public CreateTransformsInfoProfile getCreateTransformsInfoProfile();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/ErrorResponse.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/ErrorResponse.java
new file mode 100644
index 000000000..4e20a59d3
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/ErrorResponse.java
@@ -0,0 +1,39 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+
+/**
+ * Object containing detailed error information.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface ErrorResponse extends CreateXMLSignatureResponseElement {
+ /**
+ * Gets the error code.
+ *
+ * @return The error code.
+ */
+ public int getErrorCode();
+ /**
+ * Gets verbose error information.
+ *
+ * @return Verbose error information.
+ */
+ public String getInfo();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/SignatureEnvironmentResponse.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/SignatureEnvironmentResponse.java
new file mode 100644
index 000000000..3a08f3183
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/SignatureEnvironmentResponse.java
@@ -0,0 +1,35 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+import org.w3c.dom.Element;
+
+/**
+ * Contains the signature if the signature creation was successful.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface SignatureEnvironmentResponse
+ extends CreateXMLSignatureResponseElement {
+ /**
+ * Gets the XML structure which contains the signature.
+ *
+ * @return A general XML structure containing the signature.
+ */
+ public Element getSignatureEnvironment();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/SingleSignatureInfo.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/SingleSignatureInfo.java
new file mode 100644
index 000000000..e600a89cc
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/SingleSignatureInfo.java
@@ -0,0 +1,47 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+import java.util.List;
+
+/**
+ * Encapsulates data to create a single signature.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface SingleSignatureInfo {
+ /**
+ * Gets the dataObjectInfo information.
+ *
+ * @return The dataObjectInfo information.
+ */
+ public List getDataObjectInfos();
+ /**
+ * Gets the signature object.
+ *
+ * @return The signature object used during signature creation.
+ */
+ public CreateSignatureInfo getCreateSignatureInfo();
+ /**
+ * Check whether a Security Layer conform signature manifest will be created.
+ *
+ * @return <code>true</code>, if a Security Layer conform signature manifest
+ * will be created, <code>false</code> otherwise.
+ */
+ public boolean isSecurityLayerConform();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ManifestRefsCheckResult.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ManifestRefsCheckResult.java
new file mode 100644
index 000000000..f0b9d5170
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ManifestRefsCheckResult.java
@@ -0,0 +1,39 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+
+/**
+ * Contains the results of manifest checks according to XMLDsig.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface ManifestRefsCheckResult {
+ /**
+ * Gets the check code.
+ *
+ * @return A numerical representation of the result of the manifest check.
+ */
+ public int getCode();
+ /**
+ * Gets the reference to the manifest.
+ *
+ * @return The reference to the manifest.
+ */
+ public ManifestRefsCheckResultInfo getInfo();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ManifestRefsCheckResultInfo.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ManifestRefsCheckResultInfo.java
new file mode 100644
index 000000000..f1df7c644
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ManifestRefsCheckResultInfo.java
@@ -0,0 +1,34 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+
+/**
+ * Encapsulates information referring to the manifest of the check.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface ManifestRefsCheckResultInfo extends ReferencesCheckResultInfo {
+ /**
+ * Gets the position of the signature reference containing the
+ * reference to the manifest being described by this object.
+ *
+ * @return The position of the signature reference.
+ */
+ public int getReferringSignatureReference();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ReferenceInfo.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ReferenceInfo.java
new file mode 100644
index 000000000..4e2a07c8f
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ReferenceInfo.java
@@ -0,0 +1,34 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+import java.util.List;
+
+/**
+ * Contains transformation parameters which are locally available.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface ReferenceInfo {
+ /**
+ * Gets the transformation info.
+ *
+ * @return The transformation info.
+ */
+ public List getVerifyTransformsInfoProfiles();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ReferencesCheckResult.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ReferencesCheckResult.java
new file mode 100644
index 000000000..0fbe11e1c
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ReferencesCheckResult.java
@@ -0,0 +1,38 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+/**
+ * Contains information about the verification status of references contained
+ * in the signature.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface ReferencesCheckResult {
+ /**
+ * Gets the check code.
+ *
+ * @return A numerical representation of the result of the reference check.
+ */
+ public int getCode();
+ /**
+ * Gets the additional information about the result.
+ *
+ * @return Additional information about the result.
+ */
+ public ReferencesCheckResultInfo getInfo();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ReferencesCheckResultInfo.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ReferencesCheckResultInfo.java
new file mode 100644
index 000000000..4db4cffdc
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ReferencesCheckResultInfo.java
@@ -0,0 +1,40 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+import org.w3c.dom.NodeList;
+
+/**
+ * Additional information contained in a <code>ReferencesCheckResult</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface ReferencesCheckResultInfo {
+ /**
+ * Gets the additional info of the failed <code>dsig:reference</code> element.
+ *
+ * @return The info elements.
+ */
+ public NodeList getAnyOtherInfo();
+ /**
+ * Gets the positions of the failed signature references containing the
+ * references to the manifests being described by this object.
+ *
+ * @return The positions of the failed signature references.
+ */
+ public int[] getFailedReferences();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SignatureManifestCheckParams.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SignatureManifestCheckParams.java
new file mode 100644
index 000000000..45591a861
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SignatureManifestCheckParams.java
@@ -0,0 +1,41 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+import java.util.List;
+
+/**
+ * Contains parameters used to check the signature manifest.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface SignatureManifestCheckParams {
+ /**
+ * Gets the referential information.
+ *
+ * @return The referential information.
+ */
+ public List getReferenceInfos();
+ /**
+ * Gets information on whether signature source data should be returned.
+ *
+ * @return <code>true</code>, if signature source data should be returned,
+ * otherwise <code>false</code>.
+ */
+ public boolean getReturnReferenceInputData();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfile.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfile.java
new file mode 100644
index 000000000..eea74e5e6
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfile.java
@@ -0,0 +1,43 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+/**
+ * Base class for supplementary information.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface SupplementProfile {
+ /**
+ * Indicates that this object contains explicit supplementary information.
+ */
+ public static final int EXPLICIT_SUPPLEMENTPROFILE = 0;
+ /**
+ * Indicates that this object contains a profile id where supplementary
+ * information can be found.
+ */
+ public static final int ID_SUPPLEMENTPROFILE = 1;
+
+ /**
+ * Gets the type of supplementary information contained in this object.
+ *
+ * @return The type of supplementary information contained in this object,
+ * either <code>EXPLICIT_SUPPLEMENT</code> or <code>ID_SUPPLEMENT</code>.
+ */
+ public int getSupplementProfileType();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfileExplicit.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfileExplicit.java
new file mode 100644
index 000000000..4474c38a3
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfileExplicit.java
@@ -0,0 +1,34 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation;
+
+/**
+ * Encapsulates explicit supplementary information.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface SupplementProfileExplicit extends SupplementProfile {
+ /**
+ * Gets the supplemental object.
+ *
+ * @return The supplemental object.
+ */
+ public XMLDataObjectAssociation getSupplementProfile();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfileID.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfileID.java
new file mode 100644
index 000000000..fb0a00829
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfileID.java
@@ -0,0 +1,33 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+/**
+ * Encapsulates supplementary information stored in a profile.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface SupplementProfileID extends SupplementProfile {
+ /**
+ * Gets the id of the profile where the supplementary information can be
+ * found.
+ *
+ * @return The profile id.
+ */
+ public String getSupplementProfileID();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameter.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameter.java
new file mode 100644
index 000000000..4e4212825
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameter.java
@@ -0,0 +1,55 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+/**
+ * Object encapsulating transform parameters either as a URI, binary or
+ * hashed.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface TransformParameter {
+ /**
+ * Indicates that this object contains a transform parameter given as
+ * a URI.
+ */
+ public static final int URI_TRANSFORMPARAMETER = 0;
+ /**
+ * Indicates that this object contains binary transform parameter.
+ */
+ public static final int BINARY_TRANSFORMPARAMETER = 1;
+ /**
+ * Indicatest that this object contains a binary hash of the transform
+ * parameter.
+ */
+ public static final int HASH_TRANSFORMPARAMETER = 2;
+
+ /**
+ * Gets the type of transform parameter contained in this object.
+ *
+ * @return The type of transform parameter, being one of
+ * <code>URI_TRANSFORMPARAMETER</code>, <code>BINARY_TRANSFORMPARAMETER</code>
+ * or <code>HASH_TRANSFORMPARAMETER</code>.
+ */
+ public int getTransformParameterType();
+ /**
+ * Gets the transform parameter URI.
+ *
+ * @return The transform parameter URI.
+ */
+ public String getURI();}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterBinary.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterBinary.java
new file mode 100644
index 000000000..74c33f793
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterBinary.java
@@ -0,0 +1,36 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+import java.io.InputStream;
+
+/**
+ * Encapsulates a binary transform parameter.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface TransformParameterBinary extends TransformParameter {
+ /**
+ * Gets the binary transform parameter.
+ *
+ * @return An <code>InputStream</code> from which the binary content can
+ * be read.
+ */
+ public InputStream getBinaryContent();
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterHash.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterHash.java
new file mode 100644
index 000000000..6215e1dc5
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterHash.java
@@ -0,0 +1,41 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+
+/**
+ * Contains a hash of the transform parameter.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface TransformParameterHash extends TransformParameter {
+ /**
+ * Gets the method used for calculating the digest value.
+ *
+ * @return The digest method.
+ */
+ public String getDigestMethod();
+ /**
+ * Gets the binary hash of the transform parameter.
+ *
+ * @return A binary representation of the hash.
+ */
+ public byte[] getDigestValue();
+
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterURI.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterURI.java
new file mode 100644
index 000000000..685c9384b
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterURI.java
@@ -0,0 +1,27 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+/**
+ * Encapsulates a transform parameter given as a URI.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface TransformParameterURI extends TransformParameter {
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifySignatureInfo.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifySignatureInfo.java
new file mode 100644
index 000000000..56b201295
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifySignatureInfo.java
@@ -0,0 +1,42 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+import at.gv.egovernment.moa.spss.api.common.Content;
+
+/**
+ * Encapsulates a signature.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface VerifySignatureInfo {
+ /**
+ * Gets the content of the <code>VerifySignatureEnvironment</code> element.
+ *
+ * @return A <code>MOAElement</code> containing the
+ * <code>VerifySignatureEnvironment</code> in a DOM-like structure.
+ */
+ public Content getVerifySignatureEnvironment();
+ /**
+ * Gets the location of the signature.
+ *
+ * @return The location of the signature within the signature environment.
+ */
+ public VerifySignatureLocation getVerifySignatureLocation();
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifySignatureLocation.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifySignatureLocation.java
new file mode 100644
index 000000000..d9e05d8f4
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifySignatureLocation.java
@@ -0,0 +1,28 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+import at.gv.egovernment.moa.spss.api.common.ElementSelector;
+
+/**
+ * Specifies where to find the signature to be verified.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface VerifySignatureLocation extends ElementSelector {
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfile.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfile.java
new file mode 100644
index 000000000..ccc677c1a
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfile.java
@@ -0,0 +1,43 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+/**
+ * Object for explicitly specifying a transformation path.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface VerifyTransformsInfoProfile {
+ /**
+ * Indicates that this object contains the transformation path explicitly.
+ */
+ public static final int EXPLICIT_VERIFYTRANSFORMSINFOPROFILE = 0;
+ /**
+ * Indicatest that this object contains a transformation info id.
+ */
+ public static final int ID_VERIFYTRANSFORMSINFOPROFILE = 1;
+
+ /**
+ * Gets the type of transformation information contained in this object.
+ *
+ * @return The type of transformation information, either
+ * <code>EXPLICIT_VERIFYTRANSFORMSINFOPROFILE</code> or
+ * <code>ID_VERIFYTRANSFORMSINFOPROFILE</code>.
+ */
+ public int getVerifyTransformsInfoProfileType();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfileExplicit.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfileExplicit.java
new file mode 100644
index 000000000..c43b6471f
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfileExplicit.java
@@ -0,0 +1,40 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+import java.util.List;
+
+/**
+ * Encapsulates explicit transformation information.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface VerifyTransformsInfoProfileExplicit extends VerifyTransformsInfoProfile {
+ /**
+ * Gets the XMLDSig transforms element.
+ *
+ * @return The <code>List</code> of <code>Transform</code>s.
+ */
+ public List getTransforms();
+ /**
+ * Gets the transformation parameters.
+ *
+ * @return The transformation parameters.
+ */
+ public List getTransformParameters();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfileID.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfileID.java
new file mode 100644
index 000000000..55b74b557
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfileID.java
@@ -0,0 +1,33 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+/**
+ * Encapsulates transformation info id for signature verification.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface VerifyTransformsInfoProfileID extends VerifyTransformsInfoProfile {
+ /**
+ * Gets the identifier referencing the transformation info.
+ *
+ * @return The identifier referencing the transformation info.
+ */
+ public String getVerifyTransformsInfoProfileID();
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyXMLSignatureRequest.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyXMLSignatureRequest.java
new file mode 100644
index 000000000..da5012cdd
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyXMLSignatureRequest.java
@@ -0,0 +1,70 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+import java.util.Date;
+import java.util.List;
+
+
+/**
+ * Object that encapsulates a request to verify an XML signature.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface VerifyXMLSignatureRequest {
+ /**
+ * Gets the date and time for which the signature verification has to
+ * be performed.
+ *
+ * @return Date and time for which the signature verification has
+ * to be performed.
+ */
+ public Date getDateTime();
+ /**
+ * Gets the signature to be verified.
+ *
+ * @return The signature to be verified.
+ */
+ public VerifySignatureInfo getSignatureInfo();
+ /**
+ * Gets the supplemental information.
+ *
+ * @return The supplemental information.
+ */
+ public List getSupplementProfiles();
+ /**
+ * Gets parameters for Security Layer signature verification.
+ *
+ * @return Parameters for Security Layer signature verification.
+ */
+ public SignatureManifestCheckParams getSignatureManifestCheckParams();
+ /**
+ * Checks, whether actually signed data shall be returned.
+ *
+ * @return <code>true</code>, if signed data will be returned,
+ * otherwise <code>false</code>.
+ */
+ public boolean getReturnHashInputData();
+ /**
+ * Gets the profile id of the set of trusted certificates to be used for
+ * signature verification.
+ *
+ * @return The id of the trusted certificates.
+ */
+ public String getTrustProfileId();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyXMLSignatureResponse.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyXMLSignatureResponse.java
new file mode 100644
index 000000000..1ccbae133
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyXMLSignatureResponse.java
@@ -0,0 +1,78 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.common.CheckResult;
+import at.gv.egovernment.moa.spss.api.common.SignerInfo;
+
+/**
+ * Object that encapsulates the response on a request to verify an XML
+ * signature.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface VerifyXMLSignatureResponse {
+ /**
+ * Gets a <code>SignerInfo</code> element according to XMLDSig.
+ *
+ * @return A <code>SignerInfo</code> element according to XMLDSig.
+ */
+ public SignerInfo getSignerInfo();
+ /**
+ * Gets datas signed by the signatory.
+ *
+ * @return The signed datas.
+ */
+ public List getHashInputDatas();
+ /**
+ * Gets source datas elements.
+ *
+ * @return The source datas elements.
+ */
+ public List getReferenceInputDatas();
+ /**
+ * Gets the result of the signature verification.
+ *
+ * @return The result of the signature verification.
+ */
+ public ReferencesCheckResult getSignatureCheck();
+ /**
+ * Gets the result of the signature manifest verification.
+ *
+ * @return The result of the signature manifest verification.
+ */
+ public ReferencesCheckResult getSignatureManifestCheck();
+ /**
+ * Gets XMLDSigManifestCheck elements.
+ *
+ * @return The XMLDSigManifestCheck elements.
+ */
+ public List getXMLDsigManifestChecks();
+ /**
+ * Gets the result of the certification verification.
+ *
+ * @return The result of the certificate verification.
+ */
+ public CheckResult getCertificateCheck();
+
+
+
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/CRLDistributionPoint.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/CRLDistributionPoint.java
new file mode 100644
index 000000000..c2ad52a8b
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/CRLDistributionPoint.java
@@ -0,0 +1,180 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.config;
+
+import iaik.pki.revocation.RevocationSourceTypes;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+import at.gv.egovernment.moa.logging.LogMsg;
+import at.gv.egovernment.moa.logging.Logger;
+
+import at.gv.egovernment.moa.spss.util.MessageProvider;
+
+/**
+ * A class representing a CRL distribution point.
+ *
+ * @author Sven Aigner
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CRLDistributionPoint
+ extends DistributionPoint
+ implements iaik.pki.revocation.CRLDistributionPoint
+{
+
+ private static Map RC_MAPPING = new HashMap();
+
+ static {
+
+ // create the mapping between reason code strings and their integer values
+ RC_MAPPING.put(
+ "unused",
+ new Integer(iaik.asn1.structures.DistributionPoint.unused));
+ RC_MAPPING.put(
+ "keyCompromise",
+ new Integer(iaik.asn1.structures.DistributionPoint.keyCompromise));
+ RC_MAPPING.put(
+ "cACompromise",
+ new Integer(iaik.asn1.structures.DistributionPoint.cACompromise));
+ RC_MAPPING.put(
+ "affiliationChanged",
+ new Integer(iaik.asn1.structures.DistributionPoint.affiliationChanged));
+ RC_MAPPING.put(
+ "superseded",
+ new Integer(iaik.asn1.structures.DistributionPoint.superseded));
+ RC_MAPPING.put(
+ "cessationOfOperation",
+ new Integer(iaik.asn1.structures.DistributionPoint.cessationOfOperation));
+ RC_MAPPING.put(
+ "certificateHold",
+ new Integer(iaik.asn1.structures.DistributionPoint.certificateHold));
+ RC_MAPPING.put(
+ "privilegeWithdrawn",
+ new Integer(iaik.asn1.structures.DistributionPoint.privilegeWithdrawn));
+ RC_MAPPING.put(
+ "aACompromise",
+ new Integer(iaik.asn1.structures.DistributionPoint.aACompromise));
+ }
+
+ /**
+ * The name of the CA issuing the CRL referred to by this DP.
+ */
+ private String issuerName_;
+
+ /**
+ * The reason codes applicable for the distribution point.
+ */
+ private int reasonCodes;
+
+ /**
+ * Create a <code>CRLDistributionPoint</code>.
+ *
+ * @param issuerName The name of the CA issuing the CRL referred to by this DP.
+ *
+ * @param uri The URI of the distribution point.
+ *
+ * @param reasonCodeStr A list of reason codes (a space-separated enumeration).
+ */
+ public CRLDistributionPoint(String issuerName, String uri, String reasonCodeStr)
+ {
+ super(uri);
+ issuerName_ = issuerName;
+ this.reasonCodes = extractReasonCodes(reasonCodeStr);
+ }
+
+ /**
+ * @see DistributionPoint#getType()
+ */
+ public String getType()
+ {
+ return RevocationSourceTypes.CRL;
+ }
+
+ /**
+ * Convert a list of reason codes provided as a <code>String</code> to a
+ * binary representation.
+ *
+ * @param reasonCodeStr A <code>String</code> containing a blank-separated,
+ * textual representation of reason codes.
+ * @return int A binary representation of reason codes.
+ * @see iaik.asn1.structures.DistributionPoint
+ */
+ private int extractReasonCodes(String reasonCodeStr) {
+ int codes = 0;
+ StringTokenizer tokenizer = new StringTokenizer(reasonCodeStr);
+ String token;
+ Integer reasonCode;
+
+ while (tokenizer.hasMoreTokens()) {
+ token = tokenizer.nextToken();
+ reasonCode = (Integer) RC_MAPPING.get(token);
+ if (reasonCode != null) {
+ codes |= reasonCode.intValue();
+ } else {
+ MessageProvider msg = MessageProvider.getInstance();
+ Logger.warn(
+ new LogMsg(msg.getMessage("config.07", new Object[] { token })));
+ }
+ }
+
+ // If reasonCodeStr is empty, set all possible reason codes
+ if (codes == 0) codes =
+ iaik.asn1.structures.DistributionPoint.unused |
+ iaik.asn1.structures.DistributionPoint.keyCompromise |
+ iaik.asn1.structures.DistributionPoint.cACompromise |
+ iaik.asn1.structures.DistributionPoint.affiliationChanged |
+ iaik.asn1.structures.DistributionPoint.superseded |
+ iaik.asn1.structures.DistributionPoint.cessationOfOperation |
+ iaik.asn1.structures.DistributionPoint.certificateHold |
+ iaik.asn1.structures.DistributionPoint.privilegeWithdrawn |
+ iaik.asn1.structures.DistributionPoint.aACompromise;
+
+ return codes;
+ }
+
+ /**
+ * Return a binary representation of the reason codes of this distribution
+ * point.
+ *
+ * @return The binary representation of the reason codes.
+ */
+ public int getReasonCodes() {
+ return reasonCodes;
+ }
+
+ /**
+ * Return a <code>String</code> representation of this distribution point.
+ *
+ * @return The <code>String</code> representation of this distribution point.
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ return "(DistributionPoint - "
+ + ("URI<" + getUri())
+ + ("> REASONCODES<" + getReasonCodes() + ">)");
+ }
+
+ /**
+ * @see iaik.pki.revocation.CRLDistributionPoint#getIssuerName()
+ */
+ public String getIssuerName()
+ {
+ return issuerName_;
+ }
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationException.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationException.java
new file mode 100644
index 000000000..2f408b9a8
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationException.java
@@ -0,0 +1,49 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.config;
+
+import at.gv.egovernment.moa.spss.MOASystemException;
+
+/**
+ * Exception signalling an error in the configuration.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ConfigurationException extends MOASystemException {
+
+ /**
+ * Create a <code>ConfigurationException</code>.
+ *
+ * @see at.gv.egovernment.moa.spss.MOAException#MOAException(String, Object[])
+ */
+ public ConfigurationException(String messageId, Object[] parameters) {
+ super(messageId, parameters);
+ }
+
+ /**
+ * Create a <code>ConfigurationException</code>.
+ * @see at.gv.egovernment.moa.spss.MOAException#MOAException(String, Object[], Throwable)
+ */
+ public ConfigurationException(
+ String messageId,
+ Object[] parameters,
+ Throwable wrapped) {
+
+ super(messageId, parameters, wrapped);
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationPartsBuilder.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationPartsBuilder.java
new file mode 100644
index 000000000..9e0dc7688
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationPartsBuilder.java
@@ -0,0 +1,1305 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.config;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.math.BigInteger;
+import java.net.MalformedURLException;
+import java.security.Principal;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.traversal.NodeIterator;
+
+import org.xml.sax.SAXException;
+
+import iaik.asn1.structures.Name;
+import iaik.ixsil.exceptions.URIException;
+import iaik.ixsil.util.URI;
+import iaik.pki.pathvalidation.ChainingModes;
+import iaik.pki.revocation.RevocationSourceTypes;
+import iaik.utils.RFC2253NameParser;
+import iaik.utils.RFC2253NameParserException;
+
+import at.gv.egovernment.moa.logging.LogMsg;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+import at.gv.egovernment.moa.spss.util.MessageProvider;
+
+/**
+ * A class that builds configuration data from a DOM based representation.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ConfigurationPartsBuilder {
+
+ //
+ // XPath namespace prefix shortcuts
+ //
+
+ private static final String CONF = Constants.MOA_CONFIG_PREFIX + ":";
+ private static final String DSIG = Constants.DSIG_PREFIX + ":";
+
+ //
+ // chaining mode constants appearing in the configuration file
+ //
+
+ private static final String CM_CHAINING = "chaining";
+ private static final String CM_PKIX = "pkix";
+
+ //
+ // XPath expressions to select certain parts of the configuration
+ //
+
+ private static final String ROOT = "/" + CONF + "MOAConfiguration/";
+
+ private static final String DIGEST_METHOD_XPATH =
+ ROOT + CONF + "SignatureCreation/"
+ + CONF + "XMLDSig/"
+ + CONF + "DigestMethodAlgorithm";
+ private static final String C14N_ALGORITHM_XPATH =
+ ROOT + CONF + "SignatureCreation/"
+ + CONF + "XMLDSig/"
+ + CONF + "CanonicalizationAlgorithm";
+ private static final String HARDWARE_CRYPTO_MODULE_XPATH =
+ ROOT + CONF + "Common/"
+ + CONF + "HardwareCryptoModule";
+ private static final String HARDWARE_KEY_XPATH =
+ ROOT + CONF + "SignatureCreation/"
+ + CONF + "KeyModules/"
+ + CONF + "HardwareKeyModule";
+ private static final String SOFTWARE_KEY_XPATH =
+ ROOT + CONF + "SignatureCreation/"
+ + CONF + "KeyModules/"
+ + CONF + "SoftwareKeyModule";
+ private static final String KEYGROUP_XPATH =
+ ROOT + CONF + "SignatureCreation/"
+ + CONF + "KeyGroup";
+ private static final String KEYGROUP_MAPPING_XPATH =
+ ROOT + CONF + "SignatureCreation/"
+ + CONF + "KeyGroupMapping";
+ private static final String ISSUER_XPATH =
+ DSIG + "X509IssuerName";
+ private static final String SERIAL_XPATH =
+ DSIG + "X509SerialNumber";
+ private static final String CERTSTORE_LOCATION_XPATH =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "CertificateValidation/"
+ + CONF + "PathConstruction/"
+ + CONF + "CertificateStore/"
+ + CONF + "DirectoryStore/"
+ + CONF + "Location";
+ private static final String AUTO_ADD_CERTIFICATES_XPATH_ =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "CertificateValidation/"
+ + CONF + "PathConstruction/"
+ + CONF + "AutoAddCertificates";
+ private static final String USE_AUTHORITY_INFO_ACCESS_XPATH_ =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "CertificateValidation/"
+ + CONF + "PathConstruction/"
+ + CONF + "UseAuthorityInformationAccess";
+ private static final String CHAINING_MODES_XPATH =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "CertificateValidation/"
+ + CONF + "PathValidation/"
+ + CONF + "ChainingMode";
+ private static final String CHAINING_MODES_DEFAULT_XPATH =
+ CHAINING_MODES_XPATH + "/"
+ + CONF + "DefaultMode";
+ private static final String TRUST_ANCHOR_XPATH =
+ CHAINING_MODES_XPATH + "/"
+ + CONF + "TrustAnchor";
+ private static final String TRUST_PROFILE_XPATH =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "CertificateValidation/"
+ + CONF + "PathValidation/"
+ + CONF + "TrustProfile";
+ private static final String DISTRIBUTION_POINTS_XPATH =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "CertificateValidation/"
+ + CONF + "RevocationChecking/"
+ + CONF + "DistributionPoint";
+ private static final String CRL_RETENTION_INTERVALS_CA_XPATH =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "CertificateValidation/"
+ + CONF + "RevocationChecking/"
+ + CONF + "CrlRetentionIntervals/"
+ + CONF + "CA";
+ private static final String ENABLE_REVOCATION_CHECKING_XPATH_ =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "CertificateValidation/"
+ + CONF + "RevocationChecking/"
+ + CONF + "EnableChecking";
+ private static final String MAX_REVOCATION_AGE_XPATH_ =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "CertificateValidation/"
+ + CONF + "RevocationChecking/"
+ + CONF + "MaxRevocationAge";
+ private static final String REVOCATION_SERVICEORDER_XPATH_ =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "CertificateValidation/"
+ + CONF + "RevocationChecking/"
+ + CONF + "ServiceOrder/"
+ + CONF + "Service";
+ private static final String ENABLE_ARCHIVING_XPATH =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "CertificateValidation/"
+ + CONF + "RevocationChecking/"
+ + CONF + "Archiving/"
+ + CONF + "EnableArchiving";
+ private static final String CRL_ARCHIVE_DURATION_XPATH =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "CertificateValidation/"
+ + CONF + "RevocationChecking/"
+ + CONF + "Archiving/"
+ + CONF + "ArchiveDuration";
+ private static final String ACHIVE_JDBC_URL_ =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "CertificateValidation/"
+ + CONF + "RevocationChecking/"
+ + CONF + "Archiving/"
+ + CONF + "Archive/"
+ + CONF + "DatabaseArchive/"
+ + CONF + "JDBCURL";
+ private static final String ACHIVE_JDBC_DRIVER_CLASS_ =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "CertificateValidation/"
+ + CONF + "RevocationChecking/"
+ + CONF + "Archiving/"
+ + CONF + "Archive/"
+ + CONF + "DatabaseArchive/"
+ + CONF + "JDBCDriverClassName";
+ private static final String CREATE_TRANSFORMS_INFO_PROFILE_XPATH =
+ ROOT + CONF + "SignatureCreation/"
+ + CONF + "CreateTransformsInfoProfile";
+ private static final String CREATE_SIGNATURE_ENVIRONMENT_PROFILE_XPATH =
+ ROOT + CONF + "SignatureCreation/"
+ + CONF + "CreateSignatureEnvironmentProfile";
+ private static final String VERIFY_TRANSFORMS_INFO_PROFILE_XPATH =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "VerifyTransformsInfoProfile";
+ private static final String SUPPLEMENT_PROFILE_XPATH =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "SupplementProfile";
+ private static final String PERMIT_FILE_URIS_XPATH =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "PermitFileURIs";
+ //
+ // default values for configuration parameters
+ //
+
+ /** The accepted canonicalization algorithm URIs, as an array */
+ private static final String[] ACCEPTED_C14N_ALGORITHMS_ARRAY =
+ {
+ Constants.C14N_URI,
+ Constants.C14N_WITH_COMMENTS_URI,
+ Constants.EXC_C14N_URI,
+ Constants.EXC_C14N_WITH_COMMENTS_URI };
+
+ /** The accepted canonicalization algorithm URIs, as a Set */
+ private static final Set ACCEPTED_C14N_ALGORITHMS =
+ new HashSet(Arrays.asList(ACCEPTED_C14N_ALGORITHMS_ARRAY));
+
+ /** Default canonicalization algorithm, if none/illegal has been configured */
+ private static final String C14N_ALGORITHM_DEFAULT = Constants.C14N_URI;
+
+ /** The accepted digest method algorithm URIs, as an array */
+ private static final String[] ACCEPTED_DIGEST_ALGORITHMS_ARRAY =
+ { Constants.SHA1_URI };
+
+ /** The accepted digest method algorithm URIs, as a Set */
+ private static final Set ACCEPTED_DIGEST_ALGORITHMS =
+ new HashSet(Arrays.asList(ACCEPTED_DIGEST_ALGORITHMS_ARRAY));
+
+ /** Default digest algorithm URI, if none/illegal has been configured */
+ private static final String DIGEST_ALGORITHM_DEFAULT = Constants.SHA1_URI;
+
+ /** The root element of the MOA configuration */
+ private Element configElem;
+
+ /**
+ * The directory containing the underlying configuration file.
+ */
+ private File configRoot_;
+
+ /** Whether any warnings were encountered building the configuration. */
+ private List warnings = new ArrayList();
+
+ /**
+ * Create a new <code>ConfigurationPartsBuilder</code>.
+ *
+ * @param configElem The root element of the MOA configuration.
+ *
+ * @param configRoot The directory containing the underlying configuration file.
+ */
+ public ConfigurationPartsBuilder(Element configElem, File configRoot)
+ {
+ this.configElem = configElem;
+ configRoot_ = configRoot;
+ }
+
+ /**
+ * Returns the root element of the MOA configuration.
+ *
+ * @return The root element of the MOA configuration.
+ */
+ public Element getConfigElem() {
+ return configElem;
+ }
+
+ /**
+ * Returns the directory containing the underlying configuration file.
+ *
+ * @return the directory containing the underlying configuration file.
+ */
+ public File getConfigRoot()
+ {
+ return configRoot_;
+ }
+
+ /**
+ * Returns the warnings encountered during building the configuration.
+ *
+ * @return A <code>List</code> of <code>String</code>s, containing the
+ * warning messages.
+ */
+ public List getWarnings() {
+ return warnings;
+ }
+
+ /**
+ * Returns the digest method algorithm name.
+ *
+ * @return The digest method algorithm name from the configuration.
+ */
+ public String getDigestMethodAlgorithmName()
+ {
+ String digestMethod = getElementValue(getConfigElem(), DIGEST_METHOD_XPATH, null);
+
+ if (digestMethod == null || !ACCEPTED_DIGEST_ALGORITHMS.contains(digestMethod))
+ {
+ info(
+ "config.23",
+ new Object[] { "DigestMethodAlgorithm", DIGEST_ALGORITHM_DEFAULT });
+ digestMethod = DIGEST_ALGORITHM_DEFAULT;
+ }
+
+ return digestMethod;
+ }
+
+ /**
+ * Returns the canonicalization algorithm name.
+ *
+ * @return The canonicalization algorithm name from the configuration.
+ */
+ public String getCanonicalizationAlgorithmName()
+ {
+ String c14nAlgorithm = getElementValue(getConfigElem(), C14N_ALGORITHM_XPATH, null);
+
+ if (c14nAlgorithm == null || !ACCEPTED_C14N_ALGORITHMS.contains(c14nAlgorithm))
+ {
+ info(
+ "config.23",
+ new Object[] { "CanonicalizationAlgorithm", C14N_ALGORITHM_DEFAULT });
+ c14nAlgorithm = C14N_ALGORITHM_DEFAULT;
+ }
+
+ return c14nAlgorithm;
+ }
+
+ /**
+ * Build the configured hardware crypto modules.
+ *
+ * @return The hardware crypto modules from the configuration.
+ */
+ public List buildHardwareCryptoModules()
+ {
+ List modules = new ArrayList();
+ NodeIterator modIter = XPathUtils.selectNodeIterator(
+ getConfigElem(),
+ HARDWARE_CRYPTO_MODULE_XPATH);
+
+ Element modElem;
+ while ((modElem = (Element) modIter.nextNode()) != null) {
+ String name = getElementValue(modElem, CONF + "Name", null);
+ String slotId = getElementValue(modElem, CONF + "SlotId", null);
+ String userPIN = getElementValue(modElem, CONF + "UserPIN", null);
+ HardwareCryptoModule module = new HardwareCryptoModule(name, slotId, userPIN);
+ modules.add(module);
+ }
+
+ return modules;
+ }
+
+ /**
+ * Build the configured hardware keys.
+ *
+ * @param keyModules The keyModules that the configuration already knows about. To
+ * prevent multiple key modules with the same ID.
+ * @return The hardware keys contained in the configuration.
+ */
+ public List buildHardwareKeyModules(List keyModules)
+ {
+ Set existingIds = toIdSet(keyModules);
+ List hardwareKeys = new ArrayList();
+ NodeIterator hkIter =
+ XPathUtils.selectNodeIterator(getConfigElem(), HARDWARE_KEY_XPATH);
+ Element keyElem;
+
+ while ((keyElem = (Element) hkIter.nextNode()) != null)
+ {
+ String id = getElementValue(keyElem, CONF + "Id", null);
+ String name = getElementValue(keyElem, CONF + "Name", null);
+ String slotId = getElementValue(keyElem, CONF + "SlotId", null);
+ String userPIN = getElementValue(keyElem, CONF + "UserPIN", null);
+
+ if (existingIds.contains(id))
+ {
+ warn(
+ "config.04",
+ new Object[] { "Hardware- oder SoftwareKeyModule", id });
+ }
+ else
+ {
+ KeyModule key = new HardwareKeyModule(id, name, slotId, userPIN);
+ hardwareKeys.add(key);
+ existingIds.add(id);
+ }
+
+ }
+
+ return hardwareKeys;
+ }
+
+ /**
+ * Build the configured software keys.
+ *
+ * @param keyModules The keyModules that the configuration already knows about. To
+ * prevent multiple key modules with the same ID.
+ *
+ * @return The software keys contained in the configuration.
+ */
+ public List buildSoftwareKeyModules(List keyModules)
+ {
+ Set existingIds = toIdSet(keyModules);
+ List softwareKeys = new ArrayList();
+ NodeIterator skIter =
+ XPathUtils.selectNodeIterator(getConfigElem(), SOFTWARE_KEY_XPATH);
+
+ Element keyElem;
+ while ((keyElem = (Element) skIter.nextNode()) != null)
+ {
+ String id = getElementValue(keyElem, CONF + "Id", null);
+ String fileName = getElementValue(keyElem, CONF + "FileName", null);
+ String passWord = getElementValue(keyElem, CONF + "Password", null);
+
+ if (existingIds.contains(id))
+ {
+ warn(
+ "config.04",
+ new Object[] { "Hardware- oder SoftwareKeyModule", id });
+ }
+ else
+ {
+ File keyFile;
+ KeyModule key;
+
+ // make keyFile absolute
+ keyFile = new File(fileName);
+ if (!keyFile.isAbsolute()) {
+ keyFile = new File(configRoot_, fileName);
+ }
+
+ // check for existence
+ if (!keyFile.exists() || keyFile.isDirectory()) {
+ warn("config.25", new Object[] { id, keyFile.getAbsolutePath()});
+ } else {
+ // create a new key module
+ key = new SoftwareKeyModule(id, keyFile.getAbsolutePath(), passWord);
+ softwareKeys.add(key);
+ existingIds.add(id);
+ }
+ }
+ }
+
+ return softwareKeys;
+ }
+
+ /**
+ * Build the key group configuration.
+ *
+ * @param keyModules The <code>KeyModule</code>s that the configuration
+ * knows about. Used to check for errors in the configuration.
+ * @return The mapping between key group IDs and key groups.
+ */
+ public Map buildKeyGroups(List keyModules)
+ {
+ Set keyModuleIds = toIdSet(keyModules);
+ Map keyGroups = new HashMap();
+ NodeIterator kgIter;
+ Element keyGroupElem;
+
+ // select all KeyGroup elements and build the KeyGroup objects from them
+ kgIter = XPathUtils.selectNodeIterator(getConfigElem(), KEYGROUP_XPATH);
+ while ((keyGroupElem = (Element) kgIter.nextNode()) != null)
+ {
+ String keyGroupId = getElementValue(keyGroupElem, CONF + "Id", null);
+ Set keyGroupEntries =
+ buildKeyGroupEntries(keyGroupId, keyModuleIds, keyGroupElem);
+ KeyGroup keyGroup = new KeyGroup(keyGroupId, keyGroupEntries);
+
+ if (keyGroups.containsKey(keyGroupId))
+ {
+ warn("config.04", new Object[] { "KeyGroup", keyGroupId });
+ }
+ else
+ {
+ keyGroups.put(keyGroup.getId(), keyGroup);
+ }
+ }
+
+ return keyGroups;
+ }
+
+ /**
+ * Return the set of IDs contained in the given <code>KeyModule</code>s.
+ *
+ * @param keyModules The <code>KeyModule</code>s from which to extract the
+ * IDs.
+ * @return The IDs from the given <code>KeyModule</code>s.
+ */
+ private Set toIdSet(List keyModules) {
+ Set ids = new HashSet();
+ Iterator iter;
+
+ for (iter = keyModules.iterator(); iter.hasNext();) {
+ KeyModule keyModule = (KeyModule) iter.next();
+ ids.add(keyModule.getId());
+ }
+
+ return ids;
+ }
+
+ /**
+ * Build the key entries belonging to a key group.
+ *
+ * @param keyGroupId The ID of the key group we are building here. Passed
+ * for logging purposes.
+ * @param keyModuleIds The IDs of the <code>HardwareKeyModule</code>s and
+ * <code>SoftwareKeyModule</code>s that exist in the configuration.
+ * @param keyGroupElem The <code>KeyGroup</code> DOM element to parse.
+ * @return A <code>Set</code> of <code>KeyGroupEntry</code> objects.
+ */
+ private Set buildKeyGroupEntries(
+ String keyGroupId,
+ Set keyModuleIds,
+ Element keyGroupElem) {
+
+ Set entries = new HashSet();
+ NodeIterator keyEntryIter;
+ Element keyEntryElem;
+
+ // select all Key elements and put them into the Map
+ keyEntryIter = XPathUtils.selectNodeIterator(keyGroupElem, CONF + "Key");
+ while ((keyEntryElem = (Element) keyEntryIter.nextNode()) != null)
+ {
+ String keyModuleId = getElementValue(keyEntryElem, CONF + "KeyModuleId", "");
+ Element keyCertElem = (Element) XPathUtils.selectSingleNode(keyEntryElem, CONF + "KeyCertIssuerSerial");
+ IssuerAndSerial issuerSerial = buildIssuerAndSerial(keyCertElem);
+
+ if (!keyModuleIds.contains(keyModuleId)) {
+ warn("config.26", new Object[] { keyGroupId, keyModuleId });
+ } else if (issuerSerial != null) {
+ KeyGroupEntry entry = new KeyGroupEntry(keyModuleId, issuerSerial);
+ entries.add(entry);
+ }
+ }
+ return entries;
+ }
+
+ /**
+ * Build the key group mapping.
+ *
+ * @param keyGroups The available key groups.
+ * @param anonymous The <code>IssuerAndSerial</code> to be used for key group
+ * mappings not protected by a certificate.
+ * @return The key group mapping.
+ */
+ public Map buildKeyGroupMappings(Map keyGroups, IssuerAndSerial anonymous) {
+ Map mappings = new HashMap();
+ NodeIterator mappingIter;
+ Element mappingElem;
+
+ // select all KeyGroupMapping elements
+ mappingIter =
+ XPathUtils.selectNodeIterator(getConfigElem(), KEYGROUP_MAPPING_XPATH);
+
+ // build the mapping for each KeyGroupMapping element
+ while ((mappingElem = (Element) mappingIter.nextNode()) != null)
+ {
+ Element issuerSerialElem = (Element) XPathUtils.selectSingleNode(mappingElem, CONF + "CustomerId");
+
+ // build the IssuerAndSerial who has access to the key groups
+ IssuerAndSerial issuerAndSerial;
+ if (issuerSerialElem != null)
+ {
+ issuerAndSerial = buildIssuerAndSerial(issuerSerialElem);
+ }
+ else
+ {
+ // IssuerSerial element: the keygroup is generally available
+ issuerAndSerial = anonymous;
+ }
+
+ // add the key groups to the mappings
+ if (issuerAndSerial != null) {
+ Map groups = (Map) mappings.get(issuerAndSerial);
+ NodeIterator keyGroupIter;
+ Element keyGroupElem;
+
+ if (groups == null)
+ {
+ // no mapping exist -> build one
+ groups = new HashMap();
+ mappings.put(issuerAndSerial, groups);
+ }
+
+ // select the available key groups and add them to the mapping
+ keyGroupIter = XPathUtils.selectNodeIterator(mappingElem, CONF + "KeyGroupId");
+ while ((keyGroupElem = (Element) keyGroupIter.nextNode()) != null)
+ {
+ String keyGroupId = getElementValue(keyGroupElem, ".", null);
+ KeyGroup keyGroup = (KeyGroup) keyGroups.get(keyGroupId);
+
+ if (keyGroup != null)
+ {
+ groups.put(keyGroupId, keyGroup);
+ } else
+ {
+ warn("config.00", new Object[] { keyGroupId });
+ }
+ }
+ }
+ }
+
+ return mappings;
+ }
+
+ /**
+ * Returns the default chaining mode from the configuration.
+ *
+ * @return The default chaining mode.
+ */
+ public String getDefaultChainingMode()
+ {
+ String defaultChaining = getElementValue(
+ getConfigElem(),
+ CHAINING_MODES_DEFAULT_XPATH,
+ CM_PKIX);
+
+ return translateChainingMode(defaultChaining);
+
+ }
+
+ /**
+ * Build the chaining modes for all configured trust anchors.
+ *
+ * @return The mapping from trust anchors to chaining modes.
+ */
+ public Map buildChainingModes()
+ {
+ Map chainingModes = new HashMap();
+ NodeIterator trustIter = XPathUtils.selectNodeIterator(getConfigElem(), TRUST_ANCHOR_XPATH);
+
+ Element trustAnchorElem;
+ while ((trustAnchorElem = (Element) trustIter.nextNode()) != null)
+ {
+ IssuerAndSerial issuerAndSerial = buildIssuerAndSerial(
+ (Element)XPathUtils.selectSingleNode(trustAnchorElem, CONF + "Identification"));
+ String mode = getElementValue(trustAnchorElem, CONF + "Mode", null);
+
+ if (issuerAndSerial != null)
+ {
+ chainingModes.put(issuerAndSerial, translateChainingMode(mode));
+ }
+ }
+
+ return chainingModes;
+ }
+
+ /**
+ * Build an <code>IssuerAndSerial</code> from the DOM representation.
+ *
+ * @param root The root element (being of type <code>dsig:
+ * X509IssuerSerialType</code>.
+ * @return The issuer and serial number contained in the <code>root</code>
+ * element or <code>null</code> if could not be built for any reason.
+ */
+ private IssuerAndSerial buildIssuerAndSerial(Element root) {
+ String issuer = getElementValue(root, ISSUER_XPATH, null);
+ String serial = getElementValue(root, SERIAL_XPATH, null);
+
+ if (issuer != null && serial != null) {
+ try {
+ RFC2253NameParser nameParser = new RFC2253NameParser(issuer);
+ Principal issuerDN = nameParser.parse();
+
+ return new IssuerAndSerial(issuerDN, new BigInteger(serial));
+ } catch (RFC2253NameParserException e) {
+ warn("config.16", new Object[] { issuer, serial }, e);
+ return null;
+ } catch (NumberFormatException e) {
+ warn("config.16", new Object[] { issuer, serial }, e);
+ return null;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Translate the chaining mode from the configuration file to one used in the
+ * IAIK MOA API.
+ *
+ * @param chainingMode The chaining mode from the configuration.
+ * @return The chaining mode as provided by the <code>ChainingModes</code>
+ * interface.
+ * @see iaik.pki.pathvalidation.ChainingModes
+ */
+ private String translateChainingMode(String chainingMode) {
+ if (chainingMode.equals(CM_CHAINING)) {
+ return ChainingModes.CHAIN_MODE;
+ } else if (chainingMode.equals(CM_PKIX)) {
+ return ChainingModes.PKIX_MODE;
+ } else {
+ return ChainingModes.PKIX_MODE;
+ }
+ }
+
+ /**
+ * Build the distribution points mapping.
+ *
+ * @return The mapping from certificate authorities to distribution points.
+ */
+ public Map buildDistributionPoints()
+ {
+ Map dPs = new HashMap();
+ NodeIterator dPIter;
+ Element dPElem;
+
+ // select all DistributionPoint elements
+ dPIter = XPathUtils.selectNodeIterator(getConfigElem(), DISTRIBUTION_POINTS_XPATH);
+
+ // build the mapping of CA name to distribution points
+ while ((dPElem = (Element) dPIter.nextNode()) != null) {
+ String caIssuerDNText = getElementValue(dPElem, CONF + "CAIssuerDN", "");
+ RFC2253NameParser nameParser = new RFC2253NameParser(caIssuerDNText);
+ NodeIterator cRLDPIter = XPathUtils.selectNodeIterator(dPElem, CONF + "CRLDP");
+ NodeIterator oCSPDPPIter = XPathUtils.selectNodeIterator(dPElem, CONF + "OCSPDP");
+
+ try
+ {
+ String caIssuerDN = nameParser.parse().getName();
+
+ // check, if a mapping exists or make a new mapping
+ Set dPsForCA = (Set) dPs.get(caIssuerDN);
+ if (dPsForCA == null)
+ {
+ dPsForCA = new HashSet();
+ dPs.put(caIssuerDN, dPsForCA);
+ }
+
+ // add the CRL distribution points of this CA to the set
+ Element cRLDPElem;
+ while ((cRLDPElem = (Element) cRLDPIter.nextNode()) != null)
+ {
+ CRLDistributionPoint cRLDP = (CRLDistributionPoint) buildDistributionPoint(cRLDPElem, caIssuerDN);
+ dPsForCA.add(cRLDP);
+ }
+
+ // add the OCSP distribution points of this CA to the set
+ Element oCSPPElem;
+ while ((oCSPPElem = (Element) oCSPDPPIter.nextNode()) != null)
+ {
+ OCSPDistributionPoint oCSPDP = (OCSPDistributionPoint) buildDistributionPoint(oCSPPElem, null);
+ dPsForCA.add(oCSPDP);
+ }
+}
+ catch (RFC2253NameParserException e)
+ {
+ warn("config.13", new Object[] { caIssuerDNText }, e);
+ }
+
+ }
+
+ return dPs;
+ }
+
+ /**
+ * Build a distribution point from the DOM representation.
+ *
+ * @param dpElem The root element of the distribution point.
+ *
+ * @param issuerName The name of the CA issuing the CRL referred to by this DP, or <code>null</code>
+ * if this DP refers to an OCSP responder.
+ *
+ * @return The distribution point.
+ */
+ private DistributionPoint buildDistributionPoint(Element dpElem, String issuerName)
+ {
+ String uri = getElementValue(dpElem, CONF + "Location", null);
+
+ if ("CRLDP".equals(dpElem.getLocalName()))
+ {
+ NodeIterator reasonCodesIter = XPathUtils.selectNodeIterator(dpElem, CONF + "ReasonCode");
+ Element reasonCodeElem;
+ StringBuffer reasonCodesSB = new StringBuffer();
+ while ((reasonCodeElem = (Element)reasonCodesIter.nextNode()) != null)
+ {
+ if (reasonCodesSB.length() > 0) reasonCodesSB.append(" ");
+ reasonCodesSB.append(getElementValue(reasonCodeElem, ".", "").trim());
+ }
+ return new CRLDistributionPoint(issuerName, uri, reasonCodesSB.toString());
+ }
+ else
+ {
+ return new OCSPDistributionPoint(uri);
+ }
+ }
+
+ /**
+ * Return the CRL archive duration.
+ *
+ * @return The value of the CRL archive duration setting from the configuration, or <code>0</code> if
+ * no value is set in the configuration.
+ */
+ public int getRevocationArchiveDuration()
+ {
+ String archiveDuration = getElementValue(getConfigElem(), CRL_ARCHIVE_DURATION_XPATH, null);
+ try
+ {
+ return Integer.parseInt(archiveDuration);
+ }
+ catch (NumberFormatException e)
+ {
+ warn("config.01", null);
+ return 365;
+ }
+ }
+
+ /**
+ * Build the <code>CreateTransformsInfoProfile</code>s.
+ *
+ * @return The mapping from profile ID to profile.
+ */
+ public Map buildCreateTransformsInfoProfiles()
+ {
+ return loadProfiles(CREATE_TRANSFORMS_INFO_PROFILE_XPATH, "CreateTransformsInfoProfile");
+ }
+
+ /**
+ * Build the <code>CreateSignatureEnvironmentProfile</code>s.
+ *
+ * @return The mapping from profile ID to profile.
+ */
+ public Map buildCreateSignatureEnvironmentProfiles()
+ {
+ return loadProfiles(CREATE_SIGNATURE_ENVIRONMENT_PROFILE_XPATH, "CreateSignatureEnvironmentProfile");
+ }
+
+ /**
+ * Build the <code>VerifyTransformsInfoProfile</code>s.
+ *
+ * @return The mapping from profile ID to profile.
+ */
+ public Map buildVerifyTransformsInfoProfiles()
+ {
+ return loadProfiles(VERIFY_TRANSFORMS_INFO_PROFILE_XPATH, "VerifyTransformsInfoProfile");
+ }
+
+ /**
+ * Build the <code>SupplementProfile</code>s.
+ *
+ * @return The mapping from profile ID to profile.
+ */
+ public Map buildSupplementProfiles()
+ {
+ return loadProfiles(SUPPLEMENT_PROFILE_XPATH, "SupplementProfile");
+ }
+
+ /**
+ * Load a profile mapping.
+ *
+ * @param xpath The XPath to select the profiles from the configuration.
+ *
+ * @param profileRoot The name of the profile root element.
+ *
+ * @return Map The profile ID to profile mapping.
+ */
+ private Map loadProfiles(String xpath, String profileRoot)
+ {
+ Map profiles = new HashMap();
+ NodeIterator profileIter = XPathUtils.selectNodeIterator(getConfigElem(), xpath);
+ Element profileElem;
+
+ while ((profileElem = (Element) profileIter.nextNode()) != null)
+ {
+ String id = getElementValue(profileElem, CONF + "Id", null);
+ String fileName = getElementValue(profileElem, CONF + "Location", null);
+
+ if (profiles.containsKey(id))
+ {
+ warn("config.04", new Object[] { profileRoot, id });
+ }
+ else
+ {
+ try
+ {
+ File profileFile = new File(fileName);
+
+ // make profileFile absolute
+ if (!profileFile.isAbsolute()) profileFile = new File(configRoot_, fileName);
+
+ // load the profile
+ info("config.22", new Object[] { profileRoot, id, profileFile.getAbsoluteFile()});
+ Element profile = loadProfile(profileFile);
+
+ if (Constants.MOA_NS_URI.equals(profile.getNamespaceURI()) &&
+ profile.getLocalName().equals(profileRoot))
+ {
+ profiles.put(id, profile);
+ }
+ else
+ {
+ warn("config.02", new Object[] { profileRoot, id, fileName });
+ }
+ } catch (ConfigurationException e) {
+ warn("config.03", new Object[] { profileRoot, id });
+ }
+ }
+ }
+
+ return profiles;
+ }
+
+ /**
+ * Load a profile from a file.
+ *
+ * @param root The absolute directory path of the main configuration file.
+ * @param profileFile The file containing the profile.
+ * @return The profile in its DOM representation.
+ * @throws ConfigurationException An error occurred loading the profile.
+ */
+ private Element loadProfile(File profileFile) throws ConfigurationException {
+
+ Element profile;
+
+ try {
+ profile = parseXml(new FileInputStream(profileFile));
+ } catch (Exception e) {
+ throw new ConfigurationException("config.12", null, e);
+ }
+
+ return profile;
+ }
+
+ /**
+ * Bulid the trust profile mapping.
+ *
+ * @return The profile ID to profile mapping.
+ */
+ public Map buildTrustProfiles()
+ {
+ Map trustProfiles = new HashMap();
+ NodeIterator profileIter = XPathUtils.selectNodeIterator(getConfigElem(), TRUST_PROFILE_XPATH);
+ Element profileElem;
+
+ while ((profileElem = (Element) profileIter.nextNode()) != null)
+ {
+ String id = getElementValue(profileElem, CONF + "Id", null);
+ String trustAnchorsLocStr = getElementValue(profileElem, CONF + "TrustAnchorsLocation", null);
+ String signerCertsLocStr = getElementValue(profileElem, CONF + "SignerCertsLocation", null);
+
+ URI trustAnchorsLocURI = null;
+ try
+ {
+ trustAnchorsLocURI = new URI(trustAnchorsLocStr);
+ if (!trustAnchorsLocURI.isAbsolute()) { // make it absolute to the config file
+ trustAnchorsLocURI = new URI(configRoot_.toURL() + trustAnchorsLocStr);
+ }
+ }
+ catch (URIException e) {
+ warn("config.14", new Object[] { "uri", id, trustAnchorsLocStr }, e);
+ continue;
+ }
+ catch (MalformedURLException e)
+ {
+ warn("config.15", new Object[] {id}, e);
+ continue;
+ }
+
+ File profileDir = new File(trustAnchorsLocURI.getPath());
+ if (!profileDir.exists() || !profileDir.isDirectory()) {
+ warn("config.27", new Object[] { "uri", id });
+ continue;
+ }
+
+
+
+ if (trustProfiles.containsKey(id)) {
+ warn("config.04", new Object[] { "TrustProfile", id });
+ continue;
+ }
+
+ URI signerCertsLocURI = null;
+ if (signerCertsLocStr != null && !"".equals(signerCertsLocStr))
+ {
+ try
+ {
+ signerCertsLocURI = new URI(signerCertsLocStr);
+ if (!signerCertsLocURI.isAbsolute()) signerCertsLocURI = new URI(configRoot_.toURL() + signerCertsLocStr);
+
+ File signerCertsDir = new File(signerCertsLocURI.getPath());
+ if (!signerCertsDir.exists() || !signerCertsDir.isDirectory()) {
+ warn("config.27", new Object[] { "signerCertsUri", id });
+ continue;
+ }
+ }
+ catch (URIException e) {
+ warn("config.14", new Object[] { "signerCertsUri", id, trustAnchorsLocStr }, e);
+ continue;
+ }
+ catch (MalformedURLException e) {
+ warn("config.15", new Object[] {id}, e);
+ continue;
+ }
+ }
+
+ signerCertsLocStr = (signerCertsLocURI != null) ? signerCertsLocURI.toString() : null;
+ TrustProfile profile = new TrustProfile(id, trustAnchorsLocURI.toString(), signerCertsLocStr);
+ trustProfiles.put(id, profile);
+ }
+
+ return trustProfiles;
+ }
+
+ /**
+ * Returns the location of the certificate store.
+ *
+ * @return the location of the certificate store.
+ */
+ public String getCertStoreLocation()
+ {
+ String certStoreLocStr = getElementValue(getConfigElem(), CERTSTORE_LOCATION_XPATH, null);
+ File certStoreLocFile;
+
+ // No value specified in configuration file: Set it to a reasonable (absolute) default
+ if (certStoreLocStr == null)
+ return new File(configRoot_, "certstore").getAbsolutePath();
+
+ // Make cert store location an absolute value
+ certStoreLocFile = new File(certStoreLocStr);
+ if (!certStoreLocFile.isAbsolute())
+ {
+ certStoreLocFile = new File(configRoot_, certStoreLocStr);
+ }
+
+ // Check if cert store location exists, eventually try to create it
+ if (!certStoreLocFile.isDirectory())
+ {
+ boolean created = false;
+ try
+ {
+ created = certStoreLocFile.mkdirs();
+ }
+ finally
+ {
+ if (!created)
+ {
+ warn("config.32", new Object[] { certStoreLocFile.getAbsolutePath() });
+ }
+ }
+ }
+
+ return certStoreLocFile.getAbsolutePath();
+ }
+
+ //
+ // various utility methods
+ //
+
+ /**
+ * Parse a configuration XML file.
+ *
+ * @param inputStream The stream from which to read the XML data.
+ * @return The DOM representation of the XML data.
+ * @throws ParserConfigurationException XML parser not configured properly.
+ * @throws SAXException An error parsing the XML file.
+ * @throws IOException An error reading the stream.
+ */
+ private static Element parseXml(InputStream inputStream)
+ throws ParserConfigurationException, SAXException, IOException {
+ return DOMUtils
+ .parseDocument(inputStream, true, Constants.ALL_SCHEMA_LOCATIONS, null)
+ .getDocumentElement();
+ }
+
+ /**
+ * Return the value of an element located by an XPath.
+ *
+ * @param root The root element from which to evaluate the <code>xpath</code>.
+ * @param xpath The XPath pointing to the element.
+ * @param def The default value, if no element can be found with the given
+ * <code>xpath</code>.
+ * @return The element value or <code>def</code>, if the element cannot be
+ * found.
+ */
+ private String getElementValue(Element root, String xpath, String def) {
+
+ Element elem = (Element) XPathUtils.selectSingleNode(root, xpath);
+ return elem != null ? DOMUtils.getText(elem) : def;
+ }
+
+ /**
+ * Return the value of an attribute located by an XPath.
+ *
+ * @param root The root element from which to evaluate the <code>xpath</code>.
+ * @param xpath The XPath pointing to the attribute.
+ * @param def The default value, if no attribute can be found with the given
+ * <code>xpath</code>.
+ * @return The element value or <code>def</code>, if the attribute cannot be
+ * found.
+ */
+ private String getAttributeValue(Element root, String xpath, String def) {
+ Attr attr = (Attr) XPathUtils.selectSingleNode(root, xpath);
+ return attr != null ? attr.getValue() : def;
+ }
+
+ /**
+ * Log an info message.
+ *
+ * @param messageId The message ID.
+ * @param parameters Additional parameters for the message.
+ * @see at.gv.egovernment.moa.spss.server.util.MessageProvider
+ */
+ private static void info(String messageId, Object[] parameters) {
+ MessageProvider msg = MessageProvider.getInstance();
+ Logger.info(new LogMsg(msg.getMessage(messageId, parameters)));
+ }
+
+ /**
+ * Log a warning.
+ *
+ * @param messageId The message ID.
+ * @param args Additional parameters for the message.
+ * @see at.gv.egovernment.moa.spss.server.util.MessageProvider
+ */
+ private void warn(String messageId, Object[] args) {
+ MessageProvider msg = MessageProvider.getInstance();
+ String txt = msg.getMessage(messageId, args);
+
+ Logger.warn(new LogMsg(txt));
+ warnings.add(txt);
+ }
+
+ /**
+ * Log a warning.
+ *
+ * @param messageId The message ID.
+ * @param args Additional parameters for the message.
+ * @param t An exception being the cause of the warning.
+ * @see at.gv.egovernment.moa.spss.server.util.MessageProvider
+ */
+ private void warn(String messageId, Object[] args, Throwable t) {
+ MessageProvider msg = MessageProvider.getInstance();
+ String txt = msg.getMessage(messageId, args);
+
+ Logger.warn(new LogMsg(txt), t);
+ warnings.add(txt);
+ }
+
+ /**
+ * Returns whether revocation information should be archived.
+ *
+ * @return whether revocation information should be archived.
+ */
+ public boolean getEnableRevocationArchiving()
+ {
+ String enableArchiving = getElementValue(getConfigElem(), ENABLE_ARCHIVING_XPATH, null);
+ return Boolean.valueOf(enableArchiving).booleanValue();
+ }
+
+ /**
+ * Returns the JDBC URL for the revocation archive database.
+ *
+ * @return the JDBC URL for the revocation archive database, or <code>null</code, if the corresponding
+ * parameter is not set in the configuration.
+ */
+ public String getRevocationArchiveJDBCURL()
+ {
+ String jDBCURL = getElementValue(getConfigElem(), ACHIVE_JDBC_URL_, null);
+ return jDBCURL;
+ }
+
+ /**
+ * Returns the JDBC driver class name for the revocation archive database.
+ *
+ * @return the JDBC driver class name for the revocation archive database, or <code>null</code,
+ * if the corresponding parameter is not set in the configuration.
+ */
+ public String getRevocationArchiveJDBCDriverClass()
+ {
+ String jDBCDriverClass = getElementValue(getConfigElem(), ACHIVE_JDBC_DRIVER_CLASS_, null);
+ return jDBCDriverClass;
+ }
+
+ /**
+ * Returns whether revocation information should be archived.
+ */
+ public boolean getEnableRevocationChecking()
+ {
+ String enableChecking = getElementValue(getConfigElem(), ENABLE_REVOCATION_CHECKING_XPATH_, null);
+ return Boolean.valueOf(enableChecking).booleanValue();
+ }
+
+ /**
+ * Returns the maximum age of a revocation information for considering it
+ * still as valid.
+ *
+ * @return the maximum age of a revocation information for considering it
+ * still as valid.
+ */
+ public long getMaxRevocationAge()
+ {
+ String maxRevocationAge = getElementValue(getConfigElem(), MAX_REVOCATION_AGE_XPATH_, null);
+ if (maxRevocationAge == null) return 0;
+ return Long.valueOf(maxRevocationAge).longValue();
+ }
+
+ /**
+ * Returns the service order for revocation checking.
+ *
+ * @return the service order for revocation checking. Valid array entries are
+ * {@link RevocationSourceTypes#OCSP} and {@link RevocationSourceTypes#CRL}.
+ * An empty array will be returned if no service order is specified in the
+ * configuration.
+ */
+ public String[] getServiceOrder()
+ {
+ ArrayList list = new ArrayList();
+ NodeIterator serviceIter = XPathUtils.selectNodeIterator(getConfigElem(), REVOCATION_SERVICEORDER_XPATH_);
+ Element currentServiceNode;
+ while ((currentServiceNode = (Element)serviceIter.nextNode()) != null)
+ {
+ list.add(getElementValue(currentServiceNode, ".", null));
+ }
+ Object[] serviceOrder = list.toArray();
+ String[] returnValue = new String[serviceOrder.length];
+ for (int i = 0; i < serviceOrder.length; i++)
+ {
+ if (((String)serviceOrder[i]).equalsIgnoreCase(RevocationSourceTypes.CRL)) {
+ returnValue[i] = RevocationSourceTypes.CRL;
+ } else if (((String)serviceOrder[i]).equalsIgnoreCase(RevocationSourceTypes.OCSP)) {
+ returnValue[i] = RevocationSourceTypes.OCSP;
+ }
+
+ }
+ return returnValue;
+ }
+
+ /**
+ * Returns whether the certificate extension Authority Info Access should
+ * be used during certificate path construction.
+ *
+ * @return whether the certificate extension Authority Info Access should
+ * be used during certificate path construction.
+ */
+ public boolean getUseAuthorityInfoAccess()
+ {
+ String useAIA = getElementValue(getConfigElem(), USE_AUTHORITY_INFO_ACCESS_XPATH_, null);
+ return Boolean.valueOf(useAIA).booleanValue();
+ }
+
+ /**
+ * Returns whether certificates found during certificate path construction
+ * should be added to the certificate store.
+ *
+ * @return whether certificates found during certificate path construction
+ * should be added to the certificate store.
+ */
+ public boolean getAutoAddCertificates()
+ {
+ String autoAdd = getElementValue(getConfigElem(), AUTO_ADD_CERTIFICATES_XPATH_, null);
+ return Boolean.valueOf(autoAdd).booleanValue();
+ }
+
+ /**
+ * Returns whether file URIs are permitted
+ * @return whether file URIs are permitted
+ */
+ public boolean getPermitFileURIs()
+ {
+ String permitFileURIs = getElementValue(getConfigElem(), PERMIT_FILE_URIS_XPATH, "false");
+ return Boolean.valueOf(permitFileURIs).booleanValue();
+ }
+
+ /**
+ * Returns a map of CRL retention intervals
+ * @return
+ */
+ public Map getCrlRetentionIntervals() {
+ Map map = new HashMap();
+ NodeIterator modIter = XPathUtils.selectNodeIterator(
+ getConfigElem(),
+ CRL_RETENTION_INTERVALS_CA_XPATH);
+
+ Element modElem;
+ while ((modElem = (Element) modIter.nextNode()) != null) {
+ String x509IssuerName = getElementValue(modElem, CONF + "X509IssuerName", null);
+ String i = getElementValue(modElem, CONF + "Interval", null);
+ Integer interval = new Integer(i);
+ try {
+ RFC2253NameParser parser = new RFC2253NameParser(x509IssuerName);
+ Name name = parser.parse();
+ map.put(name.getRFC2253String(), interval);
+ } catch (RFC2253NameParserException e) {
+ map.put(x509IssuerName, interval);
+ }
+
+ //System.out.println("Name: " + x509IssuerName + " - Interval: " + interval);
+ }
+
+ return map;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationProvider.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationProvider.java
new file mode 100644
index 000000000..7b72e3cc5
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationProvider.java
@@ -0,0 +1,743 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.config;
+
+import iaik.asn1.structures.Name;
+import iaik.pki.revocation.RevocationSourceTypes;
+import iaik.utils.RFC2253NameParser;
+import iaik.utils.RFC2253NameParserException;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.math.BigInteger;
+import java.net.URL;
+import java.security.Principal;
+import java.security.cert.X509Certificate;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.logging.LogMsg;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.spss.util.MessageProvider;
+import at.gv.egovernment.moa.util.DOMUtils;
+
+/**
+ * A class providing access to the MOA configuration data.
+ *
+ * <p>Configuration data is read from an XML file, whose location is given by
+ * the <code>moa.spss.server.configuration</code> system property.</p>
+ * <p>This class implements the Singleton pattern. The <code>reload()</code>
+ * method can be used to update the configuration data. Therefore, it is not
+ * guaranteed that consecutive calls to <code>getInstance()</code> will return
+ * the same <code>ConfigurationProvider</code> all the time. During the
+ * processing of a web service request, the current
+ * <code>TransactionContext</code> should be used to obtain the
+ * <code>ConfigurationProvider</code> local to that request.</p>
+ *
+ * @author Patrick Peck
+ * @author Sven Aigner
+ * @version $Id$
+ */
+public class ConfigurationProvider
+{
+ /**
+ * The name of the system property which contains the file name of the
+ * configuration file.
+ */
+ public static final String CONFIG_PROPERTY_NAME =
+ "moa.spss.server.configuration";
+
+ /**
+ * A fake <code>IssuerAndSerial</code> object for storing KeyGroup information
+ * accessible by all clients.
+ */
+ private static final IssuerAndSerial ANONYMOUS_ISSUER_SERIAL =
+ new IssuerAndSerial(new Name(), new BigInteger("0"));
+
+ /** Singleton instance. <code>null</code>, if none has been created. */
+ private static ConfigurationProvider instance;
+
+ //
+ // configuration data
+ //
+
+ /** The warnings generated when building the configuration. */
+ private List warnings = new ArrayList();
+
+ /** The default digest method algorithm name */
+ private String digestMethodAlgorithmName;
+
+ /** The default canonicalization algorithm name */
+ private String canonicalizationAlgorithmName;
+
+ /**
+ * A <code>List</code> of <code>HardwareCryptoModule</code> objects for
+ * configuring hardware modules.
+ */
+ private List hardwareCryptoModules;
+
+ /**
+ * A <code>List</code> of <code>HardwareKey</code> objects containing the
+ * configuration data for hardware keys.
+ */
+ private List hardwareKeyModules;
+
+ /**
+ * A <code>List</code> of <code>SoftwareKey</code> objects containing the
+ * configuration data for software keys.
+ */
+ private List softwareKeyModules;
+
+ /**
+ * A <code>Map</code> which contains a KeyGroupId (a <code>String</code>) to
+ * KeyGroup mapping.
+ */
+ private Map keyGroups;
+
+ /**
+ * A <code>Map</code> which contains the <code>IssuerAndSerial</code> to
+ * <code>KeyGroup</code> mapping.
+ */
+ private Map keyGroupMappings;
+
+ /** The default chaining mode. */
+ private String defaultChainingMode;
+
+ /**
+ * A <code>Map</code> which contains the <code>IssuerAndSerial</code> to
+ * chaining mode (a <code>String</code>) mapping.
+ */
+ private Map chainingModes;
+
+ /**
+ * A <code>Map</code> which contains the CAIssuerDN (a <code>String</code>)
+ * to distribution points (a <code>Set</code> of
+ * <code>DistributionPoint</code>s) mapping.
+ */
+ private Map distributionPoints;
+
+ /**
+ * The CRL archive duration.
+ */
+ private int cRLArchiveDuration;
+
+ /**
+ * Indicates whether revocation information should be archived.
+ */
+ private boolean enableRevocationArchiving_;
+
+ /**
+ * The location of the certificate store.
+ */
+ private String certStoreLocation_;
+
+ /**
+ * A <code>Map</code> which contains a mapping from
+ * CreateSignatureEnvironmentProfile Ids (<code>String</code>) to
+ * CreateSignatureEnvironmentProfile elements (an <code>Element</code>).
+ */
+ private Map createSignatureEnvironmentProfiles;
+
+ /**
+ * A <code>Map</code> which contains a mapping from
+ * CreateTransformsInfoProfile Ids (<code>String</code>) to
+ * CreateTransformsInfoProfile elements (an <code>Element</code>).
+ */
+ private Map createTransformsInfoProfiles;
+
+ /**
+ * A <code>Map</code> which contains a mapping from
+ * VerifyTransformsInfoProfile Ids (<code>String</code>) to
+ * VerifyTransformsInfoProfile elements (an <code>Element</code>).
+ */
+ private Map verifyTransformsInfoProfiles;
+
+ /**
+ * A <code>Map</code> which contains a mapping from
+ * SupplementProfile Ids (<code>String</code>) to SupplementProfile elements
+ * (an <code>Element</code>).
+ */
+ private Map supplementProfiles;
+
+ /**
+ * A <code>Map</code> which contains a TrustProfile Id (a <code>String</code>
+ * to trust profile (a <code>TrustProfile</code>) mapping.
+ */
+ private Map trustProfiles;
+
+ /**
+ * The JDBC URL for the revocation archive database.
+ */
+ private String revocationArchiveJDBCURL_;
+
+ /**
+ * The JDBC driver class name for the revocation archive database.
+ */
+ private String revocationArchiveJDBCDriverClass_;
+
+ /**
+ * Indicates whether revocation checking should be done.
+ */
+ private boolean enableRevocationChecking_;
+
+ /**
+ * The maximum age of a revocation information for considering it still as valid.
+ */
+ private long maxRevocationAge_;
+
+ /**
+ * The service order for revocation checking.
+ */
+ private String[] serviceOrder_;
+
+ /**
+ * Indicates whether certificates found during certificate path construction
+ * should be added to the certificate store.
+ */
+ private boolean autoAddCertificates_;
+
+ /**
+ * Indicates whether the certificate extension Authority Info Access should
+ * be used during certificate path construction.
+ */
+ private boolean useAuthorityInfoAccess_;
+ /**
+ * Indicates whether file URIs are allowed or not
+ */
+ private boolean permitFileURIs;
+
+ /**
+ * Indicates the CRL retention intervals
+ */
+ private Map crlRetentionIntervals;
+
+ /**
+ * Return the single instance of configuration data.
+ *
+ * @return MOAConfigurationProvider The current configuration data.
+ * @throws ConfigurationException Failure to load the configuration data.
+ */
+ public static synchronized ConfigurationProvider getInstance()
+ throws ConfigurationException {
+
+ if (instance == null) {
+ reload();
+ }
+ return instance;
+ }
+
+ /**
+ * Reload the configuration data and set it if successful.
+ *
+ * @return MOAConfigurationProvider The loaded configuration data.
+ * @throws ConfigurationException Failure to load the configuration data.
+ */
+ public static synchronized ConfigurationProvider reload()
+ throws ConfigurationException {
+ String fileName = System.getProperty(CONFIG_PROPERTY_NAME);
+
+ if (fileName == null) {
+ // find out where we are running and use the configuration provided
+ // under WEB-INF/conf/moa-spss/MOA-SPSSConfiguration
+ URL url = ConfigurationProvider.class.getResource("/");
+ fileName =
+ new File(url.getPath()).getParent()
+ + "/conf/moa-spss/MOA-SPSSConfiguration.xml";
+ info("config.05", new Object[] { CONFIG_PROPERTY_NAME });
+ }
+
+ instance = new ConfigurationProvider(fileName);
+ return instance;
+ }
+
+ /**
+ * Constructor for ConfigurationProvider.
+ *
+ * @param fileName The name of the configuration file.
+ * @throws ConfigurationException An error occurred loading the configuration.
+ */
+ public ConfigurationProvider(String fileName) throws ConfigurationException {
+ load(fileName);
+ }
+
+ /**
+ * Load the configuration data from XML file with the given name and build
+ * the internal data structures representing the MOA configuration.
+ *
+ * @param fileName The name of the XML file to load.
+ * @throws ConfigurationException The MOA configuration could not be
+ * read/built.
+ */
+ private void load(String fileName) throws ConfigurationException {
+ FileInputStream stream = null;
+ File configFile;
+ File configRoot;
+ Element configElem;
+ ConfigurationPartsBuilder builder;
+ List allKeyModules;
+
+
+ // load the main config file
+ try {
+ configFile = new File(fileName);
+ configRoot = new File(configFile.getParent());
+ info("config.21", new Object[] { configFile.getAbsoluteFile()});
+ stream = new FileInputStream(fileName);
+ configElem = DOMUtils.parseXmlValidating(new FileInputStream(fileName));
+ } catch (Throwable t) {
+ throw new ConfigurationException("config.10", null, t);
+ }
+
+ // build the internal datastructures
+ try {
+ builder = new ConfigurationPartsBuilder(configElem, configRoot);
+
+ digestMethodAlgorithmName = builder.getDigestMethodAlgorithmName();
+ canonicalizationAlgorithmName =
+ builder.getCanonicalizationAlgorithmName();
+ hardwareCryptoModules = builder.buildHardwareCryptoModules();
+ hardwareKeyModules =
+ builder.buildHardwareKeyModules(Collections.EMPTY_LIST);
+ softwareKeyModules =
+ builder.buildSoftwareKeyModules(hardwareKeyModules);
+ allKeyModules = new ArrayList(hardwareKeyModules);
+ allKeyModules.addAll(softwareKeyModules);
+ keyGroups = builder.buildKeyGroups(allKeyModules);
+ keyGroupMappings =
+ builder.buildKeyGroupMappings(keyGroups, ANONYMOUS_ISSUER_SERIAL);
+ defaultChainingMode = builder.getDefaultChainingMode();
+ chainingModes = builder.buildChainingModes();
+ useAuthorityInfoAccess_ = builder.getUseAuthorityInfoAccess();
+ autoAddCertificates_ = builder.getAutoAddCertificates();
+ trustProfiles = builder.buildTrustProfiles();
+ distributionPoints = builder.buildDistributionPoints();
+ enableRevocationChecking_ = builder.getEnableRevocationChecking();
+ maxRevocationAge_ = builder.getMaxRevocationAge();
+ serviceOrder_ = builder.getServiceOrder();
+ enableRevocationArchiving_ = builder.getEnableRevocationArchiving();
+ cRLArchiveDuration = builder.getRevocationArchiveDuration();
+ revocationArchiveJDBCURL_ = builder.getRevocationArchiveJDBCURL();
+ revocationArchiveJDBCDriverClass_ = builder.getRevocationArchiveJDBCDriverClass();
+ certStoreLocation_ = builder.getCertStoreLocation();
+ createTransformsInfoProfiles = builder.buildCreateTransformsInfoProfiles();
+ createSignatureEnvironmentProfiles = builder.buildCreateSignatureEnvironmentProfiles();
+ verifyTransformsInfoProfiles = builder.buildVerifyTransformsInfoProfiles();
+ supplementProfiles = builder.buildSupplementProfiles();
+ warnings = new ArrayList(builder.getWarnings());
+ permitFileURIs = builder.getPermitFileURIs();
+ crlRetentionIntervals = builder.getCrlRetentionIntervals();
+
+// Set set = crlRetentionIntervals.entrySet();
+// Iterator i = set.iterator();
+// while(i.hasNext()){
+// Map.Entry me = (Map.Entry)i.next();
+// System.out.println("Key: " + me.getKey() + " - Value: " + me.getValue() );
+// }
+
+
+ } catch (Throwable t) {
+ throw new ConfigurationException("config.11", null, t);
+ } finally {
+ try {
+ if (stream != null) {
+ stream.close();
+ }
+ } catch (IOException e) {
+ // don't complain about this
+ }
+ }
+ }
+
+ /**
+ * Returns the warnings encountered during building the configuration.
+ *
+ * @return A <code>List</code> of <code>String</code>s, containing the
+ * warning messages.
+ */
+ public List getWarnings() {
+ return warnings;
+ }
+
+ /**
+ * Return the name of the digest algorithm used during signature creation.
+ *
+ * @return The digest method algorithm name, or an empty <code>String</code>,
+ * if none has been configured.
+ */
+ public String getDigestMethodAlgorithmName() {
+ return digestMethodAlgorithmName;
+ }
+
+ /**
+ * Return the name of the canonicalization algorithm used during signature
+ * creation.
+ *
+ * @return The canonicalization algorithm name, or an empty
+ * <code>String</code> if none has been configured.
+ */
+ public String getCanonicalizationAlgorithmName() {
+ return canonicalizationAlgorithmName;
+ }
+
+ /**
+ * Return the configured hardware crypto modules.
+ *
+ * @return A <code>List</code> of <code>HardwareCryptoModule</code> objects
+ * containing the hardware crypto module configurations.
+ */
+ public List getHardwareCryptoModules() {
+ return hardwareCryptoModules;
+ }
+
+ /**
+ * Return the hardware key modules configuration.
+ *
+ * @return A <code>List</code> of <code>HardwareKeyModule</code> objects
+ * containing the configuration of the hardware key modules.
+ */
+ public List getHardwareKeyModules() {
+ return hardwareKeyModules;
+ }
+
+ /**
+ * Return the software key module configuration.
+ *
+ * @return A <code>List</code> of <code>SoftwareKeyModule</code> objects
+ * containing the configuration of the software key modules.
+ */
+ public List getSoftwareKeyModules() {
+ return softwareKeyModules;
+ }
+
+ /**
+ * Return the key group mapping.
+ *
+ * @return A mapping from key group ID (a <code>String</code>) to
+ * <code>KeyGroup</code> mapping.
+ */
+ public Map getKeyGroups() {
+ return keyGroups;
+ }
+
+ /**
+ * Return the set of <code>KeyGroupEntry</code>s of a given key group, which a
+ * client (identified by an issuer/serial pair) may access.
+ *
+ * @param issuer The issuer of the client certificate.
+ * @param serial The serial number of the client certificate.
+ * @param keyGroupId The ID of the key group.
+ * @return A <code>Set</code> of all the <code>KeyGroupEntry</code>s in the
+ * given key group, if the user may access them. Returns <code>null</code>, if
+ * the user may not access the given key group or if the key group does not
+ * exist.
+ */
+ public Set getKeyGroupEntries(
+ Principal issuer,
+ BigInteger serial,
+ String keyGroupId) {
+
+ IssuerAndSerial issuerAndSerial;
+ Map mapping;
+
+ if (issuer == null && serial == null) {
+ issuerAndSerial = ANONYMOUS_ISSUER_SERIAL;
+ } else {
+ issuerAndSerial = new IssuerAndSerial(issuer, serial);
+ }
+
+ mapping = (Map) keyGroupMappings.get(issuerAndSerial);
+ if (mapping != null) {
+ KeyGroup keyGroup = (KeyGroup) mapping.get(keyGroupId);
+
+ if (keyGroup != null) {
+ return keyGroup.getKeyGroupEntries();
+ }
+ }
+
+ // If no key group is available for a client identified by a certificate,
+ // try to find a key group in the anonymous key group mapping
+ if (issuer != null || serial != null)
+ {
+ mapping = (Map) keyGroupMappings.get(ANONYMOUS_ISSUER_SERIAL);
+ if (mapping != null)
+ {
+ KeyGroup keyGroup = (KeyGroup) mapping.get(keyGroupId);
+ if (keyGroup != null) return keyGroup.getKeyGroupEntries();
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Return the chaining mode for a given trust anchor.
+ *
+ * @param trustAnchor The trust anchor for which the chaining mode should be
+ * returned.
+ * @return The chaining mode for the given trust anchor. If the trust anchor
+ * has not been configured separately, the system default will be returned.
+ */
+ public String getChainingMode(X509Certificate trustAnchor) {
+ Principal issuer = trustAnchor.getIssuerDN();
+ BigInteger serial = trustAnchor.getSerialNumber();
+ IssuerAndSerial issuerAndSerial = new IssuerAndSerial(issuer, serial);
+
+ String mode = (String) chainingModes.get(issuerAndSerial);
+ return mode != null ? mode : defaultChainingMode;
+ }
+
+ /**
+ * Return the distribution points for a given CA.
+ *
+ * @param cert The certificate for which the distribution points should be
+ * looked up. The issuer information is used to perform the lookup.
+ *
+ * @return A <code>Set</code> of <code>DistributionPoint</code> objects. The
+ * set will be empty, if no distribution points have been configured
+ * for this certificate.
+ */
+ public Set getDistributionPoints(X509Certificate cert)
+ {
+ try {
+ RFC2253NameParser nameParser =
+ new RFC2253NameParser(cert.getIssuerDN().toString());
+ String caIssuerDN = nameParser.parse().getName();
+ Set dps = (Set) distributionPoints.get(caIssuerDN);
+
+ if (dps == null) {
+ return Collections.EMPTY_SET;
+ }
+ return dps;
+ } catch (RFC2253NameParserException e) {
+ return Collections.EMPTY_SET;
+ }
+ }
+
+ /**
+ * Return the CRL archive duration.
+ *
+ * @return The duration of how long to keep CRL archive entries (measured in
+ * days).
+ */
+ public int getCRLArchiveDuration() {
+ return cRLArchiveDuration;
+ }
+
+ /**
+ * Returns whether revocation information should be archived.
+ *
+ * @return whether revocation information should be archived.
+ */
+ public boolean getEnableRevocationArchiving()
+ {
+ return enableRevocationArchiving_;
+ }
+
+ /**
+ * Returns the location of the certificate store.
+ *
+ * @return the location of the certificate store.
+ */
+ public String getCertStoreLocation()
+ {
+ return certStoreLocation_;
+ }
+
+ /**
+ * Return a <code>CreateTransformsInfoProfile</code> with the given ID.
+ *
+ * @param id The <code>CreateTransformsInfoProfile</code> ID.
+ * @return The <code>CreateTransformsInfoProfile</code> with the given
+ * ID or <code>null</code>, if none exists.
+ */
+ public Element getCreateTransformsInfoProfile(String id) {
+ return (Element) createTransformsInfoProfiles.get(id);
+ }
+
+ /**
+ * Return a <code>CreateSignatureEnvironmentProfile</code> with the given ID.
+ *
+ * @param id The <code>CreateSignatureEnvironmentProfile</code> ID.
+ * @return The <code>CreateSignatureEnvironmentProfile</code> with the given
+ * ID or <code>null</code>, if none exists.
+ */
+ public Element getCreateSignatureEnvironmentProfile(String id) {
+ return (Element) createSignatureEnvironmentProfiles.get(id);
+ }
+
+ /**
+ * Return a <code>VerifyTransformsInfoProfile</code> with the given ID.
+ *
+ * @param id The <code>VerifyTransformsInfoProfile</code> ID.
+ * @return The <code>VerifyTransformsInfoProfile</code> with the given ID or
+ * <code>null</code>, if none exists.
+ */
+ public Element getVerifyTransformsInfoProfile(String id) {
+ return (Element) verifyTransformsInfoProfiles.get(id);
+ }
+
+ /**
+ * Return a <code>SupplementProfile</code> with the given ID.
+ *
+ * @param id The <code>SupplementProfile</code> ID.
+ * @return The <code>SupplementProfile</code> with the given ID or
+ * <code>null</code>, if none exists.
+ */
+ public Element getSupplementProfile(String id) {
+ return (Element) supplementProfiles.get(id);
+ }
+
+ /**
+ * Return a <code>TrustProfile</code> with the given ID.
+ *
+ * @param id The <code>TrustProfile</code> ID.
+ * @return The <code>TrustProfile</code> with the given ID or
+ * <code>null</code>, if none exists.
+ */
+ public TrustProfile getTrustProfile(String id) {
+ return (TrustProfile) trustProfiles.get(id);
+ }
+
+ /**
+ * Log a warning.
+ *
+ * @param messageId The message ID.
+ * @param parameters Additional parameters for the message.
+ * @see at.gv.egovernment.moa.spss.server.util.MessageProvider
+ */
+ private static void info(String messageId, Object[] parameters) {
+ MessageProvider msg = MessageProvider.getInstance();
+ Logger.info(new LogMsg(msg.getMessage(messageId, parameters)));
+ }
+
+ /**
+ * Log a warning.
+ *
+ * @param messageId The message ID.
+ * @param args Additional parameters for the message.
+ * @see at.gv.egovernment.moa.spss.server.util.MessageProvider
+ */
+ private void warn(String messageId, Object[] args) {
+ MessageProvider msg = MessageProvider.getInstance();
+ String txt = msg.getMessage(messageId, args);
+
+ Logger.warn(new LogMsg(txt));
+ warnings.add(txt);
+ }
+
+ /**
+ * Returns the JDBC URL for the revocation archive database.
+ *
+ * @return the JDBC URL for the revocation archive database.
+ */
+ public String getRevocationArchiveJDBCURL()
+ {
+ return revocationArchiveJDBCURL_;
+ }
+
+ /**
+ * Returns the JDBC driver class name for the revocation archive database.
+ *
+ * @return the JDBC driver class name for the revocation archive database.
+ */
+ public String getRevocationArchiveJDBCDriverClass()
+ {
+ return revocationArchiveJDBCDriverClass_;
+ }
+
+ /**
+ * Returns whether revocation checking should be done.
+ *
+ * @return whether revocation checking should be done.
+ */
+ public boolean getEnableRevocationChecking()
+ {
+ return enableRevocationChecking_;
+ }
+
+ /**
+ * Returns the maximum age of a revocation information for considering it
+ * still as valid.
+ *
+ * @return the maximum age of a revocation information for considering it
+ * still as valid.
+ */
+ public long getMaxRevocationAge()
+ {
+ return maxRevocationAge_;
+ }
+
+ /**
+ * Returns the service order for revocation checking.
+ *
+ * @return the service order for revocation checking. Valid array entries are
+ * {@link RevocationSourceTypes#OCSP} and {@link RevocationSourceTypes#CRL}.
+ */
+ public String[] getServiceOrder()
+ {
+ return serviceOrder_;
+ }
+
+ /**
+ * Returns whether certificates found during certificate path construction
+ * should be added to the certificate store.
+ *
+ * @return whether certificates found during certificate path construction
+ * should be added to the certificate store.
+ */
+ public boolean getAutoAddCertificates()
+ {
+ return autoAddCertificates_;
+ }
+
+ /**
+ * Returns whether the certificate extension Authority Info Access should
+ * be used during certificate path construction.
+ *
+ * @return whether the certificate extension Authority Info Access should
+ * be used during certificate path construction.
+ */
+ public boolean getUseAuthorityInfoAccess()
+ {
+ return useAuthorityInfoAccess_;
+ }
+
+ /**
+ * Returns whether the file URIs are permitted or not
+ * @return whether the file URIs are permitted or not
+ */
+ public boolean getPermitFileURIs()
+ {
+ return permitFileURIs;
+ }
+
+ /**
+ * Returns the map of retention intervals
+ * @return The map of retention intervals
+ */
+ public Map getCrlRetentionIntervals() {
+ return crlRetentionIntervals;
+ }
+
+
+} \ No newline at end of file
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/DistributionPoint.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/DistributionPoint.java
new file mode 100644
index 000000000..8d5bdd6a2
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/DistributionPoint.java
@@ -0,0 +1,53 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.config;
+
+/**
+ * Abstract base class for distribution points.
+ *
+ * @author Gregor Karlinger
+ * @version $Id$
+ * */
+public abstract class DistributionPoint implements iaik.pki.revocation.DistributionPoint
+{
+ /**
+ * The distribution point URI.
+ */
+ private String uri_;
+
+ /**
+ * Create a <code>DistributionPoint</code> with a URI.
+ *
+ * @param uri The URI of the distribution point.
+ */
+ public DistributionPoint(String uri)
+ {
+ uri_ = uri;
+ }
+
+ /**
+ * @see iaik.pki.revocation.DistributionPoint#getType()
+ */
+ public abstract String getType();
+
+ /**
+ * @see iaik.pki.revocation.DistributionPoint#getUri()
+ */
+ public String getUri()
+ {
+ return uri_;
+ }
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/HardwareCryptoModule.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/HardwareCryptoModule.java
new file mode 100644
index 000000000..1c0440675
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/HardwareCryptoModule.java
@@ -0,0 +1,75 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.config;
+
+/**
+ * Contains configuration data for a hardware crypto module.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class HardwareCryptoModule {
+ /** The name of the module. */
+ private String name;
+ /** The slod ID of the module. */
+ private String slotID;
+ /** The user PIN of the module. */
+ private String userPIN;
+
+ /**
+ * Create a new <code>HardwareCryptoModule</code>.
+ *
+ * @param name The name of this <code>HardwareCryptoModule</code>.
+ * @param slotID The slot ID of this <code>HardwareCryptoModule</code>.
+ * @param userPIN The user PIN to access this
+ * <code>HardwareCryptoModule</code>.
+ */
+ public HardwareCryptoModule(String name, String slotID, String userPIN) {
+ this.name = name;
+ this.slotID = slotID;
+ this.userPIN = userPIN;
+ }
+
+ /**
+ * Returns the name of this <code>HardwareCryptoModule</code>.
+ *
+ * @return The name of this <code>HardwareCryptoModule</code>.
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Returns the slot ID of this <code>HardwareCryptoModule</code>.
+ *
+ * @return The slot ID.
+ */
+ public String getSlotID() {
+ return slotID;
+ }
+
+
+ /**
+ * Returns the user PIN of this <code>HardwareCryptoModule</code>.
+ *
+ * @return The user PIN used to access the module.
+ */
+ public String getUserPIN() {
+ return userPIN;
+ }
+
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/HardwareKeyModule.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/HardwareKeyModule.java
new file mode 100644
index 000000000..62136eb5e
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/HardwareKeyModule.java
@@ -0,0 +1,74 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.config;
+
+/**
+ * A class that contains information about a hardware key module.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class HardwareKeyModule extends KeyModule {
+ /** The name of the module. */
+ private String name;
+ /** The slod ID of the module. */
+ private String slotID;
+ /** The user PIN of the module. */
+ private String userPIN;
+
+ /**
+ * Create a new <code>HardwareKey</code>.
+ *
+ * @param id The key module ID.
+ * @param name The name of the key.
+ * @param slotID The slot ID of the key within the hardware module. May be
+ * <code>null</code>.
+ * @param userPIN The user PIN to access the key.
+ */
+ public HardwareKeyModule(String id, String name, String slotID, String userPIN) {
+ super(id);
+ this.name = name;
+ this.slotID = slotID;
+ this.userPIN = userPIN;
+ }
+
+ /**
+ * Return the name of this <code>HardwareKey</code>.
+ *
+ * @return The name of this <code>HardwareKey</code>.
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Return the slot ID of this <code>HardwareKey</code>.
+ *
+ * @return The slot ID of this <code>HardwareKey</code>.
+ */
+ public String getSlotID() {
+ return slotID;
+ }
+
+ /**
+ * Return the user PIN to access this <code>HardwareKey</code>.
+ *
+ * @return The user PIN to access this <code>HardwareKey</code>.
+ */
+ public String getUserPIN() {
+ return userPIN;
+ }
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/IssuerAndSerial.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/IssuerAndSerial.java
new file mode 100644
index 000000000..a94ffcd37
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/IssuerAndSerial.java
@@ -0,0 +1,140 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.config;
+
+import java.math.BigInteger;
+import java.security.Principal;
+
+import iaik.asn1.structures.Name;
+import iaik.utils.RFC2253NameParser;
+import iaik.utils.RFC2253NameParserException;
+
+/**
+ * A class containing the issuer and serial number of a certificate, which can
+ * be used to uniquely identify the certificate.
+ *
+ * The issuer is contained as an RFC2253 encoded <code>String</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class IssuerAndSerial {
+
+ /** The issuer distinguished name. */
+ private String issuerDN;
+ /** The certificate serial number. */
+ private BigInteger serial;
+
+ /**
+ * Create an <code>IssuerAndSerial</code> object.
+ *
+ * The name of the issuer is converted to RFC2253. If it cannot be parsed, the
+ * DN contained in the <code>issuer</code> is set.
+ *
+ * @param issuer The isser of a certificate.
+ * @param serial The serial number of the certificate.
+ */
+ public IssuerAndSerial(Principal issuer, BigInteger serial) {
+ String issuerDN = null;
+ if (issuer instanceof Name) {
+ try {
+ issuerDN = ((Name)issuer).getRFC2253String();
+ } catch (RFC2253NameParserException e) {
+ // do nothing
+ }
+ }
+ if (issuerDN == null) {
+ RFC2253NameParser parser = new RFC2253NameParser(issuer.getName());
+ try {
+ issuerDN = ((Name)parser.parse()).getRFC2253String();
+ } catch (RFC2253NameParserException e) {
+ issuerDN = issuer.getName();
+ }
+ }
+ this.serial = serial;
+ this.issuerDN = issuerDN;
+ }
+
+ /**
+ * Create an <code>IssuerAndSerial</code> object.
+ *
+ * @param issuerDN The issuer distinguished name. Should be an RFC2253 name.
+ * @param serial The serial number of the certificate.
+ */
+ public IssuerAndSerial(String issuerDN, BigInteger serial) {
+ this.issuerDN = issuerDN;
+ this.serial = serial;
+ }
+
+ /**
+ * Return the issuer DN in RFC2253 format.
+ *
+ * @return The issuer part of this object.
+ */
+ public String getIssuerDN() {
+ return issuerDN;
+ }
+
+ /**
+ * Return the serial number.
+ *
+ * @return The serial number of this object.
+ */
+ public BigInteger getSerial() {
+ return serial;
+ }
+
+ /**
+ * Compare this <code>IssuerAndSerial</code> to another object.
+ *
+ * @param other The object to compare this <code>IssuerAndSerial</code> to.
+ * @return <code>true</code>, if <code>other</code> is an
+ * <code>IssuerAndSerial</code> object and the <code>issuer</code> and
+ * <code>serial</code> fields are both equal. <code>false</code> otherwise.
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ public boolean equals(Object other) {
+ if (other instanceof IssuerAndSerial) {
+ IssuerAndSerial ias = (IssuerAndSerial) other;
+ return getIssuerDN().equals(ias.getIssuerDN())
+ && getSerial().equals(ias.getSerial());
+ }
+ return false;
+ }
+
+ /**
+ * Return the hash code of this <code>IssuerAndSerial</code>.
+ *
+ * @return The hash code of this <code>IssuerAndSerial</code>.
+ * @see java.lang.Object#hashCode()
+ */
+ public int hashCode() {
+ return issuerDN.hashCode() ^ serial.hashCode();
+ }
+
+ /**
+ * Return a <code>String</code> representation of this
+ * <code>IssuerAndSerial</code> object.
+ *
+ * @return The <code>String</code> representation.
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ return ("(IssuerAndSerial - Issuer<" + getIssuerDN())
+ + ("> Serial<" + serial.toString() + ">)");
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyGroup.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyGroup.java
new file mode 100644
index 000000000..5275dd852
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyGroup.java
@@ -0,0 +1,84 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.config;
+
+import java.util.Iterator;
+import java.util.Set;
+
+/**
+ * A collection of <code>KeyGroupEntry</code>s with its own ID.
+ *
+ * @author Sven Aigner
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class KeyGroup {
+
+ /** The keys belonging to this key group. */
+ private Set keyGroupEntries;
+ /** The key group ID. */
+ private String id;
+
+ /**
+ * Create a <code>KeyGroup</code>.
+ *
+ * @param id The ID of this <code>KeyGroup</code>.
+ * @param keyGroupEntries The keys belonging to this <code>KeyGroup</code>.
+ */
+ public KeyGroup(String id, Set keyGroupEntries) {
+ this.id = id;
+ this.keyGroupEntries = keyGroupEntries;
+ }
+
+ /**
+ * Return the <code>KeyEntry</code>s contained in this <code>KeyGroup</code>.
+ *
+ * @return The <code>KeyEntry</code>s contained in this <code>KeyGroup</code>.
+ */
+ public Set getKeyGroupEntries() {
+ return keyGroupEntries;
+ }
+
+ /**
+ * Return the ID of this <code>KeyGroup</code>.
+ *
+ * @return The <code>KeyGroup</code> ID.
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * Return a <code>String</code> representation of this <code>KeyGroup</code>.
+ *
+ * @return The <code>String</code> representation.
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ StringBuffer sb = new StringBuffer();
+ Iterator i;
+
+ if (getKeyGroupEntries() != null) {
+ i = getKeyGroupEntries().iterator();
+
+ while (i.hasNext()) {
+ sb.append(" " + i.next());
+ }
+ }
+ return "(KeyGroup - ID:" + id + " " + sb.toString() + ")";
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyGroupEntry.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyGroupEntry.java
new file mode 100644
index 000000000..a54f47959
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyGroupEntry.java
@@ -0,0 +1,121 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.config;
+
+import java.math.BigInteger;
+
+/**
+ * A class containing information about an entry in a key group.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class KeyGroupEntry {
+ /** The module ID of the key. */
+ private String moduleID;
+ /** The issuer DN of the certificate identifying the key. */
+ private String issuerDN;
+ /** The serial number of the certificate identifying the key. */
+ private BigInteger serialNumber;
+
+ /**
+ * Create a new <code>KeyGroupEntry</code>.
+ *
+ * @param moduleID The key module ID to which this entry belongs to.
+ * @param issuerAndSerial The issuer and serial number which uniquely
+ * identifies a certificate within the key module.
+ */
+ public KeyGroupEntry(String moduleID, IssuerAndSerial issuerAndSerial) {
+ this.moduleID = moduleID;
+ this.issuerDN = issuerAndSerial.getIssuerDN();
+ this.serialNumber = issuerAndSerial.getSerial();
+ }
+
+ /**
+ * Create a new <code>KeyGroupEntry</code>.
+ *
+ * @param moduleID The key module ID to which this entry belongs to.
+ * @param issuerDN The isser DN of the certificate within the key module.
+ * @param serialNumber The serial number of the certificate within the key
+ * module.
+ */
+ public KeyGroupEntry(
+ String moduleID,
+ String issuerDN,
+ BigInteger serialNumber) {
+ this.moduleID = moduleID;
+ this.issuerDN = issuerDN;
+ this.serialNumber = serialNumber;
+ }
+
+ /**
+ * Return the key module ID to which this <code>KeyGroupEntry</code> belongs
+ * to.
+ *
+ * @return The key module ID.
+ */
+ public String getModuleID() {
+ return moduleID;
+ }
+
+ /**
+ * Return the issuer DN of this <code>KeyGroupEntry</code> for identifying the
+ * certificate within the key module.
+ *
+ * @return The issuer DN of the certificate.
+ */
+ public String getIssuerDN() {
+ return issuerDN;
+ }
+
+ /**
+ * Return the serial number of this <code>KeyGroupEntry</code> for identifying
+ * the certificate within the key module.
+ *
+ * @return The serial number of the certificate.
+ */
+ public BigInteger getSerialNumber() {
+ return serialNumber;
+ }
+
+ /**
+ * Compare this <code>KeyGroupEntry</code> to another.
+ *
+ * @param other The <code>KeyGroupEntry</code> to compare to.
+ * @return <code>true</code>, if module ID, isser DN and serial number of
+ * <code>other</code> match the ones contained in this object, otherwise
+ * <code>false</code>.
+ * @see java.lang.Object#equals(Object)
+ */
+ public boolean equals(Object other) {
+ if (other instanceof KeyGroupEntry) {
+ KeyGroupEntry entry = (KeyGroupEntry) other;
+ return getModuleID().equals(entry.getModuleID())
+ && getIssuerDN().equals(entry.getIssuerDN())
+ && getSerialNumber().equals(entry.getSerialNumber());
+ }
+ return false;
+ }
+
+ /**
+ * @see java.lang.Object#hashCode()
+ */
+ public int hashCode() {
+ return getModuleID().hashCode()
+ ^ getIssuerDN().hashCode()
+ ^ getSerialNumber().hashCode();
+ }
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyModule.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyModule.java
new file mode 100644
index 000000000..ec9548f80
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyModule.java
@@ -0,0 +1,56 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.config;
+
+/**
+ * A class that contains information about a key module.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class KeyModule {
+
+ /** The key module ID. */
+ private String id;
+
+ /**
+ * Create a <code>Key</code> object.
+ *
+ * @param id The key module ID.
+ */
+ public KeyModule(String id) {
+ this.id = id;
+ }
+
+ /**
+ * Return the key ID.
+ *
+ * @return The key ID.
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * Return a <code>String</code> representation of this <code>Key</code>.
+ *
+ * @return The <code>String</code> representation.
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ return "(Key - Id<" + id + ">)";
+ }
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/OCSPDistributionPoint.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/OCSPDistributionPoint.java
new file mode 100644
index 000000000..488a84408
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/OCSPDistributionPoint.java
@@ -0,0 +1,48 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.config;
+
+import iaik.pki.revocation.RevocationSourceTypes;
+
+/**
+ * A class representing a CRL distribution point.
+ *
+ * @author Gregor Karlinger
+ * @version $Id$
+ */
+public class OCSPDistributionPoint
+ extends DistributionPoint
+ implements iaik.pki.revocation.DistributionPoint
+{
+ /**
+ * Create a <code>OCSPDistributionPoint</code> with a URI.
+ *
+ * @param uri The URI of the ocsp distribution point.
+ */
+ public OCSPDistributionPoint(String uri)
+ {
+ super(uri);
+ }
+
+ /**
+ * @see iaik.pki.revocation.DistributionPoint#getType()
+ */
+ public String getType()
+ {
+ return RevocationSourceTypes.OCSP;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/SoftwareKeyModule.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/SoftwareKeyModule.java
new file mode 100644
index 000000000..d795402f5
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/SoftwareKeyModule.java
@@ -0,0 +1,63 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.config;
+
+/**
+ * A class containing information about a software key, stored in PKCS12 format.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class SoftwareKeyModule extends KeyModule {
+ /** The name of the file containing the keys. */
+ private String fileName;
+ /** The password for accessing the file. */
+ private String passWord;
+
+ /**
+ * Create a new <code>SoftwareKey</code>.
+ *
+ * @param id The key ID.
+ * @param fileName The name of the PKCS12 keystore file containing the key.
+ * @param passWord The password to access the keystore file.
+ */
+ public SoftwareKeyModule(String id, String fileName, String passWord) {
+ super(id);
+ this.fileName = fileName;
+ this.passWord = passWord;
+ }
+
+ /**
+ * Return the name of the PKCS12 keystore file containing this
+ * <code>SoftwareKey</code>.
+ *
+ * @return The name of the PKCS12 keystore file.
+ */
+ public String getFileName() {
+ return fileName;
+ }
+
+ /**
+ * Return the password to access the keystore file.
+ *
+ * @return The password to access the keystore file.
+ */
+ public String getPassWord() {
+ return passWord;
+ }
+
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/TrustProfile.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/TrustProfile.java
new file mode 100644
index 000000000..b1031c4cb
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/TrustProfile.java
@@ -0,0 +1,75 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.config;
+
+/**
+ * Information about a trust profile.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class TrustProfile {
+ /** The ID of the trust profile. */
+ private String id;
+ /** The URI giving the location of the trust profile. */
+ private String uri;
+ /** The URI giving the location of the allowed signer certificates. */
+ private String signerCertsUri;
+
+ /**
+ * Create a <code>TrustProfile</code>.
+ *
+ * @param id The ID of the <code>TrustProfile</code> to create.
+ * @param uri The URI of the <code>TrustProfile</code> to create.
+ * @param signerCertsUri The URI of the location of the allowed signer
+ * certificates of the <code>TrustProfile</code> to create.
+ */
+ public TrustProfile(String id, String uri, String signerCertsUri) {
+ this.id = id;
+ this.uri = uri;
+ this.signerCertsUri = signerCertsUri;
+ }
+
+ /**
+ * Return the ID of this <code>TrustProfile</code>.
+ *
+ * @return The <code>TrustProfile</code> ID.
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * Return the URI of this <code>TrustProfile</code>.
+ *
+ * @return The URI of <code>TrustProfile</code>.
+ */
+ public String getUri() {
+ return uri;
+ }
+
+ /**
+ * Return the URI giving the location of the allowed signer certificates
+ * of this <code>TrustProfile</code>.
+ *
+ * @return The URI of <code>TrustProfile</code>.
+ */
+ public String getSignerCertsUri() {
+ return signerCertsUri;
+ }
+
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/cmsverify/CMSSignatureVerificationProfileImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/cmsverify/CMSSignatureVerificationProfileImpl.java
new file mode 100644
index 000000000..9c61f41a5
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/cmsverify/CMSSignatureVerificationProfileImpl.java
@@ -0,0 +1,52 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.cmsverify;
+
+import iaik.pki.PKIProfile;
+import iaik.server.modules.cmsverify.CMSSignatureVerificationProfile;
+
+/**
+ * An implementation of the <code>CMSSignatureVerificationProfile</code>
+ * interface.
+ *
+ * @see iaik.server.modules.cmsverify.CMSSignatureVerificationProfile
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CMSSignatureVerificationProfileImpl
+ implements CMSSignatureVerificationProfile {
+
+ /** The profile for validating the certificate. */
+ private PKIProfile certificateValidationProfile;
+
+ /**
+ * @see iaik.server.modules.cmsverify.CMSSignatureVerificationProfile#getCertificateValidationProfile()
+ */
+ public PKIProfile getCertificateValidationProfile() {
+ return certificateValidationProfile;
+ }
+
+ /**
+ * Sets the profile for validating the signer certificate.
+ *
+ * @param certificateValidationProfile The certificate validation profile to
+ * set.
+ */
+ public void setCertificateValidationProfile(PKIProfile certificateValidationProfile) {
+ this.certificateValidationProfile = certificateValidationProfile;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/AbstractKeyModuleConfigurationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/AbstractKeyModuleConfigurationImpl.java
new file mode 100644
index 000000000..4060f0b06
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/AbstractKeyModuleConfigurationImpl.java
@@ -0,0 +1,51 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import iaik.server.modules.keys.KeyModuleConfiguration;
+
+/**
+ * Base implementation class for the <code>KeyModuleConfiguration</code>
+ * interface and the interfaces derived from it.
+ *
+ * @see iaik.server.modules.keys.KeyModuleConfiguration
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public abstract class AbstractKeyModuleConfigurationImpl
+ implements KeyModuleConfiguration {
+
+ /** The module ID. */
+ private String moduleID;
+
+ /**
+ * Creata new <code>AbstractKeyModuleConfigurationImpl</code>.
+ *
+ * @param moduleID The key module ID of this
+ * <code>KeyModuleConfiguration</code>.
+ */
+ public AbstractKeyModuleConfigurationImpl(String moduleID) {
+ this.moduleID = moduleID;
+ }
+
+ /**
+ * @see iaik.server.modules.keys.KeyModuleConfiguration#getModuleID()
+ */
+ public String getModuleID() {
+ return moduleID;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/AbstractObservableConfiguration.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/AbstractObservableConfiguration.java
new file mode 100644
index 000000000..6ad727611
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/AbstractObservableConfiguration.java
@@ -0,0 +1,63 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import iaik.pki.store.observer.NotificationData;
+import iaik.pki.store.observer.Observable;
+import iaik.pki.store.observer.Observer;
+
+/**
+ * A base class for observable configuration data.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public abstract class AbstractObservableConfiguration implements Observable {
+
+ /** The observers registered with this <code>Observable</code>. */
+ private List observers = new ArrayList();
+
+ /**
+ * @see iaik.pki.store.observer.Observable#addObserver(iaik.pki.store.observer.Observer)
+ */
+ public void addObserver(Observer observer) {
+ observers.add(observer);
+ }
+
+ /**
+ * @see iaik.pki.store.observer.Observable#removeObserver(iaik.pki.store.observer.Observer)
+ */
+ public boolean removeObserver(Observer observer) {
+ return observers.remove(observer);
+ }
+
+ /**
+ * @see iaik.pki.store.observer.Observable#notify(iaik.pki.store.observer.NotificationData)
+ */
+ public void notify(NotificationData data) {
+ Iterator iter = observers.iterator();
+
+ for (iter = observers.iterator(); iter.hasNext();) {
+ Observer observer = (Observer) iter.next();
+ observer.notify(data);
+ }
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/ArchiveConfigurationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/ArchiveConfigurationImpl.java
new file mode 100644
index 000000000..2e724c438
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/ArchiveConfigurationImpl.java
@@ -0,0 +1,112 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import iaik.pki.store.revocation.archive.ArchiveConfiguration;
+import iaik.pki.store.revocation.archive.ArchiveParameter;
+import iaik.pki.store.revocation.archive.ArchiveTypes;
+
+import java.sql.Driver;
+import java.sql.DriverManager;
+import java.util.Enumeration;
+
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+
+/**
+ * An implementation of the <code>ArchiveConfiguration</code> interface
+ * using configuration data provided by the MOA configuration file.
+ *
+ * @see iaik.pki.store.revocation.archive.ArchiveConfiguration
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ArchiveConfigurationImpl
+ extends AbstractObservableConfiguration
+ implements ArchiveConfiguration {
+
+ /** The configuration parameters of the archive. */
+ private ArchiveParameter archiveParameters;
+
+ /**
+ * Create a new <code>ArchiveConfigurationImpl</code>.
+ *
+ * @param config The MOA configuration from which the configuration data is being read.
+ */
+ public ArchiveConfigurationImpl(ConfigurationProvider config)
+ {
+ String jdbcUrl = config.getRevocationArchiveJDBCURL();
+ this.archiveParameters = new DataBaseArchiveParameterImpl(jdbcUrl);
+
+ // Register JDBC driver class
+ if (jdbcUrl != null)
+ {
+ String jdbcDriverClass = config.getRevocationArchiveJDBCDriverClass();
+ try
+ {
+ Class.forName(jdbcDriverClass);
+ }
+ catch (ClassNotFoundException e)
+ {
+ // TODO 20030709 GK Improve exception handling
+ throw new RuntimeException("JDBC driver class \"" + jdbcDriverClass + " could not be found.");
+ }
+
+ Enumeration regDrivers = DriverManager.getDrivers();
+ boolean isRegistered = false;
+ while (regDrivers.hasMoreElements())
+ {
+ Object currentDriver = regDrivers.nextElement();
+ if (jdbcDriverClass.equals(currentDriver.getClass().getName())) isRegistered = true;
+ }
+ if (!isRegistered)
+ {
+ // Workaround for a driver which does not register itselve at invocation of Class.forName(drvname)
+ try
+ {
+ DriverManager.registerDriver((Driver)Class.forName(jdbcDriverClass).newInstance());
+ }
+ catch (Exception e)
+ {
+ // TODO 20030709 GK Improve exception handling
+ throw new RuntimeException("Registering JDBC driver \"" + jdbcDriverClass + " failed.");
+ }
+ }
+ }
+ }
+
+ /**
+ * Return the type of archive.
+ *
+ * This will always return <code>ArchiveTypes.DATABASE</code>.
+ * @return <code>ArchiveTypes.DATABASE</code>.
+ * @see iaik.pki.store.revocation.archive.ArchiveConfiguration#getType()
+ */
+ public String getType() {
+ return ArchiveTypes.DATABASE;
+ }
+
+ /**
+ * Return the <code>ArchiveParameters</code> describing this
+ * <code>ArchiveConfiguration</code>.
+ *
+ * @return The archive parameters.
+ * @see iaik.pki.store.revocation.archive.ArchiveConfiguration#getArchiveParameters()
+ */
+ public ArchiveParameter getArchiveParameters() {
+ return archiveParameters;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/CRLRetriever.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/CRLRetriever.java
new file mode 100644
index 000000000..e8f39e72a
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/CRLRetriever.java
@@ -0,0 +1,84 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import iaik.logging.TransactionId;
+import iaik.pki.revocation.RevocationSourceTypes;
+import iaik.pki.store.revocation.RevocationInfoRetriever;
+import iaik.pki.store.revocation.RevocationSource;
+import iaik.pki.store.revocation.RevocationStoreException;
+import iaik.pki.ldap.Handler;
+
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLStreamHandler;
+import java.util.Collection;
+import java.util.Date;
+
+import at.gv.egovernment.moa.logging.Logger;
+
+/**
+ * A customized implementation of {@link iaik.pki.store.revocation.RevocationInfoRetriever}. Will be used
+ * instead of the default implementation {@link iaik.pki.store.revocation.CRLRetriever} to overcome a
+ * classloader problem in connection with the {@link java.net.URL} class in a Tomcat deployment environment.
+ *
+ * @author Gregor Karlinger
+ * @version $$
+ */
+public class CRLRetriever implements RevocationInfoRetriever
+{
+ public void update(RevocationSource source, Collection supplementalRequestData, TransactionId tid)
+ throws RevocationStoreException
+ {
+ if (source == null)
+ {
+ throw new NullPointerException("RevocationSource parameter mustn't be null.");
+ }
+ Logger.info("Downloading crl from " + source.getUri());
+ if (!source.getType().equals(RevocationSourceTypes.CRL))
+ {
+ throw new RevocationStoreException(
+ source.getType() + " not supported",
+ null,
+ getClass().getName() + ":1");
+ }
+ try
+ {
+ URL crlUrl;
+ try
+ {
+ crlUrl = new URL(source.getUri());
+ }
+ catch (MalformedURLException e)
+ {
+ // Workaround for classloader problem with deployment in Tomcat 4.1
+ URLStreamHandler handler = new Handler();
+ crlUrl = new URL(null, source.getUri(), handler);
+ }
+
+ InputStream crlInputStream = crlUrl.openStream();
+ source.readFrom(crlInputStream, tid);
+ source.setDownloadTime(new Date());
+ crlInputStream.close();
+ }
+ catch (Exception iox)
+ {
+ Logger.warn("Cannot retrieve crl", iox);
+ throw new RevocationStoreException("Cannot retrieve CRL", iox, getClass().getName() + ":1");
+ }
+ }
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/CertStoreConfigurationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/CertStoreConfigurationImpl.java
new file mode 100644
index 000000000..2e7cb2fa5
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/CertStoreConfigurationImpl.java
@@ -0,0 +1,65 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import iaik.pki.store.certstore.CertStoreConfiguration;
+import iaik.pki.store.certstore.CertStoreParameters;
+import iaik.pki.store.certstore.directory.DirectoryCertStoreParameters;
+
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+
+/**
+ * An implementation of the <code>CertStoreConfiguration</code> interface based
+ * on MOA configuration data.
+ *
+ * @see iaik.pki.store.certstore.CertStoreConfiguration
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CertStoreConfigurationImpl
+ extends AbstractObservableConfiguration
+ implements CertStoreConfiguration {
+
+ /** The configuration parameters of the <code>CertStore</code>. */
+ private CertStoreParameters[] parameters;
+
+ /**
+ * Create a new <code>CertStoreConfigurationImpl</code>.
+ *
+ * @param config The MOA configuration from which the configuration data is
+ * being read.
+ */
+ public CertStoreConfigurationImpl(ConfigurationProvider config)
+ {
+ String certStoreRoot = config.getCertStoreLocation();
+
+ DirectoryCertStoreParameters dirParameters = new DirectoryCertStoreParametersImpl(
+ "MOA Directory CertStore",
+ certStoreRoot,
+ true,
+ false);
+
+ parameters = new CertStoreParameters[] { dirParameters };
+ }
+
+ /**
+ * @see iaik.pki.store.certstore.CertStoreConfiguration#getParameters()
+ */
+ public CertStoreParameters[] getParameters() {
+ return parameters;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/ConfigurationDataImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/ConfigurationDataImpl.java
new file mode 100644
index 000000000..3ce6e2596
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/ConfigurationDataImpl.java
@@ -0,0 +1,136 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import iaik.logging.LoggerConfig;
+import iaik.pki.PKIConfiguration;
+import iaik.server.ConfigurationData;
+
+import at.gv.egovernment.moa.spss.server.config.HardwareCryptoModule;
+import at.gv.egovernment.moa.spss.server.config.HardwareKeyModule;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.config.SoftwareKeyModule;
+
+/**
+ * An implementation of the <code>ConfigurationData</code> interface using
+ * MOA configuration data.
+ *
+ * @see iaik.server.ConfigurationData
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ConfigurationDataImpl implements ConfigurationData {
+ /** PKI configuration data. */
+ private PKIConfiguration pkiConfiguration;
+ /** Crypto modules configuration data. */
+ private List cryptoModuleConfigurations;
+ /** Key modules configuration data. */
+ private List keyModuleConfigurations;
+ /** Logging configuration data. */
+ private LoggerConfig loggerConfig;
+
+ /**
+ * Create a new <code>ConfigurationDataImpl</code>.
+ *
+ * @param config The underlying MOA configuration data.
+ */
+ public ConfigurationDataImpl(ConfigurationProvider config) {
+ this.pkiConfiguration = new PKIConfigurationImpl(config);
+ this.cryptoModuleConfigurations = buildCryptoModuleConfigurations(config);
+ this.keyModuleConfigurations = buildKeyModuleConfigurations(config);
+ this.loggerConfig = new LoggerConfigImpl();
+ }
+
+ /**
+ * Build the list of <code>CryptoModuleConfiguration</code>s.
+ *
+ * @param config The underlying MOA configuration data.
+ * @return The list of <code>CryptoModuleConfiguration</code>s configured in
+ * the MOA configuration.
+ */
+ private List buildCryptoModuleConfigurations(ConfigurationProvider config) {
+ List modules = new ArrayList();
+ Iterator iter = config.getHardwareCryptoModules().iterator();
+
+ while (iter.hasNext()) {
+ HardwareCryptoModule module = (HardwareCryptoModule) iter.next();
+ modules.add(new HardwareCryptoModuleConfigurationImpl(module));
+ }
+
+ return modules;
+ }
+
+ /**
+ * Build the list of <code>KeyModuleConfiguration</code>s.
+ *
+ * @param config The underlying MOA configuration data.
+ * @return The list of <code>KeyModuleConfiguration</code>s configured in the
+ * MOA configuration.
+ */
+ private List buildKeyModuleConfigurations(ConfigurationProvider config) {
+ List keys = new ArrayList();
+ Iterator iter;
+
+ // add the hardware keys
+ iter = config.getHardwareKeyModules().iterator();
+ while (iter.hasNext()) {
+ HardwareKeyModule key = (HardwareKeyModule) iter.next();
+ keys.add(new HardwareKeyModuleConfigurationImpl(key));
+ }
+
+ // add the software keys
+ iter = config.getSoftwareKeyModules().iterator();
+ while (iter.hasNext()) {
+ SoftwareKeyModule key = (SoftwareKeyModule) iter.next();
+ keys.add(new SoftwareKeyModuleConfigurationImpl(key));
+ }
+
+ return keys;
+ }
+
+ /**
+ * @see iaik.server.ConfigurationData#getPKIConfiguration()
+ */
+ public PKIConfiguration getPKIConfiguration() {
+ return pkiConfiguration;
+ }
+
+ /**
+ * @see iaik.server.ConfigurationData#getCryptoModuleConfigurations()
+ */
+ public List getCryptoModuleConfigurations() {
+ return cryptoModuleConfigurations;
+ }
+
+ /**
+ * @see iaik.server.ConfigurationData#getKeyModuleConfigurations()
+ */
+ public List getKeyModuleConfigurations() {
+ return keyModuleConfigurations;
+ }
+
+ /**
+ * @see iaik.server.ConfigurationData#getLoggerConfig()
+ */
+ public LoggerConfig getLoggerConfig() {
+ return loggerConfig;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/DataBaseArchiveParameterImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/DataBaseArchiveParameterImpl.java
new file mode 100644
index 000000000..e57650542
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/DataBaseArchiveParameterImpl.java
@@ -0,0 +1,48 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import iaik.pki.store.revocation.archive.db.DataBaseArchiveParameter;
+
+/**
+ * An implementation of the <code>DataBaseArchiveParameter</code> interface.
+ *
+ * @see iaik.pki.store.revocation.archive.db.DataBaseArchiveParameter
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class DataBaseArchiveParameterImpl implements DataBaseArchiveParameter {
+
+ /** The JDBC URL for accessing the archive. */
+ private String jDBCUrl;
+
+ /**
+ * Create a new <code>DataBaseArchiveParameterImpl</code>.
+ *
+ * @param jDBCUrl The JDBC URL of the archive.
+ */
+ public DataBaseArchiveParameterImpl(String jDBCUrl) {
+ this.jDBCUrl = jDBCUrl;
+ }
+
+ /**
+ * @see iaik.pki.store.revocation.archive.db.DataBaseArchiveParameter#getJDBCUrl()
+ */
+ public String getJDBCUrl() {
+ return jDBCUrl;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/DirectoryCertStoreParametersImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/DirectoryCertStoreParametersImpl.java
new file mode 100644
index 000000000..d2d8d76e1
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/DirectoryCertStoreParametersImpl.java
@@ -0,0 +1,96 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import iaik.pki.store.certstore.CertStoreTypes;
+import iaik.pki.store.certstore.directory.DirectoryCertStoreParameters;
+
+/**
+ * An implementation of the <code>DirectoryCertStoreParameters</code> interface.
+ *
+ * @see iaik.pki.store.certstore.directory.DirectoryCertStoreParameters
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class DirectoryCertStoreParametersImpl
+ implements DirectoryCertStoreParameters {
+
+ /** The root directory of the <code>CertStore</code>. */
+ private String rootDirectory;
+ /** Whether a new directory may be created. */
+ private boolean createNew;
+ /** The <code>CertStore</code> ID. */
+ private String id;
+ /** Whether the <code>CertStore</code> is read-only. */
+ private boolean readOnly;
+
+ /**
+ * Create a new <code>DirectoryCertStoreParameterImpl</code>.
+ *
+ * @param id The <code>CertStore</code> ID.
+ * @param rootDirectory The root directory of the <code>CertStore</code>.
+ * @param createNew Whether a new directory may be created.
+ * @param readOnly Whether the <code>CertStore</code> is read-only.
+ */
+ public DirectoryCertStoreParametersImpl(
+ String id,
+ String rootDirectory,
+ boolean createNew,
+ boolean readOnly) {
+
+ this.id = id;
+ this.rootDirectory = rootDirectory;
+ this.createNew = createNew;
+ this.readOnly = readOnly;
+ }
+
+ /**
+ * @see iaik.pki.store.certstore.directory.DirectoryCertStoreParameters#getRootDirectory()
+ */
+ public String getRootDirectory() {
+ return rootDirectory;
+ }
+
+ /**
+ * @see iaik.pki.store.certstore.directory.DirectoryCertStoreParameters#createNew()
+ */
+ public boolean createNew() {
+ return createNew;
+ }
+
+ /**
+ * @see iaik.pki.store.certstore.CertStoreParameters#getId()
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * @see iaik.pki.store.certstore.CertStoreParameters#isReadOnly()
+ */
+ public boolean isReadOnly() {
+ return readOnly;
+ }
+
+ /**
+ * @return <code>CertStoreTypes.DIRECTORY</code>
+ * @see iaik.pki.store.certstore.CertStoreParameters#getType()
+ */
+ public String getType() {
+ return CertStoreTypes.DIRECTORY;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/HardwareCryptoModuleConfigurationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/HardwareCryptoModuleConfigurationImpl.java
new file mode 100644
index 000000000..c58a735df
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/HardwareCryptoModuleConfigurationImpl.java
@@ -0,0 +1,66 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import iaik.server.modules.crypto.HardwareCryptoModuleConfiguration;
+
+import at.gv.egovernment.moa.spss.server.config.HardwareCryptoModule;
+
+/**
+ * An implementation of the <code>HardwareCryptoModuleConfiguration</code>
+ * wrapping a <code>HardwareCryptoModule</code> from the MOA configuration.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class HardwareCryptoModuleConfigurationImpl
+ implements HardwareCryptoModuleConfiguration {
+
+ /** The wrapped <code>HardwareCryptoModule</code>. */
+ private HardwareCryptoModule module;
+
+ /**
+ * Create a new <code>HardwareCryptoModuleConfigurationImpl</code>.
+ *
+ * @param module The <code>HardwareCryptoModule</code> from the underlying MOA
+ * configuration.
+ */
+ public HardwareCryptoModuleConfigurationImpl(HardwareCryptoModule module) {
+ this.module = module;
+ }
+
+ /**
+ * @see iaik.server.modules.crypto.HardwareCryptoModuleConfiguration#getModuleName()
+ */
+ public String getModuleName() {
+ return module.getName();
+ }
+
+ /**
+ * @see iaik.server.modules.crypto.HardwareCryptoModuleConfiguration#getSlotID()
+ */
+ public String getSlotID() {
+ return module.getSlotID();
+ }
+
+ /**
+ * @see iaik.server.modules.crypto.HardwareCryptoModuleConfiguration#getUserPIN()
+ */
+ public char[] getUserPIN() {
+ return module.getUserPIN().toCharArray();
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/HardwareKeyModuleConfigurationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/HardwareKeyModuleConfigurationImpl.java
new file mode 100644
index 000000000..f1a94df7a
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/HardwareKeyModuleConfigurationImpl.java
@@ -0,0 +1,70 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import iaik.server.modules.keys.HardwareKeyModuleConfiguration;
+
+import at.gv.egovernment.moa.spss.server.config.HardwareKeyModule;
+
+/**
+ * An implementation of the <code>HardwareKeyModuleConfiguration</code>
+ * interface wrapping a <code>HardwareKeyModule</code> from the MOA
+ * configuration.
+ *
+ * @see iaik.server.modules.keys.HardwareKeyModuleConfiguration
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class HardwareKeyModuleConfigurationImpl
+ extends AbstractKeyModuleConfigurationImpl
+ implements HardwareKeyModuleConfiguration {
+
+ /** The wrapped <code>HardwareKeyModule</code>. */
+ private HardwareKeyModule keyModule;
+
+ /**
+ * Create a new <code>HardwareKeyModuleConfigurationImpl</code>.
+ *
+ * @param keyModule The <code>HardwareKeyModule</code> from the underlying
+ * MOA configuration.
+ */
+ public HardwareKeyModuleConfigurationImpl(HardwareKeyModule keyModule) {
+ super(keyModule.getId());
+ this.keyModule = keyModule;
+ }
+
+ /**
+ * @see iaik.server.modules.keys.HardwareKeyModuleConfiguration#getModuleName()
+ */
+ public String getModuleName() {
+ return keyModule.getName();
+ }
+
+ /**
+ * @see iaik.server.modules.keys.HardwareKeyModuleConfiguration#getSlotID()
+ */
+ public String getSlotID() {
+ return keyModule.getSlotID();
+ }
+
+ /**
+ * @see iaik.server.modules.keys.HardwareKeyModuleConfiguration#getUserPIN()
+ */
+ public char[] getUserPIN() {
+ return keyModule.getUserPIN().toCharArray();
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/IaikConfigurator.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/IaikConfigurator.java
new file mode 100644
index 000000000..4625ccf88
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/IaikConfigurator.java
@@ -0,0 +1,188 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import iaik.pki.revocation.RevocationSourceTypes;
+import iaik.pki.store.revocation.RevocationFactory;
+import iaik.pki.store.revocation.RevocationSourceStore;
+import iaik.pki.store.truststore.TrustStoreFactory;
+import iaik.server.ConfigurationData;
+import iaik.server.Configurator;
+import iaik.server.modules.keys.KeyEntryID;
+import iaik.server.modules.keys.KeyModule;
+import iaik.server.modules.keys.KeyModuleFactory;
+
+import at.gv.egovernment.moa.logging.LogMsg;
+import at.gv.egovernment.moa.logging.Logger;
+
+import at.gv.egovernment.moa.spss.server.config.ConfigurationException;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.config.KeyGroup;
+import at.gv.egovernment.moa.spss.server.config.KeyGroupEntry;
+import at.gv.egovernment.moa.spss.server.logging.TransactionId;
+import at.gv.egovernment.moa.spss.util.MessageProvider;
+
+/**
+ * A class responsible for configuring the IAIK MOA modules.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class IaikConfigurator {
+
+ /** The warnings encountered during configuration. */
+ private List warnings = new ArrayList();
+
+ /**
+ * Configure the IAIK MOA subsystem.
+ *
+ *
+ * @param moaConfig The underlying MOA configuration.
+ * @throws ConfigurationException An error occurred configuring the IAIK
+ * MOA subsystem.
+ */
+ public void configure(ConfigurationProvider moaConfig)
+ throws ConfigurationException {
+ ConfigurationData configData = new ConfigurationDataImpl(moaConfig);
+
+ warnings = new ArrayList();
+
+ try {
+ TransactionId transId = new TransactionId("IaikConfigurator");
+ Configurator.init(configData, transId);
+
+ // Set customized CRL retriever to overcome a classloader problem when MOA is deployed in Tomcat
+ RevocationSourceStore rss = RevocationFactory.getInstance(transId).getRevocationSourceStore();
+ //rss.setRetriever(new CRLRetriever(), RevocationSourceTypes.CRL);
+ if ((moaConfig.getSoftwareKeyModules().size() > 0) || (moaConfig.getHardwareKeyModules().size() > 0)) {
+ dumpKeyEntryIDs();
+ }
+ checkKeyGroupConfig(moaConfig);
+ TrustStoreFactory.reset();
+ } catch (iaik.server.ConfigurationException e) {
+ throw new ConfigurationException("config.08", null, e);
+ } catch (Throwable t) {
+ throw new ConfigurationException("config.08", null, t);
+ }
+ }
+
+ /**
+ * Return the warnings encountered during configuration.
+ *
+ * @return The warnings.
+ */
+ public List getWarnings() {
+ return warnings;
+ }
+
+ /**
+ * Dump all <code>KeyEntryID</code>s contained in the configured
+ * <code>KeyModule</code>s to the log file.
+ */
+ private void dumpKeyEntryIDs() {
+ MessageProvider msg = MessageProvider.getInstance();
+ KeyModule module = KeyModuleFactory.getInstance(new TransactionId("dump"));
+ Set keyEntryIds = module.getPrivateKeyEntryIDs();
+ Iterator iter;
+
+ for (iter = keyEntryIds.iterator(); iter.hasNext();) {
+ KeyEntryID keyEntryId = (KeyEntryID) iter.next();
+ Logger.info(
+ new LogMsg(msg.getMessage("config.19", new Object[] { keyEntryId })));
+ }
+ }
+
+ /**
+ * Check that each key group entry in each key group can be resolved to a
+ * KeyEntryID.
+ *
+ * Logs a warning for each key group entry that cannot be resolved.
+ *
+ * @param moaConfig The MOA configuration to check.
+ */
+ private void checkKeyGroupConfig(ConfigurationProvider moaConfig) {
+ Map keyGroups = moaConfig.getKeyGroups();
+ Iterator iter;
+
+ for (iter = keyGroups.values().iterator(); iter.hasNext();) {
+ KeyGroup keyGroup = (KeyGroup) iter.next();
+ Set keyGroupEntries = keyGroup.getKeyGroupEntries();
+ Iterator kgIter;
+
+ for (kgIter = keyGroupEntries.iterator(); kgIter.hasNext();) {
+ KeyGroupEntry entry = (KeyGroupEntry) kgIter.next();
+
+ if (!findKeyEntryID(entry)) {
+ warn(
+ "config.31",
+ new Object[] {
+ keyGroup.getId(),
+ entry.getModuleID(),
+ entry.getIssuerDN(),
+ entry.getSerialNumber()});
+ }
+ }
+ }
+ }
+
+ /**
+ * Find out that a certain KeyGroupEntry could be resolved to a KeyEntryID
+ * by the Configurator.
+ *
+ * @param keyGroupEntry The key group entry to find.
+ * @return <code>true</code>, if the <code>keyGroupEntry</code> could be
+ * resolved to a <code>KeyEntryID</code>; otherwise <code>false</code>.
+ */
+ private boolean findKeyEntryID(KeyGroupEntry keyGroupEntry) {
+ KeyModule module = KeyModuleFactory.getInstance(new TransactionId("check"));
+ Set keyEntryIDs = module.getPrivateKeyEntryIDs();
+ Iterator iter;
+
+ for (iter = keyEntryIDs.iterator(); iter.hasNext();) {
+ KeyEntryID entry = (KeyEntryID) iter.next();
+
+ if (entry.getCertificateIssuer().equals(keyGroupEntry.getIssuerDN())
+ && entry.getCertificateSerialNumber().equals(
+ keyGroupEntry.getSerialNumber())
+ && entry.getModuleID().equals(keyGroupEntry.getModuleID())) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Log a warning.
+ *
+ * @param messageId The message ID.
+ * @param args Additional parameters for the message.
+ * @see at.gv.egovernment.moa.spss.server.util.MessageProvider
+ */
+ private void warn(String messageId, Object[] args) {
+ MessageProvider msg = MessageProvider.getInstance();
+ String txt = msg.getMessage(messageId, args);
+
+ Logger.warn(new LogMsg(txt));
+ warnings.add(txt);
+ }
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/LoggerConfigImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/LoggerConfigImpl.java
new file mode 100644
index 000000000..dc511bd20
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/LoggerConfigImpl.java
@@ -0,0 +1,49 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import java.util.Properties;
+
+import iaik.logging.LogConfigurationException;
+import iaik.logging.LoggerConfig;
+
+import at.gv.egovernment.moa.logging.LoggingContextManager;
+
+/**
+ * Default implementation of the <code>LoggerConfig</code> interface.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class LoggerConfigImpl implements LoggerConfig {
+
+ /** The implementation of iaik.logging.LogFactory. */
+ private static final String DEFAULT_IMPLEMENTATION =
+ "at.gv.egovernment.moa.spss.server.logging.IaikLogFactory";
+
+ public String getFactory() {
+ return DEFAULT_IMPLEMENTATION;
+ }
+
+ public Properties getProperties() throws LogConfigurationException {
+ return new Properties();
+ }
+
+ public String getNodeId() {
+ return LoggingContextManager.getInstance().getLoggingContext().getNodeID();
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/PKIConfigurationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/PKIConfigurationImpl.java
new file mode 100644
index 000000000..2ea1faf04
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/PKIConfigurationImpl.java
@@ -0,0 +1,95 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import iaik.pki.PKIConfiguration;
+import iaik.pki.pathvalidation.ValidationConfiguration;
+import iaik.pki.revocation.RevocationConfiguration;
+import iaik.pki.store.certstore.CertStoreConfiguration;
+import iaik.pki.store.revocation.archive.ArchiveConfiguration;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+
+/**
+ * An implementation of the <code>PKIConfiguration</code> interface using data
+ * from the MOA configuration.
+ *
+ * @see iaik.pki.PKIConfiguration
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class PKIConfigurationImpl implements PKIConfiguration {
+ /** The <code>CertStore</code> configuration. */
+ private CertStoreConfiguration certStoreConfiguration;
+ /** The revocation checking configuration. */
+ private RevocationConfiguration revocationConfiguration;
+ /** The revocation archive configuration. */
+ private ArchiveConfiguration archiveConfiguration;
+ /** The certificate validation configuration. */
+ private ValidationConfiguration validationConfiguration;
+
+ /**
+ * Create a new <code>PKIConfigurationImpl</code>.
+ *
+ * @param config The underlying MOA configuration which will be used to build
+ * the configuration data contained in this object.
+ */
+ public PKIConfigurationImpl(ConfigurationProvider config) {
+
+ this.certStoreConfiguration = new CertStoreConfigurationImpl(config);
+ this.revocationConfiguration = new RevocationConfigurationImpl(config);
+
+ boolean archiveInfo = config.getEnableRevocationArchiving();
+ if (archiveInfo)
+ {
+ this.archiveConfiguration = new ArchiveConfigurationImpl(config);
+ }
+ else
+ {
+ this.archiveConfiguration = null;
+ }
+
+ this.validationConfiguration = new ValidationConfigurationImpl(config);
+ }
+
+ /**
+ * @see iaik.pki.PKIConfiguration#getCertStoreConfiguration()
+ */
+ public CertStoreConfiguration getCertStoreConfiguration() {
+ return certStoreConfiguration;
+ }
+
+ /**
+ * @see iaik.pki.PKIConfiguration#getRevocationConfiguration()
+ */
+ public RevocationConfiguration getRevocationConfiguration() {
+ return revocationConfiguration;
+ }
+
+ /**
+ * @see iaik.pki.PKIConfiguration#getArchiveConfiguration()
+ */
+ public ArchiveConfiguration getArchiveConfiguration() {
+ return archiveConfiguration;
+ }
+
+ /**
+ * @see iaik.pki.PKIConfiguration#getValidationConfiguration()
+ */
+ public ValidationConfiguration getValidationConfiguration() {
+ return validationConfiguration;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/RevocationConfigurationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/RevocationConfigurationImpl.java
new file mode 100644
index 000000000..67eac5b55
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/RevocationConfigurationImpl.java
@@ -0,0 +1,80 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import iaik.pki.revocation.RevocationConfiguration;
+
+import java.security.cert.X509Certificate;
+import java.util.Date;
+import java.util.Map;
+import java.util.Set;
+
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+
+/**
+ * An implementation of the <code>RevocationConfiguration</code> interface using
+ * MOA configuration data.
+ *
+ * @see iaik.pki.revocation.RevocationConfiguration
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class RevocationConfigurationImpl
+ extends AbstractObservableConfiguration
+ implements RevocationConfiguration {
+
+ /** The <code>ConfigurationProvider</code> to read the configuration data
+ * from. */
+ private ConfigurationProvider config;
+
+ /**
+ * Create a new <code>RevocationConfigurationImpl</code>.
+ *
+ * @param config The underlying MOA configuration containing the configuration
+ * data.
+ */
+ public RevocationConfigurationImpl(ConfigurationProvider config) {
+ this.config = config;
+ }
+
+ /**
+ * @see iaik.pki.revocation.RevocationConfiguration#getAlternativeDistributionPoints
+ */
+ public Set getAlternativeDistributionPoints(X509Certificate cert, X509Certificate issuer, Date date)
+ {
+ return config.getDistributionPoints(cert);
+ }
+
+ /**
+ * @see iaik.pki.revocation.RevocationConfiguration#archiveRevocationInfo(java.lang.String, java.lang.String)
+ */
+ public boolean archiveRevocationInfo(String type, String uri)
+ {
+ return config.getEnableRevocationArchiving();
+ }
+
+ /**
+ * @see iaik.pki.revocation.RevocationConfiguration#getCrlRetentionInterval(java.lang.String)
+ */
+ public Integer getCrlRetentionInterval(String issuername)
+ {
+ Map map = config.getCrlRetentionIntervals();
+ Integer interval = (Integer)map.get(issuername);
+
+ return interval;
+}
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/SoftwareKeyModuleConfigurationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/SoftwareKeyModuleConfigurationImpl.java
new file mode 100644
index 000000000..1b8d85538
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/SoftwareKeyModuleConfigurationImpl.java
@@ -0,0 +1,90 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+
+import iaik.server.modules.keys.ConfigurationException;
+import iaik.server.modules.keys.SoftwareKeyModuleConfiguration;
+
+import at.gv.egovernment.moa.logging.LogMsg;
+import at.gv.egovernment.moa.logging.Logger;
+
+import at.gv.egovernment.moa.spss.server.config.SoftwareKeyModule;
+import at.gv.egovernment.moa.spss.util.MessageProvider;
+
+/**
+ * An implementation of the <code>SoftwareKeyModuleConfiguration</code> wrapping
+ * a <code>SoftwareKeyModule</code> from the MOA configuration.
+ *
+ * @see iaik.server.modules.keys.SoftwareKeyModuleConfiguration
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class SoftwareKeyModuleConfigurationImpl
+ extends AbstractKeyModuleConfigurationImpl
+ implements SoftwareKeyModuleConfiguration {
+
+ /** The wrapped <code>SoftwareKeyModule</code>. */
+ private SoftwareKeyModule keyModule;
+
+ /**
+ * Create a new <code>SoftwareKeyModuleConfigurationImpl</code>.
+ *
+ * @param keyModule The <code>SoftwareKeyModule</code> from the underlying MOA
+ * configuration.
+ */
+ public SoftwareKeyModuleConfigurationImpl(SoftwareKeyModule keyModule) {
+ super(keyModule.getId());
+ this.keyModule = keyModule;
+ }
+
+ /**
+ * @see iaik.server.modules.keys.SoftwareKeyModuleConfiguration#getKeyStoreTypeName()
+ */
+ public String getKeyStoreTypeName() {
+ return KEY_STORE_TYPE_NAME_PKCS12;
+ }
+
+ /**
+ * @see iaik.server.modules.keys.SoftwareKeyModuleConfiguration#getKeyStoreAsStream()
+ */
+ public InputStream getKeyStoreAsStream() {
+ MessageProvider msg = MessageProvider.getInstance();
+
+ try {
+ String message =
+ msg.getMessage("config.18", new Object[] { keyModule.getFileName()});
+ Logger.info(new LogMsg(message));
+ return new FileInputStream(keyModule.getFileName());
+ } catch (FileNotFoundException e) {
+ String message =
+ msg.getMessage("config.09", new Object[] { keyModule.getFileName()});
+
+ throw new ConfigurationException(message, e, null);
+ }
+ }
+
+ /**
+ * @see iaik.server.modules.keys.SoftwareKeyModuleConfiguration#getKeyStoreAuthenticationData()
+ */
+ public char[] getKeyStoreAuthenticationData() {
+ return keyModule.getPassWord().toCharArray();
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/ValidationConfigurationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/ValidationConfigurationImpl.java
new file mode 100644
index 000000000..44b2a04bf
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/ValidationConfigurationImpl.java
@@ -0,0 +1,71 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import java.security.cert.X509Certificate;
+import java.security.spec.AlgorithmParameterSpec;
+
+import iaik.pki.pathvalidation.ValidationConfiguration;
+
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+
+/**
+ * An implementation of the <code>ValidationConfiguration</code> interface using
+ * MOA configuration data.
+ *
+ * @see iaik.pki.pathvalidation.ValidationConfiguration
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ValidationConfigurationImpl
+ extends AbstractObservableConfiguration
+ implements ValidationConfiguration {
+
+ /** The <code>ConfigurationProvider</code> to read the configuration data
+ * from. */
+ private ConfigurationProvider config;
+
+ /**
+ * Create a new <code>ValidationConfigurationImpl</code>.
+ *
+ * @param config The underlying MOA configuration data.
+ */
+ public ValidationConfigurationImpl(ConfigurationProvider config) {
+ this.config = config;
+ }
+
+ /**
+ * @see iaik.pki.pathvalidation.ValidationConfiguration#getChainingMode(java.security.cert.X509Certificate)
+ */
+ public String getChainingMode(X509Certificate cert) {
+ return config.getChainingMode(cert);
+ }
+
+ /**
+ * @see iaik.pki.pathvalidation.ValidationConfiguration#getPublicKeyParamsAsSpec(java.security.cert.X509Certificate)
+ */
+ public AlgorithmParameterSpec getPublicKeyParamsAsSpec(X509Certificate cert) {
+ return null;
+ }
+
+ /**
+ * @see iaik.pki.pathvalidation.ValidationConfiguration#getPublicKeyParamsAsCert(java.security.cert.X509Certificate)
+ */
+ public X509Certificate getPublicKeyParamsAsCert(X509Certificate cert) {
+ return null;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/PKIProfileImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/PKIProfileImpl.java
new file mode 100644
index 000000000..9ef2b0ca9
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/PKIProfileImpl.java
@@ -0,0 +1,131 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.pki;
+
+import iaik.pki.PKIProfile;
+import iaik.pki.pathvalidation.ValidationProfile;
+import iaik.pki.revocation.RevocationProfile;
+import iaik.pki.store.truststore.TrustStoreProfile;
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.iaik.pki.pathvalidation.ValidationProfileImpl;
+import at.gv.egovernment.moa.spss.server.iaik.pki.revocation.RevocationProfileImpl;
+import at.gv.egovernment.moa.spss.server.iaik.pki.store.truststore.TrustStoreProfileImpl;
+
+/**
+ * Implementation of the <code>PKIProfile</code> interface containing
+ * information needed for certificate path validation. It uses configuration
+ * data from the MOA configuration.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class PKIProfileImpl implements PKIProfile {
+
+ /** Profile information for revocation checking. */
+ private RevocationProfile revocationProfile;
+ /** Profile information about the trust profile to use. */
+ private TrustStoreProfile trustStoreProfile;
+ /** Profile information about the certificate validation. */
+ private ValidationProfile validationProfile;
+ /** The <code>ConfigurationProvider</code> to read the MOA configuration data
+ * from. */
+ private ConfigurationProvider config;
+
+ /**
+ * Create a new <code>PKIProfileImpl</code>.
+ *
+ * @param config The MOA configuration providing configuration data about
+ * certificate path validation.
+ * @param trustProfileID The trust profile ID denoting the location of the
+ * trust store.
+ * @throws MOAApplicationException An error occurred building the profile.
+ */
+ public PKIProfileImpl(ConfigurationProvider config, String trustProfileID)
+ throws MOAApplicationException {
+
+ this.config = config;
+ setRevocationProfile(new RevocationProfileImpl(config));
+ setTrustStoreProfile(new TrustStoreProfileImpl(config, trustProfileID));
+ setValidationProfile(new ValidationProfileImpl(config));
+ }
+
+ /**
+ * @see iaik.pki.PKIProfile#autoAddCertificates()
+ */
+ public boolean autoAddCertificates()
+ {
+ return useAuthorityInfoAccess() ? true : config.getAutoAddCertificates();
+ }
+
+ /**
+ * @see iaik.pki.PKIProfile#getRevocationProfile()
+ */
+ public RevocationProfile getRevocationProfile() {
+ return revocationProfile;
+ }
+
+ /**
+ * Sets the <code>RevocationProfile</code>.
+ *
+ * @param revocationProfile The <code>RevocationProfile</code> used for
+ * revocation checking.
+ */
+ protected void setRevocationProfile(RevocationProfile revocationProfile) {
+ this.revocationProfile = revocationProfile;
+ }
+
+ /**
+ * @see iaik.pki.PKIProfile#getTrustStoreProfile()
+ */
+ public TrustStoreProfile getTrustStoreProfile() {
+ return trustStoreProfile;
+ }
+
+ /**
+ * Sets the <code>TrustStoreProfile</code>.
+ *
+ * @param trustStoreProfile The <code>TrustStoreProfile</code>.
+ */
+ protected void setTrustStoreProfile(TrustStoreProfile trustStoreProfile) {
+ this.trustStoreProfile = trustStoreProfile;
+ }
+
+ /**
+ * @see iaik.pki.PKIProfile#getValidationProfile()
+ */
+ public ValidationProfile getValidationProfile() {
+ return validationProfile;
+ }
+
+ /**
+ * Sets the <code>ValidationProfile</code>.
+ *
+ * @param validationProfile The <code>ValidationProfile</code> to set.
+ */
+ protected void setValidationProfile(ValidationProfile validationProfile) {
+ this.validationProfile = validationProfile;
+ }
+
+ /**
+ * @see iaik.pki.PKIProfile#useAuthorityInfoAccess()
+ */
+ public boolean useAuthorityInfoAccess()
+ {
+ return config.getUseAuthorityInfoAccess();
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/pathvalidation/ValidationProfileImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/pathvalidation/ValidationProfileImpl.java
new file mode 100644
index 000000000..8e3d0e92c
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/pathvalidation/ValidationProfileImpl.java
@@ -0,0 +1,122 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.pki.pathvalidation;
+
+import iaik.pki.pathvalidation.ValidationProfile;
+
+import java.util.Collections;
+import java.util.Set;
+
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+
+/**
+ * An implementation of the <code>ValidationProfile</code> interface providing
+ * information about certificat path validation.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ValidationProfileImpl implements ValidationProfile {
+
+ /** The <code>ConfigurationProvider</code> to read the configuration data
+ * from. */
+ private ConfigurationProvider config;
+ private boolean initialAnyPolicyInhibit;
+ private boolean initialExplicitPolicy;
+ private boolean initialPolicyMappingInhibit;
+ private Set initialPolicySet;
+ private boolean nameConstraintsProcessing;
+ private boolean policyProcessing;
+
+ /**
+ * Create a new <code>ValidationProfileImpl</code> object.
+ *
+ * This objects's fields are preset to the following values:
+ *
+ * <ul>
+ * <li><code>initialAnyPolicyInhibit = true</code></li>
+ * <li><code>initialExplicitPoliy = true</code></li>
+ * <li><code>initialPolicyMappingInhibit = true</code></li>
+ * <li><code>initialPolicySet = empty</code></li>
+ * <li><code>policyProcessing = false</code></li>
+ * <li><code>nameConstraintsProcessing = false</code></li>
+ * <li><code>revocationChecking = false</code></li>
+ * </ul>
+ *
+ * @param config MOA configuration data for additional configuration
+ * information (currently unused).
+ */
+ public ValidationProfileImpl(ConfigurationProvider config) {
+ this.config = config;
+ initialAnyPolicyInhibit = true;
+ initialExplicitPolicy = true;
+ initialPolicyMappingInhibit = true;
+ initialPolicySet = Collections.EMPTY_SET;
+ policyProcessing = false;
+ nameConstraintsProcessing = false;
+ }
+
+ /**
+ * @see iaik.pki.pathvalidation.ValidationProfile#getInitialAnyPolicyInhibit()
+ */
+ public boolean getInitialAnyPolicyInhibit() {
+ return initialAnyPolicyInhibit;
+ }
+
+ /**
+ * @see iaik.pki.pathvalidation.ValidationProfile#getInitialExplicitPolicy()
+ */
+ public boolean getInitialExplicitPolicy() {
+ return initialExplicitPolicy;
+ }
+
+ /**
+ * @see iaik.pki.pathvalidation.ValidationProfile#getInitialPolicyMappingInhibit()
+ */
+ public boolean getInitialPolicyMappingInhibit() {
+ return initialPolicyMappingInhibit;
+ }
+
+ /**
+ * @see iaik.pki.pathvalidation.ValidationProfile#getInitialPolicySet()
+ */
+ public Set getInitialPolicySet() {
+ return initialPolicySet;
+ }
+
+ /**
+ * @see iaik.pki.pathvalidation.ValidationProfile#getPolicyProcessing()
+ */
+ public boolean getPolicyProcessing() {
+ return policyProcessing;
+ }
+
+ /**
+ * @see iaik.pki.pathvalidation.ValidationProfile#getNameConstraintsProcessing()
+ */
+ public boolean getNameConstraintsProcessing() {
+ return nameConstraintsProcessing;
+ }
+
+ /**
+ * @see iaik.pki.pathvalidation.ValidationProfile#getRevocationChecking()
+ */
+ public boolean getRevocationChecking()
+ {
+ return config.getEnableRevocationChecking();
+ }
+
+} \ No newline at end of file
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/revocation/RevocationProfileImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/revocation/RevocationProfileImpl.java
new file mode 100644
index 000000000..36b3c86e5
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/revocation/RevocationProfileImpl.java
@@ -0,0 +1,79 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.pki.revocation;
+
+import java.security.cert.X509Certificate;
+
+import iaik.pki.revocation.RevocationProfile;
+import iaik.pki.revocation.RevocationSourceTypes;
+
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+
+/**
+ * An implementation of the <code>RevocationProfile</code> interface providing
+ * information about revocation status checking, based on MOA configuration
+ * data.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class RevocationProfileImpl implements RevocationProfile {
+ /** The default service order. */
+ private static final String[] DEFAULT_SERVICE_ORDER =
+ { RevocationSourceTypes.CRL, RevocationSourceTypes.OCSP };
+ /** The <code>ConfigurationProvider</code> to read the MOA configuration data
+ * from. */
+ private ConfigurationProvider config;
+ /** The OCSP request hash algorithm. Currently only "SHA" is supported. */
+ private static final String oCSPRequestHashAlgorithm = "SHA";
+
+ /**
+ * Create a new <code>RevocationProfileImpl</code>.
+ *
+ * @param config The MOA configuration data.
+ */
+ public RevocationProfileImpl(ConfigurationProvider config) {
+ this.config = config;
+ // currently only "SHA" is supported
+// this.oCSPRequestHashAlgorithm = "";
+ }
+
+ /**
+ * @see iaik.pki.revocation.RevocationProfile#getMaxRevocationAge(String)
+ */
+ public long getMaxRevocationAge(String distributionPointUri)
+ {
+ return config.getMaxRevocationAge();
+ }
+
+ /**
+ * @see iaik.pki.revocation.RevocationProfile#getOCSPRequestHashAlgorithm()
+ */
+ public String getOCSPRequestHashAlgorithm() {
+ return oCSPRequestHashAlgorithm;
+ }
+
+ /**
+ * @see iaik.pki.revocation.RevocationProfile#getPreferredServiceOrder(java.security.cert.X509Certificate)
+ */
+ public String[] getPreferredServiceOrder(X509Certificate cert)
+ {
+ String[] serviceOrder = config.getServiceOrder();
+ if (serviceOrder == null || serviceOrder.length == 0) return DEFAULT_SERVICE_ORDER;
+ return serviceOrder;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/store/truststore/TrustStoreProfileImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/store/truststore/TrustStoreProfileImpl.java
new file mode 100644
index 000000000..c0b626c77
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/store/truststore/TrustStoreProfileImpl.java
@@ -0,0 +1,150 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.pki.store.truststore;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import iaik.pki.store.truststore.TrustStoreProfile;
+import iaik.pki.store.truststore.TrustStoreTypes;
+import iaik.pki.store.observer.NotificationData;
+import iaik.pki.store.observer.Observer;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.config.TrustProfile;
+
+/**
+ * An implementation of the <code>TrustStoreProfile</code> interface, using data
+ * from the MOA configuration.
+ *
+ * @see iaik.pki.store.truststore.TrustStoreProfile
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class TrustStoreProfileImpl implements TrustStoreProfile {
+
+ /** The observers of this profile. */
+ private List observers = new ArrayList();
+
+ /**
+ * The trust profile identifier.
+ */
+ private String id_;
+
+ /** The type of the trust profile. */
+ private String type;
+ /** The URI of the trust profile.*/
+ private String URI;
+
+ /**
+ * Create a new <code>TrustStoreProfileImpl</code>.
+ *
+ * @param config The MOA configuration data, from which trust store
+ * configuration data is read.
+ * @param trustProfileId The trust profile id on which this
+ * <code>TrustStoreProfile</code> is based.
+ * @throws MOAApplicationException The <code>trustProfileId</code> could not
+ * be found in the MOA configuration.
+ */
+ public TrustStoreProfileImpl(
+ ConfigurationProvider config,
+ String trustProfileId)
+ throws MOAApplicationException {
+
+ TrustProfile tp = (TrustProfile) config.getTrustProfile(trustProfileId);
+ if (tp != null)
+ {
+ id_ = trustProfileId;
+ setURI(tp.getUri());
+ setType(TrustStoreTypes.DIRECTORY);
+ }
+ else
+ {
+ throw new MOAApplicationException("2203", new Object[] { trustProfileId });
+ }
+ }
+
+ /**
+ * @see iaik.pki.store.truststore.TrustStoreProfile#getType()
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * Sets the the trust store type.
+ *
+ * @param type The trust store type to set.
+ */
+ protected void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ * @see iaik.pki.store.truststore.TrustStoreProfile#getURI()
+ */
+ public String getURI() {
+ return URI;
+ }
+
+ /**
+ * Sets the trust store URI.
+ *
+ * @param URI The trust store URI to set.
+ */
+ protected void setURI(String URI) {
+ this.URI = URI;
+ }
+
+ //
+ // Methods of iaik.pki.store.observer.Observable interface
+ //
+
+ /**
+ * @see iaik.pki.store.observer.Observable#addObserver(iaik.pki.store.observer.Observer)
+ */
+ public void addObserver(Observer observer) {
+ observers.add(observer);
+ }
+
+ /**
+ * @see iaik.pki.store.observer.Observable#removeObserver(iaik.pki.store.observer.Observer)
+ */
+ public boolean removeObserver(Observer observer) {
+ return observers.remove(observer);
+ }
+
+ /**
+ * @see iaik.pki.store.observer.Observable#notify(iaik.pki.store.observer.NotificationData)
+ */
+ public void notify(NotificationData notificationData) {
+ for (Iterator iter = observers.iterator(); iter.hasNext();) {
+ Observer observer = (Observer) iter.next();
+ observer.notify(notificationData);
+ }
+ }
+
+ /**
+ * @see iaik.pki.store.truststore.TrustStoreProfile#getId()
+ */
+ public String getId()
+ {
+ return id_;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/Base64TransformationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/Base64TransformationImpl.java
new file mode 100644
index 000000000..2b03c069f
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/Base64TransformationImpl.java
@@ -0,0 +1,58 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import iaik.server.modules.xml.Base64Transformation;
+
+/**
+ * An implementation of the <code>Base64Transformation</code>
+ * <code>Transformation</code> type.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class Base64TransformationImpl
+ extends TransformationImpl
+ implements Base64Transformation {
+
+ /**
+ * Create a new <code>Base64TransformationImpl</code>.
+ *
+ * @see java.lang.Object#Object()
+ */
+ public Base64TransformationImpl() {
+ setAlgorithmURI(Base64Transformation.BASE64_DECODING);
+ }
+
+ /**
+ * Compare this <code>Base64Transformation</code> to another.
+ *
+ * @param other The object to compare this<code>Base64Transformation</code>
+ * to.
+ * @return <code>true</code>, if <code>other</code> is a
+ * <code>Base64Transformation</code> and the algorithm URIs match, otherwise
+ * <code>false</code>.
+ * @see java.lang.Object#equals(Object)
+ */
+ public boolean equals(Object other) {
+ if (other instanceof Base64Transformation) {
+ Base64Transformation transform = (Base64Transformation) other;
+ return getAlgorithmURI().equals(transform.getAlgorithmURI());
+ }
+ return false;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/ByteArrayDataObjectImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/ByteArrayDataObjectImpl.java
new file mode 100644
index 000000000..664f53678
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/ByteArrayDataObjectImpl.java
@@ -0,0 +1,69 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+
+import iaik.server.modules.xml.BinaryDataObject;
+
+/**
+ * A <code>BinaryDataObject</code> encapsulating Base64 data.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ByteArrayDataObjectImpl
+ extends DataObjectImpl
+ implements BinaryDataObject {
+
+ /** The binary data contained in this <code>BinaryDataObject</code>. */
+ private byte[] bytes;
+
+ /**
+ * Create a new <code>ByteArrayDataObjectImpl</code>.
+ *
+ * @param bytes The binary data contained in this
+ * <code>BinaryDataObject</code>.
+ */
+ public ByteArrayDataObjectImpl(byte[] bytes) {
+ setBytes(bytes);
+ }
+
+ /**
+ * Set the Base64 data.
+ *
+ * @param bytes The binary data contained in this
+ * <code>BinaryDataObject</code>.
+ */
+ public void setBytes(byte[] bytes) {
+ this.bytes = bytes;
+ }
+
+ /**
+ * Return the binary data encoded in the Base64 <code>String</code> as a
+ * stream.
+ *
+ * @return The binary data contained in this object, as a
+ * <code>InputStream</code>. Repeated calls to this function will return a
+ * new stream to the Base64 data.
+ * @see iaik.server.modules.xml.BinaryDataObject#getInputStream()
+ */
+ public InputStream getInputStream() {
+ return new ByteArrayInputStream(bytes);
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/ByteStreamDataObjectImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/ByteStreamDataObjectImpl.java
new file mode 100644
index 000000000..612c0dbee
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/ByteStreamDataObjectImpl.java
@@ -0,0 +1,64 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import java.io.InputStream;
+
+import iaik.server.modules.xml.BinaryDataObject;
+
+/**
+ * A <code>BinaryDataObject</code> encapsulating binary data from a stream.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ByteStreamDataObjectImpl
+ extends DataObjectImpl
+ implements BinaryDataObject {
+
+ /** The <code>InputStream</code> containing the binary data. */
+ private InputStream inputStream;
+
+ /**
+ * Create a new <code>ByteStreamDataObjectImpl</code>.
+ *
+ * @param inputStream The stream from which to read the binary data.
+ */
+ public ByteStreamDataObjectImpl(InputStream inputStream) {
+ setInputStream(inputStream);
+ }
+
+ /**
+ * Set the input stream from which to read the binary data.
+ *
+ * @param inputStream The input stream from which to read the binary data.
+ */
+ public void setInputStream(InputStream inputStream) {
+ this.inputStream = inputStream;
+ }
+
+ /**
+ * Return the binary data from this object as a stream.
+ *
+ * @return The stream containing the binary data. Calling this function
+ * repeatedly will always return the same <code>InputStream</code>.
+ * @see iaik.server.modules.xml.BinaryDataObject#getInputStream()
+ */
+ public InputStream getInputStream() {
+ return inputStream;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/CanonicalizationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/CanonicalizationImpl.java
new file mode 100644
index 000000000..eb116c5e7
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/CanonicalizationImpl.java
@@ -0,0 +1,58 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import iaik.server.modules.xml.Canonicalization;
+
+/**
+ * An implementation of the <code>CanonicalizationTransform</code>
+ * <code>Transformation</code> type.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CanonicalizationImpl
+ extends TransformationImpl
+ implements Canonicalization {
+
+ /**
+ * Create a new <code>CanonicalizationTransformImpl</code> object.
+ *
+ * @param algorithmURI The canonicalization algorithm URI.
+ */
+ public CanonicalizationImpl(String algorithmURI) {
+ setAlgorithmURI(algorithmURI);
+ }
+
+ /**
+ * Compare this object to another <code>Canonicalization</code>.
+ *
+ * @param other The object to compare this
+ * <code>Canonicalization</code> to.
+ * @return <code>true</code>, if <code>other</code> is a
+ * <code>Canonicalization</code> and the algorithm URIs match, otherwise
+ * <code>false</code>.
+ * @see java.lang.Object#equals(Object)
+ */
+ public boolean equals(Object other) {
+ if (other instanceof Canonicalization) {
+ Canonicalization c14n = (Canonicalization) other;
+ return getAlgorithmURI().equals(c14n.getAlgorithmURI());
+ }
+ return false;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/DataObjectImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/DataObjectImpl.java
new file mode 100644
index 000000000..7ef9de75f
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/DataObjectImpl.java
@@ -0,0 +1,102 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import iaik.server.modules.xml.DataObject;
+
+/**
+ * Abstract base implementation for the classes derived from
+ * <code>DataObject</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public abstract class DataObjectImpl implements DataObject {
+
+ /** The MIME type of the data object. */
+ private String mimeType;
+ /** The refernce ID. */
+ private String referenceID;
+ /** The URI of the type. */
+ private String typeURI;
+ /** The URI identifying the data. */
+ private String URI;
+
+ /**
+ * @see iaik.server.modules.xml.DataObject#getMimeType()
+ */
+ public String getMimeType() {
+ return mimeType;
+ }
+
+ /**
+ * Set the mime type.
+ *
+ * @param mimeType The mime type to set.
+ */
+ public void setMimeType(String mimeType) {
+ this.mimeType = mimeType;
+ }
+
+ /**
+ * @see iaik.server.modules.xml.DataObject#getReferenceID()
+ */
+ public String getReferenceID() {
+ return referenceID;
+ }
+
+ /**
+ * Set the reference ID.
+ *
+ * @param referenceID The reference ID.
+ */
+ public void setReferenceID(String referenceID) {
+ this.referenceID = referenceID;
+ }
+
+ /**
+ * @see iaik.server.modules.xml.DataObject#getTypeURI()
+ */
+ public String getTypeURI() {
+ return typeURI;
+ }
+
+ /**
+ * Set the type URI.
+ *
+ * @param typeURI The type URI.
+ */
+ public void setTypeURI(String typeURI) {
+ this.typeURI = typeURI;
+ }
+
+ /**
+ * @see iaik.server.modules.xml.DataObject#getURI()
+ */
+ public String getURI() {
+ return URI;
+ }
+
+ /**
+ * Set the URI.
+ *
+ * @param URI The URI.
+ */
+ public void setURI(String URI) {
+ this.URI = URI;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/EnvelopedSignatureTransformationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/EnvelopedSignatureTransformationImpl.java
new file mode 100644
index 000000000..a087cc91e
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/EnvelopedSignatureTransformationImpl.java
@@ -0,0 +1,57 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import iaik.server.modules.xml.EnvelopedSignatureTransformation;
+
+/**
+ * An implementation of the <code>EnvelopedSignatureTransformation</code>
+ * <code>Transformation</code> type.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class EnvelopedSignatureTransformationImpl
+ extends TransformationImpl
+ implements EnvelopedSignatureTransformation {
+
+ /**
+ * Create a new <code>EnvelopedSignatureTransformationImpl</code>.
+ */
+ public EnvelopedSignatureTransformationImpl() {
+ setAlgorithmURI(EnvelopedSignatureTransformation.ENVELOPED_SIGNATURE);
+ }
+
+ /**
+ * Compare this object to another <code>EnvelopedSignatureTransformation</code>.
+ *
+ * @param other The object to compare this
+ * <code>EnvelopedSignatureTransformation</code> to.
+ * @return <code>true</code>, if <code>other</code> is a
+ * <code>EnvelopedSignatureTransformation</code>, otherwise
+ * <code>false</code>.
+ * @see java.lang.Object#equals(Object)
+ */
+ public boolean equals(Object other) {
+ if (other instanceof EnvelopedSignatureTransformation) {
+ EnvelopedSignatureTransformation transform =
+ (EnvelopedSignatureTransformation) other;
+ return getAlgorithmURI().equals(transform.getAlgorithmURI());
+ }
+ return false;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/ExclusiveCanonicalizationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/ExclusiveCanonicalizationImpl.java
new file mode 100644
index 000000000..6321001ea
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/ExclusiveCanonicalizationImpl.java
@@ -0,0 +1,91 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import java.util.List;
+
+import iaik.server.modules.xml.ExclusiveCanonicalization;
+
+/**
+ * An implementation of the <code>ExclusiveCanonicalization</code> type
+ * of <code>Transformation</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ExclusiveCanonicalizationImpl
+ extends TransformationImpl
+ implements ExclusiveCanonicalization {
+
+ /** The prefixes of the namespaces to treat according to canonical XML. */
+ private List inclusiveNamespacePrefixes;
+
+ /**
+ * Create a new <code>ExclusiveCanonicalizationImpl</code> object.
+ *
+ * @param algorithmURI The exclusive canonicalization algorithm URI.
+ * @param inclusiveNamespacePrefixes The namespace prefixes to be processed
+ * according to canonical XML.
+ */
+ public ExclusiveCanonicalizationImpl(
+ String algorithmURI,
+ List inclusiveNamespacePrefixes) {
+ setAlgorithmURI(algorithmURI);
+ setInclusiveNamespacePrefixes(inclusiveNamespacePrefixes);
+ }
+
+ /**
+ * Sets the namespace prefixes to be processed according to canonical XML.
+ *
+ * @param inclusiveNamespacePrefixes The prefixes of the namespaces to treat
+ * according to canonical XML.
+ */
+ protected void setInclusiveNamespacePrefixes(List inclusiveNamespacePrefixes) {
+ this.inclusiveNamespacePrefixes = inclusiveNamespacePrefixes;
+ }
+
+ /**
+ * @see iaik.server.modules.xml.ExclusiveCanonicalization#getInclusiveNamespacePrefixes()
+ */
+ public List getInclusiveNamespacePrefixes() {
+ return inclusiveNamespacePrefixes;
+ }
+
+ /**
+ * Compare this object to another <code>CanonicalizationTransform</code>.
+ *
+ * @param other The object to compare this
+ * <code>ExclusiveCanonicalization</code> to.
+ * @return <code>true</code>, if <code>other</code> is a
+ * <code>ExclusiveCanonicalization</code> and the algorithm URIs match,
+ * otherwise <code>false</code>.
+ * @see java.lang.Object#equals(Object)
+ */
+ public boolean equals(Object other) {
+ if (other instanceof ExclusiveCanonicalization) {
+ ExclusiveCanonicalization eC14n =
+ (ExclusiveCanonicalization) other;
+ boolean algURIEquals = getAlgorithmURI().equals(eC14n.getAlgorithmURI());
+ boolean inclNSPrefs =
+ (getInclusiveNamespacePrefixes() == null || getInclusiveNamespacePrefixes().isEmpty())
+ ? eC14n.getInclusiveNamespacePrefixes() == null || eC14n.getInclusiveNamespacePrefixes().isEmpty()
+ : getInclusiveNamespacePrefixes().equals(eC14n.getInclusiveNamespacePrefixes());
+ return algURIEquals && inclNSPrefs;
+ }
+ return false;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/SigningTimeImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/SigningTimeImpl.java
new file mode 100644
index 000000000..3a1976159
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/SigningTimeImpl.java
@@ -0,0 +1,49 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import java.util.Date;
+
+import iaik.server.modules.xml.SigningTime;
+
+/**
+ * An implementation of the <code>SigningTime</code> <code>Property</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class SigningTimeImpl implements SigningTime {
+
+ /** The signing time. */
+ private Date signingTime;
+
+ /**
+ * Create a new <code>SigningTimeImpl</code>.
+ *
+ * @param signingTime The signing time.
+ */
+ public SigningTimeImpl(Date signingTime) {
+ this.signingTime = signingTime;
+ }
+
+ /**
+ * @see iaik.server.modules.xml.SigningTime#getSigningTime()
+ */
+ public Date getSigningTime() {
+ return signingTime;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/TransformationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/TransformationImpl.java
new file mode 100644
index 000000000..5a718e018
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/TransformationImpl.java
@@ -0,0 +1,58 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import iaik.server.modules.xml.Transformation;
+
+/**
+ * Base implementation class for <code>Transformation</code> derived classes.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public abstract class TransformationImpl implements Transformation {
+
+ /** The algorithm URI identifying the transformation algorithm. */
+ private String algorithmURI;
+
+ /**
+ * @see iaik.server.modules.xml.Transformation#getAlgorithmURI()
+ */
+ public String getAlgorithmURI() {
+ return algorithmURI;
+ }
+
+ /**
+ * Sets the algorithm URI.
+ *
+ * @param algorithmURI The algorithm URI to set.
+ */
+ protected void setAlgorithmURI(String algorithmURI) {
+ this.algorithmURI = algorithmURI;
+ }
+
+ /**
+ * Returns the hash code of the algorithm URI. Should be overridden if a
+ * transformation distinguishes itself from others by more than just the
+ * algorithm URI.
+ *
+ * @see java.lang.Object#hashCode()
+ */
+ public int hashCode() {
+ return getAlgorithmURI().hashCode();
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XMLDataObjectImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XMLDataObjectImpl.java
new file mode 100644
index 000000000..7de63d221
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XMLDataObjectImpl.java
@@ -0,0 +1,61 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import org.w3c.dom.Element;
+
+import iaik.server.modules.xml.XMLDataObject;
+
+/**
+ * A <code>DataObject</code> containing a single DOM element.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XMLDataObjectImpl
+ extends DataObjectImpl
+ implements XMLDataObject {
+
+ /** The XML data contained in this <code>XMLDataObject</code>. */
+ private Element element;
+
+ /**
+ * Create a new <code>XMLDataObjectImpl</code>.
+ *
+ * @param element The DOM element contained in this
+ * <code>XMLDataObject</code>.
+ */
+ public XMLDataObjectImpl(Element element) {
+ setElement(element);
+ }
+
+ /**
+ * @see iaik.server.modules.xml.XMLDataObject#getElement()
+ */
+ public Element getElement() {
+ return element;
+ }
+
+ /**
+ * Set the DOM element contained in this <code>XMLDataObject</code>.
+ *
+ * @param element The DOM element to set.
+ */
+ public void setElement(Element element) {
+ this.element = element;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XMLNodeListDataObjectImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XMLNodeListDataObjectImpl.java
new file mode 100644
index 000000000..51a490973
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XMLNodeListDataObjectImpl.java
@@ -0,0 +1,62 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import org.w3c.dom.NodeList;
+
+import iaik.server.modules.xml.XMLNodeListDataObject;
+
+/**
+ * A <code>DataObject</code> containing a list of DOM nodes.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XMLNodeListDataObjectImpl
+ extends DataObjectImpl
+ implements XMLNodeListDataObject {
+
+ /** The nodes contained in this <code>XMLNodeListDataObject</code>. */
+ private NodeList nodeList;
+
+ /**
+ * Create a new <code>XMLNodeListDataObjectImpl</code>.
+ *
+ * @param nodeList The list of DOM nodes contained in this
+ * <code>XMLNodeListDataObject</code>.
+ */
+ public XMLNodeListDataObjectImpl(NodeList nodeList) {
+ setNodeList(nodeList);
+ }
+
+ /**
+ * Set the list of DOM nodes contained in this
+ * <code>XMLNodeListDataObject</code>.
+ *
+ * @param nodeList The list of DOM nodes to set.
+ */
+ public void setNodeList(NodeList nodeList) {
+ this.nodeList = nodeList;
+ }
+
+ /**
+ * @see iaik.server.modules.xml.XMLNodeListDataObject#getNodeList()
+ */
+ public NodeList getNodeList() {
+ return nodeList;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XMLSignatureImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XMLSignatureImpl.java
new file mode 100644
index 000000000..1c0287fdd
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XMLSignatureImpl.java
@@ -0,0 +1,58 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import org.w3c.dom.Element;
+
+import iaik.server.modules.xml.XMLSignature;
+
+/**
+ * An object containing an XMLDsig signature in the form of a
+ * <code>dsig:Signature</code> DOM element.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XMLSignatureImpl implements XMLSignature {
+ /** The signature DOM element. */
+ private Element element;
+
+ /**
+ * Create a new <code>XMLSignatureImpl</code>.
+ *
+ * @param element The <code>dsig:Signature</code> DOM element.
+ */
+ public XMLSignatureImpl(Element element) {
+ setElement(element);
+ }
+
+ /**
+ * Set the <code>dsig:Signature</code> DOM element.
+ *
+ * @param element The <code>dsig:Signature</code> element to set.
+ */
+ public void setElement(Element element) {
+ this.element = element;
+ }
+
+ /**
+ * @see iaik.server.modules.xml.XMLSignature#getElement()
+ */
+ public Element getElement() {
+ return element;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XPath2FilterImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XPath2FilterImpl.java
new file mode 100644
index 000000000..da3d9bfe9
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XPath2FilterImpl.java
@@ -0,0 +1,131 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import java.util.Map;
+
+import iaik.server.modules.xml.XPath2Transformation;
+import iaik.server.modules.xml.XPath2Transformation.XPath2Filter;
+
+/**
+ * An object encapsulating an XPath-Filter2 expression.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XPath2FilterImpl implements XPath2Filter {
+
+ /** The type of this filter. */
+ private String filterType;
+ /** The XPath expression of this filter. */
+ private String xPathExpression;
+ /** The namespace prefix to URI mapping to use for evaluating the XPath. */
+ private Map namespaceDeclarations;
+
+ /**
+ * Create a new <code>XPath2FilterImpl</code> object.
+ *
+ * @param filterType The type of filter. Must be one of the filter type
+ * constants declared in <code>iaik.server.modules.xml.XPath2Transformation.XPath2Filter</code>
+ * @param xPathExpression The XPath expression belonging to this filter.
+ * @param namespaceDeclarations The namespace declarations visible for this
+ * XPath2Filter.
+ */
+ public XPath2FilterImpl(
+ String filterType,
+ String xPathExpression,
+ Map namespaceDeclarations) {
+
+ setFilterType(filterType);
+ setXPathExpression(xPathExpression);
+ setNamespaceDeclarations(namespaceDeclarations);
+ }
+
+ /**
+ * @see iaik.server.modules.xml.XPath2Transformation.XPath2Filter#getFilterType()
+ */
+ public String getFilterType() {
+ return filterType;
+ }
+
+ /**
+ * Set the filter type.
+ *
+ * @param filterType The filter type to set.
+ */
+ protected void setFilterType(String filterType) {
+ this.filterType = filterType;
+ }
+
+ /**
+ * @see iaik.server.modules.xml.XPath2Transformation.XPath2Filter#getXPathExpression()
+ */
+ public String getXPathExpression() {
+ return xPathExpression;
+ }
+
+ /**
+ * Set the XPath expression.
+ *
+ * @param xPathExpression The XPath expression to set.
+ */
+ protected void setXPathExpression(String xPathExpression) {
+ this.xPathExpression = xPathExpression;
+ }
+
+ /**
+ * @see iaik.server.modules.xml.XPath2Transformation.XPath2Filter#getNamespaceDeclarations()
+ */
+ public Map getNamespaceDeclarations() {
+ return namespaceDeclarations;
+ }
+
+ /**
+ * Set the namespace declarations.
+ *
+ * @param namespaceDeclarations The mapping between namespace prefixes and
+ * their associated URI.
+ */
+ protected void setNamespaceDeclarations(Map namespaceDeclarations) {
+ this.namespaceDeclarations = namespaceDeclarations;
+ }
+
+ /**
+ * Compare this object to another.
+ *
+ * @param other The object to compare this <code>XPath2Filter</code> to.
+ * @return <code>true</code>, if <code>other</code> is a
+ * <code>XPath2Filter</code> and the filter types match and the XPath
+ * expressions match. Otherwise <code>false</code> is returned.
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ public boolean equals(Object other) {
+ if (other instanceof XPath2Transformation.XPath2Filter) {
+ XPath2Filter filter = (XPath2Transformation.XPath2Filter) other;
+ return getFilterType().equals(filter.getFilterType())
+ && getXPathExpression().equals(filter.getXPathExpression());
+ }
+ return false;
+ }
+
+ /**
+ * @see java.lang.Object#hashCode()
+ */
+ public int hashCode() {
+ return getXPathExpression().hashCode() * 31 + getFilterType().hashCode();
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XPath2TransformationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XPath2TransformationImpl.java
new file mode 100644
index 000000000..cbf7ff26e
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XPath2TransformationImpl.java
@@ -0,0 +1,97 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import iaik.server.modules.xml.XPath2Transformation;
+
+/**
+ * An object encapsulating a <code>Transformation</code> containing several
+ * XPath-Filter2 expressions.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XPath2TransformationImpl
+ extends TransformationImpl
+ implements XPath2Transformation {
+
+ /** The filters contained in this <code>XPath2Transformation</code> */
+ private List xPathFilters = new ArrayList();
+
+ /**
+ * Create a new <code>XPath2TransformationImpl</code>.
+ *
+ * The list of XPath-Filter2 expression is initially empty.
+ */
+ public XPath2TransformationImpl() {
+ setAlgorithmURI(XPath2Transformation.XPATH2);
+ }
+
+ /**
+ * @see iaik.server.modules.xml.XPath2Transformation#getXPathFilters()
+ */
+ public List getXPathFilters() {
+ return xPathFilters;
+ }
+
+ /**
+ * Add an XPath-Filter2 expression to the list of filters.
+ *
+ * @param filter The filter to add.
+ */
+ public void addXPathFilter(XPath2Filter filter) {
+ xPathFilters.add(filter);
+ }
+
+ /**
+ * Compare this <code>XPath2Transformation</code> to another.
+ *
+ * @param other The object to compare this
+ * <code>XPath2Transformation</code> to.
+ * @return <code>true</code>, if <code>other</code> is an
+ * <code>XPath2Transformation</code> and <code>getXPathFilters()</code> equals
+ * <code>other.getXPathFilters()</code>. Otherwise <code>false</code> is
+ * returned.
+ * @see java.lang.Object#equals(Object)
+ */
+ public boolean equals(Object other) {
+ if (other instanceof XPath2Transformation) {
+ XPath2Transformation transform = (XPath2Transformation) other;
+
+ return getXPathFilters().equals(transform.getXPathFilters());
+ }
+ return false;
+ }
+
+ /**
+ * @see java.lang.Object#hashCode()
+ */
+ public int hashCode() {
+ Iterator iter = getXPathFilters().iterator();
+ int hashCode = 0;
+
+ while (iter.hasNext()) {
+ hashCode ^= iter.next().hashCode();
+ }
+
+ return hashCode;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XPathTransformationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XPathTransformationImpl.java
new file mode 100644
index 000000000..0d8dc2288
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XPathTransformationImpl.java
@@ -0,0 +1,113 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import java.util.Map;
+
+import iaik.server.modules.xml.XPathTransformation;
+
+/**
+ * A <code>Transformation</code> containing an XPath expression.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XPathTransformationImpl
+ extends TransformationImpl
+ implements XPathTransformation {
+
+ /** The XPath expression. */
+ private String xPathExpression;
+ /** The namespace prefix to URI mapping to use for XPath evaluation. */
+ private Map namespaceDeclarations;
+
+ /**
+ * Create a new <code>XPathTransformationImpl</code>.
+ *
+ * The namespace declarations are initialized empty.
+ *
+ * @param xPathExpression The XPath expression this object will contain.
+ * @param namespaceDeclarations The namespace declarations visible for this
+ * XPath.
+ */
+ public XPathTransformationImpl(
+ String xPathExpression,
+ Map namespaceDeclarations) {
+
+ setAlgorithmURI(XPathTransformation.XPATH);
+ setXPathExpression(xPathExpression);
+ setNamespaceDeclarations(namespaceDeclarations);
+ }
+
+ /**
+ * Set the XPath expression.
+ *
+ * @param xPathExpression The XPath expression.
+ */
+ protected void setXPathExpression(String xPathExpression) {
+ this.xPathExpression = xPathExpression;
+ }
+
+ /**
+ * @see iaik.server.modules.xml.XPathTransformation#getXPathExpression()
+ */
+ public String getXPathExpression() {
+ return xPathExpression;
+ }
+
+ /**
+ * @see iaik.server.modules.xml.XPathTransformation#getNamespaceDeclarations()
+ */
+ public Map getNamespaceDeclarations() {
+ return namespaceDeclarations;
+ }
+
+ /**
+ * Set the namespace declarations.
+ *
+ * @param namespaceDeclarations The mapping between namespace prefixes and
+ * their associated URI.
+ */
+ protected void setNamespaceDeclarations(Map namespaceDeclarations) {
+ this.namespaceDeclarations = namespaceDeclarations;
+ }
+
+ /**
+ * Compare this <code>XPathTransformation</code> to another.
+ *
+ * @param other The object to compare this
+ * <code>XPathTransformation</code> to.
+ * @return <code>true</code>, if <code>other</code> is an
+ * <code>XPathTransformation</code> and if this object contains the same XPath
+ * expression as <code>other</code>. Otherwise <code>false</code> is returned.
+ * @see java.lang.Object#equals(Object)
+ */
+ public boolean equals(Object other) {
+ if (other instanceof XPathTransformation) {
+ XPathTransformation transform = (XPathTransformation) other;
+ return getXPathExpression().equals(transform.getXPathExpression());
+ }
+ return false;
+ }
+
+ /**
+ * @see java.lang.Object#hashCode()
+ */
+ public int hashCode() {
+ return getXPathExpression().hashCode();
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XSLTTransformationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XSLTTransformationImpl.java
new file mode 100644
index 000000000..010578d82
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XSLTTransformationImpl.java
@@ -0,0 +1,183 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Collections;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+import iaik.ixsil.algorithms.CanonicalizationAlgorithm;
+import iaik.ixsil.algorithms.CanonicalizationAlgorithmImplExclusiveCanonicalXML;
+import iaik.ixsil.exceptions.AlgorithmException;
+import iaik.server.modules.xml.XSLTTransformation;
+
+import at.gv.egovernment.moa.util.NodeListAdapter;
+import at.gv.egovernment.moa.util.StreamUtils;
+import at.gv.egovernment.moa.util.XPathException;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+
+/**
+ * A <code>Transformation</code> containing an XSLT transformation.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XSLTTransformationImpl
+ extends TransformationImpl
+ implements XSLTTransformation {
+
+ /** The XSLT stylesheet. */
+ private Element styleSheetElement;
+ /** The hash code of the canonicalized stylesheet. If calculated, this value
+ * should be != 0. */
+ private int hashCode;
+
+ /**
+ * Create a new <code>XSLTTransformationImpl</code> object.
+ *
+ * @param styleSheetElement The XSLT stylesheet element.
+ */
+ public XSLTTransformationImpl(Element styleSheetElement) {
+ setAlgorithmURI(XSLTTransformation.XSLT);
+ setStyleSheetElement(styleSheetElement);
+ }
+
+ /**
+ * Set the XSLT stylesheet element.
+ *
+ * @param styleSheetElement The XSLT stylesheet element to set.
+ */
+ protected void setStyleSheetElement(Element styleSheetElement) {
+ this.styleSheetElement = styleSheetElement;
+ this.hashCode = 0;
+ }
+
+ /**
+ * @see iaik.server.modules.xml.XSLTTransformation#getStylesheetElement()
+ */
+ public Element getStylesheetElement() {
+ return styleSheetElement;
+ }
+
+ /**
+ * Compare this <code>XSLTTransformation</code> to another.
+ *
+ * @param other The object to compare this
+ * <code>XSLTTransformation</code> to.
+ * @return <code>true</code>, if <code>other</code> is an
+ * <code>XSLTTransformation</code> and if the canonicalized representations of
+ * the stylesheets contained in <code>this</code> and <code>other</code>
+ * match. Otherwise, <code>false</code> is returned.
+ * @see java.lang.Object#equals(Object)
+ */
+ public boolean equals(Object other) {
+ if (other instanceof XSLTTransformation) {
+ XSLTTransformation xslt = (XSLTTransformation) other;
+
+ return compareElements(
+ getStylesheetElement(),
+ xslt.getStylesheetElement());
+ }
+ return false;
+ }
+
+ /**
+ * @see java.lang.Object#hashCode()
+ */
+ public int hashCode() {
+ if (hashCode == 0) {
+ hashCode = calculateHashCode(getStylesheetElement());
+ }
+ return hashCode;
+ }
+
+ /**
+ * Calculate the hash code for a DOM element by canonicalizing it.
+ *
+ * @param element The DOM element for which the hash code is to be calculated.
+ * @return int The hash code, or <code>0</code>, if it could not be
+ * calculated.
+ */
+ private static int calculateHashCode(Element element) {
+ try {
+ InputStream is = canonicalize(element);
+ byte[] buf = new byte[256];
+ int hashCode = 1;
+ int length;
+ int i;
+
+ while ((length = is.read(buf)) > 0) {
+ for (i = 0; i < length; i++) {
+ hashCode += buf[i] * 31 + i;
+ }
+ }
+ is.close();
+ return hashCode;
+ } catch (AlgorithmException e) {
+ return 0;
+ } catch (IOException e) {
+ return 0;
+ }
+ }
+
+ /**
+ * Compare two DOM elements by canonicalizing their contents and comparing the
+ * resulting byte stream.
+ *
+ * @param elem1 The 1st element to compare.
+ * @param elem2 The 2nd element to compare.
+ * @return boolean <code>true</code>, if the elements are considered equal
+ * after canonicalization. Otherwise <code>false</code> is returned.
+ */
+ private static boolean compareElements(Element elem1, Element elem2) {
+ try {
+ InputStream is1 = canonicalize(elem1);
+ InputStream is2 = canonicalize(elem2);
+ return StreamUtils.compareStreams(is1, is2);
+ } catch (AlgorithmException e) {
+ return false;
+ } catch (IOException e) {
+ return false;
+ }
+ }
+
+ /**
+ * Canonicalize a DOM element.
+ *
+ * @param element The element to canonicalize.
+ * @return InputStream A stream with the canonicalized data.
+ * @throws AlgorithmException An error occurred canonicalizing the element.
+ */
+ private static InputStream canonicalize(Element element)
+ throws AlgorithmException {
+ CanonicalizationAlgorithm c14n =
+ new CanonicalizationAlgorithmImplExclusiveCanonicalXML();
+ NodeList nodeList;
+
+ try {
+ nodeList = XPathUtils.selectNodeList(element, XPathUtils.ALL_NODES_XPATH);
+ } catch (XPathException e) {
+ nodeList = new NodeListAdapter(Collections.EMPTY_LIST);
+ }
+ c14n.setInput(nodeList);
+ return c14n.canonicalize();
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlsign/DataObjectTreatmentImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlsign/DataObjectTreatmentImpl.java
new file mode 100644
index 000000000..6c069ca18
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlsign/DataObjectTreatmentImpl.java
@@ -0,0 +1,165 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.xmlsign;
+
+import java.util.List;
+
+import iaik.server.modules.xmlsign.DataObjectTreatment;
+
+import at.gv.egovernment.moa.spss.server.util.IdGenerator;
+
+/**
+ * An object encapsulating how to treat an associated <code>DataObject</code>
+ * when creating a signature.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class DataObjectTreatmentImpl implements DataObjectTreatment {
+ /** The final content MIME type. */
+ private String finalContentType;
+ /** The name of the hash algorithm. */
+ private String hashAlgorithmName;
+ /** This transformations to apply to the associated data object. */
+ private List transformationList;
+ /** Supplemental information for the transformations. */
+ private List transformationSupplements;
+ /** Whether to include the associated data object in the signature. */
+ private boolean includedInSignature;
+ /** Whether to include the associated data object in the manifest. */
+ private boolean referenceInManifest;
+ /** The object ID generator. */
+ private IdGenerator objIdGen;
+
+ /**
+ * Create a new <code>DataObjectTreatmentImpl</code>.
+ *
+ * @param objIdGen The <code>IdGenerator</code> for unique object IDs.
+ */
+ public DataObjectTreatmentImpl(IdGenerator objIdGen) {
+ this.objIdGen = objIdGen;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.DataObjectTreatment#getFinalContentType()
+ */
+ public String getFinalContentType() {
+ return finalContentType;
+ }
+
+ /**
+ * Sets the final content type.
+ *
+ * @param finalContentType The final content type to set (a MIME-type type of
+ * <code>String</code>).
+ */
+ public void setFinalContentType(String finalContentType) {
+ this.finalContentType = finalContentType;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.DataObjectTreatment#getHashAlgorithmName()
+ */
+ public String getHashAlgorithmName() {
+ return hashAlgorithmName;
+ }
+
+ /**
+ * Sets the hash algorithm name.
+ *
+ * @param hashAlgorithmName The hash algorithm name to set.
+ */
+ public void setHashAlgorithmName(String hashAlgorithmName) {
+ this.hashAlgorithmName = hashAlgorithmName;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.DataObjectTreatment#isIncludedInSignature()
+ */
+ public boolean isIncludedInSignature() {
+ return includedInSignature;
+ }
+
+ /**
+ * Sets whether the associated <code>DataObject</code> is to be included in
+ * the signature.
+ *
+ * @param includedInSignature If <code>true</code>, the associated
+ * <code>DataObject</code> will be included in the signature, otherwise not.
+ */
+ public void setIncludedInSignature(boolean includedInSignature) {
+ this.includedInSignature = includedInSignature;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.DataObjectTreatment#isReferenceInManifest()
+ */
+ public boolean isReferenceInManifest() {
+ return referenceInManifest;
+ }
+
+ /**
+ * Sets whether the associated <code>DataObject</code> is
+ * to be included in the <code>dsig:Manifest</code>.
+ *
+ * @param referenceInManifest If <code>true</code>, the associated
+ * <code>DataObject</code> will be included in the manifest, otherwise not.
+ */
+ public void setReferenceInManifest(boolean referenceInManifest) {
+ this.referenceInManifest = referenceInManifest;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.DataObjectTreatment#getTransformationList()
+ */
+ public List getTransformationList() {
+ return transformationList;
+ }
+
+ /**
+ * Set the list of transformations for the associated <code>DataObject</code>.
+ *
+ * @param transformationList The transformations to set.
+ */
+ public void setTransformationList(List transformationList) {
+ this.transformationList = transformationList;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.DataObjectTreatment#getTransformationSupplements()
+ */
+ public List getTransformationSupplements() {
+ return transformationSupplements;
+ }
+
+ /**
+ * Sets the transformation supplements for the associated
+ * <code>DataObject</code>.
+ *
+ * @param transformationSupplements The transformation supplements to set.
+ */
+ public void setTransformationSupplements(List transformationSupplements) {
+ this.transformationSupplements = transformationSupplements;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.DataObjectTreatment#getDsigDataObjectID()
+ */
+ public String getDsigDataObjectID() {
+ return objIdGen.uniqueId();
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlsign/XMLSignatureCreationProfileImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlsign/XMLSignatureCreationProfileImpl.java
new file mode 100644
index 000000000..03dd42b93
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlsign/XMLSignatureCreationProfileImpl.java
@@ -0,0 +1,301 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.xmlsign;
+
+import java.util.List;
+import java.util.Set;
+
+import iaik.server.modules.algorithms.SignatureAlgorithms;
+import iaik.server.modules.keys.AlgorithmUnavailableException;
+import iaik.server.modules.keys.KeyEntryID;
+import iaik.server.modules.keys.KeyModule;
+import iaik.server.modules.keys.KeyModuleFactory;
+import iaik.server.modules.keys.UnknownKeyException;
+import iaik.server.modules.xml.Canonicalization;
+import iaik.server.modules.xmlsign.XMLSignatureCreationProfile;
+import iaik.server.modules.xmlsign.XMLSignatureInsertionLocation;
+
+import at.gv.egovernment.moa.spss.server.logging.TransactionId;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+import at.gv.egovernment.moa.spss.server.util.IdGenerator;
+
+/**
+ * An object providing auxiliary information for creating an XML signature.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XMLSignatureCreationProfileImpl
+ implements XMLSignatureCreationProfile {
+
+ /** The transformations to apply to a data object. */
+ private List dataObjectTreatmentList;
+ /** The set of keys available to the signing process. */
+ private Set keySet;
+ /** The type URI of the signature manifest. */
+ private String securityLayerManifestTypeURI;
+ /** Whether the created signature is to be Security Layer conform. */
+ private boolean securityLayerConform;
+ /** Where to insert the signature into the signature environment. */
+ private XMLSignatureInsertionLocation signatureInsertionLocation;
+ /** The signature structur type. */
+ private String signatureStructureType;
+ /** The type of <code>Canonicalization</code> to use for the signed info. */
+ private Canonicalization signedInfoCanonicalization;
+ /** Properties to be signed during signature creation. */
+ private List signedProperties;
+ /** The ID generator for signature IDs. */
+ private IdGenerator signatureIDGenerator;
+ /** The ID generator for manifst IDs. */
+ private IdGenerator manifestIDGenerator;
+ /** The ID generator for XMLDsig manifest IDs. */
+ private IdGenerator dsigManifestIDGenerator;
+ /** The ID generator for signed property IDs. */
+ private IdGenerator propertyIDGenerator;
+
+ /**
+ * Create a new <code>XMLSignatureCreationProfileImpl</code>.
+ *
+ * @param createProfileCount Provides external information about the
+ * number of calls to the signature creation module, using the same request.
+ * @param reservedIDs The set of IDs that must not be used while generating
+ * new IDs.
+ */
+ public XMLSignatureCreationProfileImpl(
+ int createProfileCount,
+ Set reservedIDs) {
+ signatureIDGenerator =
+ new IdGenerator("signature-" + createProfileCount, reservedIDs);
+ manifestIDGenerator =
+ new IdGenerator("manifest-" + createProfileCount, reservedIDs);
+ dsigManifestIDGenerator =
+ new IdGenerator("dsig-manifest-" + createProfileCount, reservedIDs);
+ propertyIDGenerator =
+ new IdGenerator("etsi-signed-" + createProfileCount, reservedIDs);
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.XMLSignatureCreationProfile#getDataObjectTreatmentList()
+ */
+ public List getDataObjectTreatmentList() {
+ return dataObjectTreatmentList;
+ }
+
+ /**
+ * Sets the list of <code>DataObjectTreatment</code>s.
+ *
+ * @param dataObjectTreatmentList The <code>DataObjectTreatment</code>s to
+ * set.
+ */
+ public void setDataObjectTreatmentList(List dataObjectTreatmentList) {
+ this.dataObjectTreatmentList = dataObjectTreatmentList;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.XMLSignatureCreationProfile#getKeySet()
+ */
+ public Set getKeySet() {
+ return keySet;
+ }
+
+ /**
+ * Set the set of <code>KeyEntryID</code>s which may be used for signature
+ * creation.
+ *
+ * @param keySet The set of <code>KeyEntryID</code>s to set.
+ */
+ public void setKeySet(Set keySet) {
+ this.keySet = keySet;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.XMLSignatureCreationProfile#getSecurityLayerManifestTypeURI()
+ */
+ public String getSecurityLayerManifestTypeURI() {
+ return securityLayerManifestTypeURI;
+ }
+
+ /**
+ * Set the SecurityLayerManifestTypeURI.
+ *
+ * @param securityLayerManifestTypeURI The SecurityLayerManifestTypeURI to
+ * set.
+ */
+ public void setSecurityLayerManifestTypeURI(String securityLayerManifestTypeURI) {
+ this.securityLayerManifestTypeURI = securityLayerManifestTypeURI;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.XMLSignatureCreationProfile#getSignatureAlgorithmName(KeyEntryID)
+ */
+ public String getSignatureAlgorithmName(KeyEntryID selectedKeyID)
+ throws AlgorithmUnavailableException {
+
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ TransactionId tid = new TransactionId(context.getTransactionID());
+ KeyModule module = KeyModuleFactory.getInstance(tid);
+ Set algorithms;
+
+ try {
+ algorithms = module.getSupportedSignatureAlgorithms(selectedKeyID);
+ } catch (UnknownKeyException e) {
+ throw new AlgorithmUnavailableException(
+ "Unknown key entry: " + selectedKeyID,
+ e,
+ null);
+ }
+
+ if (algorithms.contains(SignatureAlgorithms.MD2_WITH_RSA) // TODO retournierten Algorithmus abhängig von der Schlüssellänge machen (bei längeren Schlüsseln SHA256 statt SHA1)
+ || algorithms.contains(SignatureAlgorithms.MD5_WITH_RSA)
+ || algorithms.contains(SignatureAlgorithms.RIPEMD128_WITH_RSA)
+ || algorithms.contains(SignatureAlgorithms.RIPEMD160_WITH_RSA)
+ || algorithms.contains(SignatureAlgorithms.SHA1_WITH_RSA)
+ || algorithms.contains(SignatureAlgorithms.SHA256_WITH_RSA)) {
+
+ return SignatureAlgorithms.SHA1_WITH_RSA;
+ } else if (
+ algorithms.contains(SignatureAlgorithms.ECDSA)) {
+ return SignatureAlgorithms.ECDSA;
+ } else if (
+ algorithms.contains(SignatureAlgorithms.DSA)) {
+ return SignatureAlgorithms.DSA;
+ } else {
+ throw new AlgorithmUnavailableException(
+ "No algorithm for key entry: " + selectedKeyID,
+ null,
+ null);
+ }
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.XMLSignatureCreationProfile#getSignatureInsertionLocation()
+ */
+ public XMLSignatureInsertionLocation getSignatureInsertionLocation() {
+ return signatureInsertionLocation;
+ }
+
+ /**
+ * Set the location where the signature is to be inserted into the signature
+ * parent.
+ *
+ * @param signatureInsertionLocation The location to set.
+ */
+ public void setSignatureInsertionLocation(XMLSignatureInsertionLocation signatureInsertionLocation) {
+ this.signatureInsertionLocation = signatureInsertionLocation;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.XMLSignatureCreationProfile#getSignatureStructureType()
+ */
+ public String getSignatureStructureType() {
+ return signatureStructureType;
+ }
+
+ /**
+ * Set the signature structure type.
+ * @param signatureStructureType The signature structure type to set.
+ */
+ public void setSignatureStructureType(String signatureStructureType) {
+ this.signatureStructureType = signatureStructureType;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.XMLSignatureCreationProfile#getSignedInfoCanonicalization()
+ */
+ public Canonicalization getSignedInfoCanonicalization() {
+ return signedInfoCanonicalization;
+ }
+
+ /**
+ * Sets the canonicalization method to use for the SignedInfo object.
+ *
+ * @param signedInfoCanonicalization The canonicalization method to set.
+ */
+ public void setSignedInfoCanonicalization(Canonicalization signedInfoCanonicalization) {
+ this.signedInfoCanonicalization = signedInfoCanonicalization;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.XMLSignatureCreationProfile#getSignedProperties()
+ */
+ public List getSignedProperties() {
+ return signedProperties;
+ }
+
+ /**
+ * Set the signed properties.
+ *
+ * @param signedProperties The signed properties to set.
+ */
+ public void setSignedProperties(List signedProperties) {
+ this.signedProperties = signedProperties;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.XMLSignatureCreationProfile#isSecurityLayerConform()
+ */
+ public boolean isSecurityLayerConform() {
+ return securityLayerConform;
+ }
+
+ /**
+ * Sets the security layer conformity.
+ *
+ * @param securityLayerConform <code>true</code>, if the created signature
+ * is to be conform to the Security Layer specification.
+ */
+ public void setSecurityLayerConform(boolean securityLayerConform) {
+ this.securityLayerConform = securityLayerConform;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.XMLSignatureCreationProfile#getSignatureID()
+ */
+ public String getSignatureID() {
+ return signatureIDGenerator.uniqueId();
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.XMLSignatureCreationProfile#getSecurityLayerManifestID()
+ */
+ public String getSecurityLayerManifestID() {
+ return manifestIDGenerator.uniqueId();
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.XMLSignatureCreationProfile#getDsigManifestID()
+ */
+ public String getDsigManifestID() {
+ return dsigManifestIDGenerator.uniqueId();
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.XMLSignatureCreationProfile#getSignedPropertiesID()
+ */
+ public String getSignedPropertiesID() {
+ return propertyIDGenerator.uniqueId();
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.XMLSignatureCreationProfile#getPermitFileURIs()
+ */
+ public boolean getPermitFileURIs() {
+ return false;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlsign/XMLSignatureInsertionLocationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlsign/XMLSignatureInsertionLocationImpl.java
new file mode 100644
index 000000000..a722ec727
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlsign/XMLSignatureInsertionLocationImpl.java
@@ -0,0 +1,60 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.xmlsign;
+
+import iaik.server.modules.xmlsign.XMLSignatureInsertionLocation;
+
+/**
+ * An object giving the location of where the signature will be
+ * inserted into the parent element.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XMLSignatureInsertionLocationImpl
+ implements XMLSignatureInsertionLocation {
+
+ /** Where to put the signature into the signature parent element. */
+ private int signatureChildIndex;
+
+ /**
+ * Create a new <code>XMLSignatureInsertLocationImpl</code>.
+ *
+ * @param signatureChildIndex The position index at which to append the
+ * signature to the parent element.
+ */
+ public XMLSignatureInsertionLocationImpl(int signatureChildIndex) {
+ setSignatureChildIndex(signatureChildIndex);
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.XMLSignatureInsertionLocation#getSignatureChildIndex()
+ */
+ public int getSignatureChildIndex() {
+ return signatureChildIndex;
+ }
+
+ /**
+ * Sets the position index at which to append the signature to the parent
+ * element.
+ *
+ * @param signatureChildIndex The position index to set.
+ */
+ public void setSignatureChildIndex(int signatureChildIndex) {
+ this.signatureChildIndex = signatureChildIndex;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlverify/XMLSignatureVerificationProfileImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlverify/XMLSignatureVerificationProfileImpl.java
new file mode 100644
index 000000000..fbc38c224
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlverify/XMLSignatureVerificationProfileImpl.java
@@ -0,0 +1,163 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.iaik.xmlverify;
+
+import java.util.List;
+
+import iaik.pki.PKIProfile;
+import iaik.server.modules.xmlverify.XMLSignatureVerificationProfile;
+
+/**
+ * An object providing auxiliary information for verifying an XML signature.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XMLSignatureVerificationProfileImpl
+ implements XMLSignatureVerificationProfile {
+
+ /** Whether to check the Security Layer manifest. */
+ private boolean checkSecurityLayerManifest;
+ /** Whether to check the XMLDsig manifest. */
+ private boolean checkXMLDsigManifests;
+ /** The profile for validating the signer certificate. */
+ private PKIProfile certificateValidationProfile;
+ /** Supplements for the transformations. */
+ private List transformationSupplements;
+ /** Whether to include hash input data in the response. */
+ private boolean includeHashInputData;
+ /** Whether to include reference input data in the response. */
+ private boolean includeReferenceInputData;
+ /** Whether the file URIs are permitted */
+ private boolean permitFileURIs;
+ /**
+ * @see iaik.server.modules.xmlverify.XMLSignatureVerificationProfile#checkSecurityLayerManifest()
+ */
+ public boolean checkSecurityLayerManifest() {
+ return checkSecurityLayerManifest;
+ }
+
+ /**
+ * Set whether to check the references in the Security Layer manifest.
+ *
+ * @param checkSecurityLayerManifest <code>true</code>, if the references
+ * in the Security Layer manifest must be checked.
+ */
+ public void setCheckSecurityLayerManifest(boolean checkSecurityLayerManifest) {
+ this.checkSecurityLayerManifest = checkSecurityLayerManifest;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlverify.XMLSignatureVerificationProfile#checkXMLDsigManifests()
+ */
+ public boolean checkXMLDsigManifests() {
+ return checkXMLDsigManifests;
+ }
+
+ /**
+ * Sets whether to check the references of all XML Dsig manifests.
+ *
+ * @param checkXMLDSigManifests <code>true</code>, if the references in the
+ * XML Dsig manifest must be checked.
+ */
+ public void setCheckXMLDsigManifests(boolean checkXMLDSigManifests) {
+ this.checkXMLDsigManifests = checkXMLDSigManifests;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlverify.XMLSignatureVerificationProfile#getCertificateValidationProfile()
+ */
+ public PKIProfile getCertificateValidationProfile() {
+ return certificateValidationProfile;
+ }
+
+ /**
+ * Sets the profile for validating the signer certificate.
+ *
+ * @param certificateValidationProfile The certificate validation profile to
+ * set.
+ */
+ public void setCertificateValidationProfile(PKIProfile certificateValidationProfile) {
+ this.certificateValidationProfile = certificateValidationProfile;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlverify.XMLSignatureVerificationProfile#getTransformationSupplements()
+ */
+ public List getTransformationSupplements() {
+ return transformationSupplements;
+ }
+
+ /**
+ * Sets the transformation supplements.
+ *
+ * @param transformationSupplements The transformation supplements to set.
+ */
+ public void setTransformationSupplements(List transformationSupplements) {
+ this.transformationSupplements = transformationSupplements;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlverify.XMLSignatureVerificationProfile#includeHashInputData()
+ */
+ public boolean includeHashInputData() {
+ return includeHashInputData;
+ }
+
+ /**
+ * Set whether to include the hash input data in the result.
+ *
+ * @param includeHashInputData If <code>true</code>, the hash input data
+ * will be returned in the result.
+ */
+ public void setIncludeHashInputData(boolean includeHashInputData) {
+ this.includeHashInputData = includeHashInputData;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlverify.XMLSignatureVerificationProfile#includeReferenceInputData()
+ */
+ public boolean includeReferenceInputData() {
+ return includeReferenceInputData;
+ }
+
+ /**
+ * Set whether to include the reference input data in the result.
+ *
+ * @param includeReferenceInputData If <code>true</code>, the reference
+ * input data will be included in the result.
+ */
+ public void setIncludeReferenceInputData(boolean includeReferenceInputData) {
+ this.includeReferenceInputData = includeReferenceInputData;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlverify.XMLSignatureVerificationProfile#getPermitFileURIs()
+ */
+ public boolean getPermitFileURIs() {
+ return permitFileURIs;
+ }
+
+ /**
+ * Set whether the file URIs are permitted or not
+ *
+ * @param permitFileURIs whether the file URIs are permitted or not
+ */
+ public void setPermitFileURIs(boolean permitFileURIs)
+ {
+ this.permitFileURIs = permitFileURIs;
+ }
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/init/ConfiguratorImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/init/ConfiguratorImpl.java
new file mode 100644
index 000000000..15ed8ceec
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/init/ConfiguratorImpl.java
@@ -0,0 +1,57 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.init;
+
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.api.Configurator;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationException;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.iaik.config.IaikConfigurator;
+
+/**
+ * Default implementation of <code>Configurator</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ConfiguratorImpl extends Configurator {
+ /** whether the configuration has been initialized */
+ private boolean initialized = false;
+
+ public void init() throws MOAException {
+ if (!initialized) {
+ SystemInitializer.init();
+ initialized = true;
+ }
+ }
+
+ public void update() throws MOAException {
+ if (!initialized) {
+ return;
+ }
+
+ try {
+ // reconfigure the system
+ ConfigurationProvider config = ConfigurationProvider.reload();
+ new IaikConfigurator().configure(config);
+ } catch (MOAException e) {
+ throw e;
+ } catch (Throwable t) {
+ throw new ConfigurationException("", null, t);
+ }
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/init/SystemInitializer.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/init/SystemInitializer.java
new file mode 100644
index 000000000..fb5f2cb21
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/init/SystemInitializer.java
@@ -0,0 +1,121 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.init;
+
+import java.io.IOException;
+
+import iaik.ixsil.init.IXSILInit;
+
+import at.gv.egovernment.moa.logging.LogMsg;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.logging.LoggingContext;
+import at.gv.egovernment.moa.logging.LoggingContextManager;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.iaik.config.IaikConfigurator;
+import at.gv.egovernment.moa.spss.server.logging.IaikLog;
+import at.gv.egovernment.moa.spss.server.service.RevocationArchiveCleaner;
+import at.gv.egovernment.moa.spss.util.MessageProvider;
+
+/**
+ * MOA SP/SS web service initialization.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class SystemInitializer {
+ /** Interval between archive cleanups in seconds */
+ private static final long ARCHIVE_CLEANUP_INTERVAL = 60 * 60; // 1h
+ /** The MOA SP/SS logging hierarchy. */
+ private static final String LOGGING_HIERARCHY = "moa.spss.server";
+ /** Whether XML schema grammars have been initialized. */
+ private static boolean grammarsInitialized = false;
+
+ /**
+ * Initialize the MOA SP/SS webservice.
+ */
+ public static void init() {
+ MessageProvider msg = MessageProvider.getInstance();
+
+ Thread archiveCleaner;
+
+ // set up the MOA SPSS logging hierarchy
+ Logger.setHierarchy(LOGGING_HIERARCHY);
+
+ // set up a logging context for logging the startup
+ LoggingContextManager.getInstance().setLoggingContext(
+ new LoggingContext("startup"));
+
+// AxisProperties.setProperty("enableNamespacePrefixOptimization","false");
+// AxisProperties.setProperty("disablePrettyXML", "true");
+// AxisProperties.setProperty("axis.doAutoTypes", "true");
+
+ // initialize preparsed Xerces grammar pool for faster XML
+ // parsing/validating
+ try {
+ if (!grammarsInitialized) {
+ Class clazz = SystemInitializer.class;
+ // preparse XML schema
+ DOMUtils.addSchemaToPool(
+ clazz.getResourceAsStream(Constants.XML_SCHEMA_LOCATION),
+ Constants.XML_NS_URI);
+ // preparse XMLDsig Filter2 schema
+ DOMUtils.addSchemaToPool(
+ clazz.getResourceAsStream(Constants.DSIG_FILTER2_SCHEMA_LOCATION),
+ Constants.DSIG_FILTER2_NS_URI);
+ // preparse XMLDsig schema
+ DOMUtils.addSchemaToPool(
+ clazz.getResourceAsStream(Constants.DSIG_SCHEMA_LOCATION),
+ Constants.DSIG_NS_URI);
+ // preparse MOA schema
+ DOMUtils.addSchemaToPool(
+ clazz.getResourceAsStream(Constants.MOA_SCHEMA_LOCATION),
+ Constants.MOA_NS_URI);
+ grammarsInitialized = true;
+ }
+ } catch (IOException e) {
+ Logger.warn(new LogMsg(msg.getMessage("init.04", null)), e);
+ }
+
+ // initialize configuration
+ try {
+ ConfigurationProvider config = ConfigurationProvider.getInstance();
+ new IaikConfigurator().configure(config);
+ Logger.info(new LogMsg(msg.getMessage("init.01", null)));
+ } catch (MOAException e) {
+ Logger.fatal(new LogMsg(msg.getMessage("init.00", null)), e);
+ }
+
+ // set IXSIL debug output
+ IXSILInit.setPrintDebugLog(
+ Logger.isDebugEnabled(IaikLog.IAIK_LOG_HIERARCHY));
+
+ // start the archive cleanup thread
+ archiveCleaner =
+ new Thread(new RevocationArchiveCleaner(ARCHIVE_CLEANUP_INTERVAL));
+ archiveCleaner.setName("RevocationArchiveCleaner");
+ archiveCleaner.setDaemon(true);
+ archiveCleaner.setPriority(Thread.MIN_PRIORITY);
+ archiveCleaner.start();
+
+ // unset the startup logging context
+ LoggingContextManager.getInstance().setLoggingContext(null);
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationInvoker.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationInvoker.java
new file mode 100644
index 000000000..b5c1023ab
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationInvoker.java
@@ -0,0 +1,241 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+
+import iaik.IAIKException;
+import iaik.IAIKRuntimeException;
+import iaik.server.modules.cmsverify.CMSSignatureVerificationModule;
+import iaik.server.modules.cmsverify.CMSSignatureVerificationModuleFactory;
+import iaik.server.modules.cmsverify.CMSSignatureVerificationProfile;
+import iaik.server.modules.cmsverify.CMSSignatureVerificationResult;
+
+import at.gv.egovernment.moa.logging.LoggingContext;
+import at.gv.egovernment.moa.logging.LoggingContextManager;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSContent;
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSContentExcplicit;
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSContentReference;
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSDataObject;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse;
+import at.gv.egovernment.moa.spss.server.config.TrustProfile;
+import at.gv.egovernment.moa.spss.server.logging.IaikLog;
+import at.gv.egovernment.moa.spss.server.logging.TransactionId;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+
+/**
+ * A class providing an interface to the
+ * <code>CMSSignatureVerificationModule</code>.
+ *
+ * This class performs the invocation of the
+ * <code>iaik.server.modules.cmsverify.CMSSignatureVerificationModule</code>
+ * from a <code>VerifyCMSSignatureRequest</code>. The result of the invocation
+ * is integrated into a <code>VerifyCMSSignatureResponse</code> returned.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CMSSignatureVerificationInvoker {
+
+ /** The single instance of this class. */
+ private static CMSSignatureVerificationInvoker instance = null;
+
+ /**
+ * Return the only instance of this class.
+ *
+ * @return The only instance of this class.
+ */
+ public static synchronized CMSSignatureVerificationInvoker getInstance() {
+ if (instance == null) {
+ instance = new CMSSignatureVerificationInvoker();
+ }
+ return instance;
+ }
+
+ /**
+ * Create a new <code>CMSSignatureVerificationInvoker</code>.
+ *
+ * Protected to disallow multiple instances.
+ */
+ protected CMSSignatureVerificationInvoker() {
+ }
+
+ /**
+ * Verify a CMS signature.
+ *
+ * @param request The <code>VerifyCMSSignatureRequest</code> containing the
+ * CMS signature, as well as additional data needed for verification.
+ * @return Element A <code>VerifyCMSSignatureResponse</code> containing the
+ * answer to the <code>VerifyCMSSignatureRequest</code>.
+ * @throws MOAException An error occurred while processing the request.
+ */
+ public VerifyCMSSignatureResponse verifyCMSSignature(VerifyCMSSignatureRequest request)
+ throws MOAException {
+ CMSSignatureVerificationProfileFactory profileFactory =
+ new CMSSignatureVerificationProfileFactory(request);
+ VerifyCMSSignatureResponseBuilder responseBuilder =
+ new VerifyCMSSignatureResponseBuilder();
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ LoggingContext loggingCtx =
+ LoggingContextManager.getInstance().getLoggingContext();
+ InputStream signature;
+ InputStream signedContent = null;
+ CMSSignatureVerificationProfile profile;
+ Date signingTime;
+ List results;
+ CMSSignatureVerificationResult result;
+ int[] signatories;
+ InputStream input;
+ byte[] buf = new byte[256];
+
+ // get the signature
+ signature = request.getCMSSignature();
+
+ // get the actual trustprofile
+ TrustProfile trustProfile = context.getConfiguration().getTrustProfile(request.getTrustProfileId());
+
+ try {
+
+ // get the signed content
+ signedContent = getSignedContent(request);
+
+ // build the profile
+ profile = profileFactory.createProfile();
+
+ // get the signing time
+ signingTime = request.getDateTime();
+
+ // verify the signature
+ CMSSignatureVerificationModule module =
+ CMSSignatureVerificationModuleFactory.getInstance();
+
+ module.setLog(new IaikLog(loggingCtx.getNodeID()));
+
+ module.init(
+ signature,
+ signedContent,
+ profile,
+ new TransactionId(context.getTransactionID()));
+ input = module.getInputStream();
+
+ while (input.read(buf) > 0);
+ results = module.verifySignature(signingTime);
+ } catch (IAIKException e) {
+ MOAException moaException = IaikExceptionMapper.getInstance().map(e);
+ throw moaException;
+ } catch (IAIKRuntimeException e) {
+ MOAException moaException = IaikExceptionMapper.getInstance().map(e);
+ throw moaException;
+ } catch (IOException e) {
+ throw new MOAApplicationException("2244", null, e);
+ } catch (MOAException e)
+ {
+ throw e;
+ }
+ finally
+ {
+ try
+ {
+ if (signedContent != null) signedContent.close();
+ }
+ catch (Throwable t)
+ {
+ // Intentionally do nothing here
+ }
+ }
+
+ // build the response: for each signatory add the result to the response
+ signatories = request.getSignatories();
+ if (signatories == VerifyCMSSignatureRequest.ALL_SIGNATORIES) {
+ Iterator resultIter;
+
+ for (resultIter = results.iterator(); resultIter.hasNext();) {
+ result = (CMSSignatureVerificationResult) resultIter.next();
+ responseBuilder.addResult(result, trustProfile);
+ }
+ } else {
+ int i;
+
+ for (i = 0; i < signatories.length; i++) {
+ int sigIndex = signatories[i] - 1;
+
+ try {
+ result =
+ (CMSSignatureVerificationResult) results.get(signatories[i] - 1);
+ responseBuilder.addResult(result, trustProfile);
+ } catch (IndexOutOfBoundsException e) {
+ throw new MOAApplicationException(
+ "2249",
+ new Object[] { new Integer(sigIndex)});
+ }
+ }
+ }
+
+ return responseBuilder.getResponse();
+ }
+
+ /**
+ * Get the signed content contained either in the request itself or given as a
+ * reference to external data.
+ *
+ * @param request The <code>VerifyCMSSignatureRequest</code> containing the
+ * signed content (or the reference to the signed content).
+ * @return InputStream A stream providing the signed content data, or
+ * <code>null</code> if no signed content was provided with the request.
+ * @throws MOAApplicationException An error occurred building the stream.
+ */
+ private InputStream getSignedContent(VerifyCMSSignatureRequest request)
+ throws MOAApplicationException {
+
+ CMSDataObject dataObj;
+ CMSContent content;
+
+ // select the Content element
+ dataObj = request.getDataObject();
+ if (dataObj == null) {
+ return null;
+ }
+ content = dataObj.getContent();
+
+ // build the content data
+ switch (content.getContentType()) {
+ case CMSContent.EXPLICIT_CONTENT :
+ return ((CMSContentExcplicit) content).getBinaryContent();
+ case CMSContent.REFERENCE_CONTENT :
+ String reference = ((CMSContentReference) content).getReference();
+ if (!"".equals(reference)) {
+ ExternalURIResolver resolver = new ExternalURIResolver();
+ return resolver.resolve(reference);
+ } else {
+ return null;
+ }
+ default :
+ return null;
+ }
+
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationProfileFactory.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationProfileFactory.java
new file mode 100644
index 000000000..6be381064
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationProfileFactory.java
@@ -0,0 +1,76 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import iaik.server.modules.cmsverify.CMSSignatureVerificationProfile;
+
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.iaik.cmsverify.CMSSignatureVerificationProfileImpl;
+import at.gv.egovernment.moa.spss.server.iaik.pki.PKIProfileImpl;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+
+/**
+ * A factory to create a <code>CMSSignatureVerificationProfile</code> from a
+ * <code>VerifyCMSSignatureRequest</code> and the current MOA configuration
+ * data.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CMSSignatureVerificationProfileFactory {
+
+ /** The <code>VerifyCMSSignatureRequest</code> to draw profile data from. */
+ private VerifyCMSSignatureRequest request;
+
+ /**
+ * Create a new <code>CMSSignatureVerificationProfileFactory</code>.
+ *
+ * @param request The <code>VerifyCMSSignatureRequest</code> to draw profile
+ * data from.
+ */
+ public CMSSignatureVerificationProfileFactory(VerifyCMSSignatureRequest request) {
+ this.request = request;
+ }
+
+ /**
+ * Create a <code>CMSSignatureVerificationProfile</code> from the given
+ * request and the current MOA configuration.
+ *
+ * @return The <code>CMSSignatureVerificationProfile</code> for the
+ * <code>request</code>, based on the current configuration.
+ * @throws MOAException An error occurred creating the profile.
+ */
+ public CMSSignatureVerificationProfile createProfile()
+ throws MOAException {
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ ConfigurationProvider config = context.getConfiguration();
+ CMSSignatureVerificationProfileImpl profile =
+ new CMSSignatureVerificationProfileImpl();
+ String trustProfileID;
+
+ // set the certificate validation profile
+ trustProfileID = request.getTrustProfileId();
+ profile.setCertificateValidationProfile(
+ new PKIProfileImpl(config, trustProfileID));
+
+ return profile;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CreateXMLSignatureResponseBuilder.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CreateXMLSignatureResponseBuilder.java
new file mode 100644
index 000000000..d1064057f
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CreateXMLSignatureResponseBuilder.java
@@ -0,0 +1,86 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse;
+import at.gv.egovernment.moa.spss.api.xmlsign.ErrorResponse;
+import at.gv.egovernment.moa.spss.api.xmlsign.SignatureEnvironmentResponse;
+
+/**
+ * A class to build a <code>CreateXMLSignatureResponse</code>.
+ *
+ * <p>The methods <code>addSignature()</code> and <code>addError()</code> may be
+ * called in any combination to add <code>SignatureEnvironment</code> and
+ * <code>ErrorResponse</code> elements to the response. One of these functions
+ * must be called at least once to produce a
+ * <code>CreateXMLSignatureResponse</code>.</p>
+ *
+ * <p>The <code>getResponseElement()</code> method then returns the
+ * <code>CreateXMLSignatureResponse</code> built so far.</p>
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CreateXMLSignatureResponseBuilder {
+
+ /** The <code>SPSSFactory</code> for creating API objects. */
+ private SPSSFactory factory = SPSSFactory.getInstance();
+ /** The elements to add to the response. */
+ private List responseElements = new ArrayList();
+
+ /**
+ * Get the <code>CreateXMLSignatureResponse</code> built so far.
+ *
+ * @return The <code>CreateXMLSignatureResponse</code> built so far.
+ */
+ public CreateXMLSignatureResponse getResponse() {
+ return factory.createCreateXMLSignatureResponse(responseElements);
+ }
+
+ /**
+ * Add a <code>SignatureEnvironment</code> element to the response.
+ *
+ * @param signatureEnvironment The content to put under the
+ * <code>SignatureEnvironment</code> element. This should either be a
+ * <code>dsig:Signature</code> element (in case of a detached signature) or
+ * the signature environment containing the signature (in case of
+ * an enveloping signature).
+ */
+ public void addSignatureEnvironment(Element signatureEnvironment) {
+ SignatureEnvironmentResponse responseElement =
+ factory.createSignatureEnvironmentResponse(signatureEnvironment);
+ responseElements.add(responseElement);
+ }
+
+ /**
+ * Add a <code>ErrorResponse</code> element to the response.
+ *
+ * @param errorCode The error code.
+ * @param info Additional information about the error.
+ */
+ public void addError(String errorCode, String info) {
+ ErrorResponse errorResponse =
+ factory.createErrorResponse(Integer.parseInt(errorCode), info);
+ responseElements.add(errorResponse);
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/DataObjectFactory.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/DataObjectFactory.java
new file mode 100644
index 000000000..f6b8b4392
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/DataObjectFactory.java
@@ -0,0 +1,1000 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import iaik.ixsil.util.URI;
+import iaik.ixsil.util.XPointerReferenceResolver;
+import iaik.server.modules.xml.DataObject;
+import iaik.server.modules.xml.XMLDataObject;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.apache.xerces.dom.CoreDocumentImpl;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.SAXException;
+
+import at.gv.egovernment.moa.logging.LogMsg;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.MOASystemException;
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.common.ContentBinary;
+import at.gv.egovernment.moa.spss.api.common.ContentLocRef;
+import at.gv.egovernment.moa.spss.api.common.ContentXML;
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation;
+import at.gv.egovernment.moa.spss.api.xmlverify.TransformParameter;
+import at.gv.egovernment.moa.spss.api.xmlverify.TransformParameterBinary;
+import at.gv.egovernment.moa.spss.server.iaik.xml.ByteArrayDataObjectImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xml.ByteStreamDataObjectImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xml.DataObjectImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xml.XMLDataObjectImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xml.XMLNodeListDataObjectImpl;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+import at.gv.egovernment.moa.spss.util.MessageProvider;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.EntityResolverChain;
+import at.gv.egovernment.moa.util.MOAEntityResolver;
+import at.gv.egovernment.moa.util.MOAErrorHandler;
+import at.gv.egovernment.moa.util.StreamEntityResolver;
+import at.gv.egovernment.moa.util.StreamUtils;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+/**
+ * A class to create <code>DataObject</code>s contained in different
+ * locations of the MOA XML request format.
+ *
+ * @author Patrick Peck
+ * @author Gregor Karlinger
+ * @version $Id$
+ */
+public class DataObjectFactory {
+
+ /**
+ * XPATH for registering ID attributes of known schemas if
+ * validating parsing fails.
+ */
+ private static final String XPATH =
+ "descendant-or-self::node()[" +
+ "namespace-uri()='http://www.w3.org/2000/09/xmldsig#' " +
+ "or namespace-uri()='http://reference.e-government.gv.at/namespace/persondata/20020228#' " +
+ "or starts-with(namespace-uri(), 'http://uri.etsi.org/01903/')" +
+ "]/attribute::Id";
+
+ /** The single instance of this class. */
+ private static DataObjectFactory instance = null;
+
+ /**
+ * Return the only instance of this class.
+ *
+ * @return The only instance of this class.
+ */
+ public static synchronized DataObjectFactory getInstance() {
+ if (instance == null) {
+ instance = new DataObjectFactory();
+ }
+ return instance;
+ }
+
+ /**
+ * Create a new <code>DataObjectFactory</code>.
+ *
+ * Protected to disallow multiple instances.
+ */
+ protected DataObjectFactory() {
+ }
+
+ /**
+ * Return the signature environment, i.e., the root element of the
+ * document, into which the signature will be inserted (if created) or which
+ * contains the signature (if verified).
+ *
+ * @param content The <code>Content</code> object containing the signature
+ * environment.
+ * @param supplements Additional schema or DTD information.
+ * @return The signature environment or <code>null</code>, if no
+ * signature environment exists.
+ * @throws MOASystemException A system error occurred building the signature
+ * environment (see message for details).
+ * @throws MOAApplicationException An error occurred building the signature
+ * environment (see message for details).
+ */
+ public XMLDataObject createSignatureEnvironment(
+ Content content,
+ List supplements)
+ throws MOASystemException, MOAApplicationException {
+
+ String reference = content.getReference();
+ EntityResolver entityResolver;
+ byte[] contentBytes;
+
+ // check for content and reference not being set at the same time
+ checkAllowContentAndReference(content, false);
+
+ // build the EntityResolver for validating parsing
+ if ((supplements == null) || supplements.isEmpty()) {
+ entityResolver = new MOAEntityResolver();
+ } else {
+ EntityResolverChain chain = new EntityResolverChain();
+
+ chain.addEntityResolver(buildSupplementEntityResolver(supplements));
+ chain.addEntityResolver(new MOAEntityResolver());
+ entityResolver = chain;
+ }
+
+ // convert the content into a byte array
+ try {
+ switch (content.getContentType()) {
+ case Content.BINARY_CONTENT :
+ {
+ InputStream is = ((ContentBinary) content).getBinaryContent();
+ contentBytes = StreamUtils.readStream(is);
+ break;
+ }
+ case Content.LOCREF_CONTENT:
+ {
+ String locRefURI = ((ContentLocRef) content).getLocationReferenceURI();
+ InputStream is = null;
+ try
+ {
+ TransactionContext context = TransactionContextManager.getInstance().getTransactionContext();
+ is = context.ResolveURI(locRefURI);
+ if (is == null) {
+ ExternalURIResolver uriResolver = new ExternalURIResolver();
+ is = uriResolver.resolve(locRefURI);
+ }
+ contentBytes = StreamUtils.readStream(is);
+ }
+ catch (MOAApplicationException e)
+ {
+ throw new MOAApplicationException("3203", new Object[]{reference, locRefURI}, e);
+ }
+ finally
+ {
+ closeInputStream(is);
+ }
+ break;
+ }
+ case Content.REFERENCE_CONTENT :
+ {
+ ExternalURIResolver uriResolver = new ExternalURIResolver();
+ InputStream is = null;
+ try
+ {
+ is = uriResolver.resolve(reference);
+ contentBytes = StreamUtils.readStream(is);
+ }
+ catch (Exception e)
+ {
+ throw e;
+ }
+ finally
+ {
+ closeInputStream(is);
+ }
+ break;
+ }
+ case Content.XML_CONTENT :
+ {
+ Element element =
+ checkForSingleElement(((ContentXML) content).getXMLContent());
+ contentBytes = DOMUtils.serializeNode(element, "UTF-8");
+
+ break;
+ }
+ default : {
+ contentBytes = null; // this will not happen
+ }
+ }
+ } catch (MOAApplicationException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new MOAApplicationException("2219", null);
+ }
+
+ if (Logger.isTraceEnabled()) {
+ // For logging in Debug-Mode: Mask baseid with xxx
+ String logString = new String(contentBytes);
+ // TODO use RegExp
+ String startS = "<pr:Identification><pr:Value>";
+ String endS = "</pr:Value><pr:Type>urn:publicid:gv.at:baseid</pr:Type>";
+ String logWithMaskedBaseid = logString;
+ int start = logString.indexOf(startS);
+ if (start > -1) {
+ int end = logString.indexOf(endS);
+ if (end > -1) {
+ logWithMaskedBaseid = logString.substring(0, start);
+ logWithMaskedBaseid += startS;
+ logWithMaskedBaseid += "xxxxxxxxxxxxxxxxxxxxxxxx";
+ logWithMaskedBaseid += logString.substring(end, logString.length());
+ }
+ }
+
+ // try to parse validating
+ Logger.trace(">>> parsing the following content: \n" + logWithMaskedBaseid);
+ }
+ try {
+ ByteArrayInputStream is = new ByteArrayInputStream(contentBytes);
+ Document doc =
+ DOMUtils.parseDocument(
+ is,
+ true,
+ Constants.ALL_SCHEMA_LOCATIONS,
+ null,
+ entityResolver,
+ new MOAErrorHandler());
+ Logger.trace("<<< parsed");
+
+ return new XMLDataObjectImpl(doc.getDocumentElement());
+ } catch (Exception e) {
+ // never mind, we'll try non-validating
+ MessageProvider msg = MessageProvider.getInstance();
+ Logger.info(new LogMsg(msg.getMessage("invoker.00", null)));
+ }
+
+ // try to parse non-validating
+ try {
+ ByteArrayInputStream is = new ByteArrayInputStream(contentBytes);
+ Document doc = DOMUtils.parseDocument(is, false, null, null);
+ // Since the parse tree will not contain any post schema validation information,
+ // we need to register any attributes known to be of type xsd:Id manually.
+ NodeList idAttributes = XPathUtils.selectNodeList(doc.getDocumentElement(), XPATH);
+ for (int i = 0; i < idAttributes.getLength(); i++) {
+ Node item = idAttributes.item(i);
+ if (item instanceof Attr) {
+ Attr attr = (Attr) item;
+ Element owner = attr.getOwnerElement();
+ // Only available in DOM-Level 3 (Java 1.5):
+ // owner.setIdAttributeNode(attr, true);
+ if (doc instanceof CoreDocumentImpl) {
+ ((CoreDocumentImpl) doc).putIdentifier(attr.getValue(), owner);
+ }
+ }
+ }
+ return new XMLDataObjectImpl(doc.getDocumentElement());
+ } catch (Exception e) {
+ throw new MOAApplicationException("2218", null);
+ }
+ }
+
+ /**
+ * Create an <code>XMLDataObject</code> from the given signature environment.
+ *
+ * @param signatureEnvironment The signature environment contained in the
+ * result.
+ * @param uri The URI identifying the data. This must be either the empty
+ * URI, an URI starting with <code>"#xpointer"</code>, <code>"#xmlns"</code>
+ * or <code>"#element"</code>; or an URI starting with <code>"#"</code> and
+ * followed by an element ID.
+ * @param referenceID The reference ID to set for the data object.
+ * @return A data object containing the signature environment.
+ */
+ public DataObject createFromSignatureEnvironment(
+ Element signatureEnvironment,
+ String uri,
+ String referenceID)
+ throws MOAApplicationException {
+
+ DataObjectImpl dataObject = null;
+
+ if ("".equals(uri)) {
+ dataObject = new XMLDataObjectImpl(signatureEnvironment);
+ } else if (
+ uri.startsWith("#xpointer")
+ || uri.startsWith("#xmlns")
+ || uri.startsWith("#element")) {
+ try {
+ XPointerReferenceResolver resolver = new XPointerReferenceResolver();
+ URI uriObj = new URI(uri);
+ NodeList nodes =
+ resolver.resolveForest(
+ uriObj,
+ signatureEnvironment.getOwnerDocument(),
+ null);
+ dataObject = new XMLNodeListDataObjectImpl(nodes);
+ } catch (Exception e) {
+ throw new MOAApplicationException("2237", new Object[] { uri });
+ }
+ } else if (uri.startsWith("#")) {
+ String id = uri.substring(1);
+ Element refElem =
+ signatureEnvironment.getOwnerDocument().getElementById(id);
+
+ if (refElem == null) {
+ throw new MOAApplicationException("2237", new Object[] { id });
+ }
+ dataObject = new XMLDataObjectImpl(refElem);
+ }
+
+ dataObject.setReferenceID(referenceID);
+ dataObject.setURI(uri);
+
+ return dataObject;
+ }
+
+ /**
+ * Build a <code>StreamEntityResolver</code> from a <code>List</code> of
+ * supplements.
+ *
+ * @param supplements The supplements, given as
+ * <code>XMLDataObjectAssociation</code>s.
+ * @return A <code>StreamEntityResolver</code> mapping the supplements by
+ * their reference URI to an <code>InputStream</code> of their respective
+ * content.
+ */
+ private static StreamEntityResolver buildSupplementEntityResolver(List supplements)
+ throws MOAApplicationException
+ {
+ Map entities = new HashMap();
+ Iterator iter;
+
+ for (iter = supplements.iterator(); iter.hasNext();) {
+ XMLDataObjectAssociation supplement =
+ (XMLDataObjectAssociation) iter.next();
+ Content content = supplement.getContent();
+ String reference = content.getReference();
+
+ switch (content.getContentType()) {
+ case Content.BINARY_CONTENT :
+ {
+ entities.put(reference, ((ContentBinary) content).getBinaryContent());
+ break;
+ }
+ case Content.LOCREF_CONTENT:
+ {
+ String locRefURI = ((ContentLocRef) content).getLocationReferenceURI();
+
+ TransactionContext context = TransactionContextManager.getInstance().getTransactionContext();
+ if (context.FindResolvedEntity(locRefURI)==null) {
+
+ ExternalURIResolver uriResolver = new ExternalURIResolver();
+ InputStream uriStream = null;
+ byte[] contentBytes;
+ String contentType = null;
+ try
+ {
+ uriStream = uriResolver.resolve(locRefURI);
+ contentBytes = StreamUtils.readStream(uriStream);
+ contentType = uriResolver.getContentType();
+ }
+ catch (Exception e)
+ {
+ throw new MOAApplicationException("3202", new Object[]{reference, locRefURI}, e);
+ }
+ finally
+ {
+ closeInputStream(uriStream);
+ }
+ context.PutResolvedEntity(locRefURI, contentBytes, contentType);
+ }
+ InputStream contentIS = context.ResolveURI(locRefURI);
+ entities.put(reference, contentIS);
+ break;
+ }
+ case Content.XML_CONTENT :
+ {
+ // serialize the first element node that is found in the supplement
+ // and make it available as a stream
+ NodeList nodes = ((ContentXML) content).getXMLContent();
+ int i = 0;
+
+ // find the first element node
+ while ((i < nodes.getLength())
+ && (nodes.item(i).getNodeType() != Node.ELEMENT_NODE)) {
+ i++;
+ }
+
+ // serialize the node
+ if (i < nodes.getLength()) {
+ try
+ {
+ byte[] serialized = DOMUtils.serializeNode(nodes.item(i), "UTF-8");
+ entities.put(reference, new ByteArrayInputStream(serialized));
+ }
+ catch (Exception e)
+ {
+ throw new MOAApplicationException("2281", new Object[]{reference}, e);
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ return new StreamEntityResolver(entities);
+ }
+
+ /**
+ * Create a <code>DataObject</code> from a <code>Content</code> object.
+ *
+ * @param content The <code>Content</code> object containing the data.
+ * @param finalDataMetaInfo The meta information corresponding with <code>content</code>.
+ * @param referenceID The reference ID to set in the resulting
+ * <code>DataObject</code>. May be <code>null</code>.
+ * @param allowContentAndReference If <code>true</code>, then
+ * <code>content</code> is allowed to contain both a <code>Reference</code>
+ * attribute and content. Otherwise, either a <code>Reference</code>
+ * attribute or content must be set.
+ * @param binaryAsXml If <code>true</code>, a content child given as
+ * <code>Base64Content</code> must contain XML data.
+ * @param xmlAsNodeList If <code>true</code>, the children of a
+ * <code>XMLContent</code> child element are returned as a
+ * <code>XMLNodeListDataObject</code>. Otherwise, <code>XMLContent</code> may
+ * only contain a single child node, which must be an element and which is
+ * returned as an <code>XMLDataObject</code>.
+ * @param referenceAsXml If <code>true</code>, then content loaded from the
+ * URI given as the <code>Reference</code> attribute must be XML data.
+ * If <code>false</code>, an attempt is made to parse the data as XML and
+ * return an <code>XMLDataObject</code> but if this fails, a
+ * <code>BinaryDataObject</code> is returned containing a byte stream to the
+ * data.
+ * @return A <code>DataObject</code> representing the data in
+ * <code>content</code>. If <code>base64AsXml==true</code> and
+ * <code>xmlAsNodeList==false</code> and <code>referenceAsXml==true</code>,
+ * then the result can safely be cast to an <code>XMLDataObject</code>.
+ * @throws MOASystemException An error indicating an internal problem. See the
+ * wrapped exception for details.
+ * @throws MOAApplicationException An error occurred handling the content
+ * (probably while opening a reference or parsing the data). See the wrapped
+ * exception for details.
+ */
+ public DataObject createFromContentOptionalRefType(
+ Content content,
+ MetaInfo finalDataMetaInfo,
+ String referenceID,
+ boolean allowContentAndReference,
+ boolean binaryAsXml,
+ boolean xmlAsNodeList,
+ boolean referenceAsXml)
+ throws MOASystemException, MOAApplicationException {
+
+ String reference = content.getReference();
+ DataObjectImpl dataObject = null;
+
+ checkAllowContentAndReference(content, allowContentAndReference);
+
+ // ok, build the data object; use content first, if available
+ switch (content.getContentType())
+ {
+ case Content.XML_CONTENT :
+ {
+ ContentXML contentXml = (ContentXML) content;
+ dataObject = createFromXmlContent(contentXml, xmlAsNodeList);
+ break;
+ }
+ case Content.BINARY_CONTENT :
+ {
+ ContentBinary contentBinary = (ContentBinary) content;
+ dataObject = createFromBinaryContent(contentBinary, binaryAsXml, false);
+ break;
+ }
+ case Content.LOCREF_CONTENT :
+ {
+ String locRefURI = ((ContentLocRef) content).getLocationReferenceURI();
+ try
+ {
+ dataObject = createFromURIImpl(locRefURI, referenceAsXml);
+ }
+ catch (MOAApplicationException e)
+ {
+ throw new MOAApplicationException("3201", new Object[]{reference, locRefURI}, e);
+ }
+ break;
+ }
+ case Content.REFERENCE_CONTENT :
+ {
+ dataObject = createFromURIImpl(reference, referenceAsXml);
+ break;
+ }
+ }
+
+ // set URI and reference ID
+ dataObject.setURI(reference);
+ dataObject.setReferenceID(referenceID);
+
+ // set Type gathered from corresponding meta information
+ dataObject.setTypeURI(finalDataMetaInfo.getType());
+
+ return dataObject;
+ }
+
+ /**
+ * Check, if content and reference URIs are allowed in the content an throw
+ * an exception if an illegal combination of the two occurs.
+ *
+ * @param content The <code>Content</code> to check.
+ * @param allowContentAndReference Whether explicit content and a reference
+ * are allowed at the same time.
+ * @throws MOAApplicationException If <code>allowContentAndRefernece</code>
+ * is <code>false</code> and both explicit content and reference are set,
+ * an exception is thrown.
+ */
+ private static void checkAllowContentAndReference(
+ Content content,
+ boolean allowContentAndReference)
+ throws MOAApplicationException {
+ String reference = content.getReference();
+
+ // check for content and reference not being set
+ if ((content.getContentType() == Content.REFERENCE_CONTENT)
+ && (reference == null)) {
+ String errorCode = allowContentAndReference ? "1111" : "1110";
+ throw new MOAApplicationException(errorCode, null);
+ }
+
+ // if we only allow either content or reference being set at once, check
+ if (!allowContentAndReference
+ && (content.getContentType() != Content.REFERENCE_CONTENT)
+ && (reference != null)) {
+ throw new MOAApplicationException("1110", null);
+ }
+ }
+
+ /**
+ * Create a <code>DataObject</code> from a
+ * <code>XMLDataObjectAssociation</code> object.
+ *
+ * @param xmlDataObjAssoc The <code>XMLDataObjectAssociation</code> object.
+ * @param xmlContentAllowed Whether the content contained in the
+ * <code>xmlDataObjAssoc</code> is allowed to be of type
+ * <code>XML_CONTENT</code>.
+ * @param binaryContentRepeatable If binary content must be provided as a
+ * <code>DataObject</code> that can be read multiple times.
+ * @return A <code>DataObject</code> representing the data in
+ * <code>xmlDataObjAssoc</code>.
+ * @throws MOASystemException An error indicating an internal problem. See the
+ * wrapped exception for details.
+ * @throws MOAApplicationException An error occurred handling the content
+ * (probably while parsing the data). See the wrapped exception for details.
+ */
+ public DataObject createFromXmlDataObjectAssociation(
+ XMLDataObjectAssociation xmlDataObjAssoc,
+ boolean xmlContentAllowed,
+ boolean binaryContentRepeatable)
+ throws MOASystemException, MOAApplicationException {
+
+ Content content = xmlDataObjAssoc.getContent();
+ MetaInfo metaInfo = xmlDataObjAssoc.getMetaInfo();
+ String mimeType = metaInfo != null ? metaInfo.getMimeType() : null;
+ DataObjectImpl dataObject = null;
+
+ switch (content.getContentType())
+ {
+ case Content.XML_CONTENT :
+ {
+ if (xmlContentAllowed)
+ {
+ dataObject = createFromXmlContent((ContentXML) content, true);
+ }
+ else
+ {
+ throw new MOAApplicationException("2280", null);
+ }
+ break;
+ }
+ case Content.BINARY_CONTENT :
+ {
+ dataObject = createFromBinaryContent(
+ (ContentBinary) content,
+ false,
+ binaryContentRepeatable);
+ break;
+ }
+ case Content.LOCREF_CONTENT :
+ {
+ String locRefURI = ((ContentLocRef) content).getLocationReferenceURI();
+ try
+ {
+ dataObject = createFromURIImpl(locRefURI, false);
+ }
+ catch (MOAApplicationException e)
+ {
+ throw new MOAApplicationException("3201", new Object[]{content.getReference(), locRefURI}, e);
+ }
+ break;
+ }
+ }
+
+ dataObject.setURI(content.getReference());
+ dataObject.setMimeType(mimeType);
+ return dataObject;
+ }
+
+ /**
+ * Create a <code>DataObject</code> from a <code>TransformParameter</code>
+ * object.
+ *
+ * @param transformParameter The <code>TransformParameter</code> object
+ * containing the data.
+ * @return A <code>DataObject</code> representing the data in
+ * <code>root</code>.
+ * @throws MOASystemException An error indicating an internal problem. See the
+ * wrapped exception for details.
+ * @throws MOAApplicationException An error occurred handling the content
+ * (probably while opening a reference or parsing the data). See the wrapped
+ * exception for details.
+ */
+ public DataObject createFromTransformParameter(TransformParameter transformParameter)
+ throws MOASystemException, MOAApplicationException {
+
+ DataObjectImpl dataObject;
+
+ switch (transformParameter.getTransformParameterType()) {
+ case TransformParameter.BINARY_TRANSFORMPARAMETER :
+ TransformParameterBinary tpBinary =
+ (TransformParameterBinary) transformParameter;
+
+ try {
+ //dataObject = new ByteArrayDataObjectImpl(Base64Utils.encode(tpBinary.getBinaryContent()));
+ dataObject =
+ new ByteArrayDataObjectImpl(
+ StreamUtils.readStream(tpBinary.getBinaryContent()));
+ } catch (Exception e) {
+ return null;
+ }
+ //dataObject = new ByteStreamDataObjectImpl(tpBinary.getBinaryContent());
+ break;
+ default :
+ // resolve uri and build the content
+ ExternalURIResolver resolver = new ExternalURIResolver();
+ InputStream is = resolver.resolve(transformParameter.getURI());
+ ByteArrayInputStream bis;
+ try
+ {
+ bis = new ByteArrayInputStream(StreamUtils.readStream(is));
+ }
+ catch (IOException e)
+ {
+ throw new MOAApplicationException("2238", new Object[] {transformParameter.getURI()}, e);
+ }
+ finally
+ {
+ closeInputStream(is);
+ }
+ String contentType = resolver.getContentType();
+ dataObject = new ByteStreamDataObjectImpl(bis);
+ dataObject.setMimeType(contentType);
+ break;
+ }
+
+ dataObject.setURI(transformParameter.getURI());
+
+ return dataObject;
+ }
+
+ /**
+ * Create a <code>DataObject</code> from data located at the given URI.
+ *
+ * @param uri The <code>URI</code> where the data is located. This method uses
+ * an <code>ExternalURIResolver</code> to resolve URIs.
+ * @param asXml If <code>true</code>, a <code>DataObject</code> is only
+ * returned, if the content consists of XML data. If it does not consist of
+ * XML data, an <code>MOAApplicationException</code> will be thrown. If this
+ * parameter is <code>false</code> and the content consists of XML data, this
+ * method will still attempt to parse it.
+ * @return The <code>DataObject</code> contained at the URI.
+ * @throws MOASystemException A system error parsing the XML content.
+ * @throws MOAApplicationException An error occurred on opening, reading or
+ * parsing the data behind the URI.
+ */
+ public DataObject createFromURI(String uri, boolean asXml)
+ throws MOASystemException, MOAApplicationException {
+ return createFromURIImpl(uri, asXml);
+ }
+
+ /**
+ * Create a <code>DataObject</code> from data located at the given URI.
+ *
+ * @param uri The <code>URI</code> where the data is located. This method uses
+ * an <code>ExternalURIResolver</code> to resolve URIs.
+ * @param asXml If <code>true</code>, a <code>DataObject</code> is only
+ * returned, if the content consists of XML data. If it does not consist of
+ * XML data, an <code>MOAApplicationException</code> will be thrown. If this
+ * parameter is <code>false</code> and the content type is detected as being
+ * XML data, this method will still attemt to parse it.
+ * @return The <code>DataObject</code> contained at the URI.
+ * @throws MOASystemException A system error parsing the XML content.
+ * @throws MOAApplicationException An error occurred on opening, reading or
+ * parsing the data behind the URI.
+ */
+ private DataObjectImpl createFromURIImpl(String uri, boolean asXml)
+ throws MOASystemException, MOAApplicationException {
+
+ Logger.trace(">>> resolving uri \"" + uri + "\"");
+
+ ExternalURIResolver resolver = new ExternalURIResolver();
+
+ TransactionContext context = TransactionContextManager.getInstance().getTransactionContext();
+ InputStream is = context.ResolveURI(uri);
+ String contentType = null;
+ boolean foundURI = false;
+ if (is == null) {
+ is = resolver.resolve(uri);
+ contentType = resolver.getContentType();
+ } else {
+ foundURI = true;
+ contentType = (String) context.FindResolvedEntity(uri).get(1);
+ Logger.trace("found \"" + uri + "\" InputStream in preread Supplements!, do not read any more. Content=" + contentType);
+ }
+
+ DataObjectImpl dataObject;
+
+ // read the content
+ if ((contentType != null) && contentTypeIsXml(contentType)) {
+ Document doc;
+
+ if (asXml) {
+ try {
+ // try parsing non-validating: this has to succeed or we
+ // bail out by throwing an exception
+ is = resolver.resolve(uri);
+ doc = DOMUtils.parseDocument(is, false, null, null);
+ dataObject = new XMLDataObjectImpl(doc.getDocumentElement());
+ } catch (ParserConfigurationException e) {
+ throw new MOASystemException("1106", null, e);
+ } catch (SAXException e) {
+ throw new MOAApplicationException("2209", null, e);
+ } catch (IOException e) {
+ throw new MOAApplicationException("2210", null, e);
+ }
+ finally
+ {
+ closeInputStream(is);
+ }
+ } else {
+ try {
+ // try parsing non-validating: need not succeed
+ is = resolver.resolve(uri);
+ doc = DOMUtils.parseDocument(is, false, null, null);
+ closeInputStream(is);
+ dataObject = new XMLDataObjectImpl(doc.getDocumentElement());
+ } catch (Exception e) {
+ // this is the last chance: return the data as a byte stream
+ Logger.trace(">>> reading stream for \"" + uri + "\"");
+ is = resolver.resolve(uri);
+ ByteArrayInputStream bis;
+ try
+ {
+ bis = new ByteArrayInputStream(StreamUtils.readStream(is));
+ dataObject = new ByteStreamDataObjectImpl(bis);
+ }
+ catch (IOException e1)
+ {
+ throw new MOAApplicationException("2210", new Object[] { uri }, e1);
+ }
+ finally
+ {
+ closeInputStream(is);
+ }
+ Logger.trace(">>> read stream for \"" + uri + "\"");
+ }
+ }
+ }
+
+ else if (asXml)
+ {
+ // if we need XML data, we're in the wrong place here
+ closeInputStream(is);
+ throw new MOAApplicationException("2211", new Object[] { uri });
+ }
+ else
+ {
+ // content is binary: make it available as a binary input stream
+ Logger.trace(">>> getting binary input for \"" + uri + "\"");
+ byte[] contentBytes;
+ ByteArrayInputStream bis;
+ try
+ {
+ contentBytes = StreamUtils.readStream(is);
+ bis = new ByteArrayInputStream(contentBytes);
+ }
+ catch (IOException e)
+ {
+ throw new MOAApplicationException("2210", null, e);
+ }
+ finally
+ {
+ closeInputStream(is);
+ }
+ if (!foundURI) {
+ context.PutResolvedEntity(uri, contentBytes, contentType);
+ }
+ dataObject = new ByteStreamDataObjectImpl(bis);
+ Logger.trace("<<< got binary input for \"" + uri + "\"");
+ }
+
+ dataObject.setMimeType(contentType);
+ dataObject.setURI(uri);
+
+ Logger.trace("<<< resolved uri \"" + uri + "\"");
+
+ return dataObject;
+ }
+
+ /**
+ * Savely closes the specified input stream.
+ *
+ * @param is The input stream to be closed.
+ */
+ private static void closeInputStream(InputStream is)
+ {
+ try
+ {
+ if (is != null) {
+ is.close();
+ }
+ }
+ catch (Throwable t)
+ {
+ // Intentionally do nothing here
+ }
+ }
+
+ /**
+ * Determine whether the content type is XML.
+ *
+ * Content types recognized as XML start with <code>text/xml</code> and
+ * <code>application/xml</code>.
+ *
+ * @param contentType The content MIME type.
+ * @return boolean If <code>true</code>, the content type is XML, otherwise
+ * not.
+ */
+ private static boolean contentTypeIsXml(String contentType) {
+ return contentType.startsWith("text/xml")
+ || (contentType.startsWith("application/xml"));
+ }
+
+ /**
+ * Create a <code>DataObject</code> from a <code>ContentXML</code> object.
+ *
+ * @param xmlContent The <code>ContentXML</code> object from
+ * which the <code>DataObject</code> is to be built.
+ * @param xmlAsNodeList If <code>true</code>, the children of
+ * <code>xmlContent</code> are returned as a
+ * <code>XMLNodeListDataObject</code>. Otherwise,
+ * <code>xmlContent</code> may only contain a single child node, which must be
+ * an element and which is returned as an <code>XMLDataObject</code>.
+ * @return A <code>DataObject</code> representing the XML content in
+ * <code>xmlContent</code>.
+ * @throws MOAApplicationException If <code>xmlAsNodeList</code> is
+ * <code>false</code> and <code>xmlContent</code> does not have a single child
+ * element.
+ */
+ private DataObjectImpl createFromXmlContent(
+ ContentXML xmlContent,
+ boolean xmlAsNodeList)
+ throws MOAApplicationException {
+
+ DataObjectImpl dataObject;
+
+ if (xmlAsNodeList) {
+ dataObject = new XMLNodeListDataObjectImpl(xmlContent.getXMLContent());
+ } else {
+ NodeList nodes = xmlContent.getXMLContent();
+ Element element = checkForSingleElement(nodes);
+
+ // build the XMLDataObject
+ dataObject = new XMLDataObjectImpl(element);
+ }
+ return dataObject;
+ }
+
+ /**
+ * Check, that the given <code>NodeList</code> contains a single DOM element
+ * node and return it, otherwise throw an exception.
+ *
+ * @param nodes The <code>NodeList</code> to check for a single element.
+ * @return The single element contained in <code>nodes</code>.
+ * @throws MOAApplicationException Thrown, if <code>nodes</code> does not
+ * contain exactly 1 element node.
+ */
+ private Element checkForSingleElement(NodeList nodes)
+ throws MOAApplicationException {
+
+ Element element = null;
+ int i;
+
+ // check for a single element node
+ for (i = 0; i < nodes.getLength(); i++) {
+ if (nodes.item(i).getNodeType() == Node.ELEMENT_NODE) {
+ if (element == null) {
+ element = (Element) nodes.item(i);
+ } else {
+ throw new MOAApplicationException("1109", null);
+ }
+ }
+ }
+
+ // return the element node
+ if (element == null) {
+ throw new MOAApplicationException("1107", null);
+ } else {
+ return element;
+ }
+ }
+
+ /**
+ * Create a <code>DataObject</code> from a <code>ContentBinary</code> object.
+ *
+ * @param binaryContent The <code>ContentBinary</code> object containing the
+ * data.
+ * @param asXml If <code>true</code>, <code>binaryContent</code> must
+ * contain XML data. Otherwise, a <code>BinaryDataObject</code> will be
+ * returned containing a byte stream to the decoded Base64 data.
+ * @param repeatable If multiple calls to <code>getInputStream()</code> must
+ * repeatedly return the content of the data object.
+ * @return A <code>DataObject</code> representing the content contained in
+ * <code>binaryContent</code>.
+ * @throws MOASystemException An error indicating an internal problem. See the
+ * wrapped exception for details.
+ * @throws MOAApplicationException An error occurred handling the content
+ * (probably while parsing the data). See the wrapped exception for details.
+ */
+ private DataObjectImpl createFromBinaryContent(
+ ContentBinary binaryContent,
+ boolean asXml,
+ boolean repeatable)
+ throws MOASystemException, MOAApplicationException {
+
+ InputStream byteStream = binaryContent.getBinaryContent();
+ DataObjectImpl dataObject;
+
+ if (asXml) {
+ Document doc;
+
+ try {
+ doc = DOMUtils.parseDocument(byteStream, false, null, null);
+ dataObject = new XMLDataObjectImpl(doc.getDocumentElement());
+ } catch (ParserConfigurationException e) {
+ throw new MOASystemException("1106", null, e);
+ } catch (SAXException e) {
+ throw new MOAApplicationException("2209", null, e);
+ } catch (IOException e) {
+ throw new MOAApplicationException("2210", null, e);
+ }
+ } else {
+ if (repeatable) {
+ try {
+ dataObject =
+ new ByteArrayDataObjectImpl(StreamUtils.readStream(byteStream));
+ } catch (IOException e) {
+ throw new MOAApplicationException("2210", null);
+ }
+ } else {
+ dataObject = new ByteStreamDataObjectImpl(byteStream);
+ }
+ }
+
+ return dataObject;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/ExternalURIResolver.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/ExternalURIResolver.java
new file mode 100644
index 000000000..3e3f6753a
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/ExternalURIResolver.java
@@ -0,0 +1,162 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import iaik.ixsil.exceptions.URIException;
+import iaik.ixsil.util.URI;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLConnection;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+
+/**
+ * Resolve external URIs and provide them as a stream.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ExternalURIResolver {
+
+ /** The MIME type of the content currently resolved. */
+ private String contentType;
+
+ /**
+ * Return a stream to data at the given URI.
+ *
+ * This method will try to open an <code>URLConnection</code> to the given
+ * URI. Access to the file system is disallowed.
+ *
+ * @param uriStr The URI to resolve.
+ * @return InputStream The data contained at the URI.
+ * @throws MOAApplicationException An error occurred resolving the URI (e.g.,
+ * the URI is syntactically incorrect or the stream could not be opened).
+ */
+ public InputStream resolve(String uriStr) throws MOAApplicationException {
+ URI uri;
+ URL url;
+ URLConnection connection;
+ InputStream is;
+
+ // build the URI
+ try {
+ uri = new URI(uriStr);
+ } catch (URIException e) {
+ throw new MOAApplicationException("2207", new Object[] { uriStr });
+ }
+
+ // disallow access to local file system
+ if ("".equals(uri.getScheme()) || "file".equals(uri.getScheme())) {
+ throw new MOAApplicationException("2213", new Object[] { uriStr });
+ }
+
+ // if we have local content (SOAP with attachments)
+ if ("formdata".equals(uri.getScheme())) {
+ TransactionContext context = TransactionContextManager.getInstance().getTransactionContext();
+ if (context==null) {
+ //no transaction
+ throw new MOAApplicationException("2282", new Object[] { uri });
+ } else {
+ InputStream attachmentIs = context.getAttachmentInputStream(uri);
+ if (attachmentIs != null) {
+ setContentType(context.getAttachmentContentType(uri.getPath()));
+ return attachmentIs;
+ } else {
+ //maybe attachments provided but no suiting attachment found
+ throw new MOAApplicationException("2282", new Object[] { uri });
+ }
+ }
+ }
+
+ // convert URI to URL
+ try {
+ // create the URL
+ url = new URL(uriStr);
+ } catch (MalformedURLException e) {
+ throw new MOAApplicationException("2214", new Object[] { uriStr });
+ }
+
+ // build the URLConnection
+ try {
+ connection = url.openConnection();
+ if ("http".equals(url.getProtocol())) {
+ HttpURLConnection httpConnection = (HttpURLConnection) connection;
+
+ httpConnection.connect();
+ if (httpConnection.getResponseCode() != HttpURLConnection.HTTP_OK) {
+ throw new MOAApplicationException("2208", new Object[] { uri });
+ }
+ } else if ("https".equals(url.getProtocol())) {
+ /*
+ * this doesn't work because of some interaction between the IAIK
+ * JCE and Sun JSSE that results in an "Invalid AVA format" exception
+ */
+
+ /*
+ HttpsURLConnection httpsConnection = (HttpsURLConnection) connection;
+ InputStream trustStore =
+ getClass().getResourceAsStream(DEFAULT_TRUST_STORE);
+ SSLSocketFactory factory =
+ SSLUtils.getSSLSocketFactory("jks", trustStore, "changeit");
+ httpsConnection.setSSLSocketFactory(factory);
+ httpsConnection.connect();
+ if (httpConnection.getResponseCode() != HttpURLConnection.HTTP_OK) {
+ throw new MOAApplicationException("2208", new Object[] { uri });
+ }
+ */
+ connection.connect();
+ } else {
+ connection.connect();
+ }
+ is = connection.getInputStream();
+ } catch (IOException e) {
+ throw new MOAApplicationException("2208", new Object[] { uri }, e);
+ } /*catch (GeneralSecurityException e) {
+ throw new MOAApplicationException("2208", new Object[] { uri }, e);
+ }*/
+
+ // set the content type
+ setContentType(connection.getContentType());
+
+ return is;
+ }
+
+ /**
+ * Set the content type of the data at the URI.
+ *
+ * @param contentType The content type to set.
+ */
+ protected void setContentType(String contentType) {
+ this.contentType = contentType;
+ }
+
+ /**
+ * Return the content type of the data detected at the URI from the previous
+ * call of <code>resolve()</code>.
+ *
+ * @return String The content type.
+ */
+ public String getContentType() {
+ return contentType;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/IaikExceptionMapper.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/IaikExceptionMapper.java
new file mode 100644
index 000000000..9a35c4082
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/IaikExceptionMapper.java
@@ -0,0 +1,282 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import java.lang.reflect.Constructor;
+import java.util.HashMap;
+import java.util.Map;
+
+import iaik.IAIKException;
+import iaik.IAIKRuntimeException;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.MOASystemException;
+
+
+/**
+ * Map an exception from the <code>iaik</code> namespace to a
+ * <code>MOAException</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class IaikExceptionMapper {
+
+ /** The argument classes for <code>MOAException</code>s. */
+ private static final Class[] CONSTRUCTOR_ARGS =
+ new Class[] { String.class, Object[].class, Throwable.class };
+ /** The exception mapping, as an array. */
+ private static final Object[][] MESSAGES =
+ {
+ { iaik.IAIKException.class, "9900", MOASystemException.class },
+ { iaik.IAIKRuntimeException.class, "9901", MOASystemException.class },
+ { iaik.server.modules.xmlsign.XMLSignatureCreationException.class, "2220", MOAApplicationException.class },
+ { iaik.server.modules.xmlsign.XMLSignatureCreationRuntimeException.class, "2220", MOAApplicationException.class },
+ { iaik.server.modules.xmlsign.InvalidKeyException.class, "2221", MOAApplicationException.class },
+ { iaik.server.modules.xmlsign.ManifestException.class, "2222", MOAApplicationException.class },
+ { iaik.server.modules.xmlsign.ReferenceException.class, "2223", MOAApplicationException.class },
+ { iaik.server.modules.xmlsign.HashUnavailableException.class, "2224", MOAApplicationException.class },
+ { iaik.server.modules.xmlsign.SignatureAlgorithmException.class, "2225", MOAApplicationException.class },
+ { iaik.server.modules.xmlsign.SignatureEmbeddingException.class, "2226", MOAApplicationException.class },
+ { iaik.server.modules.xmlsign.SignatureValueException.class, "2227", MOAApplicationException.class },
+ { iaik.server.modules.xmlsign.SignedPropertyException.class, "2228", MOAApplicationException.class },
+ { iaik.server.modules.xmlsign.SignerCertificateUnavailableException.class, "2229", MOAApplicationException.class },
+ { iaik.server.modules.xmlsign.SupplementException.class, "2230", MOAApplicationException.class },
+ { iaik.server.modules.xmlsign.TransformationException.class, "2233", MOAApplicationException.class },
+ { iaik.server.modules.cmsverify.CMSSignatureVerificationException.class, "2240", MOAApplicationException.class },
+ { iaik.server.modules.cmsverify.CMSSignatureVerificationRuntimeException.class, "2240", MOAApplicationException.class },
+ { iaik.server.modules.cmsverify.AlgorithmNotSupportedException.class, "2241", MOAApplicationException.class },
+ { iaik.server.modules.cmsverify.CMSSignatureParsingException.class, "2242", MOAApplicationException.class },
+ { iaik.server.modules.cmsverify.SignerCertificateUnavailableException.class, "2243", MOAApplicationException.class },
+ { iaik.server.modules.cmsverify.CMSSignatureVerificationRuntimeException.class, "2247", MOAApplicationException.class },
+ { iaik.server.modules.cmsverify.InitException.class, "2248", MOAApplicationException.class },
+ { iaik.server.modules.xmlverify.XMLSignatureVerificationException.class, "2240", MOAApplicationException.class },
+ { iaik.server.modules.xmlverify.XMLSignatureVerificationRuntimeException.class, "2240", MOAApplicationException.class },
+ { iaik.server.modules.xmlverify.AlgorithmNotSupportedException.class, "2241", MOAApplicationException.class },
+ { iaik.server.modules.xmlverify.ManifestException.class, "2262", MOAApplicationException.class },
+ { iaik.server.modules.xmlverify.PropertiesException.class, "2263", MOAApplicationException.class },
+ { iaik.server.modules.xmlverify.ReferenceException.class, "2264", MOAApplicationException.class },
+ { iaik.server.modules.xmlverify.HashUnavailableException.class, "2224", MOAApplicationException.class },
+ { iaik.server.modules.xmlverify.SignerCertificateUnavailableException.class, "2243", MOAApplicationException.class },
+ { iaik.server.modules.xmlverify.SupplementException.class, "2230", MOAApplicationException.class },
+ { iaik.server.modules.xmlverify.TransformationException.class, "2265", MOAApplicationException.class },
+ { iaik.server.modules.xmlverify.TransformationParsingException.class, "2269", MOAApplicationException.class }
+ };
+
+ /** The single instance of this class. */
+ private static IaikExceptionMapper instance;
+ /** The exception mapping, as a <code>Map</code> for fast lookup. */
+ private Map messages = new HashMap();
+
+ /**
+ * Get the single instance of this class.
+ *
+ * @return The single instance of this class.
+ */
+ public static synchronized IaikExceptionMapper getInstance() {
+ if (instance == null) {
+ instance = new IaikExceptionMapper();
+ }
+ return instance;
+ }
+
+ /**
+ * Create a new <code>IaikExceptionMapper</code>.
+ *
+ * Protected to disallow multple instances.
+ */
+ protected IaikExceptionMapper() {
+ registerMessages();
+ }
+
+ /**
+ * Build the complete <code>IAIKException</code> to message code mapping.
+ */
+ protected void registerMessages() {
+ int i;
+
+ for (i = 0; i < MESSAGES.length; i++) {
+ registerMessage(
+ (Class) MESSAGES[i][0],
+ (String) MESSAGES[i][1],
+ (Class) MESSAGES[i][2]);
+ }
+ }
+
+ /**
+ * Register a single <code>IAIKException</code> to message mapping.
+ *
+ * @param iaikExceptionClass An exception from the <code>iaik</code> package.
+ * @param messageId The corresponding error message id.
+ * @param moaExceptionClass The type of <code>MOAException</code> that the
+ * <code>IAIKException</code> is mapped to (usually
+ * <code>MOAApplicationException</code> or <code>MOASystemException</code>).
+ */
+ protected void registerMessage(
+ Class iaikExceptionClass,
+ String messageId,
+ Class moaExceptionClass) {
+
+ messages.put(
+ iaikExceptionClass,
+ new ExceptionMappingInfo(messageId, moaExceptionClass));
+ }
+
+ /**
+ * Map an <code>IAIKException</code> to a <code>MOAException</code>.
+ *
+ * @param iaikException The <code>IAIKException</code> to map.
+ * @return A <code>MOAException</code> containing the message for the
+ * given <code>IAIKException</code>.
+ */
+ public MOAException map(IAIKException iaikException) {
+ return mapImpl(iaikException);
+ }
+
+ /**
+ * Map an <code>IAIKRuntimeException</code> to a <code>MOAException</code>.
+ *
+ * @param iaikException The <code>IAIKException</code> to map.
+ * @return A <code>MOAException</code> containing the message for the
+ * given <code>IAIKRuntimeException</code>.
+ */
+ public MOAException map(IAIKRuntimeException iaikException) {
+ return mapImpl(iaikException);
+ }
+
+ /**
+ * Map an <code>IAIKException</code> or <code>IAIKRuntimeException</code> to a
+ * <code>MOAException</code>.
+ *
+ * @param iaikException The <code>IAIKException</code> or
+ * <code>IAIKRuntimeException</code> to map.
+ * @return A <code>MOAException</code> containing the message for the
+ * given <code>IAIKRuntimeException</code>.
+ */
+ private MOAException mapImpl(Exception iaikException) {
+ MOAException moaException = createMoaException(iaikException);
+
+ if (moaException == null) {
+ return new MOASystemException("9999", null, iaikException);
+ }
+ return moaException;
+ }
+
+ /**
+ * Create a <code>MOAException</code> from a given <code>IAIKException</code>
+ * by looking it up in the mapping.
+ *
+ * @param iaikException The <code>IAIKException</code> to map.
+ * @return A <code>MOAException</code> with an error code corresponding to
+ * the given <code>IAIKException</code>. Returns <code>null</code>, if no
+ * mapping could be found.
+ */
+ protected MOAException createMoaException(Exception iaikException) {
+ ExceptionMappingInfo info = lookupMessage(iaikException.getClass());
+ Constructor constructor;
+
+ if (info == null) {
+ return null;
+ }
+
+ // instantiate the proper MOAException and return it
+ try {
+ constructor =
+ info.getMoaExceptionClass().getConstructor(CONSTRUCTOR_ARGS);
+ return (MOAException) constructor.newInstance(
+ new Object[] {
+ info.getMessageId(),
+ new Object[] { iaikException.getMessage()},
+ iaikException });
+ } catch (Exception e) {
+ return null;
+ }
+ }
+
+ /**
+ * Recursively look up the message associated with an
+ * <code>IAIKException</code>.
+ *
+ * This method walks up the exception inheritance hierarchy until it finds a
+ * mapping.
+ *
+ * @param iaikExceptionClass The <code>IAIKException</code> to look up.
+ * @return Information about the message id and
+ * <code>MOAException</code> class that the <code>iaikExceptionClass</code>
+ * maps to. If no mapping could be found, <code>null</code> is returned.
+ */
+ protected ExceptionMappingInfo lookupMessage(Class iaikExceptionClass) {
+ ExceptionMappingInfo info;
+
+ // break if
+ if (iaikExceptionClass.equals(Exception.class)) {
+ return null;
+ }
+
+ // look up the exception class
+ info = (ExceptionMappingInfo) messages.get(iaikExceptionClass);
+ if (info == null) {
+ return lookupMessage(iaikExceptionClass.getSuperclass());
+ }
+ return info;
+ }
+
+}
+
+/**
+ * A class containing a mapping from an error message ID to a
+ * <code>MOAException</code> class.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+class ExceptionMappingInfo {
+ /** The message ID. */
+ private String messageId;
+ /** The <code>MOAException</code> class. */
+ private Class moaExceptionClass;
+
+ /**
+ * Create a new <code>ExceptionMappingInfo</code>.
+ *
+ * @param messageId The message ID.
+ * @param moaExceptionClass The <code>MOAException</code> class.
+ */
+ public ExceptionMappingInfo(String messageId, Class moaExceptionClass) {
+ this.messageId = messageId;
+ this.moaExceptionClass = moaExceptionClass;
+ }
+
+ /**
+ * Return the message ID.
+ *
+ * @return The message ID.
+ */
+ public String getMessageId() {
+ return messageId;
+ }
+
+ /**
+ * Returns the <code>MOAException</code> class that the message ID maps to.
+ *
+ * @return The <code>MOAException</code> class.
+ */
+ public Class getMoaExceptionClass() {
+ return moaExceptionClass;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/InvokerUtils.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/InvokerUtils.java
new file mode 100644
index 000000000..a8447b835
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/InvokerUtils.java
@@ -0,0 +1,78 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.util.XPathException;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.api.common.ElementSelector;
+
+/**
+ * Utility methods for invoking the IAIK MOA modules.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class InvokerUtils {
+
+ /**
+ * Select the signature parent element.
+ *
+ * @param root The root DOM element which contains the signature parent
+ * element somewhere in its subtree.
+ * @param location The <code>ElementSelector</code> containing the XPath
+ * expression to select the signature parent element from the document.
+ * It is also contains the namespace prefix to URI mapping.
+ * @return Element The signature parent element.
+ * @throws MOAApplicationException An error occurred evaluating the
+ * <code>location</code>.
+ */
+ public static Element evaluateSignatureLocation(
+ Element root,
+ ElementSelector location)
+ throws MOAApplicationException {
+
+ NodeList nodes;
+
+ try {
+ nodes =
+ XPathUtils.selectNodeList(
+ root,
+ location.getNamespaceDeclarations(),
+ location.getXPathExpression());
+ } catch (XPathException e) {
+ throw new MOAApplicationException(
+ "2212",
+ new Object[] { location.getXPathExpression()},
+ e);
+ }
+
+ if (nodes.getLength() != 1
+ || !(nodes.item(0).getNodeType() == Node.ELEMENT_NODE)) {
+ throw new MOAApplicationException(
+ "2212",
+ new Object[] { location.getXPathExpression()});
+ }
+ return (Element) nodes.item(0);
+ }
+
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/ProfileMapper.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/ProfileMapper.java
new file mode 100644
index 000000000..3062012c4
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/ProfileMapper.java
@@ -0,0 +1,264 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.api.xmlbind.ProfileParser;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfile;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfileExplicit;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfileID;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfile;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfileExplicit;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfileID;
+import at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfile;
+import at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfileExplicit;
+import at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfileID;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfile;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfileExplicit;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfileID;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+
+/**
+ * Map ProfileID objects to their explicit represantation.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ProfileMapper {
+
+ /** The parser to parse the profiles. */
+ private static ProfileParser profileParser = new ProfileParser();
+
+ /**
+ * Map a <code>CreateTransformsInfoProfile</code> to a
+ * <code>CreateTransformsInfoProfileExplicit</code>.
+ *
+ * @param profile The profile object to map.
+ * @param config The MOA configuration to use for looking up the profile.
+ * @return <code>profile</code>, if the given profile is of type
+ * <code>EXPLICIT_CREATETRANSFORMSINFOPROFILE</code>, otherwise the profile
+ * that is looked up and parsed from the configuration.
+ * @throws MOAApplicationException An error occurred parsing the profile.
+ */
+ public static CreateTransformsInfoProfileExplicit mapCreateTransformsInfoProfile(
+ CreateTransformsInfoProfile profile,
+ ConfigurationProvider config)
+ throws MOAApplicationException {
+
+ switch (profile.getCreateTransformsInfoProfileType()) {
+ case CreateTransformsInfoProfile.EXPLICIT_CREATETRANSFORMSINFOPROFILE :
+ return (CreateTransformsInfoProfileExplicit) profile;
+
+ case CreateTransformsInfoProfile.ID_CREATETRANSFORMSINFOPROFILE :
+ CreateTransformsInfoProfileID profileIdObj =
+ (CreateTransformsInfoProfileID) profile;
+ String profileID = profileIdObj.getCreateTransformsInfoProfileID();
+ Element profileElem = config.getCreateTransformsInfoProfile(profileID);
+
+ if (profileElem == null) {
+ throw new MOAApplicationException("2234", new Object[] { profileID });
+ }
+
+ return (
+ CreateTransformsInfoProfileExplicit) profileParser
+ .parseCreateTransformsInfoProfile(
+ profileElem);
+ }
+ return null; // this will not happen
+ }
+
+ /**
+ * Map a <code>CreateSignatureEnvironmentProfile</code> to a
+ * <code>CreateSignatureEnvironmentProfileExplicit</code>.
+ *
+ * @param profile The profile object to map.
+ * @param config The MOA configuration to use for looking up the profile.
+ * @return <code>profile</code>, if the given profile is of type
+ * <code>EXPLICIT_CREATESIGNATUREENVIRONMENTPROFILE</code>, otherwise the
+ * profile that is looked up and parsed from the configuration.
+ * @throws MOAApplicationException An error occurred parsing the profile.
+ */
+ public static CreateSignatureEnvironmentProfileExplicit mapCreateSignatureEnvironmentProfile(
+ CreateSignatureEnvironmentProfile profile,
+ ConfigurationProvider config)
+ throws MOAApplicationException {
+
+ switch (profile.getCreateSignatureEnvironmentProfileType()) {
+ case CreateSignatureEnvironmentProfile
+ .EXPLICIT_CREATESIGNATUREENVIRONMENTPROFILE :
+
+ return (CreateSignatureEnvironmentProfileExplicit) profile;
+
+ case CreateSignatureEnvironmentProfile
+ .ID_CREATESIGNATUREENVIRONMENTPROFILE :
+
+ CreateSignatureEnvironmentProfileID profileIdObj =
+ (CreateSignatureEnvironmentProfileID) profile;
+ String profileID =
+ profileIdObj.getCreateSignatureEnvironmentProfileID();
+ Element profileElem =
+ config.getCreateSignatureEnvironmentProfile(profileID);
+
+ if (profileElem == null) {
+ throw new MOAApplicationException("2236", new Object[] { profileID });
+ }
+
+ return (
+ CreateSignatureEnvironmentProfileExplicit) profileParser
+ .parseCreateSignatureEnvironmentProfile(
+ profileElem);
+
+ }
+ return null;
+
+ }
+
+ /**
+ * Map a <code>List</code> of <code>SupplementProfile</code>s to their
+ * explicit representation.
+ *
+ * @param profiles The profiles to map.
+ * @param config The MOA configuration to use for looking up profiles.
+ * @return The mapped profiles.
+ * @throws MOAApplicationException An error occurred mapping one of the
+ * profiles.
+ */
+ public static List mapSupplementProfiles(
+ List profiles,
+ ConfigurationProvider config)
+ throws MOAApplicationException {
+
+ List mappedProfiles = new ArrayList();
+ Iterator iter;
+
+ for (iter = profiles.iterator(); iter.hasNext();) {
+ SupplementProfile profile = (SupplementProfile) iter.next();
+ mappedProfiles.add(mapSupplementProfile(profile, config));
+ }
+
+ return mappedProfiles;
+ }
+
+ /**
+ * Map a <code>SupplementProfile</code> to a
+ * <code>SupplementProfileExplicit</code>.
+ *
+ * @param profile The profile object to map.
+ * @param config The MOA configuration to use for looking up the profile.
+ * @return <code>profile</code>, if the given profile is of type
+ * <code>EXPLICIT_SUPPLEMENTPROFILE</code>, otherwise the
+ * profile that is looked up and parsed from the configuration.
+ * @throws MOAApplicationException An error occurred parsing the profile.
+ */
+ public static SupplementProfileExplicit mapSupplementProfile(
+ SupplementProfile profile,
+ ConfigurationProvider config)
+ throws MOAApplicationException {
+
+ switch (profile.getSupplementProfileType()) {
+ case SupplementProfile.EXPLICIT_SUPPLEMENTPROFILE :
+ return (SupplementProfileExplicit) profile;
+
+ case SupplementProfile.ID_SUPPLEMENTPROFILE :
+ SupplementProfileID profileIdObj = (SupplementProfileID) profile;
+ String profileID = profileIdObj.getSupplementProfileID();
+ Element profileElem = config.getSupplementProfile(profileID);
+
+ if (profileElem == null) {
+ throw new MOAApplicationException("2267", new Object[] { profileID });
+ }
+
+ return (
+ SupplementProfileExplicit) profileParser.parseSupplementProfile(
+ profileElem);
+ }
+
+ return null;
+ }
+
+ /**
+ * Map a <code>List</code> of <code>VerifyTransformsInfoProfile</code>s to
+ * their explicit representation.
+ *
+ * @param profiles The profiles to map.
+ * @param config The MOA configuration to use for looking up profiles.
+ * @return The mapped profiles.
+ * @throws MOAApplicationException An error occurred mapping one of the
+ * profiles.
+ */
+ public static List mapVerifyTransformsInfoProfiles(
+ List profiles,
+ ConfigurationProvider config)
+ throws MOAApplicationException {
+
+ List mappedProfiles = new ArrayList();
+ Iterator iter;
+
+ for (iter = profiles.iterator(); iter.hasNext();) {
+ VerifyTransformsInfoProfile profile =
+ (VerifyTransformsInfoProfile) iter.next();
+ mappedProfiles.add(mapVerifyTransformsInfoProfile(profile, config));
+ }
+
+ return mappedProfiles;
+ }
+
+ /**
+ * Map a <code>VerifyTransformsInfoProfile</code> to a
+ * <code>VerifyTransformsInfoProfileExplicit</code>.
+ *
+ * @param profile The profile object to map.
+ * @param config The MOA configuration to use for looking up the profile.
+ * @return <code>profile</code>, if the given profile is of type
+ * <code>EXPLICIT_VERIFYTRANSFORMSINFOPROFILE</code>, otherwise the
+ * profile that is looked up and parsed from the configuration.
+ * @throws MOAApplicationException An error occurred parsing the profile.
+ */
+ public static VerifyTransformsInfoProfileExplicit mapVerifyTransformsInfoProfile(
+ VerifyTransformsInfoProfile profile,
+ ConfigurationProvider config)
+ throws MOAApplicationException {
+
+ switch (profile.getVerifyTransformsInfoProfileType()) {
+ case VerifyTransformsInfoProfile.EXPLICIT_VERIFYTRANSFORMSINFOPROFILE :
+ return (VerifyTransformsInfoProfileExplicit) profile;
+
+ case VerifyTransformsInfoProfile.ID_VERIFYTRANSFORMSINFOPROFILE :
+ VerifyTransformsInfoProfileID profileIdObj =
+ (VerifyTransformsInfoProfileID) profile;
+ String profileID = profileIdObj.getVerifyTransformsInfoProfileID();
+ Element profileElem =
+ config.getVerifyTransformsInfoProfile(profileID);
+
+ if (profileElem == null) {
+ throw new MOAApplicationException("2268", new Object[] { profileID });
+ }
+
+ return (
+ VerifyTransformsInfoProfileExplicit) profileParser
+ .parseVerifyTransformsInfoProfile(
+ profileElem);
+ }
+
+ return null;
+ }
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/ServiceContextUtils.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/ServiceContextUtils.java
new file mode 100644
index 000000000..5f4a9b483
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/ServiceContextUtils.java
@@ -0,0 +1,66 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import at.gv.egovernment.moa.logging.LoggingContext;
+import at.gv.egovernment.moa.logging.LoggingContextManager;
+
+import at.gv.egovernment.moa.spss.server.config.ConfigurationException;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+
+/**
+ * A utility class for setting up and tearing down thread-local context
+ * information needed for calling the <code>Invoker</code> classes.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ServiceContextUtils {
+
+ /**
+ * Set up the thread-local context information needed for calling the various
+ * <code>Invoker</code> classes.
+ *
+ * @throws ConfigurationException An error occurred setting up the
+ * configuration in the <code>TransactionContext</code>.
+ */
+ public static void setUpContexts() throws ConfigurationException {
+ TransactionContextManager txMgr = TransactionContextManager.getInstance();
+ LoggingContextManager logMgr = LoggingContextManager.getInstance();
+ String transactionID = Thread.currentThread().getName();
+
+ if (txMgr.getTransactionContext() == null) {
+ TransactionContext ctx = new TransactionContext(transactionID, null, ConfigurationProvider.getInstance());
+ txMgr.setTransactionContext(ctx);
+ }
+
+ if (logMgr.getLoggingContext() == null) {
+ LoggingContext ctx = new LoggingContext(transactionID);
+ logMgr.setLoggingContext(ctx);
+ }
+ }
+
+ /**
+ * Tear down thread-local context information.
+ */
+ public static void tearDownContexts() {
+ TransactionContextManager.getInstance().setTransactionContext(null);
+ LoggingContextManager.getInstance().setLoggingContext(null);
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/SignatureCreationServiceImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/SignatureCreationServiceImpl.java
new file mode 100644
index 000000000..0d0c792ee
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/SignatureCreationServiceImpl.java
@@ -0,0 +1,60 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import java.util.Collections;
+
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.api.Configurator;
+import at.gv.egovernment.moa.spss.api.SignatureCreationService;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse;
+
+/**
+ * An implementation of the <code>SignatureCreationService</code>, using
+ * the <code>XMLSignatureCreationInvoker</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class SignatureCreationServiceImpl extends SignatureCreationService {
+
+ /**
+ * Create an XML signature.
+ *
+ * @param request The <code>CreateXMLSignatureRequest</code> containing
+ * information about the signature(s) to create.
+ * @return The created signature(s).
+ * @throws MOAException An error occurred creating the signature(s).
+ */
+ public CreateXMLSignatureResponse createXMLSignature(CreateXMLSignatureRequest request)
+ throws MOAException {
+
+ XMLSignatureCreationInvoker invoker =
+ XMLSignatureCreationInvoker.getInstance();
+ CreateXMLSignatureResponse response;
+
+ try {
+ Configurator.getInstance().init();
+ ServiceContextUtils.setUpContexts();
+ response = invoker.createXMLSignature(request, Collections.EMPTY_SET);
+ return response;
+ } finally {
+ ServiceContextUtils.tearDownContexts();
+ }
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/SignatureVerificationServiceImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/SignatureVerificationServiceImpl.java
new file mode 100644
index 000000000..cc61f6ee3
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/SignatureVerificationServiceImpl.java
@@ -0,0 +1,87 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.api.Configurator;
+import at.gv.egovernment.moa.spss.api.SignatureVerificationService;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse;
+
+/**
+ * An implementation of the <code>SignatureVerificationService</code> using
+ * the <code>XMLSignatureVerificationInvoker</code> and the
+ * <code>CMSSignatureVerificationInvoker</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class SignatureVerificationServiceImpl
+ extends SignatureVerificationService {
+
+ /**
+ * Verify a CMS signature.
+ *
+ * @param request The <code>VerifyCMSSignatureRequest</code> containing
+ * information about the signature verification.
+ * @return The result of the signature verification.
+ * @throws MOAException An error occurred during signature verification.
+ */
+ public VerifyCMSSignatureResponse verifyCMSSignature(VerifyCMSSignatureRequest request)
+ throws MOAException {
+
+ CMSSignatureVerificationInvoker invoker =
+ CMSSignatureVerificationInvoker.getInstance();
+ VerifyCMSSignatureResponse response;
+
+ try {
+ Configurator.getInstance().init();
+ ServiceContextUtils.setUpContexts();
+ response = invoker.verifyCMSSignature(request);
+ return response;
+ } finally {
+ ServiceContextUtils.tearDownContexts();
+ }
+ }
+
+ /**
+ * Verify an XML signature.
+ *
+ * @param request The <code>VerifyXMLSignatureRequest</code> containinig
+ * information about the signature verification.
+ * @return The result of the signature verification.
+ * @throws MOAException An error occurred during signature verification.
+ */
+ public VerifyXMLSignatureResponse verifyXMLSignature(VerifyXMLSignatureRequest request)
+ throws MOAException {
+
+ XMLSignatureVerificationInvoker invoker =
+ XMLSignatureVerificationInvoker.getInstance();
+ VerifyXMLSignatureResponse response;
+
+ try {
+ Configurator.getInstance().init();
+ ServiceContextUtils.setUpContexts();
+ response = invoker.verifyXMLSignature(request);
+ return response;
+ } finally {
+ ServiceContextUtils.tearDownContexts();
+ }
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/TransformationFactory.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/TransformationFactory.java
new file mode 100644
index 000000000..ae0bb4dc0
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/TransformationFactory.java
@@ -0,0 +1,273 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import iaik.server.modules.xml.Base64Transformation;
+import iaik.server.modules.xml.Canonicalization;
+import iaik.server.modules.xml.EnvelopedSignatureTransformation;
+import iaik.server.modules.xml.Transformation;
+import iaik.server.modules.xml.XPath2Transformation;
+import iaik.server.modules.xml.XPathTransformation;
+import iaik.server.modules.xml.XSLTTransformation;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.api.common.ExclusiveCanonicalizationTransform;
+import at.gv.egovernment.moa.spss.api.common.Transform;
+import at.gv.egovernment.moa.spss.api.common.XPathFilter;
+import at.gv.egovernment.moa.spss.api.common.XPathFilter2Transform;
+import at.gv.egovernment.moa.spss.api.common.XPathTransform;
+import at.gv.egovernment.moa.spss.api.common.XSLTTransform;
+import at.gv.egovernment.moa.spss.server.iaik.xml.Base64TransformationImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xml.CanonicalizationImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xml.EnvelopedSignatureTransformationImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xml.ExclusiveCanonicalizationImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xml.XPath2FilterImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xml.XPath2TransformationImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xml.XPathTransformationImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xml.XSLTTransformationImpl;
+
+/**
+ * A factory to create <code>Transformation</code> objects from
+ * <code>Transform</code> objects.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class TransformationFactory {
+
+
+ /** The single instance of this class. */
+ private static TransformationFactory instance = null;
+
+ /** Maps <code>XPathFilter</code> filter types to
+ * <code>XPath2Transformation</code> filter types. */
+ private static Map FILTER_TYPE_MAPPING;
+
+ static {
+ FILTER_TYPE_MAPPING = new HashMap();
+
+ FILTER_TYPE_MAPPING.put(
+ XPathFilter.INTERSECT_TYPE,
+ XPath2Transformation.XPath2Filter.INTERSECTION);
+ FILTER_TYPE_MAPPING.put(
+ XPathFilter.SUBTRACT_TYPE,
+ XPath2Transformation.XPath2Filter.SUBTRACTION);
+ FILTER_TYPE_MAPPING.put(
+ XPathFilter.UNION_TYPE,
+ XPath2Transformation.XPath2Filter.UNION);
+ }
+
+ /**
+ * Get the single instance of the factory.
+ *
+ * @return TransformationFactory The single instance.
+ */
+ public static synchronized TransformationFactory getInstance() {
+ if (instance == null) {
+ instance = new TransformationFactory();
+ }
+ return instance;
+ }
+
+ /**
+ * Create a new <code>TransformationFactory</code>.
+ *
+ * Protected to disallow multiple instances.
+ */
+ protected TransformationFactory() {
+ }
+
+ /**
+ * Create a <code>Transformation</code> based on a
+ * <code>Transform</code> object.
+ *
+ * @param transform The <code>Transform</code> object to extract
+ * transformation data from.
+ * @return The transformation contained in the <code>transform</code>
+ * object.
+ * @throws MOAApplicationException An error occured creating the
+ * <code>Transformation</code>. See exception message for details.
+ */
+ public Transformation createTransformation(Transform transform)
+ throws MOAApplicationException {
+ String algorithmUri = transform.getAlgorithmURI();
+
+ if (Canonicalization.CANONICAL_XML.equals(algorithmUri)
+ || Canonicalization.CANONICAL_XML_WITH_COMMENTS.equals(algorithmUri)) {
+ return createC14nTransformation(algorithmUri);
+ } else if (
+ Canonicalization.EXCLUSIVE_CANONICAL_XML.equals(algorithmUri)
+ || Canonicalization.EXCLUSIVE_CANONICAL_XML_WITH_COMMENTS.equals(
+ algorithmUri)) {
+
+ return createExclusiveC14nTransformation(
+ (ExclusiveCanonicalizationTransform) transform);
+
+ } else if (Base64Transformation.ALL.contains(algorithmUri)) {
+ return createBase64Transformation();
+ } else if (EnvelopedSignatureTransformation.ALL.contains(algorithmUri)) {
+ return createEnvelopedSignatureTransformation();
+ } else if (XPathTransformation.ALL.contains(algorithmUri)) {
+ return createXPathTransformation((XPathTransform) transform);
+ } else if (XPath2Transformation.ALL.contains(algorithmUri)) {
+ return createXPath2Transformation((XPathFilter2Transform) transform);
+ } else if (XSLTTransformation.ALL.contains(algorithmUri)) {
+ return createXSLTTransformation((XSLTTransform) transform);
+ } else {
+ throw new MOAApplicationException("1108", new Object[] { algorithmUri });
+ }
+ }
+
+ /**
+ * Create a <code>List</code> of <code>Transformation</code>s from a
+ * <code>List</code> of <code>Transform</code>s.
+ *
+ * @param transforms The <code>List</code> containing the
+ * <code>Transform</code>s.
+ * @return The <code>List</code> of <code>Transformation</code>s corresponding
+ * to the <code>transforms</code>.
+ * @throws MOAApplicationException An error occurred building one of the
+ * transformations. See exception message for details.
+ */
+ public List createTransformationList(List transforms)
+ throws MOAApplicationException {
+ List transformationList = new ArrayList();
+ Iterator trIter;
+
+ for (trIter = transforms.iterator(); trIter.hasNext();) {
+ Transform transform = (Transform) trIter.next();
+ transformationList.add(createTransformation(transform));
+ }
+
+ return transformationList;
+ }
+
+ /**
+ * Create a <code>Canonicalization</code>.
+ *
+ * @param algorithmUri The algorithm URI of the canonicalization.
+ * @return The <code>Canonicalization</code>.
+ */
+ private Transformation createC14nTransformation(String algorithmUri) {
+ return new CanonicalizationImpl(algorithmUri);
+ }
+
+ /**
+ * Create a <code>ExclusiveCanonicalization</code>.
+ *
+ * @param transform The <code>ExclusiveCanonicalizationTransform</code>
+ * containing the transformation data.
+ * @return The <code>ExclusiveCanonicalization</code>.
+ */
+ private Transformation createExclusiveC14nTransformation(ExclusiveCanonicalizationTransform transform) {
+ return new ExclusiveCanonicalizationImpl(
+ transform.getAlgorithmURI(),
+ transform.getInclusiveNamespacePrefixes());
+ }
+
+ /**
+ * Create a <code>Base64Transformation</code>.
+ *
+ * @return The <code></code>
+ */
+ private Transformation createBase64Transformation() {
+ return new Base64TransformationImpl();
+ }
+
+ /**
+ * Create an <code>EnvelopedSignatureTransformation</code>.
+ *
+ * @return An <code>EnvelopedSignatureTransformation</code>.
+ */
+ private Transformation createEnvelopedSignatureTransformation() {
+ return new EnvelopedSignatureTransformationImpl();
+ }
+
+ /**
+ * Create an <code>XPathTransformation</code>.
+ *
+ * @param transform The <code>Transform</code> object containing the
+ * XPath transformation.
+ * @return An <code>XPathTransformation</code> corresponding the
+ * transformation given in <code>transform</code>.
+ * @throws MOAApplicationException An error occurred creating the
+ * <code>Transformation</code>.
+ */
+ private Transformation createXPathTransformation(XPathTransform transform)
+ throws MOAApplicationException {
+
+ return new XPathTransformationImpl(
+ transform.getXPathExpression(),
+ transform.getNamespaceDeclarations());
+ }
+
+ /**
+ * Create an <code>XPath2Transformation</code>.
+ *
+ * @param transform The <code>Transform</code> object containing the
+ * XPath filter transformation.
+ * @return An <code>XPath2Transformation</code> corresponding the
+ * transformation given in <code>transform</code>.
+ * @throws MOAApplicationException An error occurred creating the
+ * <code>Transformation</code>.
+ */
+ private Transformation createXPath2Transformation(XPathFilter2Transform transform)
+ throws MOAApplicationException {
+
+ XPath2TransformationImpl xpath2 = new XPath2TransformationImpl();
+ Iterator iter;
+
+ for (iter = transform.getFilters().iterator(); iter.hasNext();) {
+ XPathFilter filter = (XPathFilter) iter.next();
+ String mappedFilterType =
+ (String) FILTER_TYPE_MAPPING.get(filter.getFilterType());
+ XPath2FilterImpl mappedFilter =
+ new XPath2FilterImpl(
+ mappedFilterType,
+ filter.getXPathExpression(),
+ filter.getNamespaceDeclarations());
+ xpath2.addXPathFilter(mappedFilter);
+ }
+
+ if (xpath2.getXPathFilters().size() == 0) {
+ throw new MOAApplicationException("2216", null);
+ }
+
+ return xpath2;
+ }
+
+ /**
+ * Create an <code>XSLTTransformation</code>.
+ *
+ * @param transform The <code>Transform</code> containing the XSLT stylesheet.
+ * @return An <code>XSLTTransformation</code> corresponding the transformation
+ * given in <code>transform</code>.
+ * @throws MOAApplicationException An error occurred creating the
+ * <code>Transformation</code>.
+ */
+ private Transformation createXSLTTransformation(XSLTTransform transform)
+ throws MOAApplicationException {
+
+ return new XSLTTransformationImpl(transform.getStylesheet());
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/VerifyCMSSignatureResponseBuilder.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/VerifyCMSSignatureResponseBuilder.java
new file mode 100644
index 000000000..dc23b5c2d
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/VerifyCMSSignatureResponseBuilder.java
@@ -0,0 +1,112 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import iaik.server.modules.cmsverify.CMSSignatureVerificationResult;
+import iaik.server.modules.cmsverify.CertificateValidationResult;
+import iaik.server.modules.xmlverify.XMLSignatureVerificationResult;
+
+import java.security.cert.X509Certificate;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.ListIterator;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponseElement;
+import at.gv.egovernment.moa.spss.api.common.CheckResult;
+import at.gv.egovernment.moa.spss.api.common.SignerInfo;
+import at.gv.egovernment.moa.spss.server.config.TrustProfile;
+import at.gv.egovernment.moa.spss.util.MessageProvider;
+
+/**
+ * A class to build a <code>VerifyCMSSignatureResponse</code> object.
+ *
+ * <p>Via subsequent calls to <code>addResult()</code> a number of results from
+ * a CMS signature verification can be added to the response.</p>
+ *
+ * <p>The <code>getResponseElement()</code> method then returns the
+ * <code>VerifyCMSSignatureResponse</code> built so far.</p>
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class VerifyCMSSignatureResponseBuilder {
+ /** The <code>SPSSFactory</code> for creating API objects. */
+ private SPSSFactory factory = SPSSFactory.getInstance();
+ /** The elements making up the response. */
+ private List responseElements = new ArrayList();
+
+ /**
+ * Get the <code>VerifyCMSSignatureResponse</code> built so far.
+ *
+ * @return The <code>VerifyCMSSignatureResponse</code> built so far.
+ */
+ public VerifyCMSSignatureResponse getResponse() {
+ return factory.createVerifyCMSSignatureResponse(responseElements);
+ }
+
+ /**
+ * Add a verification result to the response.
+ *
+ * @param result The result to add.
+ * @param trustprofile The actual trustprofile
+ * @throws MOAException
+ */
+ public void addResult(CMSSignatureVerificationResult result, TrustProfile trustProfile)
+ throws MOAException {
+
+ CertificateValidationResult certResult =
+ result.getCertificateValidationResult();
+ int signatureCheckCode =
+ result.getSignatureValueVerificationCode().intValue();
+ int certificateCheckCode = certResult.getValidationResultCode().intValue();
+
+ VerifyCMSSignatureResponseElement responseElement;
+ SignerInfo signerInfo;
+ CheckResult signatureCheck;
+ CheckResult certificateCheck;
+
+ // add SignerInfo element
+ signerInfo =
+ factory.createSignerInfo(
+ (X509Certificate) certResult.getCertificateChain().get(0),
+ certResult.isQualifiedCertificate(),
+ certResult.isPublicAuthorityCertificate(),
+ certResult.getPublicAuthorityID());
+
+ // add SignatureCheck element
+ signatureCheck = factory.createCheckResult(signatureCheckCode, null);
+
+ // add CertificateCheck element
+ certificateCheck = factory.createCheckResult(certificateCheckCode, null);
+
+
+
+ // build the response element
+ responseElement =
+ factory.createVerifyCMSSignatureResponseElement(
+ signerInfo,
+ signatureCheck,
+ certificateCheck);
+ responseElements.add(responseElement);
+ }
+
+
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/VerifyXMLSignatureResponseBuilder.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/VerifyXMLSignatureResponseBuilder.java
new file mode 100644
index 000000000..7d66811db
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/VerifyXMLSignatureResponseBuilder.java
@@ -0,0 +1,455 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import iaik.ixsil.algorithms.CanonicalizationAlgorithm;
+import iaik.ixsil.algorithms.CanonicalizationAlgorithmImplExclusiveCanonicalXMLWithComments;
+import iaik.server.modules.xml.BinaryDataObject;
+import iaik.server.modules.xml.DataObject;
+import iaik.server.modules.xml.XMLDataObject;
+import iaik.server.modules.xml.XMLNodeListDataObject;
+import iaik.server.modules.xmlverify.CertificateValidationResult;
+import iaik.server.modules.xmlverify.DsigManifest;
+import iaik.server.modules.xmlverify.HashUnavailableException;
+import iaik.server.modules.xmlverify.ReferenceData;
+import iaik.server.modules.xmlverify.ReferenceInfo;
+import iaik.server.modules.xmlverify.SecurityLayerManifest;
+import iaik.server.modules.xmlverify.XMLSignatureVerificationProfile;
+import iaik.server.modules.xmlverify.XMLSignatureVerificationResult;
+import iaik.x509.X509Certificate;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.w3c.dom.DocumentFragment;
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.common.CheckResult;
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.common.InputData;
+import at.gv.egovernment.moa.spss.api.common.SignerInfo;
+import at.gv.egovernment.moa.spss.api.impl.InputDataBinaryImpl;
+import at.gv.egovernment.moa.spss.api.impl.InputDataXMLImpl;
+import at.gv.egovernment.moa.spss.api.xmlverify.ManifestRefsCheckResultInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResult;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResultInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse;
+import at.gv.egovernment.moa.util.CollectionUtils;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.NodeListAdapter;
+
+/**
+ * A class to build a <code>VerifyXMLSignatureResponse</code> object.
+ *
+ * <p>Via a call to <code>addResult()</code> the only result of the
+ * signature verification must be added.</p>
+ *
+ * <p>The <code>getResponseElement()</code> method then returns the
+ * <code>VerifyXMLSignatureResponse</code> built so far.</p>
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class VerifyXMLSignatureResponseBuilder {
+
+ /** The <code>SPSSFactory</code> for creating API objects. */
+ private SPSSFactory factory = SPSSFactory.getInstance();
+
+ /** Information about the signer certificate. */
+ private SignerInfo signerInfo;
+ /** The hash input data. */
+ private List hashInputDatas;
+ /** The reference input data. */
+ private List referenceInputDatas;
+ /** The result of the signature check. */
+ private ReferencesCheckResult signatureCheck;
+ /** The result of the signature manifest check. */
+ private ReferencesCheckResult signatureManifestCheck;
+ /** The result of the XMLDsig manifest check. */
+ private List xmlDsigManifestChecks;
+ /** The result of the certificate check. */
+ private CheckResult certificateCheck;
+
+ /**
+ * Get the <code>VerifyMLSignatureResponse</code> built so far.
+ *
+ * @return The <code>VerifyXMLSignatureResponse</code> built so far.
+ */
+ public VerifyXMLSignatureResponse getResponse() {
+ return factory.createVerifyXMLSignatureResponse(
+ signerInfo,
+ hashInputDatas,
+ referenceInputDatas,
+ signatureCheck,
+ signatureManifestCheck,
+ xmlDsigManifestChecks,
+ certificateCheck);
+ }
+
+ /**
+ * Sets the verification result to the response.
+ *
+ * This method must be called exactly once to ensure a valid
+ * <code>VerifyXMLSignatureResponse</code>.
+ *
+ * @param result The result to set for the response.
+ * @param profile The profile used for verifying the signature.
+ * @param transformsSignatureManifestCheck The overall result for the signature
+ * manifest check.
+ * @param certificateCheck The overall result for the certificate check.
+ * @throws MOAApplicationException An error occurred adding the result.
+ */
+ public void setResult(
+ XMLSignatureVerificationResult result,
+ XMLSignatureVerificationProfile profile,
+ ReferencesCheckResult transformsSignatureManifestCheck,
+ CheckResult certificateCheck)
+ throws MOAApplicationException {
+
+ CertificateValidationResult certResult =
+ result.getCertificateValidationResult();
+ List referenceDataList;
+ ReferenceData referenceData;
+ List dsigManifestList;
+ ReferencesCheckResultInfo checkResultInfo;
+ int[] failedReferences;
+ Iterator iter;
+
+ // create the SignerInfo;
+ signerInfo =
+ factory.createSignerInfo(
+ (X509Certificate) certResult.getCertificateChain().get(0),
+ certResult.isQualifiedCertificate(),
+ certResult.isPublicAuthorityCertificate(),
+ certResult.getPublicAuthorityID());
+
+ // Create HashInputData Content objects
+ referenceDataList = result.getReferenceDataList();
+ if (profile.includeHashInputData()) {
+ hashInputDatas = new ArrayList();
+
+ // Include SignedInfo references
+ addHashInputDatas(
+ hashInputDatas,
+ referenceDataList,
+ InputData.CONTAINER_SIGNEDINFO_,
+ InputData.REFERER_NONE_);
+
+ // Include XMLDSIGManifest references
+ List xMLDSIGManifests = result.getDsigManifestList();
+ for (iter = xMLDSIGManifests.iterator(); iter.hasNext();)
+ {
+ DsigManifest currentMF = (DsigManifest) iter.next();
+ List xMLDSIGMFReferenceDataList = currentMF.getReferenceDataList();
+ addHashInputDatas(
+ hashInputDatas,
+ xMLDSIGMFReferenceDataList,
+ InputData.CONTAINER_XMLDSIGMANIFEST_,
+ currentMF.getReferringReferenceInfo().getReferenceIndex());
+ }
+ }
+
+ // Create the ReferenceInputData Content objects
+ if (profile.includeReferenceInputData()) {
+ referenceInputDatas = new ArrayList();
+
+ // Include SignedInfo references
+ addReferenceInputDatas(
+ referenceInputDatas,
+ referenceDataList,
+ InputData.CONTAINER_SIGNEDINFO_,
+ InputData.REFERER_NONE_);
+
+ // Include XMLDSIGManifest references
+ List xMLDSIGManifests = result.getDsigManifestList();
+ for (iter = xMLDSIGManifests.iterator(); iter.hasNext();)
+ {
+ DsigManifest currentMF = (DsigManifest) iter.next();
+ List xMLDSIGMFReferenceDataList = currentMF.getReferenceDataList();
+ addReferenceInputDatas(
+ referenceInputDatas,
+ xMLDSIGMFReferenceDataList,
+ InputData.CONTAINER_XMLDSIGMANIFEST_,
+ currentMF.getReferringReferenceInfo().getReferenceIndex());
+ }
+ }
+
+ // create the signature check
+ failedReferences = buildFailedReferences(result.getReferenceDataList());
+ checkResultInfo =
+ failedReferences != null
+ ? factory.createReferencesCheckResultInfo(null, failedReferences)
+ : null;
+ signatureCheck =
+ factory.createReferencesCheckResult(
+ result.getSignatureValueVerificationCode().intValue(),
+ checkResultInfo);
+
+ // create the signature manifest check
+ if (profile.checkSecurityLayerManifest())
+ {
+ if (transformsSignatureManifestCheck.getCode() == 1)
+ {
+ // checking the transforms failed
+ signatureManifestCheck = transformsSignatureManifestCheck;
+ }
+ else if (result.isSecurityLayerManifestRequired())
+ {
+ if (!result.containsSecurityLayerManifest())
+ {
+ // required security layer manifest is missing in signature
+ signatureManifestCheck = factory.createReferencesCheckResult(2, null);
+ }
+ else
+ {
+ // security layer manifest exists, so we have to check its validity
+ SecurityLayerManifest slManifest = result.getSecurityLayerManifest();
+ int verificationResult = slManifest.getManifestVerificationResult().intValue();
+
+ if (SecurityLayerManifest.CODE_MANIFEST_VALID.intValue() == verificationResult)
+ {
+ // security layer manifest exists and is free of errors
+ signatureManifestCheck = factory.createReferencesCheckResult(0, null);
+ }
+ else
+ {
+ // security layer manifest exists, but has errors
+ failedReferences = buildFailedReferences(slManifest.getReferenceDataList());
+ checkResultInfo = (failedReferences != null)
+ ? factory.createReferencesCheckResultInfo(null, failedReferences)
+ : null;
+ if (SecurityLayerManifest.CODE_MANIFEST_INCOMPLETE.intValue() == verificationResult)
+ {
+ signatureManifestCheck = factory.createReferencesCheckResult(3, checkResultInfo);
+ }
+ else if (SecurityLayerManifest.CODE_REFERENCE_HASH_INVALID.intValue() == verificationResult)
+ {
+ signatureManifestCheck = factory.createReferencesCheckResult(4, checkResultInfo);
+ }
+ else
+ {
+ // Should not happen
+ throw new RuntimeException("Unexpected result from security layer manifest verification.");
+ }
+ }
+ }
+ }
+ else
+ {
+ // no security layer manifest is required, so the signature manifest check is ok
+ signatureManifestCheck = factory.createReferencesCheckResult(0, null);
+ }
+ }
+
+ // create the xmlDsigManifestCheck
+ if (profile.checkXMLDsigManifests()) {
+ xmlDsigManifestChecks = new ArrayList();
+ dsigManifestList = result.getDsigManifestList();
+ for (iter = dsigManifestList.iterator(); iter.hasNext();) {
+ DsigManifest dsigManifest = (DsigManifest) iter.next();
+ int refIndex =
+ dsigManifest.getReferringReferenceInfo().getReferenceIndex();
+ ManifestRefsCheckResultInfo manifestCheckResultInfo;
+
+ failedReferences =
+ buildFailedReferences(dsigManifest.getReferenceDataList());
+ manifestCheckResultInfo =
+ factory.createManifestRefsCheckResultInfo(
+ null,
+ failedReferences,
+ refIndex);
+ xmlDsigManifestChecks.add(
+ factory.createManifestRefsCheckResult(
+ dsigManifest.getManifestVerificationResult().intValue(),
+ manifestCheckResultInfo));
+ }
+ }
+
+ // create the certificate check
+ this.certificateCheck = certificateCheck;
+
+
+
+ }
+
+ /**
+ * Adds {@link InputData} entries to the specified <code>inputDatas</code> list. The content of the entry will
+ * be created from {@link ReferenceData#getHashInputData()}.
+ *
+ * @param inputDatas The list to be amended.
+ *
+ * @param referenceDataList The list of {@link ReferenceData} objects to be investigated.
+ *
+ * @param containerType The type of container of the {@link InputData} objects to be created.
+ *
+ * @param refererNumber The number of the referring reference for the {@link InputData} objects to be created.
+ *
+ * @throws MOAApplicationException if creating an {@link InputData} fails.
+ */
+ private void addHashInputDatas(List inputDatas, List referenceDataList, String containerType, int refererNumber)
+ throws MOAApplicationException
+ {
+ for (Iterator iter = referenceDataList.iterator(); iter.hasNext();)
+ {
+ ReferenceData referenceData = (ReferenceData) iter.next();
+ inputDatas.add(buildInputData(
+ referenceData.getHashInputData(),
+ containerType,
+ refererNumber));
+ }
+ }
+
+ /**
+ * Adds {@link InputData} entries to the specified <code>inputDatas</code> list. The content of the entry will
+ * be created from {@link ReferenceData#getReferenceInputData()}.
+ *
+ * @param inputDatas The list to be amended.
+ *
+ * @param referenceDataList The list of {@link ReferenceData} objects to be investigated.
+ *
+ * @param containerType The type of container of the {@link InputData} objects to be created.
+ *
+ * @param refererNumber The number of the referring reference for the {@link InputData} objects to be created.
+ *
+ * @throws MOAApplicationException if creating an {@link InputData} fails.
+ */
+ private void addReferenceInputDatas(List inputDatas, List referenceDataList, String containerType, int refererNumber)
+ throws MOAApplicationException
+ {
+ for (Iterator iter = referenceDataList.iterator(); iter.hasNext();)
+ {
+ ReferenceData referenceData = (ReferenceData) iter.next();
+ inputDatas.add(buildInputData(
+ referenceData.getReferenceInputData(),
+ containerType,
+ refererNumber));
+ }
+ }
+
+ /**
+ * Build a <code>InputDataBinaryImpl</code> or an <code>InputDataXMLImpl</code>
+ * object from the given <code>DataObject</code> and the given attributes.
+ *
+ * @param dataObject The <code>DataObject</code> from which to build the result.
+ * Based on the type of this parameter, the type of the result will either be
+ * <code>InputDataBinaryImpl</code> or <code>InputDataXMLImpl</code>.
+ *
+ * @param partof see {@link InputData}
+ *
+ * @param referringReferenceNumber see {@link InputData}
+ *
+ * @return The corresponinding input data implementation.
+ *
+ * @throws MOAApplicationException An error occurred creating the result.
+ */
+ private Content buildInputData(DataObject dataObject, String partOf, int referringReferenceNumber)
+ throws MOAApplicationException {
+
+ if (dataObject instanceof BinaryDataObject) {
+ BinaryDataObject binaryData = (BinaryDataObject) dataObject;
+ return new InputDataBinaryImpl(
+ factory.createContent(binaryData.getInputStream(), null),
+ partOf,
+ referringReferenceNumber);
+ } else if (dataObject instanceof XMLDataObject) {
+ XMLDataObject xmlData = (XMLDataObject) dataObject;
+ List nodes = new ArrayList();
+
+ nodes.add(xmlData.getElement());
+ return new InputDataXMLImpl(
+ factory.createContent(new NodeListAdapter(nodes), null),
+ partOf,
+ referringReferenceNumber);
+ } else { // dataObject instanceof XMLNodeListDataObject
+ // if the data in the NodeList can be converted back to valid XML,
+ // write it as XMLContent; otherwise, write it as Base64Content
+ XMLNodeListDataObject nodeData = (XMLNodeListDataObject) dataObject;
+ NodeList nodes = nodeData.getNodeList();
+
+ if (DOMUtils.checkAttributeParentsInNodeList(nodes)) {
+ // insert as XMLContent
+ try {
+ DocumentFragment fragment = DOMUtils.nodeList2DocumentFragment(nodes);
+
+ return new InputDataXMLImpl(
+ factory.createContent(fragment.getChildNodes(), null),
+ partOf,
+ referringReferenceNumber);
+ } catch (Exception e) {
+ // not successful -> fall through to the Base64Content
+ }
+ }
+
+ // insert canonicalized NodeList as binary content
+ try {
+ CanonicalizationAlgorithm c14n =
+ new CanonicalizationAlgorithmImplExclusiveCanonicalXMLWithComments();
+ InputStream is;
+
+ c14n.setInput(nodes);
+ is = c14n.canonicalize();
+ return new InputDataBinaryImpl(
+ factory.createContent(is, null),
+ partOf,
+ referringReferenceNumber);
+ } catch (Exception e) {
+ throw new MOAApplicationException("2200", null);
+ }
+ }
+ }
+
+ /**
+ * Build the failed references.
+ *
+ * Failed references are references for which the <code>isHashValid()</code>
+ * method returns <code>false</code>.
+ *
+ * @param refInfos A <code>List</code> containing the
+ * <code>ReferenceInfo</code> objects to be checked.
+ * @return The indexes of the failed references.
+ */
+ private int[] buildFailedReferences(List refInfos) {
+ List failedReferencesList = new ArrayList();
+ int i;
+
+ // find out the failed references
+ for (i = 0; i < refInfos.size(); i++) {
+ ReferenceInfo refInfo = (ReferenceInfo) refInfos.get(i);
+
+ try {
+ if (refInfo.isHashCalculated() && !refInfo.isHashValid()) {
+ failedReferencesList.add(new Integer(i + 1));
+ }
+ } catch (HashUnavailableException e) {
+ // nothing to do here because we called refInfo.isHashCalculated first
+ }
+ }
+
+ // convert to an int array
+ if (failedReferencesList.isEmpty()) {
+ return null;
+ } else {
+ int[] failedReferences = CollectionUtils.toIntArray(failedReferencesList);
+
+ return failedReferences;
+ }
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureCreationInvoker.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureCreationInvoker.java
new file mode 100644
index 000000000..660f8a5b3
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureCreationInvoker.java
@@ -0,0 +1,560 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import iaik.IAIKException;
+import iaik.IAIKRuntimeException;
+import iaik.server.modules.xml.DataObject;
+import iaik.server.modules.xml.XMLDataObject;
+import iaik.server.modules.xml.XMLSignature;
+import iaik.server.modules.xmlsign.XMLSignatureCreationModule;
+import iaik.server.modules.xmlsign.XMLSignatureCreationModuleFactory;
+import iaik.server.modules.xmlsign.XMLSignatureCreationProfile;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.logging.LoggingContext;
+import at.gv.egovernment.moa.logging.LoggingContextManager;
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.MOASystemException;
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfileExplicit;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureLocation;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfileExplicit;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse;
+import at.gv.egovernment.moa.spss.api.xmlsign.DataObjectInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.SingleSignatureInfo;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.iaik.xml.XMLDataObjectImpl;
+import at.gv.egovernment.moa.spss.server.logging.IaikLog;
+import at.gv.egovernment.moa.spss.server.logging.TransactionId;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+import at.gv.egovernment.moa.spss.server.util.IdGenerator;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+/**
+ * A class providing an API based interface to the
+ * <code>XMLSignatureCreationModule</code>.
+ *
+ * This class performs the invocation of the
+ * <code>iaik.server.modules.xmlsign.XMLSignatureCreationModule</code> from a
+ * <code>CreateXMLSignatureRequest</code> given as an API object. The result of
+ * the invocation is integrated into a <code>CreateXMLSignatureResponse</code>
+ * and returned.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XMLSignatureCreationInvoker {
+
+ /** The single instance of this class. */
+ private static XMLSignatureCreationInvoker instance = null;
+
+ /**
+ * Get the only instance of this class.
+ *
+ * @return The only instance of this class.
+ */
+ public static synchronized XMLSignatureCreationInvoker getInstance() {
+ if (instance == null) {
+ instance = new XMLSignatureCreationInvoker();
+ }
+ return instance;
+ }
+
+ /**
+ * Create a new <code>XMLSignatureCreationInvoker</code>.
+ *
+ * Protected to disallow multiple instances.
+ */
+ protected XMLSignatureCreationInvoker() {
+ }
+
+ /**
+ * Process the <code>CreateXMLSignatureRequest<code> message and invoke the
+ * <code>XMLSignatureCreationModule</code> for every
+ * <code>SingleSignatureInfo</code> contained in the request.
+ *
+ * @param request A <code>CreateXMLSignatureRequest<code> API object
+ * containing the information for creating the signature(s).
+ * @param reserved A <code>Set</code> of reserved object IDs.
+ *
+ * @return A <code>CreateXMLSignatureResponse</code> API object containing
+ * the created signature(s). The response contains either a
+ * <code>SignatureEnvironment</code> or a <code>ErrorResponse</code>
+ * for each <code>SingleSignatureInfo</code> in the request.
+ * @throws MOAException An error occurred during signature creation.
+ */
+ public CreateXMLSignatureResponse createXMLSignature(
+ CreateXMLSignatureRequest request,
+ Set reserved)
+ throws MOAException {
+
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ LoggingContext loggingCtx =
+ LoggingContextManager.getInstance().getLoggingContext();
+ reserved = new HashSet(reserved);
+ XMLSignatureCreationProfileFactory profileFactory =
+ new XMLSignatureCreationProfileFactory(request, reserved);
+ CreateXMLSignatureResponseBuilder responseBuilder =
+ new CreateXMLSignatureResponseBuilder();
+ int createCount = 1;
+ IdGenerator refIdGen;
+ XMLSignatureCreationModule module;
+ Iterator singleSignatureInfoIter;
+
+ // create the XMLSignatureCreationModule and configure it
+ module = XMLSignatureCreationModuleFactory.getInstance();
+ module.setLog(new IaikLog(loggingCtx.getNodeID()));
+
+ // select the SingleSignatureInfo elements
+ singleSignatureInfoIter = request.getSingleSignatureInfos().iterator();
+
+ // iterate over all the SingleSignatureInfo elements in the request
+ while (singleSignatureInfoIter.hasNext()) {
+ SingleSignatureInfo singleSignatureInfo =
+ (SingleSignatureInfo) singleSignatureInfoIter.next();
+ CreateSignatureInfo createSignatureInfo;
+ List dataObjectList;
+ XMLSignatureCreationProfile profile;
+ XMLDataObject signatureEnvironment;
+ XMLDataObject signatureParent;
+ XMLSignature signature;
+ List additionalSignedProperties;
+ Node signatureEnvironmentParent = null;
+ Element requestElement = null;
+
+ try {
+
+ // build the signature environment
+ createSignatureInfo = singleSignatureInfo.getCreateSignatureInfo();
+ if (createSignatureInfo != null) {
+ DataObjectFactory dataObjFactory = DataObjectFactory.getInstance();
+
+ signatureEnvironment =
+ dataObjFactory.createSignatureEnvironment(
+ createSignatureInfo.getCreateSignatureEnvironment(),
+ getCreateSignatureEnvironmentProfileSupplements(singleSignatureInfo));
+ } else {
+ signatureEnvironment = null;
+ }
+
+ HashSet sigInfoReservedIDs = new HashSet();
+ if (signatureEnvironment != null)
+ {
+ // Find Id attributes of existing XML signatures in signature environment
+ HashMap nSMap = new HashMap();
+ String dsp = Constants.DSIG_PREFIX;
+ nSMap.put(dsp, Constants.DSIG_NS_URI);
+ String xPathExpr = "//" + dsp + ":Signature/@Id | //" + dsp + ":Reference/@Id | //"
+ + dsp + ":Object/@Id | //" + dsp + ":Manifest/@Id";
+ NodeList idAttrs = XPathUtils.selectNodeList(signatureEnvironment.getElement(), nSMap, xPathExpr);
+
+ // Add found Id attributes to set of reserved IDs
+ for (int i = 0; i < idAttrs.getLength(); i++) sigInfoReservedIDs.add(idAttrs.item(i).getNodeValue());
+ }
+
+ // create the reference id generator
+ HashSet allReservedIDs = new HashSet(reserved);
+ allReservedIDs.addAll(sigInfoReservedIDs);
+ refIdGen = new IdGenerator("reference-" + createCount++, allReservedIDs);
+
+ // build the list of DataObjects
+ List createTransformsProfiles = profileFactory.getCreateTransformsInfoProfiles(singleSignatureInfo);
+ dataObjectList =
+ buildDataObjectList(
+ singleSignatureInfo,
+ createTransformsProfiles,
+ signatureEnvironment,
+ refIdGen);
+
+ // build the XMLSignatureCreationProfile
+ profile = profileFactory.createProfile(singleSignatureInfo, sigInfoReservedIDs);
+
+ // build the additionalSignedProperties
+ additionalSignedProperties = buildAdditionalSignedProperties();
+
+ // build the signatureParentElement
+ if (signatureEnvironment != null) {
+ signatureParent =
+ buildSignatureParentElement(
+ signatureEnvironment.getElement(),
+ singleSignatureInfo);
+ } else {
+ signatureParent = null;
+ }
+
+ // make the signature environment the root of the document, if it is
+ // not a separate document anyway; this is done to assure that
+ // canonicalization of the signature environment contains the correct
+ // namespace declarations
+ if (signatureEnvironment != null) {
+ Document requestDoc =
+ signatureEnvironment.getElement().getOwnerDocument();
+ requestElement = requestDoc.getDocumentElement();
+ if (requestElement != signatureEnvironment.getElement()) {
+ signatureEnvironmentParent =
+ signatureEnvironment.getElement().getParentNode();
+ requestElement.getOwnerDocument().replaceChild(
+ signatureEnvironment.getElement(),
+ requestElement);
+ }
+ }
+
+ try {
+ // create the signature
+ signature =
+ module.createSignature(
+ dataObjectList,
+ profile,
+ additionalSignedProperties,
+ signatureParent,
+ new TransactionId(context.getTransactionID()));
+
+ // insert the result into the response
+ if (signatureParent != null) {
+ responseBuilder.addSignatureEnvironment(
+ signatureEnvironment.getElement());
+ } else {
+ responseBuilder.addSignatureEnvironment(signature.getElement());
+ }
+
+ } catch (IAIKException e) {
+ MOAException moaException = IaikExceptionMapper.getInstance().map(e);
+
+ responseBuilder.addError(
+ moaException.getMessageId(),
+ moaException.getMessage());
+ Logger.warn(moaException.getMessage(), e);
+ } catch (IAIKRuntimeException e) {
+ MOAException moaException = IaikExceptionMapper.getInstance().map(e);
+
+ responseBuilder.addError(
+ moaException.getMessageId(),
+ moaException.getMessage());
+ Logger.warn(moaException.getMessage(), e);
+ }
+
+ // swap back in the request as root document
+ if (signatureEnvironment != null) {
+ if (requestElement != signatureEnvironment.getElement()) {
+ requestElement.getOwnerDocument().replaceChild(
+ requestElement,
+ signatureEnvironment.getElement());
+ signatureEnvironmentParent.appendChild(
+ signatureEnvironment.getElement());
+ }
+ }
+
+ } catch (MOAException e) {
+ responseBuilder.addError(e.getMessageId(), e.getMessage());
+ Logger.warn(e.getMessage(), e);
+ }
+
+ }
+
+ return responseBuilder.getResponse();
+ }
+
+ /**
+ * Build the list of <code>DataObject</code>s from the given
+ * <code>SingleSignatureInfo</code> object.
+ *
+ * <p>
+ * Only the following cases of <code>DataObject</code>s are
+ * valid in case of an enveloping signature:
+ *
+ * <ul>
+ * <li><code>Reference == null && Content != null</code>: The
+ * <code>Content</code> will be used in the <code>DataObject</code>.</li>
+ * <li><code>Reference != null && Content == null</code>: Resolve the
+ * <code>Reference</code> and use it as <code>DataObject</code>.
+ * Set the <code>Reference</code> in the <code>DataObject</code> as well.</li>
+ * </ul>
+ * </p>
+ *
+ * <p>
+ * Only the following cases of <code>DataObject</code>s are valid in case
+ * of a detached signature:
+ *
+ * <ul>
+ * <li><code>Reference != null && Content == null</code>: Resolve the
+ * <code>Reference</code> and use it as <code>DataObject</code>.
+ * Set the <code>Reference</code> in the <code>DataObject</code> as well.</li>
+ * <li><code>Reference != null && Content != null</code>: The
+ * <code>Content</code> will be used in the <code>DataObject</code>.
+ * Set the <code>Reference</code> in the <code>DataObject</code> as well.</li>
+ * </ul>
+ * </p>
+ *
+ * <p>
+ * All other cases will lead to an error.
+ * </p>
+ *
+ * @param singleSignatureInfo The <code>SingleSignatureInfo</code> object
+ * containing the <code>DataObjectInfo</code> objects.
+ * @param createTransformsProfiles A list of objects of type {@link CreateTransformsInfoProfileExplicit},
+ * each representing the transforms info profile information for the corresponding <code>DataObject</code>.
+ * @param signatureEnvironment The
+ * @param idGen The ID generator for <code>DataObject</code> references.
+ * @return The <code>List</code> of <code>DataObject</code>s contained in the
+ * given <code>singleSignatureInfo</code>.
+ * @throws MOASystemException A system error occurred building the data
+ * objects.
+ * @throws MOAApplicationException An error occurred building the data
+ * objects.
+ */
+ private List buildDataObjectList(
+ SingleSignatureInfo singleSignatureInfo,
+ List createTransformsProfiles,
+ XMLDataObject signatureEnvironment,
+ IdGenerator idGen)
+ throws MOASystemException, MOAApplicationException {
+
+ List dataObjInfos = singleSignatureInfo.getDataObjectInfos();
+ List dataObjects = new ArrayList();
+ Iterator dtIter;
+ Iterator ctpIter = createTransformsProfiles.iterator();
+
+ for (dtIter = dataObjInfos.iterator(); dtIter.hasNext();)
+ {
+ DataObjectInfo dataObjInfo = (DataObjectInfo) dtIter.next();
+ String structure = dataObjInfo.getStructure();
+
+ CreateTransformsInfoProfileExplicit transformsProfile =
+ (CreateTransformsInfoProfileExplicit) ctpIter.next();
+ MetaInfo finalDataMetaInfo = transformsProfile.getCreateTransformsInfo().getFinalDataMetaInfo();
+
+ if (DataObjectInfo.STRUCTURE_ENVELOPING.equals(structure)) {
+ dataObjects.add(
+ buildEnvelopingDataObject(
+ dataObjInfo.getDataObject(),
+ finalDataMetaInfo,
+ idGen.uniqueId()));
+ } else if (DataObjectInfo.STRUCTURE_DETACHED.equals(structure)) {
+ dataObjects.add(
+ buildDetachedDataObject(
+ dataObjInfo.getDataObject(),
+ finalDataMetaInfo,
+ signatureEnvironment,
+ idGen.uniqueId()));
+ } else {
+ throw new MOAApplicationException("1103", new Object[] { structure });
+ }
+ }
+
+ return dataObjects;
+
+ }
+
+ /**
+ * Build a <code>DataObject</code> to be used in an enveloping
+ * signature.
+ *
+ * @param content The <code>Content</code> object containing the data object.
+ * <code>ContentOptionalRefType</code>.
+ * @param finalDataMetaInfo The meta information corresponding with <code>content</code>.
+ * @param referenceID The reference ID to use in the signature for the
+ * <code>DataObject</code> created.
+ * @return The <code>DataObject</code> representing the data contained in
+ * <code>dataObjectElem</code>.
+ * @throws MOAApplicationException An error occurred during the creation of
+ * the <code>DataObject</code>.
+ * @throws MOASystemException A system error occurred during the creation of
+ * the <code>DataObject</code>.
+ */
+ private DataObject buildEnvelopingDataObject(
+ Content content,
+ MetaInfo finalDataMetaInfo,
+ String referenceID)
+ throws MOASystemException, MOAApplicationException {
+
+ DataObjectFactory factory = DataObjectFactory.getInstance();
+ DataObject dataObject;
+
+ dataObject =
+ factory.createFromContentOptionalRefType(
+ content,
+ finalDataMetaInfo,
+ referenceID,
+ false,
+ false,
+ true,
+ false);
+
+ return dataObject;
+ }
+
+ /**
+ * Build a <code>DataObject</code> to be used in a detached signature.
+ *
+ * @param content The <code>Content</code> object containing an the data.
+ * @param finalDataMetaInfo The meta information corresponding with <code>content</code>.
+ * @param signatureEnvironment The signature environment where the signature
+ * will be inserted.
+ * @param referenceID The reference ID to use in the signature for the
+ * <code>DataObject</code> created.
+ * @return The <code>DataObject</code> representing the data contained in
+ * <code>dataObjectElem</code>.
+ * @throws MOAApplicationException An error occurred during the creation of
+ * the <code>DataObject</code>.
+ * @throws MOASystemException A system error occurred during the creation of
+ * the <code>DataObject</code>.
+ */
+ private DataObject buildDetachedDataObject(
+ Content content,
+ MetaInfo finalDataMetaInfo,
+ XMLDataObject signatureEnvironment,
+ String referenceID)
+ throws MOASystemException, MOAApplicationException {
+
+ String reference = content.getReference();
+ DataObjectFactory factory = DataObjectFactory.getInstance();
+ DataObject dataObject;
+
+ if (reference == null) {
+ throw new MOAApplicationException("1102", null);
+ } else if ("".equals(reference) || reference.startsWith("#")) {
+ dataObject =
+ factory.createFromSignatureEnvironment(
+ signatureEnvironment.getElement(),
+ reference,
+ referenceID);
+ } else {
+ dataObject =
+ factory.createFromContentOptionalRefType(
+ content,
+ finalDataMetaInfo,
+ referenceID,
+ true,
+ false,
+ true,
+ false);
+ }
+ return dataObject;
+ }
+
+ /**
+ * Build the signature parent element.
+ *
+ * @param signatureEnvironment The signature environment containing the
+ * document in which to insert the signature.
+ * @param singleSignatureInfo The <code>SingleSignatureInfo</code>
+ * containing the signature parent element.
+ * @return An <code>XMLDataObject</code> containing the signature parent
+ * element or <code>null</code>, if the <code>CreateSignatureInfo</code> is
+ * <code>null</code>.
+ * @throws MOAApplicationException An error occurred during the creation of
+ * the signature parent.
+ */
+ private XMLDataObject buildSignatureParentElement(
+ Element signatureEnvironment,
+ SingleSignatureInfo singleSignatureInfo)
+ throws MOAApplicationException {
+
+ CreateSignatureInfo createInfo =
+ singleSignatureInfo.getCreateSignatureInfo();
+
+ // evaluate the CreateSignatureLocation
+ if (createInfo != null) {
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ ConfigurationProvider config = context.getConfiguration();
+ CreateSignatureEnvironmentProfileExplicit createProfile =
+ ProfileMapper.mapCreateSignatureEnvironmentProfile(
+ createInfo.getCreateSignatureEnvironmentProfile(),
+ config);
+ CreateSignatureLocation location =
+ createProfile.getCreateSignatureLocation();
+ Element signatureParent =
+ InvokerUtils.evaluateSignatureLocation(signatureEnvironment, location);
+
+ return new XMLDataObjectImpl(signatureParent);
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Get the supplements contained in the
+ * <code>CreateSignatureEnvironmentProfile</code> of the given
+ * <code>SingleSignatureInfo</code>.
+ *
+ * @param singleSigInfo The <code>SingleSignatureInfo</code> from which
+ * to extract the supplements.
+ * @return A <code>List</code> of <code>XMLDataObjectAssociation</code>s
+ * or <code>null</code>, if the <code>singleSigInfo</code> does not contain
+ * supplements.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>CreateSignatureEnvironmentProfile</code>.
+ */
+ private List getCreateSignatureEnvironmentProfileSupplements(SingleSignatureInfo singleSigInfo)
+ throws MOAApplicationException {
+ CreateSignatureInfo sigInfo = singleSigInfo.getCreateSignatureInfo();
+
+ if (sigInfo != null) {
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ ConfigurationProvider config = context.getConfiguration();
+ CreateSignatureEnvironmentProfileExplicit profile =
+ ProfileMapper.mapCreateSignatureEnvironmentProfile(
+ sigInfo.getCreateSignatureEnvironmentProfile(),
+ config);
+ List supplements = profile.getSupplements();
+
+ return supplements;
+ }
+ return null;
+ }
+
+ /**
+ * Build the list of additional signed properties.
+ *
+ * Based on the generic configuration setting
+ * <code>ConfigurationProvider.TEST_SIGNING_TIME_PROPERTY</code>, a
+ * constant <code>SigningTime</code> will be added to the properties.
+ *
+ * @return The <code>List</code> of additional signed properties.
+ */
+ private List buildAdditionalSignedProperties() {
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ ConfigurationProvider config = context.getConfiguration();
+ List additionalSignedProperties = Collections.EMPTY_LIST;
+
+ return additionalSignedProperties;
+ }
+
+} \ No newline at end of file
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureCreationProfileFactory.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureCreationProfileFactory.java
new file mode 100644
index 000000000..8537cc6f2
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureCreationProfileFactory.java
@@ -0,0 +1,470 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import iaik.server.modules.algorithms.HashAlgorithms;
+import iaik.server.modules.keys.KeyEntryID;
+import iaik.server.modules.keys.KeyModule;
+import iaik.server.modules.keys.KeyModuleFactory;
+import iaik.server.modules.xmlsign.SignatureStructureTypes;
+import iaik.server.modules.xmlsign.XMLSignatureCreationProfile;
+import iaik.server.modules.xmlsign.XMLSignatureInsertionLocation;
+
+import java.math.BigInteger;
+import java.security.Principal;
+import java.security.cert.X509Certificate;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import at.gv.egovernment.moa.logging.LogMsg;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.MOASystemException;
+import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfileExplicit;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfileExplicit;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlsign.DataObjectInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.SingleSignatureInfo;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.config.KeyGroupEntry;
+import at.gv.egovernment.moa.spss.server.iaik.xml.CanonicalizationImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xmlsign.DataObjectTreatmentImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xmlsign.XMLSignatureCreationProfileImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xmlsign.XMLSignatureInsertionLocationImpl;
+import at.gv.egovernment.moa.spss.server.logging.TransactionId;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+import at.gv.egovernment.moa.spss.server.util.IdGenerator;
+import at.gv.egovernment.moa.spss.util.MessageProvider;
+import at.gv.egovernment.moa.util.Constants;
+
+/**
+ * A factory to create <code>XMLSignatureCreationProfile</code>s from a
+ * <code>CreateXMLSignatureRequest</code>, based on the current MOA
+ * configuration.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XMLSignatureCreationProfileFactory {
+
+ private static Map HASH_ALGORITHM_MAPPING;
+
+ static {
+ HASH_ALGORITHM_MAPPING = new HashMap();
+ HASH_ALGORITHM_MAPPING.put(Constants.SHA1_URI, HashAlgorithms.SHA1);
+ }
+
+ /** The <code>CreateXMLSignatureRequest</code> for which to create the
+ * profile.*/
+ private CreateXMLSignatureRequest request;
+ /** How many profiles have been created based on the same request. */
+ private int createProfileCount;
+ /** The <code>Set</code> of reserved object IDs.*/
+ private Set reserved;
+
+ /**
+ * Create a new <code>XMLSignatureCreationProfileFactory</code>.
+ *
+ * @param request The request for which to create profiles.
+ * @param reserved The <code>Set</code> of reserved object IDs. IDs will
+ * be added during signature creation.
+ */
+ public XMLSignatureCreationProfileFactory(
+ CreateXMLSignatureRequest request,
+ Set reserved) {
+ this.request = request;
+ this.reserved = reserved;
+ createProfileCount = 1;
+ }
+
+ /**
+ * Create a <code>XMLSignatureCreationProfile</code> for the given
+ * <code>SingleSignatureInfo</code> object..
+ *
+ * @param singleSignatureInfo The <code>SingleSignatureInfo</code> object
+ * containing information about the creation of a signature.
+ * @param sigInfoReservedIDs The <code>Set</code> of reserved ID attribue values
+ * for the particular <code>singleSignatureInfo</code>.
+ * @return The <code>XMLSignatureCreationProfile</code> containing additional
+ * information for creating an XML signature.
+ * @throws MOASystemException A system error occurred during creation of the
+ * profile. See message for details
+ * @throws MOAApplicationException An application error occurred during
+ * creation of the profile. See message for details.
+ */
+ public XMLSignatureCreationProfile createProfile(SingleSignatureInfo singleSignatureInfo,
+ Set sigInfoReservedIDs) throws MOASystemException, MOAApplicationException {
+
+ HashSet allReservedIDs = new HashSet(reserved);
+ allReservedIDs.addAll(sigInfoReservedIDs);
+
+ XMLSignatureCreationProfileImpl profile =
+ new XMLSignatureCreationProfileImpl(createProfileCount, allReservedIDs);
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ ConfigurationProvider config = context.getConfiguration();
+ CanonicalizationImpl canonicalization;
+ List dataObjectTreatmentList;
+ String keyGroupID;
+ Set keySet;
+ List transformationSupplements;
+ List createTransformsProfiles;
+
+ // build the transformation supplements
+ createTransformsProfiles =
+ getCreateTransformsInfoProfiles(singleSignatureInfo);
+ transformationSupplements =
+ buildTransformationSupplements(createTransformsProfiles);
+
+ // build and set the data object treatment list
+ dataObjectTreatmentList =
+ buildDataObjectTreatmentList(
+ singleSignatureInfo,
+ createTransformsProfiles,
+ transformationSupplements,
+ allReservedIDs);
+ profile.setDataObjectTreatmentList(dataObjectTreatmentList);
+
+ // set the key set
+ keyGroupID = request.getKeyIdentifier();
+ keySet = buildKeySet(keyGroupID);
+ if (keySet == null) {
+ throw new MOAApplicationException("2231", null);
+ } else if (keySet.size() == 0) {
+ throw new MOAApplicationException("2232", null);
+ }
+ profile.setKeySet(keySet);
+
+ // set the Security Layer manifest algorithm name
+ profile.setSecurityLayerManifestTypeURI(Constants.SL_MANIFEST_TYPE_URI);
+
+ // set the structure type
+ if (singleSignatureInfo.getCreateSignatureInfo() != null) {
+ profile.setSignatureStructureType(SignatureStructureTypes.ENVELOPED);
+ } else {
+ profile.setSignatureStructureType(SignatureStructureTypes.DETACHED);
+ }
+
+ // set insertion location
+ profile.setSignatureInsertionLocation(
+ getSignatureInsertionLocationIndex(singleSignatureInfo));
+
+ // set the canonicalization algorithm
+ canonicalization =
+ new CanonicalizationImpl(config.getCanonicalizationAlgorithmName());
+ profile.setSignedInfoCanonicalization(canonicalization);
+
+ // set the signed properties
+ profile.setSignedProperties(Collections.EMPTY_LIST);
+
+ // set security layer conformity
+ profile.setSecurityLayerConform(
+ singleSignatureInfo.isSecurityLayerConform());
+
+ // update the createProfileCount
+ createProfileCount++;
+
+ return profile;
+ }
+
+ /**
+ * Get the <code>List</code> of all <code>CreateTransformsInfoProfile</code>s
+ * contained in all the <code>DataObjectInfo</code>s of the given
+ * <code>SingleSignatureInfo</code>.
+ *
+ * @param singleSignatureInfo The <code>SingleSignatureInfo</code> object from
+ * which to extract the <code>CreateTransformsInfoProfile</code>s.
+ * @return All <code>CreateTransformsInfoProfile</code>s of all
+ * <code>DataObjectInfo</code>s of <code>singleSignatureInfo</code>.
+ * @throws MOAApplicationException An error occurred creating one of the
+ * profiles.
+ */
+ List getCreateTransformsInfoProfiles(SingleSignatureInfo singleSignatureInfo)
+ throws MOAApplicationException {
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ ConfigurationProvider config = context.getConfiguration();
+ List dataObjInfos = singleSignatureInfo.getDataObjectInfos();
+ List profiles = new ArrayList();
+ Iterator dtIter;
+
+ for (dtIter = dataObjInfos.iterator(); dtIter.hasNext();) {
+ DataObjectInfo dataObjInfo = (DataObjectInfo) dtIter.next();
+ CreateTransformsInfoProfileExplicit profile =
+ ProfileMapper.mapCreateTransformsInfoProfile(
+ dataObjInfo.getCreateTransformsInfoProfile(),
+ config);
+ profiles.add(profile);
+ }
+
+ return profiles;
+ }
+
+ /**
+ * Build the <code>List</code> of transformation supplements contained in a
+ * <code>SingleSignatureInfo</code> object.
+ *
+ * @param createTransformsInfoProfiles The
+ * <code>CreateTransformsInfoProfile</code> object from which to extract the
+ * transformation supplements.
+ * @return A <code>List</code> of <code>DataObject</code>s containing the
+ * transformation supplements.
+ * @throws MOASystemException A system error occurred creating one of the
+ * transformation supplements.
+ * @throws MOAApplicationException An error occurred creating one of the
+ * transformation supplements.
+ */
+ private List buildTransformationSupplements(List createTransformsInfoProfiles)
+ throws MOASystemException, MOAApplicationException {
+
+ List transformationSupplements = new ArrayList();
+ DataObjectFactory factory = DataObjectFactory.getInstance();
+ Iterator iter;
+
+ for (iter = createTransformsInfoProfiles.iterator(); iter.hasNext();) {
+ CreateTransformsInfoProfileExplicit profile =
+ (CreateTransformsInfoProfileExplicit) iter.next();
+ List supplements = profile.getSupplements();
+
+ if (supplements != null) {
+ Iterator supplIter;
+
+ for (supplIter = supplements.iterator(); supplIter.hasNext();) {
+ XMLDataObjectAssociation supplement =
+ (XMLDataObjectAssociation) supplIter.next();
+
+ transformationSupplements.add(
+ factory.createFromXmlDataObjectAssociation(
+ supplement,
+ false,
+ true));
+ }
+ }
+ }
+
+ return transformationSupplements;
+ }
+
+ /**
+ * Build the <code>List</code> of <code>DataObjectTreatment</code>s for the
+ * given <code>SingleSignatureInfo</code> object..
+ *
+ * @param singleSignatureInfo The <code>SingleSignatureInfo</code> object
+ * from which to exctract the <code>CreateTransformsInfoProfile</code>s
+ * containing the data for the <code>DataObjectTreatment</code>s.
+ * @param createTransformsInfoProfiles The
+ * <code>CreateTransformsInfoProfile</code>s contained in the
+ * <code>singleSignatureInfo</code>.
+ * @param transformationSupplements Additional parameters for
+ * transformations contained in <code>DataObjectTreatment</code>s.
+ * @param reservedIDs The <code>Set</code> of reserved object IDs.
+ * @return A <code>List</code> of <code>DataObjectTreatment</code> objects.
+ * @throws MOAApplicationException An error occurred building one of the
+ * <code>DataObjectTreatment</code>s.
+ * @throws MOASystemException A system error occurred building one of the
+ * <code>DataObjectTreatment</code>s.
+ */
+ private List buildDataObjectTreatmentList(
+ SingleSignatureInfo singleSignatureInfo,
+ List createTransformsInfoProfiles,
+ List transformationSupplements,
+ Set reservedIDs)
+ throws MOASystemException, MOAApplicationException {
+
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ ConfigurationProvider config = context.getConfiguration();
+ List treatments = new ArrayList();
+ List dataObjInfos = singleSignatureInfo.getDataObjectInfos();
+ int dataObjectTreatmentCount = 1;
+ String hashAlgorithmName;
+ Iterator dtIter;
+ Iterator prIter;
+
+ prIter = createTransformsInfoProfiles.iterator();
+ for (dtIter = dataObjInfos.iterator(); dtIter.hasNext();) {
+ CreateTransformsInfoProfileExplicit profile =
+ (CreateTransformsInfoProfileExplicit) prIter.next();
+ DataObjectInfo dataObjInfo = (DataObjectInfo) dtIter.next();
+ IdGenerator objIdGen =
+ new IdGenerator(
+ ("signed-data-" + createProfileCount)
+ + ("-" + dataObjectTreatmentCount++),
+ reservedIDs);
+ DataObjectTreatmentImpl treatment = new DataObjectTreatmentImpl(objIdGen);
+
+ treatment.setFinalContentType(
+ profile.getCreateTransformsInfo().getFinalDataMetaInfo().getMimeType());
+ treatment.setTransformationList(buildTransformationList(profile));
+ treatment.setReferenceInManifest(dataObjInfo.isChildOfManifest());
+
+ hashAlgorithmName =
+ (String) HASH_ALGORITHM_MAPPING.get(
+ config.getDigestMethodAlgorithmName());
+ if (hashAlgorithmName == null) {
+ error(
+ "config.17",
+ new Object[] { config.getDigestMethodAlgorithmName()});
+ throw new MOASystemException("2900", null);
+ }
+
+ treatment.setHashAlgorithmName(hashAlgorithmName);
+ treatment.setIncludedInSignature(
+ DataObjectInfo.STRUCTURE_ENVELOPING.equals(dataObjInfo.getStructure()));
+ treatment.setTransformationSupplements(transformationSupplements);
+
+ treatments.add(treatment);
+
+ }
+
+ return treatments;
+ }
+
+ /**
+ * Build the <code>List</code> of transformations contained in a
+ * <code>CreateTransformsInfoProfile</code> object.
+ *
+ * @param profile The <code>CreateTransformsInfoProfile</code> object
+ * from which to extract the <code>Transform</code>s.
+ * @return A <code>List</code> of <code>Transformation</code>s contained in
+ * the given <code>CreateTransformsInfoProfile</code>.
+ * @throws MOAApplicationException An error occurred building one of the
+ * <code>Transformation</code>s.
+ */
+ private List buildTransformationList(CreateTransformsInfoProfileExplicit profile)
+ throws MOAApplicationException {
+
+ TransformationFactory factory = TransformationFactory.getInstance();
+ List transforms = profile.getCreateTransformsInfo().getTransforms();
+
+ return transforms != null
+ ? factory.createTransformationList(transforms)
+ : Collections.EMPTY_LIST;
+ }
+
+ /**
+ * Build the set of <code>KeyEntryID</code>s available to the given
+ * <code>keyGroupID</code>.
+ *
+ * @param keyGroupID The keygroup ID for which the available keys should be
+ * returned.
+ * @return The <code>Set</code> of <code>KeyEntryID</code>s
+ * identifying the available keys.
+ */
+ private Set buildKeySet(String keyGroupID) {
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ ConfigurationProvider config = context.getConfiguration();
+ Set keyGroupEntries;
+
+ // get the KeyGroup entries from the configuration
+ if (context.getClientCertificate() != null) {
+ X509Certificate cert = context.getClientCertificate()[0];
+ Principal issuer = cert.getIssuerDN();
+ BigInteger serialNumber = cert.getSerialNumber();
+
+ keyGroupEntries =
+ config.getKeyGroupEntries(issuer, serialNumber, keyGroupID);
+ } else {
+ keyGroupEntries = config.getKeyGroupEntries(null, null, keyGroupID);
+ }
+
+ // map the KeyGroup entries to a set of KeyEntryIDs
+ if (keyGroupEntries == null) {
+ return null;
+ } else if (keyGroupEntries.size() == 0) {
+ return Collections.EMPTY_SET;
+ } else {
+ KeyModule module =
+ KeyModuleFactory.getInstance(
+ new TransactionId(context.getTransactionID()));
+ Set keyEntryIDs = module.getPrivateKeyEntryIDs();
+ Set keySet = new HashSet();
+ Iterator iter;
+
+ // filter out the keys that do not exist in the IAIK configuration
+ // by walking through the key entries and checking if the exist in the
+ // keyGroupEntries
+ for (iter = keyEntryIDs.iterator(); iter.hasNext();) {
+ KeyEntryID entryID = (KeyEntryID) iter.next();
+ KeyGroupEntry entry =
+ new KeyGroupEntry(
+ entryID.getModuleID(),
+ entryID.getCertificateIssuer(),
+ entryID.getCertificateSerialNumber());
+ if (keyGroupEntries.contains(entry)) {
+ keySet.add(entryID);
+ }
+ }
+ return keySet;
+ }
+ }
+
+ /**
+ * Get the signature location index where the signature will be inserted into
+ * the signature parent element.
+ *
+ * @param singleSignatureInfo The <code>SingleSignatureInfo</code> object
+ * containing the <code>CreateSignatureLocation</code>.
+ * @return The index at which to insert the signature into the signature
+ * environment.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>CreateSignatureEnvironmentProfile</code>.
+ */
+ private XMLSignatureInsertionLocation getSignatureInsertionLocationIndex(SingleSignatureInfo singleSignatureInfo)
+ throws MOAApplicationException {
+
+ CreateSignatureInfo createInfo =
+ singleSignatureInfo.getCreateSignatureInfo();
+
+ if (createInfo != null) {
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ ConfigurationProvider config = context.getConfiguration();
+ CreateSignatureEnvironmentProfileExplicit profile =
+ ProfileMapper.mapCreateSignatureEnvironmentProfile(
+ createInfo.getCreateSignatureEnvironmentProfile(),
+ config);
+ int index = profile.getCreateSignatureLocation().getIndex();
+
+ return new XMLSignatureInsertionLocationImpl(index);
+ } else {
+ return new XMLSignatureInsertionLocationImpl(0);
+ }
+ }
+
+ /**
+ * Utility function to issue an error message to the log.
+ *
+ * @param messageId The ID of the message to log.
+ * @param parameters Additional message parameters.
+ */
+ private static void error(String messageId, Object[] parameters) {
+ MessageProvider msg = MessageProvider.getInstance();
+
+ Logger.error(new LogMsg(msg.getMessage(messageId, parameters)));
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvoker.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvoker.java
new file mode 100644
index 000000000..eb6275b3a
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvoker.java
@@ -0,0 +1,693 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import iaik.IAIKException;
+import iaik.IAIKRuntimeException;
+import iaik.ixsil.exceptions.URIException;
+import iaik.ixsil.util.URI;
+import iaik.server.modules.xml.DataObject;
+import iaik.server.modules.xml.XMLDataObject;
+import iaik.server.modules.xml.XMLSignature;
+import iaik.server.modules.xmlsign.XMLConstants;
+import iaik.server.modules.xmlverify.DsigManifest;
+import iaik.server.modules.xmlverify.ReferenceData;
+import iaik.server.modules.xmlverify.SecurityLayerManifest;
+import iaik.server.modules.xmlverify.XMLSignatureVerificationModule;
+import iaik.server.modules.xmlverify.XMLSignatureVerificationModuleFactory;
+import iaik.server.modules.xmlverify.XMLSignatureVerificationProfile;
+import iaik.server.modules.xmlverify.XMLSignatureVerificationResult;
+import iaik.x509.X509Certificate;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
+import java.util.Set;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+import at.gv.egovernment.moa.logging.LogMsg;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.logging.LoggingContext;
+import at.gv.egovernment.moa.logging.LoggingContextManager;
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.MOASystemException;
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.common.CheckResult;
+import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferenceInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResult;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResultInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfileExplicit;
+import at.gv.egovernment.moa.spss.api.xmlverify.TransformParameter;
+import at.gv.egovernment.moa.spss.api.xmlverify.TransformParameterHash;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureLocation;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfileExplicit;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.config.TrustProfile;
+import at.gv.egovernment.moa.spss.server.iaik.xml.XMLSignatureImpl;
+import at.gv.egovernment.moa.spss.server.logging.IaikLog;
+import at.gv.egovernment.moa.spss.server.logging.TransactionId;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+import at.gv.egovernment.moa.spss.util.MessageProvider;
+import at.gv.egovernment.moa.util.CollectionUtils;
+import at.gv.egovernment.moa.util.Constants;
+
+/**
+ * A class providing a DOM based interface to the
+ * <code>XMLSignatureVerificationModule</code>.
+ *
+ * This class performs the invocation of the
+ * <code>iaik.server.modules.xmlverify.XMLSignatureVerificationModule</code>
+ * from a <code>VerifyXMLSignatureRequest</code> given as a DOM element. The
+ * result of the invocation is integrated into a
+ * <code>VerifyXMLSignatureResponse</code> and returned.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XMLSignatureVerificationInvoker {
+
+ /** The single instance of this class. */
+ private static XMLSignatureVerificationInvoker instance = null;
+
+ private static Set FILTERED_REF_TYPES;
+
+ static {
+ FILTERED_REF_TYPES = new HashSet();
+ FILTERED_REF_TYPES.add(DsigManifest.XML_DSIG_MANIFEST_TYPE);
+ FILTERED_REF_TYPES.add(SecurityLayerManifest.SECURITY_LAYER_MANIFEST_TYPE);
+ FILTERED_REF_TYPES.add(SecurityLayerManifest.SECURITY_LAYER_MANIFEST_TYPE_OLD);
+ FILTERED_REF_TYPES.add(XMLConstants.NAMESPACE_ETSI_STRING + "SignedProperties");
+ }
+
+ /**
+ * Get the single instance of this class.
+ *
+ * @return The single instance of this class.
+ */
+ public static synchronized XMLSignatureVerificationInvoker getInstance() {
+ if (instance == null) {
+ instance = new XMLSignatureVerificationInvoker();
+ }
+ return instance;
+ }
+
+ /**
+ * Create a new <code>XMLSignatureCreationInvoker</code>.
+ *
+ * Protected to disallow multiple instances.
+ */
+ protected XMLSignatureVerificationInvoker() {
+ }
+
+ /**
+ * Process the <code>VerifyXMLSignatureRequest<code> message and invoke the
+ * <code>XMLSignatureVerificationModule</code>.
+ *
+ * @param request A <code>VerifyXMLSignatureRequest<code> API object
+ * containing the data for verifying an XML signature.
+ * @return A <code>VerifyXMLSignatureResponse</code> containing the
+ * answert to the <code>VerifyXMLSignatureRequest</code>.
+ * MOA schema definition.
+ * @throws MOAException An error occurred during signature verification.
+ */
+ public VerifyXMLSignatureResponse verifyXMLSignature(VerifyXMLSignatureRequest request)
+ throws MOAException {
+
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ LoggingContext loggingCtx =
+ LoggingContextManager.getInstance().getLoggingContext();
+ XMLSignatureVerificationProfileFactory profileFactory =
+ new XMLSignatureVerificationProfileFactory(request);
+ VerifyXMLSignatureResponseBuilder responseBuilder =
+ new VerifyXMLSignatureResponseBuilder();
+ XMLSignatureVerificationResult result;
+ XMLSignatureVerificationProfile profile;
+ ReferencesCheckResult signatureManifestCheck;
+ DataObjectFactory dataObjFactory;
+ XMLDataObject signatureEnvironment;
+ Node signatureEnvironmentParent = null;
+ Element requestElement = null;
+ XMLSignature xmlSignature;
+ Date signingTime;
+ List supplements;
+ List dataObjectList;
+
+ // get the supplements
+ supplements = getSupplements(request);
+
+ // build XMLSignature
+ dataObjFactory = DataObjectFactory.getInstance();
+ signatureEnvironment =
+ dataObjFactory.createSignatureEnvironment(
+ request.getSignatureInfo().getVerifySignatureEnvironment(),
+ supplements);
+ xmlSignature = buildXMLSignature(signatureEnvironment, request);
+
+ // build the list of DataObjects
+ dataObjectList = buildDataObjectList(supplements);
+
+ // build profile
+ profile = profileFactory.createProfile();
+
+ // get the signingTime
+ signingTime = request.getDateTime();
+
+ // make the signature environment the root of the document, if it is not a
+ // separate document anyway; this is done to assure that canonicalization
+ // of the signature environment contains the correct namespace declarations
+ requestElement =
+ signatureEnvironment.getElement().getOwnerDocument().getDocumentElement();
+ if (requestElement != signatureEnvironment.getElement()) {
+ signatureEnvironmentParent =
+ signatureEnvironment.getElement().getParentNode();
+ requestElement.getOwnerDocument().replaceChild(
+ signatureEnvironment.getElement(),
+ requestElement);
+ }
+
+ // verify the signature
+ try {
+ XMLSignatureVerificationModule module =
+ XMLSignatureVerificationModuleFactory.getInstance();
+
+ module.setLog(new IaikLog(loggingCtx.getNodeID()));
+
+ result =
+ module.verifySignature(
+ xmlSignature,
+ dataObjectList,
+ profile,
+ signingTime,
+ new TransactionId(context.getTransactionID()));
+ } catch (IAIKException e) {
+ MOAException moaException = IaikExceptionMapper.getInstance().map(e);
+ throw moaException;
+ } catch (IAIKRuntimeException e) {
+ MOAException moaException = IaikExceptionMapper.getInstance().map(e);
+ throw moaException;
+ }
+
+ // swap back in the request as root document
+ if (requestElement != signatureEnvironment.getElement()) {
+ requestElement.getOwnerDocument().replaceChild(
+ requestElement,
+ signatureEnvironment.getElement());
+ signatureEnvironmentParent.appendChild(signatureEnvironment.getElement());
+ }
+
+
+ // check the result
+ signatureManifestCheck =
+ validateSignatureManifest(request, result, profile);
+
+ // Check if signer certificate is in trust profile's allowed signer certificates pool
+ TrustProfile trustProfile = context.getConfiguration().getTrustProfile(request.getTrustProfileId());
+ CheckResult certificateCheck = validateSignerCertificate(result, trustProfile);
+
+
+ // build the response
+ responseBuilder.setResult(result, profile, signatureManifestCheck, certificateCheck);
+
+ return responseBuilder.getResponse();
+ }
+
+ /**
+ * Checks if the signer certificate matches one of the allowed signer certificates specified
+ * in the provided <code>trustProfile</code>.
+ *
+ * @param result The result produced by the <code>XMLSignatureVerificationModule</code>.
+ *
+ * @param trustProfile The trust profile the signer certificate is validated against.
+ *
+ * @return The overal result of the certificate validation for the signer certificate.
+ *
+ * @throws MOAException if one of the signer certificates specified in the <code>trustProfile</code>
+ * cannot be read from the file system.
+ */
+ private CheckResult validateSignerCertificate(XMLSignatureVerificationResult result, TrustProfile trustProfile)
+ throws MOAException
+ {
+ MessageProvider msg = MessageProvider.getInstance();
+
+ int resultCode = result.getCertificateValidationResult().getValidationResultCode().intValue();
+ if (resultCode == 0 && trustProfile.getSignerCertsUri() != null)
+ {
+ X509Certificate signerCertificate = (X509Certificate) result.getCertificateValidationResult().getCertificateChain().get(0);
+
+ File signerCertsDir = null;
+ try
+ {
+ signerCertsDir = new File(new URI(trustProfile.getSignerCertsUri()).getPath());
+ }
+ catch (URIException e)
+ {
+ throw new MOASystemException("2900", null, e); // Should not happen, already checked at loading the MOA configuration
+ }
+
+ File[] files = signerCertsDir.listFiles();
+ if (files == null) resultCode = 1;
+ int i;
+ for (i = 0; i < files.length; i++)
+ {
+ if (!files[i].isDirectory())
+ {
+ FileInputStream currentFIS = null;
+ try
+ {
+ currentFIS = new FileInputStream(files[i]);
+ }
+ catch (FileNotFoundException e) {
+ throw new MOASystemException("2900", null, e);
+ }
+
+ try
+ {
+ X509Certificate currentCert = new X509Certificate(currentFIS);
+ currentFIS.close();
+ if (currentCert.equals(signerCertificate)) break;
+ }
+ catch (Exception e)
+ {
+ // Simply ignore file if it cannot be interpreted as certificate
+ String logMsg = msg.getMessage("invoker.03", new Object[]{trustProfile.getId(), files[i].getName()});
+ Logger.warn(logMsg);
+ try
+ {
+ currentFIS.close();
+ }
+ catch (IOException e1) {
+ // If clean-up fails, do nothing
+ }
+ }
+ }
+ }
+ if (i >= files.length)
+ {
+ resultCode = 1; // No signer certificate from the trustprofile pool matches the actual signer certificate
+ }
+ }
+
+ SPSSFactory factory = SPSSFactory.getInstance();
+ return factory.createCheckResult(resultCode, null);
+ }
+
+
+
+ /**
+ * Select the <code>dsig:Signature</code> DOM element within the signature
+ * environment.
+ *
+ * @param signatureEnvironment The signature environment containing the
+ * <code>dsig:Signature</code>.
+ * @param request The <code>VerifyXMLSignatureRequest</code> containing the
+ * signature environment.
+ * @return The <code>dsig:Signature</code> element wrapped in a
+ * <code>XMLSignature</code> object.
+ * @throws MOAApplicationException An error occurred locating the
+ * <code>dsig:Signature</code>.
+ */
+ private XMLSignature buildXMLSignature(
+ XMLDataObject signatureEnvironment,
+ VerifyXMLSignatureRequest request)
+ throws MOAApplicationException {
+
+ VerifySignatureLocation signatureLocation =
+ request.getSignatureInfo().getVerifySignatureLocation();
+ Element signatureParent;
+
+ // evaluate the VerifySignatureLocation to get the signature parent
+ signatureParent =
+ InvokerUtils.evaluateSignatureLocation(
+ signatureEnvironment.getElement(),
+ signatureLocation);
+
+ // check for signatureParent to be a dsig:Signature element
+ if (!"Signature".equals(signatureParent.getLocalName())
+ || !Constants.DSIG_NS_URI.equals(signatureParent.getNamespaceURI())) {
+ throw new MOAApplicationException("2266", null);
+ }
+
+ return new XMLSignatureImpl(signatureParent);
+ }
+
+ /**
+ * Build the supplemental data objects contained in the
+ * <code>VerifyXMLSignatureRequest</code>.
+ *
+ * @param supplements A <code>List</code> of
+ * <code>XMLDataObjectAssociation</code>s containing the supplement data.
+ * @return A <code>List</code> of <code>DataObject</code>s representing the
+ * supplemental data objects.
+ * @throws MOASystemException A system error occurred building one of the data
+ * objects.
+ * @throws MOAApplicationException An error occurred building one of the data
+ * objects.
+ */
+ private List buildDataObjectList(List supplements)
+ throws MOASystemException, MOAApplicationException {
+ List dataObjectList = new ArrayList();
+
+ DataObjectFactory factory = DataObjectFactory.getInstance();
+ DataObject dataObject;
+ Iterator iter;
+
+ if (supplements != null) {
+ for (iter = supplements.iterator(); iter.hasNext();) {
+ XMLDataObjectAssociation supplement =
+ (XMLDataObjectAssociation) iter.next();
+ dataObject =
+ factory.createFromXmlDataObjectAssociation(supplement, true, false);
+ dataObjectList.add(dataObject);
+ }
+ }
+
+ return dataObjectList;
+
+ }
+
+ /**
+ * Get the supplemental data contained in the
+ * <code>VerifyXMLSignatureRequest</code>.
+ *
+ * @param request The <code>VerifyXMLSignatureRequest</code> containing the
+ * supplemental data.
+ * @return A <code>List</code> of <code>XMLDataObjectAssociation</code>
+ * objects containing the supplemental data.
+ * @throws MOAApplicationException An error occurred resolving one of the
+ * supplement profiles.
+ */
+ private List getSupplements(VerifyXMLSignatureRequest request)
+ throws MOAApplicationException {
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ ConfigurationProvider config = context.getConfiguration();
+ List supplementProfiles = request.getSupplementProfiles();
+
+ List supplements = new ArrayList();
+
+ if (supplementProfiles != null) {
+
+ List mappedProfiles =
+ ProfileMapper.mapSupplementProfiles(supplementProfiles, config);
+ Iterator iter;
+
+ for (iter = mappedProfiles.iterator(); iter.hasNext();) {
+ SupplementProfileExplicit profile =
+ (SupplementProfileExplicit) iter.next();
+ supplements.add(profile.getSupplementProfile());
+ }
+
+ }
+ return supplements;
+ }
+
+ /**
+ * Perform additional validations of the
+ * <code>XMLSignatureVerificationResult</code>.
+ *
+ * <p> In particular, it is verified that:
+ * <ul>
+ * <li>Each <code>ReferenceData</code> object contains transformation
+ * chain that matches one of the <code>Transforms</code> given in the
+ * corresponding <code>SignatureManifestCheckParams/ReferenceInfo</code></li>
+ * <li>The hash values of the <code>TransformParameter</code>s are valid.
+ * </li>
+ * </ul>
+ * </p>
+ *
+ * @param request The <code>VerifyXMLSignatureRequest</code> containing the
+ * signature to verify.
+ * @param result The result produced by
+ * <code>XMLSignatureVerificationModule</code>.
+ * @param profile The profile used for validating the <code>request</code>.
+ * @return The result of additional validations of the signature manifest.
+ * @throws MOAApplicationException Post-validation of the
+ * <code>XMLSignatureVerificaitonResult</code> failed.
+ */
+ private ReferencesCheckResult validateSignatureManifest(
+ VerifyXMLSignatureRequest request,
+ XMLSignatureVerificationResult result,
+ XMLSignatureVerificationProfile profile)
+ throws MOAApplicationException {
+
+ SPSSFactory factory = SPSSFactory.getInstance();
+ MessageProvider msg = MessageProvider.getInstance();
+
+ // validate that each ReferenceData object contains transforms specified
+ // in the corresponding SignatureManifestCheckParams/ReferenceInfo
+ if (request.getSignatureManifestCheckParams() != null) {
+ List refInfos =
+ request.getSignatureManifestCheckParams().getReferenceInfos();
+ List refDatas = filterReferenceInfos(result.getReferenceDataList());
+ List failedReferencesList = new ArrayList();
+ Iterator refInfoIter;
+ Iterator refDataIter;
+
+ if (refInfos.size() != refDatas.size()) {
+ return factory.createReferencesCheckResult(1, null);
+ }
+
+ refInfoIter = refInfos.iterator();
+ refDataIter =
+ filterReferenceInfos(result.getReferenceDataList()).iterator();
+
+ while (refInfoIter.hasNext()) {
+ ReferenceInfo refInfo = (ReferenceInfo) refInfoIter.next();
+ ReferenceData refData = (ReferenceData) refDataIter.next();
+ List transforms = buildTransformsList(refInfo);
+ boolean found = false;
+ Iterator trIter;
+
+ for (trIter = transforms.iterator(); trIter.hasNext() && !found;) {
+ found = trIter.next().equals(refData.getTransformationList());
+ }
+
+ if (!found) {
+ Integer refIndex = new Integer(refData.getReferenceIndex());
+ String logMsg =
+ msg.getMessage("invoker.01", new Object[] { refIndex });
+
+ failedReferencesList.add(refIndex);
+ Logger.debug(new LogMsg(logMsg));
+ }
+ }
+
+ if (!failedReferencesList.isEmpty()) {
+ // at least one reference failed - return their indexes and check code 1
+ int[] failedReferences =
+ CollectionUtils.toIntArray(failedReferencesList);
+ ReferencesCheckResultInfo checkInfo =
+ factory.createReferencesCheckResultInfo(null, failedReferences);
+
+ return factory.createReferencesCheckResult(1, checkInfo);
+ }
+ }
+
+ // validate the hashes contained in all the ReferenceInfo objects of the
+ // security layer manifest
+ if (request.getSignatureManifestCheckParams() != null
+ && result.containsSecurityLayerManifest()) {
+ Map hashValues = buildTransformParameterHashValues(request);
+ Set transformParameterURIs =
+ buildTransformParameterURIs(profile.getTransformationSupplements());
+ List referenceInfoList =
+ result.getSecurityLayerManifest().getReferenceDataList();
+ Iterator refIter;
+
+ for (refIter = referenceInfoList.iterator(); refIter.hasNext();) {
+ iaik.server.modules.xmlverify.ReferenceInfo ref =
+ (iaik.server.modules.xmlverify.ReferenceInfo) refIter.next();
+ byte[] hash = (byte[]) hashValues.get(ref.getURI());
+
+ if (!transformParameterURIs.contains(ref.getURI())
+ || (hash != null && !Arrays.equals(hash, ref.getHashValue()))) {
+
+ // the transform parameter doesn't exist or the hashs do not match
+ // return the index of the failed reference and check code 1
+ int[] failedReferences = new int[] { ref.getReferenceIndex()};
+ ReferencesCheckResultInfo checkInfo =
+ factory.createReferencesCheckResultInfo(null, failedReferences);
+ String logMsg =
+ msg.getMessage(
+ "invoker.02",
+ new Object[] { new Integer(ref.getReferenceIndex())});
+
+ Logger.debug(new LogMsg(logMsg));
+
+ return factory.createReferencesCheckResult(1, checkInfo);
+ }
+ }
+ }
+
+ return factory.createReferencesCheckResult(0, null);
+ }
+
+ /**
+ * Get all <code>Transform</code>s contained in all the
+ * <code>VerifyTransformsInfoProfile</code>s of the given
+ * <code>ReferenceInfo</code>.
+ *
+ * @param refInfo The <code>ReferenceInfo</code> object containing
+ * the transformations.
+ * @return A <code>List</code> of <code>List</code>s. Each of the
+ * <code>List</code>s contains <code>Transformation</code> objects.
+ * @throws MOAApplicationException An error occurred building one of the
+ * <code>Transformation</code>s.
+ */
+ private List buildTransformsList(ReferenceInfo refInfo)
+ throws MOAApplicationException {
+
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ ConfigurationProvider config = context.getConfiguration();
+ List profiles = refInfo.getVerifyTransformsInfoProfiles();
+ List mappedProfiles =
+ ProfileMapper.mapVerifyTransformsInfoProfiles(profiles, config);
+ List transformsList = new ArrayList();
+ TransformationFactory factory = TransformationFactory.getInstance();
+ Iterator iter;
+
+ for (iter = mappedProfiles.iterator(); iter.hasNext();) {
+ VerifyTransformsInfoProfileExplicit profile =
+ (VerifyTransformsInfoProfileExplicit) iter.next();
+ List transforms = profile.getTransforms();
+
+ if (transforms != null) {
+ transformsList.add(factory.createTransformationList(transforms));
+ }
+ }
+
+ return transformsList;
+ }
+
+ /**
+ * Build the <code>Set</code> of all <code>TransformParameter</code> URIs.
+ *
+ * @param transformParameters The <code>List</code> of
+ * <code>TransformParameter</code>s, as provided to the verification.
+ * @return The <code>Set</code> of all <code>TransformParameter</code> URIs.
+ */
+ private Set buildTransformParameterURIs(List transformParameters) {
+ Set uris = new HashSet();
+ Iterator iter;
+
+ for (iter = transformParameters.iterator(); iter.hasNext();) {
+ DataObject transformParameter = (DataObject) iter.next();
+ uris.add(transformParameter.getURI());
+ }
+
+ return uris;
+ }
+
+ /**
+ * Build a mapping between <code>TransformParameter</code> URIs (a
+ * <code>String</code> and <code>dsig:HashValue</code> (a
+ * <code>byte[]</code>).
+ *
+ * @param request The <code>VerifyXMLSignatureRequest</code>.
+ * @return Map The resulting mapping.
+ * @throws MOAApplicationException An error occurred accessing one of
+ * the profiles.
+ */
+ private Map buildTransformParameterHashValues(VerifyXMLSignatureRequest request)
+ throws MOAApplicationException {
+
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ ConfigurationProvider config = context.getConfiguration();
+ Map hashValues = new HashMap();
+ List refInfos =
+ request.getSignatureManifestCheckParams().getReferenceInfos();
+ Iterator refIter;
+
+ for (refIter = refInfos.iterator(); refIter.hasNext();) {
+ ReferenceInfo refInfo = (ReferenceInfo) refIter.next();
+ List profiles = refInfo.getVerifyTransformsInfoProfiles();
+ List mappedProfiles =
+ ProfileMapper.mapVerifyTransformsInfoProfiles(profiles, config);
+ Iterator prIter;
+
+ for (prIter = mappedProfiles.iterator(); prIter.hasNext();) {
+ VerifyTransformsInfoProfileExplicit profile =
+ (VerifyTransformsInfoProfileExplicit) prIter.next();
+ List trParameters = profile.getTransformParameters();
+ Iterator trIter;
+
+ for (trIter = trParameters.iterator(); trIter.hasNext();) {
+ TransformParameter transformParameter =
+ (TransformParameter) trIter.next();
+ String uri = transformParameter.getURI();
+
+ if (transformParameter.getTransformParameterType()
+ == TransformParameter.HASH_TRANSFORMPARAMETER) {
+ hashValues.put(
+ uri,
+ ((TransformParameterHash) transformParameter).getDigestValue());
+ }
+
+ }
+ }
+ }
+ return hashValues;
+ }
+
+ /**
+ * Filter the <code>ReferenceInfo</code>s returned by the
+ * <code>VerifyXMLSignatureResult</code> for comparison with the
+ * <code>ReferenceInfo</code> elements in the request.
+ *
+ * @param referenceInfos The <code>ReferenceInfo</code>s from the
+ * <code>VerifyXMLSignatureResult</code>.
+ * @return A <code>List</code> of all <code>ReferenceInfo</code>s whose type
+ * is not a XMLDsig manifest, Security Layer manifest, or ETSI signed
+ * property.
+ */
+ private List filterReferenceInfos(List referenceInfos) {
+ List filtered = new ArrayList();
+ Iterator iter;
+
+ for (iter = referenceInfos.iterator(); iter.hasNext();) {
+ iaik.server.modules.xmlverify.ReferenceInfo refInfo =
+ (iaik.server.modules.xmlverify.ReferenceInfo) iter.next();
+ String refType = refInfo.getReferenceType();
+
+ if (refType == null || !FILTERED_REF_TYPES.contains(refType)) {
+ filtered.add(refInfo);
+ }
+ }
+
+ return filtered;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationProfileFactory.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationProfileFactory.java
new file mode 100644
index 000000000..45369ff49
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationProfileFactory.java
@@ -0,0 +1,161 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import iaik.server.modules.xmlverify.XMLSignatureVerificationProfile;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.MOASystemException;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferenceInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.SignatureManifestCheckParams;
+import at.gv.egovernment.moa.spss.api.xmlverify.TransformParameter;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfileExplicit;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.iaik.pki.PKIProfileImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xmlverify.XMLSignatureVerificationProfileImpl;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+
+/**
+ * A factory to create a <code>XMLSignatureVerificationProfile</code> from a
+ * <code>VerifyXMLSignatureRequest</code>, based on the current MOA
+ * configuration.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XMLSignatureVerificationProfileFactory {
+
+ /** The <code>VerifyXMLSignatureRequest</code> for which to create profile
+ * information. */
+ private VerifyXMLSignatureRequest request;
+
+ /**
+ * Create a new <code>XMLSignatureVerificationProfileFactory</code>.
+ *
+ * @param request The <code>VerifyXMLSignatureRequest</code> to extract
+ * profile data from.
+ */
+ public XMLSignatureVerificationProfileFactory(VerifyXMLSignatureRequest request) {
+ this.request = request;
+ }
+
+ /**
+ * Create a <code>XMLSignatureCreationProfile</code> from the
+ * <code>VerifyXMLSignaturesRequest</code> and the current MOA configuration.
+ *
+ * @return The <code>XMLSignatureVerificationProfile</code> containing
+ * additional information for verifying an XML signature.
+ * @throws MOASystemException A system error occurred building the profile.
+ * @throws MOAApplicationException An error occurred building the profile.
+ */
+ public XMLSignatureVerificationProfile createProfile()
+ throws MOASystemException, MOAApplicationException {
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ ConfigurationProvider config = context.getConfiguration();
+ XMLSignatureVerificationProfileImpl profile =
+ new XMLSignatureVerificationProfileImpl();
+ SignatureManifestCheckParams checkParams;
+ String trustProfileID;
+
+ // set whether to check XMLDsig manifests
+ profile.setCheckXMLDsigManifests(true);
+
+ // set the certificate validation profile
+ trustProfileID = request.getTrustProfileId();
+ profile.setCertificateValidationProfile(
+ new PKIProfileImpl(config, trustProfileID));
+
+ // set whether hash input data is to be included
+ profile.setIncludeHashInputData(request.getReturnHashInputData());
+
+ // set the security layer manifest check parameters
+ // and transformation supplements (if present)
+ checkParams = request.getSignatureManifestCheckParams();
+ profile.setCheckSecurityLayerManifest(true);
+ profile.setIncludeReferenceInputData(checkParams != null ? checkParams.getReturnReferenceInputData() : false);
+ if (checkParams != null) {
+ List transformationSupplements;
+ transformationSupplements = buildTransformationSupplements();
+ profile.setTransformationSupplements(transformationSupplements);
+ } else {
+ profile.setTransformationSupplements(Collections.EMPTY_LIST);
+ }
+
+ profile.setPermitFileURIs(config.getPermitFileURIs());
+
+ return profile;
+ }
+
+ /**
+ * Build supplemental data objects used in the transformations.
+ *
+ * @return A <code>List</code> of <code>DataObject</code>s providing
+ * supplemental data to the transformations.
+ * @throws MOASystemException A system error occurred building one of the
+ * transformations.
+ * @throws MOAApplicationException An error occurred building one of the
+ * transformations.
+ */
+ public List buildTransformationSupplements()
+ throws MOASystemException, MOAApplicationException {
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ ConfigurationProvider config = context.getConfiguration();
+ SignatureManifestCheckParams checkParams =
+ request.getSignatureManifestCheckParams();
+ List transformsProfiles = new ArrayList();
+ List transformationSupplements = new ArrayList();
+ DataObjectFactory factory = DataObjectFactory.getInstance();
+ List refInfos = checkParams.getReferenceInfos();
+ Iterator refIter;
+ Iterator prIter;
+ Iterator trIter;
+
+ // build the list of all VerifyTransformsInfoProfiles in all ReferenceInfos
+ refInfos = checkParams.getReferenceInfos();
+ for (refIter = refInfos.iterator(); refIter.hasNext();) {
+ ReferenceInfo refInfo = (ReferenceInfo) refIter.next();
+ List profiles = refInfo.getVerifyTransformsInfoProfiles();
+
+ transformsProfiles.addAll(
+ ProfileMapper.mapVerifyTransformsInfoProfiles(profiles, config));
+ }
+
+ // build the DataObjects
+ for (prIter = transformsProfiles.iterator(); prIter.hasNext();) {
+ VerifyTransformsInfoProfileExplicit profile =
+ (VerifyTransformsInfoProfileExplicit) prIter.next();
+ List transformParameters = profile.getTransformParameters();
+
+ for (trIter = transformParameters.iterator(); trIter.hasNext();) {
+ TransformParameter trParam = (TransformParameter) trIter.next();
+ transformationSupplements.add(
+ factory.createFromTransformParameter(trParam));
+ }
+ }
+
+ return transformationSupplements;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/IaikLog.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/IaikLog.java
new file mode 100644
index 000000000..5e5e4e00e
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/IaikLog.java
@@ -0,0 +1,141 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.logging;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import iaik.logging.TransactionId;
+
+/**
+ * An implementation of the <code>iaik.logging.Log</code>
+ * interface that is based on Jakarta Commons-Logging.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class IaikLog implements iaik.logging.Log {
+ /** The hierarchy to log all IAIK output to. */
+ public static final String IAIK_LOG_HIERARCHY = "iaik.server";
+ /** The commons-loggin <code>Log</code> to use for logging the messages. */
+ private static Log log = LogFactory.getLog(IAIK_LOG_HIERARCHY);
+ /** The node ID to use. */
+ private String nodeId;
+
+ /**
+ * Create a new <code>IaikLog</code>.
+ *
+ * @param nodeId The node ID for this <code>Log</code> object.
+ */
+ public IaikLog(String nodeId) {
+ this.nodeId = nodeId;
+ }
+
+ /**
+ * @see iaik.logging.Log#isDebugEnabled()
+ */
+ public boolean isDebugEnabled() {
+ return log.isDebugEnabled();
+ }
+
+ /**
+ * @see iaik.logging.Log#debug(TransactionId, Object, Throwable)
+ */
+ public void debug(TransactionId transactionId, Object message, Throwable t) {
+ IaikLogMsg msg = new IaikLogMsg(transactionId, nodeId, message);
+
+ log.debug(msg, t);
+ }
+
+ /**
+ * @see iaik.logging.Log#isInfoEnabled()
+ */
+ public boolean isInfoEnabled() {
+ return log.isInfoEnabled();
+ }
+
+ /**
+ * @see iaik.logging.Log#info(TransactionId, Object, Throwable)
+ */
+ public void info(TransactionId transactionId, Object message, Throwable t) {
+ IaikLogMsg msg = new IaikLogMsg(transactionId, nodeId, message);
+
+ log.info(msg, t);
+ }
+
+ /**
+ * @see iaik.logging.Log#isWarnEnabled()
+ */
+ public boolean isWarnEnabled() {
+ return log.isWarnEnabled();
+ }
+
+ /**
+ * @see iaik.logging.Log#warn(TransactionId, Object, Throwable)
+ */
+ public void warn(TransactionId transactionId, Object message, Throwable t) {
+ IaikLogMsg msg = new IaikLogMsg(transactionId, nodeId, message);
+
+ log.warn(msg, t);
+ }
+
+ /**
+ * @see iaik.logging.Log#isErrorEnabled()
+ */
+ public boolean isErrorEnabled() {
+ return log.isErrorEnabled();
+ }
+
+ /**
+ * @see iaik.logging.Log#error(TransactionId, Object, Throwable)
+ */
+ public void error(TransactionId transactionId, Object message, Throwable t) {
+ IaikLogMsg msg = new IaikLogMsg(transactionId, nodeId, message);
+
+ log.error(msg, t);
+ }
+
+ /**
+ * @see iaik.logging.Log#isFatalEnabled()
+ */
+ public boolean isFatalEnabled() {
+ return log.isFatalEnabled();
+ }
+
+ /**
+ * @see iaik.logging.Log#fatal(TransactionId, Object, Throwable)
+ */
+ public void fatal(TransactionId transactionId, Object message, Throwable t) {
+ IaikLogMsg msg = new IaikLogMsg(transactionId, nodeId, message);
+
+ log.fatal(msg, t);
+ }
+
+ /**
+ * @see iaik.logging.Log#setNodeId(String)
+ */
+ public void setNodeId(String nodeId) {
+ this.nodeId = nodeId;
+ }
+
+ /**
+ * @see iaik.logging.Log#getNodeId()
+ */
+ public String getNodeId() {
+ return nodeId;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/IaikLogFactory.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/IaikLogFactory.java
new file mode 100644
index 000000000..6d433f9ae
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/IaikLogFactory.java
@@ -0,0 +1,57 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.logging;
+
+import iaik.logging.Log;
+import iaik.logging.LogConfigurationException;
+import iaik.logging.LogFactory;
+
+import at.gv.egovernment.moa.logging.LoggingContextManager;
+
+/**
+ * An implementation of the <code>iaik.logging.LogFactory</code> abstract
+ * class to log messages to the MOA logging subsystem.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class IaikLogFactory extends LogFactory {
+
+ public Log getInstance(Class clazz) throws LogConfigurationException {
+ return getInstanceImpl();
+ }
+
+ public Log getInstance(String name) throws LogConfigurationException {
+ return getInstanceImpl();
+ }
+
+ /**
+ * Return an instance of <code>iaik.logging.Log</code>.
+ *
+ * @return The <code>iaik.logging.Log</code> object to log messages to.
+ */
+ private Log getInstanceImpl() {
+ String nodeID =
+ LoggingContextManager.getInstance().getLoggingContext().getNodeID();
+
+ return new IaikLog(nodeID);
+ }
+
+ public void release() {
+ // we do not hold any resources
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/IaikLogMsg.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/IaikLogMsg.java
new file mode 100644
index 000000000..374f0199c
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/IaikLogMsg.java
@@ -0,0 +1,69 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.logging;
+
+import iaik.logging.TransactionId;
+
+/**
+ * A unified message type to log messages from the IAIK subsystem.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class IaikLogMsg {
+
+ /** The transaction ID of this message. */
+ private TransactionId transactionId;
+ /** The node ID of this message. */
+ private String nodeId;
+ /** The message to log. */
+ private Object message;
+
+ /**
+ * Create a <code>IaikLogMsg</code> object.
+ *
+ * @param transactionId The transaction id of the transaction which
+ * generated this log message. May be <code>null</code>.
+ * @param nodeId The node id where this message was generated. May be
+ * <code>null</code>.
+ * @param message The actual message to log. May be <code>null</code>.
+ */
+ public IaikLogMsg(TransactionId transactionId, String nodeId, Object message) {
+ this.transactionId = transactionId;
+ this.nodeId = nodeId;
+ this.message = message;
+ }
+
+
+ /**
+ * Convert this log message to a <code>String</code>.
+ *
+ * @return The <code>String</code> representation of this log message.
+ */
+ public String toString() {
+ StringBuffer msg = new StringBuffer();
+
+ msg.append("TID=");
+ msg.append(transactionId != null ? transactionId.getLogID() : "<null>");
+ msg.append(" NID=");
+ msg.append(nodeId != null ? nodeId : "<null>");
+ msg.append(" MSG=");
+ msg.append(message != null ? message.toString() : "<null>");
+
+ return msg.toString();
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/TransactionId.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/TransactionId.java
new file mode 100644
index 000000000..1aebcec18
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/TransactionId.java
@@ -0,0 +1,53 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.logging;
+
+/**
+ * An implementation of the <code>iaik.logging.TransactionId</code> interface.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class TransactionId implements iaik.logging.TransactionId {
+
+ /** The String representation for logging the transaction ID. */
+ private String logID;
+
+ /**
+ * Create a <code>TransactionId</code> object.
+ *
+ * @param logID The transaction id as it should be presented to the logging
+ * subsystem.
+ */
+ public TransactionId(String logID) {
+ this.logID = logID;
+ }
+
+ /**
+ * @see iaik.logging.TransactionId#getLogID()
+ */
+ public String getLogID() {
+ return logID;
+ }
+
+ /**
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ return getLogID();
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/AxisHandler.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/AxisHandler.java
new file mode 100644
index 000000000..1ab6f01cc
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/AxisHandler.java
@@ -0,0 +1,449 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.service;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.security.cert.X509Certificate;
+import java.util.Iterator;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.axis.AxisFault;
+import org.apache.axis.Message;
+import org.apache.axis.MessageContext;
+import org.apache.axis.attachments.AttachmentPart;
+import org.apache.axis.handlers.BasicHandler;
+import org.apache.axis.transport.http.HTTPConstants;
+import org.apache.axis.utils.Messages;
+import org.apache.axis.utils.XMLUtils;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.logging.LogMsg;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.logging.LoggingContext;
+import at.gv.egovernment.moa.logging.LoggingContextManager;
+import at.gv.egovernment.moa.spss.MOASystemException;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionIDGenerator;
+import at.gv.egovernment.moa.spss.util.MessageProvider;
+import at.gv.egovernment.moa.util.DOMUtils;
+
+/**
+ * An handler that is invoked on each web service request and performs some
+ * central message handling.
+ *
+ * Mainly sets up the <code>TransactionContext</code> for the current
+ * transaction (i.e. web service request).
+ *
+ * @author Patrick Peck
+ * @author Stefan Knirsch
+ * @version $Id$
+ */
+public class AxisHandler extends BasicHandler {
+
+ /** The resource names of the messages to load. */
+ private static final String MOA_SPSS_WSDL_RESOURCE_ = "/resources/wsdl/MOA-SPSS-1.3.wsdl";
+
+ /** The property name for accessing the HTTP request. */
+ private static final String REQUEST_PROPERTY = HTTPConstants.MC_HTTP_SERVLETREQUEST;
+
+ /** The property name for accessing the X509 client certificate chain. */
+ private static final String X509_CERTIFICATE_PROPERTY = "javax.servlet.request.X509Certificate";
+
+ /** The property name for accessing the SOAP action header. */
+ private static final String SOAP_ACTION_HEADER = "soapaction";
+
+ /** URI of the SOAP XML namespace. */
+ public static final String SOAP_NS_URI = "http://schemas.xmlsoap.org/soap/envelope/";
+
+ /** Prefix used for the SOAP XML namespace */
+ public static final String SOAP_PREFIX = "soapenv";
+
+ /** Simple string contains the front part of the enveloping SOAP wrapping */
+ private static final String SOAP_PART_PRE = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"><soapenv:Body>";
+
+ /** Simple string contains the post part of the enveloping SOAP wrapping */
+ private static final String SOAP_PART_POST = "</soapenv:Body></soapenv:Envelope>";
+
+ /**
+ * Handle an invocation of this handler.
+ *
+ * @param msgContext Information about this request/response.
+ * @throws AxisFault An error occurred during processing of the request.
+ * @see org.apache.axis.Handler#invoke(MessageContext)
+ */
+ public void invoke(MessageContext msgContext) throws AxisFault {
+ if (!msgContext.getPastPivot()) {
+ handleRequest(msgContext);
+ } else {
+ handleResponse(msgContext);
+ }
+ }
+
+ /**
+ * This method is called by <code>invoke</code> to handle incoming requests.
+ *
+ * @param msgContext The context as provided to <code>invoke</code>.
+ * @throws AxisFault An error occurred during processing of the request.
+ */
+ private void handleRequest(MessageContext msgContext) throws AxisFault {
+ try {
+ Logger.trace("---- Entering Axishandler");
+ // generate a unique transaction id and build the TransactionContext
+ // for this request
+ HttpServletRequest request =
+ (HttpServletRequest) msgContext.getProperty(REQUEST_PROPERTY);
+
+ X509Certificate[] clientCert =
+ (X509Certificate[]) request.getAttribute(X509_CERTIFICATE_PROPERTY);
+
+ //Configure Axis
+// AxisProperties.setProperty(AxisEngine.PROP_ENABLE_NAMESPACE_PREFIX_OPTIMIZATION,"false");
+// AxisProperties.setProperty(AxisEngine.PROP_DOMULTIREFS,"false");
+// AxisProperties.setProperty(AxisEngine.PROP_SEND_XSI,"true");
+ //msgContext.setProperty(org.apache.axis.SOAPPart.ALLOW_FORM_OPTIMIZATION, Boolean.FALSE);
+ //msgContext.setProperty(org.apache.axis. AxisEngine.PROP_ENABLE_NAMESPACE_PREFIX_OPTIMIZATION,"false");
+
+ Message soapMessage = msgContext.getCurrentMessage();
+
+ ConfigurationProvider configuration =
+ ConfigurationProvider.getInstance();
+
+ Element xmlRequest = null;
+ Element soapPart = DOMUtils.parseDocument(new ByteArrayInputStream(soapMessage.getSOAPPartAsBytes()), false, null, null).getDocumentElement();
+ if (soapPart!=null) {
+ //TODO: check if DOM Version is intolerant when white spaces are between tags (preceding normalization would be necessary)
+ NodeList soapBodies = soapPart.getElementsByTagNameNS(SOAP_NS_URI, "Body");
+ if (soapBodies!=null && soapBodies.getLength()>0) {
+ xmlRequest = DOMUtils.getElementFromNodeList(soapBodies.item(0).getChildNodes());
+ }
+ //oder TODO: Evaluierung ob XPATH schneller
+ /*
+ HashMap nSMap = new HashMap();
+ nSMap.put((String)SOAP_PREFIX, SOAP_NS_URI);
+ Element soapBody = (Element) XPathUtils.selectSingleNode(soapPart, nSMap, "/"+SOAP_PREFIX+":Envelope/"+SOAP_PREFIX+":Body");
+ if (soapBody!=null) {
+ xmlRequest = DOMUtils.getElementFromNodeList(soapBody.getChildNodes());
+ }
+ */
+ }
+
+ TransactionContext context =
+ new TransactionContext(
+ TransactionIDGenerator.nextID(),
+ clientCert,
+ configuration,
+ xmlRequest,
+ null);
+
+ String soapAction = (String) request.getHeader(SOAP_ACTION_HEADER);
+ if ("\"\"".equals(soapAction)) {
+ // if http soap action header is empty
+ soapAction = msgContext.getTargetService();
+ }
+ context.setRequestName(soapAction);
+
+ Logger.trace(">>> Get AttachmentCount");
+ int attachmentCount = soapMessage.getAttachmentsImpl().getAttachmentCount();
+ Logger.trace("<<< Finished Get AttachmentCount");
+ if (attachmentCount>0) {
+
+ // add SOAP attachments to transaction context
+ Iterator iterator = soapMessage.getAttachments();
+ while (iterator.hasNext()) {
+ AttachmentPart attachment = (AttachmentPart)iterator.next();
+ String id = attachment.getContentId();
+ String type = attachment.getContentType();
+
+ //Now get the InputStream (note: we could also get the content with Object content = attachment.getContent();)
+ InputStream is = null;
+ javax.activation.DataHandler datahandler = attachment.getDataHandler();
+
+ int TYPE = 2;
+ switch (TYPE) {
+ case 1:
+ {
+ org.apache.axis.attachments.ManagedMemoryDataSource mmds = (org.apache.axis.attachments.ManagedMemoryDataSource)datahandler.getDataSource();
+ context.addAttachment(id, type, mmds);
+ break;
+ }
+ case 2:
+ {
+ is = datahandler.getDataSource().getInputStream();
+ context.addAttachment(id, type, is, datahandler.getDataSource().getName());
+ break;
+ }
+ }
+ debug("handler.06", new Object[] {id, type});
+ }
+ }
+
+ setUpContexts(context);
+
+ // log some information about the request
+ info(
+ "handler.00",
+ new Object[] {
+ context.getTransactionID(),
+ msgContext.getTargetService()});
+ info("handler.01", new Object[] { request.getRemoteAddr()});
+ if (clientCert != null) {
+ info(
+ "handler.02",
+ new Object[] {
+ clientCert[0].getSubjectDN(),
+ clientCert[0].getSerialNumber(),
+ clientCert[0].getIssuerDN()});
+
+ } else {
+ info("handler.03", null);
+ }
+ if (Logger.isTraceEnabled()) {
+// OutputFormat format = new OutputFormat((Document) xmlRequest.getOwnerDocument());
+// format.setLineSeparator("\n");
+// format.setIndenting(false);
+// format.setPreserveSpace(true);
+// format.setOmitXMLDeclaration(false);
+// format.setEncoding("UTF-8");
+// ByteArrayOutputStream baos = new ByteArrayOutputStream();
+// XMLSerializer conSerializer = new XMLSerializer(baos, format);
+// conSerializer.serialize(xmlRequest);
+// Logger.debug(new LogMsg("Request:" + baos.toString()));
+
+
+ String msg = soapMessage.getSOAPPartAsString();
+ Logger.trace(new LogMsg(msg));
+ }
+ } catch (MOASystemException e) {
+ MOASystemException se = new MOASystemException("2900", null, e);
+ AxisFault fault = AxisFault.makeFault(se);
+ fault.setFaultDetail(new Element[] { se.toErrorResponse()});
+ throw fault;
+ } catch (Throwable t) {
+ t.printStackTrace();
+ Logger.info(new LogMsg(t.getStackTrace()));
+ MOASystemException e = new MOASystemException("2900", null, t);
+ AxisFault fault = AxisFault.makeFault(e);
+ fault.setFaultDetail(new Element[] { e.toErrorResponse()});
+ throw fault;
+ }
+ Logger.trace("---- Leaving Axishandler");
+ }
+
+ /**
+ * This method is called by <code>invoke</code> to handle outgoing
+ * responses.
+ *
+ * @param msgContext The context as provided to <code>invoke</code>.
+ * @throws AxisFault An error occurred during processing of the response.
+ */
+ private void handleResponse(MessageContext msgContext) throws AxisFault {
+ String xmlResponseString = null;
+ String soapResponseString = null;
+
+ TransactionContext context = TransactionContextManager.getInstance().getTransactionContext();
+ Element xmlResponse = context.getResponse();
+
+ if (xmlResponse!=null) {
+ try {
+ xmlResponseString = DOMUtils.serializeNode(xmlResponse, true);
+ /*
+ Soll die Antwort nur \n enthalten, so gibt es 2 Möglichkeiten:
+ 1.) höhere Xalan Version und
+ xmlResponseString = DOMUtils.serializeNode(xmlResponse, true, "\n");
+ 2.)
+ OutputFormat serializerFormat = new OutputFormat((Document) xmlResponse.getOwnerDocument());
+ serializerFormat.setLineSeparator("\n");
+ serializerFormat.setIndenting(false);
+ serializerFormat.setPreserveSpace(true);
+ serializerFormat.setOmitXMLDeclaration(true);
+ serializerFormat.setEncoding("UTF-8");
+ ByteArrayOutputStream serializedBytes = new ByteArrayOutputStream();
+ XMLSerializer serializer = new XMLSerializer(serializedBytes, serializerFormat);
+ serializer.serialize(xmlResponse);
+ serializedBytes.close();
+ xmlResponseString = serializedBytes.toString("UTF-8");
+ */
+ if (Logger.isTraceEnabled()) {
+ Logger.trace(new LogMsg(xmlResponseString));
+ }
+ soapResponseString = SOAP_PART_PRE + xmlResponseString + SOAP_PART_POST;
+ //override axis response-message
+ msgContext.setResponseMessage(new Message(soapResponseString));
+ } catch (Throwable t) {
+ t.printStackTrace();
+ Logger.info(new LogMsg(t.getStackTrace()));
+ MOASystemException e = new MOASystemException("2900", null, t);
+ AxisFault fault = AxisFault.makeFault(e);
+ fault.setFaultDetail(new Element[] { e.toErrorResponse()});
+ throw fault;
+ }
+
+ } else {
+ //Fallback: if functions do not set the resulting response in the transaction, the original one from axis will be used
+ soapResponseString = msgContext.getCurrentMessage().getSOAPPartAsString();
+ }
+
+ info("handler.04", null);
+ if (Logger.isDebugEnabled()) {
+ Logger.debug(new LogMsg(soapResponseString));
+ }
+ tearDownContexts();
+ }
+
+ /**
+ * Called, when the processing of the web service fails.
+ *
+ * @param msgContext Information about the current request.
+ * @see org.apache.axis.Handler#onFault(org.apache.axis.MessageContext)
+ */
+ public void onFault(MessageContext msgContext) {
+ info("handler.05", null);
+ tearDownContexts();
+ }
+
+ /**
+ * Set up the thread-local contexts (<code>TransactionContext</code> and
+ * <code>LoggingContext</code>).
+ *
+ * @param context The <code>TransactionContext</code> to set for the current
+ * request.
+ */
+ private void setUpContexts(TransactionContext context) {
+ // set the transaction context in the TransactionContextManager
+ TransactionContextManager tcm = TransactionContextManager.getInstance();
+ tcm.setTransactionContext(context);
+
+ // set the logging context in the LoggingContextManager
+ LoggingContextManager lcm = LoggingContextManager.getInstance();
+ LoggingContext lc = new LoggingContext(context.getTransactionID());
+ lcm.setLoggingContext(lc);
+ }
+
+ /**
+ * Tear down the thread-local contexts.
+ */
+ private void tearDownContexts() {
+ TransactionContextManager tcm = TransactionContextManager.getInstance();
+
+ //delete temporary files
+ TransactionContext context = tcm.getTransactionContext();
+ context.cleanAttachmentCache();
+
+ // unset the transaction context
+ tcm.setTransactionContext(null);
+
+ // unset the logging context
+ LoggingContextManager lcm = LoggingContextManager.getInstance();
+ lcm.setLoggingContext(null);
+ }
+
+ /**
+ * Generate the WSDL into the <code>msgContext</code>.
+ *
+ * The code of this method is more or less copied from the
+ * <code>org.apache.axis.handlers.soap.SOAPService</code> class contained in
+ * the 1.1 release of Axis to allow for a missing <code>wsdlFile</code> (so
+ * that a resource by the same name is searched for in the classpath). The
+ * implementation of this method should be obsolete if Axis 1.1 or higher is
+ * used.
+ *
+ * @param msgContext The <code>MessageContext</code> that will contain the
+ * WSDL description of the current web service.
+ * @throws AxisFault An error occurred producing the WSDL.
+ */
+ public void generateWSDL(MessageContext msgContext) throws AxisFault {
+ InputStream instream = null;
+
+ try {
+ String filename = MOA_SPSS_WSDL_RESOURCE_;
+ File file = new File(filename);
+ if (file.exists()) {
+ //if this resolves to a file, load it
+ instream = new FileInputStream(filename);
+ } else {
+ //else load a named resource in our classloader.
+ instream = this.getClass().getResourceAsStream(filename);
+ if (instream == null) {
+ String errorText = Messages.getMessage("wsdlFileMissing", filename);
+ throw new AxisFault(errorText);
+ }
+ }
+ Document doc = XMLUtils.newDocument(instream);
+ msgContext.setProperty("WSDL", doc);
+ } catch (Exception e) {
+ throw AxisFault.makeFault(e);
+ } finally {
+ if (instream != null) {
+ try {
+ instream.close();
+ } catch (IOException e) {
+ // ok to do nothing here
+ }
+ }
+ }
+ }
+
+ /**
+ * Utility function to issue an info message to the log.
+ *
+ * @param messageId The ID of the message to log.
+ * @param parameters Additional message parameters.
+ */
+ private static void info(String messageId, Object[] parameters) {
+ MessageProvider msg = MessageProvider.getInstance();
+
+ Logger.info(new LogMsg(msg.getMessage(messageId, parameters)));
+ }
+
+ /**
+ * Utility function to issue an debug message to the log.
+ *
+ * @param messageId The ID of the message to log.
+ * @param parameters Additional message parameters.
+ */
+ private static void debug(String messageId, Object[] parameters) {
+ MessageProvider msg = MessageProvider.getInstance();
+
+ Logger.debug(new LogMsg(msg.getMessage(messageId, parameters)));
+ }
+
+
+
+// private byte[] toByteArray(AttachmentPart attachment) throws SOAPException, IOException
+// {
+// ByteArrayOutputStream outputStream = new ByteArrayOutputStream(attachment.getSize());
+// InputStream inputStream = (InputStream) attachment.getContent();
+// int currentByte = -1;
+// while ((currentByte = inputStream.read()) != -1)
+// outputStream.write(currentByte);
+//
+// inputStream.close();
+// outputStream.close();
+//
+// return outputStream.toByteArray();
+//
+//}
+
+} \ No newline at end of file
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/ConfigurationServlet.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/ConfigurationServlet.java
new file mode 100644
index 000000000..f13adfec9
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/ConfigurationServlet.java
@@ -0,0 +1,135 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.service;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import at.gv.egovernment.moa.logging.LogMsg;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.logging.LoggingContext;
+import at.gv.egovernment.moa.logging.LoggingContextManager;
+
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.iaik.config.IaikConfigurator;
+import at.gv.egovernment.moa.spss.server.init.*;
+import at.gv.egovernment.moa.spss.util.MessageProvider;
+
+/**
+ * A servlet to initialize and update the MOA configuration.
+ *
+ * @author Fatemeh Philippi
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ConfigurationServlet extends HttpServlet {
+ /** The document type of the HTML to generate. */
+ private static final String DOC_TYPE =
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n";
+
+ /**
+ * Handle a HTTP GET request, used to indicated that the MOA
+ * configuration needs to be updated (reloaded).
+ *
+ * @see javax.servlet.http.HttpServlet#doGet(HttpServletRequest, HttpServletResponse)
+ */
+ public void doGet(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException {
+
+ MessageProvider msg = MessageProvider.getInstance();
+ PrintWriter out;
+
+ // set up a logging context for logging the reconfiguration
+ LoggingContextManager.getInstance().setLoggingContext(
+ new LoggingContext("configuration update"));
+
+ response.setContentType("text/html");
+ out = response.getWriter();
+ out.println(DOC_TYPE);
+ out.println("<head><title>MOA configuration update</title></head>");
+ out.println("<body bgcolor=\"#FFFFFF\">");
+ try {
+ // reconfigure the system
+ ConfigurationProvider config = ConfigurationProvider.reload();
+ IaikConfigurator iaikConfigurator = new IaikConfigurator();
+
+ iaikConfigurator.configure(config);
+
+ // print a status message
+ out.println("<p><b>" + msg.getMessage("config.06", null) + "</b></p>");
+ Logger.info(new LogMsg(msg.getMessage("config.06", null)));
+
+ if (!config.getWarnings().isEmpty()) {
+ // print the warnings
+ List allWarnings = new ArrayList();
+ Iterator iter;
+
+ allWarnings.addAll(config.getWarnings());
+ allWarnings.addAll(iaikConfigurator.getWarnings());
+
+ out.println("<p><b>" + msg.getMessage("config.29", null) + "</b></p>");
+ for (iter = allWarnings.iterator(); iter.hasNext();) {
+ out.println(iter.next() + "<br />");
+ }
+ out.println("<p><b>" + msg.getMessage("config.28", null) + "</b></p>");
+ }
+
+ } catch (Throwable t) {
+ out.println("<p><b>" + msg.getMessage("config.20", null) + "</b></p>");
+ out.println("<p><b>" + msg.getMessage("config.28", null) + "</b></p>");
+ Logger.warn(new LogMsg(msg.getMessage("config.20", null)), t);
+ }
+ out.println("</body>");
+
+ out.flush();
+ out.close();
+
+ // tear down the logging context
+ LoggingContextManager.getInstance().setLoggingContext(null);
+ }
+
+ /**
+ * Do the same as <code>doGet</code>.
+ *
+ * @see javax.servlet.http.HttpServlet#doPost(HttpServletRequest, HttpServletResponse)
+ */
+ public void doPost(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException {
+ doGet(request, response);
+ }
+
+ /**
+ * Perform some initial initialization tasks for the MOA web services
+ * application.
+ *
+ * Does an initial load of the MOA configuration to test if a working web
+ * service can be provided.
+ *
+ * @see javax.servlet.GenericServlet#init()
+ */
+ public void init() throws ServletException {
+ SystemInitializer.init();
+ }
+
+} \ No newline at end of file
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/RevocationArchiveCleaner.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/RevocationArchiveCleaner.java
new file mode 100644
index 000000000..cdd6271fd
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/RevocationArchiveCleaner.java
@@ -0,0 +1,93 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.service;
+
+import iaik.pki.revocation.RevocationSourceTypes;
+import iaik.pki.store.revocation.archive.Archive;
+import iaik.pki.store.revocation.archive.ArchiveFactory;
+
+import java.util.Date;
+
+import at.gv.egovernment.moa.logging.LogMsg;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.logging.TransactionId;
+import at.gv.egovernment.moa.spss.util.MessageProvider;
+
+/**
+ * A <code>Runnable</code> for periodically cleaning up the revocation archive.
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class RevocationArchiveCleaner implements Runnable {
+
+ /** The inverval between two clean-ups of the revocation archive. */
+ private long archiveCleanupInterval;
+
+ /**
+ * Create a new <code>RevocationArchiveCleaner</code>.
+ *
+ * @param archiveCleanupInterval The interval between two clean-ups of the
+ * revocation archive.
+ */
+ public RevocationArchiveCleaner(long archiveCleanupInterval) {
+ this.archiveCleanupInterval = archiveCleanupInterval;
+ }
+
+ /**
+ * Run the <code>RevocationArchiveCleaner</code> in its own
+ * <code>Thread</code>.
+ */
+ public void run() {
+ while (true) {
+ try {
+ ConfigurationProvider config = ConfigurationProvider.getInstance();
+ boolean enableArchiving = config.getEnableRevocationArchiving();
+
+ if (enableArchiving)
+ {
+ Archive archive = ArchiveFactory.getInstance().getArchive();
+ long archiveDurationMillis =
+ (long) config.getCRLArchiveDuration() * 86400000;
+
+ // delete old archive data
+ if (archiveDurationMillis > 0) {
+ Date olderThan =
+ new Date(System.currentTimeMillis() - archiveDurationMillis);
+
+ archive.deleteOldArchiveEntries(
+ RevocationSourceTypes.CRL,
+ olderThan,
+ new TransactionId("RevocationArchiveCleaner"));
+ }
+ }
+
+ } catch (Exception e) {
+ MessageProvider msg = MessageProvider.getInstance();
+ Logger.error(new LogMsg(msg.getMessage("init.02", null)), e);
+ }
+
+ // sleep
+ try {
+ Thread.sleep(archiveCleanupInterval * 1000);
+ } catch (InterruptedException e) {
+ // ok to do nothing here
+ }
+
+ }
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/ServiceUtils.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/ServiceUtils.java
new file mode 100644
index 000000000..9c0990268
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/ServiceUtils.java
@@ -0,0 +1,87 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.service;
+
+import java.io.ByteArrayInputStream;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+
+/**
+ * Helper methods for the Service classes.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ServiceUtils {
+
+ /**
+ * Schema-validate a request.
+ *
+ * @param request The request to validate.
+ * @throws MOAApplicationException An error occurred validating the requst.
+ */
+ public static void validateRequest(Element[] request)
+ throws MOAApplicationException {
+
+ // validate the request
+ try {
+ DOMUtils.validateElement(
+ request[0],
+ Constants.ALL_SCHEMA_LOCATIONS,
+ null);
+ } catch (Exception e) {
+ throw new MOAApplicationException(
+ "1100",
+ new Object[] { e.getMessage()},
+ e);
+ }
+ }
+
+ /**
+ * Reparse the request with schema-validation turned on so that ID references
+ * are resolved.
+ *
+ * @param request The request to reparse.
+ * @return The reparsed request.
+ * @throws MOAApplicationException An error occurred parsing the request.
+ */
+ public static Element reparseRequest(Element request)
+ throws MOAApplicationException {
+
+ try {
+ byte[] requestBytes = DOMUtils.serializeNode(request, "UTF-8");
+ Document validatedRequest =
+ DOMUtils.parseDocument(
+ new ByteArrayInputStream(requestBytes),
+ true,
+ Constants.ALL_SCHEMA_LOCATIONS,
+ null);
+ return validatedRequest.getDocumentElement();
+ } catch (Exception e) {
+ throw new MOAApplicationException(
+ "1100",
+ new Object[] { e.getMessage()},
+ e);
+ }
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/SignatureCreationService.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/SignatureCreationService.java
new file mode 100644
index 000000000..f1e56d407
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/SignatureCreationService.java
@@ -0,0 +1,126 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.service;
+
+import java.util.Collections;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.AxisFault;
+import org.apache.axis.i18n.Messages;
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.MOASystemException;
+import at.gv.egovernment.moa.spss.api.xmlbind.CreateXMLSignatureRequestParser;
+import at.gv.egovernment.moa.spss.api.xmlbind.CreateXMLSignatureResponseBuilder;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse;
+import at.gv.egovernment.moa.spss.server.invoke.XMLSignatureCreationInvoker;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.StreamUtils;
+
+/**
+ * The service endpoint for the <code>SignatureCreation</code> web service.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class SignatureCreationService {
+
+ /**
+ * Handle a <code>CreateXMLSignatureRequest</code>.
+ *
+ * @param request The <code>CreateXMLSignatureRequest</code> to work on
+ * (contained in the 0th element of the array).
+ * @return A <code>CreateXMLSignatureResponse</code> as the only element of
+ * the <code>Element</code> array.
+ * @throws AxisFault An error occurred during handling of the message.
+ */
+ public Element[] CreateXMLSignatureRequest(Element[] request)
+ throws AxisFault {
+ Logger.trace("---- Entering SignatureCreationService");
+ XMLSignatureCreationInvoker invoker =
+ XMLSignatureCreationInvoker.getInstance();
+ Element[] response = new Element[1];
+
+ // check that we have a CreateXMLSignatureRequest; if not, create an
+ // AxisFault, just like the org.apache.axis.providers.java.MsgProvider
+ if (!Constants.MOA_SPSS_CREATE_XML_REQUEST.equals(request[0].getLocalName()) ||
+ !Constants.MOA_NS_URI.equals(request[0].getNamespaceURI()))
+ {
+ QName qname =
+ new QName(request[0].getNamespaceURI(), request[0].getLocalName());
+ throw new AxisFault(
+ Messages.getMessage("noOperationForQName", qname.toString())); // TODO GK Operation name does not make it into the error repsonse
+ }
+
+ // handle the request
+ try {
+ // create a parser and builder for binding API objects to/from XML
+ CreateXMLSignatureRequestParser requestParser =
+ new CreateXMLSignatureRequestParser();
+ CreateXMLSignatureResponseBuilder responseBuilder =
+ new CreateXMLSignatureResponseBuilder();
+ Element reparsedReq;
+ CreateXMLSignatureRequest requestObj;
+ CreateXMLSignatureResponse responseObj;
+
+ //since Axis (1.1 ff) has problem with namespaces we take the raw request stored by the Axishandler.
+ TransactionContext context = TransactionContextManager.getInstance().getTransactionContext();
+ // validate the request
+ reparsedReq = ServiceUtils.reparseRequest(request[0]);//context.getRequest());
+
+ // convert to API objects
+ Logger.trace(">>> preparsing Request");
+ requestObj = requestParser.parse(reparsedReq);
+ Logger.trace("<<< preparsed Request");
+
+ Logger.trace(">>> creating Signature");
+ // invoke the core logic
+ responseObj = invoker.createXMLSignature(requestObj, Collections.EMPTY_SET);
+ Logger.trace("<<< created Signature");
+
+ Logger.trace(">>> building Response");
+ // map back to XML
+ response[0] = responseBuilder.build(responseObj).getDocumentElement();
+ Logger.trace("<<< built Response");
+
+ // save response in transaction
+ context.setResponse(response[0]);
+ Logger.trace("---- Leaving SignatureCreationService");
+
+ } catch (MOAException e) {
+ AxisFault fault = AxisFault.makeFault(e);
+ fault.setFaultDetail(new Element[] { e.toErrorResponse()});
+ Logger.debug("Anfrage zur Signaturerstellung wurde nicht erfolgreich beendet:"
+ + System.getProperty("line.separator") + StreamUtils.getStackTraceAsString(e));
+ throw fault;
+ } catch (Throwable t) {
+ MOASystemException e = new MOASystemException("2900", null, t);
+ AxisFault fault = AxisFault.makeFault(e);
+ fault.setFaultDetail(new Element[] { e.toErrorResponse()});
+ Logger.debug("Anfrage zur Signaturerstellung wurde nicht erfolgreich beendet:"
+ + System.getProperty("line.separator") + StreamUtils.getStackTraceAsString(e));
+ throw fault;
+ }
+
+ return response;
+ }
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/SignatureVerificationService.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/SignatureVerificationService.java
new file mode 100644
index 000000000..cc923f4b7
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/SignatureVerificationService.java
@@ -0,0 +1,166 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.service;
+
+import org.apache.axis.AxisFault;
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.MOASystemException;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse;
+import at.gv.egovernment.moa.spss.api.xmlbind.VerifyCMSSignatureRequestParser;
+import at.gv.egovernment.moa.spss.api.xmlbind.VerifyCMSSignatureResponseBuilder;
+import at.gv.egovernment.moa.spss.api.xmlbind.VerifyXMLSignatureRequestParser;
+import at.gv.egovernment.moa.spss.api.xmlbind.VerifyXMLSignatureResponseBuilder;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse;
+import at.gv.egovernment.moa.spss.server.invoke.CMSSignatureVerificationInvoker;
+import at.gv.egovernment.moa.spss.server.invoke.XMLSignatureVerificationInvoker;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+import at.gv.egovernment.moa.util.StreamUtils;
+
+/**
+ * The service endpoint for the <code>SignatureVerification</code> web service.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class SignatureVerificationService {
+
+ /**
+ * Handle a <code>VerifyCMSSignatureRequest</code>.
+ *
+ * @param request The <code>VerifyCMSSignatureRequest</code> to work on
+ * (contained in the 0th element of the array).
+ * @return A <code>VerifyCMSSignatureResponse</code> as the only element of
+ * the <code>Element</code> array.
+ * @throws AxisFault An error occurred during handling of the message.
+ */
+ public Element[] VerifyCMSSignatureRequest(Element[] request)
+ throws AxisFault {
+ CMSSignatureVerificationInvoker invoker =
+ CMSSignatureVerificationInvoker.getInstance();
+ Element[] response = new Element[1];
+
+ try {
+ // create a parser and builder for binding API objects to/from XML
+ VerifyCMSSignatureRequestParser requestParser =
+ new VerifyCMSSignatureRequestParser();
+ VerifyCMSSignatureResponseBuilder responseBuilder =
+ new VerifyCMSSignatureResponseBuilder();
+ Element reparsedReq;
+ VerifyCMSSignatureRequest requestObj;
+ VerifyCMSSignatureResponse responseObj;
+
+ //since Axis (1.1 ff) has problem with namespaces we take the raw request stored by the Axishandler.
+ TransactionContext context = TransactionContextManager.getInstance().getTransactionContext();
+ // validate the request
+ reparsedReq = ServiceUtils.reparseRequest(request[0]);//context.getRequest());
+
+ // convert to API objects
+ requestObj = requestParser.parse(reparsedReq);
+
+ // invoke the core logic
+ responseObj = invoker.verifyCMSSignature(requestObj);
+
+ // map back to XML
+ response[0] = responseBuilder.build(responseObj).getDocumentElement();
+
+ // save response in transaction
+ context.setResponse(response[0]);
+
+ } catch (MOAException e) {
+ AxisFault fault = AxisFault.makeFault(e);
+ fault.setFaultDetail(new Element[] { e.toErrorResponse()});
+ Logger.debug("Anfrage zur Signaturpruefung wurde nicht erfolgreich beendet:"
+ + System.getProperty("line.separator") + StreamUtils.getStackTraceAsString(e));
+ throw fault;
+ } catch (Throwable t) {
+ MOASystemException e = new MOASystemException("2900", null, t);
+ AxisFault fault = AxisFault.makeFault(e);
+ fault.setFaultDetail(new Element[] { e.toErrorResponse()});
+ Logger.debug("Anfrage zur Signaturpruefung wurde nicht erfolgreich beendet:"
+ + System.getProperty("line.separator") + StreamUtils.getStackTraceAsString(e));
+ throw fault;
+ }
+
+ return response;
+ }
+
+ /**
+ * Handle a <code>VerifyXMLSignatureRequest</code>.
+ *
+ * @param request The <code>VerifyXMLSignatureRequest</code> to work on
+ * (contained in the 0th element of the array).
+ * @return A <code>VerifyXMLSignatureResponse</code> as the only element of
+ * the <code>Element</code> array.
+ * @throws AxisFault An error occurred during handling of the message.
+ */
+ public Element[] VerifyXMLSignatureRequest(Element[] request)
+ throws AxisFault {
+ XMLSignatureVerificationInvoker invoker =
+ XMLSignatureVerificationInvoker.getInstance();
+ Element[] response = new Element[1];
+
+ try {
+ // create a parser and builder for binding API objects to/from XML
+ VerifyXMLSignatureRequestParser requestParser =
+ new VerifyXMLSignatureRequestParser();
+ VerifyXMLSignatureResponseBuilder responseBuilder =
+ new VerifyXMLSignatureResponseBuilder();
+ Element reparsedReq;
+ VerifyXMLSignatureRequest requestObj;
+ VerifyXMLSignatureResponse responseObj;
+
+ //since Axis (1.1 ff) has problem with namespaces we take the raw request stored by the Axishandler.
+ TransactionContext context = TransactionContextManager.getInstance().getTransactionContext();
+ // validate the request
+ reparsedReq = ServiceUtils.reparseRequest(context.getRequest());
+
+ // convert to API objects
+ requestObj = requestParser.parse(reparsedReq);
+
+ // invoke the core logic
+ responseObj = invoker.verifyXMLSignature(requestObj);
+
+ // map back to XML
+ response[0] = responseBuilder.build(responseObj).getDocumentElement();
+
+ // save response in transaction
+ context.setResponse(response[0]);
+
+ } catch (MOAException e) {
+ AxisFault fault = AxisFault.makeFault(e);
+ fault.setFaultDetail(new Element[] { e.toErrorResponse()});
+ Logger.debug("Anfrage zur Signaturpruefung wurde nicht erfolgreich beendet:"
+ + System.getProperty("line.separator") + StreamUtils.getStackTraceAsString(e));
+ throw fault;
+ } catch (Throwable t) {
+ MOASystemException e = new MOASystemException("2900", null, t);
+ AxisFault fault = AxisFault.makeFault(e);
+ fault.setFaultDetail(new Element[] { e.toErrorResponse()});
+ Logger.debug("Anfrage zur Signaturpruefung wurde nicht erfolgreich beendet:"
+ + System.getProperty("line.separator") + StreamUtils.getStackTraceAsString(e));
+ throw fault;
+ }
+
+ return response;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/transaction/TransactionContext.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/transaction/TransactionContext.java
new file mode 100644
index 000000000..d66cda965
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/transaction/TransactionContext.java
@@ -0,0 +1,371 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.transaction;
+
+import iaik.ixsil.util.URI;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.security.cert.X509Certificate;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Vector;
+import java.util.Map.Entry;
+
+import org.apache.axis.attachments.ManagedMemoryDataSource;
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+
+/**
+ * Contains information about the current request.
+ *
+ * @author Stefan Knirsch
+ * @author Patrick Peck
+ */
+public class TransactionContext {
+
+ /** The client certificate. */
+ private X509Certificate[] clientCertificate = null;
+ /** The transaction ID. */
+ private String transactionID = null;
+ /** The name of the request. */
+ private String requestName = null;
+ /** The SOAP embedded request */
+ private Element request;
+ /** The response which is to embed by SOAP */
+ private Element response;
+ /** The map pointing to SOAP attachments needed by the request. */
+ private HashMap attachments = null;
+ /** The map containing cashed entities used in DataObjectFactory. */
+ private HashMap resolvedEntities = null;
+ /** The configuration to use throughout the request. */
+ private ConfigurationProvider configuration = null;
+
+ /**
+ * Create a <code>TransactionContext</code> object.
+ *
+ * @param transactionID A unique ID for this <code>TransactionContext</code>.
+ * @param clientCertificate The client certificate chain.
+ * @param configuration The MOA configuration to use for this transaction.
+ */
+ public TransactionContext(
+ String transactionID,
+ X509Certificate[] clientCertificate,
+ ConfigurationProvider configuration) {
+
+ this.transactionID = transactionID;
+ this.clientCertificate = clientCertificate;
+ this.configuration = configuration;
+ }
+
+ /**
+ * Create a <code>TransactionContext</code> object.
+ *
+ * @param transactionID A unique ID for this <code>TransactionContext</code>.
+ * @param clientCertificate The client certificate chain.
+ * @param configuration The MOA configuration to use for this transaction.
+ * @param attachments to use for this transaction.
+ */
+ public TransactionContext(
+ String transactionID,
+ X509Certificate[] clientCertificate,
+ ConfigurationProvider configuration,
+ Element request,
+ HashMap attachments) {
+
+ this.transactionID = transactionID;
+ this.clientCertificate = clientCertificate;
+ this.configuration = configuration;
+ this.request = request;
+ this.attachments = attachments;
+ }
+
+ /**
+ * Returns the client certificate.
+ *
+ * @return The client certificate chain, if SSL client authentication has been
+ * configured in the web server and has been used by the client. The 0th
+ * element of the array contains the client certificate. <code>null</code>
+ * otherwise.
+ */
+ public X509Certificate[] getClientCertificate() {
+ return clientCertificate;
+ }
+
+ /**
+ * Returns the unique transaction ID.
+ *
+ * @return The transaction ID.
+ */
+ public String getTransactionID() {
+ return transactionID;
+ }
+
+ /**
+ * Returns the name of the request.
+ *
+ * @return The name of the request.
+ */
+ public String getRequestName() {
+ return requestName;
+ }
+
+ /**
+ * Sets the name of the request.
+ *
+ * @param requestName The request name to set.
+ */
+ public void setRequestName(String requestName) {
+ this.requestName = requestName;
+ }
+
+ /**
+ * Sets the the request.
+ *
+ * @param request The request to set.
+ */
+ public void setRequest(Element request) {
+ this.request = request;
+ }
+
+ /**
+ * Returns the request.
+ *
+ * @return The request.
+ */
+ public Element getRequest() {
+ return request;
+ }
+
+ /**
+ * Sets the the response.
+ *
+ * @param response The response to set.
+ */
+ public void setResponse(Element response) {
+ this.response = response;
+ }
+
+ /**
+ * Returns the response.
+ *
+ * @return The response.
+ */
+ public Element getResponse() {
+ return response;
+ }
+
+ /**
+ * Adds an attachment to the transactions list of SOAP attachments.
+ *
+ * @param referenceId Identification value for the SOAP attachment.
+ * @param contentType MIME type of the SOAP attachment.
+ * @param is Handle to the ManagedMemoryDataSource of the SOAP attachment.
+ */
+ public void addAttachment(String referenceId, String contentType, ManagedMemoryDataSource is) {
+ if (this.attachments == null) this.attachments = new HashMap();
+ Vector entry = new Vector(2);
+ entry.add(contentType);
+ entry.add(is);
+ this.attachments.put(referenceId, entry);
+ }
+
+ /**
+ * Adds an attachment to the transactions list of SOAP attachments.
+ *
+ * @param referenceId Identification value for the SOAP attachment.
+ * @param contentType MIME type of the SOAP attachment.
+ * @param is Handle to the InputStream of the SOAP attachment.
+ * @param filename Filename of the temporary file the InputStream belongs to
+ */
+ public void addAttachment(String referenceId, String contentType, InputStream is, String filename) {
+ if (this.attachments == null) this.attachments = new HashMap();
+ Vector entry = new Vector(3);
+ entry.add(contentType);
+ entry.add(is);
+ entry.add(filename);
+ this.attachments.put(referenceId, entry);
+ }
+
+ /**
+ * Returns the ManagedMemoryDataSource to a specific SOAP attachment identified by referenceId.
+ *
+ * @param referenceId Identification value for the SOAP attachment.
+ */
+ public ManagedMemoryDataSource getAttachment(String referenceId) {
+ if (attachments==null) {
+ return null;
+ }
+ Vector entry = (Vector) attachments.get(referenceId);
+ if (entry==null) {
+ return null;
+ }
+ Object object = entry.get(1);
+ if (object instanceof ManagedMemoryDataSource) {
+ return (ManagedMemoryDataSource) object;
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Returns the InputStream to a specific SOAP attachment identified by uri.
+ *
+ * @param uri Identification value for the SOAP attachment.
+ */
+ public InputStream getAttachmentInputStream(URI uri) throws MOAApplicationException {
+ if (attachments==null) {
+ return null;
+ }
+ String referenceId = uri.getPath();
+ Vector entry = (Vector) attachments.get(referenceId);
+ if (entry==null) {
+ return null;
+ }
+
+ InputStream attachmentIs = null;
+ Object object = entry.get(1);
+
+ if (object instanceof ManagedMemoryDataSource) {
+ try {
+ attachmentIs = (InputStream) ( ((ManagedMemoryDataSource)object).getInputStream());
+ } catch (IOException e) {
+ throw new MOAApplicationException("2208", new Object[] { uri }, e);
+ }
+ } else {
+ attachmentIs = (InputStream) object;
+ }
+ return attachmentIs;
+ //If we would return the whole mmds: return (ManagedMemoryDataSource) entry.get(1);
+ }
+
+ /**
+ * Returns the content type to a specific SOAP attachment identified by referenceId.
+ *
+ * @param referenceId Identification value for the SOAP attachment.
+ */
+ public String getAttachmentContentType(String referenceId) {
+ Vector entry = (Vector) attachments.get(referenceId);
+ if (entry==null) {
+ return null;
+ }
+ return (String) entry.get(0);
+ }
+
+ /**
+ * Delete the temporary attachment files.
+ */
+public void cleanAttachmentCache() {
+ if (null==attachments) {
+ return;
+ }
+ Iterator iterator = attachments.entrySet().iterator();
+ while (iterator.hasNext()) {
+ Entry hmEntry = (Entry) iterator.next();
+ Vector entry = (Vector)hmEntry.getValue();
+ Object object = entry.get(1);
+ if (object instanceof ManagedMemoryDataSource) {
+ ManagedMemoryDataSource mmds = (ManagedMemoryDataSource)object;
+ try {
+ if (mmds!=null) {
+ InputStream is = mmds.getInputStream();
+ if (is!=null) is.close();
+// not available in Axis 1.0 to 1.1
+// File f = mmds.getDiskCacheFile();
+// if (f!=null) f.delete();
+ mmds.delete();
+ }
+ } catch (IOException e) {
+ // ok to do nothing here
+ }
+ } else if (object instanceof InputStream) {
+ InputStream is = (InputStream)object;
+ try {
+ if (is!=null) is.close();
+ String tempFile = (String) entry.get(2);
+ if (tempFile!=null){
+ File f = new File(tempFile);
+ f.delete();
+ }
+ } catch (IOException e) {
+ // ok to do nothing here
+ }
+ }
+ }
+ }
+
+ /**
+ * Returns the <code>ConfigurationProvider</code> associated with this
+ * transaction.
+ *
+ * @return The ConfigurationProvider associated with this transaction.
+ */
+ public ConfigurationProvider getConfiguration() {
+ return configuration;
+ }
+
+ /**
+ * Search an uri content in cashed map.
+ *
+ * @param uri The value to look for.
+ * @return If found the cached entity, <code>null<code> otherwise.
+ */
+ public Vector FindResolvedEntity(String uri) {
+ if (resolvedEntities==null) return null;
+ return (Vector) resolvedEntities.get(uri);
+ }
+
+ /**
+ * Get a new InputStream of a cached entity.
+ *
+ * @param uri The value to look for.
+ * @return A new InputStream of the cached entity.
+ */
+ public InputStream ResolveURI(String uri) {
+ InputStream is = null;
+ Vector entity = FindResolvedEntity(uri);
+ if (entity!=null) {
+ byte[] contentBytes = (byte[]) entity.get(0);
+ if (contentBytes!=null) {
+ is = new ByteArrayInputStream(contentBytes);
+ }
+ }
+ return is;
+ }
+
+ /**
+ * Put a read entity (supplement, detached content, data object) on
+ * transactions entity cash, to prevent repeated reading on slower channels.
+ *
+ * @param uri A transaction-wide unique URI used as key of the entity cash
+ * table.
+ * @param contentBytes The cached content belonging to the uri.
+ * @param contentType If known, the MIME-type of the cashed content.
+ */
+ public void PutResolvedEntity(String uri, byte[] contentBytes, String contentType) {
+ Logger.trace(" storing uri content of uri \"" + uri + "\" for future references");
+ if (resolvedEntities==null) resolvedEntities = new HashMap();
+ Vector entity = new Vector();
+ entity.add(contentBytes);
+ entity.add(contentType);
+ resolvedEntities.put(uri, entity);
+ }
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/transaction/TransactionContextManager.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/transaction/TransactionContextManager.java
new file mode 100644
index 000000000..7e82e91c8
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/transaction/TransactionContextManager.java
@@ -0,0 +1,77 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.transaction;
+
+/**
+ * Provides each thread with an instance of <code>TransactionContext</code>.
+ *
+ * The single instance of the <code>TransactionContextManager</code> should be
+ * used to access contextual information for each web service transaction, e.g.
+ * the transaction ID, MOA configuration, client certificate, etc.
+ *
+ * @author Stefan Knirsch
+ * @author Patrick Peck
+ */
+public class TransactionContextManager {
+
+ /** The single instance of <code>TransactionContextManager</code> */
+ private static TransactionContextManager instance = null;
+
+ /** Contains a single <code>TransactionContext</code> for each thread. */
+ private ThreadLocal context = null;
+
+ /**
+ * Get the single instance of <code>TransactionContextManager</code>.
+ *
+ * @return The single instanc of <code>TransactionContextManager</code>.
+ */
+ public static synchronized TransactionContextManager getInstance() {
+ if (instance == null) {
+ instance = new TransactionContextManager();
+ }
+ return instance;
+ }
+
+ /**
+ * Creates a new <code>TransactionContextManager</code>.
+ *
+ * Protected to disallow direct instantiation.
+ */
+ protected TransactionContextManager() {
+ context = new ThreadLocal();
+ }
+
+ /**
+ * Set the <code>TransactionContext</code> for the current thread.
+ *
+ * @param txContext The <code>TransactionContext</code> for this thread.
+ */
+ public void setTransactionContext(TransactionContext txContext) {
+ context.set(txContext);
+ }
+
+ /**
+ * Get the <code>TransactionContext</code> for the current thread.
+ *
+ * @return The <code>TransactionContext</code> for the current thread or
+ * <code>null</code>, if none has been set (or if this method is being invoked
+ * outside the bounds of a transaction).
+ */
+ public TransactionContext getTransactionContext() {
+ return (TransactionContext) context.get();
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/transaction/TransactionIDGenerator.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/transaction/TransactionIDGenerator.java
new file mode 100644
index 000000000..715eb1e52
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/transaction/TransactionIDGenerator.java
@@ -0,0 +1,66 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.transaction;
+
+
+/**
+ * A generator for unique transaction IDs.
+ *
+ * <p>The transaction IDs are of the form "<base>-<counter>", where:
+ * <ul>
+ * <li><code>base</code> is initialized with the system time when this class is
+ * being loaded</li>
+ * <li><code>counter</code> is incremented sequentially on each call to
+ * <code>nextID()</code></li>
+ * </ul>
+ * </p>
+ *
+ * <p> Assuming that it is highly unlikely that MOA servers are started at
+ * exactly the same time instant, the mechanism provided by this class should
+ * guarantee unique transaction IDs across multiple restarts and/or instances of
+ * the server.</p>
+ *
+ * @author Patrick Peck
+ * @author Stefan Knirsch
+ */
+public class TransactionIDGenerator {
+
+ /** Request sequence number. */
+ private static long counter = 0;
+ /** The base value to which to append the sequence number. */
+ private static String base = null;
+
+ /**
+ * Set up the initial base value.
+ */
+ static {
+ synchronized (TransactionIDGenerator.class) {
+ base = Long.toString(System.currentTimeMillis());
+ }
+ }
+
+ /**
+ * Returns the next transaction ID.
+ *
+ * @return The next transaction ID.
+ */
+ public static synchronized String nextID() {
+ counter++;
+
+ return (base + "-" + counter);
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/util/IdGenerator.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/util/IdGenerator.java
new file mode 100644
index 000000000..722ab5e6c
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/util/IdGenerator.java
@@ -0,0 +1,76 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.server.util;
+
+import java.util.Set;
+
+/**
+ * Generate unique ID values for various objects in the response.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class IdGenerator {
+ /** The base value to append the counter to. */
+ private String base;
+ /** The <code>Set</code> of reserved ID values. */
+ private Set reserved;
+ /** The sequence number. */
+ private int count;
+
+ /**
+ * Create a new <code>IdGenerator</code>.
+ *
+ * @param base A base value to append the IDs to. The creator of this object
+ * should provide a base value, so that appending the counter leads to unique
+ * IDs.
+ * @param reserved The <code>Set</code> of reserved IDs. A call to
+ * <code>uniqueId()</code> will respect the reserved IDs.
+ */
+ public IdGenerator(String base, Set reserved) {
+ this.base = base;
+ this.reserved = reserved;
+ count = 1;
+ }
+
+ /**
+ * Create the next ID value in the sequence.
+ *
+ * @return The next ID value in the sequence.
+ */
+ protected String nextId() {
+ return base + "-" + count++;
+ }
+
+ /**
+ * Create the next unique ID value which is unique in the reserved ID set.
+ *
+ * The created ID is added to the set of reserved IDs.
+ *
+ * @return The next ID value.
+ */
+ public String uniqueId() {
+ String nextId;
+
+ while (reserved.contains(nextId = nextId()));
+
+ reserved.add(nextId);
+
+ return nextId;
+
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/util/MessageProvider.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/util/MessageProvider.java
new file mode 100644
index 000000000..bd858f50f
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/util/MessageProvider.java
@@ -0,0 +1,80 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package at.gv.egovernment.moa.spss.util;
+
+import java.util.Locale;
+
+import at.gv.egovernment.moa.util.Messages;
+
+/**
+ * Singleton wrapper around a <code>Messages</code> object.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class MessageProvider {
+
+ /** The resource names of the messages to load. */
+ private static final String[] DEFAULT_MESSAGE_RESOURCES =
+ { "resources/properties/spss_messages" };
+ /** The corresponding message locales. */
+ private static final Locale[] DEFAULT_MESSAGE_LOCALES =
+ new Locale[] { new Locale("de", "AT") };
+ /** The single instance of this class. */
+ private static MessageProvider instance;
+
+ /** The messages provided by the <code>MessageProvider</code>. */
+ private Messages messages;
+
+ /**
+ * Return the single instance of the <code>MessageProvider</code>.
+ *
+ * Intialilizes the <code>MessageProvider</code> with the default message
+ * locations: <code>/resources/properties/spss_messages</code>.
+ *
+ * @return The single <code>MessageProvider</code>.
+ */
+ public static synchronized MessageProvider getInstance() {
+ if (instance == null) {
+ instance =
+ new MessageProvider(DEFAULT_MESSAGE_RESOURCES, DEFAULT_MESSAGE_LOCALES);
+ }
+ return instance;
+ }
+
+ /**
+ * Create a <code>MessageProvider</code>.
+ *
+ * @param resourceNames The names of the resources containing the messages.
+ * @param locales The corresponding locales.
+ */
+ protected MessageProvider(String[] resourceNames, Locale[] locales) {
+ this.messages = new Messages(resourceNames, locales);
+ }
+
+ /**
+ * Get the message corresponding to a given message ID.
+ *
+ * @param messageId The ID of the message.
+ * @param parameters The parameters to fill in into the message arguments.
+ * @return The formatted message.
+ */
+ public String getMessage(String messageId, Object[] parameters) {
+ return messages.getMessage(messageId, parameters);
+ }
+
+
+}
diff --git a/spss/server/serverlib/src/main/javadoc/overview.html b/spss/server/serverlib/src/main/javadoc/overview.html
new file mode 100644
index 000000000..9b17bbf91
--- /dev/null
+++ b/spss/server/serverlib/src/main/javadoc/overview.html
@@ -0,0 +1,155 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+</head>
+<body bgcolor="white">
+
+MOA SP/SS API documentation overview.
+
+
+<h2>Using the MOA SP/SS API</h2>
+
+<h3>Invoking the services</h3>
+In general, invoking the MOA SP/SS API involves the following steps:
+<ol>
+<li>Set the <code>moa.spss.server.configuration</code> system property to point
+to the main MOA SP/SS configuration file. This needs to be done only once per
+JVM instance. You may also call
+{@link at.gv.egovernment.moa.spss.api.Configurator#init} at this point to
+pre-initialize MOA SP/SS (if not, it is done automatically upon service
+invocation).</li>
+<li>Create an instance of the service to be used
+({@link at.gv.egovernment.moa.spss.api.SignatureCreationService} or
+{@link at.gv.egovernment.moa.spss.api.SignatureVerificationService}),
+via its <code>getInstance()</code> method.</li>
+<li>Create an instance of the
+{@link at.gv.egovernment.moa.spss.api.SPSSFactory}, via its
+{@link at.gv.egovernment.moa.spss.api.SPSSFactory#getInstance} method.</li>
+<li>Use the <code>create...</code> methods of the <code>SPSSFactory</code> to
+create the desired {@link at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest},
+{@link at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest} or
+{@link at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest} object.
+</li>
+<li>Call one of the service methods:
+{@link at.gv.egovernment.moa.spss.api.SignatureCreationService#createXMLSignature(at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest) <code>createXMLSignature()</code>},
+{@link at.gv.egovernment.moa.spss.api.SignatureVerificationService#verifyCMSSignature(at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest) <code>verifyCMSSignature()</code>} or
+{@link at.gv.egovernment.moa.spss.api.SignatureVerificationService#verifyXMLSignature(at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest) <code>verifyXMLSignature()</code>}.
+</li>
+<li>Analyze the result of the service call, given as a
+{@link at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse},
+{@link at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse} or
+{@link at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse}.
+In case of an error, a {@link at.gv.egovernment.moa.spss.MOAException}
+is thrown by the service. Please be aware that errors during signature creation
+are reported as part of a <code>CreateXMLSignatureResponse</code>.
+</ol>
+
+<h3>Creating MOA SP/SS API objects</h3>
+<p>
+Invoking the MOA SP/SS API <code>Service</code> classes involves creating
+a <code>Request</code> object using the {@link at.gv.egovernment.moa.spss.api.SPSSFactory SPSSFactory}.
+Object creation using the <code>SPSSFactory</code> is always bottom-up, meaning
+that in order to create an object all of its components must have been created
+before.
+</p>
+<p>
+The names of the MOA SP/SS API classes have been chosen to correspond to the
+MOA SP/SS schema elements. The structure of the classes (i.e., their fields)
+also corresponds to the structure of the respective MOA SP/SS schema elements.
+However, a few classes escape this naming convention, mainly because the
+corresponding schema elements contain <code>xsd:choice</code> components:
+<ul>
+<li>The various <code>Profile</code> classes have subclasses called
+<code>ProfileID</code> and <code>ProfileExplicit</code>
+(e.g., {@link at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfileID} and
+{@link at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfileExplicit}),
+so that the profile can be given either as an ID (which is to be resolved from the
+MOA SP/SS configuration) or explicitly.</li>
+<li>The classes {@link at.gv.egovernment.moa.spss.api.common.Content},
+{@link at.gv.egovernment.moa.spss.api.cmsverify.CMSContent} and
+{@link at.gv.egovernment.moa.spss.api.xmlverify.TransformParameter} have
+subclasses specifying the type of content they actually contain. E.g.,
+{@link at.gv.egovernment.moa.spss.api.common.ContentBinary} will contain
+a byte stream.</li>
+</ul>
+
+</p>
+<p>
+For clarity, the MOA SP/SS API classes have been organized in several packages
+listed in the following table:
+</p>
+
+<table border=1 cellspacing=0 cellpadding=5>
+<tr>
+ <td>Package</td><td>Purpose</td>
+</tr>
+<tr>
+ <td>{@link at.gv.egovernment.moa.spss.api.xmlsign}</td>
+ <td>Components of the {@link at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest} and
+ {@link at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse}</td>
+</tr>
+<tr>
+ <td>{@link at.gv.egovernment.moa.spss.api.cmsverify}</td>
+ <td>Components of the
+ {@link at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest} and
+ {@link at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse}</td>
+</tr>
+<tr>
+ <td>{@link at.gv.egovernment.moa.spss.api.xmlverify}</td>
+ <td>Components of the
+ {@link at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest} and
+ {@link at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse}</td>
+</tr>
+<tr>
+ <td>{@link at.gv.egovernment.moa.spss.api.common}</td>
+ <td>Common components used across the classes of the above packages</td>
+</tr>
+</table>
+
+<h3>Converting MOA SP/SS API objects to and from DOM trees</h3>
+The package {@link at.gv.egovernment.moa.spss.api.xmlbind} contains helper
+classes to:
+<ul>
+<li>Parse a DOM tree containing a <code>CreateXMLSignatureRequest</code>,
+<code>VerifyCMSSignatureRequest</code> or
+<code>VerifyCMSSignatureRequest</code> into its respective MOA SP/SS API object
+representation. For example, to parse a <code>CreateXMLSignatureRequest</code>
+DOM tree, the {@link at.gv.egovernment.moa.spss.api.xmlbind.CreateXMLSignatureRequestParser#parse(org.w3c.dom.Element) CreateXMLSignatureRequestParser.parse()}
+method can be used. <br />
+<b>Note:</b> The DOM tree of the request must be derived from a schema valid
+XML document. Otherwise, unexpected behaviour will almost certainly result.</li>
+<li>Build a <code>CreateXMLSignatureResponse</code>,
+<code>VerifyCMSSignatureResponse</code> or a
+<code>VerifyXMLSignatureResponse</code> DOM tree from the respective MOA SP/SS
+API object. For example, to build a <code>VerifyXMLSignatureResponse</code>
+DOM tree, the {@link at.gv.egovernment.moa.spss.api.xmlbind.VerifyXMLSignatureResponseBuilder#build(at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse) VerifyXMLSignatureResponseBuilder.build()}
+can be used.<br />
+<b>Note:</b>The serialized DOM tree will be schema valid.
+</li>
+</ul>
+The DOM trees can easily be read from and written to XML byte streams using
+the methods in the {@link at.gv.egovernment.moa.util.DOMUtils} class.
+<br />
+
+<h3>Utilities and Logging</h3>
+<p> The packages {@link at.gv.egovernment.moa.util} and
+{@link at.gv.egovernment.moa.spss.util} contain utility classes developed for
+the MOA SP/SS implementation. Since the classes contained in these packages are
+tailored towards the MOA SP/SS implementation, they are far from being complete
+in the sense of providing a utility class library. Therefore, they may or may
+not prove useful in the context of your application. Their interfaces may also
+change in future releases.
+</p>
+
+<p>The package {@link at.gv.egovernment.moa.logging} contains classes for
+logging messages to the MOA SP/SS log hierarchy via the
+{@link at.gv.egovernment.moa.logging.Logger} class.
+</p>
+
+<h3>Related Documentation</h3>
+
+See also the <a href="../moa_spss/sp-anwendung.htm#API">API example</a> in the
+MOA SP/SS documentation.
+
+</body>
+</html> \ No newline at end of file
diff --git a/spss/server/serverlib/src/main/resources/resources/properties/spss_messages_de.properties b/spss/server/serverlib/src/main/resources/resources/properties/spss_messages_de.properties
new file mode 100644
index 000000000..3920da4d9
--- /dev/null
+++ b/spss/server/serverlib/src/main/resources/resources/properties/spss_messages_de.properties
@@ -0,0 +1,150 @@
+# This file contains exception messages in the standard Java properties
+# format. The messages may contain formatting patterns as definied in the
+# java.text.MessageFormat class.
+
+#
+# Error messages: the key corresponds to the error code
+#
+
+1100=Fehler beim Validieren der Anfrage: {0}
+1101=Bei enveloping Datenobjekten muss entweder Content oder Reference übergeben werden
+1102=Bei detached Datenobjekten darf das Attribut Reference nicht leer sein
+1103=Ungültiger Wert für Attribut Structure im Element DataObjectInfo: {0}
+1104=Ungültiger Wert für DateTime: {0}
+1105=Ungültiger Wert für Attribut Index in Element CreateSignatureLocation: {0}
+1106=Interner Fehler beim Parsen der XML-Daten
+1107=Kein Kind-Element im Element XMLContent gefunden
+1108=Ungültiger Wert für dsig:Algorithm: {0}
+1109=XMLContent darf nur ein Kind-Element enthalten
+1110=Entweder Content oder Reference muss gesetzt sein
+1111=Reference muss gesetzt sein, wenn kein Content angegeben ist
+1112=Bei leerer Reference muss CreateSignatureEnvironment vorhanden sein
+1113=Der Endpunkt akzeptiert keine Anfragen vom Typ: {0}
+
+2200=Fehler beim Erzeugen der Antwort
+2201=Transformations-Algorithmus unbekannt: {0}
+2202=Kein XPath-Element für XPath-Transformation gefunden
+2203=TrustProfileID unbekannt: {0}
+2207=Ungültiges URI-Format: {0}
+2208=Fehler beim Öffnen des Datenobjekts (URI={0})
+2209=Fehler beim Parsen der XML-Daten
+2210=Fehler beim Lesen des Datenobjekts
+2211=Referenzierte Daten können nicht als XML interpretiert werden (URI={0})
+2212=Fehler beim Auswerten des XPath-Ausdrucks: {0}
+2213=Zugriff auf das Dateisystem verweigert (URI={0})
+2214=Ungültiges URL-Format: {0}
+2215=Kein Stylesheet für XSLT-Transformation gefunden
+2216=Kein XPath-Filter2 Element für XPath-Filter2-Transform gefunden
+2217=Kein InclusiveNamespaces Element für Exclusive Canonicalization Transform gefunden
+2218=Das Signature Environment enthält keine validen XML-Daten
+2219=Fehler beim Lesen des Signature Environment
+2220=Allgemeiner Fehler beim Erzeugen der Signatur [{0}]
+2221=Fehler bei der Behandlung des Schlüssels [{0}]
+2222=Fehler beim Erstellen des Manifests [{0}]
+2223=Fehler beim Erstellen der Referenz [{0}]
+2224=Hashwert nicht verfügbar [{0}]
+2225=Signier-Algorithmus wird nicht unterstützt [{0}]
+2226=Fehler beim Einbetten der Signatur [{0}]
+2227=Fehler beim Berechnen des Signaturwertes [{0}]
+2228=Fehler beim Behandeln der SignedProperties [{0}]
+2229=Signator-Zertifikat nicht verfügbar [{0}]
+2230=Fehler beim Auflösen eines Supplements [{0}]
+2231=Die Schlüsselgruppe ist nicht verfügbar
+2232=Die Schlüsselgruppe ist leer
+2233=Fehler beim Durchführen der Transformation [{0}]
+2234=CreateTransformsInfoProfileID nicht vorhanden (ID={0})
+2235=CreateSignatureEnvironment muss entweder Reference oder Content enthalten
+2236=CreateSignatureEnvironmentProfileID nicht vorhanden (ID={0})
+2237=Fehler beim Auflösen der internen Referenz (URI={0})
+2238=Fehler beim Auflösen des Transformationsparameters (URI={0})
+2240=Allgemeiner Fehler beim Verifizieren der Signatur [{0}]
+2241=Algorithmus wird nicht unterstützt [{0}]
+2242=Fehler beim Parsen der CMS Signatur [{0}]
+2243=Signator-Zertifikat nicht verfügbar [{0}]
+2244=Fehler beim Lesen der Signatur-Daten
+2245=Fehler beim Codieren des Signator-Zertifikats
+2246=Fehler beim Umwandeln des SubjectDN des Signator-Zertifikats nach RFC2253: {0}
+2247=Allgemeiner Fehler beim Verifizieren der Signatur [{0}]
+2248=Fehler beim Vorbereiten der Daten [{0}]
+2249=Das Attribut Signatories enthält einen ungültigen Index (Index={0})
+2262=Fehler beim Behandeln des Manifests [{0}]
+2263=Fehler beim Parsen der Properties [{0}]
+2264=Fehler beim Behandeln der Referenz [{0}]
+2265=Fehler beim Durchführen der Transformation [{0}]
+2266=Signatur ist kein dsig:Signature-Element
+2267=SupplementProfileID nicht vorhanden (ID={0})
+2268=VerifyTransformsInfoProfileID nicht vorhanden (ID={0})
+2269=Fehler beim Parsen der Transformation [{0}]
+2270=Fehler beim Decodieren des Hash-Wertes
+2271=Falsche Anzahl an ReferenceInfo Elementen in SignatureManfestCheckParams
+2280=Die Angabe XMLContent wird derzeit nicht unterstützt
+2281=XML-Supplement kann nicht serialisiert werden (Reference="{0}")
+2282=Datenobjekt mit der URI={0} wurde dem Request nicht bereit gestellt
+
+
+2900=Interner Server-Fehler
+
+3201=Objekt kann nicht geladen werden (Reference="{0}", LocRef-URI="{1}")
+3202=Supplement für Signaturumgebung kann nicht geladen werden (Reference="{0}", LocRef-URI="{1}")
+3203=Signaturumgebung kann nicht geladen werden (Reference="{0}", LocRef-URI="{1}")
+
+9900=Nicht klassifizierter Fehler in Subsystem
+9901=Nicht klassifizierter Laufzeitfehler in Subsystem
+9999=Nicht klassifizierter Fehler
+
+
+#
+# Server internal messages
+#
+
+init.00=Fehler beim Lesen der MOA SP/SS Konfiguration: das Service steht nicht zur Verfügung
+init.01=MOA SP/SS Konfiguration erfolgreich geladen
+init.02=Fehler beim Löschen der Archivdaten
+init.03=Fehler beim Aktivieren des IAIK-JCE/JSSE/JDK1.3 Workaround: SSL ist möglicherweise nicht verfügbar
+init.04=Fehler beim Initialisieren des Schema Pools
+
+config.00=Fehler beim Erstellen des KeyGroupMapping: KeyGroup mit id={0} unbekannt - die Erstellung des KeyGroupMapping wird fortgeführt
+config.01=Fehler in der Konfiguration: Wert für maximale Archivierungsdauer von Widerrufsinformationen (ArchiveDuration) nicht konfiguriert oder ungültig
+config.02=Fehler in der Konfiguration: {0} mit id={1}: falscher Profiltyp in Datei {2}
+config.03=Fehler in der Konfiguration: {0} mit id={1} konnte nicht geladen werden
+config.04=Fehler in der Konfiguration: {0} mit id={1} existiert bereits
+config.05=Umgebungsvariable {0} nicht gesetzt: benutze Default-Konfiguration
+config.06=Die MOA SP/SS Konfiguration wurde erfolgreich aktualisiert.
+config.07=Fehler in der Konfiguration: Reason code {0} unbekannt
+config.08=Fehler beim Konfigurieren der IAIK-Module
+config.09=Fehler beim Öffnen der Schlüssel-Datei {0}
+config.10=Fehler beim Einlesen der Konfiguration (siehe Log-Datei für Details)
+config.11=Fehler beim Erstellen der Konfiguration (siehe Log-Datei für Details)
+config.12=Fehler beim Einlesen des Profils
+config.13=Fehler beim Erstellen des CRLDistributionPoint: CAIssuerDN={0} ungültig
+config.14=Das Attribut {0} für das TrustProfile mit id={1} ist ungültig (Wert={2})
+config.15=Fehler beim Erstellen des TrustProfile id={0}: Name des Konfigurations-Verzeichnisses konnte nicht in eine URL umgewandet werden
+config.16=Fehler beim Erstellen von X509IssuerSerial (IssuerName={0}, SerialNumber={1})
+config.17=DigestAlgorithmName unbekannt (AlgorithmName={0})
+config.18=Lade Keystore: {0}
+config.19=Key ID={0}
+config.20=Fehler beim Aktualisieren der MOA SP/SS Konfiguration. Die bestehende Konfiguration wird beibehalten
+config.21=Lade Konfiguration von {0}
+config.22=Lade {0} mit id={1} von Datei {2}
+config.23=MOA SP/SS Konfiguration: {0} nicht gesetzt oder ungültiger Wert, verwende den Default-Wert: {1}
+config.25=Fehler in der Konfiguration: Das SoftwareKeyModule mit id={0} konnte nicht geladen werden, da die Datei {1} nicht existiert oder ein Verzeichnis bezeichnet
+config.26=Fehler beim Erstellen der KeyGroup mit id={0}: KeyModule mit id={1} unbekannt
+config.27=Fehler in der Konfiguration: Das Attribut {0} des TrustProfiles mit id={1} zeigt nicht auf ein existierendes Verzeichnis
+config.28=Einen detaillierten Fehlerbericht entnehmen Sie bitte der Log-Datei.
+config.29=Es sind folgende leichte Fehler aufgetreten:
+config.31=Fehler in der Konfiguration der KeyGroup mit id={0}: Der Schlüssel im KeyModule id={1} mit IssuerName={2} und SerialNumber={3} konnte nicht geladen werden
+config.32=Fehler in der Konfiguration: Verzeichnisangabe für den Zertifikatsspeicher ist ungültig ({0}).
+
+handler.00=Starte neue Transaktion: TID={0}, Service={1}
+handler.01=Aufruf von Adresse={0}
+handler.02=Client-Zertifikat: Subject={0}, Serial={1}, Issuer={2}
+handler.03=Client-Zertifikat nicht verfügbar
+handler.04=Anfrage erfolgreich abgearbeitet
+handler.05=Fehler beim Abarbeiten der Anfrage
+handler.06=SOAP Attachment mit der id={0} für Request hinterlegt (MIME Type des Attachments={1})
+handler.07=SOAP Request empfangen: Request={0}
+
+invoker.00=Das Signature Environment konnte nicht validierend geparst werden
+invoker.01=Keine passende Transformationskette gefunden (Index={0})
+invoker.02=Der Hashwert der Transformation stimmt nicht überein (Index={0})
+invoker.03=Signatorzertifikat aus Trustprofile mit id={0} konnte nicht geparst werden (Dateiname={1}) \ No newline at end of file
diff --git a/spss/server/serverlib/src/main/resources/resources/security/cacerts b/spss/server/serverlib/src/main/resources/resources/security/cacerts
new file mode 100644
index 000000000..6eeaba418
--- /dev/null
+++ b/spss/server/serverlib/src/main/resources/resources/security/cacerts
Binary files differ
diff --git a/spss/server/serverlib/src/main/resources/resources/wsdl/MOA-SPSS-1.3.wsdl b/spss/server/serverlib/src/main/resources/resources/wsdl/MOA-SPSS-1.3.wsdl
new file mode 100644
index 000000000..c5cd8fc0f
--- /dev/null
+++ b/spss/server/serverlib/src/main/resources/resources/wsdl/MOA-SPSS-1.3.wsdl
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Web Service Description for MOA SP/SS 1.4
+-->
+<definitions name="MOA" targetNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:moa="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <import namespace="http://reference.e-government.gv.at/namespace/moa/20020822#" location="../resources/schemas/MOA-SPSS-1.3.xsd"/>
+ <message name="CreateXMLSignatureInput">
+ <part name="body" element="moa:CreateXMLSignatureRequest"/>
+ </message>
+ <message name="CreateXMLSignatureOutput">
+ <part name="body" element="moa:CreateXMLSignatureResponse"/>
+ </message>
+ <message name="VerifyCMSSignatureInput">
+ <part name="body" element="moa:VerifyCMSSignatureRequest"/>
+ </message>
+ <message name="VerifyCMSSignatureOutput">
+ <part name="body" element="moa:VerifyCMSSignatureResponse"/>
+ </message>
+ <message name="VerifyXMLSignatureInput">
+ <part name="body" element="moa:VerifyXMLSignatureRequest"/>
+ </message>
+ <message name="VerifyXMLSignatureOutput">
+ <part name="body" element="moa:VerifyXMLSignatureResponse"/>
+ </message>
+ <message name="MOAFault">
+ <part name="body" element="moa:ErrorResponse"/>
+ </message>
+ <portType name="SignatureCreationPortType">
+ <operation name="createXMLSignature">
+ <input message="tns:CreateXMLSignatureInput"/>
+ <output message="tns:CreateXMLSignatureOutput"/>
+ <fault name="MOAFault" message="tns:MOAFault"/>
+ </operation>
+ </portType>
+ <portType name="SignatureVerificationPortType">
+ <operation name="verifyCMSSignature">
+ <input message="tns:VerifyCMSSignatureInput"/>
+ <output message="tns:VerifyCMSSignatureOutput"/>
+ <fault name="MOAFault" message="tns:MOAFault"/>
+ </operation>
+ <operation name="verifyXMLSignature">
+ <input message="tns:VerifyXMLSignatureInput"/>
+ <output message="tns:VerifyXMLSignatureOutput"/>
+ <fault name="MOAFault" message="tns:MOAFault"/>
+ </operation>
+ </portType>
+ <binding name="SignatureCreationBinding" type="tns:SignatureCreationPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="createXMLSignature">
+ <soap:operation soapAction="urn:CreateXMLSignatureAction"/>
+ <input>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </output>
+ <fault name="MOAFault">
+ <soap:fault use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </fault>
+ </operation>
+ </binding>
+ <binding name="SignatureVerificationBinding" type="tns:SignatureVerificationPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="verifyCMSSignature">
+ <soap:operation soapAction="urn:VerifyCMSSignatureAction"/>
+ <input>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </output>
+ <fault name="MOAFault">
+ <soap:fault use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </fault>
+ </operation>
+ <operation name="verifyXMLSignature">
+ <soap:operation soapAction="urn:VerifyXMLSignatureAction"/>
+ <input>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </output>
+ <fault name="MOAFault">
+ <soap:fault use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </fault>
+ </operation>
+ </binding>
+ <service name="SignatureCreationService">
+ <port name="SignatureCreationPort" binding="tns:SignatureCreationBinding">
+ <!--
+ Please note that the location URL must be adapted to the actual service URL.
+ <soap:address location="http://localhost/moa-spss/services/SignatureCreation"/>
+ -->
+ </port>
+ </service>
+ <service name="SignatureVerificationService">
+ <port name="SignatureVerificationPort" binding="tns:SignatureVerificationBinding">
+ <!--
+ Please note that the location URL must be adapted to the actual service URL.
+ <soap:address location="http://localhost/moa-spss/services/SignatureVerification"/>
+ -->
+ </port>
+ </service>
+</definitions>
diff --git a/spss/server/serverlib/src/main/resources/resources/wsdl/MOA-SPSS-1.3.xsd b/spss/server/serverlib/src/main/resources/resources/wsdl/MOA-SPSS-1.3.xsd
new file mode 100644
index 000000000..756b51279
--- /dev/null
+++ b/spss/server/serverlib/src/main/resources/resources/wsdl/MOA-SPSS-1.3.xsd
@@ -0,0 +1,469 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ MOA SP/SS 1.3 Schema
+-->
+<xsd:schema targetNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#">
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+ <!--########## Create XML Signature ###-->
+ <!--### Create XML Signature Request ###-->
+ <xsd:element name="CreateXMLSignatureRequest">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="CreateXMLSignatureRequestType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:complexType name="CreateXMLSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="KeyIdentifier" type="KeyIdentifierType"/>
+ <xsd:element name="SingleSignatureInfo" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Ermöglichung der Stapelsignatur durch wiederholte Angabe dieses Elements</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="DataObjectInfo" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="DataObjectInfoType">
+ <xsd:attribute name="ChildOfManifest" type="xsd:boolean" use="optional" default="false"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="CreateSignatureInfo" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="CreateSignatureEnvironment" type="ContentOptionalRefType"/>
+ <xsd:choice>
+ <xsd:annotation>
+ <xsd:documentation>Auswahl: Entweder explizite Angabe des Signaturorts sowie ggf. sinnvoller Supplements im Zshg. mit der Signaturumgebung, oder Verweis auf ein benanntes Profil</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element ref="CreateSignatureEnvironmentProfile"/>
+ <xsd:element name="CreateSignatureEnvironmentProfileID" type="ProfileIdentifierType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="SecurityLayerConformity" type="xsd:boolean" use="optional" default="true"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Create XML Signature Response ###-->
+ <xsd:complexType name="CreateXMLSignatureResponseType">
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Kardinalität 1..oo erlaubt die Antwort auf eine Stapelsignatur-Anfrage</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element name="SignatureEnvironment">
+ <xsd:annotation>
+ <xsd:documentation>Resultat, falls die Signaturerstellung erfolgreich war</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="lax"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element ref="ErrorResponse"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:element name="CreateXMLSignatureResponse" type="CreateXMLSignatureResponseType"/>
+ <!--########## Verify CMS Signature ###-->
+ <!--### Verifiy CMS Signature Request ###-->
+ <xsd:element name="VerifyCMSSignatureRequest">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="VerifyCMSSignatureRequestType">
+ <xsd:attribute name="Signatories" type="SignatoriesType" use="optional" default="1"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:complexType name="VerifyCMSSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="DateTime" type="xsd:dateTime" minOccurs="0"/>
+ <xsd:element name="CMSSignature" type="xsd:base64Binary"/>
+ <xsd:element name="DataObject" type="CMSDataObjectOptionalMetaType" minOccurs="0"/>
+ <xsd:element name="TrustProfileID" type="xsd:token">
+ <xsd:annotation>
+ <xsd:documentation>mit diesem Profil wird eine Menge von vertrauenswürdigen Wurzelzertifikaten spezifiziert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Verify CMS Signature Response ###-->
+ <xsd:element name="VerifyCMSSignatureResponse" type="VerifyCMSSignatureResponseType"/>
+ <xsd:complexType name="VerifyCMSSignatureResponseType">
+ <xsd:sequence maxOccurs="unbounded">
+ <xsd:element name="SignerInfo" type="dsig:KeyInfoType">
+ <xsd:annotation>
+ <xsd:documentation>only ds:X509Data and RetrievalMethod is supported; QualifiedCertificate is included as X509Data/any;publicAuthority is included as X509Data/any</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="SignatureCheck" type="CheckResultType"/>
+ <xsd:element name="CertificateCheck" type="CheckResultType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--########## Verify XML Signature ###-->
+ <!--### Verify XML Signature Request ###-->
+ <xsd:element name="VerifyXMLSignatureRequest" type="VerifyXMLSignatureRequestType"/>
+ <xsd:complexType name="VerifyXMLSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="DateTime" type="xsd:dateTime" minOccurs="0"/>
+ <xsd:element name="VerifySignatureInfo">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="VerifySignatureEnvironment" type="ContentOptionalRefType"/>
+ <xsd:element name="VerifySignatureLocation" type="xsd:token"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element ref="SupplementProfile"/>
+ <xsd:element name="SupplementProfileID" type="xsd:string"/>
+ </xsd:choice>
+ <xsd:element name="SignatureManifestCheckParams" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ReferenceInfo" type="VerifyTransformsDataType" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Pro dsig:Reference-Element in der zu überprüfenden XML-Signatur muss hier ein ReferenceInfo-Element erscheinen. Die Reihenfolge der einzelnen ReferenceInfo Elemente entspricht jener der dsig:Reference Elemente in der XML-Signatur.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="ReturnReferenceInputData" type="xsd:boolean" use="optional" default="true"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ReturnHashInputData" minOccurs="0"/>
+ <xsd:element name="TrustProfileID" type="xsd:token">
+ <xsd:annotation>
+ <xsd:documentation>mit diesem Profil wird eine Menge von vertrauenswürdigen Wurzelzertifikaten spezifiziert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Verify XML Signature Response ###-->
+ <xsd:element name="VerifyXMLSignatureResponse" type="VerifyXMLSignatureResponseType"/>
+ <xsd:complexType name="VerifyXMLSignatureResponseType">
+ <xsd:sequence>
+ <xsd:element name="SignerInfo" type="dsig:KeyInfoType">
+ <xsd:annotation>
+ <xsd:documentation>only ds:X509Data and ds:RetrievalMethod is supported; QualifiedCertificate is included as X509Data/any; PublicAuthority is included as X509Data/any</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="HashInputData" type="InputDataType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="ReferenceInputData" type="InputDataType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="SignatureCheck" type="ReferencesCheckResultType"/>
+ <xsd:element name="SignatureManifestCheck" type="ReferencesCheckResultType" minOccurs="0"/>
+ <xsd:element name="XMLDSIGManifestCheck" type="ManifestRefsCheckResultType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="CertificateCheck" type="CheckResultType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:simpleType name="ProfileIdentifierType">
+ <xsd:restriction base="xsd:token"/>
+ </xsd:simpleType>
+ <xsd:complexType name="InputDataType">
+ <xsd:complexContent>
+ <xsd:extension base="ContentExLocRefBaseType">
+ <xsd:attribute name="PartOf" use="optional" default="SignedInfo">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="SignedInfo"/>
+ <xsd:enumeration value="XMLDSIGManifest"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="ReferringSigReference" type="xsd:nonNegativeInteger" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="MetaInfoType">
+ <xsd:sequence>
+ <xsd:element name="MimeType" type="MimeTypeType"/>
+ <xsd:element name="Description" type="xsd:anyURI" minOccurs="0"/>
+ <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="FinalDataMetaInfoType">
+ <xsd:complexContent>
+ <xsd:extension base="MetaInfoType">
+ <xsd:sequence>
+ <xsd:element name="Type" type="xsd:anyURI" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="DataObjectInfoType">
+ <xsd:sequence>
+ <xsd:element name="DataObject">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="ContentOptionalRefType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:choice>
+ <xsd:annotation>
+ <xsd:documentation>Auswahl: Entweder explizite Angabe EINER Transformationskette inklusive ggf. sinnvoller Supplements oder Verweis auf ein benanntes Profil</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element ref="CreateTransformsInfoProfile"/>
+ <xsd:element name="CreateTransformsInfoProfileID" type="ProfileIdentifierType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ <xsd:attribute name="Structure" use="required">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="detached"/>
+ <xsd:enumeration value="enveloping"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ </xsd:complexType>
+ <xsd:complexType name="TransformsInfoType">
+ <xsd:sequence>
+ <xsd:element ref="dsig:Transforms" minOccurs="0"/>
+ <xsd:element name="FinalDataMetaInfo" type="FinalDataMetaInfoType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="XMLDataObjectAssociationType">
+ <xsd:sequence>
+ <xsd:element name="MetaInfo" type="MetaInfoType" minOccurs="0"/>
+ <xsd:element name="Content" type="ContentRequiredRefType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CMSDataObjectOptionalMetaType">
+ <xsd:sequence>
+ <xsd:element name="MetaInfo" type="MetaInfoType" minOccurs="0"/>
+ <xsd:element name="Content" type="CMSContentBaseType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CMSContentBaseType">
+ <xsd:complexContent>
+ <xsd:restriction base="ContentOptionalRefType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ </xsd:choice>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="AnyChildrenType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ReferencesCheckResultType">
+ <xsd:complexContent>
+ <xsd:restriction base="CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="ReferencesCheckResultInfoType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ReferencesCheckResultInfoType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:restriction base="AnyChildrenType">
+ <xsd:sequence>
+ <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="FailedReference" type="xsd:positiveInteger" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ManifestRefsCheckResultType">
+ <xsd:complexContent>
+ <xsd:restriction base="CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="ManifestRefsCheckResultInfoType"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ManifestRefsCheckResultInfoType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:restriction base="AnyChildrenType">
+ <xsd:sequence>
+ <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="FailedReference" type="xsd:positiveInteger" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="ReferringSigReference" type="xsd:positiveInteger"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <!--########## Error Response ###-->
+ <xsd:element name="ErrorResponse" type="ErrorResponseType">
+ <xsd:annotation>
+ <xsd:documentation>Resultat, falls die Signaturerstellung gescheitert ist</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:complexType name="ErrorResponseType">
+ <xsd:sequence>
+ <xsd:element name="ErrorCode" type="xsd:integer"/>
+ <xsd:element name="Info" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--########## Auxiliary Types ###-->
+ <xsd:simpleType name="KeyIdentifierType">
+ <xsd:restriction base="xsd:string"/>
+ </xsd:simpleType>
+ <xsd:simpleType name="KeyStorageType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="Software"/>
+ <xsd:enumeration value="Hardware"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="MimeTypeType">
+ <xsd:restriction base="xsd:token"/>
+ </xsd:simpleType>
+ <xsd:complexType name="AnyChildrenType" mixed="true">
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="XMLContentType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:extension base="AnyChildrenType">
+ <xsd:attribute ref="xml:space" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ContentBaseType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ <xsd:element name="LocRefContent" type="xsd:anyURI"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:complexType name="ContentExLocRefBaseType">
+ <xsd:complexContent>
+ <xsd:restriction base="ContentBaseType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ </xsd:choice>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ContentOptionalRefType">
+ <xsd:complexContent>
+ <xsd:extension base="ContentBaseType">
+ <xsd:attribute name="Reference" type="xsd:anyURI" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ContentRequiredRefType">
+ <xsd:complexContent>
+ <xsd:restriction base="ContentOptionalRefType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ <xsd:element name="LocRefContent" type="xsd:anyURI"/>
+ </xsd:choice>
+ <xsd:attribute name="Reference" type="xsd:anyURI" use="required"/>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="VerifyTransformsDataType">
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Ein oder mehrere Transformationswege können von der Applikation an MOA mitgeteilt werden. Die zu prüfende Signatur hat zumindest einem dieser Transformationswege zu entsprechen. Die Angabe kann explizit oder als Profilbezeichner erfolgen.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element ref="VerifyTransformsInfoProfile"/>
+ <xsd:element name="VerifyTransformsInfoProfileID" type="xsd:string">
+ <xsd:annotation>
+ <xsd:documentation>Profilbezeichner für einen Transformationsweg</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:element name="QualifiedCertificate"/>
+ <xsd:element name="PublicAuthority" type="PublicAuthorityType"/>
+ <xsd:complexType name="PublicAuthorityType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:string" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:simpleType name="SignatoriesType">
+ <xsd:union memberTypes="AllSignatoriesType">
+ <xsd:simpleType>
+ <xsd:list itemType="xsd:positiveInteger"/>
+ </xsd:simpleType>
+ </xsd:union>
+ </xsd:simpleType>
+ <xsd:simpleType name="AllSignatoriesType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="all"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:complexType name="CreateSignatureLocationType">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:token">
+ <xsd:attribute name="Index" type="xsd:integer" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ <xsd:complexType name="TransformParameterType">
+ <xsd:choice minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Die Angabe des Transformationsparameters (explizit oder als Hashwert) kann unterlassen werden, wenn die Applikation von der Unveränderlichkeit des Inhalts der in "Transformationsparamter", Attribut "URI" angegebenen URI ausgehen kann.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element name="Base64Content" type="xsd:base64Binary">
+ <xsd:annotation>
+ <xsd:documentation>Der Transformationsparameter explizit angegeben.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="Hash">
+ <xsd:annotation>
+ <xsd:documentation>Der Hashwert des Transformationsparameters.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="dsig:DigestMethod"/>
+ <xsd:element ref="dsig:DigestValue"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ <xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:element name="CreateSignatureEnvironmentProfile">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="CreateSignatureLocation" type="CreateSignatureLocationType"/>
+ <xsd:element name="Supplement" type="XMLDataObjectAssociationType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="VerifyTransformsInfoProfile">
+ <xsd:annotation>
+ <xsd:documentation>Explizite Angabe des Transformationswegs</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="dsig:Transforms" minOccurs="0"/>
+ <xsd:element name="TransformParameter" type="TransformParameterType" minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Alle impliziten Transformationsparameter, die zum Durchlaufen der oben angeführten Transformationskette bekannt sein müssen, müssen hier angeführt werden. Das Attribut "URI" bezeichnet den Transformationsparameter in exakt jener Weise, wie er in der zu überprüfenden Signatur gebraucht wird.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Supplement" type="XMLDataObjectAssociationType"/>
+ <xsd:element name="SupplementProfile" type="XMLDataObjectAssociationType"/>
+ <xsd:element name="CreateTransformsInfoProfile">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="CreateTransformsInfo" type="TransformsInfoType"/>
+ <xsd:element ref="Supplement" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+</xsd:schema>
diff --git a/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/AllTests.java b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/AllTests.java
new file mode 100644
index 000000000..1619c7e8f
--- /dev/null
+++ b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/AllTests.java
@@ -0,0 +1,55 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.spss;
+
+import test.at.gv.egovernment.moa.spss.server.iaik.config.ConfigurationDataImplTest;
+import test.at.gv.egovernment.moa.spss.server.iaik.config.IaikConfiguratorTest;
+import test.at.gv.egovernment.moa.spss.server.tools.CertToolTest;
+
+import junit.awtui.TestRunner;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * Test suite for all unit tests.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class AllTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite();
+
+ suite.addTestSuite(test.at.gv.egovernment.moa.spss.server.config.AllTests.class);
+ suite.addTestSuite(ConfigurationDataImplTest.class);
+ suite.addTestSuite(IaikConfiguratorTest.class);
+ suite.addTest(
+ test.at.gv.egovernment.moa.spss.server.invoke.AllTests.suite());
+ suite.addTest(test.at.gv.egovernment.moa.spss.api.xmlbind.AllTests.suite());
+ suite.addTestSuite(CertToolTest.class);
+
+ return suite;
+ }
+
+ public static void main(String[] args) {
+ try {
+ TestRunner.run(AllTests.class);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/SPSSTestCase.java b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/SPSSTestCase.java
new file mode 100644
index 000000000..43f04b77c
--- /dev/null
+++ b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/SPSSTestCase.java
@@ -0,0 +1,97 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.spss;
+
+import java.security.Security;
+
+import test.at.gv.egovernment.moa.MOATestCase;
+
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.logging.LoggingContext;
+import at.gv.egovernment.moa.logging.LoggingContextManager;
+import at.gv.egovernment.moa.util.MessageProvider;
+
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.iaik.config.IaikConfigurator;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+
+/**
+ * Base class for MOA test cases.
+ *
+ * Provides some utility functions.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class SPSSTestCase extends MOATestCase {
+
+ protected static final String TESTDATA_ROOT = "data/test/";
+
+ /**
+ * Constructor for MOATestCase.
+ * @param arg0
+ */
+ public SPSSTestCase(String name) {
+ super(name);
+ }
+
+ /**
+ * Set up a transaction context with a test configuration.
+ */
+ protected void setUpTransactionContext() throws Exception {
+ System.setProperty(
+ ConfigurationProvider.CONFIG_PROPERTY_NAME,
+ "data/test/conf/moa-spss/MOA-SPSSConfiguration.xml");
+ ConfigurationProvider config = ConfigurationProvider.getInstance();
+ TransactionContext context = new TransactionContext("test", null, config);
+ TransactionContextManager.getInstance().setTransactionContext(context);
+ }
+
+ protected void setUpLoggingContext() throws Exception {
+ LoggingContext context = new LoggingContext("test");
+ LoggingContextManager.getInstance().setLoggingContext(context);
+ }
+
+ /**
+ * Configure the IAIK modules with the current configuration.
+ *
+ * A <code>TransactionContext</code> must have been set up before.
+ */
+ protected void setUpIaikConfiguration() throws Exception {
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ ClassLoader cl = getClass().getClassLoader();
+ MessageProvider msg = MessageProvider.getInstance();
+
+ try {
+ cl.loadClass("javax.security.cert.Certificate"); // from jcert.jar
+ } catch (ClassNotFoundException e) {
+ Logger.warn(msg.getMessage("init.03", null), e);
+ }
+
+ new IaikConfigurator().configure(context.getConfiguration());
+ }
+
+ protected void setUpSSL() throws Exception {
+ //System.setProperty("javax.net.debug", "all");
+ Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
+ System.setProperty(
+ "java.protocol.handler.pkgs",
+ "com.sun.net.ssl.internal.www.protocol");
+ }
+
+}
diff --git a/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/api/xmlbind/AllTests.java b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/api/xmlbind/AllTests.java
new file mode 100644
index 000000000..64171e1da
--- /dev/null
+++ b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/api/xmlbind/AllTests.java
@@ -0,0 +1,39 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.spss.api.xmlbind;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * Runs all tests in this package.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class AllTests {
+ public static Test suite() {
+ TestSuite suite = new TestSuite();
+
+ suite.addTestSuite(CreateXMLSignatureRequestParserTest.class);
+ suite.addTestSuite(TransformParserTest.class);
+ suite.addTestSuite(VerifyCMSSignatureRequestParserTest.class);
+ suite.addTestSuite(VerifyXMLSignatureRequestParserTest.class);
+
+ return suite;
+ }
+
+}
diff --git a/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureRequestParserTest.java b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureRequestParserTest.java
new file mode 100644
index 000000000..cbaef567a
--- /dev/null
+++ b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureRequestParserTest.java
@@ -0,0 +1,86 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.spss.api.xmlbind;
+
+import org.w3c.dom.Element;
+
+import test.at.gv.egovernment.moa.spss.SPSSTestCase;
+
+import at.gv.egovernment.moa.spss.api.xmlbind.CreateXMLSignatureRequestParser;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfileExplicit;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfileExplicit;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlsign.DataObjectInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.SingleSignatureInfo;
+
+/**
+ * Test the <code>CreateXMLSignatureRequestParser</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CreateXMLSignatureRequestParserTest extends SPSSTestCase {
+ private static final String TESTDATA_BASE =
+ TESTDATA_ROOT + "xml/CreateXMLSignature/";
+
+ private CreateXMLSignatureRequestParser requestParser;
+
+ public CreateXMLSignatureRequestParserTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ requestParser = new CreateXMLSignatureRequestParser();
+ }
+
+ public void testParse() throws Exception {
+ Element requestElem =
+ parseXml(TESTDATA_BASE + "TestGeneratorCX2.001.Req.xml")
+ .getDocumentElement();
+ CreateXMLSignatureRequest request = requestParser.parse(requestElem);
+ SingleSignatureInfo sigInfo;
+ DataObjectInfo dataObjInfo;
+ CreateTransformsInfoProfileExplicit transProfile;
+ CreateSignatureEnvironmentProfileExplicit envProfile;
+
+ assertNotNull(request);
+ assertEquals("PKCS12RSAKey1", request.getKeyIdentifier());
+ assertEquals(1, request.getSingleSignatureInfos().size());
+
+ sigInfo = (SingleSignatureInfo) request.getSingleSignatureInfos().get(0);
+ assertEquals(1, sigInfo.getDataObjectInfos().size());
+ assertFalse(sigInfo.isSecurityLayerConform());
+
+ dataObjInfo = (DataObjectInfo) sigInfo.getDataObjectInfos().get(0);
+ assertNotNull(dataObjInfo.getDataObject());
+
+ transProfile =
+ (CreateTransformsInfoProfileExplicit) dataObjInfo
+ .getCreateTransformsInfoProfile();
+ assertNotNull(
+ transProfile.getCreateTransformsInfo().getFinalDataMetaInfo());
+
+ envProfile =
+ (CreateSignatureEnvironmentProfileExplicit) sigInfo
+ .getCreateSignatureInfo()
+ .getCreateSignatureEnvironmentProfile();
+ assertEquals(
+ "//data:Document",
+ envProfile.getCreateSignatureLocation().getXPathExpression());
+ assertEquals(0, envProfile.getCreateSignatureLocation().getIndex());
+ }
+
+}
diff --git a/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/api/xmlbind/TransformParserTest.java b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/api/xmlbind/TransformParserTest.java
new file mode 100644
index 000000000..0ee368060
--- /dev/null
+++ b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/api/xmlbind/TransformParserTest.java
@@ -0,0 +1,128 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.spss.api.xmlbind;
+
+import java.util.List;
+
+import org.w3c.dom.Element;
+
+import test.at.gv.egovernment.moa.spss.SPSSTestCase;
+
+import at.gv.egovernment.moa.spss.api.common.CanonicalizationTransform;
+import at.gv.egovernment.moa.spss.api.common.EnvelopedSignatureTransform;
+import at.gv.egovernment.moa.spss.api.common.ExclusiveCanonicalizationTransform;
+import at.gv.egovernment.moa.spss.api.common.XPathFilter2Transform;
+import at.gv.egovernment.moa.spss.api.common.XPathTransform;
+import at.gv.egovernment.moa.spss.api.common.XSLTTransform;
+import at.gv.egovernment.moa.spss.api.xmlbind.TransformParser;
+
+/**
+ * Test the <code>TransformParser</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class TransformParserTest extends SPSSTestCase {
+ private static String TESTDATA_BASE = TESTDATA_ROOT + "xml/dsigTransform/";
+
+ private TransformParser transformParser;
+
+ public TransformParserTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() {
+ transformParser = new TransformParser();
+ }
+
+ public void testParseTransforms() throws Exception {
+ Element transformsElem =
+ parseXml(TESTDATA_BASE + "transforms.xml").getDocumentElement();
+ List transforms = transformParser.parseTransforms(transformsElem);
+
+ assertNotNull(transforms);
+ assertEquals(3, transforms.size());
+
+ }
+
+ public void testParseCanonicalizationTransform() throws Exception {
+ Element transformElem =
+ parseXml(TESTDATA_BASE + "canonicalization.xml").getDocumentElement();
+ CanonicalizationTransform transform =
+ (CanonicalizationTransform) transformParser.parseTransform(transformElem);
+
+ assertNotNull(transform);
+ assertEquals(
+ CanonicalizationTransform.CANONICAL_XML,
+ transform.getAlgorithmURI());
+ }
+
+ public void testParseExclCanonicalizationTransform() throws Exception {
+ Element transformElem =
+ parseXml(TESTDATA_BASE + "exclusiveCanonicalization.xml")
+ .getDocumentElement();
+ ExclusiveCanonicalizationTransform transform =
+ (ExclusiveCanonicalizationTransform) transformParser.parseTransform(
+ transformElem);
+
+ assertNotNull(transform);
+ assertEquals(
+ ExclusiveCanonicalizationTransform.EXCLUSIVE_CANONICAL_XML,
+ transform.getAlgorithmURI());
+ assertEquals(3, transform.getInclusiveNamespacePrefixes().size());
+ }
+
+ public void testParseEnvelopedTransform() throws Exception {
+ Element transformElem =
+ parseXml(TESTDATA_BASE + "enveloped.xml").getDocumentElement();
+ EnvelopedSignatureTransform transform =
+ (EnvelopedSignatureTransform) transformParser.parseTransform(
+ transformElem);
+
+ assertNotNull(transform);
+ }
+
+ public void testParseXPathTransform() throws Exception {
+ Element transformElem =
+ parseXml(TESTDATA_BASE + "xpath.xml").getDocumentElement();
+ XPathTransform transform =
+ (XPathTransform) transformParser.parseTransform(transformElem);
+
+ assertNotNull(transform);
+ assertEquals("//ToBeSigned/Data", transform.getXPathExpression());
+ assertEquals(1, transform.getNamespaceDeclarations().size());
+ }
+
+ public void testParseXPathFilter2Transform() throws Exception {
+ Element transformElem =
+ parseXml(TESTDATA_BASE + "xpath2.xml").getDocumentElement();
+ XPathFilter2Transform transform =
+ (XPathFilter2Transform) transformParser.parseTransform(transformElem);
+
+ assertNotNull(transform);
+ assertEquals(3, transform.getFilters().size());
+ }
+
+ public void testParseXSLTTransform() throws Exception {
+ Element transformElem =
+ parseXml(TESTDATA_BASE + "xslt.xml").getDocumentElement();
+ XSLTTransform transform =
+ (XSLTTransform) transformParser.parseTransform(transformElem);
+
+ assertNotNull(transform);
+ }
+
+}
diff --git a/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureRequestParserTest.java b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureRequestParserTest.java
new file mode 100644
index 000000000..d016781cc
--- /dev/null
+++ b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureRequestParserTest.java
@@ -0,0 +1,76 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.spss.api.xmlbind;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.util.DateTimeUtils;
+
+import test.at.gv.egovernment.moa.spss.SPSSTestCase;
+
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSContentExcplicit;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest;
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+import at.gv.egovernment.moa.spss.api.xmlbind.VerifyCMSSignatureRequestParser;
+
+/**
+ * Test the <code>VerifyCMSSignatureRequestParserTest</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class VerifyCMSSignatureRequestParserTest extends SPSSTestCase {
+ private static String TESTDATA_BASE =
+ TESTDATA_ROOT + "xml/VerifyCMSSignature/";
+
+ private VerifyCMSSignatureRequestParser requestParser;
+
+ public VerifyCMSSignatureRequestParserTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ requestParser = new VerifyCMSSignatureRequestParser();
+ }
+
+ public void testParse() throws Exception {
+ Element requestElem =
+ parseXml(TESTDATA_BASE + "TestGeneratorVC0.001.Req.xml")
+ .getDocumentElement();
+ VerifyCMSSignatureRequest request = requestParser.parse(requestElem);
+ MetaInfo metaInfo;
+ CMSContentExcplicit content;
+
+ assertNotNull(request);
+ assertEquals(1, request.getSignatories()[0]);
+ assertEquals(
+ DateTimeUtils.parseDateTime("2003-04-04T09:30:47-05:00"),
+ request.getDateTime());
+ assertNotNull(request.getCMSSignature());
+ assertNotNull(request.getDataObject());
+ assertEquals("TrustProfile1", request.getTrustProfileId());
+
+ metaInfo = request.getDataObject().getMetaInfo();
+ assertNotNull(metaInfo);
+ assertEquals("text/plain", metaInfo.getMimeType());
+ assertEquals("http://10.16.46.109/TestDatenGenerator/resources/testDaten.txt", metaInfo.getDescription());
+
+ content = (CMSContentExcplicit) request.getDataObject().getContent();
+ assertNotNull(content.getBinaryContent());
+
+ }
+
+}
diff --git a/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureRequestParserTest.java b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureRequestParserTest.java
new file mode 100644
index 000000000..8636c6e18
--- /dev/null
+++ b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureRequestParserTest.java
@@ -0,0 +1,96 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.spss.api.xmlbind;
+
+import org.w3c.dom.Element;
+
+import test.at.gv.egovernment.moa.spss.SPSSTestCase;
+
+import at.gv.egovernment.moa.util.DateTimeUtils;
+
+import at.gv.egovernment.moa.spss.api.xmlbind.VerifyXMLSignatureRequestParser;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferenceInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.SignatureManifestCheckParams;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureLocation;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfileExplicit;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest;
+
+/**
+ * Test the <code>VerifyXMLSignatureRequestParserTest</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class VerifyXMLSignatureRequestParserTest extends SPSSTestCase {
+ private static String TESTDATA_BASE =
+ TESTDATA_ROOT + "xml/VerifyXMLSignature/";
+
+ private VerifyXMLSignatureRequestParser parser;
+
+ public VerifyXMLSignatureRequestParserTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ parser = new VerifyXMLSignatureRequestParser();
+ }
+
+ public void testParse() throws Exception {
+ Element requestElem =
+ parseXml(TESTDATA_BASE + "TestGeneratorVX.201.Req.xml")
+ .getDocumentElement();
+ VerifyXMLSignatureRequest request = parser.parse(requestElem);
+ VerifySignatureInfo verifySignatureInfo;
+ VerifySignatureLocation verifyLocation;
+ SignatureManifestCheckParams checkParams;
+ ReferenceInfo refInfo;
+ VerifyTransformsInfoProfileExplicit transformsProfile;
+
+ assertNotNull(request);
+ assertEquals(
+ DateTimeUtils.parseDateTime("2003-04-01T12:53:57+01:00"),
+ request.getDateTime());
+ assertFalse(request.getReturnHashInputData());
+ assertEquals("TrustProfile1", request.getTrustProfileId());
+
+ verifySignatureInfo = request.getSignatureInfo();
+ assertNotNull(verifySignatureInfo);
+ assertNotNull(verifySignatureInfo.getVerifySignatureEnvironment());
+
+ verifyLocation = verifySignatureInfo.getVerifySignatureLocation();
+ assertNotNull(verifyLocation);
+ assertEquals("//dsig:Signature", verifyLocation.getXPathExpression());
+ assertEquals(3, verifyLocation.getNamespaceDeclarations().size());
+
+ checkParams = request.getSignatureManifestCheckParams();
+ assertNotNull(checkParams);
+ assertEquals(true, checkParams.getReturnReferenceInputData());
+ assertEquals(1, checkParams.getReferenceInfos().size());
+
+ refInfo = (ReferenceInfo) checkParams.getReferenceInfos().get(0);
+ assertEquals(1, refInfo.getVerifyTransformsInfoProfiles().size());
+
+ transformsProfile =
+ (VerifyTransformsInfoProfileExplicit) refInfo
+ .getVerifyTransformsInfoProfiles()
+ .get(0);
+ assertEquals(1, transformsProfile.getTransforms().size());
+ assertEquals(1, transformsProfile.getTransformParameters().size());
+
+ }
+
+}
diff --git a/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/config/AllTests.java b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/config/AllTests.java
new file mode 100644
index 000000000..7af52ef70
--- /dev/null
+++ b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/config/AllTests.java
@@ -0,0 +1,35 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.spss.server.config;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author Gregor Karlinger
+ * @version $Id$
+ */
+public class AllTests
+{
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite();
+ suite.addTestSuite(ConfigurationProviderTest1.class);
+ suite.addTestSuite(ConfigurationProviderTest2.class);
+ suite.addTestSuite(ConfigurationProviderTest3.class);
+ return suite;
+ }
+}
diff --git a/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/config/ConfigurationProviderTest1.java b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/config/ConfigurationProviderTest1.java
new file mode 100644
index 000000000..27fd09836
--- /dev/null
+++ b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/config/ConfigurationProviderTest1.java
@@ -0,0 +1,392 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.spss.server.config;
+
+import iaik.asn1.structures.Name;
+import iaik.pki.pathvalidation.ChainingModes;
+import iaik.utils.RFC2253NameParser;
+import iaik.utils.RFC2253NameParserException;
+import iaik.x509.X509Certificate;
+
+import java.math.BigInteger;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import junit.framework.TestCase;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.server.config.CRLDistributionPoint;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationException;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.config.HardwareCryptoModule;
+import at.gv.egovernment.moa.spss.server.config.HardwareKeyModule;
+import at.gv.egovernment.moa.spss.server.config.KeyGroup;
+import at.gv.egovernment.moa.spss.server.config.KeyGroupEntry;
+import at.gv.egovernment.moa.spss.server.config.OCSPDistributionPoint;
+import at.gv.egovernment.moa.spss.server.config.SoftwareKeyModule;
+import at.gv.egovernment.moa.spss.server.config.TrustProfile;
+import at.gv.egovernment.moa.util.Constants;
+
+/**
+ * @author Gregor Karlinger
+ * @version $Id$
+ */
+public class ConfigurationProviderTest1 extends TestCase
+{
+ private static final String CONFIG_BASE_ =
+ "e:/cio/projekte/basismodule/wartung/projekt/spss.server/res/test/resources/config/";
+
+ static at.gv.egovernment.moa.spss.server.config.ConfigurationProvider provider_;
+
+ static
+ {
+ System.setProperty(
+ "log4j.configuration",
+ "file:/" + CONFIG_BASE_ + "log4j.properties");
+ System.setProperty(
+ at.gv.egovernment.moa.spss.server.config.ConfigurationProvider.CONFIG_PROPERTY_NAME,
+ CONFIG_BASE_ + "moa.spss.complete-config.xml");
+ try
+ {
+ ConfigurationProvider.reload();
+ provider_ = at.gv.egovernment.moa.spss.server.config.ConfigurationProvider.getInstance();
+ }
+ catch (ConfigurationException e)
+ {
+ throw new RuntimeException("Fehler beim Setup des Tests: " + e.getMessage());
+ }
+ }
+
+ /**
+ * Constructor for ConfigurationProvider.
+ * @param arg0
+ */
+ public ConfigurationProviderTest1() throws MOAException
+ {
+ super("ConfigurationProvider");
+ }
+
+ public void testGetWarnings()
+ {
+ assertEquals(0, provider_.getWarnings().size());
+ }
+
+ public void testGetDigestMethodAlgorithmName()
+ {
+ assertEquals(
+ Constants.SHA1_URI,
+ provider_.getDigestMethodAlgorithmName());
+ }
+
+ public void testGetCanonicalizationAlgorithmName()
+ {
+ assertEquals(
+ Constants.C14N_WITH_COMMENTS_URI,
+ provider_.getCanonicalizationAlgorithmName());
+ }
+
+ public void testGetHardwareCryptoModules()
+ {
+ List hwcms = provider_.getHardwareCryptoModules();
+ assertEquals(2, hwcms.size());
+
+ HardwareCryptoModule hwc1 = (HardwareCryptoModule) hwcms.get(0);
+ assertEquals("HWC1_Name", hwc1.getName());
+ assertEquals("HWC1_SlotId", hwc1.getSlotID());
+ assertEquals("HWC1_UserPIN", hwc1.getUserPIN());
+
+ HardwareCryptoModule hwc2 = (HardwareCryptoModule) hwcms.get(1);
+ assertEquals("HWC2_Name", hwc2.getName());
+ assertNull(hwc2.getSlotID());
+ assertEquals("HWC2_UserPIN", hwc2.getUserPIN());
+ }
+
+ public void testGetHardwareKeyModules()
+ {
+ List hwkms = provider_.getHardwareKeyModules();
+ assertEquals(2, hwkms.size());
+
+ HardwareKeyModule hwk1 = (HardwareKeyModule) hwkms.get(0);
+ assertEquals("HWK1_Id", hwk1.getId());
+ assertEquals("HWK1_Name", hwk1.getName());
+ assertEquals("HWK1_SlotId", hwk1.getSlotID());
+ assertEquals("HWK1_UserPIN", hwk1.getUserPIN());
+
+ HardwareKeyModule hwk2 = (HardwareKeyModule) hwkms.get(1);
+ assertEquals("HWK2_Id", hwk2.getId());
+ assertEquals("HWK2_Name", hwk2.getName());
+ assertNull(hwk2.getSlotID());
+ assertEquals("HWK2_UserPIN", hwk2.getUserPIN());
+ }
+
+ public void testGetSoftwareKeyModules()
+ {
+ List swkms = provider_.getSoftwareKeyModules();
+ assertEquals(2, swkms.size());
+
+ SoftwareKeyModule swk1 = (SoftwareKeyModule) swkms.get(0);
+ assertEquals("SWK1_Id", swk1.getId());
+ assertEquals(CONFIG_BASE_ + "swk/SWK1_FileName.txt", swk1.getFileName().replace('\\', '/'));
+ assertEquals("SWK1_Password", swk1.getPassWord());
+
+ SoftwareKeyModule swk2 = (SoftwareKeyModule) swkms.get(1);
+ assertEquals("SWK2_Id", swk2.getId());
+ assertEquals(CONFIG_BASE_ + "swk/SWK2_FileName.txt", swk2.getFileName().replace('\\', '/'));
+ assertNull(swk2.getPassWord());
+ }
+
+ public void testGetKeyGroups()
+ {
+ Map keyGroups = provider_.getKeyGroups();
+ assertEquals(2, keyGroups.size());
+
+ KeyGroup kg1 = (KeyGroup) keyGroups.get("KG1_Id");
+ assertNotNull(kg1);
+ assertEquals("KG1_Id", kg1.getId());
+
+ Set kg1Entries = kg1.getKeyGroupEntries();
+ assertEquals(2, kg1Entries.size());
+
+ Iterator kg1EntriesIt = kg1Entries.iterator();
+ while(kg1EntriesIt.hasNext())
+ {
+ KeyGroupEntry currentEntry = (KeyGroupEntry)kg1EntriesIt.next();
+ if ("HWK1_Id".equals(currentEntry.getModuleID()))
+ {
+ assertEquals("CN=HWK1_Issuer", currentEntry.getIssuerDN());
+ assertEquals(0, currentEntry.getSerialNumber().intValue());
+ }
+ else if ("HWK2_Id".equals(currentEntry.getModuleID()))
+ {
+ assertEquals("CN=HWK2_Issuer", currentEntry.getIssuerDN());
+ assertEquals(1, currentEntry.getSerialNumber().intValue());
+ }
+ else fail("Invalid module identifer found.");
+ }
+
+ KeyGroup kg2 = (KeyGroup) keyGroups.get("KG2_Id");
+ assertNotNull(kg2);
+ assertEquals("KG2_Id", kg2.getId());
+
+ Set kg2Entries = kg2.getKeyGroupEntries();
+ assertEquals(2, kg2Entries.size());
+
+ Iterator kg2EntriesIt = kg1Entries.iterator();
+ while(kg1EntriesIt.hasNext())
+ {
+ KeyGroupEntry currentEntry = (KeyGroupEntry)kg2EntriesIt.next();
+ if ("SWK1_Id".equals(currentEntry.getModuleID()))
+ {
+ assertEquals("CN=CN=SWK1_Issuer", currentEntry.getIssuerDN());
+ assertEquals(2, currentEntry.getSerialNumber().intValue());
+ }
+ else if ("SWK2_Id".equals(currentEntry.getModuleID()))
+ {
+ assertEquals("CN=SWK2_Issuer", currentEntry.getIssuerDN());
+ assertEquals(3, currentEntry.getSerialNumber().intValue());
+ }
+ else fail("Invalid module identifer found.");
+ }
+ }
+
+ public void testGetKeyGroupEntries() throws RFC2253NameParserException
+ {
+ RFC2253NameParser parser = new RFC2253NameParser("CN=Customer1_Issuer");
+ Name name = parser.parse();
+ Set kgEntries = provider_.getKeyGroupEntries(name, BigInteger.valueOf(4), "KG1_Id");
+ assertEquals(2, kgEntries.size());
+
+ Iterator kgEntriesIt = kgEntries.iterator();
+ while (kgEntriesIt.hasNext())
+ {
+ KeyGroupEntry currentEntry = (KeyGroupEntry) kgEntriesIt.next();
+ if (!"HWK1_Id".equals(currentEntry.getModuleID()) && !"HWK2_Id".equals(currentEntry.getModuleID()))
+ {
+ fail("Invalid module identifier found.");
+ }
+ }
+ }
+
+ public void testGetChainingMode() throws RFC2253NameParserException
+ {
+ X509Certificate cert = new X509Certificate();
+ RFC2253NameParser parser = new RFC2253NameParser("CN=Unknown");
+ Name name = parser.parse();
+ cert.setIssuerDN(name);
+ cert.setSerialNumber(BigInteger.valueOf(0));
+ assertEquals(ChainingModes.PKIX_MODE, provider_.getChainingMode(cert)); // Default chaining mode
+
+ parser = new RFC2253NameParser("CN=TA1_Issuer");
+ name = parser.parse();
+ cert.setIssuerDN(name);
+ cert.setSerialNumber(BigInteger.valueOf(5));
+ assertEquals(ChainingModes.CHAIN_MODE, provider_.getChainingMode(cert));
+ }
+
+ public void testGetDistributionPoints() throws RFC2253NameParserException
+ {
+ X509Certificate cert = new X509Certificate();
+ RFC2253NameParser parser = new RFC2253NameParser("CN=DP1_Issuer");
+ Name name = parser.parse();
+ cert.setIssuerDN(name);
+
+ Set dps = provider_.getDistributionPoints(cert);
+ assertEquals(2, dps.size());
+
+ Iterator dpIt = dps.iterator();
+ while (dpIt.hasNext())
+ {
+ CRLDistributionPoint currentDP = (CRLDistributionPoint)dpIt.next();
+ if ("http://crl.myca.org".equals(currentDP.getUri()))
+ {
+ int reasonCodes =
+ iaik.asn1.structures.DistributionPoint.unused |
+ iaik.asn1.structures.DistributionPoint.keyCompromise |
+ iaik.asn1.structures.DistributionPoint.cACompromise |
+ iaik.asn1.structures.DistributionPoint.affiliationChanged |
+ iaik.asn1.structures.DistributionPoint.superseded |
+ iaik.asn1.structures.DistributionPoint.cessationOfOperation |
+ iaik.asn1.structures.DistributionPoint.certificateHold |
+ iaik.asn1.structures.DistributionPoint.privilegeWithdrawn |
+ iaik.asn1.structures.DistributionPoint.aACompromise;
+ assertEquals(reasonCodes, currentDP.getReasonCodes());
+ }
+ else if ("http://crl.myotherca.org".equals(currentDP.getUri()))
+ {
+ int reasonCodes =
+ iaik.asn1.structures.DistributionPoint.aACompromise |
+ iaik.asn1.structures.DistributionPoint.affiliationChanged;
+ assertEquals(reasonCodes, currentDP.getReasonCodes());
+ }
+ else fail("Invalid CRL DP URI found: " + currentDP.getUri());
+ }
+
+ parser = new RFC2253NameParser("CN=DP2_Issuer");
+ name = parser.parse();
+ cert.setIssuerDN(name);
+
+ dps = provider_.getDistributionPoints(cert);
+ assertEquals(1, dps.size());
+
+ OCSPDistributionPoint dpo = (OCSPDistributionPoint) dps.toArray()[0];
+ assertEquals("http://crl.yetanotherca.org", dpo.getUri());
+ }
+
+ public void testGetCRLArchiveDuration()
+ {
+ assertEquals(730, provider_.getCRLArchiveDuration());
+ }
+
+ public void testGetEnableRevocationArchiving()
+ {
+ assertFalse(provider_.getEnableRevocationArchiving());
+ }
+
+ public void testGetCertStoreLocation()
+ {
+ assertEquals(
+ CONFIG_BASE_ + "certstore_test",
+ provider_.getCertStoreLocation().replace('\\', '/'));
+ }
+
+ public void testGetCreateTransformsInfoProfile()
+ {
+ Element ctip1 = provider_.getCreateTransformsInfoProfile("CTIP_1");
+ assertEquals("CreateTransformsInfoProfile", ctip1.getLocalName());
+
+ Element ctip2 = provider_.getCreateTransformsInfoProfile("CTIP_2");
+ assertEquals("CreateTransformsInfoProfile", ctip2.getLocalName());
+ }
+
+ public void testGetCreateSignatureEnvironmentProfile()
+ {
+ Element csep = provider_.getCreateSignatureEnvironmentProfile("CSEP_1");
+ assertEquals("CreateSignatureEnvironmentProfile", csep.getLocalName());
+ }
+
+ public void testGetVerifyTransformsInfoProfile()
+ {
+ Element vtip = provider_.getVerifyTransformsInfoProfile("VTIP_1");
+ assertEquals("VerifyTransformsInfoProfile", vtip.getLocalName());
+ }
+
+ public void testGetSupplementProfile()
+ {
+ Element sp = provider_.getSupplementProfile("SP_1");
+ assertEquals("SupplementProfile", sp.getLocalName());
+ }
+
+ public void testGetTrustProfile()
+ {
+ TrustProfile tp1 = provider_.getTrustProfile("TP1_Id");
+ assertEquals(
+ "file:/" + CONFIG_BASE_ + "trustprofiles/tp1/anchors",
+ tp1.getUri());
+ assertEquals(
+ "file:/" + CONFIG_BASE_ + "trustprofiles/tp1/signercerts",
+ tp1.getSignerCertsUri());
+
+ TrustProfile tp2 = provider_.getTrustProfile("TP2_Id");
+ assertEquals(
+ "file:" + CONFIG_BASE_ + "trustprofiles/tp2/anchors",
+ tp2.getUri());
+ assertEquals(
+ "file:" + CONFIG_BASE_ + "trustprofiles/tp2/signercerts",
+ tp2.getSignerCertsUri());
+ }
+
+ public void testGetRevocationArchiveJDBCURL()
+ {
+ assertEquals("jdbc://dummy", provider_.getRevocationArchiveJDBCURL());
+ }
+
+ public void testGetRevocationArchiveJDBCDriverClass()
+ {
+ assertEquals("fully.qualified.classname", provider_.getRevocationArchiveJDBCDriverClass());
+ }
+
+ public void testGetEnableRevocationChecking()
+ {
+ assertFalse(provider_.getEnableRevocationChecking());
+ }
+
+ public void testGetMaxRevocationAge()
+ {
+ assertEquals(10000, provider_.getMaxRevocationAge());
+ }
+
+ public void testGetServiceOrder()
+ {
+ String[] serviceOrder = provider_.getServiceOrder();
+ assertEquals(2, serviceOrder.length);
+ assertEquals("crl", serviceOrder[0]);
+ assertEquals("ocsp", serviceOrder[1]);
+ }
+
+ public void testGetAutoAddCertificates()
+ {
+ assertFalse(provider_.getAutoAddCertificates());
+ }
+
+ public void testGetUseAuthorityInfoAccess()
+ {
+ assertFalse(provider_.getUseAuthorityInfoAccess());
+ }
+}
diff --git a/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/config/ConfigurationProviderTest2.java b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/config/ConfigurationProviderTest2.java
new file mode 100644
index 000000000..9cd7d8520
--- /dev/null
+++ b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/config/ConfigurationProviderTest2.java
@@ -0,0 +1,240 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.spss.server.config;
+
+import iaik.asn1.structures.Name;
+import iaik.pki.pathvalidation.ChainingModes;
+import iaik.utils.RFC2253NameParser;
+import iaik.utils.RFC2253NameParserException;
+import iaik.x509.X509Certificate;
+
+import java.math.BigInteger;
+import java.util.List;
+import java.util.Set;
+
+import junit.framework.TestCase;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationException;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.config.TrustProfile;
+import at.gv.egovernment.moa.util.Constants;
+
+/**
+ * @author Gregor Karlinger
+ * @version $Id$
+ */
+public class ConfigurationProviderTest2 extends TestCase
+{
+ private static final String CONFIG_BASE_ =
+ "e:/cio/projekte/basismodule/wartung/projekt/spss.server/res/test/resources/config/";
+
+ static at.gv.egovernment.moa.spss.server.config.ConfigurationProvider provider_;
+
+ static
+ {
+ System.setProperty(
+ "log4j.configuration",
+ "file:/" + CONFIG_BASE_ + "log4j.properties");
+ System.setProperty(
+ at.gv.egovernment.moa.spss.server.config.ConfigurationProvider.CONFIG_PROPERTY_NAME,
+ CONFIG_BASE_ + "moa.ss.noopts-config.xml");
+ try
+ {
+ ConfigurationProvider.reload();
+ provider_ = at.gv.egovernment.moa.spss.server.config.ConfigurationProvider.getInstance();
+ }
+ catch (ConfigurationException e)
+ {
+ throw new RuntimeException("Fehler beim Setup des Tests: " + e.getMessage());
+ }
+ }
+
+
+ /**
+ * Constructor for ConfigurationProvider.
+ * @param arg0
+ */
+ public ConfigurationProviderTest2() throws MOAException
+ {
+ super("ConfigurationProvider");
+ }
+
+ public void testGetWarnings()
+ {
+ // 3 Warnings should be collected: C14N not found, DigestMethod not found, ArchiveDuration not found
+ assertEquals(3, provider_.getWarnings().size());
+ }
+
+ public void testGetDigestMethodAlgorithmName()
+ {
+ // Element is missing in config file, check if default value is returned
+ assertEquals(
+ Constants.SHA1_URI,
+ provider_.getDigestMethodAlgorithmName());
+ }
+
+ public void testGetCanonicalizationAlgorithmName()
+ {
+ // Element is missing in config file, check if default value is returned
+ assertEquals(
+ Constants.C14N_URI,
+ provider_.getCanonicalizationAlgorithmName());
+ }
+
+ public void testGetHardwareCryptoModules()
+ {
+ // No hardware crypto modules in config file, check for empty list
+ List hwcms = provider_.getHardwareCryptoModules();
+ assertEquals(0, hwcms.size());
+ }
+
+ public void testGetHardwareKeyModules()
+ {
+ List hwkms = provider_.getHardwareKeyModules();
+ assertEquals(1, hwkms.size());
+ }
+
+ public void testGetSoftwareKeyModules()
+ {
+ // No software key modules in config file, check for empty list
+ List swkms = provider_.getSoftwareKeyModules();
+ assertEquals(0, swkms.size());
+ }
+
+ public void testGetChainingMode() throws RFC2253NameParserException
+ {
+ // Default Chaining Mode not set in configuration, check for default value
+ X509Certificate cert = new X509Certificate();
+ RFC2253NameParser parser = new RFC2253NameParser("CN=Unknown");
+ Name name = parser.parse();
+ cert.setIssuerDN(name);
+ cert.setSerialNumber(BigInteger.valueOf(0));
+ assertEquals(ChainingModes.PKIX_MODE, provider_.getChainingMode(cert));
+ }
+
+ public void testGetDistributionPoints() throws RFC2253NameParserException
+ {
+ // Element is missing in config file, check if emty list is returned
+ X509Certificate cert = new X509Certificate();
+ RFC2253NameParser parser = new RFC2253NameParser("CN=DP1_Issuer");
+ Name name = parser.parse();
+ cert.setIssuerDN(name);
+
+ Set dps = provider_.getDistributionPoints(cert);
+ assertEquals(0, dps.size());
+ }
+
+ public void testGetCRLArchiveDuration()
+ {
+ // Element is missing in config file, check if default value is returned
+ assertEquals(0, provider_.getCRLArchiveDuration());
+ }
+
+ public void testGetEnableRevocationArchiving()
+ {
+ // Element is missing in config file, check if default value is returned
+ assertFalse(provider_.getEnableRevocationArchiving());
+ }
+
+ public void testGetCertStoreLocation()
+ {
+ // Element is missing in config file, check if default value is returned
+ assertEquals(
+ CONFIG_BASE_ + "certstore",
+ provider_.getCertStoreLocation().replace('\\', '/'));
+ }
+
+ public void testGetCreateTransformsInfoProfile()
+ {
+ // No profile in config file, check for null
+ Element ctip1 = provider_.getCreateTransformsInfoProfile("CTIP_1");
+ assertNull(ctip1);
+ }
+
+ public void testGetCreateSignatureEnvironmentProfile()
+ {
+ // No profile in config file, check for null
+ Element csep = provider_.getCreateSignatureEnvironmentProfile("CSEP_1");
+ assertNull(csep);
+ }
+
+ public void testGetVerifyTransformsInfoProfile()
+ {
+ // No profile in config file, check for null
+ Element vtip = provider_.getVerifyTransformsInfoProfile("VTIP_1");
+ assertNull(vtip);
+ }
+
+ public void testGetSupplementProfile()
+ {
+ // No profile in config file, check for null
+ Element sp = provider_.getSupplementProfile("SP_1");
+ assertNull(sp);
+ }
+
+ public void testGetTrustProfile()
+ {
+ // No trust profiles config file, check for null
+ TrustProfile tp1 = provider_.getTrustProfile("TP1_Id");
+ assertNull(tp1);
+ }
+
+ public void testGetRevocationArchiveJDBCURL()
+ {
+ // Element is missing in config file, check for null
+ assertNull(provider_.getRevocationArchiveJDBCURL());
+ }
+
+ public void testGetRevocationArchiveJDBCDriverClass()
+ {
+ // Element is missing in config file, check for null
+ assertNull(provider_.getRevocationArchiveJDBCDriverClass());
+ }
+
+ public void testGetEnableRevocationChecking()
+ {
+ // Element is missing in config file, check for default value
+ assertFalse(provider_.getEnableRevocationChecking());
+ }
+
+ public void testGetMaxRevocationAge()
+ {
+ // Element is missing in config file, check for default value
+ assertEquals(0, provider_.getMaxRevocationAge());
+ }
+
+ public void testGetServiceOrder()
+ {
+ // Element is missing in config file, check for empty array
+ String[] serviceOrder = provider_.getServiceOrder();
+ assertEquals(0, serviceOrder.length);
+ }
+
+ public void testGetAutoAddCertificates()
+ {
+ // Element is missing in config file, check for default value
+ assertFalse(provider_.getAutoAddCertificates());
+ }
+
+ public void testGetUseAuthorityInfoAccess()
+ {
+ // Element is missing in config file, check for default value
+ assertFalse(provider_.getUseAuthorityInfoAccess());
+ }
+}
diff --git a/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/config/ConfigurationProviderTest3.java b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/config/ConfigurationProviderTest3.java
new file mode 100644
index 000000000..39a9efdcb
--- /dev/null
+++ b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/config/ConfigurationProviderTest3.java
@@ -0,0 +1,181 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.spss.server.config;
+
+import iaik.asn1.structures.Name;
+import iaik.utils.RFC2253NameParser;
+import iaik.utils.RFC2253NameParserException;
+import iaik.x509.X509Certificate;
+
+import java.util.List;
+import java.util.Set;
+
+import junit.framework.TestCase;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationException;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.util.Constants;
+
+/**
+ * @author Gregor Karlinger
+ * @version $Id$
+ */
+public class ConfigurationProviderTest3 extends TestCase
+{
+ private static final String CONFIG_BASE_ =
+ "e:/cio/projekte/basismodule/wartung/projekt/spss.server/res/test/resources/config/";
+
+ static at.gv.egovernment.moa.spss.server.config.ConfigurationProvider provider_;
+
+ static
+ {
+ System.setProperty(
+ "log4j.configuration",
+ "file:/" + CONFIG_BASE_ + "log4j.properties");
+ System.setProperty(
+ at.gv.egovernment.moa.spss.server.config.ConfigurationProvider.CONFIG_PROPERTY_NAME,
+ CONFIG_BASE_ + "moa.sp.noopts-config.xml");
+ try
+ {
+ ConfigurationProvider.reload();
+ provider_ = at.gv.egovernment.moa.spss.server.config.ConfigurationProvider.getInstance();
+ }
+ catch (ConfigurationException e)
+ {
+ throw new RuntimeException("Fehler beim Setup des Tests: " + e.getMessage());
+ }
+ }
+
+ /**
+ * Constructor for ConfigurationProvider.
+ * @param arg0
+ */
+ public ConfigurationProviderTest3() throws MOAException
+ {
+ super("ConfigurationProvider");
+ }
+
+ public void testGetWarnings()
+ {
+ // 3 Warnings should be collected: C14N not found, DigestMethod not found, ArchiveDuration not found
+ assertEquals(3, provider_.getWarnings().size());
+ }
+
+ public void testGetDigestMethodAlgorithmName()
+ {
+ // Element is missing in config file, check if default value is returned
+ assertEquals(
+ Constants.SHA1_URI,
+ provider_.getDigestMethodAlgorithmName());
+ }
+
+ public void testGetCanonicalizationAlgorithmName()
+ {
+ // Element is missing in config file, check if default value is returned
+ assertEquals(
+ Constants.C14N_URI,
+ provider_.getCanonicalizationAlgorithmName());
+ }
+
+ public void testGetHardwareCryptoModules()
+ {
+ // No hardware crypto modules in config file, check for empty list
+ List hwcms = provider_.getHardwareCryptoModules();
+ assertEquals(0, hwcms.size());
+ }
+
+ public void testGetHardwareKeyModules()
+ {
+ // No hardware key modules in config file, check for empty list
+ List hwkms = provider_.getHardwareKeyModules();
+ assertEquals(0, hwkms.size());
+ }
+
+ public void testGetSoftwareKeyModules()
+ {
+ // No software key modules in config file, check for empty list
+ List swkms = provider_.getSoftwareKeyModules();
+ assertEquals(0, swkms.size());
+ }
+
+ public void testGetDistributionPoints() throws RFC2253NameParserException
+ {
+ // No distribution points in config file, check for emtpy set
+ X509Certificate cert = new X509Certificate();
+ RFC2253NameParser parser = new RFC2253NameParser("CN=DP1_Issuer");
+ Name name = parser.parse();
+ cert.setIssuerDN(name);
+
+ Set dps = provider_.getDistributionPoints(cert);
+ assertEquals(0, dps.size());
+ }
+
+ public void testGetCRLArchiveDuration()
+ {
+ // No archive duration in config file, check for default value
+ assertEquals(0, provider_.getCRLArchiveDuration());
+ }
+
+ public void testGetCreateTransformsInfoProfile()
+ {
+ // No profile in config file, check for null
+ Element ctip1 = provider_.getCreateTransformsInfoProfile("CTIP_1");
+ assertNull(ctip1);
+ }
+
+ public void testGetCreateSignatureEnvironmentProfile()
+ {
+ // No profile in config file, check for null
+ Element csep = provider_.getCreateSignatureEnvironmentProfile("CSEP_1");
+ assertNull(csep);
+ }
+
+ public void testGetVerifyTransformsInfoProfile()
+ {
+ // No profile in config file, check for null
+ Element vtip = provider_.getVerifyTransformsInfoProfile("VTIP_1");
+ assertNull(vtip);
+ }
+
+ public void testGetSupplementProfile()
+ {
+ // No profile in config file, check for null
+ Element sp = provider_.getSupplementProfile("SP_1");
+ assertNull(sp);
+ }
+
+ public void testGetRevocationArchiveJDBCURL()
+ {
+ // No archive in config file, check for null
+ assertNull(provider_.getRevocationArchiveJDBCURL());
+ }
+
+ public void testGetRevocationArchiveJDBCDriverClass()
+ {
+ // No archive in config file, check for null
+ assertNull(provider_.getRevocationArchiveJDBCDriverClass());
+ }
+
+ public void testGetServiceOrder()
+ {
+ // Element is missing in config file, check for empty array
+ String[] serviceOrder = provider_.getServiceOrder();
+ assertEquals(0, serviceOrder.length);
+ }
+}
diff --git a/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/iaik/config/ConfigurationDataImplTest.java b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/iaik/config/ConfigurationDataImplTest.java
new file mode 100644
index 000000000..17daae1e9
--- /dev/null
+++ b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/iaik/config/ConfigurationDataImplTest.java
@@ -0,0 +1,164 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.spss.server.iaik.config;
+
+import java.io.FileInputStream;
+import java.security.KeyStore;
+import java.security.cert.CertificateFactory;
+import java.security.cert.X509Certificate;
+import java.util.Collection;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import test.at.gv.egovernment.moa.spss.SPSSTestCase;
+
+import iaik.asn1.structures.DistributionPoint;
+import iaik.pki.PKIConfiguration;
+import iaik.pki.pathvalidation.ChainingModes;
+import iaik.pki.pathvalidation.ValidationConfiguration;
+import iaik.pki.revocation.CRLDistributionPoint;
+import iaik.pki.revocation.RevocationConfiguration;
+import iaik.pki.store.certstore.CertStoreConfiguration;
+import iaik.pki.store.certstore.CertStoreTypes;
+import iaik.pki.store.revocation.archive.ArchiveConfiguration;
+import iaik.pki.store.revocation.archive.db.DataBaseArchiveParameter;
+import iaik.server.ConfigurationData;
+import iaik.server.modules.keys.HardwareKeyModuleConfiguration;
+import iaik.server.modules.keys.SoftwareKeyModuleConfiguration;
+
+import at.gv.egovernment.moa.spss.server.iaik.config.ConfigurationDataImpl;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+
+/**
+ * Tests the <code>ConfigurationDataImpl</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ConfigurationDataImplTest extends SPSSTestCase {
+
+ private ConfigurationData config;
+ private X509Certificate iaikCert;
+
+ public ConfigurationDataImplTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ TransactionContext context;
+
+ setUpTransactionContext();
+ context = TransactionContextManager.getInstance().getTransactionContext();
+
+ config = new ConfigurationDataImpl(context.getConfiguration());
+
+ KeyStore ks = KeyStore.getInstance("JKS", "SUN");
+ ks.load(
+ new FileInputStream(TESTDATA_ROOT + "security/server.keystore"),
+ "changeit".toCharArray());
+
+ CertificateFactory certFactory = CertificateFactory.getInstance("X.509");
+ Collection certs =
+ certFactory.generateCertificates(
+ new FileInputStream(
+ TESTDATA_ROOT
+ + "conf/moa-spss/trustprofiles/TrustProfile1/IAIKRoot.cer"));
+ iaikCert = (X509Certificate) certs.toArray()[0];
+
+ }
+
+ public void testGetPKIConfiguration() {
+ PKIConfiguration pkiConfig = config.getPKIConfiguration();
+ ArchiveConfiguration archiveConfig = pkiConfig.getArchiveConfiguration();
+ CertStoreConfiguration certStoreConfig =
+ pkiConfig.getCertStoreConfiguration();
+ RevocationConfiguration revocationConfig =
+ pkiConfig.getRevocationConfiguration();
+ ValidationConfiguration validationConfig =
+ pkiConfig.getValidationConfiguration();
+ DataBaseArchiveParameter archiveParam;
+ Set distributionPoints;
+ Iterator iter;
+ boolean found;
+
+ // test archive parameters
+ archiveParam =
+ (DataBaseArchiveParameter) archiveConfig.getArchiveParameters();
+ assertEquals(
+ archiveParam.getJDBCUrl(),
+ "jdbc:postgresql://10.16.46.108/moa?user=moa&password=moatest");
+
+ // test cert store configuration
+ assertEquals(1, certStoreConfig.getParameters().length);
+ assertEquals(
+ CertStoreTypes.DIRECTORY,
+ certStoreConfig.getParameters()[0].getType());
+
+ // test revocation configuration
+ distributionPoints =
+ revocationConfig.getAlternativeDistributionPoints(iaikCert, null, new Date());
+ assertEquals(3, distributionPoints.size());
+ found = false;
+ for (iter = distributionPoints.iterator(); iter.hasNext();) {
+ CRLDistributionPoint dp = (CRLDistributionPoint) iter.next();
+ if (dp.getUri().equals("http://www.iaik.at/testCA/iaik_test_sig.crl")) {
+ found =
+ dp.getReasonCodes()
+ == (DistributionPoint.keyCompromise
+ | DistributionPoint.affiliationChanged);
+ }
+ }
+ assertTrue(found);
+
+ // test validation configuration
+ assertEquals(
+ ChainingModes.PKIX_MODE,
+ validationConfig.getChainingMode(iaikCert));
+ }
+
+ /*
+ public void testGetCryptoModuleConfigurations() {
+ List cryptoConfigs = config.getCryptoModuleConfigurations();
+ HardwareCryptoModuleConfiguration moduleConfig;
+
+ assertEquals(2, cryptoConfigs.size());
+ moduleConfig = (HardwareCryptoModuleConfiguration) cryptoConfigs.get(0);
+ assertEquals("Module1", moduleConfig.getModuleName());
+ assertEquals("Slot1", moduleConfig.getSlotID());
+ assertEquals("PIN1", new String(moduleConfig.getUserPIN()));
+ }
+ */
+
+ public void testGetKeyModuleConfigurations() {
+ List keyConfigs = config.getKeyModuleConfigurations();
+ HardwareKeyModuleConfiguration hwKey;
+ SoftwareKeyModuleConfiguration swKey;
+
+ assertEquals(7, keyConfigs.size());
+ hwKey = (HardwareKeyModuleConfiguration) keyConfigs.get(0);
+ assertEquals("cryptoki.dll", hwKey.getModuleName());
+ assertEquals("0", hwKey.getSlotID());
+ assertEquals("0000", new String(hwKey.getUserPIN()));
+ swKey = (SoftwareKeyModuleConfiguration) keyConfigs.get(1);
+ assertEquals(
+ "buergerkarte",
+ new String(swKey.getKeyStoreAuthenticationData()));
+ }
+
+}
diff --git a/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/iaik/config/IaikConfiguratorTest.java b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/iaik/config/IaikConfiguratorTest.java
new file mode 100644
index 000000000..364264e51
--- /dev/null
+++ b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/iaik/config/IaikConfiguratorTest.java
@@ -0,0 +1,51 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.spss.server.iaik.config;
+
+import test.at.gv.egovernment.moa.spss.SPSSTestCase;
+
+import at.gv.egovernment.moa.spss.server.iaik.config.IaikConfigurator;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+
+/**
+ * Tests the <code>IaikConfigurator</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class IaikConfiguratorTest extends SPSSTestCase {
+
+ public IaikConfiguratorTest(String name) {
+ super(name);
+ }
+
+ /**
+ * @see TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUpTransactionContext();
+ }
+
+ public void testConfigure() throws Exception {
+ IaikConfigurator configurator = new IaikConfigurator();
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+
+ configurator.configure(context.getConfiguration());
+ }
+
+}
diff --git a/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/AllTests.java b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/AllTests.java
new file mode 100644
index 000000000..aa7f6defe
--- /dev/null
+++ b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/AllTests.java
@@ -0,0 +1,40 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.spss.server.invoke;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * Runs all tests in this package.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class AllTests {
+ public static Test suite() {
+ TestSuite suite = new TestSuite();
+
+ suite.addTestSuite(DataObjectFactoryTest.class);
+ suite.addTestSuite(TransformationFactoryTest.class);
+ suite.addTestSuite(XMLSignatureCreationInvokerTest.class);
+ suite.addTestSuite(CMSSignatureVerificationInvokerTest.class);
+ suite.addTestSuite(XMLSignatureVerificationInvokerTest.class);
+
+ return suite;
+ }
+
+}
diff --git a/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationInvokerTest.java b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationInvokerTest.java
new file mode 100644
index 000000000..8277cfab9
--- /dev/null
+++ b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationInvokerTest.java
@@ -0,0 +1,78 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.spss.server.invoke;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import test.at.gv.egovernment.moa.spss.SPSSTestCase;
+
+import at.gv.egovernment.moa.util.DOMUtils;
+
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse;
+import at.gv.egovernment.moa.spss.api.xmlbind.VerifyCMSSignatureRequestParser;
+import at.gv.egovernment.moa.spss.api.xmlbind.VerifyCMSSignatureResponseBuilder;
+import at.gv.egovernment.moa.spss.server.invoke.CMSSignatureVerificationInvoker;
+
+/**
+ * Mainly a smoke test for debugging the CMSSignatureVerificationInvoker.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CMSSignatureVerificationInvokerTest extends SPSSTestCase {
+ private static final String TESTDATA_BASE =
+ TESTDATA_ROOT + "xml/VerifyCMSSignature/";
+
+ /**
+ * Constructor for CMSSignatureVerificationInvokerTest.
+ * @param name
+ */
+ public CMSSignatureVerificationInvokerTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ setUpTransactionContext();
+ setUpLoggingContext();
+ setUpIaikConfiguration();
+ }
+
+ public void testVerifyCMSSignature() throws Exception {
+ try {
+ CMSSignatureVerificationInvoker invoker =
+ CMSSignatureVerificationInvoker.getInstance();
+ VerifyCMSSignatureRequestParser requestParser =
+ new VerifyCMSSignatureRequestParser();
+ Document doc =
+ SPSSTestCase.parseXmlValidating(
+ TESTDATA_BASE + "TestGeneratorVC0.001.Req.xml");
+ VerifyCMSSignatureRequest request =
+ requestParser.parse(doc.getDocumentElement());
+ VerifyCMSSignatureResponse response = invoker.verifyCMSSignature(request);
+ VerifyCMSSignatureResponseBuilder responseBuilder =
+ new VerifyCMSSignatureResponseBuilder();
+ Element result = responseBuilder.build(response).getDocumentElement();
+
+ System.out.println(DOMUtils.serializeNode(result));
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+}
diff --git a/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/DataObjectFactoryTest.java b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/DataObjectFactoryTest.java
new file mode 100644
index 000000000..5861b2e8d
--- /dev/null
+++ b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/DataObjectFactoryTest.java
@@ -0,0 +1,195 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.spss.server.invoke;
+
+import java.io.InputStream;
+import java.security.Security;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import test.at.gv.egovernment.moa.spss.SPSSTestCase;
+
+import iaik.server.modules.xml.BinaryDataObject;
+import iaik.server.modules.xml.DataObject;
+import iaik.server.modules.xml.XMLDataObject;
+
+import at.gv.egovernment.moa.util.Base64Utils;
+
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.server.iaik.xml.ByteArrayDataObjectImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xml.ByteStreamDataObjectImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xml.XMLDataObjectImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xml.XMLNodeListDataObjectImpl;
+import at.gv.egovernment.moa.spss.server.invoke.DataObjectFactory;
+
+/**
+ * Test cases for the <code>DataObjectFactory</code> class.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class DataObjectFactoryTest extends SPSSTestCase {
+
+ private static final String HTTP_BINARY_CONTENT_URL = "http://www.google.com";
+ private static final String HTTP_XML_CONTENT_URL =
+ "http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd";
+ private static final String HTTPS_BINARY_CONTENT_URL =
+ "https://businessnet.ba-ca.com";
+ private static final String HTTPS_UNTRUSTED_URL =
+ "https://heribert.anecon.com";
+ private static final String HTTP_UNKNOWN_HOST_URL = "http://uurjmjmruuw.com";
+ private static final String MALFORMED_URL = "//hsld///ddd";
+ private static final String FILE_BINARY_CONTENT_URL = "file:/C:/boot.ini";
+ private static final String XML_CONTENT =
+ "<XMLContent>"
+ + " <User name=\"test1\"/>"
+ + " <USer name=\"test2\"/>"
+ + "</XMLContent>";
+ private static final String BASE64_CONTENT = "U3Zlbg==";
+
+ private SPSSFactory spssFactory = SPSSFactory.getInstance();
+ private DataObjectFactory factory;
+
+ /**
+ * Constructor for DataObjectFactoryTest.
+ * @param name
+ */
+ public DataObjectFactoryTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ factory = DataObjectFactory.getInstance();
+
+ // set up SSL
+ Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
+ System.setProperty(
+ "java.protocol.handler.pkgs",
+ "com.sun.net.ssl.internal.www.protocol");
+ /*
+ System.setProperty(
+ "javax.net.ssl.keyStore",
+ "data/test/security/client.keystore");
+ System.setProperty("javax.net.ssl.keyStorePassword", "changeit");
+ System.setProperty(
+ "javax.net.ssl.trustStore",
+ "data/test/security/client.keystore");
+ System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
+ */
+ }
+
+ public void testCreateFromURIWithBinaryHttp() throws Exception {
+ DataObject dataObject =
+ factory.createFromURI(HTTP_BINARY_CONTENT_URL, false);
+
+ assertNotNull(dataObject);
+ assertTrue(dataObject instanceof ByteStreamDataObjectImpl);
+ assertNotNull(((BinaryDataObject) dataObject).getInputStream());
+ }
+
+ public void testCreateFromURIWithXmlHttp() throws Exception {
+ DataObject dataObject = factory.createFromURI(HTTP_XML_CONTENT_URL, false);
+ Element element;
+
+ assertNotNull(dataObject);
+ assertTrue(dataObject instanceof XMLDataObjectImpl);
+ element = ((XMLDataObject) dataObject).getElement();
+ assertNotNull(element);
+ assertEquals("schema", element.getTagName());
+ }
+
+ public void testCreateFromURIWithMalformedURI() throws Exception {
+ try {
+ factory.createFromURI(MALFORMED_URL, false);
+ fail();
+ } catch (MOAException e) {
+ }
+ }
+
+ public void testCreateFromURIWithNonExistingHttpURL() throws Exception {
+ try {
+ factory.createFromURI(HTTP_UNKNOWN_HOST_URL, false);
+ fail();
+ } catch (MOAException e) {
+ }
+ }
+
+ public void testCreateFromURIWithHttps() throws Exception {
+ DataObject dataObject =
+ factory.createFromURI(HTTPS_BINARY_CONTENT_URL, false);
+ assertNotNull(dataObject);
+ assertTrue(dataObject instanceof BinaryDataObject);
+ }
+
+ public void testCreateFromURIWithUntrustedHttps() throws Exception {
+ try {
+ factory.createFromURI(HTTPS_UNTRUSTED_URL, false);
+ fail();
+ } catch (MOAException e) {
+
+ }
+ }
+
+ public void testCreateFromURIWithFile() throws Exception {
+ try {
+ factory.createFromURI(FILE_BINARY_CONTENT_URL, false);
+ fail();
+ } catch (MOAException e) {
+ }
+ }
+
+ public void testCreateFromContentOptionalRefTypeWithXmlContent()
+ throws Exception {
+ Document doc = parseXmlString(XML_CONTENT);
+ Content content =
+ spssFactory.createContent(
+ doc.getDocumentElement().getChildNodes(),
+ "http://data");
+ DataObject dataObject =
+ factory.createFromContentOptionalRefType(
+ content,
+ null,
+ null,
+ true,
+ false,
+ true,
+ false);
+
+ assertTrue(dataObject instanceof XMLNodeListDataObjectImpl);
+ }
+
+ public void testCreateFromContentOptionalRefTypeWithBase64Content()
+ throws Exception {
+ InputStream is = Base64Utils.decodeToStream(BASE64_CONTENT, true);
+ Content content = spssFactory.createContent(is, "http://data");
+ DataObject dataObject =
+ factory.createFromContentOptionalRefType(
+ content,
+ null,
+ null,
+ false,
+ false,
+ true,
+ false);
+
+ assertNotNull(dataObject);
+ assertTrue(dataObject instanceof ByteArrayDataObjectImpl);
+ }
+
+}
diff --git a/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/TransformationFactoryTest.java b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/TransformationFactoryTest.java
new file mode 100644
index 000000000..389ecfdb8
--- /dev/null
+++ b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/TransformationFactoryTest.java
@@ -0,0 +1,216 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.spss.server.invoke;
+
+import java.util.List;
+import java.util.Map;
+
+import org.w3c.dom.Document;
+
+import test.at.gv.egovernment.moa.spss.SPSSTestCase;
+
+import iaik.ixsil.init.IXSILInit;
+import iaik.ixsil.util.URI;
+import iaik.server.modules.xml.Base64Transformation;
+import iaik.server.modules.xml.Canonicalization;
+import iaik.server.modules.xml.EnvelopedSignatureTransformation;
+import iaik.server.modules.xml.Transformation;
+import iaik.server.modules.xml.XPath2Transformation;
+import iaik.server.modules.xml.XPathTransformation;
+import iaik.server.modules.xml.XSLTTransformation;
+
+import at.gv.egovernment.moa.util.Constants;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.api.common.Transform;
+import at.gv.egovernment.moa.spss.api.xmlbind.TransformParser;
+import at.gv.egovernment.moa.spss.server.invoke.TransformationFactory;
+
+/**
+ * Test cases for the <code>TransformationFactory</code> class.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class TransformationFactoryTest extends SPSSTestCase {
+
+ private static final String TESTDATA_BASE =
+ TESTDATA_ROOT + "xml/dsigTransform/";
+ private TransformationFactory factory = TransformationFactory.getInstance();
+ private TransformParser transformParser = new TransformParser();
+
+ /**
+ * Constructor for TransformationFactoryTest.
+ * @param name
+ */
+ public TransformationFactoryTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ IXSILInit.init(new URI("init/properties/init.properties"));
+ //IXSILInit.init(new URI("file:data/deploy/ixsil/init/properties/init.properties"));
+
+ }
+
+ public void testCreateCanonicalization() throws Exception {
+ Document transform = parseXml(TESTDATA_BASE + "canonicalization.xml");
+ Transform tr =
+ transformParser.parseTransform(transform.getDocumentElement());
+ Transformation t = factory.createTransformation(tr);
+
+ assertTrue(t instanceof Canonicalization);
+ assertEquals(
+ "http://www.w3.org/TR/2001/REC-xml-c14n-20010315",
+ t.getAlgorithmURI());
+ }
+
+ public void testCreateCanonicalizationWithComments() throws Exception {
+ Document transform =
+ parseXml(TESTDATA_BASE + "canonicalizationWithComments.xml");
+ Transform tr =
+ transformParser.parseTransform(transform.getDocumentElement());
+ Transformation t = factory.createTransformation(tr);
+
+ assertTrue(t instanceof Canonicalization);
+ assertEquals(
+ "http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments",
+ t.getAlgorithmURI());
+ }
+
+ public void testCreateBase64Decode() throws Exception {
+ Document transform = parseXml(TESTDATA_BASE + "base64.xml");
+ Transform tr =
+ transformParser.parseTransform(transform.getDocumentElement());
+ Transformation t = factory.createTransformation(tr);
+ assertTrue(t instanceof Base64Transformation);
+ }
+
+ public void testCreateEnvelopedSignature() throws Exception {
+ Document transform = parseXml(TESTDATA_BASE + "enveloped.xml");
+ Transform tr =
+ transformParser.parseTransform(transform.getDocumentElement());
+ Transformation t = factory.createTransformation(tr);
+ assertTrue(t instanceof EnvelopedSignatureTransformation);
+ }
+
+ public void testXPathTransformation() throws Exception {
+ Document transform = parseXml(TESTDATA_BASE + "xpath.xml");
+ Transform tr =
+ transformParser.parseTransform(transform.getDocumentElement());
+ Transformation t = factory.createTransformation(tr);
+ Map nsDecls;
+
+ assertTrue(t instanceof XPathTransformation);
+ nsDecls = ((XPathTransformation) t).getNamespaceDeclarations();
+ assertEquals(1, nsDecls.size());
+ assertEquals(Constants.DSIG_NS_URI, nsDecls.get("dsig"));
+ }
+
+ public void testCreateXPath2Transformation() throws Exception {
+ Document transform = parseXml(TESTDATA_BASE + "xpath2.xml");
+ Transform tr =
+ transformParser.parseTransform(transform.getDocumentElement());
+ Transformation t = factory.createTransformation(tr);
+ assertTrue(t instanceof XPath2Transformation);
+ }
+
+ public void testCreateXSLTTransformation() throws Exception {
+ Document transform = parseXml(TESTDATA_BASE + "xslt.xml");
+ Transform tr =
+ transformParser.parseTransform(transform.getDocumentElement());
+ XSLTTransformation t =
+ (XSLTTransformation) factory.createTransformation(tr);
+ assertNotNull(t.getStylesheetElement());
+ }
+
+ public void testCreateWithIllegalAlgorithm() throws Exception {
+ try {
+ Document transform = parseXml(TESTDATA_BASE + "illegalAlgorithm.xml");
+ Transform tr =
+ transformParser.parseTransform(transform.getDocumentElement());
+ factory.createTransformation(tr);
+ fail();
+ } catch (MOAApplicationException e) {
+ }
+ }
+
+ public void testEqualsXslt() throws Exception {
+ Document xslt = parseXml(TESTDATA_BASE + "xslt.xml");
+ Transform tr = transformParser.parseTransform(xslt.getDocumentElement());
+ Transformation trXslt = factory.createTransformation(tr);
+
+ Document xsltEqu = parseXml(TESTDATA_BASE + "xsltEqual.xml");
+ tr = transformParser.parseTransform(xsltEqu.getDocumentElement());
+ Transformation trXsltEqu = factory.createTransformation(tr);
+
+ Document xsltDiff = parseXml(TESTDATA_BASE + "xsltDifferent.xml");
+ tr = transformParser.parseTransform(xsltDiff.getDocumentElement());
+ Transformation trXsltDiff = factory.createTransformation(tr);
+
+ Document canonicalization =
+ parseXml(TESTDATA_BASE + "canonicalization.xml");
+
+ assertTrue(trXslt.equals(trXsltEqu));
+ assertFalse(trXslt.equals(trXsltDiff));
+ assertFalse(trXsltEqu.equals(trXsltDiff));
+ assertEquals(trXslt.hashCode(), trXsltEqu.hashCode());
+ assertFalse(trXslt.hashCode() == trXsltDiff.hashCode());
+ assertFalse(trXsltEqu.hashCode() == trXsltDiff.hashCode());
+ assertFalse(trXslt.equals(canonicalization));
+ }
+
+ public void testEqualsXPath() throws Exception {
+ Document xpath = parseXml(TESTDATA_BASE + "xpath.xml");
+ Transform tr = transformParser.parseTransform(xpath.getDocumentElement());
+ Transformation trXpath = factory.createTransformation(tr);
+ Transformation trXpathEqu = factory.createTransformation(tr);
+
+ Document xpathDiff = parseXml(TESTDATA_BASE + "xpathDifferent.xml");
+ tr = transformParser.parseTransform(xpathDiff.getDocumentElement());
+ Transformation trXpathDiff = factory.createTransformation(tr);
+
+ assertTrue(trXpath.equals(trXpathEqu));
+ assertEquals(trXpath.hashCode(), trXpathEqu.hashCode());
+ assertFalse(trXpath.equals(trXpathDiff));
+ assertFalse(trXpath.hashCode() == trXpathDiff.hashCode());
+ }
+
+ public void testEqualsXPath2() throws Exception {
+ Document xpath2 = parseXml(TESTDATA_BASE + "xpath2.xml");
+ Transform tr = transformParser.parseTransform(xpath2.getDocumentElement());
+ Transformation trXpath2 = factory.createTransformation(tr);
+ Transformation trXpath2Equ = factory.createTransformation(tr);
+
+ Document xpath2Diff = parseXml(TESTDATA_BASE + "xpath2Different.xml");
+ tr = transformParser.parseTransform(xpath2Diff.getDocumentElement());
+ Transformation trXpath2Diff = factory.createTransformation(tr);
+
+ assertTrue(trXpath2.equals(trXpath2Equ));
+ assertEquals(trXpath2.hashCode(), trXpath2Equ.hashCode());
+ assertFalse(trXpath2.equals(trXpath2Diff));
+ assertFalse(trXpath2.hashCode() == trXpath2Diff.hashCode());
+ }
+
+ public void testCreateTransformationList() throws Exception {
+ Document transforms = parseXml(TESTDATA_BASE + "transforms.xml");
+ List trs = transformParser.parseTransforms(transforms.getDocumentElement());
+ List transformationList = factory.createTransformationList(trs);
+
+ assertEquals(3, transformationList.size());
+ }
+
+}
diff --git a/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureCreationInvokerTest.java b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureCreationInvokerTest.java
new file mode 100644
index 000000000..52dd89a3a
--- /dev/null
+++ b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureCreationInvokerTest.java
@@ -0,0 +1,78 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.spss.server.invoke;
+
+import java.util.Collections;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import test.at.gv.egovernment.moa.spss.SPSSTestCase;
+
+import at.gv.egovernment.moa.util.DOMUtils;
+
+import at.gv.egovernment.moa.spss.api.xmlbind.CreateXMLSignatureRequestParser;
+import at.gv.egovernment.moa.spss.api.xmlbind.CreateXMLSignatureResponseBuilder;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse;
+import at.gv.egovernment.moa.spss.server.invoke.XMLSignatureCreationInvoker;
+
+/**
+ * Mainly a smoke test for debugging the XMLSignatureCreationInvoker.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XMLSignatureCreationInvokerTest extends SPSSTestCase {
+ private static final String TESTDATA_BASE =
+ TESTDATA_ROOT + "xml/CreateXMLSignature/";
+
+ public XMLSignatureCreationInvokerTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ setUpTransactionContext();
+ setUpLoggingContext();
+ setUpIaikConfiguration();
+ setUpSSL();
+ }
+
+ public void testCreateXMLSignature() throws Exception {
+ try {
+ XMLSignatureCreationInvoker invoker =
+ XMLSignatureCreationInvoker.getInstance();
+ CreateXMLSignatureRequestParser requestParser =
+ new CreateXMLSignatureRequestParser();
+ Document doc =
+ SPSSTestCase.parseXmlValidating(
+ TESTDATA_BASE + "TestGeneratorCX2.004.Req.xml");
+ CreateXMLSignatureRequest request =
+ requestParser.parse(doc.getDocumentElement());
+ CreateXMLSignatureResponse response =
+ invoker.createXMLSignature(request, Collections.EMPTY_SET);
+ CreateXMLSignatureResponseBuilder responseBuilder =
+ new CreateXMLSignatureResponseBuilder();
+ Element result = responseBuilder.build(response).getDocumentElement();
+
+ System.out.println(DOMUtils.serializeNode(result));
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+}
diff --git a/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvokerTest.java b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvokerTest.java
new file mode 100644
index 000000000..f2ed39e22
--- /dev/null
+++ b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvokerTest.java
@@ -0,0 +1,76 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.spss.server.invoke;
+
+import org.w3c.dom.Document;
+
+import test.at.gv.egovernment.moa.spss.SPSSTestCase;
+
+import at.gv.egovernment.moa.util.DOMUtils;
+
+import at.gv.egovernment.moa.spss.api.xmlbind.VerifyXMLSignatureRequestParser;
+import at.gv.egovernment.moa.spss.api.xmlbind.VerifyXMLSignatureResponseBuilder;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse;
+import at.gv.egovernment.moa.spss.server.invoke.XMLSignatureVerificationInvoker;
+
+/**
+ * Mainly a smoke test for debugging the XMLSignatureVerificationInvoker.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XMLSignatureVerificationInvokerTest extends SPSSTestCase {
+ private static final String TESTDATA_BASE =
+ TESTDATA_ROOT + "xml/VerifyXMLSignature/";
+
+ public XMLSignatureVerificationInvokerTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ setUpTransactionContext();
+ setUpLoggingContext();
+ setUpIaikConfiguration();
+ }
+
+ public void testVerifyXMLSignature() throws Exception {
+ try {
+ XMLSignatureVerificationInvoker invoker =
+ XMLSignatureVerificationInvoker.getInstance();
+ VerifyXMLSignatureRequestParser requestParser =
+ new VerifyXMLSignatureRequestParser();
+ VerifyXMLSignatureResponseBuilder responseBuilder =
+ new VerifyXMLSignatureResponseBuilder();
+ Document doc =
+ SPSSTestCase.parseXmlValidating(
+ TESTDATA_BASE + "TestGeneratorVX.201.Req.xml");
+
+ VerifyXMLSignatureRequest request =
+ requestParser.parse(doc.getDocumentElement());
+ VerifyXMLSignatureResponse response;
+
+ response = invoker.verifyXMLSignature(request);
+ System.out.println(
+ DOMUtils.serializeNode(responseBuilder.build(response)));
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+
+}
diff --git a/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/tools/CertToolTest.java b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/tools/CertToolTest.java
new file mode 100644
index 000000000..deb6a941c
--- /dev/null
+++ b/spss/server/serverlib/src/test/java/test/at/gv/egovernment/moa/spss/server/tools/CertToolTest.java
@@ -0,0 +1,64 @@
+/*
+* Copyright 2003 Federal Chancellery Austria
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package test.at.gv.egovernment.moa.spss.server.tools;
+
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+
+import at.gv.egovernment.moa.spss.server.tools.CertTool;
+import test.at.gv.egovernment.moa.MOATestCase;
+
+/**
+ * Tests for the <code>CertTool</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CertToolTest extends MOATestCase {
+
+ private static final String EXPECTED_RESULT =
+ "SubjectDN (RFC2253):"
+ + " CN=Patrick Peck,OU=MOA Team,O=BRZ,L=Vienna,ST=Vienna,C=AT\r\n"
+ + "IssuerDN (RFC2253) :"
+ + " CN=Patrick Peck,OU=MOA Team,O=BRZ,L=Vienna,ST=Vienna,C=AT\r\n"
+ + "Serial Number :"
+ + " 1047548672\r\n";
+ private CertTool certTool;
+
+ /**
+ * Constructor for CertToolTest.
+ * @param name
+ */
+ public CertToolTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() {
+ certTool = new CertTool();
+ }
+
+ public void testPrintCertInfo() {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ PrintStream ps = new PrintStream(bos);
+ String result;
+
+ certTool.printCertInfo(TESTDATA_ROOT + "security/server.cer", ps);
+ result = new String(bos.toByteArray());
+ System.out.println(result);
+ assertEquals(EXPECTED_RESULT, result);
+ }
+
+}
diff --git a/spss/server/serverws/.classpath b/spss/server/serverws/.classpath
new file mode 100644
index 000000000..3bcfa0901
--- /dev/null
+++ b/spss/server/serverws/.classpath
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v5.0"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/spss/server/serverws/.project b/spss/server/serverws/.project
new file mode 100644
index 000000000..c7e484cc8
--- /dev/null
+++ b/spss/server/serverws/.project
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>moa-spss-ws</name>
+ <comment></comment>
+ <projects>
+ <project>moa-common</project>
+ <project>moa-spss-lib</project>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ </natures>
+</projectDescription>
diff --git a/spss/server/serverws/.settings/.jsdtscope b/spss/server/serverws/.settings/.jsdtscope
new file mode 100644
index 000000000..f40dd98e2
--- /dev/null
+++ b/spss/server/serverws/.settings/.jsdtscope
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
diff --git a/spss/server/serverws/.settings/org.eclipse.jdt.core.prefs b/spss/server/serverws/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..920508ded
--- /dev/null
+++ b/spss/server/serverws/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Mon Sep 03 15:53:43 CEST 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.4
diff --git a/spss/server/serverws/.settings/org.eclipse.wst.common.component b/spss/server/serverws/.settings/org.eclipse.wst.common.component
new file mode 100644
index 000000000..c83fdc828
--- /dev/null
+++ b/spss/server/serverws/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+<wb-module deploy-name="moa-spss">
+ <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
+ <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/moa-spss-lib/moa-spss-lib">
+ <dependency-type>uses</dependency-type>
+ </dependent-module>
+ <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/moa-common/moa-common">
+ <dependency-type>uses</dependency-type>
+ </dependent-module>
+<property name="context-root" value="moa-spss"/>
+<property name="java-output-path" value="target/classes"/>
+</wb-module>
+</project-modules>
diff --git a/spss/server/serverws/.settings/org.eclipse.wst.common.project.facet.core.xml b/spss/server/serverws/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 000000000..f30a1de6e
--- /dev/null
+++ b/spss/server/serverws/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <installed facet="jst.java" version="1.4"/>
+ <installed facet="jst.web" version="2.3"/>
+</faceted-project>
diff --git a/spss/server/serverws/.settings/org.eclipse.wst.jsdt.ui.superType.container b/spss/server/serverws/.settings/org.eclipse.wst.jsdt.ui.superType.container
new file mode 100644
index 000000000..3bd5d0a48
--- /dev/null
+++ b/spss/server/serverws/.settings/org.eclipse.wst.jsdt.ui.superType.container
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file
diff --git a/spss/server/serverws/.settings/org.eclipse.wst.jsdt.ui.superType.name b/spss/server/serverws/.settings/org.eclipse.wst.jsdt.ui.superType.name
new file mode 100644
index 000000000..05bd71b6e
--- /dev/null
+++ b/spss/server/serverws/.settings/org.eclipse.wst.jsdt.ui.superType.name
@@ -0,0 +1 @@
+Window \ No newline at end of file
diff --git a/spss/server/serverws/.settings/org.maven.ide.eclipse.prefs b/spss/server/serverws/.settings/org.maven.ide.eclipse.prefs
new file mode 100644
index 000000000..9203b873b
--- /dev/null
+++ b/spss/server/serverws/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,9 @@
+#Tue Jul 07 16:06:51 CEST 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
diff --git a/spss/server/serverws/WebContent/META-INF/MANIFEST.MF b/spss/server/serverws/WebContent/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..5e9495128
--- /dev/null
+++ b/spss/server/serverws/WebContent/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
diff --git a/spss/server/serverws/WebContent/WEB-INF/web.xml b/spss/server/serverws/WebContent/WEB-INF/web.xml
new file mode 100644
index 000000000..b3b3ad52d
--- /dev/null
+++ b/spss/server/serverws/WebContent/WEB-INF/web.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <display-name>
+ moa-spss-ws</display-name>
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ <welcome-file>index.htm</welcome-file>
+ <welcome-file>index.jsp</welcome-file>
+ <welcome-file>default.html</welcome-file>
+ <welcome-file>default.htm</welcome-file>
+ <welcome-file>default.jsp</welcome-file>
+ </welcome-file-list>
+</web-app>
diff --git a/spss/server/serverws/data/deploy/tomcat/server.mod_jk.xml b/spss/server/serverws/data/deploy/tomcat/server.mod_jk.xml
new file mode 100644
index 000000000..e6035b8be
--- /dev/null
+++ b/spss/server/serverws/data/deploy/tomcat/server.mod_jk.xml
@@ -0,0 +1,166 @@
+<!-- Alternate Example-less Configuration File -->
+<!-- Note that component elements are nested corresponding to their
+ parent-child relationships with each other -->
+
+<!-- A "Server" is a singleton element that represents the entire JVM,
+ which may contain one or more "Service" instances. The Server
+ listens for a shutdown command on the indicated port.
+
+ Note: A "Server" is not itself a "Container", so you may not
+ define subcomponents such as "Valves" or "Loggers" at this level.
+ -->
+
+<Server port="8005" shutdown="SHUTDOWN" debug="0">
+
+
+ <!-- Uncomment this entry to enable JMX MBeans support -->
+<!--
+ <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
+ debug="0" port="-1" login="admin" password="admin"/>
+-->
+
+
+ <!-- A "Service" is a collection of one or more "Connectors" that share
+ a single "Container" (and therefore the web applications visible
+ within that Container). Normally, that Container is an "Engine",
+ but this is not required.
+
+ Note: A "Service" is not itself a "Container", so you may not
+ define subcomponents such as "Valves" or "Loggers" at this level.
+ -->
+
+ <!-- Define the Tomcat Stand-Alone Service -->
+ <Service name="Tomcat-Standalone">
+
+ <!-- A "Connector" represents an endpoint by which requests are received
+ and responses are returned. Each Connector passes requests on to the
+ associated "Container" (normally an Engine) for processing.
+
+ By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
+ You can also enable an SSL HTTP/1.1 Connector on port 8443 by
+ following the instructions below and uncommenting the second Connector
+ entry. SSL support requires the following steps (see the SSL Config
+ HOWTO in the Tomcat 4.0 documentation bundle for more detailed
+ instructions):
+ * Download and install JSSE 1.0.2 or later, and put the JAR files
+ into "$JAVA_HOME/jre/lib/ext".
+ * Execute:
+ %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
+ $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix)
+ with a password value of "changeit" for both the certificate and
+ the keystore itself.
+
+ By default, DNS lookups are enabled when a web application calls
+ request.getRemoteHost(). This can have an adverse impact on
+ performance, so you can disable it by setting the
+ "enableLookups" attribute to "false". When DNS lookups are disabled,
+ request.getRemoteHost() will return the String version of the
+ IP address of the remote client.
+ -->
+
+ <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
+ <!--
+ <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
+ port="8009" minProcessors="5" maxProcessors="75"
+ enableLookups="true" redirectPort="8443"
+ acceptCount="10" debug="0" connectionTimeout="0"
+ useURIValidationHack="false"
+ protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>
+ -->
+
+ <!-- Define an AJP 1.3 Connector on port 8009 -->
+ <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
+ port="8009" minProcessors="5" maxProcessors="75"
+ acceptCount="10" debug="0"/>
+
+ <!-- An Engine represents the entry point (within Catalina) that processes
+ every request. The Engine implementation for Tomcat stand alone
+ analyzes the HTTP headers included with the request, and passes them
+ on to the appropriate Host (virtual host). -->
+
+ <!-- Define the top level container in our container hierarchy -->
+ <Engine name="Standalone" defaultHost="localhost" debug="0">
+
+ <!-- The request dumper valve dumps useful debugging information about
+ the request headers and cookies that were received, and the response
+ headers and cookies that were sent, for all requests received by
+ this instance of Tomcat. If you care only about requests to a
+ particular virtual host, or a particular application, nest this
+ element inside the corresponding <Host> or <Context> entry instead.
+
+ For a similar mechanism that is portable to all Servlet 2.3
+ containers, check out the "RequestDumperFilter" Filter in the
+ example application (the source for this filter may be found in
+ "$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").
+
+ Request dumping is disabled by default. Uncomment the following
+ element to enable it. -->
+ <!--
+ <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
+ -->
+
+ <!-- Global logger unless overridden at lower levels -->
+ <Logger className="org.apache.catalina.logger.FileLogger"
+ prefix="catalina_log." suffix=".txt"
+ timestamp="true"/>
+
+ <!-- Because this Realm is here, an instance will be shared globally -->
+
+ <Realm className="org.apache.catalina.realm.MemoryRealm" />
+
+ <!-- Replace the above Realm with one of the following to get a Realm
+ stored in a database and accessed via JDBC -->
+
+ <!-- Define the default virtual host -->
+ <Host name="localhost" debug="0" appBase="webapps"
+ unpackWARs="true" autoDeploy="true">
+
+ <!-- Normally, users must authenticate themselves to each web app
+ individually. Uncomment the following entry if you would like
+ a user to be authenticated the first time they encounter a
+ resource protected by a security constraint, and then have that
+ user identity maintained across *all* web applications contained
+ in this virtual host. -->
+ <!--
+ <Valve className="org.apache.catalina.authenticator.SingleSignOn"
+ debug="0"/>
+ -->
+
+ <!-- Access log processes all requests for this virtual host. By
+ default, log files are created in the "logs" directory relative to
+ $CATALINA_HOME. If you wish, you can specify a different
+ directory with the "directory" attribute. Specify either a relative
+ (to $CATALINA_HOME) or absolute path to the desired directory.
+ -->
+ <Valve className="org.apache.catalina.valves.AccessLogValve"
+ directory="logs" prefix="localhost_access_log." suffix=".txt"
+ pattern="common"/>
+
+ <!-- Logger shared by all Contexts related to this virtual host. By
+ default (when using FileLogger), log files are created in the "logs"
+ directory relative to $CATALINA_HOME. If you wish, you can specify
+ a different directory with the "directory" attribute. Specify either a
+ relative (to $CATALINA_HOME) or absolute path to the desired
+ directory.-->
+ <Logger className="org.apache.catalina.logger.FileLogger"
+ directory="logs" prefix="localhost_log." suffix=".txt"
+ timestamp="true"/>
+
+ <!-- Define properties for each web application. This is only needed
+ if you want to set non-default properties, or have web application
+ document roots in places other than the virtual host's appBase
+ directory. -->
+
+ <!-- Tomcat Root Context -->
+ <!--
+ <Context path="" docBase="ROOT" debug="0"/>
+ -->
+
+ </Host>
+
+ </Engine>
+
+ </Service>
+
+</Server>
+
diff --git a/spss/server/serverws/data/deploy/tomcat/server.xml b/spss/server/serverws/data/deploy/tomcat/server.xml
new file mode 100644
index 000000000..3e5966ca9
--- /dev/null
+++ b/spss/server/serverws/data/deploy/tomcat/server.xml
@@ -0,0 +1,169 @@
+<!-- Alternate Example-less Configuration File -->
+<!-- Note that component elements are nested corresponding to their
+ parent-child relationships with each other -->
+
+<!-- A "Server" is a singleton element that represents the entire JVM,
+ which may contain one or more "Service" instances. The Server
+ listens for a shutdown command on the indicated port.
+
+ Note: A "Server" is not itself a "Container", so you may not
+ define subcomponents such as "Valves" or "Loggers" at this level.
+ -->
+
+<Server port="8005" shutdown="SHUTDOWN" debug="0">
+
+
+ <!-- Uncomment this entry to enable JMX MBeans support -->
+<!--
+ <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
+ debug="0" port="-1" login="admin" password="admin"/>
+-->
+
+
+ <!-- A "Service" is a collection of one or more "Connectors" that share
+ a single "Container" (and therefore the web applications visible
+ within that Container). Normally, that Container is an "Engine",
+ but this is not required.
+
+ Note: A "Service" is not itself a "Container", so you may not
+ define subcomponents such as "Valves" or "Loggers" at this level.
+ -->
+
+ <!-- Define the Tomcat Stand-Alone Service -->
+ <Service name="Tomcat-Standalone">
+
+ <!-- A "Connector" represents an endpoint by which requests are received
+ and responses are returned. Each Connector passes requests on to the
+ associated "Container" (normally an Engine) for processing.
+
+ By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
+ You can also enable an SSL HTTP/1.1 Connector on port 8443 by
+ following the instructions below and uncommenting the second Connector
+ entry. SSL support requires the following steps (see the SSL Config
+ HOWTO in the Tomcat 4.0 documentation bundle for more detailed
+ instructions):
+ * Download and install JSSE 1.0.2 or later, and put the JAR files
+ into "$JAVA_HOME/jre/lib/ext".
+ * Execute:
+ %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
+ $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix)
+ with a password value of "changeit" for both the certificate and
+ the keystore itself.
+
+ By default, DNS lookups are enabled when a web application calls
+ request.getRemoteHost(). This can have an adverse impact on
+ performance, so you can disable it by setting the
+ "enableLookups" attribute to "false". When DNS lookups are disabled,
+ request.getRemoteHost() will return the String version of the
+ IP address of the remote client.
+ -->
+
+ <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
+ <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
+ port="8080" minProcessors="5" maxProcessors="75"
+ enableLookups="true" redirectPort="8443"
+ acceptCount="100" debug="0" connectionTimeout="20000"
+ useURIValidationHack="false" disableUploadTimeout="true" />
+ <!-- Note : To disable connection timeouts, set connectionTimeout value
+ to -1 -->
+
+ <!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
+ <!--
+ <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
+ port="8443" minProcessors="5" maxProcessors="75"
+ enableLookups="uri"
+ acceptCount="100" debug="0" scheme="https" secure="true"
+ useURIValidationHack="false" disableUploadTimeout="true">
+ <Factory className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory"
+ clientAuth="false" protocol="TLS"/>
+ </Connector>
+ -->
+
+ <!-- An Engine represents the entry point (within Catalina) that processes
+ every request. The Engine implementation for Tomcat stand alone
+ analyzes the HTTP headers included with the request, and passes them
+ on to the appropriate Host (virtual host). -->
+
+ <!-- Define the top level container in our container hierarchy -->
+ <Engine name="Standalone" defaultHost="localhost" debug="0">
+
+ <!-- The request dumper valve dumps useful debugging information about
+ the request headers and cookies that were received, and the response
+ headers and cookies that were sent, for all requests received by
+ this instance of Tomcat. If you care only about requests to a
+ particular virtual host, or a particular application, nest this
+ element inside the corresponding <Host> or <Context> entry instead.
+
+ For a similar mechanism that is portable to all Servlet 2.3
+ containers, check out the "RequestDumperFilter" Filter in the
+ example application (the source for this filter may be found in
+ "$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").
+
+ Request dumping is disabled by default. Uncomment the following
+ element to enable it. -->
+ <!--
+ <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
+ -->
+
+ <!-- Global logger unless overridden at lower levels -->
+ <Logger className="org.apache.catalina.logger.FileLogger"
+ prefix="catalina_log." suffix=".txt"
+ timestamp="true"/>
+
+ <!-- Because this Realm is here, an instance will be shared globally -->
+
+ <Realm className="org.apache.catalina.realm.MemoryRealm" />
+
+ <!-- Define the default virtual host -->
+ <Host name="localhost" debug="0" appBase="webapps"
+ unpackWARs="true" autoDeploy="true">
+
+ <!-- Normally, users must authenticate themselves to each web app
+ individually. Uncomment the following entry if you would like
+ a user to be authenticated the first time they encounter a
+ resource protected by a security constraint, and then have that
+ user identity maintained across *all* web applications contained
+ in this virtual host. -->
+ <!--
+ <Valve className="org.apache.catalina.authenticator.SingleSignOn"
+ debug="0"/>
+ -->
+
+ <!-- Access log processes all requests for this virtual host. By
+ default, log files are created in the "logs" directory relative to
+ $CATALINA_HOME. If you wish, you can specify a different
+ directory with the "directory" attribute. Specify either a relative
+ (to $CATALINA_HOME) or absolute path to the desired directory.
+ -->
+ <Valve className="org.apache.catalina.valves.AccessLogValve"
+ directory="logs" prefix="localhost_access_log." suffix=".txt"
+ pattern="common"/>
+
+ <!-- Logger shared by all Contexts related to this virtual host. By
+ default (when using FileLogger), log files are created in the "logs"
+ directory relative to $CATALINA_HOME. If you wish, you can specify
+ a different directory with the "directory" attribute. Specify either a
+ relative (to $CATALINA_HOME) or absolute path to the desired
+ directory.-->
+ <Logger className="org.apache.catalina.logger.FileLogger"
+ directory="logs" prefix="localhost_log." suffix=".txt"
+ timestamp="true"/>
+
+ <!-- Define properties for each web application. This is only needed
+ if you want to set non-default properties, or have web application
+ document roots in places other than the virtual host's appBase
+ directory. -->
+
+ <!-- Tomcat Root Context -->
+ <!--
+ <Context path="" docBase="ROOT" debug="0"/>
+ -->
+
+ </Host>
+
+ </Engine>
+
+ </Service>
+
+</Server>
+
diff --git a/spss/server/serverws/data/deploy/tomcat/unix/moa-env.sh b/spss/server/serverws/data/deploy/tomcat/unix/moa-env.sh
new file mode 100644
index 000000000..49d6723a3
--- /dev/null
+++ b/spss/server/serverws/data/deploy/tomcat/unix/moa-env.sh
@@ -0,0 +1,12 @@
+MOA_START=`pwd`
+
+CONFIG_OPT=-Dmoa.spss.server.configuration=$MOA_START/conf/moa-spss/spss.config.xml
+LOGGING_OPT=-Dlog4j.configuration=file:$MOA_START/conf/moa-spss/log4j.properties
+# NODE_ID_OPT=-Dmoa.node-id=node1
+# TRUST_STORE_OPT=-Djavax.net.ssl.trustStore=truststore.jks
+# TRUST_STORE_PASS_OPT=-Djavax.net.ssl.trustStorePassword=changeit
+# TRUST_STORE_TYPE_OPT=-Djavax.net.ssl.trustStoreType=jks
+
+export CATALINA_OPTS="$CONFIG_OPT $LOGGING_OPT $NODE_ID_OPT $TRUST_STORE_OPT $TRUST_STORE_PASS_OPT $TRUST_STORE_TYPE_OPT"
+
+echo CATALINA_OPTS=$CATALINA_OPTS
diff --git a/spss/server/serverws/data/deploy/tomcat/uriworkermap.properties b/spss/server/serverws/data/deploy/tomcat/uriworkermap.properties
new file mode 100644
index 000000000..673acf65d
--- /dev/null
+++ b/spss/server/serverws/data/deploy/tomcat/uriworkermap.properties
@@ -0,0 +1,4 @@
+# a sample mod_jk uriworkermap.properties file for mapping
+# MOA SP/SS web service requests to workers
+
+/moa-spss/*=moaworker \ No newline at end of file
diff --git a/spss/server/serverws/data/deploy/tomcat/win32/startTomcat.bat b/spss/server/serverws/data/deploy/tomcat/win32/startTomcat.bat
new file mode 100644
index 000000000..b7d740d12
--- /dev/null
+++ b/spss/server/serverws/data/deploy/tomcat/win32/startTomcat.bat
@@ -0,0 +1,27 @@
+rem ----------------------------------------------------------------------------------------------
+rem Modify these entries according to your needs
+
+rem JDK home directory (no trailing path separator)
+set JAVA_HOME=<jdk home directory>
+
+rem Tomcat 4.1.x home directory (no trailing path separator)
+set CATALINA_HOME=<Tomcat 4.1.x home directory>
+
+rem ----------------------------------------------------------------------------------------------
+
+set MOA_SPSS_CFG_HOME=%CATALINA_HOME%\conf\moa-spss
+
+set PARAM_SPSSCONFIG=-Dmoa.spss.server.configuration=%MOA_SPSS_CFG_HOME%\spss.config.xml
+set PARAM_LOGGING=-Dlog4j.configuration=file:%MOA_SPSS_CFG_HOME%\log4j.properties
+set PARAM_NODEID=-Dmoa.node-id=Node1
+set PARAMS_MOA=%PARAM_SPSSCONFIG% %PARAM_LOGGING% %PARAM_NODEID%
+
+rem set PARAM_TRUST_STORE=-Djavax.net.ssl.trustStore=truststore.jks
+rem set PARAM_TRUST_STORE_PASS=-Djavax.net.ssl.trustStorePassword=changeit
+rem set PARAM_TRUST_STORE_TYPE=-Djavax.net.ssl.trustStoreType=jks
+rem set PARAMS_SSL=%PARAM_TRUST_STORE% %PARAM_TRUST_STORE_PASS% %PARAM_TRUST_STORE_TYPE%
+
+set CATALINA_OPTS=%PARAMS_MOA% %PARAMS_SSL%
+
+cd %CATALINA_HOME%
+bin\catalina.bat start \ No newline at end of file
diff --git a/spss/server/serverws/data/deploy/tomcat/win32/stopTomcat.bat b/spss/server/serverws/data/deploy/tomcat/win32/stopTomcat.bat
new file mode 100644
index 000000000..09dd83f2d
--- /dev/null
+++ b/spss/server/serverws/data/deploy/tomcat/win32/stopTomcat.bat
@@ -0,0 +1,13 @@
+rem ----------------------------------------------------------------------------------------------
+rem Modify these entries according to your needs
+
+rem JDK home directory (no trailing path separator)
+set JAVA_HOME=<jdk home directory>
+
+rem Tomcat 4.1.x home directory (no trailing path separator)
+set CATALINA_HOME=<Tomcat 4.1.x home directory>
+
+rem ----------------------------------------------------------------------------------------------
+
+cd %CATALINA_HOME%
+bin\catalina.bat stop \ No newline at end of file
diff --git a/spss/server/serverws/data/deploy/tomcat/workers.properties b/spss/server/serverws/data/deploy/tomcat/workers.properties
new file mode 100644
index 000000000..9350ddc77
--- /dev/null
+++ b/spss/server/serverws/data/deploy/tomcat/workers.properties
@@ -0,0 +1,6 @@
+# a sample workers.properties file defining a single mod_jk worker
+
+worker.list=moaworker
+worker.moaworker.type=ajp13
+worker.moaworker.host=localhost
+worker.moaworker.port=8009
diff --git a/spss/server/serverws/data/deploy/tools/certtool.bat b/spss/server/serverws/data/deploy/tools/certtool.bat
new file mode 100644
index 000000000..0504211b8
--- /dev/null
+++ b/spss/server/serverws/data/deploy/tools/certtool.bat
@@ -0,0 +1,25 @@
+@echo off
+
+rem
+rem Script to invoke the CertTool class
+rem
+rem Author: Patrick Peck
+rem Version: $Id: certtool.bat,v 1.6 2003/05/08 11:46:29 peck Exp $
+rem
+
+
+if %OS%=="Windows_NT" @setlocal
+
+set CERTTOOL=at.gv.egovernment.moa.spss.server.tools.CertTool
+set TOOLSPATH=%~p0
+set CLASSPATH=%TOOLSPATH%tools.jar;%TOOLSPATH%iaik_moa_full.jar;%TOOLSPATH%iaik_jce_full.jar;%TOOLSPATH%iaik_ecc.jar;%TOOLSPATH%log4j-1.2.7.jar
+
+if "%JAVA_HOME%"=="" goto noJavaHome
+%JAVA_HOME%\bin\java.exe -classpath %CLASSPATH% %CERTTOOL% %1 %2 %3 %4 %5 %6 %7 %8 %9
+goto end
+
+:noJavaHome
+echo error: JAVA_HOME not defined
+
+:end
+if %OS%=="Windows_NT" @endlocal \ No newline at end of file
diff --git a/spss/server/serverws/data/deploy/tools/certtool.sh b/spss/server/serverws/data/deploy/tools/certtool.sh
new file mode 100644
index 000000000..c7ff374f4
--- /dev/null
+++ b/spss/server/serverws/data/deploy/tools/certtool.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+#
+# Script to invoke the CertTool class
+#
+# Author:Patrick Peck
+# Version: $Id: certtool.sh,v 1.9 2003/06/23 16:01:27 peck Exp $
+#
+
+
+if [ -z "$JAVA_HOME" ]; then
+ echo "error: JAVA_HOME not defined";
+ exit;
+fi
+
+CERTOOL=at.gv.egovernment.moa.spss.server.tools.CertTool
+TOOLSPATH=`dirname $PWD/$0`
+CLASSPATH=$TOOLSPATH/tools.jar:$TOOLSPATH/iaik_moa_full.jar:$TOOLSPATH/iaik_jce_full.jar:$TOOLSPATH/iaik_ecc.jar:$TOOLSPATH/log4j-1.2.7.jar
+
+$JAVA_HOME/bin/java -classpath $CLASSPATH $CERTOOL $*
diff --git a/spss/server/serverws/data/deploy/tools/configtool.bat b/spss/server/serverws/data/deploy/tools/configtool.bat
new file mode 100644
index 000000000..868df11f0
--- /dev/null
+++ b/spss/server/serverws/data/deploy/tools/configtool.bat
@@ -0,0 +1,25 @@
+@echo off
+
+rem
+rem Script to invoke the ConfigTool class
+rem
+rem Author: Gregor Karlinger
+rem Version: $Id: $
+rem
+
+
+if %OS%=="Windows_NT" @setlocal
+
+set CONFIGTOOL=at.gv.egovernment.moa.spss.server.tools.ConfigTool
+set TOOLSPATH=%~p0
+set CLASSPATH=%TOOLSPATH%tools.jar;%TOOLSPATH%xalan.jar;
+
+if "%JAVA_HOME%"=="" goto noJavaHome
+%JAVA_HOME%\bin\java.exe -classpath %CLASSPATH% %CONFIGTOOL% %1 %2 %3 %4 %5 %6 %7 %8 %9
+goto end
+
+:noJavaHome
+echo error: JAVA_HOME not defined
+
+:end
+if %OS%=="Windows_NT" @endlocal \ No newline at end of file
diff --git a/spss/server/serverws/data/deploy/tools/configtool.sh b/spss/server/serverws/data/deploy/tools/configtool.sh
new file mode 100644
index 000000000..f7f29bae1
--- /dev/null
+++ b/spss/server/serverws/data/deploy/tools/configtool.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+#
+# Script to invoke the ConfigTool class
+#
+# Author: Gregor Karlinger
+# Version: $Id: $
+#
+
+
+if [ -z "$JAVA_HOME" ]; then
+ echo "error: JAVA_HOME not defined";
+ exit;
+fi
+
+CONFIGTOOL=at.gv.egovernment.moa.spss.server.tools.ConfigTool
+TOOLSPATH=`dirname $PWD/$0`
+CLASSPATH=$TOOLSPATH/tools.jar:$TOOLSPATH/xalan.jar
+
+$JAVA_HOME/bin/java -classpath $CLASSPATH $CONFIGTOOL $*
diff --git a/spss/server/serverws/pom.xml b/spss/server/serverws/pom.xml
new file mode 100644
index 000000000..6ba951610
--- /dev/null
+++ b/spss/server/serverws/pom.xml
@@ -0,0 +1,124 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>MOA.spss</groupId>
+ <artifactId>moa-spss</artifactId>
+ <version>1.5.x</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>MOA.spss.server</groupId>
+ <artifactId>moa-spss-ws</artifactId>
+ <packaging>war</packaging>
+ <version>1.5.0</version>
+ <name>MOA SP/SS WebService</name>
+
+ <properties>
+ <repositoryPath>${basedir}/../../../repository</repositoryPath>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <archive>
+ <manifest>
+ <addDefaultSpecificationEntries>false</addDefaultSpecificationEntries>
+ <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+ </manifest>
+ <addMavenDescriptor>false</addMavenDescriptor>
+ </archive>
+ <warName>moa-spss</warName>
+ <webResources>
+ <resource>
+ <directory>${basedir}/resources/wsdl</directory>
+ <targetPath>resources/schemas</targetPath>
+ <includes>
+ <inclulde>*.xsd</inclulde>
+ </includes>
+ </resource>
+ <resource>
+ <directory>${basedir}/../../handbook</directory>
+ <targetPath>WEB-INF</targetPath>
+ <includes>
+ <include>conf/**</include>
+ </includes>
+ </resource>
+ </webResources>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>MOA.spss.server</groupId>
+ <artifactId>moa-spss-lib</artifactId>
+ <!--version>${pom.version}</version-->
+ </dependency>
+ <dependency>
+ <groupId>MOA</groupId>
+ <artifactId>moa-common</artifactId>
+ </dependency>
+ <!-- transitive dependencies we don't want to include into the war -->
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_jce_full</artifactId>
+ <!-- should be in the ext directory of the jre -->
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_ecc</artifactId>
+ <!-- should be in the ext directory of the jre -->
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Provider</artifactId>
+ <!-- should be in the ext directory of the jre -->
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Wrapper</artifactId>
+ <!-- should be in the ext directory of the jre -->
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_Pkcs11Wrapper</artifactId>
+ <classifier>win32</classifier>
+ <type>dll</type>
+ <!-- should be in the ext directory of the jre -->
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>xalan</artifactId>
+ <!-- should be provided by the container or jre -->
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <!-- should be provided by the container or jre -->
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>xml-apis</artifactId>
+ <!-- should be provided by the container or jre -->
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>serializer</artifactId>
+ <!-- should be provided by the container or jre -->
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/spss/server/serverws/resources/properties/spss_messages_de.properties b/spss/server/serverws/resources/properties/spss_messages_de.properties
new file mode 100644
index 000000000..a42b0fcea
--- /dev/null
+++ b/spss/server/serverws/resources/properties/spss_messages_de.properties
@@ -0,0 +1,151 @@
+# This file contains exception messages in the standard Java properties
+# format. The messages may contain formatting patterns as definied in the
+# java.text.MessageFormat class.
+
+#
+# Error messages: the key corresponds to the error code
+#
+
+1100=Fehler beim Validieren der Anfrage: {0}
+1101=Bei enveloping Datenobjekten muss entweder Content oder Reference übergeben werden
+1102=Bei detached Datenobjekten darf das Attribut Reference nicht leer sein
+1103=Ungültiger Wert für Attribut Structure im Element DataObjectInfo: {0}
+1104=Ungültiger Wert für DateTime: {0}
+1105=Ungültiger Wert für Attribut Index in Element CreateSignatureLocation: {0}
+1106=Interner Fehler beim Parsen der XML-Daten
+1107=Kein Kind-Element im Element XMLContent gefunden
+1108=Ungültiger Wert für dsig:Algorithm: {0}
+1109=XMLContent darf nur ein Kind-Element enthalten
+1110=Entweder Content oder Reference muss gesetzt sein
+1111=Reference muss gesetzt sein, wenn kein Content angegeben ist
+1112=Bei leerer Reference muss CreateSignatureEnvironment vorhanden sein
+1113=Der Endpunkt akzeptiert keine Anfragen vom Typ: {0}
+
+2200=Fehler beim Erzeugen der Antwort
+2201=Transformations-Algorithmus unbekannt: {0}
+2202=Kein XPath-Element für XPath-Transformation gefunden
+2203=TrustProfileID unbekannt: {0}
+2207=Ungültiges URI-Format: {0}
+2208=Fehler beim Öffnen des Datenobjekts (URI={0})
+2209=Fehler beim Parsen der XML-Daten
+2210=Fehler beim Lesen des Datenobjekts
+2211=Referenzierte Daten können nicht als XML interpretiert werden (URI={0})
+2212=Fehler beim Auswerten des XPath-Ausdrucks: {0}
+2213=Zugriff auf das Dateisystem verweigert (URI={0})
+2214=Ungültiges URL-Format: {0}
+2215=Kein Stylesheet für XSLT-Transformation gefunden
+2216=Kein XPath-Filter2 Element für XPath-Filter2-Transform gefunden
+2217=Kein InclusiveNamespaces Element für Exclusive Canonicalization Transform gefunden
+2218=Das Signature Environment enthält keine validen XML-Daten
+2219=Fehler beim Lesen des Signature Environment
+2220=Allgemeiner Fehler beim Erzeugen der Signatur [{0}]
+2221=Fehler bei der Behandlung des Schlüssels [{0}]
+2222=Fehler beim Erstellen des Manifests [{0}]
+2223=Fehler beim Erstellen der Referenz [{0}]
+2224=Hashwert nicht verfügbar [{0}]
+2225=Signier-Algorithmus wird nicht unterstützt [{0}]
+2226=Fehler beim Einbetten der Signatur [{0}]
+2227=Fehler beim Berechnen des Signaturwertes [{0}]
+2228=Fehler beim Behandeln der SignedProperties [{0}]
+2229=Signator-Zertifikat nicht verfügbar [{0}]
+2230=Fehler beim Auflösen eines Supplements [{0}]
+2231=Die Schlüsselgruppe ist nicht verfügbar
+2232=Die Schlüsselgruppe ist leer
+2233=Fehler beim Durchführen der Transformation [{0}]
+2234=CreateTransformsInfoProfileID nicht vorhanden (ID={0})
+2235=CreateSignatureEnvironment muss entweder Reference oder Content enthalten
+2236=CreateSignatureEnvironmentProfileID nicht vorhanden (ID={0})
+2237=Fehler beim Auflösen der internen Referenz (URI={0})
+2238=Fehler beim Auflösen des Transformationsparameters (URI={0})
+2240=Allgemeiner Fehler beim Verifizieren der Signatur [{0}]
+2241=Algorithmus wird nicht unterstützt [{0}]
+2242=Fehler beim Parsen der CMS Signatur [{0}]
+2243=Signator-Zertifikat nicht verfügbar [{0}]
+2244=Fehler beim Lesen der Signatur-Daten
+2245=Fehler beim Codieren des Signator-Zertifikats
+2246=Fehler beim Umwandeln des SubjectDN des Signator-Zertifikats nach RFC2253: {0}
+2247=Allgemeiner Fehler beim Verifizieren der Signatur [{0}]
+2248=Fehler beim Vorbereiten der Daten [{0}]
+2249=Das Attribut Signatories enthält einen ungültigen Index (Index={0})
+2262=Fehler beim Behandeln des Manifests [{0}]
+2263=Fehler beim Parsen der Properties [{0}]
+2264=Fehler beim Behandeln der Referenz [{0}]
+2265=Fehler beim Durchführen der Transformation [{0}]
+2266=Signatur ist kein dsig:Signature-Element
+2267=SupplementProfileID nicht vorhanden (ID={0})
+2268=VerifyTransformsInfoProfileID nicht vorhanden (ID={0})
+2269=Fehler beim Parsen der Transformation [{0}]
+2270=Fehler beim Decodieren des Hash-Wertes
+2271=Falsche Anzahl an ReferenceInfo Elementen in SignatureManfestCheckParams
+2280=Die Angabe XMLContent wird derzeit nicht unterstützt
+2281=XML-Supplement kann nicht serialisiert werden (Reference="{0}")
+2282=Datenobjekt mit der URI={0} wurde dem Request nicht bereit gestellt
+
+
+2900=Interner Server-Fehler
+
+3201=Objekt kann nicht geladen werden (Reference="{0}", LocRef-URI="{1}")
+3202=Supplement für Signaturumgebung kann nicht geladen werden (Reference="{0}", LocRef-URI="{1}")
+3203=Signaturumgebung kann nicht geladen werden (Reference="{0}", LocRef-URI="{1}")
+
+9900=Nicht klassifizierter Fehler in Subsystem
+9901=Nicht klassifizierter Laufzeitfehler in Subsystem
+9999=Nicht klassifizierter Fehler
+
+
+#
+# Server internal messages
+#
+
+init.00=Fehler beim Lesen der MOA SP/SS Konfiguration: das Service steht nicht zur Verfügung
+init.01=MOA SP/SS Konfiguration erfolgreich geladen
+init.02=Fehler beim Löschen der Archivdaten
+init.03=Fehler beim Aktivieren des IAIK-JCE/JSSE/JDK1.3 Workaround: SSL ist möglicherweise nicht verfügbar
+init.04=Fehler beim Initialisieren des Schema Pools
+
+config.00=Fehler beim Erstellen des KeyGroupMapping: KeyGroup mit id={0} unbekannt - die Erstellung des KeyGroupMapping wird fortgeführt
+config.01=Fehler in der Konfiguration: Wert für maximale Archivierungsdauer von Widerrufsinformationen (ArchiveDuration) nicht konfiguriert oder ungültig
+config.02=Fehler in der Konfiguration: {0} mit id={1}: falscher Profiltyp in Datei {2}
+config.03=Fehler in der Konfiguration: {0} mit id={1} konnte nicht geladen werden
+config.04=Fehler in der Konfiguration: {0} mit id={1} existiert bereits
+config.05=Umgebungsvariable {0} nicht gesetzt: benutze Default-Konfiguration
+config.06=Die MOA SP/SS Konfiguration wurde erfolgreich aktualisiert.
+config.07=Fehler in der Konfiguration: Reason code {0} unbekannt
+config.08=Fehler beim Konfigurieren der IAIK-Module
+config.09=Fehler beim Öffnen der Schlüssel-Datei {0}
+config.10=Fehler beim Einlesen der Konfiguration (siehe Log-Datei für Details)
+config.11=Fehler beim Erstellen der Konfiguration (siehe Log-Datei für Details)
+config.12=Fehler beim Einlesen des Profils
+config.13=Fehler beim Erstellen des CRLDistributionPoint: CAIssuerDN={0} ungültig
+config.14=Das Attribut {0} für das TrustProfile mit id={1} ist ungültig (Wert={2})
+config.15=Fehler beim Erstellen des TrustProfile id={0}: Name des Konfigurations-Verzeichnisses konnte nicht in eine URL umgewandet werden
+config.16=Fehler beim Erstellen von X509IssuerSerial (IssuerName={0}, SerialNumber={1})
+config.17=DigestAlgorithmName unbekannt (AlgorithmName={0})
+config.18=Lade Keystore: {0}
+config.19=Key ID={0}
+config.20=Fehler beim Aktualisieren der MOA SP/SS Konfiguration. Die bestehende Konfiguration wird beibehalten
+config.21=Lade Konfiguration von {0}
+config.22=Lade {0} mit id={1} von Datei {2}
+config.23=MOA SP/SS Konfiguration: {0} nicht gesetzt oder ungültiger Wert, verwende den Default-Wert: {1}
+config.25=Fehler in der Konfiguration: Das SoftwareKeyModule mit id={0} konnte nicht geladen werden, da die Datei {1} nicht existiert oder ein Verzeichnis bezeichnet
+config.26=Fehler beim Erstellen der KeyGroup mit id={0}: KeyModule mit id={1} unbekannt
+config.27=Fehler in der Konfiguration: Das Attribut {0} des TrustProfiles mit id={1} zeigt nicht auf ein existierendes Verzeichnis
+config.28=Einen detaillierten Fehlerbericht entnehmen Sie bitte der Log-Datei.
+config.29=Es sind folgende leichte Fehler aufgetreten:
+config.31=Fehler in der Konfiguration der KeyGroup mit id={0}: Der Schlüssel im KeyModule id={1} mit IssuerName={2} und SerialNumber={3} konnte nicht geladen werden
+config.32=Fehler in der Konfiguration: Verzeichnisangabe für den Zertifikatsspeicher ist ungültig ({0}).
+
+
+handler.00=Starte neue Transaktion: TID={0}, Service={1}
+handler.01=Aufruf von Adresse={0}
+handler.02=Client-Zertifikat: Subject={0}, Serial={1}, Issuer={2}
+handler.03=Client-Zertifikat nicht verfügbar
+handler.04=Anfrage erfolgreich abgearbeitet
+handler.05=Fehler beim Abarbeiten der Anfrage
+handler.06=SOAP Attachment mit der id={0} für Request hinterlegt (MIME Type des Attachments={1})
+handler.07=SOAP Request empfangen: Request={0}
+
+invoker.00=Das Signature Environment konnte nicht validierend geparst werden
+invoker.01=Keine passende Transformationskette gefunden (Index={0})
+invoker.02=Der Hashwert der Transformation stimmt nicht überein (Index={0})
+invoker.03=Signatorzertifikat aus Trustprofile mit id={0} konnte nicht geparst werden (Dateiname={1})
diff --git a/spss/server/serverws/resources/security/cacerts b/spss/server/serverws/resources/security/cacerts
new file mode 100644
index 000000000..6eeaba418
--- /dev/null
+++ b/spss/server/serverws/resources/security/cacerts
Binary files differ
diff --git a/spss/server/serverws/resources/wsdl/MOA-SPSS-1.3.wsdl b/spss/server/serverws/resources/wsdl/MOA-SPSS-1.3.wsdl
new file mode 100644
index 000000000..68c3d0ebd
--- /dev/null
+++ b/spss/server/serverws/resources/wsdl/MOA-SPSS-1.3.wsdl
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Web Service Description for MOA SP/SS 1.4
+-->
+<definitions name="MOA" targetNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:moa="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <import namespace="http://reference.e-government.gv.at/namespace/moa/20020822#" location="MOA-SPSS-1.3.xsd"/>
+ <message name="CreateXMLSignatureInput">
+ <part name="body" element="moa:CreateXMLSignatureRequest"/>
+ </message>
+ <message name="CreateXMLSignatureOutput">
+ <part name="body" element="moa:CreateXMLSignatureResponse"/>
+ </message>
+ <message name="VerifyCMSSignatureInput">
+ <part name="body" element="moa:VerifyCMSSignatureRequest"/>
+ </message>
+ <message name="VerifyCMSSignatureOutput">
+ <part name="body" element="moa:VerifyCMSSignatureResponse"/>
+ </message>
+ <message name="VerifyXMLSignatureInput">
+ <part name="body" element="moa:VerifyXMLSignatureRequest"/>
+ </message>
+ <message name="VerifyXMLSignatureOutput">
+ <part name="body" element="moa:VerifyXMLSignatureResponse"/>
+ </message>
+ <message name="MOAFault">
+ <part name="body" element="moa:ErrorResponse"/>
+ </message>
+ <portType name="SignatureCreationPortType">
+ <operation name="createXMLSignature">
+ <input message="tns:CreateXMLSignatureInput"/>
+ <output message="tns:CreateXMLSignatureOutput"/>
+ <fault name="MOAFault" message="tns:MOAFault"/>
+ </operation>
+ </portType>
+ <portType name="SignatureVerificationPortType">
+ <operation name="verifyCMSSignature">
+ <input message="tns:VerifyCMSSignatureInput"/>
+ <output message="tns:VerifyCMSSignatureOutput"/>
+ <fault name="MOAFault" message="tns:MOAFault"/>
+ </operation>
+ <operation name="verifyXMLSignature">
+ <input message="tns:VerifyXMLSignatureInput"/>
+ <output message="tns:VerifyXMLSignatureOutput"/>
+ <fault name="MOAFault" message="tns:MOAFault"/>
+ </operation>
+ </portType>
+ <binding name="SignatureCreationBinding" type="tns:SignatureCreationPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="createXMLSignature">
+ <soap:operation soapAction="urn:CreateXMLSignatureAction"/>
+ <input>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </output>
+ <fault name="MOAFault">
+ <soap:fault use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </fault>
+ </operation>
+ </binding>
+ <binding name="SignatureVerificationBinding" type="tns:SignatureVerificationPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="verifyCMSSignature">
+ <soap:operation soapAction="urn:VerifyCMSSignatureAction"/>
+ <input>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </output>
+ <fault name="MOAFault">
+ <soap:fault use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </fault>
+ </operation>
+ <operation name="verifyXMLSignature">
+ <soap:operation soapAction="urn:VerifyXMLSignatureAction"/>
+ <input>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </output>
+ <fault name="MOAFault">
+ <soap:fault use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </fault>
+ </operation>
+ </binding>
+ <service name="SignatureCreationService">
+ <port name="SignatureCreationPort" binding="tns:SignatureCreationBinding">
+ <!--
+ Please note that the location URL must be adapted to the actual service URL.
+ <soap:address location="http://localhost/moa-spss/services/SignatureCreation"/>
+ -->
+ </port>
+ </service>
+ <service name="SignatureVerificationService">
+ <port name="SignatureVerificationPort" binding="tns:SignatureVerificationBinding">
+ <!--
+ Please note that the location URL must be adapted to the actual service URL.
+ <soap:address location="http://localhost/moa-spss/services/SignatureVerification"/>
+ -->
+ </port>
+ </service>
+</definitions>
diff --git a/spss/server/serverws/resources/wsdl/MOA-SPSS-1.3.xsd b/spss/server/serverws/resources/wsdl/MOA-SPSS-1.3.xsd
new file mode 100644
index 000000000..756b51279
--- /dev/null
+++ b/spss/server/serverws/resources/wsdl/MOA-SPSS-1.3.xsd
@@ -0,0 +1,469 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ MOA SP/SS 1.3 Schema
+-->
+<xsd:schema targetNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#">
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+ <!--########## Create XML Signature ###-->
+ <!--### Create XML Signature Request ###-->
+ <xsd:element name="CreateXMLSignatureRequest">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="CreateXMLSignatureRequestType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:complexType name="CreateXMLSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="KeyIdentifier" type="KeyIdentifierType"/>
+ <xsd:element name="SingleSignatureInfo" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Ermöglichung der Stapelsignatur durch wiederholte Angabe dieses Elements</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="DataObjectInfo" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="DataObjectInfoType">
+ <xsd:attribute name="ChildOfManifest" type="xsd:boolean" use="optional" default="false"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="CreateSignatureInfo" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="CreateSignatureEnvironment" type="ContentOptionalRefType"/>
+ <xsd:choice>
+ <xsd:annotation>
+ <xsd:documentation>Auswahl: Entweder explizite Angabe des Signaturorts sowie ggf. sinnvoller Supplements im Zshg. mit der Signaturumgebung, oder Verweis auf ein benanntes Profil</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element ref="CreateSignatureEnvironmentProfile"/>
+ <xsd:element name="CreateSignatureEnvironmentProfileID" type="ProfileIdentifierType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="SecurityLayerConformity" type="xsd:boolean" use="optional" default="true"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Create XML Signature Response ###-->
+ <xsd:complexType name="CreateXMLSignatureResponseType">
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Kardinalität 1..oo erlaubt die Antwort auf eine Stapelsignatur-Anfrage</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element name="SignatureEnvironment">
+ <xsd:annotation>
+ <xsd:documentation>Resultat, falls die Signaturerstellung erfolgreich war</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="lax"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element ref="ErrorResponse"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:element name="CreateXMLSignatureResponse" type="CreateXMLSignatureResponseType"/>
+ <!--########## Verify CMS Signature ###-->
+ <!--### Verifiy CMS Signature Request ###-->
+ <xsd:element name="VerifyCMSSignatureRequest">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="VerifyCMSSignatureRequestType">
+ <xsd:attribute name="Signatories" type="SignatoriesType" use="optional" default="1"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:complexType name="VerifyCMSSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="DateTime" type="xsd:dateTime" minOccurs="0"/>
+ <xsd:element name="CMSSignature" type="xsd:base64Binary"/>
+ <xsd:element name="DataObject" type="CMSDataObjectOptionalMetaType" minOccurs="0"/>
+ <xsd:element name="TrustProfileID" type="xsd:token">
+ <xsd:annotation>
+ <xsd:documentation>mit diesem Profil wird eine Menge von vertrauenswürdigen Wurzelzertifikaten spezifiziert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Verify CMS Signature Response ###-->
+ <xsd:element name="VerifyCMSSignatureResponse" type="VerifyCMSSignatureResponseType"/>
+ <xsd:complexType name="VerifyCMSSignatureResponseType">
+ <xsd:sequence maxOccurs="unbounded">
+ <xsd:element name="SignerInfo" type="dsig:KeyInfoType">
+ <xsd:annotation>
+ <xsd:documentation>only ds:X509Data and RetrievalMethod is supported; QualifiedCertificate is included as X509Data/any;publicAuthority is included as X509Data/any</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="SignatureCheck" type="CheckResultType"/>
+ <xsd:element name="CertificateCheck" type="CheckResultType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--########## Verify XML Signature ###-->
+ <!--### Verify XML Signature Request ###-->
+ <xsd:element name="VerifyXMLSignatureRequest" type="VerifyXMLSignatureRequestType"/>
+ <xsd:complexType name="VerifyXMLSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="DateTime" type="xsd:dateTime" minOccurs="0"/>
+ <xsd:element name="VerifySignatureInfo">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="VerifySignatureEnvironment" type="ContentOptionalRefType"/>
+ <xsd:element name="VerifySignatureLocation" type="xsd:token"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element ref="SupplementProfile"/>
+ <xsd:element name="SupplementProfileID" type="xsd:string"/>
+ </xsd:choice>
+ <xsd:element name="SignatureManifestCheckParams" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ReferenceInfo" type="VerifyTransformsDataType" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Pro dsig:Reference-Element in der zu überprüfenden XML-Signatur muss hier ein ReferenceInfo-Element erscheinen. Die Reihenfolge der einzelnen ReferenceInfo Elemente entspricht jener der dsig:Reference Elemente in der XML-Signatur.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="ReturnReferenceInputData" type="xsd:boolean" use="optional" default="true"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ReturnHashInputData" minOccurs="0"/>
+ <xsd:element name="TrustProfileID" type="xsd:token">
+ <xsd:annotation>
+ <xsd:documentation>mit diesem Profil wird eine Menge von vertrauenswürdigen Wurzelzertifikaten spezifiziert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Verify XML Signature Response ###-->
+ <xsd:element name="VerifyXMLSignatureResponse" type="VerifyXMLSignatureResponseType"/>
+ <xsd:complexType name="VerifyXMLSignatureResponseType">
+ <xsd:sequence>
+ <xsd:element name="SignerInfo" type="dsig:KeyInfoType">
+ <xsd:annotation>
+ <xsd:documentation>only ds:X509Data and ds:RetrievalMethod is supported; QualifiedCertificate is included as X509Data/any; PublicAuthority is included as X509Data/any</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="HashInputData" type="InputDataType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="ReferenceInputData" type="InputDataType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="SignatureCheck" type="ReferencesCheckResultType"/>
+ <xsd:element name="SignatureManifestCheck" type="ReferencesCheckResultType" minOccurs="0"/>
+ <xsd:element name="XMLDSIGManifestCheck" type="ManifestRefsCheckResultType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="CertificateCheck" type="CheckResultType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:simpleType name="ProfileIdentifierType">
+ <xsd:restriction base="xsd:token"/>
+ </xsd:simpleType>
+ <xsd:complexType name="InputDataType">
+ <xsd:complexContent>
+ <xsd:extension base="ContentExLocRefBaseType">
+ <xsd:attribute name="PartOf" use="optional" default="SignedInfo">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="SignedInfo"/>
+ <xsd:enumeration value="XMLDSIGManifest"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="ReferringSigReference" type="xsd:nonNegativeInteger" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="MetaInfoType">
+ <xsd:sequence>
+ <xsd:element name="MimeType" type="MimeTypeType"/>
+ <xsd:element name="Description" type="xsd:anyURI" minOccurs="0"/>
+ <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="FinalDataMetaInfoType">
+ <xsd:complexContent>
+ <xsd:extension base="MetaInfoType">
+ <xsd:sequence>
+ <xsd:element name="Type" type="xsd:anyURI" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="DataObjectInfoType">
+ <xsd:sequence>
+ <xsd:element name="DataObject">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="ContentOptionalRefType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:choice>
+ <xsd:annotation>
+ <xsd:documentation>Auswahl: Entweder explizite Angabe EINER Transformationskette inklusive ggf. sinnvoller Supplements oder Verweis auf ein benanntes Profil</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element ref="CreateTransformsInfoProfile"/>
+ <xsd:element name="CreateTransformsInfoProfileID" type="ProfileIdentifierType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ <xsd:attribute name="Structure" use="required">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="detached"/>
+ <xsd:enumeration value="enveloping"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ </xsd:complexType>
+ <xsd:complexType name="TransformsInfoType">
+ <xsd:sequence>
+ <xsd:element ref="dsig:Transforms" minOccurs="0"/>
+ <xsd:element name="FinalDataMetaInfo" type="FinalDataMetaInfoType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="XMLDataObjectAssociationType">
+ <xsd:sequence>
+ <xsd:element name="MetaInfo" type="MetaInfoType" minOccurs="0"/>
+ <xsd:element name="Content" type="ContentRequiredRefType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CMSDataObjectOptionalMetaType">
+ <xsd:sequence>
+ <xsd:element name="MetaInfo" type="MetaInfoType" minOccurs="0"/>
+ <xsd:element name="Content" type="CMSContentBaseType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CMSContentBaseType">
+ <xsd:complexContent>
+ <xsd:restriction base="ContentOptionalRefType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ </xsd:choice>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="AnyChildrenType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ReferencesCheckResultType">
+ <xsd:complexContent>
+ <xsd:restriction base="CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="ReferencesCheckResultInfoType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ReferencesCheckResultInfoType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:restriction base="AnyChildrenType">
+ <xsd:sequence>
+ <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="FailedReference" type="xsd:positiveInteger" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ManifestRefsCheckResultType">
+ <xsd:complexContent>
+ <xsd:restriction base="CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="ManifestRefsCheckResultInfoType"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ManifestRefsCheckResultInfoType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:restriction base="AnyChildrenType">
+ <xsd:sequence>
+ <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="FailedReference" type="xsd:positiveInteger" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="ReferringSigReference" type="xsd:positiveInteger"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <!--########## Error Response ###-->
+ <xsd:element name="ErrorResponse" type="ErrorResponseType">
+ <xsd:annotation>
+ <xsd:documentation>Resultat, falls die Signaturerstellung gescheitert ist</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:complexType name="ErrorResponseType">
+ <xsd:sequence>
+ <xsd:element name="ErrorCode" type="xsd:integer"/>
+ <xsd:element name="Info" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--########## Auxiliary Types ###-->
+ <xsd:simpleType name="KeyIdentifierType">
+ <xsd:restriction base="xsd:string"/>
+ </xsd:simpleType>
+ <xsd:simpleType name="KeyStorageType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="Software"/>
+ <xsd:enumeration value="Hardware"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="MimeTypeType">
+ <xsd:restriction base="xsd:token"/>
+ </xsd:simpleType>
+ <xsd:complexType name="AnyChildrenType" mixed="true">
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="XMLContentType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:extension base="AnyChildrenType">
+ <xsd:attribute ref="xml:space" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ContentBaseType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ <xsd:element name="LocRefContent" type="xsd:anyURI"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:complexType name="ContentExLocRefBaseType">
+ <xsd:complexContent>
+ <xsd:restriction base="ContentBaseType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ </xsd:choice>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ContentOptionalRefType">
+ <xsd:complexContent>
+ <xsd:extension base="ContentBaseType">
+ <xsd:attribute name="Reference" type="xsd:anyURI" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ContentRequiredRefType">
+ <xsd:complexContent>
+ <xsd:restriction base="ContentOptionalRefType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ <xsd:element name="LocRefContent" type="xsd:anyURI"/>
+ </xsd:choice>
+ <xsd:attribute name="Reference" type="xsd:anyURI" use="required"/>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="VerifyTransformsDataType">
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Ein oder mehrere Transformationswege können von der Applikation an MOA mitgeteilt werden. Die zu prüfende Signatur hat zumindest einem dieser Transformationswege zu entsprechen. Die Angabe kann explizit oder als Profilbezeichner erfolgen.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element ref="VerifyTransformsInfoProfile"/>
+ <xsd:element name="VerifyTransformsInfoProfileID" type="xsd:string">
+ <xsd:annotation>
+ <xsd:documentation>Profilbezeichner für einen Transformationsweg</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:element name="QualifiedCertificate"/>
+ <xsd:element name="PublicAuthority" type="PublicAuthorityType"/>
+ <xsd:complexType name="PublicAuthorityType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:string" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:simpleType name="SignatoriesType">
+ <xsd:union memberTypes="AllSignatoriesType">
+ <xsd:simpleType>
+ <xsd:list itemType="xsd:positiveInteger"/>
+ </xsd:simpleType>
+ </xsd:union>
+ </xsd:simpleType>
+ <xsd:simpleType name="AllSignatoriesType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="all"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:complexType name="CreateSignatureLocationType">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:token">
+ <xsd:attribute name="Index" type="xsd:integer" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ <xsd:complexType name="TransformParameterType">
+ <xsd:choice minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Die Angabe des Transformationsparameters (explizit oder als Hashwert) kann unterlassen werden, wenn die Applikation von der Unveränderlichkeit des Inhalts der in "Transformationsparamter", Attribut "URI" angegebenen URI ausgehen kann.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element name="Base64Content" type="xsd:base64Binary">
+ <xsd:annotation>
+ <xsd:documentation>Der Transformationsparameter explizit angegeben.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="Hash">
+ <xsd:annotation>
+ <xsd:documentation>Der Hashwert des Transformationsparameters.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="dsig:DigestMethod"/>
+ <xsd:element ref="dsig:DigestValue"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ <xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:element name="CreateSignatureEnvironmentProfile">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="CreateSignatureLocation" type="CreateSignatureLocationType"/>
+ <xsd:element name="Supplement" type="XMLDataObjectAssociationType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="VerifyTransformsInfoProfile">
+ <xsd:annotation>
+ <xsd:documentation>Explizite Angabe des Transformationswegs</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="dsig:Transforms" minOccurs="0"/>
+ <xsd:element name="TransformParameter" type="TransformParameterType" minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Alle impliziten Transformationsparameter, die zum Durchlaufen der oben angeführten Transformationskette bekannt sein müssen, müssen hier angeführt werden. Das Attribut "URI" bezeichnet den Transformationsparameter in exakt jener Weise, wie er in der zu überprüfenden Signatur gebraucht wird.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Supplement" type="XMLDataObjectAssociationType"/>
+ <xsd:element name="SupplementProfile" type="XMLDataObjectAssociationType"/>
+ <xsd:element name="CreateTransformsInfoProfile">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="CreateTransformsInfo" type="TransformsInfoType"/>
+ <xsd:element ref="Supplement" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+</xsd:schema>
diff --git a/spss/server/serverws/spec/MOA-SPSS-1.3.doc b/spss/server/serverws/spec/MOA-SPSS-1.3.doc
new file mode 100644
index 000000000..fabc4248e
--- /dev/null
+++ b/spss/server/serverws/spec/MOA-SPSS-1.3.doc
Binary files differ
diff --git a/spss/server/serverws/src/main/webapp/META-INF/MANIFEST.MF b/spss/server/serverws/src/main/webapp/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..5e9495128
--- /dev/null
+++ b/spss/server/serverws/src/main/webapp/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
diff --git a/spss/server/serverws/src/main/webapp/WEB-INF/server-config.wsdd b/spss/server/serverws/src/main/webapp/WEB-INF/server-config.wsdd
new file mode 100644
index 000000000..088fe76fd
--- /dev/null
+++ b/spss/server/serverws/src/main/webapp/WEB-INF/server-config.wsdd
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Axis Deployment Descriptor for MOA SP/SS 1.4
+-->
+<deployment name="defaultClientConfig"
+ xmlns="http://xml.apache.org/axis/wsdd/"
+ xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
+ xmlns:handler="http://xml.apache.org/axis/wsdd/providers/handler">
+
+ <handler name="URLMapper" type="java:org.apache.axis.handlers.http.URLMapper"/>
+ <handler name="MsgDispatcher" type="java:org.apache.axis.providers.java.MsgProvider"/>
+ <handler name="HTTPAuthHandler" type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
+ <handler name="MOAHandler" type="java:at.gv.egovernment.moa.spss.server.service.AxisHandler"/>
+
+ <service name="SignatureCreation" provider="java:MSG">
+ <namespace>http://reference.e-government.gv.at/namespace/moa/20020822#</namespace>
+ <parameter name="allowedMethods" value="CreateXMLSignatureRequest"/>
+ <parameter name="className" value="at.gv.egovernment.moa.spss.server.service.SignatureCreationService"/>
+ <wsdlFile>/resources/wsdl/MOA-SPSS-1.3.wsdl</wsdlFile>
+ <requestFlow>
+ <handler type="MOAHandler"/>
+ </requestFlow>
+ <responseFlow>
+ <handler type="MOAHandler"/>
+ </responseFlow>
+ </service>
+
+ <service name="SignatureVerification" provider="java:MSG">
+ <namespace>http://reference.e-government.gv.at/namespace/moa/20020822#</namespace>
+ <parameter name="allowedMethods" value="VerifyCMSSignatureRequest VerifyXMLSignatureRequest"/>
+ <parameter name="className" value="at.gv.egovernment.moa.spss.server.service.SignatureVerificationService"/>
+ <wsdlFile>/resources/wsdl/MOA-SPSS-1.3.wsdl</wsdlFile>
+ <requestFlow>
+ <handler type="MOAHandler"/>
+ </requestFlow>
+ <responseFlow>
+ <handler type="MOAHandler"/>
+ </responseFlow>
+ </service>
+
+ <transport name="http">
+ <requestFlow>
+ <handler type="URLMapper"/>
+ <handler type="HTTPAuthHandler"/>
+ </requestFlow>
+ </transport>
+
+</deployment>
diff --git a/spss/server/serverws/src/main/webapp/WEB-INF/web.xml b/spss/server/serverws/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 000000000..b68ee850e
--- /dev/null
+++ b/spss/server/serverws/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE web-app
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+ <display-name>MOA SP-SS</display-name>
+ <description>MOA Signature Creation and Verification Services</description>
+ <servlet>
+ <servlet-name>ConfigurationServlet</servlet-name>
+ <display-name>MOA Configuration Servlet</display-name>
+ <servlet-class>
+ at.gv.egovernment.moa.spss.server.service.ConfigurationServlet
+ </servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet>
+ <servlet-name>AxisServlet</servlet-name>
+ <display-name>Apache-Axis Servlet</display-name>
+ <servlet-class>
+ org.apache.axis.transport.http.AxisServlet
+ </servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>AxisServlet</servlet-name>
+ <url-pattern>/services/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>ConfigurationServlet</servlet-name>
+ <url-pattern>/ConfigurationUpdate</url-pattern>
+ </servlet-mapping>
+
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>ConfigurationUpdate</web-resource-name>
+ <url-pattern>/ConfigurationUpdate</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>moa-admin</role-name>
+ </auth-constraint>
+ </security-constraint>
+
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ <realm-name>UserDatabase</realm-name>
+ </login-config>
+
+ <security-role>
+ <description>
+ The role that is required to log in to the moa Application
+ </description>
+ <role-name>moa-admin</role-name>
+ </security-role>
+</web-app>
diff --git a/spss/server/tools/.classpath b/spss/server/tools/.classpath
new file mode 100644
index 000000000..ad36587e9
--- /dev/null
+++ b/spss/server/tools/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/spss/server/tools/.project b/spss/server/tools/.project
new file mode 100644
index 000000000..4e931b799
--- /dev/null
+++ b/spss/server/tools/.project
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>moa-spss-tools</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
diff --git a/spss/server/tools/.settings/org.eclipse.jdt.core.prefs b/spss/server/tools/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..cc6503a3c
--- /dev/null
+++ b/spss/server/tools/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,5 @@
+#Wed Sep 12 09:45:48 CEST 2007
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.source=1.4
diff --git a/spss/server/tools/.settings/org.maven.ide.eclipse.prefs b/spss/server/tools/.settings/org.maven.ide.eclipse.prefs
new file mode 100644
index 000000000..373d31d5c
--- /dev/null
+++ b/spss/server/tools/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,9 @@
+#Tue Jul 07 16:06:50 CEST 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
diff --git a/spss/server/tools/pom.xml b/spss/server/tools/pom.xml
new file mode 100644
index 000000000..b276e5441
--- /dev/null
+++ b/spss/server/tools/pom.xml
@@ -0,0 +1,68 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>MOA.spss</groupId>
+ <artifactId>moa-spss</artifactId>
+ <version>1.5.x</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>MOA.spss.server</groupId>
+ <artifactId>moa-spss-tools</artifactId>
+ <packaging>jar</packaging>
+ <version>1.5</version>
+ <name>MOA SP/SS Tools</name>
+
+ <properties>
+ <thirdPartyLib>${basedir}/../../../buildhelper</thirdPartyLib>
+ <repositoryPath>${basedir}/../../../repository</repositoryPath>
+ </properties>
+
+ <dependencies>
+<!--
+ <dependency>
+ <groupId>MOA.spss.server</groupId>
+ <artifactId>moa-spss-lib</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ -->
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_moa</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_jce_full</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>iaik.prod</groupId>
+ <artifactId>iaik_ecc</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>xalan-bin-dist</groupId>
+ <artifactId>xalan</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <addMavenDescriptor>false</addMavenDescriptor>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/spss/server/tools/src/main/java/at/gv/egovernment/moa/spss/server/tools/CertTool.java b/spss/server/tools/src/main/java/at/gv/egovernment/moa/spss/server/tools/CertTool.java
new file mode 100644
index 000000000..9fe17eae2
--- /dev/null
+++ b/spss/server/tools/src/main/java/at/gv/egovernment/moa/spss/server/tools/CertTool.java
@@ -0,0 +1,242 @@
+package at.gv.egovernment.moa.spss.server.tools;
+
+import java.io.BufferedInputStream;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintStream;
+import java.security.cert.CertificateException;
+
+import iaik.asn1.structures.Name;
+import iaik.pki.store.certstore.CertStoreException;
+import iaik.pki.store.certstore.CertStoreTypes;
+import iaik.pki.store.certstore.directory.DirectoryCertStore;
+import iaik.pki.store.certstore.directory.DirectoryCertStoreParameters;
+import iaik.pki.store.certstore.directory.DirectoryStoreException;
+import iaik.security.ecc.provider.ECCProvider;
+import iaik.security.provider.IAIK;
+import iaik.utils.RFC2253NameParserException;
+import iaik.x509.X509Certificate;
+
+/**
+ * A tool to support X509 certificate handling for configuring the MOA SP/SS
+ * service.
+ *
+ * This class provides functions for:
+ * <ul>
+ * <li>printing certificate information</li>
+ * <li>adding certificates to the cert store</li>
+ * </ul>
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CertTool {
+
+ /** Error message if the DN cannot be parsed according to RFC2253. */
+ private static final String ILLEGAL_RFC2253_NAME =
+ "Kein gültiger RFC2253-Name";
+
+ /**
+ * Main entry point of the tool.
+ *
+ * @param args The command line arguments. A single argument is expected,
+ * which is the file name of the X509 certificate to inspect.
+ */
+ public static void main(String args[]) {
+ CertTool certTool = new CertTool();
+
+ if (args.length == 2 && "-info".equals(args[0])) {
+ initProviders();
+ certTool.printCertInfo(args[1], System.out);
+ } else if (args.length == 3 && "-add".equals(args[0])) {
+ initProviders();
+ certTool.addCertToCertStore(args[1], args[2]);
+ } else {
+ certTool.printUsage(System.err);
+ }
+ }
+
+ /**
+ * Init the JCE providers, depending on the JDK used.
+ *
+ * Adds the IAIK JCE and IAIK ECC providers.
+ */
+ private static void initProviders() {
+ if (System.getProperty("java.version").startsWith("1.3")) {
+ IAIK.addAsProvider();
+ } else {
+ IAIK.addAsJDK14Provider();
+ }
+ ECCProvider.addAsProvider();
+ }
+
+ /**
+ * Print the information about the certificate.
+ *
+ * This method will output information about the Subject DN, the Issuer DN and
+ * the serial number of the certificate.
+ *
+ * @param certFile The name of the certificate file to inspect.
+ * @param out The stream to print the information to.
+ */
+ public void printCertInfo(String certFile, PrintStream out) {
+ try {
+ InputStream is = new BufferedInputStream(new FileInputStream(certFile));
+ X509Certificate cert = new X509Certificate(is);
+ String issuerDN;
+ String serial;
+ String subjectDN;
+
+ try {
+ subjectDN = ((Name) (cert.getSubjectDN())).getRFC2253String();
+ } catch (RFC2253NameParserException e) {
+ subjectDN = ILLEGAL_RFC2253_NAME;
+ }
+
+ try {
+ issuerDN = ((Name) (cert.getIssuerDN())).getRFC2253String();
+ } catch (RFC2253NameParserException e) {
+ issuerDN = ILLEGAL_RFC2253_NAME;
+ }
+
+ serial = cert.getSerialNumber().toString();
+
+ out.println("SubjectDN (RFC2253): " + subjectDN);
+ out.println("IssuerDN (RFC2253) : " + issuerDN);
+ out.println("Serial Number : " + serial);
+ } catch (FileNotFoundException e) {
+ System.err.println("Zertifikat nicht gefunden: " + certFile);
+ } catch (IOException e) {
+ System.err.println(
+ "I/O Fehler beim Lesen des Zertifikats: " + e.getMessage());
+ } catch (CertificateException e) {
+ System.err.println(
+ "Fehler beim Lesen des Zertifikats: " + e.getMessage());
+ } catch (Throwable t) {
+ System.err.println("Allgemeiner Fehler: " + t.getMessage());
+ }
+ }
+
+ /**
+ * Add a certificate to a directory certificate store.
+ *
+ * @param certFile The certificate to add.
+ * @param certStoreRoot The root directory of the certificate store.
+ */
+ public void addCertToCertStore(String certFile, String certStoreRoot) {
+ try {
+ // read the certificate
+ InputStream is = new BufferedInputStream(new FileInputStream(certFile));
+ X509Certificate cert = new X509Certificate(is);
+
+ // initialize the DirectoryCertStore
+ DirectoryCertStore certStore =
+ new DirectoryCertStore(
+ new SimpleDirectoryCertStoreParameters(certStoreRoot),
+ null);
+
+ certStore.storeCertificate(cert, null);
+
+ System.out.println("\nDas Zertifikat wurde erfolreich hinzugefügt.\n");
+
+ } catch (FileNotFoundException e) {
+ System.err.println("Zertifikat nicht gefunden: " + certFile);
+ } catch (IOException e) {
+ System.err.println(
+ "I/O Fehler beim Lesen des Zertifikats: " + e.getMessage());
+ } catch (CertificateException e) {
+ System.err.println(
+ "Fehler beim Lesen des Zertifikats: " + e.getMessage());
+ } catch (DirectoryStoreException e) {
+ System.err.println(
+ "Fehler beim Öffnen des Zertifikatsspeichers: " + e.getMessage());
+ } catch (CertStoreException e) {
+ System.err.println(
+ "Fehler beim Hinzufügen des Zertifikats: " + e.getMessage());
+ } catch (Throwable t) {
+ System.err.println("Allgemeiner Fehler: " + t.getMessage());
+ t.printStackTrace();
+ }
+ }
+
+ /**
+ * Print tool usage.
+ *
+ * @param out The <code>PrintStream</code> to print to.
+ */
+ private void printUsage(PrintStream out) {
+ out.println("\nCerttool-Syntax:\n");
+ out.println("-info <X509 Zertifikatsdatei");
+ out.println();
+ out.println("-add <X509 Zertifikatsdatei> <Zertifikatsspeicher>");
+ out.println("\n");
+ }
+
+}
+
+/**
+ * Simple implementation of the <code>DirectoryCertStoreParameters</code>
+ * interface intelligent enough for setting up a simple
+ * <code>DirectoryCertStore</code> in the <code>CertTool</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+class SimpleDirectoryCertStoreParameters
+ implements DirectoryCertStoreParameters {
+
+ /** The cert store root directory. */
+ private String rootDirectory;
+
+ /**
+ * Create a new <code>SimpleDirectoryCertStoreParameters</code> object.
+ *
+ * @param rootDirectory The root directory of the cert store.
+ */
+ public SimpleDirectoryCertStoreParameters(String rootDirectory) {
+ this.rootDirectory = rootDirectory;
+ }
+
+ /**
+ * @return <code>&quot;MOA Directory CertStore&quot;</code>
+ * @see iaik.pki.store.certstore.CertStoreParameters#getId()
+ */
+ public String getId() {
+ return "MOA Directory CertStore";
+ }
+
+ /**
+ * @return CertStoreTypes.DIRECTORY
+ * @see iaik.pki.store.certstore.CertStoreParameters#getType()
+ */
+ public String getType() {
+ return CertStoreTypes.DIRECTORY;
+ }
+
+ /**
+ * @return <code>false</code>
+ * @see iaik.pki.store.certstore.CertStoreParameters#isReadOnly()
+ */
+ public boolean isReadOnly() {
+ return false;
+ }
+
+ /**
+ * @return <code>false</code>
+ * @see iaik.pki.store.certstore.directory.DirectoryCertStoreParameters#createNew()
+ */
+ public boolean createNew() {
+ return false;
+ }
+
+ /**
+ * @return The root directory given at construction time.
+ * @see iaik.pki.store.certstore.directory.DirectoryCertStoreParameters#getRootDirectory()
+ */
+ public String getRootDirectory() {
+ return rootDirectory;
+ }
+
+} \ No newline at end of file
diff --git a/spss/server/tools/src/main/java/at/gv/egovernment/moa/spss/server/tools/ConfigTool.java b/spss/server/tools/src/main/java/at/gv/egovernment/moa/spss/server/tools/ConfigTool.java
new file mode 100644
index 000000000..5848065b7
--- /dev/null
+++ b/spss/server/tools/src/main/java/at/gv/egovernment/moa/spss/server/tools/ConfigTool.java
@@ -0,0 +1,59 @@
+package at.gv.egovernment.moa.spss.server.tools;
+
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+/**
+ * A tool for converting a MOA SPSS Version 1.0 configuration file into
+ * a Version 1.3 configuration file.
+ *
+ * @author Gregor Karlinger
+ * @version $Id$
+ */
+public class ConfigTool
+{
+ public static void main(String[] args)
+ {
+ if (args == null || args.length != 2)
+ {
+ System.out.println("Usage: ConfigTool <MOA.SPSS.1-0.ConfigFile.xml> <MOA.SPSS.1-4.5.ConfigFile.xml>");
+ System.out.println(" <MOA.SPSS.1-0.ConfigFile.xml> ... Old config file to be transformed");
+ System.out.println(" <MOA.SPSS.1-4.5.ConfigFile.xml> ... New config file resulting from the transform");
+ System.exit(-1);
+ }
+
+ try
+ {
+ TransformerFactory tFactory = TransformerFactory.newInstance();
+ Transformer transformer = tFactory.newTransformer(new StreamSource(
+ ConfigTool.class.getResourceAsStream("/resources/tools/ConfigurationMapper.xsl")));
+ transformer.transform(new StreamSource(args[0]), new StreamResult(new FileOutputStream(args[1])));
+
+ System.out.println("Successfully mapped configuration file.");
+ }
+ catch (TransformerConfigurationException e)
+ {
+ System.err.println("An error occurred during mapping the configuration file:");
+ System.err.println(" Cannot initialize XSLT transform.");
+ System.err.println(" " + e.getMessage());
+ }
+ catch (FileNotFoundException e)
+ {
+ System.err.println("An error occurred during mapping the configuration file:");
+ System.err.println(" There is a problem with the filename for the new configuration file.");
+ System.err.println(" " + e.getMessage());
+ }
+ catch (TransformerException e)
+ {
+ System.err.println("An error occurred during mapping the configuration file:");
+ System.err.println(" " + e.getMessage());
+ }
+ }
+}
diff --git a/spss/server/tools/src/main/resources/tools/ConfigurationMapper.xsl b/spss/server/tools/src/main/resources/tools/ConfigurationMapper.xsl
new file mode 100644
index 000000000..fd47cbf84
--- /dev/null
+++ b/spss/server/tools/src/main/resources/tools/ConfigurationMapper.xsl
@@ -0,0 +1,343 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:cfg="http://reference.e-government.gv.at/namespace/moaconfig/20021122#">
+ <xsl:output encoding="UTF-8" indent="yes" method="xml"/>
+ <xsl:template match="/">
+ <xsl:apply-templates/>
+ </xsl:template>
+ <xsl:template match="cfg:MOAConfiguration">
+ <xsl:comment>MOA SPSS 1.3 Configuration File created by MOA SPSS Configuration Mapper</xsl:comment>
+ <cfg:MOAConfiguration>
+ <xsl:if test="cfg:HardwareCryptoModule">
+ <cfg:Common>
+ <xsl:for-each select="cfg:HardwareCryptoModule">
+ <cfg:HardwareCryptoModule>
+ <cfg:Name>
+ <xsl:value-of select="@name"/>
+ </cfg:Name>
+ <xsl:if test="@slotID">
+ <cfg:SlotId>
+ <xsl:value-of select="@slotID"/>
+ </cfg:SlotId>
+ </xsl:if>
+ <cfg:UserPIN>
+ <xsl:value-of select="@userPIN"/>
+ </cfg:UserPIN>
+ </cfg:HardwareCryptoModule>
+ </xsl:for-each>
+ </cfg:Common>
+ </xsl:if>
+ <xsl:if test="cfg:KeyGroup">
+ <cfg:SignatureCreation>
+ <cfg:KeyModules>
+ <xsl:apply-templates select="cfg:HardwareKeyModule | cfg:SoftwareKeyModule"/>
+ </cfg:KeyModules>
+ <xsl:apply-templates select="cfg:KeyGroup"/>
+ <xsl:apply-templates select="cfg:KeyGroupMapping"/>
+ <cfg:XMLDSig>
+ <cfg:CanonicalizationAlgorithm>
+ <xsl:choose>
+ <xsl:when test="cfg:CanonicalizationAlgorithm">
+ <xsl:value-of select="cfg:CanonicalizationAlgorithm/@name"/>
+ </xsl:when>
+ <xsl:otherwise>http://www.w3.org/TR/2001/REC-xml-c14n-20010315</xsl:otherwise>
+ </xsl:choose>
+ </cfg:CanonicalizationAlgorithm>
+ <cfg:DigestMethodAlgorithm>
+ <xsl:choose>
+ <xsl:when test="cfg:DigestMethodAlgorithm">
+ <xsl:value-of select="cfg:DigestMethodAlgorithm/@name"/>
+ </xsl:when>
+ <xsl:otherwise>http://www.w3.org/2000/09/xmldsig#sha1</xsl:otherwise>
+ </xsl:choose>
+ </cfg:DigestMethodAlgorithm>
+ </cfg:XMLDSig>
+ <xsl:for-each select="cfg:CreateTransformsInfoProfile">
+ <cfg:CreateTransformsInfoProfile>
+ <xsl:apply-templates select="."/>
+ </cfg:CreateTransformsInfoProfile>
+ </xsl:for-each>
+ <xsl:for-each select="cfg:CreateSignatureEnvironmentProfile">
+ <cfg:CreateSignatureEnvironmentProfile>
+ <xsl:apply-templates select="."/>
+ </cfg:CreateSignatureEnvironmentProfile>
+ </xsl:for-each>
+ </cfg:SignatureCreation>
+ </xsl:if>
+ <xsl:if test="cfg:TrustProfile">
+ <cfg:SignatureVerification>
+ <xsl:call-template name="CertificateValidation"/>
+ </cfg:SignatureVerification>
+ </xsl:if>
+ </cfg:MOAConfiguration>
+ </xsl:template>
+ <xsl:template match="cfg:SoftwareKeyModule">
+ <cfg:SoftwareKeyModule>
+ <cfg:Id>
+ <xsl:value-of select="@id"/>
+ </cfg:Id>
+ <cfg:FileName>
+ <xsl:value-of select="@filename"/>
+ </cfg:FileName>
+ <xsl:if test="@password">
+ <cfg:Password>
+ <xsl:value-of select="@password"/>
+ </cfg:Password>
+ </xsl:if>
+ </cfg:SoftwareKeyModule>
+ </xsl:template>
+ <xsl:template match="cfg:HardwareKeyModule">
+ <cfg:HardwareKeyModule>
+ <cfg:Id>
+ <xsl:value-of select="@id"/>
+ </cfg:Id>
+ <cfg:Name>
+ <xsl:value-of select="@name"/>
+ </cfg:Name>
+ <xsl:if test="@slotID">
+ <cfg:SlotId>
+ <xsl:value-of select="@slotID"/>
+ </cfg:SlotId>
+ </xsl:if>
+ <cfg:UserPIN>
+ <xsl:value-of select="@userPIN"/>
+ </cfg:UserPIN>
+ </cfg:HardwareKeyModule>
+ </xsl:template>
+ <xsl:template match="cfg:KeyGroup">
+ <cfg:KeyGroup>
+ <cfg:Id>
+ <xsl:value-of select="@id"/>
+ </cfg:Id>
+ <xsl:for-each select="cfg:Key">
+ <cfg:Key>
+ <cfg:KeyModuleId>
+ <xsl:value-of select="cfg:KeyModuleID"/>
+ </cfg:KeyModuleId>
+ <cfg:KeyCertIssuerSerial>
+ <dsig:X509IssuerName>
+ <xsl:value-of select="cfg:KeyCertIssuerSerial/dsig:X509IssuerName"/>
+ </dsig:X509IssuerName>
+ <dsig:X509SerialNumber>
+ <xsl:value-of select="cfg:KeyCertIssuerSerial/dsig:X509SerialNumber"/>
+ </dsig:X509SerialNumber>
+ </cfg:KeyCertIssuerSerial>
+ </cfg:Key>
+ </xsl:for-each>
+ </cfg:KeyGroup>
+ </xsl:template>
+ <xsl:template match="cfg:KeyGroupMapping">
+ <cfg:KeyGroupMapping>
+ <xsl:if test="cfg:X509IssuerSerial">
+ <cfg:CustomerId>
+ <dsig:X509IssuerName>
+ <xsl:value-of select="cfg:X509IssuerSerial/dsig:X509IssuerName"/>
+ </dsig:X509IssuerName>
+ <dsig:X509SerialNumber>
+ <xsl:value-of select="cfg:X509IssuerSerial/dsig:X509SerialNumber"/>
+ </dsig:X509SerialNumber>
+ </cfg:CustomerId>
+ </xsl:if>
+ <xsl:for-each select="cfg:KeyGroup">
+ <cfg:KeyGroupId>
+ <xsl:value-of select="@id"/>
+ </cfg:KeyGroupId>
+ </xsl:for-each>
+ </cfg:KeyGroupMapping>
+ </xsl:template>
+ <xsl:template match="cfg:CreateTransformsInfoProfile | cfg:CreateSignatureEnvironmentProfile | cfg:VerifyTransformsInfoProfile | cfg:SupplementProfile">
+ <cfg:Id>
+ <xsl:value-of select="@id"/>
+ </cfg:Id>
+ <cfg:Location>
+ <xsl:value-of select="@filename"/>
+ </cfg:Location>
+ </xsl:template>
+ <xsl:template name="CertificateValidation">
+ <cfg:CertificateValidation>
+ <cfg:PathConstruction>
+ <cfg:AutoAddCertificates>
+ <xsl:call-template name="GetGenericValue">
+ <xsl:with-param name="GenericName" select="'autoAddCertificates'"/>
+ <xsl:with-param name="DefaultValue" select="'true'"/>
+ </xsl:call-template>
+ </cfg:AutoAddCertificates>
+ <cfg:UseAuthorityInformationAccess>
+ <xsl:call-template name="GetGenericValue">
+ <xsl:with-param name="GenericName" select="'useAuthorityInfoAccess'"/>
+ <xsl:with-param name="DefaultValue" select="'true'"/>
+ </xsl:call-template>
+ </cfg:UseAuthorityInformationAccess>
+ <cfg:CertificateStore>
+ <cfg:DirectoryStore>
+ <cfg:Location>
+ <xsl:call-template name="GetGenericValue">
+ <xsl:with-param name="GenericName" select="'DirectoryCertStoreParameters.RootDir'"/>
+ <xsl:with-param name="DefaultValue" select="'certstore'"/>
+ </xsl:call-template>
+ </cfg:Location>
+ </cfg:DirectoryStore>
+ </cfg:CertificateStore>
+ </cfg:PathConstruction>
+ <cfg:PathValidation>
+ <cfg:ChainingMode>
+ <cfg:DefaultMode>
+ <xsl:choose>
+ <xsl:when test="cfg:ChainingModes/@systemDefaultMode">
+ <xsl:value-of select="cfg:ChainingModes/@systemDefaultMode"/>
+ </xsl:when>
+ <xsl:otherwise>pkix</xsl:otherwise>
+ </xsl:choose>
+ </cfg:DefaultMode>
+ <xsl:for-each select="cfg:ChainingModes/cfg:TrustAnchor">
+ <cfg:TrustAnchor>
+ <cfg:Identification>
+ <dsig:X509IssuerName>
+ <xsl:value-of select="dsig:X509IssuerName"/>
+ </dsig:X509IssuerName>
+ <dsig:X509SerialNumber>
+ <xsl:value-of select="dsig:X509SerialNumber"/>
+ </dsig:X509SerialNumber>
+ </cfg:Identification>
+ <cfg:Mode>
+ <xsl:value-of select="@mode"/>
+ </cfg:Mode>
+ </cfg:TrustAnchor>
+ </xsl:for-each>
+ </cfg:ChainingMode>
+ <xsl:for-each select="cfg:TrustProfile">
+ <cfg:TrustProfile>
+ <cfg:Id>
+ <xsl:value-of select="@id"/>
+ </cfg:Id>
+ <cfg:TrustAnchorsLocation>
+ <xsl:value-of select="@uri"/>
+ </cfg:TrustAnchorsLocation>
+ <xsl:if test="@signerCertsUri">
+ <cfg:SignerCertsLocation>
+ <xsl:value-of select="@signerCertsUri"/>
+ </cfg:SignerCertsLocation>
+ </xsl:if>
+ </cfg:TrustProfile>
+ </xsl:for-each>
+ </cfg:PathValidation>
+ <cfg:RevocationChecking>
+ <cfg:EnableChecking>
+ <xsl:call-template name="GetGenericValue">
+ <xsl:with-param name="GenericName" select="'checkRevocation'"/>
+ <xsl:with-param name="DefaultValue" select="'true'"/>
+ </xsl:call-template>
+ </cfg:EnableChecking>
+ <cfg:MaxRevocationAge>
+ <xsl:call-template name="GetGenericValue">
+ <xsl:with-param name="GenericName" select="'maxRevocationAge'"/>
+ <xsl:with-param name="DefaultValue" select="'0'"/>
+ </xsl:call-template>
+ </cfg:MaxRevocationAge>
+ <cfg:ServiceOrder>
+ <cfg:Service>CRL</cfg:Service>
+ <cfg:Service>OCSP</cfg:Service>
+ </cfg:ServiceOrder>
+ <cfg:Archiving>
+ <cfg:EnableArchiving>
+ <xsl:call-template name="GetGenericValue">
+ <xsl:with-param name="GenericName" select="'archiveRevocationInfo'"/>
+ <xsl:with-param name="DefaultValue" select="'false'"/>
+ </xsl:call-template>
+ </cfg:EnableArchiving>
+ <cfg:ArchiveDuration>
+ <xsl:choose>
+ <xsl:when test="cfg:CRLArchive/@duration">
+ <xsl:value-of select="cfg:CRLArchive/@duration"/>
+ </xsl:when>
+ <xsl:otherwise>365</xsl:otherwise>
+ </xsl:choose>
+ </cfg:ArchiveDuration>
+ <cfg:Archive>
+ <cfg:DatabaseArchive>
+ <cfg:JDBCURL>
+ <xsl:call-template name="GetGenericValue">
+ <xsl:with-param name="GenericName" select="'DataBaseArchiveParameter.JDBCUrl'"/>
+ <xsl:with-param name="DefaultValue" select="'jdbc:url'"/>
+ </xsl:call-template>
+ </cfg:JDBCURL>
+ <cfg:JDBCDriverClassName>
+ <xsl:call-template name="GetGenericValue">
+ <xsl:with-param name="GenericName" select="'DataBaseArchiveParameter.JDBCDriverClass'"/>
+ <xsl:with-param name="DefaultValue" select="'fully.qualified.classname'"/>
+ </xsl:call-template>
+ </cfg:JDBCDriverClassName>
+ </cfg:DatabaseArchive>
+ </cfg:Archive>
+ </cfg:Archiving>
+ <xsl:for-each select="cfg:CRLDistributionPoint">
+ <cfg:DistributionPoint>
+ <cfg:CAIssuerDN>
+ <xsl:value-of select="cfg:CAIssuerDN"/>
+ </cfg:CAIssuerDN>
+ <xsl:for-each select="cfg:DistributionPoint">
+ <cfg:CRLDP>
+ <cfg:Location>
+ <xsl:value-of select="@uri"/>
+ </cfg:Location>
+ <xsl:if test="contains(@reasonCodes, 'all')">
+ <cfg:ReasonCode>all</cfg:ReasonCode>
+ </xsl:if>
+ <xsl:if test="contains(@reasonCodes, 'unused')">
+ <cfg:ReasonCode>unused</cfg:ReasonCode>
+ </xsl:if>
+ <xsl:if test="contains(@reasonCodes, 'keyCompromise')">
+ <cfg:ReasonCode>keyCompromise</cfg:ReasonCode>
+ </xsl:if>
+ <xsl:if test="contains(@reasonCodes, 'cACompromise')">
+ <cfg:ReasonCode>cACompromise</cfg:ReasonCode>
+ </xsl:if>
+ <xsl:if test="contains(@reasonCodes, 'affiliationChanged')">
+ <cfg:ReasonCode>affiliationChanged</cfg:ReasonCode>
+ </xsl:if>
+ <xsl:if test="contains(@reasonCodes, 'superseded')">
+ <cfg:ReasonCode>superseded</cfg:ReasonCode>
+ </xsl:if>
+ <xsl:if test="contains(@reasonCodes, 'cessationOfOperation')">
+ <cfg:ReasonCode>cessationOfOperation</cfg:ReasonCode>
+ </xsl:if>
+ <xsl:if test="contains(@reasonCodes, 'certificateHold')">
+ <cfg:ReasonCode>certificateHold</cfg:ReasonCode>
+ </xsl:if>
+ <xsl:if test="contains(@reasonCodes, 'privilegeWithdrawn')">
+ <cfg:ReasonCode>privilegeWithdrawn</cfg:ReasonCode>
+ </xsl:if>
+ <xsl:if test="contains(@reasonCodes, 'aACompromise')">
+ <cfg:ReasonCode>aACompromise</cfg:ReasonCode>
+ </xsl:if>
+ </cfg:CRLDP>
+ </xsl:for-each>
+ </cfg:DistributionPoint>
+ </xsl:for-each>
+ </cfg:RevocationChecking>
+ </cfg:CertificateValidation>
+ <xsl:for-each select="cfg:VerifyTransformsInfoProfile">
+ <cfg:VerifyTransformsInfoProfile>
+ <xsl:apply-templates select="."/>
+ </cfg:VerifyTransformsInfoProfile>
+ </xsl:for-each>
+ <xsl:for-each select="cfg:SupplementProfile">
+ <cfg:SupplementProfile>
+ <xsl:apply-templates select="."/>
+ </cfg:SupplementProfile>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="GetGenericValue">
+ <xsl:param name="GenericName"/>
+ <xsl:param name="DefaultValue"/>
+ <xsl:choose>
+ <xsl:when test="cfg:GenericConfiguration[@name=$GenericName]">
+ <xsl:value-of select="cfg:GenericConfiguration[@name=$GenericName]/@value"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:if test="$DefaultValue != ''">
+ <xsl:value-of select="$DefaultValue"/>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+</xsl:stylesheet>
diff --git a/spss/server/tools/src/main/scripts/certtool.bat b/spss/server/tools/src/main/scripts/certtool.bat
new file mode 100644
index 000000000..ae55bc4a5
--- /dev/null
+++ b/spss/server/tools/src/main/scripts/certtool.bat
@@ -0,0 +1,25 @@
+@echo off
+
+rem
+rem Script to invoke the CertTool class
+rem
+rem Author: Patrick Peck
+rem Version: $Id: certtool.bat,v 1.6 2003/05/08 11:46:29 peck Exp $
+rem
+
+
+if %OS%=="Windows_NT" @setlocal
+
+set CERTTOOL=at.gv.egovernment.moa.spss.server.tools.CertTool
+set TOOLSPATH=%~p0
+set CLASSPATH=%TOOLSPATH%tools.jar;%TOOLSPATH%iaik_moa.jar;%TOOLSPATH%iaik_jce_full.jar;%TOOLSPATH%iaik_ecc.jar;%TOOLSPATH%log4j.jar
+
+if "%JAVA_HOME%"=="" goto noJavaHome
+%JAVA_HOME%\bin\java.exe -classpath %CLASSPATH% %CERTTOOL% %1 %2 %3 %4 %5 %6 %7 %8 %9
+goto end
+
+:noJavaHome
+echo error: JAVA_HOME not defined
+
+:end
+if %OS%=="Windows_NT" @endlocal \ No newline at end of file
diff --git a/spss/server/tools/src/main/scripts/certtool.sh b/spss/server/tools/src/main/scripts/certtool.sh
new file mode 100644
index 000000000..721eff4d8
--- /dev/null
+++ b/spss/server/tools/src/main/scripts/certtool.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+#
+# Script to invoke the CertTool class
+#
+# Author:Patrick Peck
+# Version: $Id: certtool.sh,v 1.9 2003/06/23 16:01:27 peck Exp $
+#
+
+
+if [ -z "$JAVA_HOME" ]; then
+ echo "error: JAVA_HOME not defined";
+ exit;
+fi
+
+CERTOOL=at.gv.egovernment.moa.spss.server.tools.CertTool
+TOOLSPATH=`dirname $PWD/$0`
+CLASSPATH=$TOOLSPATH/tools.jar:$TOOLSPATH/iaik_moa.jar:$TOOLSPATH/iaik_jce_full.jar:$TOOLSPATH/iaik_ecc.jar:$TOOLSPATH/log4j.jar
+
+$JAVA_HOME/bin/java -classpath $CLASSPATH $CERTOOL $*
diff --git a/spss/server/tools/src/main/scripts/configtool.bat b/spss/server/tools/src/main/scripts/configtool.bat
new file mode 100644
index 000000000..868df11f0
--- /dev/null
+++ b/spss/server/tools/src/main/scripts/configtool.bat
@@ -0,0 +1,25 @@
+@echo off
+
+rem
+rem Script to invoke the ConfigTool class
+rem
+rem Author: Gregor Karlinger
+rem Version: $Id: $
+rem
+
+
+if %OS%=="Windows_NT" @setlocal
+
+set CONFIGTOOL=at.gv.egovernment.moa.spss.server.tools.ConfigTool
+set TOOLSPATH=%~p0
+set CLASSPATH=%TOOLSPATH%tools.jar;%TOOLSPATH%xalan.jar;
+
+if "%JAVA_HOME%"=="" goto noJavaHome
+%JAVA_HOME%\bin\java.exe -classpath %CLASSPATH% %CONFIGTOOL% %1 %2 %3 %4 %5 %6 %7 %8 %9
+goto end
+
+:noJavaHome
+echo error: JAVA_HOME not defined
+
+:end
+if %OS%=="Windows_NT" @endlocal \ No newline at end of file
diff --git a/spss/server/tools/src/main/scripts/configtool.sh b/spss/server/tools/src/main/scripts/configtool.sh
new file mode 100644
index 000000000..f7f29bae1
--- /dev/null
+++ b/spss/server/tools/src/main/scripts/configtool.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+#
+# Script to invoke the ConfigTool class
+#
+# Author: Gregor Karlinger
+# Version: $Id: $
+#
+
+
+if [ -z "$JAVA_HOME" ]; then
+ echo "error: JAVA_HOME not defined";
+ exit;
+fi
+
+CONFIGTOOL=at.gv.egovernment.moa.spss.server.tools.ConfigTool
+TOOLSPATH=`dirname $PWD/$0`
+CLASSPATH=$TOOLSPATH/tools.jar:$TOOLSPATH/xalan.jar
+
+$JAVA_HOME/bin/java -classpath $CLASSPATH $CONFIGTOOL $*
diff --git a/todos.txt b/todos.txt
new file mode 100644
index 000000000..19d0718a5
--- /dev/null
+++ b/todos.txt
@@ -0,0 +1,22 @@
+o) Maven Repos für
+ jaxrpc 1.4.jar
+ saaj 1.4.jar
+
+
+o) Target Parameter einschränken (über Config)
+
+o) in MOA SP/SS sind die beiden Trustprofile
+ identityLink+Test-signerCerts
+ identityLink-signerCerts
+ nirgendwo konfiguriert und es befindet sich darin der gleiche Inhalt wie in
+ identityLink+Test
+ identityLink
+ Diese beiden Verzeichnisse sollten gelöscht werden können
+
+ Dabei kann man auch gleich die Namensgebung vereinfachen:
+ MOAIDBuergerkartePersonenbindungMitTestkarten = identityLink+Test
+ MOAIDBuergerkartePersonenbindungOhneTestkarten = identityLink
+ MOAIDBuergerkarteAuthentisierungsDatenOhneTestkarten = secureSignature
+ MOAIDBuergerkarteAuthentisierungsDatenMitTestkarten = secureSignature+Test
+
+o) Kontrolle ob Vollmachten Kompatibilitätsmodus auch bei Vollachten zieht