diff --git a/alfa-client/pom.xml b/alfa-client/pom.xml index bc81db6f0027dec1daf0f85400b260d2e7a65201..0466ba5fcf5a6efed1b783ef07a11cf7b5013b88 100644 --- a/alfa-client/pom.xml +++ b/alfa-client/pom.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - Copyright (C) 2022 Das Land Schleswig-Holstein vertreten durch den + Copyright (C) 2023 Das Land Schleswig-Holstein vertreten durch den Ministerpräsidenten des Landes Schleswig-Holstein Staatskanzlei Abteilung Digitalisierung und zentrales IT-Management der Landesregierung @@ -24,111 +24,113 @@ unter der Lizenz sind dem Lizenztext zu entnehmen. --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <parent> - <groupId>de.ozgcloud.alfa</groupId> - <artifactId>alfa</artifactId> - <version>2.17.0-SNAPSHOT</version> - </parent> + <parent> + <groupId>de.ozgcloud.alfa</groupId> + <artifactId>alfa</artifactId> + <version>2.17.0-SNAPSHOT</version> + </parent> - <modelVersion>4.0.0</modelVersion> - <artifactId>alfa-client</artifactId> - <name>Alfa Client</name> - <packaging>pom</packaging> + <modelVersion>4.0.0</modelVersion> + <artifactId>alfa-client</artifactId> + <name>Alfa Client</name> + <packaging>pom</packaging> + <inceptionYear>2020</inceptionYear> - <build> + <build> + <plugins> + <plugin> + <artifactId>maven-clean-plugin</artifactId> + <configuration> + <filesets> + <fileset> + <directory>dist</directory> + <includes> + <include>*</include> + <include>**/*</include> + </includes> + </fileset> + </filesets> + </configuration> + </plugin> + + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <version>3.0.0</version> + <executions> + <execution> + <id>test-application</id> + <phase>test</phase> + <configuration> + <workingDirectory>./</workingDirectory> + <executable>npm</executable> + <arguments> + <argument>run</argument> + <argument>test</argument> + </arguments> + <skip>${skipTests}</skip> + </configuration> + <goals> + <goal>exec</goal> + </goals> + </execution> + <execution> + <id>build-application</id> + <phase>compile</phase> + <configuration> + <workingDirectory>./</workingDirectory> + <executable>npm</executable> + <arguments> + <argument>run</argument> + <argument>ci-build</argument> + </arguments> + </configuration> + <goals> + <goal>exec</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + + <profiles> + <profile> + <activation> + <property> + <name>!skipNpmInstall</name> + </property> + </activation> + <id>npmInstall</id> + <build> <plugins> - <plugin> - <artifactId>maven-clean-plugin</artifactId> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <version>3.0.0</version> + <executions> + <execution> + <id>install-dependencies</id> + <phase>generate-sources</phase> <configuration> - <filesets> - <fileset> - <directory>dist</directory> - <includes> - <include>*</include> - <include>**/*</include> - </includes> - </fileset> - </filesets> + <workingDirectory>./</workingDirectory> + <executable>npm</executable> + <arguments> + <argument>install</argument> + </arguments> </configuration> - </plugin> - - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>exec-maven-plugin</artifactId> - <version>3.0.0</version> - <executions> - <execution> - <id>test-application</id> - <phase>test</phase> - <configuration> - <workingDirectory>./</workingDirectory> - <executable>npm</executable> - <arguments> - <argument>run</argument> - <argument>test</argument> - </arguments> - <skip>${skipTests}</skip> - </configuration> - <goals> - <goal>exec</goal> - </goals> - </execution> - <execution> - <id>build-application</id> - <phase>compile</phase> - <configuration> - <workingDirectory>./</workingDirectory> - <executable>npm</executable> - <arguments> - <argument>run</argument> - <argument>ci-build</argument> - </arguments> - </configuration> - <goals> - <goal>exec</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> - - <profiles> - <profile> - <activation> - <property> - <name>!skipNpmInstall</name> - </property> - </activation> - <id>npmInstall</id> - <build> - <plugins> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>exec-maven-plugin</artifactId> - <version>3.0.0</version> - <executions> - <execution> - <id>install-dependencies</id> - <phase>generate-sources</phase> - <configuration> - <workingDirectory>./</workingDirectory> - <executable>npm</executable> - <arguments> - <argument>install</argument> - </arguments> - </configuration> - <goals> - <goal>exec</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - </profiles> + <goals> + <goal>exec</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project> diff --git a/alfa-server/pom.xml b/alfa-server/pom.xml index 705a71a68fbff91a3dabdc0e701109e77daf6af8..994cf4071ac404fb093799a0fa27dcc3ab24fcde 100644 --- a/alfa-server/pom.xml +++ b/alfa-server/pom.xml @@ -1,4 +1,29 @@ <?xml version="1.0"?> +<!-- + + Copyright (C) 2023 Das Land Schleswig-Holstein vertreten durch den + Ministerpräsidenten des Landes Schleswig-Holstein + Staatskanzlei + Abteilung Digitalisierung und zentrales IT-Management der Landesregierung + + Lizenziert unter der EUPL, Version 1.2 oder - sobald + diese von der Europäischen Kommission genehmigt wurden - + Folgeversionen der EUPL ("Lizenz"); + Sie dürfen dieses Werk ausschließlich gemäß + dieser Lizenz nutzen. + Eine Kopie der Lizenz finden Sie hier: + + https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12 + + Sofern nicht durch anwendbare Rechtsvorschriften + gefordert oder in schriftlicher Form vereinbart, wird + die unter der Lizenz verbreitete Software "so wie sie + ist", OHNE JEGLICHE GEWÄHRLEISTUNG ODER BEDINGUNGEN - + ausdrücklich oder stillschweigend - verbreitet. + Die sprachspezifischen Genehmigungen und Beschränkungen + unter der Lizenz sind dem Lizenztext zu entnehmen. + +--> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> @@ -10,6 +35,7 @@ <artifactId>alfa-server</artifactId> <name>Alfa Server</name> + <inceptionYear>2020</inceptionYear> <properties> <maven.compiler.source>${java.version}</maven.compiler.source> diff --git a/alfa-service/pom.xml b/alfa-service/pom.xml index c796dfe3698ff61736910cb80a2f4e04ab3639af..c96920e46157e7702b661e03dae86d3e99a049e2 100644 --- a/alfa-service/pom.xml +++ b/alfa-service/pom.xml @@ -1,7 +1,7 @@ <?xml version="1.0"?> <!-- - Copyright (C) 2022 Das Land Schleswig-Holstein vertreten durch den + Copyright (C) 2023 Das Land Schleswig-Holstein vertreten durch den Ministerpräsidenten des Landes Schleswig-Holstein Staatskanzlei Abteilung Digitalisierung und zentrales IT-Management der Landesregierung @@ -39,6 +39,7 @@ <name>Alfa Service</name> <description>Alfa Service implementation</description> <packaging>jar</packaging> + <inceptionYear>2020</inceptionYear> <properties> <maven.compiler.source>${java.version}</maven.compiler.source> diff --git a/alfa-service/src/main/java/de/ozgcloud/alfa/GrpcConfiguration.java b/alfa-service/src/main/java/de/ozgcloud/alfa/GrpcConfiguration.java index 97cac2f8ea30484287afa30ab96bf522d1034bd9..c2465218de5d0d97a0065a2112607497632131ab 100644 --- a/alfa-service/src/main/java/de/ozgcloud/alfa/GrpcConfiguration.java +++ b/alfa-service/src/main/java/de/ozgcloud/alfa/GrpcConfiguration.java @@ -13,11 +13,9 @@ import org.springframework.context.annotation.Configuration; net.devh.boot.grpc.client.autoconfigure.GrpcClientMetricAutoConfiguration.class, net.devh.boot.grpc.client.autoconfigure.GrpcClientHealthAutoConfiguration.class, net.devh.boot.grpc.client.autoconfigure.GrpcClientSecurityAutoConfiguration.class, - net.devh.boot.grpc.client.autoconfigure.GrpcClientTraceAutoConfiguration.class, net.devh.boot.grpc.client.autoconfigure.GrpcDiscoveryClientAutoConfiguration.class, net.devh.boot.grpc.common.autoconfigure.GrpcCommonCodecAutoConfiguration.class, - net.devh.boot.grpc.common.autoconfigure.GrpcCommonTraceAutoConfiguration.class }) public class GrpcConfiguration { } diff --git a/alfa-service/src/main/java/de/ozgcloud/alfa/JwtTokenUtil.java b/alfa-service/src/main/java/de/ozgcloud/alfa/JwtTokenUtil.java index 00cf59574f2d66748cdca97065e1104073e74868..1478ecbd5b6770353999c7950476f0552332a1f2 100644 --- a/alfa-service/src/main/java/de/ozgcloud/alfa/JwtTokenUtil.java +++ b/alfa-service/src/main/java/de/ozgcloud/alfa/JwtTokenUtil.java @@ -73,7 +73,7 @@ public class JwtTokenUtil { } public Optional<Claims> getAllClaimsFromToken(String token) { - return Optional.of(Jwts.parser().setSigningKey(downloadTokenProperties.getSecret().getBytes()).parseClaimsJws(token).getBody()); + return Optional.of(Jwts.parser().setSigningKey(downloadTokenProperties.getSecret().getBytes()).build().parseSignedClaims(token).getPayload()); } public List<SimpleGrantedAuthority> getRolesFromToken(String token) { diff --git a/alfa-service/src/test/java/de/ozgcloud/alfa/JwtTokenUtilTest.java b/alfa-service/src/test/java/de/ozgcloud/alfa/JwtTokenUtilTest.java index 3f1cec61922fc4b62939c88a165ad734fe72a023..c05212e3b1aff78136eb19a4dde41110557080cc 100644 --- a/alfa-service/src/test/java/de/ozgcloud/alfa/JwtTokenUtilTest.java +++ b/alfa-service/src/test/java/de/ozgcloud/alfa/JwtTokenUtilTest.java @@ -105,7 +105,7 @@ class JwtTokenUtilTest { } private Claims getParsedBody() { - return Jwts.parser().setSigningKey(TOKEN_SECRET.getBytes()).parseClaimsJws(generatedToken).getBody(); + return Jwts.parser().setSigningKey(TOKEN_SECRET.getBytes()).build().parseSignedClaims(generatedToken).getPayload(); } } diff --git a/alfa-service/src/test/java/de/ozgcloud/alfa/postfach/PostfachMailModelAssemblerTest.java b/alfa-service/src/test/java/de/ozgcloud/alfa/postfach/PostfachMailModelAssemblerTest.java index 1338bf82ddf79b9680a48e3dd866eb6d93f46f90..c16a03624a9b4f6ee9811752a99867281a3d31e1 100644 --- a/alfa-service/src/test/java/de/ozgcloud/alfa/postfach/PostfachMailModelAssemblerTest.java +++ b/alfa-service/src/test/java/de/ozgcloud/alfa/postfach/PostfachMailModelAssemblerTest.java @@ -45,6 +45,7 @@ import org.springframework.hateoas.mediatype.hal.HalModelBuilder; import org.springframework.web.util.UriComponentsBuilder; import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import de.ozgcloud.alfa.common.user.UserId; @@ -376,7 +377,7 @@ class PostfachMailModelAssemblerTest { @Test @SneakyThrows void shouldContainPostfachMails() { - var objectMapper = new ObjectMapper().registerModule(new JavaTimeModule()); + var objectMapper = new ObjectMapper().registerModules(new JavaTimeModule(), new Jdk8Module()); doReturn(EntityModel.of(postfachMail)).when(modelAssembler).toModel(postfachMail); var model = callModelAssembler(); diff --git a/pom.xml b/pom.xml index f584f35f252f45560ab0b6b294587fd87ba4932f..36c76f59140543a6a8875bc5556ae8f38063b57e 100644 --- a/pom.xml +++ b/pom.xml @@ -1,7 +1,7 @@ <?xml version="1.0"?> <!-- - Copyright (C) 2022 Das Land Schleswig-Holstein vertreten durch den + Copyright (C) 2020 Das Land Schleswig-Holstein vertreten durch den Ministerpräsidenten des Landes Schleswig-Holstein Staatskanzlei Abteilung Digitalisierung und zentrales IT-Management der Landesregierung @@ -30,7 +30,7 @@ <parent> <groupId>de.ozgcloud.common</groupId> <artifactId>ozgcloud-common-parent</artifactId> - <version>4.3.2</version> + <version>4.6.0</version> </parent> <groupId>de.ozgcloud.alfa</groupId> @@ -38,6 +38,7 @@ <version>2.17.0-SNAPSHOT</version> <name>Alfa Parent</name> <packaging>pom</packaging> + <inceptionYear>2020</inceptionYear> <modules> <module>alfa-client</module> @@ -59,7 +60,7 @@ <spring-cloud-config-client.version>4.1.3</spring-cloud-config-client.version> <!-- TODO: die Version über ozgcloud-common ziehen --> - <jjwt.version>0.11.5</jjwt.version> + <jjwt.version>0.12.6</jjwt.version> </properties> <build> @@ -68,32 +69,6 @@ <plugin> <groupId>com.mycila</groupId> <artifactId>license-maven-plugin</artifactId> - <version>4.1</version> - <configuration> - <mapping> - <ts>SLASHSTAR_STYLE</ts> - <config>SCRIPT_STYLE</config> - </mapping> - <licenseSets> - <licenseSet> - <header>license/eupl_v1_2_de/header.txt</header> - <excludes> - <exclude>**/README</exclude> - <exclude>src/test/resources/**</exclude> - <exclude>src/main/resources/**</exclude> - <exclude>**/alfa-e2e/reports/videos/**</exclude> - <exclude>**/.angular/cache/**</exclude> - </excludes> - </licenseSet> - </licenseSets> - </configuration> - <dependencies> - <dependency> - <groupId>de.ozgcloud.common</groupId> - <artifactId>ozgcloud-common-license</artifactId> - <version>${ozgcloud.license.version}</version> - </dependency> - </dependencies> </plugin> </plugins> </pluginManagement>