blob: 739decc5794512a84c18e99639c92208d1102a2a [file]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.camel.example</groupId>
<artifactId>camel-examples</artifactId>
<version>4.23.0-SNAPSHOT</version>
</parent>
<artifactId>camel-example-spiffe</artifactId>
<packaging>jar</packaging>
<name>Camel :: Example :: SPIFFE</name>
<description>An example for showing workload identity with the Camel SPIFFE component (JWT-SVID and X.509-SVID issued by SPIRE)</description>
<properties>
<category>Security</category>
<title>SPIFFE</title>
<maven-dependency-plugin-version>3.11.0</maven-dependency-plugin-version>
</properties>
<dependencyManagement>
<dependencies>
<!-- Add Camel BOM -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-bom</artifactId>
<version>${camel.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- the OPA SDK declares an older Jackson than the one Camel uses: keep them on the Camel version -->
<dependency>
<groupId>com.fasterxml.jackson</groupId>
<artifactId>jackson-bom</artifactId>
<version>${jackson2-version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-main</artifactId>
</dependency>
<!-- talks to the SPIFFE Workload API (SPIRE agent) -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spiffe</artifactId>
</dependency>
<!-- asks Open Policy Agent whether an authenticated caller may do what it asks -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-opa</artifactId>
</dependency>
<!-- the Workload API is a gRPC service on a Unix domain socket; java-spiffe needs a native transport for that.
This is the Linux one, which is what runs inside the containers of this example. When running the
applications directly on macOS use io.spiffe:grpc-netty-macos or io.spiffe:grpc-netty-macos-aarch64 instead. -->
<dependency>
<groupId>io.spiffe</groupId>
<artifactId>grpc-netty-linux</artifactId>
<version>${java-spiffe-version}</version>
<scope>runtime</scope>
</dependency>
<!-- embedded HTTP server for the backend -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-platform-http-main</artifactId>
</dependency>
<!-- HTTP client for the frontend -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-http</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-timer</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jackson</artifactId>
</dependency>
<!-- logging -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j2-version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j2-impl</artifactId>
<version>${log4j2-version}</version>
<scope>runtime</scope>
</dependency>
<!-- for testing -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test-main-junit6</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito-version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- to run via mvn camel:run (the backend by default, use -Dcamel.mainClass=... for the frontend) -->
<plugin>
<groupId>org.apache.camel</groupId>
<artifactId>camel-maven-plugin</artifactId>
<version>${camel.version}</version>
<configuration>
<logClasspath>false</logClasspath>
<mainClass>org.apache.camel.example.spiffe.backend.BackendApplication</mainClass>
</configuration>
</plugin>
<!-- copy the runtime dependencies to target/lib so the container image can pick them up -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>${maven-dependency-plugin-version}</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<includeScope>runtime</includeScope>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>