-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8270137: Kerberos Credential Retrieval from Cache not Working in Cross-Realm Setup #5036
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
Conversation
|
👋 Welcome back mbalao! A progress list of the required criteria for merging this PR into |
Webrevs
|
|
Thanks for your effort. We tested this patch on our internal environment and it works fine. It definetly makes sense to store Proxy tickets in the cache to reduce network load instead of our proposed "do not use cache for Proxy tickets" approach. |
wangweij
left a comment
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.
Looks fine. Some small comments.
src/java.security.jgss/share/classes/sun/security/krb5/internal/CredentialsUtil.java
Outdated
Show resolved
Hide resolved
src/java.security.jgss/share/classes/sun/security/krb5/internal/CredentialsUtil.java
Outdated
Show resolved
Hide resolved
src/java.security.jgss/share/classes/sun/security/krb5/internal/ReferralsCache.java
Outdated
Show resolved
Hide resolved
|
@martinuy 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 24 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 |
|
/integrate |
|
Going to push as commit 67869b4.
Your commit was automatically rebased without conflicts. |
|
@martinuy Unknown command |
I'd like to propose a fix for JDK-8270137 [1].
This bug is triggered when using a previously stored referral ticket (in the Referrals Cache) at the moment of following a S4U2Proxy cross-realm referral. The mistakenly-used referral ticket matched the client and service names but it was obtained as a result of a non-S4U2Proxy request. In fact, it was the middle service that got it while trying to determine the backend service realm in a previous S4U2Proxy communication. The mistakenly-used referral ticket was not bind to the impersonated user (in other words, it was not obtained attaching the user's TGS as part of a S4U2Proxy request) and, thus, must not be used.
Even when one possible approach to fix this issue could be to be more selective at the moment of getting referral tickets from the Cache (that is: do not get anything from the Cache if it's for a S4U2Proxy request), I decided to go one step further and enhance the Referrals Cache. With this enhancement, we add more information to the stored referral tickets such as a footprint of the TGS (in the case of S4U2Proxy requests) or the user principal (in the case of S4U2Self requests). We now allow to store S4U2Proxy and S4U2Self referrals tickets but those will be re-used only if there is a perfect match of the TGS or user principal. As an example, if a middle service tries to replicate the exact S4U2Self communication for exactly the same user, cached referral tickets should be okay. With this enhancement, we increase the use of the Cache and the performance (time, network resources, etc.).
The ReferralsTest is enhanced to reflect these new scenarios and now uses cached S4U2Proxy/S4U2Self referral tickets.
No regressions observed in jdk/sun/security/krb5.
--
[1] - https://bugs.openjdk.java.net/browse/JDK-8270137
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5036/head:pull/5036$ git checkout pull/5036Update a local copy of the PR:
$ git checkout pull/5036$ git pull https://git.openjdk.java.net/jdk pull/5036/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 5036View PR using the GUI difftool:
$ git pr show -t 5036Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5036.diff