aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources
diff options
context:
space:
mode:
authorChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-07-12 15:40:05 +0200
committerChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-07-12 15:40:05 +0200
commit25d68c8900c2cc791f03ea3db173955ca237fd55 (patch)
treef4d28b97845d10a709590dce480195b322ba019b /src/main/resources
parent9dc0e72571a895e34a55c11d015c5d359b485aff (diff)
downloadmoa-zs-25d68c8900c2cc791f03ea3db173955ca237fd55.tar.gz
moa-zs-25d68c8900c2cc791f03ea3db173955ca237fd55.tar.bz2
moa-zs-25d68c8900c2cc791f03ea3db173955ca237fd55.zip
Allow App To Choose Between MsgResponse Sinks
- MZS Schema Change: Add "MsgResponseSinks" element to mzs:DeliveryRequest/Config that allows sender to configure how MsgResponses should be archived. - ConfigUtil: Interpret MsgResponseSink parameters from Spring Environment and merge with ConfigType. - MsgResponseBackend: Send responses to sinks according to MsgResponseSinks in Config - application.yaml: Add MsgResponseSinks parameter to configuration. - Uncouple Sink implementations from java.util.function.Function, because the sink interfaces are going to differ and there is no need to unite them under one interface. - Add and test LogResponseSink, which logs responses to it's logger. - MsgResponse: Add JAXB getter for response. Reason: Can be passed to marshaller.
Diffstat (limited to 'src/main/resources')
-rw-r--r--src/main/resources/application.yaml60
-rw-r--r--src/main/resources/mzs/app2mzs.xsd8
2 files changed, 41 insertions, 27 deletions
diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml
index 0e7b67e..a04a903 100644
--- a/src/main/resources/application.yaml
+++ b/src/main/resources/application.yaml
@@ -1,11 +1,18 @@
-spring:
- redis:
- host: 172.17.0.2
- port: 6379
+### Logging
+logging:
+ level:
+ root: WARN
+ org.springframework: WARN
+ at.gv: INFO #DEBUG
+ iaik: INFO #DEBUG
+ at.gv.egiz.moazs.backend:
+ SignatureVerifier: DEBUG
+ LogResponseSink: INFO
-## activate cluster mode
-# profiles:
-# active: cluster
+# Default type for java's ssl key/trust store
+javax.net.ssl:
+ keyStoreType: jks
+ trustStoreType: jks
# Configure parameters here or in DeliveryRequest/Config.
# Choose a profile in DeliveryRequest/Config/ProfileId.
@@ -23,8 +30,12 @@ delivery-request-configuration-profiles:
# 0 means indefinitely.
receive-timeout: 0
+ # Specifies how MoaZS should
+ msg-response-sinks:
+ save-response-to-file: false
+ log-response: true
+
ssl-profile:
- perform-query-person-request: false
msg-client:
url: https://localhost/zusemsg/services/DeliveryRequest
ssl:
@@ -43,24 +54,10 @@ delivery-request-configuration-profiles:
## JKS or PKCS12
type: PKCS12
-## If set to false, moa zs ignores an incomplete default DeliveryRequest-configuration
-## profile and continues startup. See 'delivery-request-configuration-profiles'.
-## Default value: true
-# verify-completeness-of-default-delivery-request-configuration: false
-
-### logging
-logging:
- level:
- root: WARN
- org.springframework: WARN
- at.gv: INFO #DEBUG
- iaik: INFO #DEBUG
- at.gv.egiz.moazs.backend.SignatureVerifier: DEBUG
-
-# default type for java's ssl key/trust store
-javax.net.ssl:
- keyStoreType: jks
- trustStoreType: jks
+# If set to false, moa zs ignores an incomplete default DeliveryRequest-configuration
+# profile and continues startup. See 'delivery-request-configuration-profiles'.
+# Default value: true
+verify-completeness-of-default-delivery-request-configuration: true
### moa spss config
moa.spss:
@@ -74,6 +71,15 @@ moa.spss:
configuration: moa-spss/MOASPSSConfiguration.xml
default-trustprofile: test-trustprofile
+spring:
+ redis:
+ host: 172.17.0.2
+ port: 6379
+
repository:
# duration in minutes before repository records are evicted.
- expiresAfterWrite: 30 \ No newline at end of file
+ expiresAfterWrite: 30
+
+## activate cluster mode
+# profiles:
+# active: cluster
diff --git a/src/main/resources/mzs/app2mzs.xsd b/src/main/resources/mzs/app2mzs.xsd
index 659bbb9..ba99eab 100644
--- a/src/main/resources/mzs/app2mzs.xsd
+++ b/src/main/resources/mzs/app2mzs.xsd
@@ -98,6 +98,7 @@
<xs:element name="PerformQueryPersonRequest" type="xs:boolean" minOccurs="0" />
<xs:element ref="MSGClient" minOccurs="0" />
<xs:element ref="TNVZClient" minOccurs="0" />
+ <xs:element ref="MsgResponseSinks" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<xs:element name="MSGClient" type="ClientType" />
@@ -128,6 +129,13 @@
<xs:element name="FileType" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
+ <xs:element name="MsgResponseSinks" type="MsgResponseSinksType"/>
+ <xs:complexType name="MsgResponseSinksType">
+ <xs:sequence>
+ <xs:element name="SafeResponseToFile" type="xs:boolean" minOccurs="0" />
+ <xs:element name="LogResponse" type="xs:boolean" minOccurs="0" />
+ </xs:sequence>
+ </xs:complexType>
<xs:element name="DeliveryResponse" type="DeliveryResponseType"/>
<xs:complexType name="DeliveryResponseType">
<xs:choice>