Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
*/
package io.github.bmarwell.keyserver.application.api;

import io.github.bmarwell.keyserver.application.api.ex.TokenExpiredException;
import io.github.bmarwell.keyserver.application.api.ex.TokenInvalidException;

/// Primary (inbound) port for synchronous UID verification.
///
/// Implementations handle the full token-to-publication flow synchronously,
Expand Down
45 changes: 45 additions & 0 deletions ear/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.github.bmarwell.keyserver</groupId>
<artifactId>keyserver</artifactId>
<version>0.1.0-SNAPSHOT</version>
</parent>

<groupId>io.github.bmarwell.keyserver</groupId>
<artifactId>keyserver-ear</artifactId>
<version>0.1.0-SNAPSHOT</version>
<packaging>ear</packaging>

<name>Java Keyserver :: EAR</name>

<dependencies>
<dependency>
<groupId>io.github.bmarwell.keyserver</groupId>
<artifactId>keyserver-openpgp-keyserver-protocol</artifactId>
<version>0.1.0-SNAPSHOT</version>
<type>war</type>
</dependency>
<dependency>
<groupId>io.github.bmarwell.keyserver</groupId>
<artifactId>keyserver-web-rest</artifactId>
<version>0.1.0-SNAPSHOT</version>
<type>war</type>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
<skinnyWars>true</skinnyWars>
<defaultLibBundleDir>lib</defaultLibBundleDir>
</configuration>
</plugin>
</plugins>
</build>
</project>
21 changes: 21 additions & 0 deletions ear/src/main/application/META-INF/application.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/application_11.xsd"
version="11">
<display-name>Java Keyserver</display-name>

<module>
<web>
<web-uri>keyserver-openpgp-keyserver-protocol-0.1.0-SNAPSHOT.war</web-uri>
<context-root>/pks</context-root>
</web>
Comment thread
Copilot marked this conversation as resolved.
</module>

<module>
<web>
<web-uri>keyserver-web-rest-0.1.0-SNAPSHOT.war</web-uri>
<context-root>/api</context-root>
</web>
</module>
</application>
112 changes: 112 additions & 0 deletions integration-tests/helper/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.github.bmarwell.keyserver</groupId>
<artifactId>keyserver-integration-tests</artifactId>
<version>0.1.0-SNAPSHOT</version>
</parent>

<artifactId>keyserver-integration-tests-helper</artifactId>
<name>Java Keyserver :: Integration Tests :: helper</name>

<dependencies>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>postgresql</artifactId>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>compile</scope>
</dependency>

<!-- PostgreSQL JDBC driver — used for direct DB access in seed/verify steps -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>

<!-- Logging backend for Testcontainers' Slf4jLogConsumer -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<scope>runtime</scope>
</dependency>

<!-- JAX-RS Client API for the test runtime -->
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<scope>provided</scope>
</dependency>
Comment thread
bmarwell marked this conversation as resolved.
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-client</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk18on</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpg-jdk18on</artifactId>
<scope>compile</scope>
</dependency>
</dependencies>

<profiles>
<!--
Activate with -P run-its to run integration tests. Requires Docker or
Podman. Not run by default to keep the standard PR build fast.
-->
<profile>
<id>run-its</id>
<build>
<plugins>
<!--
Copy the PostgreSQL JDBC driver to a predictable path so the
container build can include it in the Liberty image.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-pgsql-driver</id>
<goals>
<goal>copy</goal>
</goals>
<phase>pre-integration-test</phase>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
<outputDirectory>${project.build.directory}/libs</outputDirectory>
<destFileName>postgresql.jar</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>

</plugins>
</build>
</profile>
</profiles>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright (C) 2023-2026 The java-keyserver project team.
*
* SPDX-License-Identifier: EUPL-1.2 OR Apache-2.0
*/
package io.github.bmarwell.keyserver.it.extension;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* Seeds the shared test database before a test class runs.
*
* <p>When omitted, the shared PostgreSQL instance starts empty and the test class
* is responsible for creating its own data.
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Inherited
public @interface DatabaseSeed {

String[] value() default {};

String[] truncateAfter() default {};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Copyright (C) 2023-2026 The java-keyserver project team.
*
* SPDX-License-Identifier: EUPL-1.2 OR Apache-2.0
*/
package io.github.bmarwell.keyserver.it.extension;

import java.net.URI;

public interface KeyserverAccess {

URI pksBaseUri();

URI apiBaseUri();

String jdbcUrl();

String dbUser();

String dbPassword();
}
Loading
Loading