Skip to content

Commit 07a7c1d

Browse files
Update target JDK to 11 and move to JakartaEE 9 (#124)
Co-authored-by: Valery Kharseko <[email protected]>
1 parent f01e752 commit 07a7c1d

File tree

37 files changed

+431
-258
lines changed

37 files changed

+431
-258
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ${{ matrix.os }}
1111
strategy:
1212
matrix:
13-
java: [ '8', '11', '17', '21', '25' ]
13+
java: [ '11', '17', '21', '25' ]
1414
os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]
1515
fail-fast: false
1616
steps:
@@ -42,17 +42,18 @@ jobs:
4242
openig-war/target/*.war
4343
openig-docker/target/Dockerfile*
4444
build-docker:
45+
needs: build-maven
4546
runs-on: 'ubuntu-latest'
4647
services:
4748
registry:
4849
image: registry:2
4950
ports:
5051
- 5000:5000
5152
steps:
52-
- uses: actions/checkout@v4
53+
- name: Download artifacts
54+
uses: actions/download-artifact@v4
5355
with:
54-
fetch-depth: 0
55-
submodules: recursive
56+
name: ubuntu-latest-11
5657
- name: Get latest release version
5758
shell: bash
5859
run: |
@@ -73,12 +74,15 @@ jobs:
7374
uses: docker/setup-buildx-action@v3
7475
with:
7576
driver-opts: network=host
77+
- name: Prepare Dockerfile
78+
shell: bash
79+
run: sed -i -E '/^#COPY openig-war\//s/^#//' ./openig-docker/target/Dockerfile
7680
- name: Build image
7781
uses: docker/build-push-action@v5
7882
continue-on-error: true
7983
with:
80-
context: ./openig-docker
81-
file: ./openig-docker/Dockerfile
84+
context: .
85+
file: ./openig-docker/target/Dockerfile
8286
build-args: |
8387
VERSION=${{ env.release_version }}
8488
platforms: linux/amd64, linux/arm64, linux/ppc64le, linux/s390x
@@ -90,52 +94,3 @@ jobs:
9094
run: |
9195
docker run --rm -it -d --name=test localhost:5000/${GITHUB_REPOSITORY,,}:${{ env.release_version }}
9296
timeout 3m bash -c 'until docker inspect --format="{{json .State.Health.Status}}" test | grep -q \"healthy\"; do sleep 10; done'
93-
build-docker-alpine:
94-
runs-on: 'ubuntu-latest'
95-
services:
96-
registry:
97-
image: registry:2
98-
ports:
99-
- 5000:5000
100-
steps:
101-
- uses: actions/checkout@v4
102-
with:
103-
fetch-depth: 0
104-
submodules: recursive
105-
- name: Get latest release version
106-
shell: bash
107-
run: |
108-
export git_version_last="$(curl -i -o - --silent https://api.github.com/repos/OpenIdentityPlatform/OpenIG/releases/latest | grep -m1 "\"name\"" | cut -d\" -f4)" ; echo "last release: $git_version_last"
109-
echo "release_version=$git_version_last" >> $GITHUB_ENV
110-
- name: Docker meta
111-
id: meta
112-
uses: docker/metadata-action@v5
113-
with:
114-
images: |
115-
localhost:5000/${{ github.repository }}
116-
tags: |
117-
type=raw,value=alpine
118-
type=raw,value=${{ env.release_version }}-alpine
119-
- name: Set up QEMU
120-
uses: docker/setup-qemu-action@v3
121-
- name: Set up Docker Buildx
122-
uses: docker/setup-buildx-action@v3
123-
with:
124-
driver-opts: network=host
125-
- name: Build image
126-
uses: docker/build-push-action@v5
127-
continue-on-error: true
128-
with:
129-
context: ./openig-docker
130-
file: ./openig-docker/Dockerfile-alpine
131-
build-args: |
132-
VERSION=${{ env.release_version }}
133-
platforms: linux/amd64,linux/arm64/8, linux/s390x, linux/386, linux/arm/v7, linux/arm/v6, linux/ppc64le
134-
push: true
135-
tags: ${{ steps.meta.outputs.tags }}
136-
labels: ${{ steps.meta.outputs.labels }}
137-
- name: Docker test
138-
shell: bash
139-
run: |
140-
docker run --rm -it -d --name=test localhost:5000/${GITHUB_REPOSITORY,,}:${{ env.release_version }}-alpine
141-
timeout 3m bash -c 'until docker inspect --format="{{json .State.Health.Status}}" test | grep -q \"healthy\"; do sleep 10; done'

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Set up Java for publishing to Maven Central Repository OSS
2424
uses: actions/setup-java@v4
2525
with:
26-
java-version: ${{ github.event.workflow_run.head_branch == 'release/6.0.0-SNAPSHOT' && '11' || '8'}}
26+
java-version: ${{ github.event.workflow_run.head_branch == 'sustaining/5.4.x' && '8' || '11'}}
2727
distribution: 'temurin'
2828
server-id: ossrh
2929
server-username: MAVEN_USERNAME

.github/workflows/release.yml

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Set up Java for publishing to Maven Central Repository OSS
2727
uses: actions/setup-java@v4
2828
with:
29-
java-version: '8'
29+
java-version: '11'
3030
distribution: 'temurin'
3131
server-id: ossrh
3232
server-username: MAVEN_USERNAME
@@ -155,50 +155,4 @@ jobs:
155155
push: true
156156
tags: ${{ steps.meta.outputs.tags }}
157157
labels: ${{ steps.meta.outputs.labels }}
158-
release-docker-alpine:
159-
runs-on: 'ubuntu-latest'
160-
needs:
161-
- release-maven
162-
steps:
163-
- uses: actions/checkout@v4
164-
with:
165-
ref: ${{ github.event.inputs.releaseVersion }}
166-
fetch-depth: 1
167-
submodules: recursive
168-
- name: Docker meta (alpine)
169-
id: meta
170-
uses: docker/metadata-action@v5
171-
with:
172-
images: |
173-
${{ github.repository }}
174-
ghcr.io/${{ github.repository }}/${{ github.event.repository.name }}
175-
tags: |
176-
type=raw,value=alpine
177-
type=raw,value=${{ github.event.inputs.releaseVersion }}-alpine
178-
- name: Set up QEMU
179-
uses: docker/setup-qemu-action@v3
180-
- name: Set up Docker Buildx
181-
uses: docker/setup-buildx-action@v3
182-
- name: Login to DockerHub
183-
uses: docker/login-action@v3
184-
with:
185-
username: ${{ secrets.DOCKER_USERNAME }}
186-
password: ${{ secrets.DOCKER_PASSWORD }}
187-
- name: Login to GHCR
188-
uses: docker/login-action@v3
189-
with:
190-
registry: ghcr.io
191-
username: ${{ github.repository_owner }}
192-
password: ${{ secrets.GITHUB_TOKEN }}
193-
- name: Build and push image
194-
continue-on-error: true
195-
uses: docker/build-push-action@v5
196-
with:
197-
context: ./openig-docker
198-
file: ./openig-docker/Dockerfile-alpine
199-
build-args: |
200-
VERSION=${{ github.event.inputs.releaseVersion }}
201-
platforms: linux/amd64,linux/arm64/8, linux/s390x, linux/386, linux/arm/v7, linux/arm/v6, linux/ppc64le
202-
push: true
203-
tags: ${{ steps.meta.outputs.tags }}
204-
labels: ${{ steps.meta.outputs.labels }}
158+

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ This project is licensed under the [Common Development and Distribution License
4040
* [OpenIG WAR](https://github.com/OpenIdentityPlatform/OpenIG/releases) (All OS)
4141
* [OpenIG Docker](https://hub.docker.com/r/openidentityplatform/openig/) (All OS)
4242

43-
Java 1.8+ required
43+
Java 11 or later required
4444

4545
## How-to build
4646
For windows use:

SECURITY.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,12 @@
55
Use this section to tell people about which versions of your project are
66
currently being supported with security updates.
77

8-
| Version | Supported |
9-
| ------- | ------------------ |
10-
| 5.1.x | :white_check_mark: |
11-
| 5.0.x | :x: |
8+
| Version | Java Versions Support | EE | Supported |
9+
|---------|-----------------------|------------|--------------------------------------------------------------------------------------------------------------------------------------------|
10+
| 6.x | 11 and later | Jakarta EE | :white_check_mark: Community support, [approved vendor support](https://github.com/OpenIdentityPlatform/.github/wiki/Approved-Vendor-List) |
11+
| 5.1.x | 8 and later | Java EE | :white_check_mark: [Approved vendor support](https://github.com/OpenIdentityPlatform/.github/wiki/Approved-Vendor-List) |
12+
| 5.0.x | 8 and later | Java EE | :x: |
1213

1314
## Reporting a Vulnerability
1415

15-
Use this section to tell people how to report a vulnerability.
16-
17-
Tell them where to go, how often they can expect to get an update on a
18-
reported vulnerability, what to expect if the vulnerability is accepted or
19-
declined, etc.
16+
Please draft [security advisory](https://github.com/OpenIdentityPlatform/OpenIG/security/advisories/new)

contrib-http-framework/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<parent>
2020
<artifactId>openig-project</artifactId>
2121
<groupId>org.openidentityplatform.openig</groupId>
22-
<version>5.4.1-SNAPSHOT</version>
22+
<version>6.0.0-SNAPSHOT</version>
2323
</parent>
2424
<modelVersion>4.0.0</modelVersion>
2525

openig-core/pom.xml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@
1414
1515
Copyright 2010-2011 ApexIdentity Inc.
1616
Portions Copyright 2011-2016 ForgeRock AS.
17+
Portions copyright 2025 3A Systems LLC.
1718
-->
1819
<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">
1920
<modelVersion>4.0.0</modelVersion>
2021
<parent>
2122
<groupId>org.openidentityplatform.openig</groupId>
2223
<artifactId>openig-project</artifactId>
23-
<version>5.4.1-SNAPSHOT</version>
24+
<version>6.0.0-SNAPSHOT</version>
2425
</parent>
2526
<artifactId>openig-core</artifactId>
2627
<name>OpenIG Core library</name>
@@ -120,15 +121,20 @@
120121
<!-- <version>2.0.1</version> -->
121122
<!-- </dependency> -->
122123
<dependency>
123-
<groupId>javax.servlet</groupId>
124-
<artifactId>javax.servlet-api</artifactId>
124+
<groupId>jakarta.servlet</groupId>
125+
<artifactId>jakarta.servlet-api</artifactId>
125126
<scope>provided</scope>
126127
</dependency>
127128
<dependency>
128-
<groupId>javax.websocket</groupId>
129-
<artifactId>javax.websocket-api</artifactId>
129+
<groupId>jakarta.websocket</groupId>
130+
<artifactId>jakarta.websocket-api</artifactId>
130131
<scope>provided</scope>
131132
</dependency>
133+
<dependency>
134+
<groupId>jakarta.websocket</groupId>
135+
<artifactId>jakarta.websocket-client-api</artifactId>
136+
<scope>provided</scope>
137+
</dependency>
132138
<dependency>
133139
<groupId>org.openidentityplatform.commons.http-framework</groupId>
134140
<artifactId>servlet</artifactId>

openig-core/src/main/java/org/forgerock/openig/decoration/capture/MessageCapture.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ private static void captureContextAsJson(final PrintWriter writer, final Context
166166
if (context.containsContext(AttributesContext.class)) {
167167
AttributesContext attributesContext = context.asContext(AttributesContext.class);
168168
Map<String, Object> map = new LinkedHashMap<>(attributesContext.getAttributes());
169-
map.remove("javax.servlet.http.HttpServletRequest");
170-
map.remove("javax.servlet.http.HttpServletResponse");
169+
map.remove("jakarta.servlet.http.HttpServletRequest");
170+
map.remove("jakarta.servlet.http.HttpServletResponse");
171171
writer.println(prettyPrint(toJson(map)));
172172
}
173173
}

openig-core/src/main/java/org/openidentityplatform/openig/websocket/Configurator.java

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
1+
/*
2+
* The contents of this file are subject to the terms of the Common Development and
3+
* Distribution License (the License). You may not use this file except in compliance with the
4+
* License.
5+
*
6+
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
7+
* specific language governing permission and limitations under the License.
8+
*
9+
* When distributing Covered Software, include this CDDL Header Notice in each file and include
10+
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
11+
* Header, with the fields enclosed by brackets [] replaced by your own identifying
12+
* information: "Portions copyright [year] [name of copyright owner]".
13+
*
14+
* Copyright 2022-2025 3A Systems LLC.
15+
*/
16+
117
package org.openidentityplatform.openig.websocket;
218

319
import java.util.List;
420

5-
import javax.websocket.Extension;
6-
import javax.websocket.HandshakeResponse;
7-
import javax.websocket.server.HandshakeRequest;
8-
import javax.websocket.server.ServerEndpointConfig;
21+
import jakarta.websocket.Extension;
22+
import jakarta.websocket.HandshakeResponse;
23+
import jakarta.websocket.server.HandshakeRequest;
24+
import jakarta.websocket.server.ServerEndpointConfig;
925

1026
public class Configurator extends ServerEndpointConfig.Configurator {
1127

openig-core/src/main/java/org/openidentityplatform/openig/websocket/Filter.java

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,35 @@
1+
/*
2+
* The contents of this file are subject to the terms of the Common Development and
3+
* Distribution License (the License). You may not use this file except in compliance with the
4+
* License.
5+
*
6+
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
7+
* specific language governing permission and limitations under the License.
8+
*
9+
* When distributing Covered Software, include this CDDL Header Notice in each file and include
10+
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
11+
* Header, with the fields enclosed by brackets [] replaced by your own identifying
12+
* information: "Portions copyright [year] [name of copyright owner]".
13+
*
14+
* Copyright 2022-2025 3A Systems LLC.
15+
*/
16+
117
package org.openidentityplatform.openig.websocket;
218

319

420
import java.io.IOException;
521
import java.security.Principal;
622
import java.util.Enumeration;
723

8-
import javax.servlet.FilterChain;
9-
import javax.servlet.FilterConfig;
10-
import javax.servlet.ServletException;
11-
import javax.servlet.ServletRequest;
12-
import javax.servlet.ServletResponse;
13-
import javax.servlet.annotation.WebFilter;
14-
import javax.servlet.http.HttpServletRequest;
15-
import javax.servlet.http.HttpServletRequestWrapper;
16-
import javax.servlet.http.HttpServletResponse;
24+
import jakarta.servlet.FilterChain;
25+
import jakarta.servlet.FilterConfig;
26+
import jakarta.servlet.ServletException;
27+
import jakarta.servlet.ServletRequest;
28+
import jakarta.servlet.ServletResponse;
29+
import jakarta.servlet.annotation.WebFilter;
30+
import jakarta.servlet.http.HttpServletRequest;
31+
import jakarta.servlet.http.HttpServletRequestWrapper;
32+
import jakarta.servlet.http.HttpServletResponse;
1733

1834
import org.forgerock.http.protocol.Request;
1935
import org.forgerock.http.protocol.Status;
@@ -28,7 +44,7 @@
2844
import org.slf4j.LoggerFactory;
2945

3046
@WebFilter(urlPatterns = "/*")
31-
public class Filter implements javax.servlet.Filter {
47+
public class Filter implements jakarta.servlet.Filter {
3248
private static final Logger logger = LoggerFactory.getLogger(Filter.class);
3349

3450
@Override

0 commit comments

Comments
 (0)