diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 835d712..81d21f9 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -32,11 +32,11 @@ 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' @@ -44,7 +44,7 @@ jobs: # 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. @@ -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 @@ -69,4 +69,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index d0a301a..11fd88b 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -11,9 +11,9 @@ 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' @@ -21,16 +21,16 @@ jobs: - 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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e380273..8819eaa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 }} diff --git a/docker/Dockerfile b/docker/Dockerfile index f4b12fd..09974bd 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -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 @@ -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 diff --git a/pom.xml b/pom.xml index 1f2229e..40cdde9 100644 --- a/pom.xml +++ b/pom.xml @@ -2,15 +2,16 @@ 4.0.0 net.maritimeconnectivity.identityregistry.keycloak.spi mcp-identityregistry-keycloak-spi - 1.2.2 + 1.3.0-SNAPSHOT jar mcp-identityregistry-keycloak-spi https://maritimeconnectivity.net UTF-8 - 21.1.2 + 23.0.6 17 + 5.10.1 @@ -47,19 +48,19 @@ org.apache.httpcomponents httpclient - 4.5.13 + 4.5.14 provided org.jboss.slf4j slf4j-jboss-logmanager - 1.2.0.Final + 2.0.0.Final provided net.maritimeconnectivity.pki mcp-pki - 1.2.0 + 1.3.0-SNAPSHOT org.bouncycastle @@ -78,25 +79,25 @@ org.projectlombok lombok - 1.18.26 + 1.18.30 provided org.mockito mockito-core - 4.8.1 + 5.8.0 test org.junit.jupiter junit-jupiter-engine - 5.9.1 + ${junit-jupiter.version} test org.slf4j slf4j-simple - 2.0.3 + 2.0.9 test @@ -121,12 +122,12 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.11.0 org.apache.maven.plugins maven-assembly-plugin - 3.3.0 + 3.6.0 jar-with-dependencies @@ -145,12 +146,12 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M7 + 3.2.3 org.junit.jupiter junit-jupiter-engine - 5.9.1 + ${junit-jupiter.version} diff --git a/src/test/java/net/maritimeconnectivity/identityregistry/keycloak/spi/authenticators/certificate/CertificateAuthenticatorTest.java b/src/test/java/net/maritimeconnectivity/identityregistry/keycloak/spi/authenticators/certificate/CertificateAuthenticatorTest.java index 2d74b4d..fad86f3 100644 --- a/src/test/java/net/maritimeconnectivity/identityregistry/keycloak/spi/authenticators/certificate/CertificateAuthenticatorTest.java +++ b/src/test/java/net/maritimeconnectivity/identityregistry/keycloak/spi/authenticators/certificate/CertificateAuthenticatorTest.java @@ -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; @@ -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;