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

8329213: Better validation for com.sun.security.ocsp.useget option #18525

Closed

Conversation

shipilev
Copy link
Member

@shipilev shipilev commented Mar 27, 2024

JDK-8328638 introduced a new boolean option, com.sun.security.ocsp.useget. We use the usual Boolean.parseBoolean to convert it from String to boolean value, which works correctly for false and true as boolean values. However, any string that is not true would be treated as false. Which means that if users mistype the value, they would get a false, which is a non-default value, which is against the spirit of the JDK-8328638.

It would be preferable to validate the option range a bit better, and default to the correct value on any error.

Additional testing:

  • Eyeballing GetAndPostTests debugging, checking that GET/POST are properly enabled/disabled for false, true, foobar passed as option values
  • jdk_security, out of the box
  • jdk_security with -Dcom.sun.security.ocsp.useget=false passes
  • jdk_security with -Dcom.sun.security.ocsp.useget=foobar passes

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

Issue

  • JDK-8329213: Better validation for com.sun.security.ocsp.useget option (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 18525

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

Using diff file

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

Webrev

Link to Webrev Comment

@shipilev shipilev changed the title 8329213: 8329213: Better validation for com.sun.security.ocsp.useget option Mar 27, 2024
@bridgekeeper
Copy link

bridgekeeper bot commented Mar 27, 2024

👋 Welcome back shade! 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 27, 2024

@shipilev This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8329213: Better validation for com.sun.security.ocsp.useget option

Reviewed-by: mullan

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk
Copy link

openjdk bot commented Mar 27, 2024

@shipilev 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.

@openjdk openjdk bot added the security security-dev@openjdk.org label Mar 27, 2024
@shipilev shipilev marked this pull request as ready for review March 27, 2024 20:23
@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 27, 2024
@mlbridge
Copy link

mlbridge bot commented Mar 27, 2024

Webrevs

Copy link
Member

@seanjmullan seanjmullan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also add to the RN that any value other than "false" (case-insensitive) defaults to "true".

@shipilev
Copy link
Member Author

Can you also add to the RN that any value other than "false" (case-insensitive) defaults to "true".

Amended the existing RN.

Copy link
Member

@seanjmullan seanjmullan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update copyright date on SimpleOCSPServer. Otherwise, looks good!

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 29, 2024
@shipilev
Copy link
Member Author

shipilev commented Apr 1, 2024

Cool. Do I need more reviewers for this area, or one review is enough?

@seanjmullan
Copy link
Member

Cool. Do I need more reviewers for this area, or one review is enough?

One is enough.

@shipilev
Copy link
Member Author

shipilev commented Apr 1, 2024

Thanks!

/integrate

@openjdk
Copy link

openjdk bot commented Apr 1, 2024

Going to push as commit 4a14cba.
Since your change was applied there have been 2 commits pushed to the master branch:

  • 9f5464e: 8329353: ResolvedReferencesNotNullTest.java failed with Incorrect resolved references array, quxString should not be archived
  • 3f5b75a: 8328541: Remove or update obsolete comment in JRootPane

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Apr 1, 2024
@openjdk openjdk bot closed this Apr 1, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Apr 1, 2024
@openjdk
Copy link

openjdk bot commented Apr 1, 2024

@shipilev Pushed as commit 4a14cba.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated security security-dev@openjdk.org
2 participants