Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8348986: Improve coverage of enhanced exception messages #23929

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

Michael-Mc-Mahon
Copy link
Member

@Michael-Mc-Mahon Michael-Mc-Mahon commented Mar 6, 2025

Hi,

Enhanced exception messages are designed to hide sensitive information such as hostnames, IP
addresses from exception message strings, unless the enhanced mode for the specific category
has been explicitly enabled. Enhanced exceptions were first introduced in 8204233 in JDK 11 and
updated in 8207846.

This PR aims to increase the coverage of enhanced exception messages in the networking code.
A limited number of exceptions are already hidden (restricted) by default. The new categories and
exceptions in this PR will be restricted on an opt-in basis, ie. the default mode will be enhanced
(while preserving the existing behavior).

The mechanism is controlled by the security/system property "jdk.includeInExceptions" which takes as value
a comma separated list of category names, which identify groups of exceptions where the exception
message may be enhanced. Any category not listed is "restricted" which means that potentially
sensitive information (such as hostnames, IP addresses, user identities) are excluded from the message text.

The changes to the java.security conf file describe the exact changes in terms of the categories now
supported and any changes in behavior.

Thanks,
Michael


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
  • Change requires a CSR request matching fixVersion 25 to be approved (needs to be created)

Issue

  • JDK-8348986: Improve coverage of enhanced exception messages (Enhancement - P3)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 23929

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 6, 2025

👋 Welcome back michaelm! 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 Mar 6, 2025

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

@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 6, 2025
@openjdk
Copy link

openjdk bot commented Mar 6, 2025

@Michael-Mc-Mahon The following labels will be automatically applied to this pull request:

  • core-libs
  • net
  • nio
  • security

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

@mlbridge
Copy link

mlbridge bot commented Mar 6, 2025

Webrevs

@Michael-Mc-Mahon
Copy link
Member Author

/csr needed

@openjdk openjdk bot added the csr Pull request needs approved CSR before integration label Mar 6, 2025
@openjdk
Copy link

openjdk bot commented Mar 6, 2025

@Michael-Mc-Mahon has indicated that a compatibility and specification (CSR) request is needed for this pull request.

@Michael-Mc-Mahon please create a CSR request for issue JDK-8348986 with the correct fix version. This pull request cannot be integrated until the CSR request is approved.

from turbanoff review

Co-authored-by: Andrey Turbanov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs [email protected] csr Pull request needs approved CSR before integration net [email protected] nio [email protected] rfr Pull request is ready for review security [email protected]
Development

Successfully merging this pull request may close these issues.

2 participants