Skip to content
Open
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
3 changes: 3 additions & 0 deletions posts/2026-04-21-26.0.0.4.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ seo-description: This release introduces support for selecting JWT signature alg
blog_description: This release introduces support for selecting JWT signature algorithms from JOSE headers and adds Java 26 support. It also removes the default LTPA keys password for enhanced security, and includes file transfer restrictions and security vulnerability fixes.
open-graph-image: https://openliberty.io/img/twitter_card.jpg
open-graph-image-alt: Open Liberty Logo
blog-available-in-languages:
- lang: zh-Hans
path: /zh-Hans/blog/2026/04/21/26.0.0.4.html
---
= Enhanced JWT validation, Java 26 support, and more in 26.0.0.4
Navaneeth S Nair <https://github.com/navaneethsnair1>
Expand Down
3 changes: 3 additions & 0 deletions posts/2026-05-19-26.0.0.5.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ seo-description: This release introduces official support for Jakarta EE 11, Spr
blog_description: This release introduces official support for Jakarta EE 11, Spring Boot 4.0 applications, and updated TLS/SSL cipher handling in Open Liberty, including enhanced Spring Boot deployment support and simplified SSL cipher configuration.
open-graph-image: https://openliberty.io/img/twitter_card.jpg
open-graph-image-alt: Open Liberty Logo
blog-available-in-languages:
- lang: zh-Hans
path: /zh-Hans/blog/2026/05/19/26.0.0.5.html
---
= Jakarta EE 11, Spring Boot 4.0, and more in 26.0.0.5
Navaneeth S Nair <https://github.com/navaneethsnair1>
Expand Down
344 changes: 344 additions & 0 deletions posts/zh-Hans/2026-04-21-26.0.0.4.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,344 @@
---
layout: post
title: "26.0.0.4 中增强的 JWT 验证、Java 26 支持等功能"
# Do NOT change the categories section
categories: blog
author_picture: https://avatars3.githubusercontent.com/navaneethsnair1
author_github: https://github.com/navaneethsnair1
seo-title: 26.0.0.4 中增强的 JWT 验证、Java 26 支持等功能 - OpenLiberty.io
seo-description: 此版本引入了从 JOSE 头部选择 JWT 签名算法的支持,并添加了 Java 26 支持。它还删除了默认的 LTPA 密钥密码以增强安全性,并包含文件传输限制和安全漏洞修复。
blog_description: 此版本引入了从 JOSE 头部选择 JWT 签名算法的支持,并添加了 Java 26 支持。它还删除了默认的 LTPA 密钥密码以增强安全性,并包含文件传输限制和安全漏洞修复。
open-graph-image: https://openliberty.io/img/twitter_card.jpg
open-graph-image-alt: Open Liberty Logo
blog-available-in-languages:
- lang: en
path: /blog/2026/04/21/26.0.0.4.html
additional_authors:
- name: Ismath Badsha (翻译)
github: https://github.com/IsmathBadsha
image: https://avatars.githubusercontent.com/IsmathBadsha
---
= 26.0.0.4 中增强的 JWT 验证、Java 26 支持等功能
Navaneeth S Nair <https://github.com/navaneethsnair1>
:imagesdir: /
:url-prefix:
:url-about: /
//Blank line here is necessary before starting the body of the post.

此版本引入了从 JOSE 头部选择 JWT 签名算法的支持,并添加了 Java 26 支持。它还删除了默认的 LTPA 密钥密码以增强安全性,并包含文件传输限制和安全漏洞修复。

在 link:{url-about}[Open Liberty] 26.0.0.4 中:

* <<file_transfer, 向 `FileService` MBean 添加了阻止列表>>
* <<ltpa, 删除默认 LTPA 密钥密码>>
* <<jwt, 支持从 JOSE 头部选择 JWT 签名和解密算法>>
* <<java_26, 支持 Java 26>>
* <<displayCustomizedExceptionText, Web 容器中 `displayCustomizedExceptionText` 属性的文档>>
* <<CVEs, 安全漏洞 (CVE) 修复>>


// // // // // // // //
// In the preceding section:
// Replace the TAG_X with a short label for the feature in lower-case, eg: mp3
// Replace the FEATURE_1_HEADING with heading the feature section, eg: MicroProfile 3.3
// Where the updates are grouped as sub-headings under a single heading
// (eg all the features in a MicroProfile release), provide sub-entries in the list;
// eg replace SUB_TAG_1 with mpr, and SUB_FEATURE_1_HEADING with
// Easily determine HTTP headers on outgoing requests (MicroProfile Rest Client 1.4)
// // // // // // // //

查看 link:https://github.com/OpenLiberty/open-liberty/issues?q=label%3Arelease%3A26004+label%3A%22release+bug%22[26.0.0.4] 中已修复的错误列表。

查看 link:{url-prefix}/blog/?search=release&search!=beta[以前的 Open Liberty GA 版本博客文章]。


[#run]

// // // // // // // //
// LINKS
//
// OpenLiberty.io site links:
// link:{url-prefix}/guides/maven-intro.html[Maven]
//
// Off-site links:
//link:https://openapi-generator.tech/docs/installation#jar[Download Instructions]
//
// IMAGES
//
// Place images in ./img/blog/
// Use the syntax:
// image::/img/blog/log4j-rhocp-diagrams/current-problem.png[Logging problem diagram,width=70%,align="center"]
// // // // // // // //

== 使用 26.0.0.4 开发和运行您的应用程序

如果您使用 link:{url-prefix}/guides/maven-intro.html[Maven],请在 `pom.xml` 文件中包含以下内容:

[source,xml]
----
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>3.12.0</version>
</plugin>
----

或者对于 link:{url-prefix}/guides/gradle-intro.html[Gradle],请在 `build.gradle` 文件中包含以下内容:

[source,gradle]
----
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'io.openliberty.tools:liberty-gradle-plugin:4.0.0'
}
}
apply plugin: 'liberty'
----
// // // // // // // //
// In the preceding section:
// Replace the Maven `3.11.5` with the latest version of the plugin: https://search.maven.org/artifact/io.openliberty.tools/liberty-maven-plugin
// Replace the Gradle `3.9.5` with the latest version of the plugin: https://search.maven.org/artifact/io.openliberty.tools/liberty-gradle-plugin
// TODO: Update GHA to automatically do the above. If the maven.org is problematic, then could fallback to using the GH Releases for the plugins
// // // // // // // //

或者如果您使用 link:{url-prefix}/docs/latest/container-images.html[容器镜像]:

[source]
----
FROM icr.io/appcafe/open-liberty
----

或者查看我们的 link:{url-prefix}/start/[下载页面]。

如果您使用 link:https://plugins.jetbrains.com/plugin/14856-liberty-tools[IntelliJ IDEA]、link:https://marketplace.visualstudio.com/items?itemName=Open-Liberty.liberty-dev-vscode-ext[Visual Studio Code] 或 link:https://marketplace.eclipse.org/content/liberty-tools[Eclipse IDE],您还可以利用我们的开源 link:https://openliberty.io/docs/latest/develop-liberty-tools.html[Liberty 开发工具],直接在 IDE 中实现有效的开发、测试、调试和应用程序管理。

[link=https://stackoverflow.com/tags/open-liberty]
image::img/blog/blog_btn_stack.svg[在 Stack Overflow 上提问, align="center"]

[#file_transfer]
== 向 `FileService` MBean 添加了阻止列表
Liberty 中 `restConnector-2.0` 功能提供的 `FileService` MBean 现在包含一个 `blocklist` 属性。此属性由 `server.xml` 文件中的 `<blockDir>` 配置元素配置。此属性的默认值为 `${server.output.dir}/resources/security`。此增强功能通过默认限制对 `${server.output.dir}/resources/security` 的文件传输访问来解决安全漏洞 link:https://github.com/advisories/GHSA-c39w-6qgm-5cp7[CVE-2025-14915]。

如果需要对 `${server.output.dir}/resources/security` 进行 FileTransfer 访问,可以通过设置空阻止列表来恢复原始行为。

有关更多信息,请参阅 link:https://www.ibm.com/docs/en/was-liberty/nd?topic=manually-file-transfer[文档]。

[#ltpa]
== 删除默认 LTPA 密钥密码

删除默认 LTPA 密钥密码以解决安全漏洞 link:https://www.ibm.com/support/pages/node/7266845[CVE-2025-14917]。

以前,当 `<ltpa />` 元素中未定义 `keysPassword` 属性时,会使用 LTPA 密钥的默认密码。通过此更改,当未设置 `keysPassword` 属性时,不再使用默认密码。

对于现有服务器,如果 `server.xml` 文件中未配置 LTPA 密钥密码,则使用 `server.env` 文件中的 `keystore_password`。此值会重新加密 `ltpa.keys` 文件中的 LTPA 密钥。LTPA 密钥本身不受影响。除非在 `server create` 命令中使用 `--no-password` 选项,否则在服务器创建期间会在 `server.env` 文件中配置 `keystore_password`。

如果 `server.xml` 文件中的 `<ltpa />` 元素中未定义 `keysPassword`,并且 `server.env` 文件中未定义 `keystore_password`,则 LTPA 服务将失败。
将显示以下错误消息:

[source,text]
----
CWWKS4118E: LTPA configuration error. A keysPassword attribute is not configured on the <ltpa /> element, the 'ltpa_keys_password' environment variable is not set, and the 'keystore_password' environment variable is not set.
----

通过执行以下步骤确认已设置 LTPA 密钥密码:

. 检查 `server.xml` 文件中的 `<ltpa />` 元素是否提供了 `keysPassword` 属性(例如,`<ltpa keysPassword="myKeysPassword" />`)。
* 如果已提供,则此更新不会影响您,无需进一步操作。
* 如果未提供,请*不要*添加它,并继续执行下一步。
. 检查 `server.env` 文件中是否存在 `keystore_password` 环境变量(例如,`keystore_password=myKeystorePassword`)。
* 如果存在,则在服务器启动时使用 `keystore_password` 重新加密以前使用默认 `keysPassword` 加密的 LTPA 密钥。
* 如果不存在,请继续执行下一步。
. 将以下环境变量添加到 `server.env` 文件(确保在此处使用 `keystore_password`,而*不是*下一节中为新服务器描述的 `ltpa_keys_password`):
+
[source,properties]
----
keystore_password=your-desired-password
----
+
* 在服务器启动时,使用 `keystore_password` 重新加密以前使用默认 `keysPassword` 加密的 LTPA 密钥。

对于新服务器,在服务器创建期间会随机生成 `ltpa_keys_password` 值。它存储在 `server.env` 文件中,除非在 `server create` 命令中指定了 `--no-password` 选项。如果未为 `<ltpa />` 元素定义 `keysPassword` 属性,则使用随机生成的 `ltpa_keys_password`。

有关更多信息,请参阅 link:https://openliberty.io/docs/latest/reference/config/ltpa.html[LTPA] 配置元素。


[#jwt]
== 支持从 JOSE 头部选择 JWT 签名和解密算法

JSON Web Token (JWT) 可以使用各种加密签名算法进行签名。通过此版本,JWT Consumer、MicroProfile JWT、OpenID Connect Client 和 Social Media Login 功能支持从 JOSE 头部选择 JWT 签名算法。此支持允许根据令牌头部使用不同的签名算法。

以前,只能为 `server.xml` 文件中的每个配置配置一个签名算法(例如,`RS256`)。如果传入的 JWT 使用不同的算法签名,验证将失败。此更新允许使用 JWT 头部中的签名算法进行验证。它提供了在单个配置中使用不同签名算法的灵活性。

=== 如何使用

要启用从头部选择签名算法,请将 `signatureAlgorithm` 属性设置为 `FROM_HEADER`,并可选择配置 `allowedSignatureAlgorithms` 属性以指定允许哪些算法。

如果未配置 `allowedSignatureAlgorithms`,则默认列表包含所有 Open Liberty 支持的签名算法:`RS256、RS384、RS512、HS256、HS384、HS512、ES256、ES384` 和 `ES512`。

当使用 `FROM_HEADER` 与非对称算法和信任库设置时,相应公钥的别名必须以其相应的算法为前缀(例如,`RS256_keyalias`)以进行自动选择。别名名称的其余部分无关紧要,只要它以签名算法字符串开头即可。在验证期间,服务器在信任库中搜索以 JWT 头部中指定的算法开头的别名。如果未找到算法前缀别名,则客户端会回退到使用 `trustedAlias` 属性(对于 `jwtConsumer`)或 `trustAliasName` 属性(对于 `openidConnectClient`、`oidcLogin` 和 `mpJwt`)指定的别名(如果已配置)。如果信任库中存在多个具有签名算法前缀的别名,Liberty 将使用找到的第一个。

请参阅以下 `server.xml` 文件配置示例,了解如何将这些设置应用于支持的元素:

[source,xml]
----
<jwtConsumer
signatureAlgorithm="FROM_HEADER"
allowedSignatureAlgorithms="RS256, ES384, HS512"
...
/>

<mpJwt
signatureAlgorithm="FROM_HEADER"
allowedSignatureAlgorithms="RS256, ES384, HS512"
...
/>

<openidConnectClient
signatureAlgorithm="FROM_HEADER"
allowedSignatureAlgorithms="RS256, ES384, HS512"
...
/>

<oidcLogin
signatureAlgorithm="FROM_HEADER"
allowedSignatureAlgorithms="RS256, ES384, HS512"
...
/>
----

=== 了解更多

*服务器配置:*

* link:https://openliberty.io/docs/latest/reference/config/openidConnectClient.html[openidConnectClient]
* link:https://openliberty.io/docs/latest/reference/config/jwtConsumer.html[jwtConsumer]
* link:https://openliberty.io/docs/latest/reference/config/mpJwt.html[mpJwt]
* link:https://openliberty.io/docs/latest/reference/config/oidcLogin.html[oidcLogin]

*文档:*

* link:https://openliberty.io/docs/latest/reference/feature/openidConnectClient-1.0.html[OpenID Connect Client 1.0]
* link:https://openliberty.io/docs/latest/reference/feature/jwt-1.0.html[JSON Web Token 1.0]
* link:https://openliberty.io/docs/latest/reference/feature/mpJwt-2.1.html[MicroProfile JWT 2.1]
* link:https://openliberty.io/docs/latest/reference/feature/socialLogin-1.0.html[Social Media Login 1.0]

[#java_26]
=== 支持 Java 26
Java 26 是最近的 Java 版本,它引入了比早期版本更多的新功能和增强功能,值得查看。此版本不是长期支持 (LTS) 版本。

link:https://openjdk.org/projects/jdk/26/[Java 26] 中有 10 个新功能 (JEP)。其中五个是测试功能,五个是完全交付的功能。

*测试功能:*

* 524:link:https://openjdk.org/jeps/524[加密对象的 PEM 编码(第二次预览)]
* 525:link:https://openjdk.org/jeps/525[结构化并发(第六次预览)]
* 526:link:https://openjdk.org/jeps/526[惰性常量(第二次预览)]
* 529:link:https://openjdk.org/jeps/529[Vector API(第十一次孵化)]
* 530:link:https://openjdk.org/jeps/530[模式、instanceof 和 switch 中的原始类型(第四次预览)]

*已交付功能:*

* 500:link:https://openjdk.org/jeps/500[准备使 Final 真正意味着 Final]
* 504:link:https://openjdk.org/jeps/504[删除 Applet API]
* 516:link:https://openjdk.org/jeps/516[使用任何 GC 的提前对象缓存]
* 517:link:https://openjdk.org/jeps/517[HTTP 客户端 API 的 HTTP/3]
* 522:link:https://openjdk.org/jeps/522[G1 GC:通过减少同步提高吞吐量]

Java 26 中的新变更 JEP 500("准备使 Final 真正意味着 Final")开始通过限制使用深度反射时对 final 字段的修改来强制执行 final 字段的真正不可变性。
在 Java 26 中,此类修改仍然有效,但默认情况下会触发运行时警告,为开发人员准备更严格的强制执行。
未来的版本可能会抛出异常,使 final 真正不可变。

开发人员可以通过使用 JVM 标志(例如,`--illegal-final-field-mutation=deny`)提前选择加入此更严格的行为,以更早地检测问题。
此更改提高了程序的正确性、安全性和 JVM 优化。

立即利用这些更改,以获得更多时间来评估您的应用程序和微服务在 Java 26 上的行为。

立即开始,下载最新版本的 link:https://developer.ibm.com/languages/java/semeru-runtimes/downloads/[IBM Semeru Runtime 26] 或 link:https://adoptium.net/temurin/releases/?version=26[Temurin 26],然后下载并安装 Open Liberty link:{url-prefix}/start/#runtime_releases[26.0.0.4]。使用设置为 Java 26 安装目录的 `JAVA_HOME` 更新 Liberty 服务器的 link:{url-prefix}/docs/latest/reference/config/server-configuration-overview.html#server-env[server.env] 文件并开始测试。

有关 Java 26 的更多信息,请参阅 Java 26 link:https://jdk.java.net/26/release-notes[发行说明页面]和 link:https://docs.oracle.com/en/java/javase/26/docs/api/index.html[API Javadoc 页面]。


// // // // DO NOT MODIFY THIS COMMENT BLOCK <GHA-BLOG-TOPIC> // // // //
// Blog issue: https://github.com/OpenLiberty/open-liberty/issues/33622
// Contact/Reviewer: ncpibm
// // // // // // // //
[#displayCustomizedExceptionText]
== Web 容器中 `displayCustomizedExceptionText` 属性的文档
此版本为 `<webContainer>` 配置中的 `displayCustomizedExceptionText` 属性添加了文档,该属性允许用户使用更清晰的用户定义消息覆盖 Liberty 的默认错误消息(例如 SRVE0218E: Forbidden 和 SRVE0232E: An exception occurred)。

该功能通过简单的 `server.xml` 文件配置启用,其中自定义消息可以映射到特定的 HTTP 状态代码(`403` 和 `500`)。

测试确保这些自定义消息在所有支持的平台上正确替换 Liberty 的默认值,确认配置的文本在所有场景中一致返回。

[source,xml]
----
<webContainer displayCustomizedExceptionText="Custom error message"/>
----

// DO NOT MODIFY THIS LINE. </GHA-BLOG-TOPIC>

// // // // // // // //
// In the preceding section:
// Replace TAG_X/SUB_TAG_X with the given tag of your secton from the contents list
// Replace SUB_FEATURE_TITLE/FEATURE_X_TITLE with the given title from the contents list
// Replace FEATURE with the feature name for the server.xml file e.g. mpHealth-1.4
// Replace LINK with the link for extra information given for the feature
// Replace LINK_DESCRIPTION with a readable description of the information
// // // // // // // //

[#CVEs]
== 此版本中的安全漏洞 (CVE) 修复
[cols="5*"]
|===
|CVE |CVSS 评分 |漏洞评估 |受影响的版本 |备注

|https://www.cve.org/CVERecord?id=CVE-2025-14915[CVE-2025-14915]
|6.5
|权限提升
|17.0.0.3-26.0.0.3
|影响 `restConnector-2.0` 功能

|https://www.cve.org/CVERecord?id=CVE-2025-14917[CVE-2025-14917]
|6.7
|较弱的安全性
|17.0.0.3-26.0.0.3
|影响 `appSecurity-1.0`、`appSecurity-2.0`、`appSecurity-3.0`、`appSecurity-4.0` 和 `appSecurity-5.0` 功能

|https://www.cve.org/CVERecord?id=CVE-2026-1561[CVE-2026-1561]
|5.4
|服务器端请求伪造
|17.0.0.3-26.0.0.3
|影响 `samlWeb-2.0` 功能

|https://www.cve.org/CVERecord?id=CVE-2026-29063[CVE-2026-29063]
|8.7
|原型污染
|17.0.0.3-26.0.0.3
|影响 `openapi-3.1`、`mpOpenAPI-1.0`、`mpOpenAPI-1.1`、`mpOpenAPI-2.0`、`mpOpenAPI-3.0`、`mpOpenAPI-3.1`、`mpOpenAPI-4.0` 和 `mpOpenAPI-4.1` 功能

|===
//
// If there are no CVEs fixed in this release, replace the table with:
// "There are no security vulnerability fixes in Open Liberty [26.0.0.4]."
// // // // // // // //
有关过去的安全漏洞修复列表,请参阅 link:{url-prefix}/docs/latest/security-vulnerabilities.html[安全漏洞 (CVE) 列表]。


// // // // // // // //
// In the preceding section:
// For this section ask either Michal Broz or Tom Evans or the #openliberty-release-blog channel for Notable bug fixes in this release.
// Present them as a list in the order as provided, linking to the issue and providing a short description of the bug and the resolution.
// If the issue on Github is missing any information, leave a comment in the issue along the lines of:
// "@[issue_owner(s)] please update the description of this `release bug` using the [bug report template](https://github.com/OpenLiberty/open-liberty/issues/new?assignees=&labels=release+bug&template=bug_report.md&title=)"
// Feel free to message the owner(s) directly as well, especially if no action has been taken by them.
// For inspiration about how to write this section look at previous blogs e.g- 20.0.0.10 or 21.0.0.12 (https://openliberty.io/blog/2021/11/26/jakarta-ee-9.1.html#bugs)
// // // // // // // //



== 立即获取 Open Liberty 26.0.0.4

通过 <<run,Maven、Gradle、Docker 和可下载的归档文件>> 提供。
Loading