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

fix: jwk generation incorrectly being skipped #3876

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

aeneasr
Copy link
Member

@aeneasr aeneasr commented Nov 5, 2024

Unfortunately, #3870 introduced a regression in the JWK generation logic.

Reverts #3870

@aeneasr aeneasr requested review from hperl and alnr as code owners November 5, 2024 12:27
@aeneasr aeneasr changed the title revert: cpu contention on jwk reads + suppress duplicate jwk generation fix: jwk generation incorrectly being skipped Nov 5, 2024
@terev
Copy link
Contributor

terev commented Nov 5, 2024

Oh that's too bad. Under what condition was jwk generation being skipped?

@aeneasr
Copy link
Member Author

aeneasr commented Nov 5, 2024

It's basically like a cache for calling the same function twice, which is a side effect in a multi-threaded app. It just behaves not like expected under certain circumstances and returns the wrong keys.

@aeneasr aeneasr merged commit 0ce9d7a into master Nov 5, 2024
31 of 32 checks passed
@aeneasr aeneasr deleted the revert-3870-suppress-duplicate-jwk-gen branch November 5, 2024 13:54
@terev
Copy link
Contributor

terev commented Nov 5, 2024

Yeah but only when there's another inflight call for the same result. Kid was intentionally left out of the key because all callers didn't rely on the kid anyways, it is just a random uuid.

Does this have to do with multi tenancy? I can imagine the network id would be important there. Maybe that should be included in the flight key?

@terev
Copy link
Contributor

terev commented Nov 5, 2024

@aeneasr Do we need a new/reopened issue to fix this? Seems fairly important.

@aeneasr
Copy link
Member Author

aeneasr commented Nov 5, 2024

Just reopen the other one. We're not observing these issues on our prod system, if the fix is easy we're happy to do it, but we're not heavily incentivized to fix it due to lack of commercial demand and already having spent a good portion of time on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants