-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
7192189: Support endpoint identification algorithm in RFC 6125 #7697
Conversation
/csr |
👋 Welcome back mullan! A progress list of the required criteria for merging this PR into |
@seanjmullan an approved CSR request is already required for this pull request. |
@seanjmullan The following label will be automatically applied to this pull request:
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. |
Webrevs
|
About the CSR, did you have a plan to update the "Endpoint Identification Algorithms" in the Java Security Standard Algorithm Names documentation? Currently, the "HTTPS" name is defined for RFC 2818. With this update is may be worth to mention the compliant to RFC 6125, like
|
I thought about that but I was hesitant to do that, because technically RFC 6125 does not obsolete RFC 2818 and there has been no successor to RFC 2818. So I would rather treat RFC 6125 as an implementation-specific feature of the JDK TLS implementation; in other words we chose to make our implementation compliant with RFC 6125 but other implementations may choose not to and still be compliant with RFC 2818. Since RFC 2818 is somewhat ambiguous/vague with respect to what components can use wildcards, I believe the JDK implementation is still compliant with 2818. I realize this is not a perfect situation, but if we do this via the API, then I think we need new APIs such that older implementations that may be less strict about wildcards are still compatible with 2818 if they choose. |
It makes sense to me. |
checker.match(domain, mock(wildcardedDomain)); | ||
} catch (Exception e) { | ||
if (expected) { | ||
throw new Exception("unexpectedly failed match", e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider to update these to RuntimeException
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the benefits of throwing RuntimeException
instead of Exception
? In the latest commit, I have merged the Wildcard.java
test into TestHostnameChecker.java
test which already throws Exception
on failures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not essential. RuntimeException is a convenient choice since it's unchecked, so you don't have to sprinkle your code with throws clauses.
https://openjdk.java.net/jtreg/faq.html#if-a-test-fails-do-i-have-to-throw-my-own-exception
@seanjmullan 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:
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 41 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Rename HostnameMatcher dir to HostnameChecker.
/integrate |
Going to push as commit 72e987e.
Your commit was automatically rebased without conflicts. |
@seanjmullan Pushed as commit 72e987e. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
I'm not seeing any indication in this PR documenting how this fix was tested. JDK-8282832 sun/security/util/Pem/encoding.sh failed with "FileNotFoundException: .../open/test/jdk/sun/security/util/Pem/../HostnameMatcher/cert5.crt (No such file or directory)" |
Please review this change to fully support RFC 6125 in the TLS implementation. This change forbids wildcard domains in TLS certificates unless the wildcard is in the left-most component. Certificates of this nature should be rare and are not allowed per the CABForum baseline requirements. However there may be a small compatibility risk associated with this change, so a CSR has also been filed.
Progress
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/7697/head:pull/7697
$ git checkout pull/7697
Update a local copy of the PR:
$ git checkout pull/7697
$ git pull https://git.openjdk.java.net/jdk pull/7697/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 7697
View PR using the GUI difftool:
$ git pr show -t 7697
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/7697.diff