Skip to content

Commit

Permalink
Merge pull request #27 from maritimeconnectivity/next
Browse files Browse the repository at this point in the history
Changes for next release
  • Loading branch information
oliverhaagh authored Feb 16, 2024
2 parents ef4b115 + 37e2f63 commit 535746f
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 32 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Java
if: matrix.language == 'java'
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
cache: maven

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -55,7 +55,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -69,4 +69,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
10 changes: 5 additions & 5 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,26 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B -U clean install && cp target/mcp-identityregistry-keycloak-spi-latest.jar docker/
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: docker
tags: ghcr.io/maritimeconnectivity/mcpkeycloakspi
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,32 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
- name: Build with Maven
run: mvn -B -U clean install && cp target/mcp-identityregistry-keycloak-spi-latest.jar docker/
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/maritimeconnectivity/mcpkeycloakspi
tags: |
type=semver,pattern={{version}}
- name: Build and push Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: docker
tags: ${{ steps.meta.outputs.tags }}
Expand Down
5 changes: 3 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/keycloak/keycloak:21.1.2
FROM quay.io/keycloak/keycloak:23.0.6

# Set the environmental variables
ENV KC_DB postgres
Expand All @@ -22,7 +22,8 @@ RUN mkdir -p /mc-eventprovider-conf && chown 1000:0 /mc-eventprovider-conf

USER 1000

ADD --chown=1000:0 https://repo1.maven.org/maven2/net/maritimeconnectivity/pki/mcp-pki/1.2.0/mcp-pki-1.2.0.jar /opt/keycloak/providers/mcp-pki.jar
# Download latest snapshot
ADD --chown=1000:0 'https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=net.maritimeconnectivity.pki&a=mcp-pki&v=1.3.0-SNAPSHOT' /opt/keycloak/providers/mcp-pki.jar
ADD --chown=1000:0 mcp-identityregistry-keycloak-spi-latest.jar /opt/keycloak/providers/

RUN /opt/keycloak/bin/kc.sh build
Expand Down
27 changes: 14 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
<modelVersion>4.0.0</modelVersion>
<groupId>net.maritimeconnectivity.identityregistry.keycloak.spi</groupId>
<artifactId>mcp-identityregistry-keycloak-spi</artifactId>
<version>1.2.2</version>
<version>1.3.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>mcp-identityregistry-keycloak-spi</name>
<url>https://maritimeconnectivity.net</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<keycloak.version>21.1.2</keycloak.version>
<keycloak.version>23.0.6</keycloak.version>
<maven.compiler.release>17</maven.compiler.release>
<junit-jupiter.version>5.10.1</junit-jupiter.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -47,19 +48,19 @@
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
<version>4.5.14</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.slf4j</groupId>
<artifactId>slf4j-jboss-logmanager</artifactId>
<version>1.2.0.Final</version>
<version>2.0.0.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.maritimeconnectivity.pki</groupId>
<artifactId>mcp-pki</artifactId>
<version>1.2.0</version>
<version>1.3.0-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>org.bouncycastle</groupId>
Expand All @@ -78,25 +79,25 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.26</version>
<version>1.18.30</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.8.1</version>
<version>5.8.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.9.1</version>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>2.0.3</version>
<version>2.0.9</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -121,12 +122,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.11.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<version>3.6.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
Expand All @@ -145,12 +146,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M7</version>
<version>3.2.3</version>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.9.1</version>
<version>${junit-jupiter.version}</version>
</dependency>
</dependencies>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
package net.maritimeconnectivity.identityregistry.keycloak.spi.authenticators.certificate;

import jakarta.ws.rs.core.HttpHeaders;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.keycloak.authentication.AuthenticationFlowContext;
Expand All @@ -24,7 +25,6 @@
import org.keycloak.models.UserModel;
import org.keycloak.models.UserProvider;

import javax.ws.rs.core.HttpHeaders;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
Expand Down

0 comments on commit 535746f

Please sign in to comment.