Skip to content

Commit 6e111e6

Browse files
Gematik-Entwicklungsbaulig
authored andcommitted
R1.0.3
1 parent edaacc5 commit 6e111e6

77 files changed

Lines changed: 2110 additions & 347 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
36.1 KB
Loading

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,18 @@ The PoPP-Client supports TLS connections using [ECC](https://gemspec.gematik.de/
8484
```
8585
openssl s_client -showcerts -connect <Konnektor_IP>:<PORT>
8686
```
87+
88+
Depending on the Konnektor type, you might add a curves parameter to the command, e.g.:
89+
90+
```
91+
openssl s_client -showcerts -connect <Konnektor_IP>:<PORT> -curves brainpoolP256r1
92+
```
93+
94+
or a cipher parameter, e.g.:
95+
96+
```
97+
openssl s_client -showcerts -connect <Konnektor_IP>:<PORT> -cipher ECDHE-ECDSA-AES128-GCM-SHA256
98+
```
8799
88100
* Import the Konnektor certificate including the whole trust chain into your truststore (e.g., truststore.p12):
89101
@@ -103,11 +115,13 @@ Configure your Konnektor address and context:
103115
connector:
104116
end-point-url: <ip address and port of event-service endpoint of Konnektor>
105117
terminal-configuration:
118+
log-ws: <if SOAP messages should be logged>
106119
secure:
107120
enable: <If TLS should be used>
108121
hostname-validation: <The Hostname of the Konnektor should be validated>
109122
keystore: <Keystore with the client certificate>
110123
keystore-password: <Password of the keystore>
124+
trust-all: <If all certificates should be trusted, only for testing purposes>
111125
truststore: <Truststore with the Konnektor certificate and its trust chain>
112126
truststore-password: <Password of the truststore>
113127
context:
@@ -126,11 +140,13 @@ Example:
126140
connector:
127141
end-point-url: "http://127.0.0.1"
128142
terminal-configuration:
143+
log-ws: true
129144
secure:
130145
enable: false
131146
hostname-validation: true
132147
keystore: keystore.p12
133148
keystore-password: changeit
149+
trust-all: false
134150
truststore: truststore.p12
135151
truststore-password: changeit
136152
context:

ReleaseNotes.md

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,34 @@
1-
# Release 1.0.2
1+
<img align="right" width="250" height="47" src="Gematik_Logo_Flag_With_Background.png" /> <br />
22

3-
- initial release
3+
# Release Notes popp-sample-code
4+
5+
### Known Issues
46

5-
### Features
7+
## Release 1.0.3
68

7-
- Generate PoPP tokens using a standard PC/SC USB terminal or Konnektor and eHealth card terminal.
8-
- Configuration of Konnektor connection possible
9+
### fixed
910

10-
### Fixed
11+
- supports both CardService versions 8.1 and 8.2 [Issue 2](https://github.com/gematik/popp-sample-code/issues/2)
12+
- Filter GetCards by CardType [Issue 3](https://github.com/gematik/popp-sample-code/issues/3)
13+
- use correct endpoints for CardService requests [Issue 4](https://github.com/gematik/popp-sample-code/issues/4)
14+
- Context added for StartCardSession requests [Issue 5](https://github.com/gematik/popp-sample-code/issues/5)
15+
- TLS with Konnektor now works correctly [Issue 6](https://github.com/gematik/popp-sample-code/issues/6)
16+
- hostname validation can be configured [Issue 7](https://github.com/gematik/popp-sample-code/issues/7)
17+
- sessionId is now used correctly for StopCardSession [Issue 8](https://github.com/gematik/popp-sample-code/issues/8)
18+
- unit tests are now compatible with Windows
19+
- use end entity certificates for hash generation
20+
- Telematik-ID can be changed in server configuration
21+
- responses for CardService now use the correct marshaller
1122

12-
- TLS connection to Konnektor with ECC is working
23+
## Release 1.0.2
1324

14-
### Known Issues
25+
- initial release
26+
27+
### added
28+
29+
- generate PoPP tokens using a standard PC/SC USB terminal or Konnektor and eHealth card terminal
30+
- configuration of Konnektor connection possible
31+
32+
### fixed
1533

16-
- Service endpoints are derived only from EndpointTLS entries, not from unsecured Endpoint entries
17-
- EventService.xsd references CardService with namespace http://ws.gematik.de/conn/CardService/v8.1 instead of v8.2.
18-
- The card handle of the first card returned in the GetCards response is used, regardless of card type; this may result in a non-eGK card handle being used for StartCardSession.
34+
- TLS connection to Konnektor with ECC is working

docker/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ services:
33
build:
44
context: ../popp-server
55
dockerfile: docker/Dockerfile
6-
image: local/popp/popp-server:1.0.2
6+
image: local/popp/popp-server:1.0.3
77
container_name: popp-server
88
ports:
99
- "8443:8443"

license-header.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Copyright (Date see Readme), gematik GmbH
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
* *******
17+
*
18+
* For additional notes and disclaimer from gematik and in case of changes by gematik find details in the "Readme" file.
19+
*/
20+

pom.xml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
<parent>
88
<groupId>org.springframework.boot</groupId>
99
<artifactId>spring-boot-starter-parent</artifactId>
10-
<version>3.5.3</version>
10+
<version>3.5.5</version>
1111
</parent>
1212

1313
<groupId>de.gematik.refpopp</groupId>
1414
<artifactId>popp-example-impl-global</artifactId>
15-
<version>1.0.2</version>
15+
<version>1.0.3</version>
1616
<packaging>pom</packaging>
1717
<name>popp-sample-code</name>
1818
<description>PoPP - example implementation</description>
@@ -88,9 +88,9 @@
8888
<version.maven>3.8.6</version.maven>
8989
<version.maven-clean-plugin>3.5.0</version.maven-clean-plugin>
9090
<version.maven-compiler-plugin>3.14.0</version.maven-compiler-plugin>
91-
<version.maven-enforcer-plugin>3.6.0</version.maven-enforcer-plugin>
91+
<version.maven-enforcer-plugin>3.6.1</version.maven-enforcer-plugin>
9292
<version.maven-failsafe-plugin>3.5.3</version.maven-failsafe-plugin>
93-
<version.maven-gpg-plugin>3.2.7</version.maven-gpg-plugin>
93+
<version.maven-gpg-plugin>3.2.8</version.maven-gpg-plugin>
9494
<version.maven-javadoc-plugin>3.11.2</version.maven-javadoc-plugin>
9595
<version.maven-project-info-reports-plugin>3.9.0</version.maven-project-info-reports-plugin>
9696
<!-- only needed for mvn site to avoid stack traces flooding the console -->
@@ -101,7 +101,7 @@
101101
<version.maven-surefire-plugin>3.5.3</version.maven-surefire-plugin>
102102
<version.central-publishing-maven-plugin>0.8.0</version.central-publishing-maven-plugin>
103103
<version.sonar-maven-plugin>5.1.0.4751</version.sonar-maven-plugin>
104-
<version.spotless-maven-plugin>2.44.5</version.spotless-maven-plugin>
104+
<version.spotless-maven-plugin>2.46.1</version.spotless-maven-plugin>
105105
<version.spotless.google-java-format>1.27.0</version.spotless.google-java-format>
106106
<version.spring-boot-maven-plugin>3.3.2</version.spring-boot-maven-plugin>
107107
</properties>
@@ -165,7 +165,7 @@
165165
<dependency>
166166
<groupId>commons-io</groupId>
167167
<artifactId>commons-io</artifactId>
168-
<version>2.19.0</version>
168+
<version>2.20.0</version>
169169
</dependency>
170170
<dependency>
171171
<groupId>org.jacoco</groupId>
@@ -349,6 +349,16 @@
349349
<style>GOOGLE</style>
350350
<reflowLongStrings>true</reflowLongStrings>
351351
</googleJavaFormat>
352+
353+
# currently excluded to avoid issues with the test
354+
<excludes>
355+
<exclude>**/ConnectorCommunicationServiceTest.java</exclude>
356+
</excludes>
357+
358+
<licenseHeader>
359+
<file>license-header.txt</file>
360+
<delimiter>package </delimiter>
361+
</licenseHeader>
352362
</java>
353363
<groovy>
354364
<includes>
@@ -365,6 +375,14 @@
365375
</excludes>
366376
</markdown>
367377
</configuration>
378+
<executions>
379+
<execution>
380+
<goals>
381+
<goal>apply</goal>
382+
</goals>
383+
<phase>compile</phase>
384+
</execution>
385+
</executions>
368386
</plugin>
369387
</plugins>
370388
</build>

popp-client/pom.xml

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@
77
<parent>
88
<groupId>de.gematik.refpopp</groupId>
99
<artifactId>popp-example-impl-global</artifactId>
10-
<version>1.0.2</version>
10+
<version>1.0.3</version>
1111
<relativePath>../pom.xml</relativePath>
1212
</parent>
1313

1414
<artifactId>popp-client</artifactId>
15-
<version>1.0.2</version>
15+
<version>1.0.3</version>
1616
<packaging>jar</packaging>
1717

1818
<name>popp-client</name>
1919

2020
<description>Example implementation POPP-Client</description>
2121

2222
<properties>
23-
<sonar.coverage.exclusions>**/de/gematik/refpopp/popp_client/configuration/**/*</sonar.coverage.exclusions>
23+
<sonar.coverage.exclusions>**/de/gematik/refpopp/popp_client/configuration/**/*, **/*Configuration.java</sonar.coverage.exclusions>
2424
</properties>
2525

2626
<dependencies>
@@ -357,7 +357,7 @@
357357
<version>4.0.3</version>
358358
<executions>
359359
<execution>
360-
<id>general</id>
360+
<id>event-service</id>
361361
<goals>
362362
<goal>wsimport</goal>
363363
</goals>
@@ -367,12 +367,33 @@
367367
</wsdlDirectory>
368368
<wsdlFiles>
369369
<wsdlFile>conn/EventService.wsdl</wsdlFile>
370-
<wsdlFile>conn/CardService_v8_2_1.wsdl</wsdlFile>
370+
<wsdlFile>conn/CardService_v8_1_2.wsdl</wsdlFile>
371371
</wsdlFiles>
372372
<keep>true</keep>
373373
<sourceDestDir>${project.build.directory}/generated-sources</sourceDestDir>
374374
</configuration>
375375
</execution>
376+
<execution>
377+
<id>card-service-v821</id>
378+
<goals>
379+
<goal>wsimport</goal>
380+
</goals>
381+
<configuration>
382+
<wsdlDirectory>
383+
src/main/resources/api-telematik-OPB4
384+
</wsdlDirectory>
385+
<wsdlFiles>
386+
<wsdlFile>conn/CardService_v8_2_1.wsdl</wsdlFile>
387+
</wsdlFiles>
388+
389+
<bindingFiles>
390+
<bindingFile>cardservice_v8_2_1.xjb</bindingFile>
391+
</bindingFiles>
392+
<extension>true</extension>
393+
<keep>true</keep>
394+
<sourceDestDir>${project.build.directory}/generated-sources</sourceDestDir>
395+
</configuration>
396+
</execution>
376397
<execution>
377398
<id>signatureservice74</id>
378399
<goals>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<jaxb:bindings
3+
xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
4+
xmlns:xs="http://www.w3.org/2001/XMLSchema"
5+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6+
xsi:schemaLocation="https://jakarta.ee/xml/ns/jaxb https://jakarta.ee/xml/ns/jaxb/bindingschema_3_0.xsd"
7+
version="3.0">
8+
9+
<jaxb:bindings schemaLocation="../main/resources/api-telematik-OPB4/conn/CardService_v8_2_1.xsd" node="/xs:schema">
10+
<jaxb:schemaBindings>
11+
<jaxb:package name="de.gematik.ws.conn.cardservice.v821"/>
12+
</jaxb:schemaBindings>
13+
</jaxb:bindings>
14+
15+
</jaxb:bindings>

popp-client/src/main/java/de/gematik/refpopp/popp_client/cardreader/card/CardCommunicationService.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import de.gematik.poppcommons.api.messages.ScenarioStep;
2929
import de.gematik.refpopp.popp_client.cardreader.card.events.CardConnectedEvent;
3030
import de.gematik.refpopp.popp_client.cardreader.card.events.CardRemovedEvent;
31+
import de.gematik.refpopp.popp_client.cardreader.card.events.PaceInitializationCompleteEvent;
3132
import java.util.ArrayList;
3233
import java.util.HexFormat;
3334
import java.util.List;
@@ -38,6 +39,7 @@
3839
import javax.smartcardio.ResponseAPDU;
3940
import lombok.Setter;
4041
import lombok.extern.slf4j.Slf4j;
42+
import org.springframework.context.ApplicationEventPublisher;
4143
import org.springframework.context.event.EventListener;
4244
import org.springframework.stereotype.Service;
4345

@@ -51,8 +53,10 @@ public class CardCommunicationService {
5153
private static final HexFormat HEX_FORMAT = HexFormat.of();
5254
private CardChannel cardChannel;
5355
private TrustedChannelScope trustedChannel;
56+
private final ApplicationEventPublisher eventPublisher;
5457

55-
public CardCommunicationService() {
58+
public CardCommunicationService(ApplicationEventPublisher eventPublisher) {
59+
this.eventPublisher = eventPublisher;
5660
log.debug("| Entering CardService()");
5761
log.debug("| Exiting CardService()");
5862
}
@@ -73,6 +77,8 @@ public void handleCardConnectionEvent(final CardConnectedEvent event) {
7377
if (isContactless()) {
7478
log.info("| Detected contactless reader - Initialize PACE");
7579
initializePACE();
80+
eventPublisher.publishEvent(new PaceInitializationCompleteEvent());
81+
7682
} else {
7783
log.info("| Detected contact-based reader - No PACE necessary");
7884
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* Copyright (Date see Readme), gematik GmbH
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
* *******
17+
*
18+
* For additional notes and disclaimer from gematik and in case of changes by gematik find details in the "Readme" file.
19+
*/
20+
21+
package de.gematik.refpopp.popp_client.cardreader.card.events;
22+
23+
import org.springframework.context.ApplicationEvent;
24+
25+
public class PaceInitializationCompleteEvent extends ApplicationEvent {
26+
27+
public PaceInitializationCompleteEvent() {
28+
super(new Object());
29+
}
30+
}

0 commit comments

Comments
 (0)