aboutsummaryrefslogtreecommitdiff
path: root/pom.xml
AgeCommit message (Collapse)AuthorFilesLines
2019-11-06Bump to Version 2.0.0-RC3Christof Rabensteiner1-1/+1
2019-10-30Bump to v2.0.0-RC3-SNAPSHOTChristof Rabensteiner1-1/+1
2019-10-07Bump to Version 2.0.0-RC2Christof Rabensteiner1-1/+1
2019-10-07Add Empty Ruleset for JacocoChristof Rabensteiner1-0/+4
- Fixes "Failed to execute goal org.jacoco:jacoco-maven-plugin:0.8.3:check (default-check) on project moa-zs: The parameters 'rules' for goal org.jacoco:jacoco-maven-plugin:0.8.3:check are missing or invalid" -error when running 'mvn verify'
2019-10-04Add Licenses, NOTICE, and License HeaderChristof Rabensteiner1-1/+8
2019-10-02Update GroupID of MOA ZS ArtifactChristof Rabensteiner1-1/+1
2019-09-23Bump to Version RC2-SNAPSHOTChristof Rabensteiner1-1/+1
2019-09-23Bump to 2.0.0-RC12.0.0-RC1Christof Rabensteiner1-1/+1
2019-08-28Update apache-cxf Dependencies to 3.3.3Christof Rabensteiner1-1/+1
2019-08-26Log Incoming And Outgoing Messages with CXF Logging InterceptorsChristof Rabensteiner1-0/+5
- Add loggin dependency. - Enable Message Logging for Services and Clients. - Add message logging config + examples to application.yaml
2019-08-23Fix: JAXB + Java >= 9 Class Loader Bug & Ensure Tomcat DeploymentChristof Rabensteiner1-19/+19
- Problem: Jaxb + JAVA >= 9 Runtime + Tomcat = ClassNotFoundException: ContextFactory. Reason: Apparently, jaxb uses the "wrong" classloader (the system classloader via the thread classloader) and this classloader does not know about jaxb api's and implementations at runtime since oracle decided to move jaxb* out of JRE. Solution: create a new thread, override the thread's "thread" classloader with the "class" classloader and do all jaxb interactions in that thread. See: https://sjhannah.com/blog/2018/11/21/jaxb-hell-on-jdk-9/ - Move "run jaxb interactions in own thread with class class loader" code into own component (JaxbClassNotFoundFix, runInTheadWithClassClassLoader) and wrap ClientFactory and Marshaller code into the "runInTheadWithClassClassLoader". - Ensure that app can be deployed in a Tomcat container (by following this guide: https://www.baeldung.com/spring-boot-war-tomcat-deploy)
2019-08-23Remove SSL Depending Testcases from Integration Test SuiteChristof Rabensteiner1-1/+8
- Reason: Now we can run integration tests without the need to set up SSL reverse proxy with client certificates.
2019-08-20Replace Thread.sleep with AwaitChristof Rabensteiner1-0/+7
2019-08-19Make war Artifact ExecutableChristof Rabensteiner1-0/+6
- See https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#build-tool-plugins-maven-packaging
2019-08-19Update Version of EAAF Components DependencyChristof Rabensteiner1-4/+4
- Also: Replace local repository with apps.egiz.gv.at/maven - Update Readme and remove cumbersome "build via local repo" guide.
2019-07-16Implement ForwardResponseToService Sink And All Its ImplicationsChristof Rabensteiner1-0/+4
MZS Schema Change: - Add configuration for ForwardResponseToServiceSink (add parameters in mzs:DeliveryRequest/Config) - Add sink configuration in application.yaml, convert from Spring Environment to ConfigType, and merge ConfigTypes. - Validate sink configuration completeness. Contract added: - Add contract mzs2app.wsdl: This contract specifies how mzs:DeliveryRequestStatus' and mzs:DeliveryNotifications are forwarded to the sender application. - Implement "ForwardResponseToService" Sink. - Add and implement MsgResponse.sendToMzsClient() : This is a somewhat unfortunate solution because, intuitively, sending should be done by it's caller, the "ForwardResponseToService"-sink. However, this solution prevents differences between msg:DeliveryRequestStatus and msg:DeliveryNotification (and code that needs to handle differences, i.e. sending) from sprawling outside of the respective MsgResponse derivatives. We move the entire "send" process into MsgResponse to prevent a hard-to-maintain "if type == notification then do x else to y" construct in ForwardResponseToServiceSink. Otherwise, introducing the MsgResponse wrapper was pointless.
2019-07-08Implement Zuse2App ServicesChristof Rabensteiner1-0/+6
- Add zuse2app.wsdl contract. - Add MsgResponse as an type-agnostic view for DeliveryRequestStatus and DeliveryNotification messages. Reason: Both DeliveryNotification and DeliveryRequestStatus messages have similar fields and need to be treated similarly (e.g.: receive from msg service, store to repository, verify signature, store to file...). In order to prevent duplicated code, the wrapper interface provides a type-agnostic view onto these messages for depending components to operate on. - Add MsgResponseHandler interface; decides how to process MsgResponse. Also implement this handler with a multi-threaded single-node implementation. - Add MsgResponseSink interface; decides how to archive MsgResponse. - Implement and test SafeResponseToFileSink. Change Identifier for MsgResponses: - Before, DeliveryRequestStatus and DeliveryNotifications had their own repositories. Now, both types are stored in the same repository (the MsgResponse repository) to streamline the handling of MsgResponses. We need to change the identification of MsgReponses, otherwise the identifiers (AppDeliveryID) clash. - MsgResponses are not identified by: <AppDeliveryId>+<typeSpecificSuffix> - Rewrite StoreSOAPInterceptor to accommodate fact that, both DeliveryRequestStatus and DeliveryNotification messages have different IDs upon storage / retrieval. Restructure packages and components as follows: - client: All components that are involved when consuming a web service. - process: "fabric" of MoaZS; contains business logic that orchestrates back-end tasks of MoaZS's operational services, e.g.: by processing a delivery request. - service: Implementation of MoaZS's front-end services. Refactoring: - MoaZSException: Remove unused fields. Before: Store mzsrequest, tnvzresult, msgrequest and msgresult as members. Now: Only keep the fields that are needed later, e.g for generating a msg:DeliveryRequestStatus element. Add copy constructor to Builder. - Put storage of byte[] into a dedicated "BinaryRepository". Reason: This was useful in a former design. Now it's not really needed anymore. - Put "create Endpoint" code into EndpointFactory. Reason: Eliminate duplicated code when configuring a service. Testing: - Activate Stacktraces in surefire.
2019-06-28Remove EgovUtils DependencyChristof Rabensteiner1-6/+0
- EgovUtils were needed because of DomUtils. Replace it with eaaf components' DomUtils. - Add test case to ensure SoapUtils still works as intended. - Remove unused import statement
2019-06-28Separate Test Suite into Unit- And Integration TestsChristof Rabensteiner1-0/+30
Per default, integration tests are excluded from build. They can be included with the `-P integration-test` argument. - Pom: Add maven profile for integration tests. - Rename integration tests (add `IT` prefix). - Move Resources into IT* folders. - Add MsgClientTest to test suite and add assertions to each test case.
2019-06-27Fixes; SSL Client Auth Works!Christof Rabensteiner1-1/+1
- Switch to java 12 for now. Reason: Bug [1] in JDK 11 (up to jdk-11+28) impairs SSLHandshake ("Unsupported Operation Exception"), but was fixed in Java 12. - Set HTTP policy to infinite. - Fix key/truststore path resolution - Fix NPE in ConfigUtil.merge - Rearrange application.yaml to include two config profiles (one with and one without SSL for the msg client). - Add key material for testcases (Note: expires: May 2 14:47:08 2020 GMT) - Update MsgClient Testcases [1] https://bugs.openjdk.java.net/browse/JDK-8214098
2019-06-26Protect MsgClient via SSL (ink Client Authentication)Christof Rabensteiner1-0/+5
- Add Component to create SSLContexts with own Key- and trust store. - Inject SSLContext into HTTP Client. - Add EAAF-Components Core Dependency, which is needed by SSLContextCreator (KeyStoreUtils). Schema Changes in mzs:DeliveryRequest/Config: - Got Rid of mzs:DeliveryRequest/Config/Server. In mzs 1.4.1, Server replaces the result of zkopf query person request. Since this zkopf interface does not exist anymore, Server was removed. - Add ClientType, which holds all parameters needed to connect to a service (Url, SSL params, a.o.). Configuration: - Add default parameters for SSL Clients in application.yaml. - Merge default parameters into incoming mzs:DeliveryRequests. MoaZSException Fixes: - Remove "Extends throwable" from Builder. - Add convenient shorthand init method (message, throwable). Refactor: - Put "determinePath" to FileUtils. - Put string related utility functions into StringUtils.
2019-06-13Fix moa-sig-lib's Integration IssuesChristof Rabensteiner1-5/+1
Fixing "ASN.1 creation error: iaik.asn1.CodingException: Length: Too large ASN.1 object: 109" - Set fallback value ('jks') for system property 'javax.net.ssl.keyStoreType' and 'javax.net.ssl.trustStoreType'. If system property is not defined, MoaSigConfig falls back to value from spring environment. Reason: Without this property explicitly set to JKS, the inclusion of eaaf-components-moa-sig-lib breaks the HTTP client builder and the ASN.1 creation error arises. See [1] for explanation. - Why fall back: Allows a user to configure these parameters via command line, but gives meaningful defaults in case of absent command line properties. Furthermore, these parameters can be configured via application.yaml or .properties. Others: - Set fallback value for system property 'moa.spss.server.configuration'. If system property is not defined, fall back to value from spring environment. Reason: Allows a user to configure these parameters via command line while providing meaningful defaults in case of absent command line properties. - Add switch 'moa.spss.is-active' to enable / disable signature verification. - Change log levels of at.gv.* and iaik.* packages to INFO - Add default certstore (copied from EAAF Components). - Add mzs root certificate to cert- and truststore. - Update readme's installation requirements and guide. Refactor: - Extract public interface of SignatureVerification class. - Rename trustprofile folder. [1] Why eaaf-components-moa-sig-lib breaks HTTP client: - Including eaaf-components-moa-sig-lib includes IAIK's jca/jce and xsect, which in turn injects the iaik provider for cryptographic operations and its own key store (iaik.pkcs.pkcs12.PKCS12KeyStore). - The Apache HTTP client builder will ask for a java.base/javax.net.ssl.SSLSocketFactory because it creates an SSL context, even if the connection runs without SSL. - Somewhere down the stack, this will trigger the TrustStoreManager to hand over the systems default trust store (a JKS file) to IAIK's PKCS12KeyStore. This happens if the type properties of the trust stores are not set. - Oracle relaxed a precondition of this trust store (somewhere in between Java 8 and 11) in the TrustStoreManager: Formerly, the trust store was a JKS object. Now, the trust store can be both a JKS and a PKCS12 object. The TrustStoreManager expects the key store to handle both types, and Oracle's keystore does. However, IAIK's key store cannot handle a JKS object, but since eaaf-components-moa-sig-lib was included, the IAIK key store comes first. - PKCS12KeyStore expects a PKCS12 file but receives a JKS file -> Parser Error.
2019-05-29Integrate MoaSig Verification into SignatureVerifierChristof Rabensteiner1-2/+1
- Verify signature via ISignatureVerificationService. - Override System Property moa.spss.server.configuration via spring's environment (Reason: can configure path to moa SPSS config file via application.yaml & moa SPSS needs this parameter to find the config file) - Setup test configuration directory for moaspss in src/main/resources/moa-spss - Readme: Explain how to install moaspss' dependencies into local repository.
2019-05-28Add Moa Sig Dependency & Configure Logging & Init ReadmeChristof Rabensteiner1-2/+26
- Reduce logger output of all contexts to ERROR and WARN Statements; Moazs can log to INFO. Reason: Including moa-sig causes lots of DEBUG / TRACE logging . - Add Repository that points to file://${basedir}/repository. - Add guide how to compile project (I dont check moa-sig depenendcies into repository but explain how to retrieve dependencies manually in readme.md.)
2019-05-28Integrate Sign.Verification and Improve Error Handling of PipelineChristof Rabensteiner1-1/+2
- Ensure proper communication of errors between pipeline and mzs service by converting MoaZSExceptions into DeliveryRequestStatus messages. - Revise MoaZSException: Add optional fields; those fields are a) helpful to construct meaningful error messages and b) optional because, depending on where an exception appears, either existent or non-existent and thus optional. Add inner-class Builder. - Integrate Signature Verification into pipeline and add Stub for SignatureVerification. - Move TNVZResponse's Mimetype check into dedicated class (Reason: separate abstration layers). - Update api changes in testcases.
2019-05-27Intercept Incoming DeliveryRequestStatus and Store as byte[]Christof Rabensteiner1-0/+7
- Add egovutils dependency (Reason: Need DomUtils to serialize / unserialize Soap Message via DOMParser) - Add Incerceptor to MsgClient / -Factory that stores the message content byte-by-byte in the DeliveryRepository. The format is required for successfully validating a DeliveryRequestStatus. - Add SoapUtils, which interacts with byte[] Soap message. - Add CXFMessageUtils, which interacts with CXF Messages from interceptor chains. - Refactor xsd namespaces: Move them out from the PrefixMapper and into a dedicated class.
2019-05-23Refactor: Cleanup CodesmellsChristof Rabensteiner1-7/+0
- Remove unused imports, commented code and copy-pasted code
2019-05-21WIP: SSL Client AuthChristof Rabensteiner1-0/+7
- Refactor MsgClient: Not a Singleton anymore. Use MsgClientFactory to make a client. Make request and config private fields. - Add configuration parameters to application.yaml. - Init SSL client auth testcase, but dont include in testsuite because it aint working yet.
2019-05-10Setup Code Coverage Reports Via jacocoChristof Rabensteiner1-0/+32
2019-05-10Fix Hardcoded WSDL locationsChristof Rabensteiner1-3/+3
2019-05-08Refactor pom.xml: Prevent Copy-Paste Arguments with Default OptionsChristof Rabensteiner1-28/+15
2019-05-08Refactor pom.xml: Eliminate Duplicated Namespaces and PackagesChristof Rabensteiner1-26/+26
2019-05-06Add zusetnvz SchemaChristof Rabensteiner1-0/+17
2019-05-06Remove Needless zusemsg Scheme Binding ArgumentsChristof Rabensteiner1-6/+0
- Reason: Redefining mzs packages is not neccessary for zusemsg related jaxb classes because zusemsg does not rely on mzs.
2019-05-06Change Package Namespaces of JAXB Generated SourcesChristof Rabensteiner1-1/+25
- Reason: Improves readability and makes import statetemens shorter and more consistent
2019-04-30Generate SoapFault instead of DRStatus/Error MessageChristof Rabensteiner1-8/+0
- App2MZS Server: Instead of generating a DeliveryRequestStatus/Error Message, we throw an exception. This will generate a SoapFault (including a 500 http status code), which is more appropriate. - Fix possible NPE of deliveryRequest.getMetadata().getAppDeliveryID() by moving appDeliveryID initialization into the TimeOutException catch block - pom.xml: Remove hamcrest dependency, as not needed for now.
2019-04-30Add Optional mzs:DeliveryRequest/Config & Validate / Augment ItChristof Rabensteiner1-0/+14
Add Optional "Config" to MZS Schema: - Add mzs:DeliveryRequest/Config Element with a "PerformQueryPersonRequest" node - The config element contains parameters that are interpreted by moa-zs and not forwarded to the ZD - The boolean PerformQueryPersonRequest tells moa-zs if moa-zs should perform a QueryPersonRequest towards the TNVZ. - If config is missing, moa-zs augments the delivery request with parameters from the app's configuartion or the default configuartion Other Changes: - Validate and augment incoming requests with the DeliveryPreprocessor. - Add stub for TlnvzClient. - Remove some leftover ObjectFactory imports (because of the builder they are not needed anymore) Fixes - Fixed incorrect API usage of Messageformat.format: format string needs an index. pom.xml - Add Hamcrest Dependency (for writing more expressive tests) - Add copy constructor to JAXB Builder Testing - Test validation of incoming request - Refactor testcases to improve readability
2019-04-29Make JAXB Objects Immutable and Add Builder UtilityChristof Rabensteiner1-1/+13
- Use Immutable-XJC from https://github.com/sabomichal/immutable-xjc - Update existing JAXB-object manipulations to use the Builder - Remove jaxbMarshallerTest (as it relies on mutable JAXB interfaces) Reason for making JAXB objects immutable: I put JAXB objects in the repository. Depending on the configuration, the repository can be a simple hashmap; in that case I might end up sharing JAXB objects between threads. Immutable shared object should make life a little simpler.
2019-04-29Fix GroupIDChristof Rabensteiner1-1/+1
2019-04-17Add Redis and InMemory Implementation of DeliveryRequestRepositoryChristof Rabensteiner1-0/+7
- Deployer can choose which implementation to use (by activating - corresponding profile) - Add guava dependency - Extract DeliveryRequestRepository to Interface - Implement InMemory Repository using guava's cache
2019-04-16Store incoming delivery request on redis serverChristof Rabensteiner1-5/+28
- Connect to Redis server and implement RedisRepository - Add redis dependencies (spring-boot-starter, jedis, apache commons io). Latter dependencies are apparently needed and not included in the sprint-boot-starter; See https://github.com/spring-projects/spring-boot/issues/5718 and https://www.concretepage.com/questions/599 - Connect DeliveryRequestHandler to RedisRepository - Rewrote Marshalling: replace JaxbContext with spring-oxm JaxbMarshaller - Catch and log all exceptions in App2MZSService; Former: certain exceptions would go unnoticed, e.g. ConnectionRefused
2019-04-08Add app2zuse WSDL and FriendsChristof Rabensteiner1-0/+4
2019-04-03Change MZS Namespaces (again)Christof Rabensteiner1-1/+1
2019-04-03Cleanup WSDL resourcesChristof Rabensteiner1-1/+1
- Switch to mzs1.5.3-rc1 and rename to mzs 2.0.0 - remove app2mzs scheme sources from other versions
2019-03-19Init Repo + Contract App2mzsChristof Rabensteiner1-0/+90
- Can generate java sources with wsdl2java (mvn generate-sources) - Add multiple versions of app2mzs because I don't know which one is right. - Fix zuseutil's wsdl (import statement) - Remove header in 1.5.3-rc1's wsdl