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

8331975: Enable case-insensitive check in ccache and keytab entry lookup #19216

Closed
wants to merge 5 commits into from

Conversation

wangweij
Copy link
Contributor

@wangweij wangweij commented May 13, 2024

Add a new system property to control the name comparison in keytab and ccache entry lookup.


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 CSR request JDK-8331976 to be approved

Issues

  • JDK-8331975: Enable case-insensitive check in ccache and keytab entry lookup (Enhancement - P4)
  • JDK-8331976: Enable case-insensitive check in ccache and keytab entry lookup (CSR)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 19216

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented May 13, 2024

👋 Welcome back weijun! 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 May 13, 2024

@wangweij 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:

8331975: Enable case-insensitive check in ccache and keytab entry lookup

Reviewed-by: mpowers, valeriep

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 142 new commits pushed to the master branch:

  • 424eb60: 8331683: Clean up GetCarrierThread
  • 9b1d6d6: 8316328: Test jdk/jfr/event/oldobject/TestSanityDefault.java times out for some heap sizes
  • f8a3e4e: 8328998: Encoding support for Intel APX extended general-purpose registers
  • ddd73b4: 8332082: Shenandoah: Use consistent tests to determine when pre-write barrier is active
  • 0a9d1f8: 8332749: Broken link in MemorySegment.Scope.html
  • c9a7b97: 8332829: [BACKOUT] C2: crash in compiled code because of dependency on removed range check CastIIs
  • 7fd9d6c: 8332340: Add JavacBench as a test case for CDS
  • 417d174: 8331348: Some incremental builds deposit files in the make directory
  • 303ac9f: 8332671: Logging for pretouching thread stacks shows wrong memory range
  • 90758f6: 8332808: Always set java.io.tmpdir to a suitable value in the build
  • ... and 132 more: https://git.openjdk.org/jdk/compare/1dac34fa757f1d603f0bc9b9c1994c114c276add...master

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 master branch, type /integrate in a new comment.

@openjdk openjdk bot added csr Pull request needs approved CSR before integration rfr Pull request is ready for review labels May 13, 2024
@openjdk
Copy link

openjdk bot commented May 13, 2024

@wangweij 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 May 13, 2024
@mlbridge
Copy link

mlbridge bot commented May 13, 2024

Webrevs

Comment on lines 631 to 634
//name type is just a hint, no two names can be the same ignoring name type.
// if (this.nameType != pname.nameType) {
// matched = false;
// }
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this dead code be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe not. At least this will remind future maintainers not to add it back.

Copy link
Contributor

@mcpowers mcpowers left a comment

Choose a reason for hiding this comment

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

LGTM
Only have one comment about existing code.

@mcpowers
Copy link
Contributor

Are there any existing interoperability tests?

@wangweij
Copy link
Contributor Author

Are there any existing interoperability tests?

Not with real KDCs, but I can probably enhance the test to cover the case when this prop is not set.

@michael-o
Copy link

Are there any existing interoperability tests?

Not with real KDCs, but I can probably enhance the test to cover the case when this prop is not set.

I can only confirm that the default behavior works with Active Directory KDC.

*
* @param pname the other <code>PrincipalName</code> object.
* @return true if two have identical values, otherwise, return false.
*/
// It is used in <code>sun.security.krb5.internal.ccache</code> package.
public boolean match(PrincipalName pname) {
boolean matched = true;
//name type is just a hint, no two names can be the same ignoring name type.
// if (this.nameType != pname.nameType) {
// matched = false;
// }
if ((this.nameRealm != null) && (pname.nameRealm != null)) {

Choose a reason for hiding this comment

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

isn't 'nameRealm' non-null? Is this check necessary? Having this check seems to imply their value may be null and it seems incomplete that there is no code handling the cases when one or both of them are null.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right. The realm field used to be nullable but it cannot be now. I'll fix it. Thanks.

Copy link

@valeriepeng valeriepeng left a comment

Choose a reason for hiding this comment

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

Changes look good to me. Thanks~

@wangweij
Copy link
Contributor Author

Changes look good to me. Thanks~

Thanks a lot! Can you please also review the CSR?

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed csr Pull request needs approved CSR before integration labels May 24, 2024
@wangweij
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented May 24, 2024

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

  • 424eb60: 8331683: Clean up GetCarrierThread
  • 9b1d6d6: 8316328: Test jdk/jfr/event/oldobject/TestSanityDefault.java times out for some heap sizes
  • f8a3e4e: 8328998: Encoding support for Intel APX extended general-purpose registers
  • ddd73b4: 8332082: Shenandoah: Use consistent tests to determine when pre-write barrier is active
  • 0a9d1f8: 8332749: Broken link in MemorySegment.Scope.html
  • c9a7b97: 8332829: [BACKOUT] C2: crash in compiled code because of dependency on removed range check CastIIs
  • 7fd9d6c: 8332340: Add JavacBench as a test case for CDS
  • 417d174: 8331348: Some incremental builds deposit files in the make directory
  • 303ac9f: 8332671: Logging for pretouching thread stacks shows wrong memory range
  • 90758f6: 8332808: Always set java.io.tmpdir to a suitable value in the build
  • ... and 132 more: https://git.openjdk.org/jdk/compare/1dac34fa757f1d603f0bc9b9c1994c114c276add...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented May 24, 2024

@wangweij Pushed as commit da3001d.

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

@wangweij wangweij deleted the 8331975 branch May 24, 2024 01:20
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
4 participants