From fe42982cce9fe4fac9d57315ad08fe696e2cd90e Mon Sep 17 00:00:00 2001 From: basketmc Date: Fri, 23 Jun 2023 19:37:33 +0200 Subject: [PATCH] 0.15.1: - Konnektor-Webservices auf der Basis der JDK Coretto 17 --- CHANGELOG.md | 15 ++ ...-telematik-authsignatureservice_v7_4_0.xjb | 28 --- ...-telematik-authsignatureservice_v7_4_1.xjb | 28 --- api/api-telematik-cardservice_v8_1_0.xjb | 28 --- api/api-telematik-cardservice_v8_1_1.xjb | 28 --- api/api-telematik-cardservice_v8_1_2.xjb | 28 --- ...i-telematik-cardterminalservice_v1_1_0.xjb | 28 --- ...pi-telematik-certificateservice_v6_0_0.xjb | 28 --- ...pi-telematik-certificateservice_v6_0_1.xjb | 28 --- ...api-telematik-encryptionservice_v6_1_0.xjb | 28 --- ...api-telematik-encryptionservice_v6_1_1.xjb | 28 --- api/api-telematik-eventservice_v7_2_0.xjb | 28 --- api/api-telematik-signatureservice_v7_4_0.xjb | 28 --- api/api-telematik-signatureservice_v7_4_2.xjb | 28 --- api/api-telematik-signatureservice_v7_5_5.xjb | 28 --- pom.xml | 161 ++---------------- .../java/net/sberg/openkim/AppConfig.java | 2 +- .../openkim/fachdienst/FachdienstService.java | 2 +- .../openkim/gateway/pop3/Pop3Gateway.java | 6 +- .../pop3/signreport/SignReportService.java | 2 +- .../openkim/gateway/smtp/SmtpGateway.java | 4 +- .../openkim/konfiguration/Konfiguration.java | 2 +- .../konfiguration/KonfigurationService.java | 20 ++- .../sberg/openkim/konnektor/CMSAttribute.java | 8 +- .../EnumKonnektorServiceBeanType.java | 12 +- .../openkim/konnektor/KonnektorService.java | 2 +- .../konnektor/KonnektorServiceBean.java | 2 +- .../konnektor/KonnektorVzdController.java | 3 +- .../KonnektorWebserviceController.java | 5 +- .../openkim/log/DefaultLoggerContext.java | 7 +- .../openkim/pipeline/PipelineOperation.java | 5 +- .../pipeline/PipelineOperationScanner.java | 138 --------------- .../openkim/pipeline/PipelineService.java | 40 +++-- .../operation/IPipelineOperation.java | 3 - .../GetDecryptCardHandleOperation.java | 16 +- .../konnektor/GetSignCardHandleOperation.java | 12 +- ...nnektorConnectionInformationOperation.java | 14 +- ...nektorLoadAllCardInformationOperation.java | 25 +-- .../dns/DnsFqdnRequestOperation.java | 2 + .../konnektor/dns/DnsRequestOperation.java | 2 + .../konnektor/ntp/NtpRequestOperation.java | 2 + .../konnektor/vzd/LoadVzdCertsOperation.java | 2 + .../konnektor/vzd/SearchVzdOperation.java | 2 + .../webservice/DecryptDocumentOperation.java | 12 +- .../webservice/EncryptDocumentOperation.java | 12 +- .../webservice/GetCardTerminalsOperation.java | 8 +- .../webservice/GetCardsOperation.java | 8 +- .../webservice/GetJobNumberOperation.java | 8 +- .../webservice/GetPinStatusOperation.java | 8 +- .../GetResourceInformationOperation.java | 12 +- .../ReadCardCertificateOperation.java | 8 +- .../webservice/RequestCardOperation.java | 10 +- .../VerifyCardCertificateOperation.java | 8 +- .../webservice/VerifyPinOperation.java | 8 +- .../VerifySignedDocumentOperation.java | 8 +- .../CheckEncryptedMailFormatOperation.java | 10 +- .../mail/CheckSendingMailOperation.java | 2 + .../mail/ComposeEncryptedMailOperation.java | 2 + .../operation/mail/CreateDsnOperation.java | 2 + .../CreateEmbeddedMessageRfc822Operation.java | 2 + .../mail/DecryptVerifyMailOperation.java | 26 ++- .../EncryptMailOperation.java | 14 +- .../operation/mail/SendDsnOperation.java | 2 + .../mail/SignEncryptMailOperation.java | 28 ++- .../SignMailOperation.java | 23 ++- .../mail/part/AddMailAttachmentOperation.java | 10 +- .../mail/part/AddMailTextOperation.java | 10 +- .../mail/part/AnalyzeMailPartsOperation.java | 2 + .../operation/test/TestOperation.java | 2 + src/main/resources/api/AccountLimit.yaml | 18 +- src/main/resources/api/AccountManager.yaml | 151 ++++++++++++++-- src/main/resources/api/AttachmentService.yaml | 78 ++++++++- src/main/resources/application.yml | 3 - .../konnwebservice/certificateUebersicht.html | 4 +- .../konnwebservice/encryptionUebersicht.html | 6 +- .../konnwebservice/eventUebersicht.html | 6 +- .../konnwebservice/signatureUebersicht.html | 6 +- 77 files changed, 502 insertions(+), 923 deletions(-) delete mode 100644 api/api-telematik-authsignatureservice_v7_4_0.xjb delete mode 100644 api/api-telematik-authsignatureservice_v7_4_1.xjb delete mode 100644 api/api-telematik-cardservice_v8_1_0.xjb delete mode 100644 api/api-telematik-cardservice_v8_1_1.xjb delete mode 100644 api/api-telematik-cardservice_v8_1_2.xjb delete mode 100644 api/api-telematik-cardterminalservice_v1_1_0.xjb delete mode 100644 api/api-telematik-certificateservice_v6_0_0.xjb delete mode 100644 api/api-telematik-certificateservice_v6_0_1.xjb delete mode 100644 api/api-telematik-encryptionservice_v6_1_0.xjb delete mode 100644 api/api-telematik-encryptionservice_v6_1_1.xjb delete mode 100644 api/api-telematik-eventservice_v7_2_0.xjb delete mode 100644 api/api-telematik-signatureservice_v7_4_0.xjb delete mode 100644 api/api-telematik-signatureservice_v7_4_2.xjb delete mode 100644 api/api-telematik-signatureservice_v7_5_5.xjb delete mode 100644 src/main/java/net/sberg/openkim/pipeline/PipelineOperationScanner.java rename src/main/java/net/sberg/openkim/pipeline/operation/{konnektor/webservice => mail}/EncryptMailOperation.java (94%) rename src/main/java/net/sberg/openkim/pipeline/operation/{konnektor/webservice => mail}/SignMailOperation.java (93%) diff --git a/CHANGELOG.md b/CHANGELOG.md index e1df845..9a7188f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ``` ``` +## [0.15.1] + +### Added +``` +``` + +### Changed +``` +``` + +### Fixed +``` + +``` + ## [0.15.0] ### Added diff --git a/api/api-telematik-authsignatureservice_v7_4_0.xjb b/api/api-telematik-authsignatureservice_v7_4_0.xjb deleted file mode 100644 index 61e3093..0000000 --- a/api/api-telematik-authsignatureservice_v7_4_0.xjb +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/api/api-telematik-authsignatureservice_v7_4_1.xjb b/api/api-telematik-authsignatureservice_v7_4_1.xjb deleted file mode 100644 index 6d3d8f0..0000000 --- a/api/api-telematik-authsignatureservice_v7_4_1.xjb +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/api/api-telematik-cardservice_v8_1_0.xjb b/api/api-telematik-cardservice_v8_1_0.xjb deleted file mode 100644 index cce26ea..0000000 --- a/api/api-telematik-cardservice_v8_1_0.xjb +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/api/api-telematik-cardservice_v8_1_1.xjb b/api/api-telematik-cardservice_v8_1_1.xjb deleted file mode 100644 index b7ee63a..0000000 --- a/api/api-telematik-cardservice_v8_1_1.xjb +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/api/api-telematik-cardservice_v8_1_2.xjb b/api/api-telematik-cardservice_v8_1_2.xjb deleted file mode 100644 index a98df92..0000000 --- a/api/api-telematik-cardservice_v8_1_2.xjb +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/api/api-telematik-cardterminalservice_v1_1_0.xjb b/api/api-telematik-cardterminalservice_v1_1_0.xjb deleted file mode 100644 index 7058844..0000000 --- a/api/api-telematik-cardterminalservice_v1_1_0.xjb +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/api/api-telematik-certificateservice_v6_0_0.xjb b/api/api-telematik-certificateservice_v6_0_0.xjb deleted file mode 100644 index a105ef4..0000000 --- a/api/api-telematik-certificateservice_v6_0_0.xjb +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/api/api-telematik-certificateservice_v6_0_1.xjb b/api/api-telematik-certificateservice_v6_0_1.xjb deleted file mode 100644 index 2dd9112..0000000 --- a/api/api-telematik-certificateservice_v6_0_1.xjb +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/api/api-telematik-encryptionservice_v6_1_0.xjb b/api/api-telematik-encryptionservice_v6_1_0.xjb deleted file mode 100644 index bc3017d..0000000 --- a/api/api-telematik-encryptionservice_v6_1_0.xjb +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/api/api-telematik-encryptionservice_v6_1_1.xjb b/api/api-telematik-encryptionservice_v6_1_1.xjb deleted file mode 100644 index 495afec..0000000 --- a/api/api-telematik-encryptionservice_v6_1_1.xjb +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/api/api-telematik-eventservice_v7_2_0.xjb b/api/api-telematik-eventservice_v7_2_0.xjb deleted file mode 100644 index 1b8229c..0000000 --- a/api/api-telematik-eventservice_v7_2_0.xjb +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/api/api-telematik-signatureservice_v7_4_0.xjb b/api/api-telematik-signatureservice_v7_4_0.xjb deleted file mode 100644 index 81ad1e0..0000000 --- a/api/api-telematik-signatureservice_v7_4_0.xjb +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/api/api-telematik-signatureservice_v7_4_2.xjb b/api/api-telematik-signatureservice_v7_4_2.xjb deleted file mode 100644 index a03b63a..0000000 --- a/api/api-telematik-signatureservice_v7_4_2.xjb +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/api/api-telematik-signatureservice_v7_5_5.xjb b/api/api-telematik-signatureservice_v7_5_5.xjb deleted file mode 100644 index 06732f0..0000000 --- a/api/api-telematik-signatureservice_v7_5_5.xjb +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/pom.xml b/pom.xml index 6ce9f67..dfc7156 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ net.sberg openkim - 0.15.0 + 0.15.1 openkim Open KIM Client Modul @@ -45,6 +45,10 @@ org.springframework.boot spring-boot-starter-thymeleaf + + org.apache.httpcomponents.client5 + httpclient5 + org.thymeleaf.extras thymeleaf-extras-springsecurity6 @@ -69,17 +73,8 @@ org.apache.commons commons-text - - - org.apache.commons - commons-text - 1.10.0 - org.apache.james metrics-logger @@ -94,10 +89,6 @@ org.apache.james james-server-jwt - @@ -145,16 +136,6 @@ httpclient 4.5.14 - - org.ow2.asm - asm - 9.1 - - - commons-beanutils - commons-beanutils - 1.9.4 - commons-net commons-net @@ -165,11 +146,6 @@ javax.jws-api 1.1 - - com.fasterxml.jackson.core - jackson-databind - 2.14.0 - io.swagger swagger-annotations @@ -200,25 +176,13 @@ org.webjars bootstrap 4.5.3 - - - com.sun.xml.ws - jaxws-ri - 4.0.0 - pom - jakarta.mail - jakarta.mail-api + org.webjars + jquery - - com.sun.xml.bind - jaxb-ri - 4.0.1 - pom - org.webjars jquery @@ -240,26 +204,16 @@ 1.18.24 provided - + @@ -292,7 +246,7 @@ org.apache.cxf cxf-codegen-plugin - 3.5.3 + 4.0.2 encryption-service @@ -303,126 +257,42 @@ ${project.basedir}/api/api-telematik/conn/EventService.wsdl - - ${project.basedir}/api/api-telematik-eventservice_v7_2_0.xjb - - - -verbose - - - - ${project.basedir}/api/api-telematik/conn/CertificateService.wsdl - - ${project.basedir}/api/api-telematik-certificateservice_v6_0_0.xjb - -verbose ${project.basedir}/api/api-telematik/conn/CertificateService_v6_0_1.wsdl - - ${project.basedir}/api/api-telematik-certificateservice_v6_0_1.xjb - - - -verbose - - - - ${project.basedir}/api/api-telematik/conn/AuthSignatureService.wsdl - - ${project.basedir}/api/api-telematik-authsignatureservice_v7_4_0.xjb - -verbose ${project.basedir}/api/api-telematik/conn/AuthSignatureService_v7_4_1.wsdl - - ${project.basedir}/api/api-telematik-authsignatureservice_v7_4_1.xjb - -verbose ${project.basedir}/api/api-telematik/conn/CardTerminalService.wsdl - - ${project.basedir}/api/api-telematik-cardterminalservice_v1_1_0.xjb - - - -verbose - - - - ${project.basedir}/api/api-telematik/conn/CardService.wsdl - - ${project.basedir}/api/api-telematik-cardservice_v8_1_0.xjb - - - -verbose - - - - ${project.basedir}/api/api-telematik/conn/CardService_v8_1_1.wsdl - - ${project.basedir}/api/api-telematik-cardservice_v8_1_1.xjb - -verbose ${project.basedir}/api/api-telematik/conn/CardService_v8_1_2.wsdl - - ${project.basedir}/api/api-telematik-cardservice_v8_1_2.xjb - - - -verbose - - - - ${project.basedir}/api/api-telematik/conn/EncryptionService.wsdl - - ${project.basedir}/api/api-telematik-encryptionservice_v6_1_0.xjb - -verbose ${project.basedir}/api/api-telematik/conn/EncryptionService_v6_1_1.wsdl - - ${project.basedir}/api/api-telematik-encryptionservice_v6_1_1.xjb - - - -verbose - - - - ${project.basedir}/api/api-telematik/conn/SignatureService.wsdl - - ${project.basedir}/api/api-telematik-signatureservice_v7_4_0.xjb - - - -verbose - - - - ${project.basedir}/api/api-telematik/conn/SignatureService_V7_4_2.wsdl - - ${project.basedir}/api/api-telematik-signatureservice_v7_4_2.xjb - -verbose ${project.basedir}/api/api-telematik/conn/SignatureService_V7_5_5.wsdl - - ${project.basedir}/api/api-telematik-signatureservice_v7_5_5.xjb - -verbose @@ -438,7 +308,7 @@ org.openapitools openapi-generator-maven-plugin - 5.4.0 + 6.6.0 KAS @@ -455,8 +325,9 @@ resttemplate java8 - src/generated/java + / true + true @@ -475,8 +346,9 @@ resttemplate java8 - src/generated/java + / true + true @@ -495,8 +367,9 @@ resttemplate java8 - src/generated/java + / true + true diff --git a/src/main/java/net/sberg/openkim/AppConfig.java b/src/main/java/net/sberg/openkim/AppConfig.java index 2ab558a..be08209 100644 --- a/src/main/java/net/sberg/openkim/AppConfig.java +++ b/src/main/java/net/sberg/openkim/AppConfig.java @@ -17,6 +17,7 @@ package net.sberg.openkim; +import jakarta.annotation.PostConstruct; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -28,7 +29,6 @@ import org.springframework.web.filter.CharacterEncodingFilter; import org.springframework.web.servlet.view.json.MappingJackson2JsonView; -import javax.annotation.PostConstruct; import java.security.Security; @Configuration diff --git a/src/main/java/net/sberg/openkim/fachdienst/FachdienstService.java b/src/main/java/net/sberg/openkim/fachdienst/FachdienstService.java index 1b847f8..80a302e 100644 --- a/src/main/java/net/sberg/openkim/fachdienst/FachdienstService.java +++ b/src/main/java/net/sberg/openkim/fachdienst/FachdienstService.java @@ -20,6 +20,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import de.gematik.kim.kas.ApiClient; import de.gematik.kim.kas.api.AttachmentsApi; +import jakarta.annotation.PostConstruct; import net.sberg.openkim.konfiguration.EnumTIEnvironment; import net.sberg.openkim.konfiguration.Konfiguration; import net.sberg.openkim.konnektor.Konnektor; @@ -38,7 +39,6 @@ import org.springframework.web.client.RestTemplate; import org.xbill.DNS.Type; -import javax.annotation.PostConstruct; import java.util.ArrayList; import java.util.Iterator; import java.util.List; diff --git a/src/main/java/net/sberg/openkim/gateway/pop3/Pop3Gateway.java b/src/main/java/net/sberg/openkim/gateway/pop3/Pop3Gateway.java index 256a9f9..7b69aff 100644 --- a/src/main/java/net/sberg/openkim/gateway/pop3/Pop3Gateway.java +++ b/src/main/java/net/sberg/openkim/gateway/pop3/Pop3Gateway.java @@ -16,11 +16,13 @@ */ package net.sberg.openkim.gateway.pop3; +import jakarta.annotation.PostConstruct; +import jakarta.annotation.PreDestroy; import net.sberg.openkim.gateway.GatewayNettyServer; +import net.sberg.openkim.gateway.pop3.signreport.SignReportService; import net.sberg.openkim.konfiguration.Konfiguration; import net.sberg.openkim.konfiguration.KonfigurationService; import net.sberg.openkim.log.LogService; -import net.sberg.openkim.gateway.pop3.signreport.SignReportService; import net.sberg.openkim.pipeline.PipelineService; import org.apache.james.protocols.api.Encryption; import org.apache.james.protocols.api.Protocol; @@ -31,8 +33,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import javax.annotation.PostConstruct; -import javax.annotation.PreDestroy; import java.net.InetSocketAddress; @Service diff --git a/src/main/java/net/sberg/openkim/gateway/pop3/signreport/SignReportService.java b/src/main/java/net/sberg/openkim/gateway/pop3/signreport/SignReportService.java index 5f0f329..76ff6de 100644 --- a/src/main/java/net/sberg/openkim/gateway/pop3/signreport/SignReportService.java +++ b/src/main/java/net/sberg/openkim/gateway/pop3/signreport/SignReportService.java @@ -17,6 +17,7 @@ package net.sberg.openkim.gateway.pop3.signreport; import com.fasterxml.jackson.databind.ObjectMapper; +import jakarta.xml.bind.JAXBElement; import net.sberg.openkim.common.StringUtils; import net.sberg.openkim.common.metrics.DefaultMetricFactory; import net.sberg.openkim.konnektor.Konnektor; @@ -34,7 +35,6 @@ import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; -import javax.xml.bind.JAXBElement; import java.io.ByteArrayInputStream; import java.io.File; import java.security.cert.Certificate; diff --git a/src/main/java/net/sberg/openkim/gateway/smtp/SmtpGateway.java b/src/main/java/net/sberg/openkim/gateway/smtp/SmtpGateway.java index 2ebe875..a3ca173 100644 --- a/src/main/java/net/sberg/openkim/gateway/smtp/SmtpGateway.java +++ b/src/main/java/net/sberg/openkim/gateway/smtp/SmtpGateway.java @@ -16,6 +16,8 @@ */ package net.sberg.openkim.gateway.smtp; +import jakarta.annotation.PostConstruct; +import jakarta.annotation.PreDestroy; import net.sberg.openkim.gateway.GatewayNettyServer; import net.sberg.openkim.gateway.smtp.hook.SmtpGatewayMailHook; import net.sberg.openkim.gateway.smtp.hook.SmtpGatewayQuitHook; @@ -32,8 +34,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import javax.annotation.PostConstruct; -import javax.annotation.PreDestroy; import java.net.InetSocketAddress; import java.util.Arrays; diff --git a/src/main/java/net/sberg/openkim/konfiguration/Konfiguration.java b/src/main/java/net/sberg/openkim/konfiguration/Konfiguration.java index 107f9f7..e71d83b 100644 --- a/src/main/java/net/sberg/openkim/konfiguration/Konfiguration.java +++ b/src/main/java/net/sberg/openkim/konfiguration/Konfiguration.java @@ -66,7 +66,7 @@ public class Konfiguration { @JsonIgnore private MultipartFile fachdienstCertFile; - private String xkimCmVersion = "OpenKIM_0.14.0"; + private String xkimCmVersion = "OpenKIM_0.15.1"; private String xkimPtVersion = "1.5.0-2"; private String xkimPtShortVersion = "1.5"; diff --git a/src/main/java/net/sberg/openkim/konfiguration/KonfigurationService.java b/src/main/java/net/sberg/openkim/konfiguration/KonfigurationService.java index ccced0c..5a52845 100644 --- a/src/main/java/net/sberg/openkim/konfiguration/KonfigurationService.java +++ b/src/main/java/net/sberg/openkim/konfiguration/KonfigurationService.java @@ -17,15 +17,16 @@ package net.sberg.openkim.konfiguration; import com.fasterxml.jackson.databind.ObjectMapper; +import jakarta.annotation.PostConstruct; +import net.sberg.openkim.common.EnumMailConnectionSecurity; import net.sberg.openkim.common.FileUtils; import net.sberg.openkim.common.ICommonConstants; import net.sberg.openkim.common.StringUtils; -import net.sberg.openkim.common.EnumMailConnectionSecurity; +import net.sberg.openkim.konfiguration.minimal.MinimalKonfiguration; import net.sberg.openkim.konnektor.EnumKonnektorAuthMethod; import net.sberg.openkim.konnektor.Konnektor; import net.sberg.openkim.konnektor.KonnektorService; import net.sberg.openkim.konnektor.KonnektorServiceBean; -import net.sberg.openkim.konfiguration.minimal.MinimalKonfiguration; import net.sberg.openkim.log.DefaultLogger; import net.sberg.openkim.log.DefaultLoggerContext; import net.sberg.openkim.log.LogService; @@ -35,7 +36,6 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; -import javax.annotation.PostConstruct; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; @@ -43,8 +43,10 @@ import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; import java.text.MessageFormat; +import java.util.ArrayList; import java.util.Base64; import java.util.Iterator; +import java.util.List; @Service public class KonfigurationService { @@ -193,10 +195,19 @@ private void read() throws Exception { str = StringUtils.xor(str, encryptionKeys.split(",")); } catch (Exception e) {} - konfiguration = new ObjectMapper().readValue(str, Konfiguration.class); + + Konfiguration konfiguration = new ObjectMapper().readValue(str, Konfiguration.class); if (encryptPasswords) { konfiguration.decryptPwds(encryptionKeys); } + List konnektorList = new ArrayList<>(); + if (this.konfiguration != null) { + konnektorList.addAll(this.konfiguration.getKonnektoren()); + } + this.konfiguration = konfiguration; + if (konnektorList.size() > 0) { + this.konfiguration.setKonnektoren(konnektorList); + } } public String speichern(Konfiguration konfiguration) throws Exception { @@ -359,6 +370,7 @@ public String speichernKonnektor(Konnektor konnektor) throws Exception { } else { konfiguration.getKonnektoren().add(konnektor); } + write(); read(); return "ok"; diff --git a/src/main/java/net/sberg/openkim/konnektor/CMSAttribute.java b/src/main/java/net/sberg/openkim/konnektor/CMSAttribute.java index 743f0ec..8ad2101 100644 --- a/src/main/java/net/sberg/openkim/konnektor/CMSAttribute.java +++ b/src/main/java/net/sberg/openkim/konnektor/CMSAttribute.java @@ -16,10 +16,10 @@ */ package net.sberg.openkim.konnektor; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlValue; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlValue; @XmlRootElement(name = "CMSAttribute") @XmlAccessorType(XmlAccessType.FIELD) diff --git a/src/main/java/net/sberg/openkim/konnektor/EnumKonnektorServiceBeanType.java b/src/main/java/net/sberg/openkim/konnektor/EnumKonnektorServiceBeanType.java index f649652..88bc3c2 100644 --- a/src/main/java/net/sberg/openkim/konnektor/EnumKonnektorServiceBeanType.java +++ b/src/main/java/net/sberg/openkim/konnektor/EnumKonnektorServiceBeanType.java @@ -17,13 +17,13 @@ package net.sberg.openkim.konnektor; public enum EnumKonnektorServiceBeanType { - EncryptionService("de.gematik.ws.conn.encryptionservice", "http://ws.gematik.de/conn/EncryptionService/"), - SignatureService("de.gematik.ws.conn.signatureservice", "http://ws.gematik.de/conn/SignatureService/"), - CardService("de.gematik.ws.conn.cardservice", "http://ws.gematik.de/conn/CardService/"), - CardTerminalService("de.gematik.ws.conn.cardterminalservice", "http://ws.gematik.de/conn/CardTerminalService/"), + EncryptionService("de.gematik.ws.conn.encryptionservice.v6", "http://ws.gematik.de/conn/EncryptionService/"), + SignatureService("de.gematik.ws.conn.signatureservice.v7", "http://ws.gematik.de/conn/SignatureService/"), + CardService("de.gematik.ws.conn.cardservice.v8", "http://ws.gematik.de/conn/CardService/"), + CardTerminalService("de.gematik.ws.conn.cardterminalservice.v1", "http://ws.gematik.de/conn/CardTerminalService/"), AuthSignatureService("de.gematik.ws.conn.authsignatureservice", "http://ws.gematik.de/conn/SignatureService/"), - CertificateService("de.gematik.ws.conn.certificateservice", "http://ws.gematik.de/conn/CertificateService/"), - EventService("de.gematik.ws.conn.eventservice", "http://ws.gematik.de/conn/EventService/"); + CertificateService("de.gematik.ws.conn.certificateservice.v6", "http://ws.gematik.de/conn/CertificateService/"), + EventService("de.gematik.ws.conn.eventservice.v7", "http://ws.gematik.de/conn/EventService/"); private final String packageName; private final String soapActionPrefix; diff --git a/src/main/java/net/sberg/openkim/konnektor/KonnektorService.java b/src/main/java/net/sberg/openkim/konnektor/KonnektorService.java index 499a1c1..22c8bfc 100644 --- a/src/main/java/net/sberg/openkim/konnektor/KonnektorService.java +++ b/src/main/java/net/sberg/openkim/konnektor/KonnektorService.java @@ -107,7 +107,7 @@ public Konnektor execute( parseServiceBean(xpath, konnektor, doc, EnumKonnektorServiceBeanType.CertificateService, null); parseServiceBean(xpath, konnektor, doc, EnumKonnektorServiceBeanType.EventService, null); - konnektor.setKonnektorServiceBeansLoaded(true); + konnektor.setKonnektorServiceBeansLoaded(konnektor.getKonnektorServiceBeans().size() > 0); logger.logLine("konnektor service beans loaded: " + konnektor.getIp()); } catch (Exception e) { log.error("error on loading the service beans for the konnektor: " + konnektor.getIp(), e); diff --git a/src/main/java/net/sberg/openkim/konnektor/KonnektorServiceBean.java b/src/main/java/net/sberg/openkim/konnektor/KonnektorServiceBean.java index e6a9d28..7049c62 100644 --- a/src/main/java/net/sberg/openkim/konnektor/KonnektorServiceBean.java +++ b/src/main/java/net/sberg/openkim/konnektor/KonnektorServiceBean.java @@ -28,7 +28,7 @@ public class KonnektorServiceBean { private boolean alive; public String createClassPackageName() { - return enumKonnektorServiceBeanType.getPackageName() + ".v" + version.replaceAll("\\.", "_"); + return enumKonnektorServiceBeanType.getPackageName(); } public String createSoapAction(String operation) { diff --git a/src/main/java/net/sberg/openkim/konnektor/KonnektorVzdController.java b/src/main/java/net/sberg/openkim/konnektor/KonnektorVzdController.java index e6ebae2..816bad2 100644 --- a/src/main/java/net/sberg/openkim/konnektor/KonnektorVzdController.java +++ b/src/main/java/net/sberg/openkim/konnektor/KonnektorVzdController.java @@ -74,6 +74,7 @@ public String suche(Model model, @PathVariable String konnektorId, @PathVariable model.addAttribute("konnektor", dbKonnektor); model.addAttribute("fehler", false); + model.addAttribute("eintraege", new ArrayList<>()); if (searchValue != null && !searchValue.trim().isEmpty()) { @@ -96,14 +97,12 @@ public String suche(Model model, @PathVariable String konnektorId, @PathVariable }, (context, e) -> { log.error("error on searching vzd for the konnektor: " + dbKonnektor.getIp()); - model.addAttribute("eintraege", new ArrayList<>()); model.addAttribute("fehler", true); } ); } } catch (Exception e) { model.addAttribute("fehler", true); - model.addAttribute("eintraege", new ArrayList<>()); } model.addAttribute("logs", logger.getLogContentAsStr()); diff --git a/src/main/java/net/sberg/openkim/konnektor/KonnektorWebserviceController.java b/src/main/java/net/sberg/openkim/konnektor/KonnektorWebserviceController.java index cb630e6..e676c59 100644 --- a/src/main/java/net/sberg/openkim/konnektor/KonnektorWebserviceController.java +++ b/src/main/java/net/sberg/openkim/konnektor/KonnektorWebserviceController.java @@ -103,7 +103,6 @@ public String ausfuehren(@RequestBody Map serviceBean) throws Exception { Konfiguration konfiguration = konfigurationService.getKonfiguration(); - KonnektorServiceBean konnektorServiceBean = konfigurationService.getKonnektorServiceBean((String)serviceBean.get(DefaultPipelineOperationContext.ENV_KONNEKTOR_ID), (String)serviceBean.get(DefaultPipelineOperationContext.ENV_WEBSERVICE_ID), true); Konnektor konnektor = konfiguration.extractKonnektor((String)serviceBean.get(DefaultPipelineOperationContext.ENV_KONNEKTOR_ID), true); DefaultLoggerContext defaultLoggerContext = new DefaultLoggerContext(); @@ -120,9 +119,7 @@ public String ausfuehren(@RequestBody Map serviceBean) throws Exception { operation.execute( defaultPipelineOperationContext, operation.getDefaultOkConsumer(), - (context, e) -> { - - } + operation.getDefaultFailConsumer() ); String result = logger.getLogContentAsStr(); logService.removeLogger(logger.getId()); diff --git a/src/main/java/net/sberg/openkim/log/DefaultLoggerContext.java b/src/main/java/net/sberg/openkim/log/DefaultLoggerContext.java index 06cd03c..d5fe20d 100644 --- a/src/main/java/net/sberg/openkim/log/DefaultLoggerContext.java +++ b/src/main/java/net/sberg/openkim/log/DefaultLoggerContext.java @@ -16,7 +16,6 @@ */ package net.sberg.openkim.log; -import de.gematik.kim.al.model.AccountLimit; import net.sberg.openkim.fachdienst.Fachdienst; import net.sberg.openkim.konfiguration.Konfiguration; import net.sberg.openkim.konnektor.Konnektor; @@ -44,7 +43,7 @@ public class DefaultLoggerContext { private String mailServerPort; private String mailServerUsername; private String mailServerPassword; - private de.gematik.kim.al.model.AccountLimit accountLimit = new AccountLimit(); + private de.gematik.kim.al.model.AccountLimit accountLimit = new de.gematik.kim.al.model.AccountLimit(); private final MailaddressCertErrorContext mailaddressCertErrorContext = new MailaddressCertErrorContext(); private final MailaddressKimVersionErrorContext mailaddressKimVersionErrorContext = new MailaddressKimVersionErrorContext(); @@ -105,7 +104,7 @@ public void setFachdienst(Fachdienst fachdienst) { this.fachdienst = fachdienst; } - public void setAccountLimit(AccountLimit accountLimit) { + public void setAccountLimit(de.gematik.kim.al.model.AccountLimit accountLimit) { this.accountLimit = accountLimit; } //******************************************************** @@ -241,7 +240,7 @@ public String getMailServerPassword() { return mailServerPassword; } - public AccountLimit getAccountLimit() { + public de.gematik.kim.al.model.AccountLimit getAccountLimit() { return accountLimit; } diff --git a/src/main/java/net/sberg/openkim/pipeline/PipelineOperation.java b/src/main/java/net/sberg/openkim/pipeline/PipelineOperation.java index e57a03f..217c0ab 100644 --- a/src/main/java/net/sberg/openkim/pipeline/PipelineOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/PipelineOperation.java @@ -1,11 +1,14 @@ package net.sberg.openkim.pipeline; +import org.springframework.beans.factory.annotation.Qualifier; + import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) +@Target({ElementType.FIELD, ElementType.TYPE}) +@Qualifier public @interface PipelineOperation { } diff --git a/src/main/java/net/sberg/openkim/pipeline/PipelineOperationScanner.java b/src/main/java/net/sberg/openkim/pipeline/PipelineOperationScanner.java deleted file mode 100644 index aa5424a..0000000 --- a/src/main/java/net/sberg/openkim/pipeline/PipelineOperationScanner.java +++ /dev/null @@ -1,138 +0,0 @@ -package net.sberg.openkim.pipeline; - -import net.sberg.openkim.pipeline.operation.IPipelineOperation; -import org.objectweb.asm.AnnotationVisitor; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.ClassVisitor; -import org.objectweb.asm.Opcodes; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.net.URLClassLoader; -import java.util.*; -import java.util.jar.JarEntry; -import java.util.jar.JarInputStream; -import java.util.regex.Matcher; -import java.util.stream.Collectors; - -public class PipelineOperationScanner { - - private final List annotatedClasses = new ArrayList<>(); - - private List getRootUrls() throws Exception { - List result = new ArrayList<>(); - - ClassLoader cl = Thread.currentThread().getContextClassLoader(); - while (cl != null) { - if (cl instanceof URLClassLoader) { - URL[] urls = ((URLClassLoader) cl).getURLs(); - result.addAll(Arrays.asList(urls)); - } - cl = cl.getParent(); - } - - return result; - } - - private void visitFile(File f, List scanPackages, DaoDescriptorClassScanner daoDescriptorClassVisitor) throws IOException { - if (System.getProperty("os.name").startsWith("Windows")) { - scanPackages = scanPackages.stream().map(scanPackage -> scanPackage.replaceAll("/", Matcher.quoteReplacement(File.separator))).collect(Collectors.toList()); - } - - File finalFile = f; - if (finalFile.isDirectory()) { - final File[] children = f.listFiles(); - if (children != null) { - for (File child : children) { - visitFile(child, scanPackages, daoDescriptorClassVisitor); - } - } - } - else if (!scanPackages.stream().filter(scanPackage -> { - return finalFile.getAbsolutePath().contains(scanPackage.replaceAll("\\.", Matcher.quoteReplacement(File.separator))); - }).collect(Collectors.toList()).isEmpty()) { - try (FileInputStream in = new FileInputStream(f)) { - daoDescriptorClassVisitor.reset(); - new ClassReader(in).accept(daoDescriptorClassVisitor, 0); - if (daoDescriptorClassVisitor.hasAnnotation && !annotatedClasses.contains(daoDescriptorClassVisitor.className)) { - annotatedClasses.add(daoDescriptorClassVisitor.className); - } - } - } - } - - private void visitJar(URL url, List scanPackages, DaoDescriptorClassScanner daoDescriptorClassVisitor) throws IOException { - try (InputStream urlIn = url.openStream(); - JarInputStream jarIn = new JarInputStream(urlIn)) { - JarEntry entry; - while ((entry = jarIn.getNextJarEntry()) != null) { - final JarEntry finalEntry = entry; - List filteredScanPackages = scanPackages.stream().filter(scanPackage -> finalEntry.toString().contains(scanPackage)).collect(Collectors.toList()); - if (!filteredScanPackages.isEmpty() && entry.toString().endsWith(".class")) { - daoDescriptorClassVisitor.reset(); - new ClassReader(jarIn).accept(daoDescriptorClassVisitor, 0); - if (daoDescriptorClassVisitor.hasAnnotation && !annotatedClasses.contains(daoDescriptorClassVisitor.className)) { - annotatedClasses.add(daoDescriptorClassVisitor.className); - } - } - } - } - } - - public Map createOperationMap(List scanPackages) throws Exception { - - DaoDescriptorClassScanner daoDescriptorClassVisitor = new DaoDescriptorClassScanner(); - - for (URL url : getRootUrls()) { - File f = new File(url.getPath()); - if (f.isDirectory()) { - visitFile(f, scanPackages, daoDescriptorClassVisitor); - } else { - visitJar(url, scanPackages, daoDescriptorClassVisitor); - } - } - - Map result = new HashMap<>(); - - for (String annotatedClass : annotatedClasses) { - Class aClass = Class.forName(annotatedClass); - IPipelineOperation pipelineOperation = (IPipelineOperation) aClass.getDeclaredConstructor().newInstance(); - result.put(pipelineOperation.getOperationKey(), pipelineOperation); - } - - return result; - } - - private class DaoDescriptorClassScanner extends ClassVisitor { - private boolean hasAnnotation; - private String className; - - DaoDescriptorClassScanner() { - super(Opcodes.ASM9); - } - - @Override - public void visit(int version, - int access, String name, String signature, - String superName, String[] interfaces) { - className = name.replaceAll("/", "."); - } - - @Override - public AnnotationVisitor visitAnnotation(String desc, boolean visible) { - if (desc.contains("pipeline/PipelineOperation;")) { - hasAnnotation = true; - } - return null; - } - - private void reset() { - hasAnnotation = false; - className = null; - } - } - -} diff --git a/src/main/java/net/sberg/openkim/pipeline/PipelineService.java b/src/main/java/net/sberg/openkim/pipeline/PipelineService.java index 983658a..d895e15 100644 --- a/src/main/java/net/sberg/openkim/pipeline/PipelineService.java +++ b/src/main/java/net/sberg/openkim/pipeline/PipelineService.java @@ -1,44 +1,48 @@ package net.sberg.openkim.pipeline; -import jakarta.annotation.PostConstruct; +import net.sberg.openkim.konnektor.KonnektorVzdController; import net.sberg.openkim.pipeline.operation.IPipelineOperation; import net.sberg.openkim.pipeline.operation.PipelineOperationLabel; -import org.springframework.beans.factory.annotation.Value; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.util.*; +import java.util.List; import java.util.stream.Collectors; @Service public class PipelineService { - private Map operationMap = new HashMap<>(); + private static final Logger log = LoggerFactory.getLogger(KonnektorVzdController.class); - @Value("${pipeline.scanPackages}") - private String scanPackages; - - @PostConstruct - public void init() throws Exception { - operationMap = new PipelineOperationScanner().createOperationMap(Arrays.asList(scanPackages.split(","))); - } + @Autowired + @PipelineOperation + List operations; public IPipelineOperation getOperation(String key) throws Exception { - if (operationMap.containsKey(key)) { - IPipelineOperation pipelineOperation = operationMap.get(key).getClass().getDeclaredConstructor().newInstance(); - pipelineOperation.initialize(this); - return pipelineOperation; + List result = operations.stream().filter(iPipelineOperation -> iPipelineOperation.getOperationKey().equals(key)).collect(Collectors.toList()); + if (result.size() == 1) { + return result.get(0); + } + if (result.size() > 1) { + throw new IllegalStateException("more than one operation available: "+key); } throw new IllegalStateException("no operation available: "+key); } public Class getOperationClass(String key) throws Exception { - if (operationMap.containsKey(key)) { - return operationMap.get(key).getClass(); + List result = operations.stream().filter(iPipelineOperation -> iPipelineOperation.getOperationKey().equals(key)).collect(Collectors.toList()); + if (result.size() == 1) { + return result.get(0).getClass(); + } + if (result.size() > 1) { + throw new IllegalStateException("more than one operation available: "+key); } throw new IllegalStateException("no operation available: "+key); } public List getTestableOperations() throws Exception { - return operationMap.keySet().stream().filter(s -> operationMap.get(s).isTestable()).map(s -> operationMap.get(s).createLabel()).collect(Collectors.toList()); + return operations.stream().filter(s -> s.isTestable()).map(s -> s.createLabel()).collect(Collectors.toList()); } } diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/IPipelineOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/IPipelineOperation.java index b9cc96f..7cd0bbd 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/IPipelineOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/IPipelineOperation.java @@ -16,8 +16,6 @@ */ package net.sberg.openkim.pipeline.operation; -import net.sberg.openkim.pipeline.PipelineService; - import java.io.PrintWriter; import java.io.StringWriter; import java.util.function.BiConsumer; @@ -56,7 +54,6 @@ public default boolean hasError(DefaultPipelineOperationContext defaultPipelineO } return false; } - public default void initialize(PipelineService pipelineService) throws Exception {} public default boolean isTestable() { return false; } diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/GetDecryptCardHandleOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/GetDecryptCardHandleOperation.java index 43e9f08..04be900 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/GetDecryptCardHandleOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/GetDecryptCardHandleOperation.java @@ -16,9 +16,9 @@ */ package net.sberg.openkim.pipeline.operation.konnektor; -import de.gematik.ws.conn.cardservice.v8_1_2.PinStatusEnum; +import de.gematik.ws.conn.cardservice.v8.PinStatusEnum; import de.gematik.ws.conn.cardservicecommon.v2.CardTypeType; -import de.gematik.ws.conn.certificateservice.v6_0_1.ReadCardCertificateResponse; +import de.gematik.ws.conn.certificateservice.v6.ReadCardCertificateResponse; import de.gematik.ws.conn.certificateservicecommon.v2.X509DataInfoListType; import net.sberg.openkim.common.metrics.DefaultMetricFactory; import net.sberg.openkim.common.x509.CMSUtils; @@ -29,7 +29,6 @@ import net.sberg.openkim.log.DefaultLogger; import net.sberg.openkim.log.error.EnumErrorCode; import net.sberg.openkim.pipeline.PipelineOperation; -import net.sberg.openkim.pipeline.PipelineService; import net.sberg.openkim.pipeline.operation.DefaultPipelineOperationContext; import net.sberg.openkim.pipeline.operation.IPipelineOperation; import net.sberg.openkim.pipeline.operation.konnektor.webservice.ReadCardCertificateOperation; @@ -37,6 +36,8 @@ import org.bouncycastle.asn1.cms.ContentInfo; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; import java.util.Iterator; import java.util.List; @@ -45,6 +46,7 @@ import java.util.function.Consumer; @PipelineOperation +@Component public class GetDecryptCardHandleOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(GetDecryptCardHandleOperation.class); @@ -55,15 +57,11 @@ public class GetDecryptCardHandleOperation implements IPipelineOperation { public static final String ENV_RESULT_CARD_HANDLE = "resultCardHandle"; public static final String ENV_RESULT_CARD_HANDLE_FOUND = "resultCardHandleFound"; + @Autowired private ReadCardCertificateOperation readCardCertificateOperation; + @Autowired private KonnektorLoadAllCardInformationOperation konnektorLoadAllCardInformationOperation; - @Override - public void initialize(PipelineService pipelineService) throws Exception { - readCardCertificateOperation = (ReadCardCertificateOperation) pipelineService.getOperation(BUILTIN_VENDOR+"."+ReadCardCertificateOperation.NAME); - konnektorLoadAllCardInformationOperation = (KonnektorLoadAllCardInformationOperation) pipelineService.getOperation(BUILTIN_VENDOR+"."+KonnektorLoadAllCardInformationOperation.NAME); - } - @Override public String getName() { return NAME; diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/GetSignCardHandleOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/GetSignCardHandleOperation.java index 5081d7b..43911bc 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/GetSignCardHandleOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/GetSignCardHandleOperation.java @@ -16,7 +16,7 @@ */ package net.sberg.openkim.pipeline.operation.konnektor; -import de.gematik.ws.conn.cardservice.v8_1_2.PinStatusEnum; +import de.gematik.ws.conn.cardservice.v8.PinStatusEnum; import de.gematik.ws.conn.cardservicecommon.v2.CardTypeType; import net.sberg.openkim.common.metrics.DefaultMetricFactory; import net.sberg.openkim.konnektor.Konnektor; @@ -24,12 +24,13 @@ import net.sberg.openkim.log.DefaultLogger; import net.sberg.openkim.log.error.EnumErrorCode; import net.sberg.openkim.pipeline.PipelineOperation; -import net.sberg.openkim.pipeline.PipelineService; import net.sberg.openkim.pipeline.operation.DefaultPipelineOperationContext; import net.sberg.openkim.pipeline.operation.IPipelineOperation; import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; import java.util.Iterator; import java.util.List; @@ -37,6 +38,7 @@ import java.util.function.Consumer; @PipelineOperation +@Component public class GetSignCardHandleOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(GetSignCardHandleOperation.class); @@ -45,13 +47,9 @@ public class GetSignCardHandleOperation implements IPipelineOperation { public static final String ENV_RESULT_CARD_HANDLE = "resultCardHandle"; public static final String ENV_RESULT_CARD_HANDLE_FOUND = "resultCardHandleFound"; + @Autowired private KonnektorLoadAllCardInformationOperation konnektorLoadAllCardInformationOperation; - @Override - public void initialize(PipelineService pipelineService) throws Exception { - konnektorLoadAllCardInformationOperation = (KonnektorLoadAllCardInformationOperation) pipelineService.getOperation(BUILTIN_VENDOR+"."+KonnektorLoadAllCardInformationOperation.NAME); - } - @Override public String getName() { return NAME; diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/KonnektorConnectionInformationOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/KonnektorConnectionInformationOperation.java index 371a28b..14acec1 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/KonnektorConnectionInformationOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/KonnektorConnectionInformationOperation.java @@ -16,37 +16,35 @@ */ package net.sberg.openkim.pipeline.operation.konnektor; -import de.gematik.ws.conn.connectorcommon.Connector; -import de.gematik.ws.conn.eventservice.v7_2_0.GetResourceInformationResponse; +import de.gematik.ws.conn.connectorcommon.v5.Connector; +import de.gematik.ws.conn.eventservice.v7.GetResourceInformationResponse; import net.sberg.openkim.common.metrics.DefaultMetricFactory; import net.sberg.openkim.konnektor.Konnektor; import net.sberg.openkim.konnektor.KonnektorWebserviceUtils; import net.sberg.openkim.log.DefaultLogger; import net.sberg.openkim.pipeline.PipelineOperation; -import net.sberg.openkim.pipeline.PipelineService; import net.sberg.openkim.pipeline.operation.DefaultPipelineOperationContext; import net.sberg.openkim.pipeline.operation.IPipelineOperation; import net.sberg.openkim.pipeline.operation.konnektor.webservice.GetResourceInformationOperation; import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; import java.util.function.BiConsumer; import java.util.function.Consumer; @PipelineOperation +@Component public class KonnektorConnectionInformationOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(KonnektorConnectionInformationOperation.class); public static final String NAME = "KonnektorConnectionInformation"; + @Autowired private GetResourceInformationOperation getResourceInformationOperation; - @Override - public void initialize(PipelineService pipelineService) throws Exception { - getResourceInformationOperation = (GetResourceInformationOperation) pipelineService.getOperation(BUILTIN_VENDOR+"."+GetResourceInformationOperation.NAME); - } - @Override public String getName() { return NAME; diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/KonnektorLoadAllCardInformationOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/KonnektorLoadAllCardInformationOperation.java index 46405a4..4551b55 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/KonnektorLoadAllCardInformationOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/KonnektorLoadAllCardInformationOperation.java @@ -17,10 +17,10 @@ package net.sberg.openkim.pipeline.operation.konnektor; import de.gematik.ws.conn.cardservice.v8.CardInfoType; -import de.gematik.ws.conn.cardservice.v8_1_2.GetPinStatusResponse; -import de.gematik.ws.conn.certificateservice.v6_0_1.ReadCardCertificateResponse; +import de.gematik.ws.conn.cardservice.v8.GetPinStatusResponse; +import de.gematik.ws.conn.certificateservice.v6.ReadCardCertificateResponse; import de.gematik.ws.conn.certificateservicecommon.v2.X509DataInfoListType; -import de.gematik.ws.conn.eventservice.v7_2_0.GetCardsResponse; +import de.gematik.ws.conn.eventservice.v7.GetCardsResponse; import net.sberg.openkim.common.StringUtils; import net.sberg.openkim.common.metrics.DefaultMetricFactory; import net.sberg.openkim.common.x509.EnumX509ErrorCode; @@ -29,13 +29,17 @@ import net.sberg.openkim.konnektor.*; import net.sberg.openkim.log.DefaultLogger; import net.sberg.openkim.pipeline.PipelineOperation; -import net.sberg.openkim.pipeline.PipelineService; import net.sberg.openkim.pipeline.operation.DefaultPipelineOperationContext; import net.sberg.openkim.pipeline.operation.IPipelineOperation; -import net.sberg.openkim.pipeline.operation.konnektor.webservice.*; +import net.sberg.openkim.pipeline.operation.konnektor.webservice.GetCardsOperation; +import net.sberg.openkim.pipeline.operation.konnektor.webservice.GetPinStatusOperation; +import net.sberg.openkim.pipeline.operation.konnektor.webservice.ReadCardCertificateOperation; +import net.sberg.openkim.pipeline.operation.konnektor.webservice.VerifyPinOperation; import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; import java.util.ArrayList; import java.util.Iterator; @@ -44,22 +48,19 @@ import java.util.function.Consumer; @PipelineOperation +@Component public class KonnektorLoadAllCardInformationOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(KonnektorLoadAllCardInformationOperation.class); public static final String NAME = "KonnektorLoadAllCardInformation"; + @Autowired private GetCardsOperation getCardsOperation; + @Autowired private ReadCardCertificateOperation readCardCertificateOperation; + @Autowired private GetPinStatusOperation getPinStatusOperation; - @Override - public void initialize(PipelineService pipelineService) throws Exception { - getCardsOperation = (GetCardsOperation) pipelineService.getOperation(BUILTIN_VENDOR+"."+GetCardsOperation.NAME); - readCardCertificateOperation = (ReadCardCertificateOperation) pipelineService.getOperation(BUILTIN_VENDOR+"."+ReadCardCertificateOperation.NAME); - getPinStatusOperation = (GetPinStatusOperation) pipelineService.getOperation(BUILTIN_VENDOR+"."+GetPinStatusOperation.NAME); - } - @Override public String getName() { return NAME; diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/dns/DnsFqdnRequestOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/dns/DnsFqdnRequestOperation.java index b5c5b24..650169a 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/dns/DnsFqdnRequestOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/dns/DnsFqdnRequestOperation.java @@ -25,6 +25,7 @@ import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; import org.xbill.DNS.Type; import java.util.ArrayList; @@ -34,6 +35,7 @@ import java.util.function.Consumer; @PipelineOperation +@Component public class DnsFqdnRequestOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(DnsFqdnRequestOperation.class); diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/dns/DnsRequestOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/dns/DnsRequestOperation.java index bcf8246..b4c1adb 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/dns/DnsRequestOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/dns/DnsRequestOperation.java @@ -25,11 +25,13 @@ import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; import java.util.function.BiConsumer; import java.util.function.Consumer; @PipelineOperation +@Component public class DnsRequestOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(DnsRequestOperation.class); diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/ntp/NtpRequestOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/ntp/NtpRequestOperation.java index 43750bf..45186a3 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/ntp/NtpRequestOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/ntp/NtpRequestOperation.java @@ -27,6 +27,7 @@ import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; import java.net.InetAddress; import java.util.Date; @@ -34,6 +35,7 @@ import java.util.function.Consumer; @PipelineOperation +@Component public class NtpRequestOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(NtpRequestOperation.class); diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/vzd/LoadVzdCertsOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/vzd/LoadVzdCertsOperation.java index 9698a02..4070bf6 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/vzd/LoadVzdCertsOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/vzd/LoadVzdCertsOperation.java @@ -31,6 +31,7 @@ import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; import java.util.ArrayList; import java.util.Iterator; @@ -39,6 +40,7 @@ import java.util.function.Consumer; @PipelineOperation +@Component public class LoadVzdCertsOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(LoadVzdCertsOperation.class); diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/vzd/SearchVzdOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/vzd/SearchVzdOperation.java index d2e5166..d53f693 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/vzd/SearchVzdOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/vzd/SearchVzdOperation.java @@ -25,12 +25,14 @@ import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; import java.util.List; import java.util.function.BiConsumer; import java.util.function.Consumer; @PipelineOperation +@Component public class SearchVzdOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(SearchVzdOperation.class); diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/DecryptDocumentOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/DecryptDocumentOperation.java index 94f5dc2..c538abf 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/DecryptDocumentOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/DecryptDocumentOperation.java @@ -16,11 +16,11 @@ */ package net.sberg.openkim.pipeline.operation.konnektor.webservice; -import de.gematik.ws.conn.connectorcommon.DocumentType; -import de.gematik.ws.conn.connectorcontext.ContextType; -import de.gematik.ws.conn.encryptionservice.v6_1_1.DecryptDocument; -import de.gematik.ws.conn.encryptionservice.v6_1_1.DecryptDocumentResponse; -import de.gematik.ws.conn.encryptionservice.v6_1_1.KeyOnCardType; +import de.gematik.ws.conn.connectorcommon.v5.DocumentType; +import de.gematik.ws.conn.connectorcontext.v2.ContextType; +import de.gematik.ws.conn.encryptionservice.v6.DecryptDocument; +import de.gematik.ws.conn.encryptionservice.v6.DecryptDocumentResponse; +import de.gematik.ws.conn.encryptionservice.v6.KeyOnCardType; import net.sberg.openkim.common.metrics.DefaultMetricFactory; import net.sberg.openkim.konnektor.*; import net.sberg.openkim.log.DefaultLogger; @@ -31,11 +31,13 @@ import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; import java.util.function.BiConsumer; import java.util.function.Consumer; @PipelineOperation +@Component public class DecryptDocumentOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(DecryptDocumentOperation.class); diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/EncryptDocumentOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/EncryptDocumentOperation.java index 4adb647..5265d55 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/EncryptDocumentOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/EncryptDocumentOperation.java @@ -16,11 +16,11 @@ */ package net.sberg.openkim.pipeline.operation.konnektor.webservice; -import de.gematik.ws.conn.connectorcommon.DocumentType; -import de.gematik.ws.conn.connectorcontext.ContextType; -import de.gematik.ws.conn.encryptionservice.v6_1_1.EncryptDocument; -import de.gematik.ws.conn.encryptionservice.v6_1_1.EncryptDocumentResponse; -import de.gematik.ws.conn.encryptionservice.v6_1_1.KeyOnCardType; +import de.gematik.ws.conn.connectorcommon.v5.DocumentType; +import de.gematik.ws.conn.connectorcontext.v2.ContextType; +import de.gematik.ws.conn.encryptionservice.v6.EncryptDocument; +import de.gematik.ws.conn.encryptionservice.v6.EncryptDocumentResponse; +import de.gematik.ws.conn.encryptionservice.v6.KeyOnCardType; import net.sberg.openkim.common.metrics.DefaultMetricFactory; import net.sberg.openkim.konnektor.*; import net.sberg.openkim.log.DefaultLogger; @@ -32,11 +32,13 @@ import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; import java.util.function.BiConsumer; import java.util.function.Consumer; @PipelineOperation +@Component public class EncryptDocumentOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(EncryptDocumentOperation.class); diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/GetCardTerminalsOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/GetCardTerminalsOperation.java index 9d91cc4..e42cc69 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/GetCardTerminalsOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/GetCardTerminalsOperation.java @@ -17,9 +17,9 @@ package net.sberg.openkim.pipeline.operation.konnektor.webservice; import de.gematik.ws.conn.cardterminalinfo.v8.CardTerminalInfoType; -import de.gematik.ws.conn.connectorcontext.ContextType; -import de.gematik.ws.conn.eventservice.v7_2_0.GetCardTerminals; -import de.gematik.ws.conn.eventservice.v7_2_0.GetCardTerminalsResponse; +import de.gematik.ws.conn.connectorcontext.v2.ContextType; +import de.gematik.ws.conn.eventservice.v7.GetCardTerminals; +import de.gematik.ws.conn.eventservice.v7.GetCardTerminalsResponse; import net.sberg.openkim.common.metrics.DefaultMetricFactory; import net.sberg.openkim.konnektor.*; import net.sberg.openkim.log.DefaultLogger; @@ -29,12 +29,14 @@ import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; import java.util.Iterator; import java.util.function.BiConsumer; import java.util.function.Consumer; @PipelineOperation +@Component public class GetCardTerminalsOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(GetCardTerminalsOperation.class); diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/GetCardsOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/GetCardsOperation.java index a6a9074..5f71b30 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/GetCardsOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/GetCardsOperation.java @@ -18,9 +18,9 @@ import de.gematik.ws.conn.cardservice.v8.CardInfoType; import de.gematik.ws.conn.cardservicecommon.v2.CardTypeType; -import de.gematik.ws.conn.connectorcontext.ContextType; -import de.gematik.ws.conn.eventservice.v7_2_0.GetCards; -import de.gematik.ws.conn.eventservice.v7_2_0.GetCardsResponse; +import de.gematik.ws.conn.connectorcontext.v2.ContextType; +import de.gematik.ws.conn.eventservice.v7.GetCards; +import de.gematik.ws.conn.eventservice.v7.GetCardsResponse; import net.sberg.openkim.common.StringUtils; import net.sberg.openkim.common.metrics.DefaultMetricFactory; import net.sberg.openkim.konnektor.*; @@ -31,6 +31,7 @@ import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; import java.math.BigInteger; import java.util.Iterator; @@ -38,6 +39,7 @@ import java.util.function.Consumer; @PipelineOperation +@Component public class GetCardsOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(GetCardsOperation.class); diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/GetJobNumberOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/GetJobNumberOperation.java index d3205c2..3aaae3b 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/GetJobNumberOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/GetJobNumberOperation.java @@ -16,9 +16,9 @@ */ package net.sberg.openkim.pipeline.operation.konnektor.webservice; -import de.gematik.ws.conn.connectorcontext.ContextType; -import de.gematik.ws.conn.signatureservice.v7_5_5.GetJobNumber; -import de.gematik.ws.conn.signatureservice.v7_5_5.GetJobNumberResponse; +import de.gematik.ws.conn.connectorcontext.v2.ContextType; +import de.gematik.ws.conn.signatureservice.v7.GetJobNumber; +import de.gematik.ws.conn.signatureservice.v7.GetJobNumberResponse; import net.sberg.openkim.common.metrics.DefaultMetricFactory; import net.sberg.openkim.konnektor.*; import net.sberg.openkim.log.DefaultLogger; @@ -28,11 +28,13 @@ import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; import java.util.function.BiConsumer; import java.util.function.Consumer; @PipelineOperation +@Component public class GetJobNumberOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(GetJobNumberOperation.class); diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/GetPinStatusOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/GetPinStatusOperation.java index 73320fd..7aab42f 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/GetPinStatusOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/GetPinStatusOperation.java @@ -16,9 +16,9 @@ */ package net.sberg.openkim.pipeline.operation.konnektor.webservice; -import de.gematik.ws.conn.cardservice.v8_1_2.GetPinStatus; -import de.gematik.ws.conn.cardservice.v8_1_2.GetPinStatusResponse; -import de.gematik.ws.conn.connectorcontext.ContextType; +import de.gematik.ws.conn.cardservice.v8.GetPinStatus; +import de.gematik.ws.conn.cardservice.v8.GetPinStatusResponse; +import de.gematik.ws.conn.connectorcontext.v2.ContextType; import net.sberg.openkim.common.metrics.DefaultMetricFactory; import net.sberg.openkim.konnektor.*; import net.sberg.openkim.log.DefaultLogger; @@ -28,11 +28,13 @@ import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; import java.util.function.BiConsumer; import java.util.function.Consumer; @PipelineOperation +@Component public class GetPinStatusOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(GetPinStatusOperation.class); diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/GetResourceInformationOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/GetResourceInformationOperation.java index e23c646..2ab2542 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/GetResourceInformationOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/GetResourceInformationOperation.java @@ -18,11 +18,11 @@ import de.gematik.ws.conn.cardservice.v8.CardInfoType; import de.gematik.ws.conn.cardterminalinfo.v8.CardTerminalInfoType; -import de.gematik.ws.conn.connectorcommon.Connector; -import de.gematik.ws.conn.connectorcommon.ErrorState; -import de.gematik.ws.conn.connectorcontext.ContextType; -import de.gematik.ws.conn.eventservice.v7_2_0.GetResourceInformation; -import de.gematik.ws.conn.eventservice.v7_2_0.GetResourceInformationResponse; +import de.gematik.ws.conn.connectorcommon.v5.Connector; +import de.gematik.ws.conn.connectorcommon.v5.ErrorState; +import de.gematik.ws.conn.connectorcontext.v2.ContextType; +import de.gematik.ws.conn.eventservice.v7.GetResourceInformation; +import de.gematik.ws.conn.eventservice.v7.GetResourceInformationResponse; import net.sberg.openkim.common.StringUtils; import net.sberg.openkim.common.metrics.DefaultMetricFactory; import net.sberg.openkim.konnektor.*; @@ -33,6 +33,7 @@ import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; import java.math.BigInteger; import java.util.Iterator; @@ -40,6 +41,7 @@ import java.util.function.Consumer; @PipelineOperation +@Component public class GetResourceInformationOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(GetResourceInformationOperation.class); diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/ReadCardCertificateOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/ReadCardCertificateOperation.java index b5afa51..24cbcb4 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/ReadCardCertificateOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/ReadCardCertificateOperation.java @@ -16,11 +16,11 @@ */ package net.sberg.openkim.pipeline.operation.konnektor.webservice; -import de.gematik.ws.conn.certificateservice.v6_0_1.ReadCardCertificate; -import de.gematik.ws.conn.certificateservice.v6_0_1.ReadCardCertificateResponse; +import de.gematik.ws.conn.certificateservice.v6.ReadCardCertificate; +import de.gematik.ws.conn.certificateservice.v6.ReadCardCertificateResponse; import de.gematik.ws.conn.certificateservicecommon.v2.CertRefEnum; import de.gematik.ws.conn.certificateservicecommon.v2.X509DataInfoListType; -import de.gematik.ws.conn.connectorcontext.ContextType; +import de.gematik.ws.conn.connectorcontext.v2.ContextType; import net.sberg.openkim.common.StringUtils; import net.sberg.openkim.common.metrics.DefaultMetricFactory; import net.sberg.openkim.konnektor.*; @@ -31,6 +31,7 @@ import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; import java.io.ByteArrayInputStream; import java.security.cert.CertificateFactory; @@ -44,6 +45,7 @@ import java.util.function.Consumer; @PipelineOperation +@Component public class ReadCardCertificateOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(ReadCardCertificateOperation.class); diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/RequestCardOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/RequestCardOperation.java index 79dab33..84a0aaf 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/RequestCardOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/RequestCardOperation.java @@ -16,10 +16,10 @@ */ package net.sberg.openkim.pipeline.operation.konnektor.webservice; -import de.gematik.ws.conn.cardterminalservice.v1_1_0.RequestCard; -import de.gematik.ws.conn.cardterminalservice.v1_1_0.RequestCardResponse; -import de.gematik.ws.conn.cardterminalservice.v1_1_0.Slot; -import de.gematik.ws.conn.connectorcontext.ContextType; +import de.gematik.ws.conn.cardterminalservice.v1.RequestCard; +import de.gematik.ws.conn.cardterminalservice.v1.RequestCardResponse; +import de.gematik.ws.conn.cardterminalservice.v1.Slot; +import de.gematik.ws.conn.connectorcontext.v2.ContextType; import net.sberg.openkim.common.metrics.DefaultMetricFactory; import net.sberg.openkim.konnektor.*; import net.sberg.openkim.log.DefaultLogger; @@ -29,12 +29,14 @@ import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; import java.math.BigInteger; import java.util.function.BiConsumer; import java.util.function.Consumer; @PipelineOperation +@Component public class RequestCardOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(RequestCardOperation.class); diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/VerifyCardCertificateOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/VerifyCardCertificateOperation.java index 3ac6637..6315b2d 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/VerifyCardCertificateOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/VerifyCardCertificateOperation.java @@ -16,9 +16,9 @@ */ package net.sberg.openkim.pipeline.operation.konnektor.webservice; -import de.gematik.ws.conn.certificateservice.v6_0_1.VerifyCertificate; -import de.gematik.ws.conn.certificateservice.v6_0_1.VerifyCertificateResponse; -import de.gematik.ws.conn.connectorcontext.ContextType; +import de.gematik.ws.conn.certificateservice.v6.VerifyCertificate; +import de.gematik.ws.conn.certificateservice.v6.VerifyCertificateResponse; +import de.gematik.ws.conn.connectorcontext.v2.ContextType; import net.sberg.openkim.common.metrics.DefaultMetricFactory; import net.sberg.openkim.konnektor.*; import net.sberg.openkim.log.DefaultLogger; @@ -29,6 +29,7 @@ import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; import java.io.ByteArrayInputStream; import java.io.InputStream; @@ -38,6 +39,7 @@ import java.util.function.Consumer; @PipelineOperation +@Component public class VerifyCardCertificateOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(VerifyCardCertificateOperation.class); diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/VerifyPinOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/VerifyPinOperation.java index beabd7a..39877db 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/VerifyPinOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/VerifyPinOperation.java @@ -16,9 +16,10 @@ */ package net.sberg.openkim.pipeline.operation.konnektor.webservice; -import de.gematik.ws.conn.cardservice.v8_1_2.VerifyPin; +import de.gematik.ws.conn.cardservice.v8.VerifyPin; import de.gematik.ws.conn.cardservicecommon.v2.PinResponseType; -import de.gematik.ws.conn.connectorcontext.ContextType; +import de.gematik.ws.conn.connectorcontext.v2.ContextType; +import jakarta.xml.bind.JAXBElement; import net.sberg.openkim.common.metrics.DefaultMetricFactory; import net.sberg.openkim.konnektor.*; import net.sberg.openkim.log.DefaultLogger; @@ -28,12 +29,13 @@ import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; -import javax.xml.bind.JAXBElement; import java.util.function.BiConsumer; import java.util.function.Consumer; @PipelineOperation +@Component public class VerifyPinOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(VerifyPinOperation.class); diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/VerifySignedDocumentOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/VerifySignedDocumentOperation.java index 5ef539f..ed05de6 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/VerifySignedDocumentOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/VerifySignedDocumentOperation.java @@ -16,9 +16,9 @@ */ package net.sberg.openkim.pipeline.operation.konnektor.webservice; -import de.gematik.ws.conn.connectorcontext.ContextType; -import de.gematik.ws.conn.signatureservice.v7_5_5.VerifyDocument; -import de.gematik.ws.conn.signatureservice.v7_5_5.VerifyDocumentResponse; +import de.gematik.ws.conn.connectorcontext.v2.ContextType; +import de.gematik.ws.conn.signatureservice.v7.VerifyDocument; +import de.gematik.ws.conn.signatureservice.v7.VerifyDocumentResponse; import net.sberg.openkim.common.metrics.DefaultMetricFactory; import net.sberg.openkim.konnektor.*; import net.sberg.openkim.log.DefaultLogger; @@ -32,12 +32,14 @@ import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; import java.nio.charset.StandardCharsets; import java.util.function.BiConsumer; import java.util.function.Consumer; @PipelineOperation +@Component public class VerifySignedDocumentOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(VerifySignedDocumentOperation.class); diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/mail/CheckEncryptedMailFormatOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/mail/CheckEncryptedMailFormatOperation.java index 3ca96d8..d0b9db8 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/mail/CheckEncryptedMailFormatOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/mail/CheckEncryptedMailFormatOperation.java @@ -22,7 +22,6 @@ import net.sberg.openkim.log.DefaultLogger; import net.sberg.openkim.log.error.EnumErrorCode; import net.sberg.openkim.pipeline.PipelineOperation; -import net.sberg.openkim.pipeline.PipelineService; import net.sberg.openkim.pipeline.operation.DefaultPipelineOperationContext; import net.sberg.openkim.pipeline.operation.IPipelineOperation; import net.sberg.openkim.pipeline.operation.mail.part.AnalyzeMailPartsOperation; @@ -35,6 +34,8 @@ import org.bouncycastle.cms.CMSEnvelopedData; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; import javax.mail.internet.MimeMessage; import javax.mail.internet.MimePart; @@ -45,6 +46,7 @@ import java.util.function.Consumer; @PipelineOperation +@Component public class CheckEncryptedMailFormatOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(CheckEncryptedMailFormatOperation.class); @@ -56,13 +58,9 @@ public class CheckEncryptedMailFormatOperation implements IPipelineOperation { public static final String ENV_ENCRYPTED_CONTENT_INFO = "encryptedContentInfo"; public static final String ENV_ENCRYPTED_PART = "encryptedPart"; + @Autowired private AnalyzeMailPartsOperation analyzeMailPartsOperation; - @Override - public void initialize(PipelineService pipelineService) throws Exception { - analyzeMailPartsOperation = (AnalyzeMailPartsOperation) pipelineService.getOperation(BUILTIN_VENDOR+"."+AnalyzeMailPartsOperation.NAME); - } - @Override public String getName() { return NAME; diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/mail/CheckSendingMailOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/mail/CheckSendingMailOperation.java index dc3eb75..5a6d42d 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/mail/CheckSendingMailOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/mail/CheckSendingMailOperation.java @@ -27,6 +27,7 @@ import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; import javax.mail.Message; import javax.mail.internet.InternetAddress; @@ -36,6 +37,7 @@ import java.util.function.Consumer; @PipelineOperation +@Component public class CheckSendingMailOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(CheckSendingMailOperation.class); diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/mail/ComposeEncryptedMailOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/mail/ComposeEncryptedMailOperation.java index 9148940..63b81d8 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/mail/ComposeEncryptedMailOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/mail/ComposeEncryptedMailOperation.java @@ -29,6 +29,7 @@ import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; import javax.mail.Address; import javax.mail.Header; @@ -46,6 +47,7 @@ import java.util.function.Consumer; @PipelineOperation +@Component public class ComposeEncryptedMailOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(ComposeEncryptedMailOperation.class); diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/mail/CreateDsnOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/mail/CreateDsnOperation.java index 30eca86..66ce2da 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/mail/CreateDsnOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/mail/CreateDsnOperation.java @@ -29,6 +29,7 @@ import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; import javax.mail.internet.MimeMessage; import java.io.ByteArrayOutputStream; @@ -38,6 +39,7 @@ import java.util.function.Consumer; @PipelineOperation +@Component public class CreateDsnOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(CreateDsnOperation.class); diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/mail/CreateEmbeddedMessageRfc822Operation.java b/src/main/java/net/sberg/openkim/pipeline/operation/mail/CreateEmbeddedMessageRfc822Operation.java index 5928dec..10664b6 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/mail/CreateEmbeddedMessageRfc822Operation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/mail/CreateEmbeddedMessageRfc822Operation.java @@ -28,6 +28,7 @@ import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; import javax.mail.Address; import javax.mail.Message; @@ -44,6 +45,7 @@ import java.util.function.Consumer; @PipelineOperation +@Component public class CreateEmbeddedMessageRfc822Operation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(CreateEmbeddedMessageRfc822Operation.class); diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/mail/DecryptVerifyMailOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/mail/DecryptVerifyMailOperation.java index baae732..96e1f7f 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/mail/DecryptVerifyMailOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/mail/DecryptVerifyMailOperation.java @@ -16,9 +16,9 @@ */ package net.sberg.openkim.pipeline.operation.mail; -import de.gematik.ws.conn.connectorcommon.DocumentType; -import de.gematik.ws.conn.encryptionservice.v6_1_1.DecryptDocumentResponse; -import de.gematik.ws.conn.signatureservice.v7_5_5.VerifyDocumentResponse; +import de.gematik.ws.conn.connectorcommon.v5.DocumentType; +import de.gematik.ws.conn.encryptionservice.v6.DecryptDocumentResponse; +import de.gematik.ws.conn.signatureservice.v7.VerifyDocumentResponse; import net.sberg.openkim.common.StringUtils; import net.sberg.openkim.common.metrics.DefaultMetricFactory; import net.sberg.openkim.common.x509.CMSUtils; @@ -27,7 +27,6 @@ import net.sberg.openkim.log.DefaultLogger; import net.sberg.openkim.log.error.EnumErrorCode; import net.sberg.openkim.pipeline.PipelineOperation; -import net.sberg.openkim.pipeline.PipelineService; import net.sberg.openkim.pipeline.operation.DefaultPipelineOperationContext; import net.sberg.openkim.pipeline.operation.IPipelineOperation; import net.sberg.openkim.pipeline.operation.konnektor.GetDecryptCardHandleOperation; @@ -40,6 +39,8 @@ import org.bouncycastle.asn1.cms.ContentInfo; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; import javax.mail.Session; import javax.mail.internet.MimeBodyPart; @@ -57,6 +58,7 @@ import java.util.function.Consumer; @PipelineOperation +@Component public class DecryptVerifyMailOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(DecryptVerifyMailOperation.class); @@ -67,23 +69,19 @@ public class DecryptVerifyMailOperation implements IPipelineOperation { public static final String ENV_SIGN_REPORT_SERVICE = "signResportService"; public static final String ENV_RESULT_MSG_BYTES = "resultMsgBytes"; + @Autowired private CheckEncryptedMailFormatOperation checkEncryptedMailFormatOperation; + @Autowired private GetDecryptCardHandleOperation getDecryptCardHandleOperation; + @Autowired private DecryptDocumentOperation decryptDocumentOperation; + @Autowired private VerifySignedDocumentOperation verifySignedDocumentOperation; + @Autowired private AddMailAttachmentOperation addMailAttachmentOperation; + @Autowired private AddMailTextOperation addMailTextOperation; - @Override - public void initialize(PipelineService pipelineService) throws Exception { - checkEncryptedMailFormatOperation = (CheckEncryptedMailFormatOperation) pipelineService.getOperation(BUILTIN_VENDOR+"."+CheckEncryptedMailFormatOperation.NAME); - getDecryptCardHandleOperation = (GetDecryptCardHandleOperation) pipelineService.getOperation(BUILTIN_VENDOR+"."+GetDecryptCardHandleOperation.NAME); - decryptDocumentOperation = (DecryptDocumentOperation) pipelineService.getOperation(BUILTIN_VENDOR+"."+DecryptDocumentOperation.NAME); - verifySignedDocumentOperation = (VerifySignedDocumentOperation) pipelineService.getOperation(BUILTIN_VENDOR+"."+VerifySignedDocumentOperation.NAME); - addMailAttachmentOperation = (AddMailAttachmentOperation) pipelineService.getOperation(BUILTIN_VENDOR+"."+AddMailAttachmentOperation.NAME); - addMailTextOperation = (AddMailTextOperation) pipelineService.getOperation(BUILTIN_VENDOR+"."+AddMailTextOperation.NAME); - } - @Override public String getName() { return NAME; diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/EncryptMailOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/mail/EncryptMailOperation.java similarity index 94% rename from src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/EncryptMailOperation.java rename to src/main/java/net/sberg/openkim/pipeline/operation/mail/EncryptMailOperation.java index 752eac7..a562a1e 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/EncryptMailOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/mail/EncryptMailOperation.java @@ -14,12 +14,12 @@ * See the Licence for the specific language governing permissions and * limitations under the Licence. */ -package net.sberg.openkim.pipeline.operation.konnektor.webservice; +package net.sberg.openkim.pipeline.operation.mail; -import de.gematik.ws.conn.connectorcommon.DocumentType; -import de.gematik.ws.conn.connectorcontext.ContextType; -import de.gematik.ws.conn.encryptionservice.v6_1_1.EncryptDocument; -import de.gematik.ws.conn.encryptionservice.v6_1_1.EncryptDocumentResponse; +import de.gematik.ws.conn.connectorcommon.v5.DocumentType; +import de.gematik.ws.conn.connectorcontext.v2.ContextType; +import de.gematik.ws.conn.encryptionservice.v6.EncryptDocument; +import de.gematik.ws.conn.encryptionservice.v6.EncryptDocumentResponse; import net.sberg.openkim.common.metrics.DefaultMetricFactory; import net.sberg.openkim.common.x509.CMSUtils; import net.sberg.openkim.common.x509.X509CertificateResult; @@ -36,6 +36,7 @@ import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; import java.util.Iterator; import java.util.List; @@ -43,6 +44,7 @@ import java.util.function.Consumer; @PipelineOperation +@Component public class EncryptMailOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(EncryptMailOperation.class); @@ -134,7 +136,7 @@ public void execute(DefaultPipelineOperationContext defaultPipelineOperationCont //document type Base64Data base64Data = new Base64Data(); base64Data.setValue((byte[])defaultPipelineOperationContext.getEnvironmentValue(NAME, ENV_SIGNED_MAIL)); - de.gematik.ws.conn.connectorcommon.DocumentType documentType = new DocumentType(); + de.gematik.ws.conn.connectorcommon.v5.DocumentType documentType = new DocumentType(); documentType.setBase64Data(base64Data); encryptDocument.setDocument(documentType); diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/mail/SendDsnOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/mail/SendDsnOperation.java index 31d2252..45d6fbb 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/mail/SendDsnOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/mail/SendDsnOperation.java @@ -30,6 +30,7 @@ import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; import javax.mail.internet.MimeMessage; import javax.net.ssl.SSLContext; @@ -42,6 +43,7 @@ import java.util.function.Consumer; @PipelineOperation +@Component public class SendDsnOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(SendDsnOperation.class); diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/mail/SignEncryptMailOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/mail/SignEncryptMailOperation.java index b03b398..8f3662d 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/mail/SignEncryptMailOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/mail/SignEncryptMailOperation.java @@ -16,26 +16,25 @@ */ package net.sberg.openkim.pipeline.operation.mail; -import de.gematik.ws.conn.connectorcommon.DocumentType; -import de.gematik.ws.conn.encryptionservice.v6_1_1.EncryptDocumentResponse; -import de.gematik.ws.conn.signatureservice.v7_5_5.SignDocumentResponse; -import de.gematik.ws.conn.signatureservice.v7_5_5.SignResponse; +import de.gematik.ws.conn.connectorcommon.v5.DocumentType; +import de.gematik.ws.conn.encryptionservice.v6.EncryptDocumentResponse; +import de.gematik.ws.conn.signatureservice.v7.SignDocumentResponse; +import de.gematik.ws.conn.signatureservice.v7.SignResponse; import net.sberg.openkim.common.metrics.DefaultMetricFactory; import net.sberg.openkim.common.x509.CMSUtils; import net.sberg.openkim.common.x509.X509CertificateResult; import net.sberg.openkim.konnektor.Konnektor; import net.sberg.openkim.log.DefaultLogger; import net.sberg.openkim.pipeline.PipelineOperation; -import net.sberg.openkim.pipeline.PipelineService; import net.sberg.openkim.pipeline.operation.DefaultPipelineOperationContext; import net.sberg.openkim.pipeline.operation.IPipelineOperation; import net.sberg.openkim.pipeline.operation.konnektor.GetSignCardHandleOperation; -import net.sberg.openkim.pipeline.operation.konnektor.webservice.EncryptMailOperation; -import net.sberg.openkim.pipeline.operation.konnektor.webservice.SignMailOperation; import oasis.names.tc.dss._1_0.core.schema.SignatureObject; import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; import javax.mail.BodyPart; import javax.mail.internet.MimeBodyPart; @@ -50,6 +49,7 @@ import java.util.function.Consumer; @PipelineOperation +@Component public class SignEncryptMailOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(SignEncryptMailOperation.class); @@ -60,21 +60,17 @@ public class SignEncryptMailOperation implements IPipelineOperation { public static final String ENV_FROM_SENDER_CERTS = "fromSenderCerts"; public static final String ENV_RESULT_MSG_BYTES = "resultMsgBytes"; + @Autowired private CheckEncryptedMailFormatOperation checkEncryptedMailFormatOperation; + @Autowired private GetSignCardHandleOperation getSignCardHandleOperation; + @Autowired private SignMailOperation signMailOperation; + @Autowired private EncryptMailOperation encryptMailOperation; + @Autowired private ComposeEncryptedMailOperation composeEncryptedMailOperation; - @Override - public void initialize(PipelineService pipelineService) throws Exception { - checkEncryptedMailFormatOperation = (CheckEncryptedMailFormatOperation) pipelineService.getOperation(BUILTIN_VENDOR+"."+CheckEncryptedMailFormatOperation.NAME); - getSignCardHandleOperation = (GetSignCardHandleOperation) pipelineService.getOperation(BUILTIN_VENDOR + "." + GetSignCardHandleOperation.NAME); - signMailOperation = (SignMailOperation) pipelineService.getOperation(BUILTIN_VENDOR + "." + SignMailOperation.NAME); - encryptMailOperation = (EncryptMailOperation) pipelineService.getOperation(BUILTIN_VENDOR + "." + EncryptMailOperation.NAME); - composeEncryptedMailOperation = (ComposeEncryptedMailOperation) pipelineService.getOperation(BUILTIN_VENDOR + "." + ComposeEncryptedMailOperation.NAME); - } - @Override public String getName() { return NAME; diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/SignMailOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/mail/SignMailOperation.java similarity index 93% rename from src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/SignMailOperation.java rename to src/main/java/net/sberg/openkim/pipeline/operation/mail/SignMailOperation.java index a176db5..9f27e2e 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/konnektor/webservice/SignMailOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/mail/SignMailOperation.java @@ -14,26 +14,28 @@ * See the Licence for the specific language governing permissions and * limitations under the Licence. */ -package net.sberg.openkim.pipeline.operation.konnektor.webservice; +package net.sberg.openkim.pipeline.operation.mail; -import de.gematik.ws.conn.connectorcontext.ContextType; -import de.gematik.ws.conn.signatureservice.v7_5_5.DocumentType; -import de.gematik.ws.conn.signatureservice.v7_5_5.SignRequest; -import de.gematik.ws.conn.signatureservice.v7_5_5.*; +import de.gematik.ws.conn.connectorcontext.v2.ContextType; +import de.gematik.ws.conn.signatureservice.v7.DocumentType; +import de.gematik.ws.conn.signatureservice.v7.SignRequest; +import de.gematik.ws.conn.signatureservice.v7.*; import net.sberg.openkim.common.metrics.DefaultMetricFactory; import net.sberg.openkim.common.x509.CMSUtils; import net.sberg.openkim.common.x509.X509CertificateResult; import net.sberg.openkim.konnektor.*; import net.sberg.openkim.log.DefaultLogger; import net.sberg.openkim.pipeline.PipelineOperation; -import net.sberg.openkim.pipeline.PipelineService; import net.sberg.openkim.pipeline.operation.DefaultPipelineOperationContext; import net.sberg.openkim.pipeline.operation.IPipelineOperation; +import net.sberg.openkim.pipeline.operation.konnektor.webservice.GetJobNumberOperation; import oasis.names.tc.dss._1_0.core.schema.*; import org.apache.commons.codec.binary.Base64; import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; import javax.mail.internet.MimeMessage; import java.io.ByteArrayOutputStream; @@ -43,6 +45,7 @@ import java.util.function.Consumer; @PipelineOperation +@Component public class SignMailOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(SignMailOperation.class); @@ -53,13 +56,9 @@ public class SignMailOperation implements IPipelineOperation { public static final String ENV_VZD_CERTS = "vzdCerts"; public static final String ENV_SIGN_DOCUMENT_RESPONSE = "signDocumentResponse"; + @Autowired private GetJobNumberOperation getJobNumberOperation; - @Override - public void initialize(PipelineService pipelineService) throws Exception { - getJobNumberOperation = (GetJobNumberOperation) pipelineService.getOperation(BUILTIN_VENDOR+"."+GetJobNumberOperation.NAME); - } - @Override public String getName() { return NAME; @@ -155,7 +154,7 @@ public void execute(DefaultPipelineOperationContext defaultPipelineOperationCont byteArrayOutputStream.close(); //document - de.gematik.ws.conn.signatureservice.v7_5_5.DocumentType documentType = new DocumentType(); + de.gematik.ws.conn.signatureservice.v7.DocumentType documentType = new DocumentType(); documentType.setBase64Data(base64Data); //sign request diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/mail/part/AddMailAttachmentOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/mail/part/AddMailAttachmentOperation.java index bba5098..aea40e6 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/mail/part/AddMailAttachmentOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/mail/part/AddMailAttachmentOperation.java @@ -20,12 +20,13 @@ import net.sberg.openkim.konnektor.Konnektor; import net.sberg.openkim.log.DefaultLogger; import net.sberg.openkim.pipeline.PipelineOperation; -import net.sberg.openkim.pipeline.PipelineService; import net.sberg.openkim.pipeline.operation.DefaultPipelineOperationContext; import net.sberg.openkim.pipeline.operation.IPipelineOperation; import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; import javax.mail.Multipart; import javax.mail.internet.ContentType; @@ -38,6 +39,7 @@ import java.util.function.Consumer; @PipelineOperation +@Component public class AddMailAttachmentOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(AddMailAttachmentOperation.class); @@ -49,13 +51,9 @@ public class AddMailAttachmentOperation implements IPipelineOperation { public static final String ENV_CONTENT_TYPE = "contentType"; public static final String ENV_RESULT_MSG = "resultMsg"; + @Autowired private AnalyzeMailPartsOperation analyzeMailPartsOperation; - @Override - public void initialize(PipelineService pipelineService) throws Exception { - analyzeMailPartsOperation = (AnalyzeMailPartsOperation) pipelineService.getOperation(BUILTIN_VENDOR+"."+AnalyzeMailPartsOperation.NAME); - } - @Override public String getName() { return NAME; diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/mail/part/AddMailTextOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/mail/part/AddMailTextOperation.java index 4a6b1e6..a063156 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/mail/part/AddMailTextOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/mail/part/AddMailTextOperation.java @@ -20,12 +20,13 @@ import net.sberg.openkim.konnektor.Konnektor; import net.sberg.openkim.log.DefaultLogger; import net.sberg.openkim.pipeline.PipelineOperation; -import net.sberg.openkim.pipeline.PipelineService; import net.sberg.openkim.pipeline.operation.DefaultPipelineOperationContext; import net.sberg.openkim.pipeline.operation.IPipelineOperation; import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; import javax.mail.internet.MimeBodyPart; import javax.mail.internet.MimeMessage; @@ -35,6 +36,7 @@ import java.util.function.Consumer; @PipelineOperation +@Component public class AddMailTextOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(AddMailTextOperation.class); @@ -44,13 +46,9 @@ public class AddMailTextOperation implements IPipelineOperation { public static final String ENV_TEXT = "text"; public static final String ENV_RESULT_MSG = "resultMsg"; + @Autowired private AnalyzeMailPartsOperation analyzeMailPartsOperation; - @Override - public void initialize(PipelineService pipelineService) throws Exception { - analyzeMailPartsOperation = (AnalyzeMailPartsOperation) pipelineService.getOperation(BUILTIN_VENDOR+"."+AnalyzeMailPartsOperation.NAME); - } - @Override public String getName() { return NAME; diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/mail/part/AnalyzeMailPartsOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/mail/part/AnalyzeMailPartsOperation.java index b2f0695..0e616f0 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/mail/part/AnalyzeMailPartsOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/mail/part/AnalyzeMailPartsOperation.java @@ -27,6 +27,7 @@ import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; import javax.mail.Multipart; import javax.mail.Session; @@ -41,6 +42,7 @@ import java.util.function.Consumer; @PipelineOperation +@Component public class AnalyzeMailPartsOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(AnalyzeMailPartsOperation.class); diff --git a/src/main/java/net/sberg/openkim/pipeline/operation/test/TestOperation.java b/src/main/java/net/sberg/openkim/pipeline/operation/test/TestOperation.java index 5e4afbf..87acc45 100644 --- a/src/main/java/net/sberg/openkim/pipeline/operation/test/TestOperation.java +++ b/src/main/java/net/sberg/openkim/pipeline/operation/test/TestOperation.java @@ -25,11 +25,13 @@ import org.apache.james.metrics.api.TimeMetric; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; import java.util.function.BiConsumer; import java.util.function.Consumer; @PipelineOperation +@Component public class TestOperation implements IPipelineOperation { private static final Logger log = LoggerFactory.getLogger(TestOperation.class); diff --git a/src/main/resources/api/AccountLimit.yaml b/src/main/resources/api/AccountLimit.yaml index d549ed8..ee1dc6c 100644 --- a/src/main/resources/api/AccountLimit.yaml +++ b/src/main/resources/api/AccountLimit.yaml @@ -1,8 +1,11 @@ openapi: 3.0.3 info: title: I_AccountLimit_Service - description: Über diese Schnittstelle werden die Limits eines Nutzer-Accounts abgefragt - version: 1.0.0 + description: Über diese Schnittstelle werden die Limits eines Nutzer-Accounts abgefragt + version: 1.1 + ### 1.1 + # - changed version number in server url + # - removed quotation marks and added minimum value for maxMailSize ### 1.0.0 # - initial Version of I_AccountLimit_Service @@ -10,7 +13,7 @@ externalDocs: description: GitHub - Dokumentation url: https://github.com/gematik/api-kim servers: - - url: https://account-manager.hrst1.kim.telematik/AccountLimit/v1.0/ + - url: https://account-manager.hrst1.kim.telematik/AccountLimit/v1.1/ tags: - name: AccountLimit @@ -26,7 +29,7 @@ paths: operationId: getLimits security: - - basicAuth: [ ] + - basicAuth: [] responses: 200: @@ -75,15 +78,16 @@ components: maxMailSize: type: integer format: int64 + minimum: 524288000 example: 734003200 description: Setzt die maximale Größe einer KIM-Mail in Bytes quota: - type: "integer" + type: integer format: int64 example: 160000000000 description: Gibt das maximale Speichervolumen für einen Nutzer-Account an remainQuota: - type: "integer" + type: integer format: int64 example: 112000000000 description: Gibt das verbleibende Speichervolumen für einen Nutzer-Account an @@ -97,4 +101,4 @@ components: securitySchemes: basicAuth: type: http - scheme: basic + scheme: basic \ No newline at end of file diff --git a/src/main/resources/api/AccountManager.yaml b/src/main/resources/api/AccountManager.yaml index 90b81b0..42681f3 100644 --- a/src/main/resources/api/AccountManager.yaml +++ b/src/main/resources/api/AccountManager.yaml @@ -1,9 +1,20 @@ openapi: 3.0.3 info: title: I_AccountManager_Service - description: Über diese Schnittstelle wird der KIM Account verwaltet. + description: Über diese Schnittstelle wird der KIM Account verwaltet. # Für alle Operationen muss der Zeichensatz "utf-8” unterstützt werden. - version: 2.2.0 + version: 2.3.0 + ### 2.3.0 + # - change server url to new api version + # - added /account/{username}/revokeDeregistration + # to allow customers to revoke the deregistration process + # - changed description for externalDoc to Github + # - added status Code 502 for operation createCert in case the account manager acts as a proxy + # - added status Code 403 for operation setTID in case the token is not valid + # - added format int64 for deregDate property + # - changed otp property to lowercase and added password as format + # - added response code 404 for getOTP in case e-mail account does not exist + # - added response code 404 for deregisterAccount in case e-mail account does not exist ### 2.2.0 # - updated url to https://account-manager.hrst1.kim.telematik/AccountMgmt/v2.2 # - changed /components/schemas/Account: @@ -39,10 +50,10 @@ info: # - initial Version of I_AccountManager_Service externalDocs: - description: Gitlab Dokumentation + description: Github Dokumentation url: https://github.com/gematik/api-kim servers: - - url: https://account-manager.hrst1.kim.telematik/AccountMgmt/v2.2/ + - url: https://account-manager.hrst1.kim.telematik/AccountMgmt/v2.3/ # ist der Platzhalter für den Fachdienstbetreiber tags: - name: Email-Account @@ -50,7 +61,7 @@ tags: - name: Out of Office Notification security: - - bearerAuth: [ ] + - bearerAuth: [] # Die Authentisierung erfolgt für alle Operatiponen über ein JWT paths: @@ -60,7 +71,7 @@ paths: post: tags: - Email-Account - summary: Registiriert einen neuen Email Account. + summary: Registriert einen neuen Email Account. # In allen Fehlerfällen wird der Account nicht erzeugt. operationId: registerAccount parameters: @@ -118,7 +129,7 @@ paths: schema: $ref: '#/components/schemas/Error' 409: - description: Konflikt mit bereits bestehenden Account mit identischer E-Mail (E-Mail Adresse bereits vergeben). + description: Konflikt mit bereits bestehenden Account mit identischer e-mail (e-mail Adresse bereits vergeben). content: application/json: schema: @@ -260,6 +271,12 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + 404: + description: Email Account nicht vorhanden. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' 500: description: Internal Server Error content: @@ -316,16 +333,85 @@ paths: example: registered deregDate: type: integer + format: int64 example: 1616588543 readOnly: true description: Bestätigtes Kündigungsdatum (Unix Timestamp) # Der KIM Anbieter kann über dieses Attribut angeben, bis wann die Mails noch abrufbar sind + 400: + description: Fehler in den Eingangsdaten, Beschreibung des Fehlers erfolgt in dem Fehlertext + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 401: + description: Authentifizierung fehlgeschlagen + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 404: + description: Mail Account nicht vorhanden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 500: + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 502: + description: VZD nicht erreichbar bzw. liefert Fehler + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + ##-- + ##------ + /account/{username}/revokeDeregistration: + put: + tags: + - Email-Account + summary: Deregistrierung des Accounts zurücknehmen + operationId: revokeDeregistration + parameters: + - name: username + in: path + description: Username/E-Mail des Accounts + required: true + schema: + type: string + format: email + - in: header + name: password + description: Passwort für den Email-Account + required: true + schema: + type: string + format: password + responses: + 204: + description: Deregistrierung erolgreich zurückgenommen + 400: + description: Fehler in den Eingangsdaten, Beschreibung des Fehlers erfolgt in dem Fehlertext + content: + application/json: + schema: + $ref: '#/components/schemas/Error' 401: description: Authentifizierung fehlgeschlagen content: application/json: schema: $ref: '#/components/schemas/Error' + 403: + description: Email Account wurde bisher nicht deregistriert + content: + application/json: + schema: + $ref: '#/components/schemas/Error' 404: description: Mail Account nicht vorhanden content: @@ -350,9 +436,9 @@ paths: get: tags: - Porting - summary: Portierung der E-Mail-Adresse zu einer neuen telematikID + summary: Portierung der e-mail Adresse zu einer neuen telematikID operationId: getOTP - description: Diese Operation erzeugt für den KIM Account/E-Mail-Adresse ein One Time Passwort (OTP), mit dem die E-Mail-Adresse zu einer telematikID (Karte) portiert werden kann. Die Authentisierung erfolgt mit der bisherigen Karte. + description: Diese Operation erzeugt für den KIM Account/e-Mail Adresse ein One Time Passwort (OTP), mit dem die e-Mail Adresse zu einer telematikID (Karte) portiert werden kann. Die Authentisierung erfolgt mit der bisherigen Karte. parameters: - name: username in: path @@ -377,18 +463,29 @@ paths: schema: type: object properties: - OTP: + otp: type: string - format: binary - description: One Time Passwort für die Portierung der KIM-Mail-Adresse zu einer anderen telematikID. - + format: password + description: One Time Passwort für die Portierung der KIM Mail Adresse zu einer anderen telematikID. + 400: + description: Fehler in den Eingangsdaten, Beschreibung des Fehlers erfolgt in dem Fehlertext + content: + application/json: + schema: + $ref: '#/components/schemas/Error' 401: description: Authentifizierung fehlgeschlagen. content: application/json: schema: $ref: '#/components/schemas/Error' + 404: + description: Email Account nicht vorhanden. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' 500: description: Internal Server Error content: @@ -402,9 +499,9 @@ paths: put: tags: - Porting - summary: Portierung der E-Mail-Adresse zu einer neuen telematikID + summary: Portierung der e-mail Adresse zu einer neuen telematikID operationId: setTID - description: Diese Operation entfernt die E-Mail-Adresse vom bisherigen VZD Eintrag und trägt die für den aktuellen VZD Eintrag (der den Authentisierungsdaten dieser Operation setTID entspricht) ein. Die Authentisierung erfolgt mit der neuen Karte. + description: Diese Operation entfernt die e-mail Adresse vom bisherigen VZD Eintrag und trägt die für den aktuellen VZD Eintrag (der den Authentisierungsdaten dieser Operation setTID entspricht) ein. Die Authentisierung erfolgt mit der neuen Karte. parameters: - name: username in: path @@ -421,7 +518,7 @@ paths: type: string format: password - in: header - name: OTP + name: otp description: One Time Passwort (OTP) (von getOTP zurückgegeben) required: true schema: @@ -431,12 +528,24 @@ paths: responses: 204: description: Änderung der TelematikID erfolgreich. + 400: + description: Fehler in den Eingangsdaten, Beschreibung des Fehlers erfolgt in dem Fehlertext + content: + application/json: + schema: + $ref: '#/components/schemas/Error' 401: description: Authentifizierung fehlgeschlagen. content: application/json: schema: $ref: '#/components/schemas/Error' + 403: + description: Invalides OTP + content: + application/json: + schema: + $ref: '#/components/schemas/Error' 404: description: Email Account nicht vorhanden. content: @@ -445,7 +554,6 @@ paths: $ref: '#/components/schemas/Error' 408: description: Request Timeout - # Gültigkeitsdauer des One Time Passworts ist abgelaufen content: application/json: schema: @@ -530,6 +638,12 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + 502: + description: CMP-Service nicht erreichbar bzw. liefert Fehler + content: + application/json: + schema: + $ref: '#/components/schemas/Error' ##-- ##------ /account/{username}/outofoffice: @@ -680,6 +794,7 @@ components: example: registered deregDate: type: integer + format: int64 example: 1616588543 readOnly: true description: Bestätigtes Kündigungsdatum (Unix Timestamp) @@ -743,4 +858,4 @@ components: type: http scheme: bearer bearerFormat: JWT - # Das JWT wird in compact serialization (RFC 7515, Section 3.1) kodiert und im HTTP-Header Authorization nach dem Bearer-Schema übertragen. + # Das JWT wird in compact serialization (RFC 7515, Section 3.1) kodiert und im HTTP-Header Authorization nach dem Bearer-Schema übertragen. \ No newline at end of file diff --git a/src/main/resources/api/AttachmentService.yaml b/src/main/resources/api/AttachmentService.yaml index 3806e4b..18ebfd4 100644 --- a/src/main/resources/api/AttachmentService.yaml +++ b/src/main/resources/api/AttachmentService.yaml @@ -1,9 +1,15 @@ openapi: 3.0.3 info: title: I_Attachment_Service - description: Über diese Schnittstelle können verschlüsselte E-Mail-Anhänge
+ description: Über diese Schnittstelle können verschlüsselte E-Mail-Anhänge
hochgeladen und bereitgestellt werden. - version: 2.2.0 + version: 2.3.1 + ### 2.3.1 + # - added delete_Maildata feature + ### 2.3.0 + # - changed server url to new api version + # - added response code for wrong input parameters + # - added response type object for operation add_Attachment ### 2.2.0 # - updated url to https://kas.hrst1.kim.telematik/attachments/v2.2/ # - deleted operation read_MaxMailSize @@ -33,7 +39,7 @@ externalDocs: description: GitHub - Dokumentation url: https://github.com/gematik/api-kim servers: - - url: https://kas.hrst1.kim.telematik/attachments/v2.2/ + - url: https://kas.hrst1.kim.telematik/attachments/v2.3/ tags: - name: Attachments @@ -73,6 +79,12 @@ paths: schema: type: string format: binary + 400: + description: Fehler in den Eingangsdaten, Beschreibung des Fehlers erfolgt in dem Fehlertext + content: + application/json: + schema: + $ref: '#/components/schemas/Error' 403: description: Recipient nicht in der Empfängerliste der KIM-Mail enthalten content: @@ -91,13 +103,63 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + 500: + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + + ##-- + ##------ + delete: + tags: + - Attachments + summary: E-Mail-Daten von KAS löschen + description: Löschen von auf dem KAS abgelegten E-Mail-Daten, Uri entspricht sharedLink aus add_Attachment + operationId: delete_Maildata + + security: + - basicAuth: [] + # Die Authentifizierung erfolgt mit username/password von dem Mail Account, des Daten-Einstellers/Absenders + + parameters: + - name: attachmentId + in: path + description: Link-Referenz auf den verschüsselten Anhang im Dienst + required: true + schema: + type: string + + responses: + 200: + description: OK - Daten wurden gelöscht + 400: + description: Fehler in den Eingangsdaten, Beschreibung des Fehlers erfolgt in dem Fehlertext + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 401: + description: Authentifizierung fehlgeschlagen. + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 404: + description: Ressource unter dem angegebenen Link nicht gefunden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' 500: description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' + ##-- ##------ /attachment/: @@ -109,7 +171,7 @@ paths: operationId: add_Attachment security: - - basicAuth: [ ] + - basicAuth: [] # Die Authentifizierung erfolgt mit username/password von dem Mail Account requestBody: @@ -123,7 +185,7 @@ paths: description: MessageID der zugehörigen KIM-Mail recipients: type: array - description: Liste aller Empfänger (KIM-Adressen) der KIM-Mail Empfänger + description: Liste aller Empfänger (KIM-Adressen) der KIM-Mail Empfänger; Pro Form-Part wird genau eine Adresse spezifiziert und der Form-Part wird mehrfach angegeben (exploded=true) items: type: string format: email @@ -143,14 +205,14 @@ paths: content: application/json: schema: + type: object properties: sharedLink: type: string # Enthält den Freigabelink # Über den Freigabelink kann der Anhang vom KAS abgerufen werden. Der Freigabelink enthält die - in Operation read_Attachment nötige - attachmentID. 400: - description: Bad request - # Fehler in den Eingangsdaten, Beschreibung des Fehlers erfolgt in dem Fehlertext + description: Fehler in den Eingangsdaten, Beschreibung des Fehlers erfolgt in dem Fehlertext content: application/json: schema: @@ -196,4 +258,4 @@ components: securitySchemes: basicAuth: type: http - scheme: basic + scheme: basic \ No newline at end of file diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 18a1b52..86a5401 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -18,9 +18,6 @@ konfiguration: encryptionKeys: qwzwebnjcv5461237884,fgjnkfnkndfk,tgzjnbdnbjdfngj,dkgfjgkfjgkjfgkfxccnv,rfughnvvcnbfjgjvnxcbn encryptPasswords: true -pipeline: - scanPackages: net.sberg.openkim.pipeline.operation - gatewaykeystore: password: 123!sberg!456 diff --git a/src/main/resources/templates/konnwebservice/certificateUebersicht.html b/src/main/resources/templates/konnwebservice/certificateUebersicht.html index 03e74e9..3aa0340 100644 --- a/src/main/resources/templates/konnwebservice/certificateUebersicht.html +++ b/src/main/resources/templates/konnwebservice/certificateUebersicht.html @@ -19,7 +19,7 @@ - +
@@ -84,7 +84,7 @@
Lesen von Kartenzertifikaten
- +
diff --git a/src/main/resources/templates/konnwebservice/encryptionUebersicht.html b/src/main/resources/templates/konnwebservice/encryptionUebersicht.html index 654b097..2731e54 100644 --- a/src/main/resources/templates/konnwebservice/encryptionUebersicht.html +++ b/src/main/resources/templates/konnwebservice/encryptionUebersicht.html @@ -11,7 +11,7 @@ - +
@@ -79,7 +79,7 @@
Entschlüsseln von einem Dokument
- +
@@ -141,7 +141,7 @@
Verschlüsseln von einem Dokument
- +
diff --git a/src/main/resources/templates/konnwebservice/eventUebersicht.html b/src/main/resources/templates/konnwebservice/eventUebersicht.html index 991fa67..de70828 100644 --- a/src/main/resources/templates/konnwebservice/eventUebersicht.html +++ b/src/main/resources/templates/konnwebservice/eventUebersicht.html @@ -25,7 +25,7 @@ - +
@@ -88,7 +88,7 @@
Lesen von Karteninformationen
- +
@@ -136,7 +136,7 @@
Lesen von Kartenterminalinformationen
- +
diff --git a/src/main/resources/templates/konnwebservice/signatureUebersicht.html b/src/main/resources/templates/konnwebservice/signatureUebersicht.html index 13f7f23..00409fa 100644 --- a/src/main/resources/templates/konnwebservice/signatureUebersicht.html +++ b/src/main/resources/templates/konnwebservice/signatureUebersicht.html @@ -11,7 +11,7 @@ - +
@@ -99,7 +99,7 @@
Signieren eines Dokumentes
- +
@@ -172,7 +172,7 @@
Signieren eines Dokumentes - Angabe des Mailtextes
- +