4100de5492
/ build (push) Successful in 57s
The new ["modular design"](https://spring.io/blog/2025/10/28/modularizing-spring-boot/) required a few changes in the starter Maven dependencies. It also caused some minor Java import changes. The main problem that arose was that the spring-boot-web-server dependency got scoped to "runtime" in Maven. This broke the embedded Docker build since it was excluded from dependency lists. Therefore, it had to be manually added back in the correct "provided" scope. spring-boot-starter-web, JTE, and Testcontainers had new artifact names. Jackson had to be added as an explicit dependency (for testing only) since it's no longer included by default in Spring Boot. ## Spring Boot OAuth 2.0 Authorization Server There were some internal changes that broke the "custom" developer authorization. The OAuth2AuthorizationEndpointFilter got split into two separate ones (for MFA purposes), and the split off one is executed much much earlier in the chain. Therefore, the old method of changing the HTTP method of the request to trick the regular filter from the custom one no longer works. Luckily an unrelated change had added POST support to the OAuth2AuthorizationEndpointFilter which meant we could stop changing the HTTP method and change the form to submit everything as form fields instead of query parameters. A lot of mechanical changes in the tests were required for this. MFA support also meant that OIDC ID tokens require the authenticated principal to have a FactorGrantedAuthority which was added to the Shibboleth authentication. Lastly the default for clients changed to require PKCE, this was turned off in the tests to match production (not required for clients with credentials). Reviewed-by: Stefan Nenzén <nenzen@dsv.su.se> Reviewed-on: #18
213 lines
7.9 KiB
XML
213 lines
7.9 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
<parent>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-parent</artifactId>
|
|
<version>4.0.6</version>
|
|
<relativePath/> <!-- lookup parent from repository -->
|
|
</parent>
|
|
|
|
<groupId>se.su.dsv</groupId>
|
|
<artifactId>oauth2-authorization-server</artifactId>
|
|
<version>0.0.1-SNAPSHOT</version>
|
|
<packaging>war</packaging>
|
|
|
|
<name>DSV OAuth 2.0 authorization server</name>
|
|
<description>An OAuth 2.0 authorization server that authenticates users via Shibboleth</description>
|
|
|
|
<properties>
|
|
<java.version>17</java.version>
|
|
<jte.version>3.2.4</jte.version>
|
|
<spring-boot.version>4.0.6</spring-boot.version>
|
|
</properties>
|
|
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-oauth2-authorization-server</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-webmvc</artifactId>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>gg.jte</groupId>
|
|
<artifactId>jte-spring-boot-starter-4</artifactId>
|
|
<version>${jte.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>gg.jte</groupId>
|
|
<artifactId>jte</artifactId>
|
|
<version>${jte.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>gg.jte</groupId>
|
|
<artifactId>jte-models</artifactId>
|
|
<version>${jte.version}</version>
|
|
</dependency>
|
|
|
|
<!-- Development tools -->
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-devtools</artifactId>
|
|
<scope>runtime</scope>
|
|
<optional>true</optional>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-docker-compose</artifactId>
|
|
<scope>runtime</scope>
|
|
<optional>true</optional>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-tomcat</artifactId>
|
|
<scope>provided</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-web-server</artifactId>
|
|
<scope>provided</scope>
|
|
</dependency>
|
|
|
|
<!-- Testing -->
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-test</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-webmvc-test</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-jackson-test</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-testcontainers</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.security</groupId>
|
|
<artifactId>spring-security-test</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.testcontainers</groupId>
|
|
<artifactId>testcontainers-junit-jupiter</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.testcontainers</groupId>
|
|
<artifactId>testcontainers-mariadb</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<configuration>
|
|
<annotationProcessorPaths>
|
|
<path>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-configuration-processor</artifactId>
|
|
<version>${spring-boot.version}</version>
|
|
</path>
|
|
</annotationProcessorPaths>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
<configuration>
|
|
<profiles>
|
|
<profile>dev</profile>
|
|
</profiles>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>repackage</id>
|
|
<configuration>
|
|
<skip>true</skip>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>gg.jte</groupId>
|
|
<artifactId>jte-maven-plugin</artifactId>
|
|
<version>${jte.version}</version>
|
|
<configuration>
|
|
<sourceDirectory>${project.basedir}/src/main/resources/templates</sourceDirectory>
|
|
<targetDirectory>${project.build.directory}/jte-classes</targetDirectory>
|
|
<contentType>Html</contentType>
|
|
<extensions>
|
|
<extension>
|
|
<className>gg.jte.models.generator.ModelExtension</className>
|
|
</extension>
|
|
</extensions>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<phase>generate-sources</phase>
|
|
<goals>
|
|
<goal>generate</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>gg.jte</groupId>
|
|
<artifactId>jte-models</artifactId>
|
|
<version>${jte.version}</version>
|
|
</dependency>
|
|
</dependencies>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
<profiles>
|
|
<profile>
|
|
<id>persistent</id>
|
|
<activation>
|
|
<activeByDefault>true</activeByDefault>
|
|
</activation>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-jdbc</artifactId>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-flyway</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.flywaydb</groupId>
|
|
<artifactId>flyway-core</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.flywaydb</groupId>
|
|
<artifactId>flyway-mysql</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.mariadb.jdbc</groupId>
|
|
<artifactId>mariadb-java-client</artifactId>
|
|
<scope>runtime</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
</profile>
|
|
</profiles>
|
|
|
|
</project>
|