Skip to content

8376748: Emit runtime warnings for JCE algorithms that will be disabled#29719

Draft
seanjmullan wants to merge 28 commits intoopenjdk:masterfrom
seanjmullan:open4
Draft

8376748: Emit runtime warnings for JCE algorithms that will be disabled#29719
seanjmullan wants to merge 28 commits intoopenjdk:masterfrom
seanjmullan:open4

Conversation

@seanjmullan
Copy link
Member

@seanjmullan seanjmullan commented Feb 13, 2026


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Error

 ⚠️ The pull request body must not be empty.

Integration blocker

 ⚠️ Failed to retrieve information on issue 8376748. Please make sure it exists and is accessible.

Issue

  • ⚠️ Failed to retrieve information on issue 8376748.

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/29719/head:pull/29719
$ git checkout pull/29719

Update a local copy of the PR:
$ git checkout pull/29719
$ git pull https://git.openjdk.org/jdk.git pull/29719/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 29719

View PR using the GUI difftool:
$ git pr show -t 29719

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/29719.diff

franferrax and others added 28 commits April 9, 2025 19:13
Update copyright year, improve comments and use File::toPath to convert
back to Path.
Junctions do not require elevation, so this is a way of testing
soft-links are resolved without requiring elevation. This is useful
because we need to avoid elevation in order to reproduce the parent
directories permission issue.

This is testing directories structure:

 📁 JDK-8352728-tmp-*/
 ├─🔒 jdk-parent-dir/         (ACL with REMOVED-PERMISSIONS)
 │ └─📁 jdk/
 │   ├─📁 conf/
 │   │ ├─📁 security/
 │   │ │ ├─📄 java.security
 │   │ │ │    📝 include link-to-other-dir/other.properties
 │   │ │ ├─🔗 link-to-other-dir/ ⟹ 📁 JDK-8352728-tmp-*/other-dir
 │   │ │ └─...               (JUNCTION)
 │   │ └─...
 │   └─...
 ├─📁 other-dir/
 │ └─📄 other.properties
 │      📝 include ../relatively.included.properties
 └─📄 relatively.included.properties
      📝 test.property.name=test_property_value
This use case has been discussed and analyzed in the pull request, but
we didn't have a test case for it. By introducing a test, we make sure
we don't have regressions in this area, regardless of the alternative
we choose to advance with for this fix.
checkCyclicInclude() is invoked after we successfully get an InputStream
for the path to avoid skipping the same IOException several times inside
checkCyclicInclude() if the path doesn't exist.

Also, perform symlinks resolution only in the following cases:
 • When we need to resolve a relative include
 • For clarity to the user in logging messages
 • For clarity to the user in exception messages

In the first case, the resolution is a requirement, in the last two
cases it is a nice-to-have. But given the last two are exceptional
cases anyway, we let any resolution error bubble up.
OutputAnalyzer::stderrMatches returns a boolean while
OutputAnalyzer::stderrShouldMatch performs the check.
Remove path normalization from debugging messages, only keep it where
strictly necessary.

Adjust test case to the new debugging messages which contain absolute
but not normalized paths (can contain some ../../ elements).
After JDK-8355342 (1f08a3e)
File::getCanonicalFile is no longer resolving symlinks in Windows, plus
there is some reluctance from core-libs maintainers about relying on
specific java.io.File behaviour with regard to parent directories
permissions.

On the other hand, path resolution has been moved to a place where it's
strictly needed (when resolving a relative include directive), and this
should mitigate the majority of the use-cases, being an improvement with
respect to the current status quo.

Given the previous, I think that Path::toRealPath in its current
location is a good compromise.

This also reverts commit 7abb62c, since
we are no longer supporting that use-case.
Extract restrictedAcl() AutoCloseable and also use AutoCloseable for the
temporary directory cleanup.
We agreed an IOException in this case is recoverable, and decided to
tolerate it, while adding a debug log message with the exception.
As @wangweij pointed out:
> The person writing the original properties file may have expected
> includes to resolve relative to its own location, but whoever created
> the symlink may have intended a different resolution path. If they
> wanted the original location, they could have just used the real file
> directly instead of introducing a symlink.

Since path resolution is causing trouble under certain conditions, let's
avoid doing it. Other programs with include directives support in their
configuration files are doing the same.
This reverts commit 7c80874 only for
ConfigFileTest.
Move ExtraMode as an ExtraPropsFile field, so we have this information
as soon as the ExtraPropsFile is created. This will be useful for the
next change.
@bridgekeeper
Copy link

bridgekeeper bot commented Feb 13, 2026

👋 Welcome back mullan! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Feb 13, 2026

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot added the security security-dev@openjdk.org label Feb 13, 2026
@openjdk
Copy link

openjdk bot commented Feb 13, 2026

@seanjmullan The following label will be automatically applied to this pull request:

  • security

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

security security-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

2 participants