-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Fix bug in leaf-cert cache type where multiple client tokens collide #4736
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f09d65b
to
a99b7be
Compare
mitchellh
approved these changes
Oct 1, 2018
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.
A+ tests.
mkeeler
approved these changes
Oct 2, 2018
… tokens would share certs and block incorrectly
a99b7be
to
d96d764
Compare
Test all passing locally. Going to merge this. |
banks
added a commit
that referenced
this pull request
Oct 4, 2018
…4736) * Fix bug in leaf-cert cache type where multiple clients with different tokens would share certs and block incorrectly * Use hash for issued certs key to avoid ambiguity concatenating
banks
added a commit
that referenced
this pull request
Oct 9, 2018
…4736) * Fix bug in leaf-cert cache type where multiple clients with different tokens would share certs and block incorrectly * Use hash for issued certs key to avoid ambiguity concatenating
banks
added a commit
that referenced
this pull request
Oct 10, 2018
…4736) * Fix bug in leaf-cert cache type where multiple clients with different tokens would share certs and block incorrectly * Use hash for issued certs key to avoid ambiguity concatenating
banks
added a commit
that referenced
this pull request
Oct 10, 2018
…4736) * Fix bug in leaf-cert cache type where multiple clients with different tokens would share certs and block incorrectly * Use hash for issued certs key to avoid ambiguity concatenating
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note: this PR targets merging into f-envoy and depends directly on #4735. This is part of a series of PRs that were developed together but split for easier review.
This is a fix for a bug that is actually unrelated to
f-envoy
changes in general, however it manifests in broken tests in other parts of our test suite whenproxycfg.Manager
is running in the agent since we now have an always-on second client that might be using a different token.The issue is: the leaf cache type shared a cache of issued certs separate to the final cache entries. It didn't partition by token which meant that:
cache
package level would cause the second client on their initial request to block for the full 10 mins before being delivered the cache hit. This is explicitly tested to be fixed now even though the only way to trigger this now other than different tokens is different datacenter which is meaningless and will error for CA leaf requests currently. It seems important to explicitly not depend on the higher level cache de-duping here to avoid subtle future consequences to changing that logic.