From 9b787d3409e629f292a98d0b5a0aad036b7421c7 Mon Sep 17 00:00:00 2001 From: mcentner Date: Fri, 17 Aug 2007 08:47:35 +0000 Subject: Improved and updated maven build process. git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@919 d688527b-c9ab-4aba-bd8d-4036d912da1d --- spss/assembly.xml | 207 ++++++++++++++++ spss/pom.xml | 246 ++----------------- spss/server/distribution/assembly.xml | 92 ------- spss/server/distribution/pom.xml | 111 --------- spss/server/history.txt | 268 +++++++++++++++++++++ spss/server/pom.xml | 46 ++-- spss/server/readme.inst.txt | 56 +++++ spss/server/readme.src.txt | 77 ++++++ spss/server/readme.update.txt | 137 +++++++++++ spss/server/serverlib/pom.xml | 197 +++++++++------ .../resources/data/deploy/tools/certtool.bat | 25 -- .../resources/data/deploy/tools/certtool.sh | 20 -- .../resources/data/deploy/tools/configtool.bat | 25 -- .../resources/data/deploy/tools/configtool.sh | 20 -- .../java/at/gv/egovernment/moa/spss/overview.htm | 155 ------------ .../moa/spss/server/tools/CertTool.java | 242 ------------------- .../moa/spss/server/tools/ConfigTool.java | 59 ----- .../serverlib/src/main/javadoc/overview.html | 155 ++++++++++++ spss/server/serverws/assembly.xml | 71 ------ spss/server/serverws/pom.xml | 199 +++++---------- spss/server/tools/pom.xml | 34 +++ .../moa/spss/server/tools/CertTool.java | 242 +++++++++++++++++++ .../moa/spss/server/tools/ConfigTool.java | 59 +++++ 23 files changed, 1469 insertions(+), 1274 deletions(-) create mode 100644 spss/assembly.xml delete mode 100644 spss/server/distribution/assembly.xml delete mode 100644 spss/server/distribution/pom.xml create mode 100644 spss/server/history.txt create mode 100644 spss/server/readme.inst.txt create mode 100644 spss/server/readme.src.txt create mode 100644 spss/server/readme.update.txt delete mode 100644 spss/server/serverlib/resources/data/deploy/tools/certtool.bat delete mode 100644 spss/server/serverlib/resources/data/deploy/tools/certtool.sh delete mode 100644 spss/server/serverlib/resources/data/deploy/tools/configtool.bat delete mode 100644 spss/server/serverlib/resources/data/deploy/tools/configtool.sh delete mode 100644 spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/overview.htm delete mode 100644 spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/tools/CertTool.java delete mode 100644 spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/tools/ConfigTool.java create mode 100644 spss/server/serverlib/src/main/javadoc/overview.html delete mode 100644 spss/server/serverws/assembly.xml create mode 100644 spss/server/tools/pom.xml create mode 100644 spss/server/tools/src/main/java/at/gv/egovernment/moa/spss/server/tools/CertTool.java create mode 100644 spss/server/tools/src/main/java/at/gv/egovernment/moa/spss/server/tools/ConfigTool.java (limited to 'spss') diff --git a/spss/assembly.xml b/spss/assembly.xml new file mode 100644 index 000000000..998a0d0e4 --- /dev/null +++ b/spss/assembly.xml @@ -0,0 +1,207 @@ + + SPSS + + + zip + + + false + + + + + MOA.spss.server:moa-spss-ws + + + true + + + + xalan:xalan + xerces:xercesImpl + xerces:xmlParserAPIs + + /endorsed + + + + iaik.prod:iaik_ecc + iaik.prod:iaik_jce_full + iaik.prod:iaik_Pkcs11Provider + iaik.prod:iaik_Pkcs11Wrapper + + /ext + + + + iaik.prod:iaik_Pkcs11Wrapper + + /pkcs11/win32 + pkcs11wrapper.dll + + + moa-spss.${extension} + false + + + + + MOA.spss.server:moa-spss-lib + + + javadoc + false + api-doc + /doc + true + + + + + MOA.spss.server:moa-spss-tools + + + true + + + + iaik.prod:iaik_moa + log4j:log4j + xalan:xalan + + /tools + + + /tools + tools.${extension} + false + + + + + + + ${basedir}/spss/handbook/handbook.html + /doc + + + + + + ${basedir}/spss/server + / + + *.txt + + + readme.src.txt + + + + ${basedir}/spss/handbook/conf + /conf + + + ${basedir}/spss/handbook/handbook + /doc/handbook + + + ${basedir}/spss/handbook/clients + /doc/clients + + + ${basedir}/spss/server/serverlib/resources/licenses + /licenses + + + ${basedir}/spss/server/serverws/data/deploy/tomcat + /tomcat + + + ${basedir}/spss/server/serverws/data/deploy/tools + /tools + + + + \ No newline at end of file diff --git a/spss/pom.xml b/spss/pom.xml index 93a5b4374..c533b8153 100644 --- a/spss/pom.xml +++ b/spss/pom.xml @@ -1,222 +1,24 @@ - - - MOA - MOA - 1.4.0 - - - 4.0.0 - MOA - spss - pom - 1.4.0 - MOA spss - - - ${basedir}/../buildhelper - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - false - true - ${env.BUILD_EXECUTEABLE} - ${env.BUILD_VERSION} - 1.3 - 1.3 - - - - - - - server - - - - - - axis - axis - 1.4 - compile - - - commons-logging - commons-logging - 1.0.4 - compile - - - iDoclet - iDoclet - 1.0 - provided - - - jaxen - jaxen - 1.0-FCS - provided - - - jaxen - jaxen-core - 1.0 - compile - - - jaxen - jaxen-dom - 1.0 - compile - - - javax.xml - jaxrpc-api - 1.1 - compile - - - javaext - jaxrpc - 0.1 - compile - - - org.w3c.dom - dom - LEVEL_3 - compile - - - sax - sax - JDK_13 - compile - - - saxpath - saxpath - 1.0-FCS - compile - - - wsdl4j - wsdl4j - 1.4 - compile - - - junit - junit - 3.8.1 - test - - - log4j - log4j - 1.2.7 - runtime - - - postgresql - postgresql - 7.3-jdbc2 - runtime - - - javax.servlet - servlet-api - 2.3 - provided - - - xalan - xalan - 2.5.1 - compile - - - xerces - xercesImpl - 2.4.0 - compile - - - xerces - xmlParserAPIs - 2.0.0 - compile - - - iaik.prod - iaik_cms - 3.2 - runtime - - - iaik.prod - iaik_jce_full - 3.142_MOA - provided - - - iaik.prod - iaik_Pkcs11Provider - 1.2.4 - provided - - - iaik.prod - iaik_Pkcs11Wrapper - 1.2.16 - compile - - - iaik.prod - iaik_ecc_signed - 2.15 - runtime - - - iaik.prod - iaik_jce_full_signed - 3.142_MOA - runtime - - - iaik.prod - iaik_Pkcs11Provider_signed - 1.2.4 - runtime - - - - iaik.win32 - Pkcs11Wrapper - dll - 1.0 - compile - - - MOA - common - 1.4.0 - compile - - - MOA - common-test - 1.4.0 - test - - - - - + + + MOA + MOA + 1.4.0 + + + 4.0.0 + MOA + spss + pom + 1.4.0 + MOA SP/SS + + + ${basedir}/../repository + + + + server + + + diff --git a/spss/server/distribution/assembly.xml b/spss/server/distribution/assembly.xml deleted file mode 100644 index b646f58b2..000000000 --- a/spss/server/distribution/assembly.xml +++ /dev/null @@ -1,92 +0,0 @@ - - all - - - zip - - - - - ${basedir}/../../handbook/handbook.html - /doc - - - - - - ${basedir}/../../handbook/conf - /conf - - - ${basedir}/../../handbook/handbook - /doc/handbook - - - ${basedir}/../../handbook/clients - /doc/clients - - - ${basedir}/../serverlib/resources/licenses - /licenses - - - ${basedir}/../serverws/data/deploy/tomcat - /tomcat - - - ${basedir}/../serverws/target - / - - - ${basedir}/../serverws/data/deploy/tools - /tools - - - - - - - xalan:xalan - xerces:xercesImpl - xerces:xmlParserAPIs - - /endorsed14 - - - - iaik.prod:iaik_ecc - iaik.prod:iaik_jce_full - iaik.prod:iaik_Pkcs11Provider - jsse:jcert - jsse:jnet - jsse:jsse - - /ext13 - - - - iaik.prod:iaik_ecc_signed - iaik.prod:iaik_jce_full_signed - iaik.prod:iaik_Pkcs11Provider_signed - - /ext14 - - - - iaik.win32:Pkcs11Wrapper - - /pkcs11/win32 - - - - iaik.prod:iaik_ecc - iaik.prod:iaik_jce_full - iaik.prod:iaik_moa_full - log4j:log4j - xalan:xalan - - /tools - - - - \ No newline at end of file diff --git a/spss/server/distribution/pom.xml b/spss/server/distribution/pom.xml deleted file mode 100644 index bf31f7128..000000000 --- a/spss/server/distribution/pom.xml +++ /dev/null @@ -1,111 +0,0 @@ - - - MOA.spss - server - 1.4.0 - - - 4.0.0 - MOA.spss - server.distribution - pom - 1.4.0 - SPSS-Server-Distribution - - - ${basedir}/../../../buildhelper - - - - - - maven-assembly-plugin - - - ./assembly.xml - - - - - make-dist-standalone - package - - attached - - - - - - - - - - xalan - xalan - - - xerces - xercesImpl - - - xerces - xmlParserAPIs - - - - iaik.prod - iaik_ecc - runtime - - - iaik.prod - iaik_jce_full - runtime - - - iaik.prod - iaik_Pkcs11Provider - runtime - - - - iaik.prod - iaik_ecc - runtime - - - iaik.prod - iaik_jce_full - runtime - - - iaik.prod - iaik_Pkcs11Provider - runtime - - - iaik.win32 - Pkcs11Wrapper - dll - 1.0 - runtime - - - - jsse - jcert - runtime - - - jsse - jnet - runtime - - - jsse - jsse - runtime - - - \ No newline at end of file diff --git a/spss/server/history.txt b/spss/server/history.txt new file mode 100644 index 000000000..8bcef8aba --- /dev/null +++ b/spss/server/history.txt @@ -0,0 +1,268 @@ +############## +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.1 + 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-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 + +############## +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 /services/SignatureCreation?wsdl + bzw. /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 index 0b71ea208..360949903 100644 --- a/spss/server/pom.xml +++ b/spss/server/pom.xml @@ -1,26 +1,26 @@ - - - MOA - spss - 1.4.0 - + + + MOA + spss + 1.4.0 + - 4.0.0 - MOA.spss - server - pom - 1.4.0 - MOA spss Server + 4.0.0 + MOA.spss + moa-spss + pom + 1.4.0 + MOA SPSS Server - - ${basedir}/../../buildhelper - - - - serverlib - serverws - distribution - - + + serverlib + serverws + tools + + + + ${basedir}/../../repository + + \ No newline at end of file diff --git a/spss/server/readme.inst.txt b/spss/server/readme.inst.txt new file mode 100644 index 000000000..a8b181cd8 --- /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.src.txt b/spss/server/readme.src.txt new file mode 100644 index 000000000..5880bbe1c --- /dev/null +++ b/spss/server/readme.src.txt @@ -0,0 +1,77 @@ +Willkommen bei der Entwicklung von von MOA SP/SS! + +Diese Distribution besteht aus vier Teilen: + + * Entwicklungsprojekt "common", bestehend aus dem Verzeichnis + "common". Dieser Ordner stellt ein vollständiges Eclipse 3.0- + Projekt dar. "common" enthält jene Teile von MOA SP/SS, die + auch von anderen MOAs verwendet werden. + + * Entwicklungsprojekt "spss.server", bestehend aus dem Verzeich- + nis "spss.server". Dieser Ordner stellt ein vollständiges + Eclipse 3.0-Projekt dar. "spss.server" stellt das eigentliche + Entwicklungsprojekt MOA SP/SS dar. Es benötigt als abhängiges + Projekt "common". + + * Entwicklungsprojekt "spss.handbook", bestehend aus dem Ver- + zeichnis "spss.handbook". Dieser Ordner stellt ein vollständiges + Eclipse 3.0-Projekt dar. "spss.handbook" stellt das Handbuch + inklusive Beispielen und Demo-Clients für API- und Webservice- + Version von MOA SP/SS dar. + + * Build-Scripts für Apache Ant. Diese Scripts befinden sich im + Verzeichnis "build". Eine Anleitung zur Bedienung der Build- + Scripts ist in der Datei "README.txt" in diesem Verzeichis + enthalten. + +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 + "spss.server/licenses" dieser Distribution. + +2. MOA SP/SS verwendet Kryptographie-Biliotheken, deren Rechte bei + der Stiftung Secure Information and Communication Technologies + (http://jcewww.iaik.at) liegen. Für diese Kryptographie-Biblio- + theken besteht folgende Situation: + + * Organisationen der österreichischen Verwaltung wird eine + kostenfreie Lizenz zur Nutzung der Bibliotheken eingeräumt. + Die Bibliotheken können im verwaltungsinternen Bereich der + Webseite der IKT-Stabsstelle heruntergeladen werden + (http://www.cio.gv.at/iktintern/downloads/). + + * Andere Organisationen müssen eine Lizenz zur Nutzung der + Bibliotheken bei der Stiftung SIC käuflich erwerben. + Evaluierungsversionen können kostenlos von der Webseite von + Stiftung SIC + (http://jce.iaik.tugraz.at/download/evaluation/index.php) + bezogen werden. Für die Lizensierung von Produktivversionen + wenden Sie sich bitte an den Verkauf von Stiftung SIC + (mailto:jce-sales@iaik.at). + +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 "spss.server/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 "spss.server/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 + "spss.server/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..ce8658f3a --- /dev/null +++ b/spss/server/readme.update.txt @@ -0,0 +1,137 @@ + +====================================================================== + Update einer bestehenden MOA-SPSS-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-SPSS 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 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.3.1.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: Diese Distribution enthält neue A-TRUST und E-CARD-Zertifikate. + 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: + Mit 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.3.1.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.) Falls Sie mit jdk1.3 oder niedriger arbeiten, kopieren Sie alle Dateien + aus dem Verzeichnis MOA_SPSS_INST\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_SPSS_INST\ext14 in das Verzeichnis + JAVA_HOME\jre\lib\ext. + +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. + +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/pom.xml b/spss/server/serverlib/pom.xml index 50b6fc411..edf27d123 100644 --- a/spss/server/serverlib/pom.xml +++ b/spss/server/serverlib/pom.xml @@ -2,86 +2,70 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> MOA.spss - server + moa-spss 1.4.0 4.0.0 MOA.spss.server - serverlib + moa-spss-lib jar 1.4.0 - MOA SPSS Serverlibrary + MOA SP/SS API - - ${basedir}/../../../buildhelper - + + ${basedir}/../../../repository + axis axis - - saaj - saaj - - - commons-discovery - commons-discovery - + + + + + + + + commons-logging commons-logging - - - - javax.activation activation - - jaxen - jaxen - - - jaxp - dom - - - jaxp - jaxp-api - - - jaxp - sax - + + + + + + + + + + + + + + + + - - org.w3c.dom - dom - - - sax - sax - - - jsse - jsse - - - jsse - jnet - - - jsse - jcert - + + + + + + + + junit junit @@ -112,7 +96,7 @@ iaik.prod - iaik_moa_full + iaik_moa iaik.prod @@ -126,33 +110,106 @@ iaik.prod iaik_ecc + compile iaik.prod iaik_Pkcs11Provider + runtime iaik.prod iaik_Pkcs11Wrapper + runtime - - iaik.win32 - Pkcs11Wrapper - dll - 1.0 - - - MOA - common - - - + + + + + + + MOA - common-test - system - ${basedir}/../../../common-test/target + moa-common + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.2 + + true + false + false + true + at.gv.egovernment.moa.spss.server.*;at.gv.egovernment.moa.spss.api.impl.*;at.gv.egovernment.moa.spss.impl.* + + + pre + a + Preconditions: + + + post + a + Postconfitions: + + + + + API Factory and Services + at.gv.egovernment.moa.spss.api + + + Exceptions + at.gv.egovernment.moa.spss + + + API Objects for Signature Creation + at.gv.egovernment.moa.spss.api.xmlsign + + + API Objects for CMS Signature Verification + at.gv.egovernment.moa.spss.api.cmsverify + + + API Objects for XML Signature Verification + at.gv.egovernment.moa.spss.api.xmlverify + + + Common API Objects + at.gv.egovernment.moa.spss.api.common + + + Builders and Parsers to convert API Objects to and from XML + at.gv.egovernment.moa.spss.api.xmlbind + + + Utilities + at.gv.egovernment.moa.util + at.gv.egovernment.moa.spss.util + + + Logging + at.gv.egovernment.moa.logging + + + http://java.sun.com/j2se/1.4/docs/api/ + + + + generate-javadoc + package + + jar + + + + + + diff --git a/spss/server/serverlib/resources/data/deploy/tools/certtool.bat b/spss/server/serverlib/resources/data/deploy/tools/certtool.bat deleted file mode 100644 index 0504211b8..000000000 --- a/spss/server/serverlib/resources/data/deploy/tools/certtool.bat +++ /dev/null @@ -1,25 +0,0 @@ -@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/serverlib/resources/data/deploy/tools/certtool.sh b/spss/server/serverlib/resources/data/deploy/tools/certtool.sh deleted file mode 100644 index c7ff374f4..000000000 --- a/spss/server/serverlib/resources/data/deploy/tools/certtool.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/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/serverlib/resources/data/deploy/tools/configtool.bat b/spss/server/serverlib/resources/data/deploy/tools/configtool.bat deleted file mode 100644 index 868df11f0..000000000 --- a/spss/server/serverlib/resources/data/deploy/tools/configtool.bat +++ /dev/null @@ -1,25 +0,0 @@ -@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/serverlib/resources/data/deploy/tools/configtool.sh b/spss/server/serverlib/resources/data/deploy/tools/configtool.sh deleted file mode 100644 index f7f29bae1..000000000 --- a/spss/server/serverlib/resources/data/deploy/tools/configtool.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/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/serverlib/src/main/java/at/gv/egovernment/moa/spss/overview.htm b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/overview.htm deleted file mode 100644 index 9b17bbf91..000000000 --- a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/overview.htm +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - -MOA SP/SS API documentation overview. - - -

Using the MOA SP/SS API

- -

Invoking the services

-In general, invoking the MOA SP/SS API involves the following steps: -
    -
  1. Set the moa.spss.server.configuration 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).
  2. -
  3. 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 getInstance() method.
  4. -
  5. 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.
  6. -
  7. Use the create... methods of the SPSSFactory 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. -
  8. -
  9. Call one of the service methods: -{@link at.gv.egovernment.moa.spss.api.SignatureCreationService#createXMLSignature(at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest) createXMLSignature()}, -{@link at.gv.egovernment.moa.spss.api.SignatureVerificationService#verifyCMSSignature(at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest) verifyCMSSignature()} or -{@link at.gv.egovernment.moa.spss.api.SignatureVerificationService#verifyXMLSignature(at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest) verifyXMLSignature()}. -
  10. -
  11. 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 CreateXMLSignatureResponse. -
- -

Creating MOA SP/SS API objects

-

-Invoking the MOA SP/SS API Service classes involves creating -a Request object using the {@link at.gv.egovernment.moa.spss.api.SPSSFactory SPSSFactory}. -Object creation using the SPSSFactory is always bottom-up, meaning -that in order to create an object all of its components must have been created -before. -

-

-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 xsd:choice components: -

    -
  • The various Profile classes have subclasses called -ProfileID and ProfileExplicit -(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.
  • -
  • 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.
  • -
- -

-

-For clarity, the MOA SP/SS API classes have been organized in several packages -listed in the following table: -

- - - - - - - - - - - - - - - - - - - - - -
PackagePurpose
{@link at.gv.egovernment.moa.spss.api.xmlsign}Components of the {@link at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest} and - {@link at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse}
{@link at.gv.egovernment.moa.spss.api.cmsverify}Components of the - {@link at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest} and - {@link at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse}
{@link at.gv.egovernment.moa.spss.api.xmlverify}Components of the - {@link at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest} and - {@link at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse}
{@link at.gv.egovernment.moa.spss.api.common}Common components used across the classes of the above packages
- -

Converting MOA SP/SS API objects to and from DOM trees

-The package {@link at.gv.egovernment.moa.spss.api.xmlbind} contains helper -classes to: -
    -
  • Parse a DOM tree containing a CreateXMLSignatureRequest, -VerifyCMSSignatureRequest or -VerifyCMSSignatureRequest into its respective MOA SP/SS API object -representation. For example, to parse a CreateXMLSignatureRequest -DOM tree, the {@link at.gv.egovernment.moa.spss.api.xmlbind.CreateXMLSignatureRequestParser#parse(org.w3c.dom.Element) CreateXMLSignatureRequestParser.parse()} -method can be used.
    -Note: The DOM tree of the request must be derived from a schema valid -XML document. Otherwise, unexpected behaviour will almost certainly result.
  • -
  • Build a CreateXMLSignatureResponse, -VerifyCMSSignatureResponse or a -VerifyXMLSignatureResponse DOM tree from the respective MOA SP/SS -API object. For example, to build a VerifyXMLSignatureResponse -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.
    -Note:The serialized DOM tree will be schema valid. -
  • -
-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. -
- -

Utilities and Logging

-

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. -

- -

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. -

- -

Related Documentation

- -See also the API example in the -MOA SP/SS documentation. - - - \ No newline at end of file diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/tools/CertTool.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/tools/CertTool.java deleted file mode 100644 index 9fe17eae2..000000000 --- a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/tools/CertTool.java +++ /dev/null @@ -1,242 +0,0 @@ -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: - *
    - *
  • printing certificate information
  • - *
  • adding certificates to the cert store
  • - *
- * - * @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 PrintStream to print to. - */ - private void printUsage(PrintStream out) { - out.println("\nCerttool-Syntax:\n"); - out.println("-info "); - out.println("\n"); - } - -} - -/** - * Simple implementation of the DirectoryCertStoreParameters - * interface intelligent enough for setting up a simple - * DirectoryCertStore in the CertTool. - * - * @author Patrick Peck - * @version $Id$ - */ -class SimpleDirectoryCertStoreParameters - implements DirectoryCertStoreParameters { - - /** The cert store root directory. */ - private String rootDirectory; - - /** - * Create a new SimpleDirectoryCertStoreParameters object. - * - * @param rootDirectory The root directory of the cert store. - */ - public SimpleDirectoryCertStoreParameters(String rootDirectory) { - this.rootDirectory = rootDirectory; - } - - /** - * @return "MOA Directory CertStore" - * @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 false - * @see iaik.pki.store.certstore.CertStoreParameters#isReadOnly() - */ - public boolean isReadOnly() { - return false; - } - - /** - * @return false - * @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/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/tools/ConfigTool.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/tools/ConfigTool.java deleted file mode 100644 index d5c3b48c1..000000000 --- a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/tools/ConfigTool.java +++ /dev/null @@ -1,59 +0,0 @@ -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 "); - System.out.println(" ... Old config file to be transformed"); - System.out.println(" ... 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/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 @@ + + + + + + +MOA SP/SS API documentation overview. + + +

Using the MOA SP/SS API

+ +

Invoking the services

+In general, invoking the MOA SP/SS API involves the following steps: +
    +
  1. Set the moa.spss.server.configuration 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).
  2. +
  3. 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 getInstance() method.
  4. +
  5. 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.
  6. +
  7. Use the create... methods of the SPSSFactory 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. +
  8. +
  9. Call one of the service methods: +{@link at.gv.egovernment.moa.spss.api.SignatureCreationService#createXMLSignature(at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest) createXMLSignature()}, +{@link at.gv.egovernment.moa.spss.api.SignatureVerificationService#verifyCMSSignature(at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest) verifyCMSSignature()} or +{@link at.gv.egovernment.moa.spss.api.SignatureVerificationService#verifyXMLSignature(at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest) verifyXMLSignature()}. +
  10. +
  11. 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 CreateXMLSignatureResponse. +
+ +

Creating MOA SP/SS API objects

+

+Invoking the MOA SP/SS API Service classes involves creating +a Request object using the {@link at.gv.egovernment.moa.spss.api.SPSSFactory SPSSFactory}. +Object creation using the SPSSFactory is always bottom-up, meaning +that in order to create an object all of its components must have been created +before. +

+

+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 xsd:choice components: +

    +
  • The various Profile classes have subclasses called +ProfileID and ProfileExplicit +(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.
  • +
  • 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.
  • +
+ +

+

+For clarity, the MOA SP/SS API classes have been organized in several packages +listed in the following table: +

+ + + + + + + + + + + + + + + + + + + + + +
PackagePurpose
{@link at.gv.egovernment.moa.spss.api.xmlsign}Components of the {@link at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest} and + {@link at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse}
{@link at.gv.egovernment.moa.spss.api.cmsverify}Components of the + {@link at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest} and + {@link at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse}
{@link at.gv.egovernment.moa.spss.api.xmlverify}Components of the + {@link at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest} and + {@link at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse}
{@link at.gv.egovernment.moa.spss.api.common}Common components used across the classes of the above packages
+ +

Converting MOA SP/SS API objects to and from DOM trees

+The package {@link at.gv.egovernment.moa.spss.api.xmlbind} contains helper +classes to: +
    +
  • Parse a DOM tree containing a CreateXMLSignatureRequest, +VerifyCMSSignatureRequest or +VerifyCMSSignatureRequest into its respective MOA SP/SS API object +representation. For example, to parse a CreateXMLSignatureRequest +DOM tree, the {@link at.gv.egovernment.moa.spss.api.xmlbind.CreateXMLSignatureRequestParser#parse(org.w3c.dom.Element) CreateXMLSignatureRequestParser.parse()} +method can be used.
    +Note: The DOM tree of the request must be derived from a schema valid +XML document. Otherwise, unexpected behaviour will almost certainly result.
  • +
  • Build a CreateXMLSignatureResponse, +VerifyCMSSignatureResponse or a +VerifyXMLSignatureResponse DOM tree from the respective MOA SP/SS +API object. For example, to build a VerifyXMLSignatureResponse +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.
    +Note:The serialized DOM tree will be schema valid. +
  • +
+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. +
+ +

Utilities and Logging

+

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. +

+ +

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. +

+ +

Related Documentation

+ +See also the API example in the +MOA SP/SS documentation. + + + \ No newline at end of file diff --git a/spss/server/serverws/assembly.xml b/spss/server/serverws/assembly.xml deleted file mode 100644 index a28fbfecf..000000000 --- a/spss/server/serverws/assembly.xml +++ /dev/null @@ -1,71 +0,0 @@ - - ws - - war - - - false - - - - ${basedir}/resources/wsdl/MOA-SPSS-1.3.xsd - /resources/schemas - - - - - - ${basedir}/../../handbook/conf/moa-spss - /WEB-INF/conf/moa-spss - - - ${basedir}/src/main/webapp/WEB-INF - /WEB-INF - - - - additional/licenses - /dist/ws/licenses - - - - ${basedir}/../../../common/target - /WEB-INF/lib - - **/*.jar - - - - - - - - - axis:axis - commons-discovery:commons-discovery - commons-logging:commons-logging - iaik.prod:iaik_cms - iaik.prod:iaik_ixsil - iaik.prod:iaik_moa_full - iaik.prod:iaik_Pkcs11Wrapper - jaxen:jaxen-core - jaxen:jaxen-dom - jaxp:dom - jaxp:jaxp-api - javaext:jaxrpc - log4j:log4j - postgresql:postgresql - saaj:saaj - sax:sax - saxpath:saxpath - wsdl4j:wsdl4j - xalan:xalan - xerces:xercesImpl - xerces:xmlParserAPIs - MOA.spss.server:serverlib - - /WEB-INF/lib - - - - \ No newline at end of file diff --git a/spss/server/serverws/pom.xml b/spss/server/serverws/pom.xml index 8fb467bb2..382e19d46 100644 --- a/spss/server/serverws/pom.xml +++ b/spss/server/serverws/pom.xml @@ -1,145 +1,66 @@ - - MOA.spss - server - 1.4.0 - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + MOA.spss + moa-spss + 1.4.0 + - 4.0.0 - MOA.spss.server - serverweb - pom - 1.4.0 - MOA SPSS Server-Web + 4.0.0 + MOA.spss.server + moa-spss-ws + war + 1.4.0 + MOA SP/SS WebService - - ${basedir}/../../../buildhelper - - - - - - maven-assembly-plugin - - - ${basedir}/assembly.xml - - - - - mk - package - - attached - - - - - - - - - - axis - axis - - - commons-discovery - commons-discovery - - - commons-logging - commons-logging - - - jaxen - jaxen-core - - - jaxen - jaxen-dom - - - jaxp - dom - - - jaxp - jaxp-api - - - javaext - jaxrpc - - - log4j - log4j - - - postgresql - postgresql - - - saaj - saaj - - - sax - sax - runtime - - - saxpath - saxpath - runtime - - - wsdl4j - wsdl4j - - - xalan - xalan - - - xerces - xercesImpl - - - xerces - xmlParserAPIs - + + ${basedir}/../../../repository + - - MOA.spss.server - serverlib - ${project.version} - - - MOA - common - + + + + org.apache.maven.plugins + maven-war-plugin + 2.0.2 + + + + false + true + + + moa-spss + + + ${basedir}/resources/wsdl + resources/schemas + + *.xsd + + + + ${basedir}/../../handbook + WEB-INF + + conf/** + + + + + + + - - iaik.prod - iaik_cms - runtime - - - iaik.prod - iaik_moa_full - runtime - - - iaik.prod - iaik_ixsil - runtime - - - iaik.prod - iaik_Pkcs11Wrapper - runtime - - + + + MOA.spss.server + moa-spss-lib + ${project.version} + + + MOA + moa-common + + diff --git a/spss/server/tools/pom.xml b/spss/server/tools/pom.xml new file mode 100644 index 000000000..9ecc2b240 --- /dev/null +++ b/spss/server/tools/pom.xml @@ -0,0 +1,34 @@ + + + MOA.spss + moa-spss + 1.4.0 + + + 4.0.0 + MOA.spss.server + moa-spss-tools + jar + 1.4.0 + MOA SP/SS Tools + + + ${basedir}/../../../buildhelper + + + + + MOA.spss.server + moa-spss-lib + ${project.version} + + + iaik.prod + iaik_ecc + compile + + + + 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: + *
    + *
  • printing certificate information
  • + *
  • adding certificates to the cert store
  • + *
+ * + * @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 PrintStream to print to. + */ + private void printUsage(PrintStream out) { + out.println("\nCerttool-Syntax:\n"); + out.println("-info "); + out.println("\n"); + } + +} + +/** + * Simple implementation of the DirectoryCertStoreParameters + * interface intelligent enough for setting up a simple + * DirectoryCertStore in the CertTool. + * + * @author Patrick Peck + * @version $Id$ + */ +class SimpleDirectoryCertStoreParameters + implements DirectoryCertStoreParameters { + + /** The cert store root directory. */ + private String rootDirectory; + + /** + * Create a new SimpleDirectoryCertStoreParameters object. + * + * @param rootDirectory The root directory of the cert store. + */ + public SimpleDirectoryCertStoreParameters(String rootDirectory) { + this.rootDirectory = rootDirectory; + } + + /** + * @return "MOA Directory CertStore" + * @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 false + * @see iaik.pki.store.certstore.CertStoreParameters#isReadOnly() + */ + public boolean isReadOnly() { + return false; + } + + /** + * @return false + * @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..d5c3b48c1 --- /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 "); + System.out.println(" ... Old config file to be transformed"); + System.out.println(" ... 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()); + } + } +} -- cgit v1.2.3