Skip to content

Commit

Permalink
v27.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Gematik-Entwicklung authored and RStaeber committed Mar 14, 2024
1 parent 023d0b0 commit 77e825f
Show file tree
Hide file tree
Showing 16 changed files with 783 additions and 744 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ or use docker compose:

```console
$ mvn clean install -pl idp-server -am -Dskip.unittests -Dskip.inttests
$ export appVersion=27.0.1
$ export appVersion=27.0.2
$ export serverLoglevel=info (default)
$ docker-compose --project-name myidp -f docker-compose-ref.yml up -d
```
Expand Down
4 changes: 4 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Release 27.0.2

- adapt idp-client login for ePA (wip)

# Release 27.0.1

- add missing scope for gitHub
Expand Down
396 changes: 198 additions & 198 deletions doc/tokenFlowEgk.html

Large diffs are not rendered by default.

378 changes: 189 additions & 189 deletions doc/tokenFlowPs.html

Large diffs are not rendered by default.

664 changes: 332 additions & 332 deletions doc/tokenFlowSso.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions idp-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
<parent>
<groupId>de.gematik.idp</groupId>
<artifactId>idp-global</artifactId>
<version>27.0.1</version>
<version>27.0.2</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>de.gematik.idp</groupId>
<artifactId>idp-client</artifactId>

<version>27.0.1</version>
<version>27.0.2</version>
<packaging>jar</packaging>

<dependencies>
Expand Down
17 changes: 13 additions & 4 deletions idp-client/src/main/java/de/gematik/idp/client/IdpClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,12 @@ public IdpTokenResult login(
}

public AuthorizationCodeResult login(
final PkiIdentity smcbIdentity,
final X509Certificate certificate,
final UnaryOperator<byte[]> contentSigner,
final String codeChallenge,
final String state,
final String nonce) {

final X509Certificate certificate = smcbIdentity.getCertificate();

LOGGER.debug(
"Performing Authorization with remote-URL '{}'",
discoveryDocumentResponse.getAuthorizationEndpoint());
Expand Down Expand Up @@ -316,7 +315,7 @@ public AuthorizationCodeResult login(
.getChallenge()
.getRawString(),
certificate,
getContentSigner(smcbIdentity))))
contentSigner)))
.build(),
beforeAuthenticationMapper,
afterAuthenticationCallback));
Expand All @@ -329,6 +328,16 @@ public AuthorizationCodeResult login(
.build();
}

public AuthorizationCodeResult login(
final PkiIdentity smcbIdentity,
final String codeChallenge,
final String state,
final String nonce) {

return login(
smcbIdentity.getCertificate(), getContentSigner(smcbIdentity), codeChallenge, state, nonce);
}

public IdpTokenResult loginWithSsoToken(final IdpJwe ssoToken) {
assertThatClientIsInitialized();

Expand Down
6 changes: 3 additions & 3 deletions idp-commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<parent>
<groupId>de.gematik.idp</groupId>
<artifactId>idp-global</artifactId>
<version>27.0.1</version>
<version>27.0.2</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>idp-commons</artifactId>

<version>27.0.1</version>
<version>27.0.2</version>

<dependencies>

Expand Down Expand Up @@ -66,7 +66,7 @@
<dependency>
<groupId>org.bitbucket.b_c</groupId>
<artifactId>jose4j</artifactId>
<version>0.9.5</version>
<version>0.9.6</version>
</dependency>
</dependencies>

Expand Down
4 changes: 2 additions & 2 deletions idp-crypto/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<parent>
<groupId>de.gematik.idp</groupId>
<artifactId>idp-global</artifactId>
<version>27.0.1</version>
<version>27.0.2</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>idp-crypto</artifactId>
<version>27.0.1</version>
<version>27.0.2</version>

<dependencies>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion idp-report/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>de.gematik.idp</groupId>
<artifactId>idp-global</artifactId>
<version>27.0.1</version>
<version>27.0.2</version>
</parent>
<artifactId>idp-report</artifactId>

Expand Down
4 changes: 2 additions & 2 deletions idp-sektoral/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<parent>
<groupId>de.gematik.idp</groupId>
<artifactId>idp-global</artifactId>
<version>27.0.1</version>
<version>27.0.2</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>idp-sektoral</artifactId>
<version>27.0.1</version>
<version>27.0.2</version>
<packaging>jar</packaging>

<properties>
Expand Down
6 changes: 3 additions & 3 deletions idp-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
<parent>
<groupId>de.gematik.idp</groupId>
<artifactId>idp-global</artifactId>
<version>27.0.1</version>
<version>27.0.2</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>idp-server</artifactId>
<version>27.0.1</version>
<version>27.0.2</version>
<packaging>jar</packaging>

<properties>
<commit_hash>undefined</commit_hash>
<version.jaxb-api>2.4.0-b180830.0359</version.jaxb-api>
<version.jaxb-impl>4.0.4</version.jaxb-impl>
<version.jaxb-impl>4.0.5</version.jaxb-impl>
</properties>

<dependencies>
Expand Down
26 changes: 26 additions & 0 deletions idp-server/src/test/java/de/gematik/idp/server/EpaClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@
import de.gematik.idp.TestConstants;
import de.gematik.idp.client.AuthorizationCodeResult;
import de.gematik.idp.client.IdpClient;
import de.gematik.idp.crypto.EcSignerUtility;
import de.gematik.idp.crypto.Nonce;
import de.gematik.idp.crypto.model.PkiIdentity;
import de.gematik.idp.field.ClientUtilities;
import de.gematik.idp.tests.PkiKeyResolver;
import java.util.HashSet;
import java.util.Set;
import java.util.function.UnaryOperator;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
Expand Down Expand Up @@ -75,4 +77,28 @@ void verifyLogin() {
assertThat(authorizationCodeResult.getRedirectUri()).contains("http");
assertThat(authorizationCodeResult.getAuthorizationCode()).isNotEmpty();
}

@Test
void verifyLoginWithExternalContentSigner() {
final String nonce = Nonce.getNonceAsBase64UrlEncodedString(24);
final String codeChallenge =
ClientUtilities.generateCodeChallenge(ClientUtilities.generateCodeVerifier());
final String state = "state";

final AuthorizationCodeResult authorizationCodeResult =
idpClient.login(
smcbIdentity.getCertificate(),
getContentSigner(smcbIdentity),
codeChallenge,
state,
nonce);

assertThat(authorizationCodeResult.getState()).isEqualTo(state);
assertThat(authorizationCodeResult.getRedirectUri()).contains("http");
assertThat(authorizationCodeResult.getAuthorizationCode()).isNotEmpty();
}

private static UnaryOperator<byte[]> getContentSigner(final PkiIdentity pkiIdentityEcc) {
return tbsData -> EcSignerUtility.createEcSignature(tbsData, pkiIdentityEcc.getPrivateKey());
}
}
4 changes: 2 additions & 2 deletions idp-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<parent>
<groupId>de.gematik.idp</groupId>
<artifactId>idp-global</artifactId>
<version>27.0.1</version>
<version>27.0.2</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>idp-test</artifactId>
<version>27.0.1</version>
<version>27.0.2</version>

<dependencies>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions idp-testsuite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
<parent>
<groupId>de.gematik.idp</groupId>
<artifactId>idp-global</artifactId>
<version>27.0.1</version>
<version>27.0.2</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>idp-testsuite</artifactId>
<version>27.0.1</version>
<version>27.0.2</version>
<packaging>jar</packaging>

<properties>
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<groupId>de.gematik.idp</groupId>
<artifactId>idp-global</artifactId>
<version>27.0.1</version>
<version>27.0.2</version>
<packaging>pom</packaging>

<description>IDP</description>
Expand Down Expand Up @@ -96,7 +96,7 @@
<version.gemLibPki>2.1.1</version.gemLibPki>
<version.h2>2.2.224</version.h2>
<version.json>20240303</version.json>
<version.log4j2>2.23.0</version.log4j2>
<version.log4j2>2.23.1</version.log4j2>
<version.plexus-utils>3.4.2</version.plexus-utils>
<version.rest-assured>5.4.0</version.rest-assured>
<version.serenity.core>3.2.4</version.serenity.core>
Expand All @@ -115,7 +115,7 @@
<maven-deploy-plugin.version>3.1.1</maven-deploy-plugin.version>
<version.maven-enforcer-plugin>3.4.1</version.maven-enforcer-plugin>
<version.maven-failsafe-plugin>3.2.5</version.maven-failsafe-plugin>
<version.maven-gpg-plugin>3.1.0</version.maven-gpg-plugin>
<version.maven-gpg-plugin>3.2.0</version.maven-gpg-plugin>
<version.maven-jar-plugin>3.3.0</version.maven-jar-plugin>
<version.maven-javadoc-plugin>3.6.3</version.maven-javadoc-plugin>
<version.maven-project-info-reports-plugin>3.5.0</version.maven-project-info-reports-plugin>
Expand Down

0 comments on commit 77e825f

Please sign in to comment.