You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As pointed out by @rohitkoul in #7 (comment) there is a bug in the refresh goroutine related to key replacement.
The project's provided HTTP client's local JWK Set cache should do a full replacement when the goroutine refreshes the remote JWK Set. The current behavior is to overwrite or append. This is a security issue for use cases that utilize the provided auto-caching HTTP client and where key removal from a JWK Set is equivalent to revocation.
Regardless of this bug, please note that removing a key from a JWK Set does not equate to instant revocation for most use cases as it takes time for JWK Set updates to propagate to all clients.
Here's the Proof of Concept (POC) I wrote to confirm this bug:
POC output:
2025/01/08 20:21:17 INFO Old key. kid=836a7fb7-03a3-40cb-ab39-40235ed1de0c
2025/01/08 20:21:17 INFO New key. kid=836a7fb7-03a3-40cb-ab39-40235ed1de0c
2025/01/08 20:21:17 INFO New key. kid=ee966d68-6739-40d3-b652-c7ad023fa9cd
MicahParks
changed the title
Key removal upon refresh
Replace project's provided HTTP client's local cache during refresh
Jan 9, 2025
MicahParks
changed the title
Replace project's provided HTTP client's local cache during refresh
HTTP client only appended JWK to local cache during refresh
Jan 9, 2025
MicahParks
changed the title
HTTP client only appended JWK to local cache during refresh
HTTP client only appends JWK to local cache during refresh
Jan 9, 2025
MicahParks
changed the title
HTTP client only appends JWK to local cache during refresh
HTTP client only overwrites and appends JWK to local cache during refresh
Jan 9, 2025
MicahParks
changed the title
HTTP client only overwrites and appends JWK to local cache during refresh
HTTP client only overwrites or appends JWK to local cache during refresh
Jan 9, 2025
As pointed out by @rohitkoul in #7 (comment) there is a bug in the refresh goroutine related to key replacement.
The project's provided HTTP client's local JWK Set cache should do a full replacement when the goroutine refreshes the remote JWK Set. The current behavior is to overwrite or append. This is a security issue for use cases that utilize the provided auto-caching HTTP client and where key removal from a JWK Set is equivalent to revocation.
Regardless of this bug, please note that removing a key from a JWK Set does not equate to instant revocation for most use cases as it takes time for JWK Set updates to propagate to all clients.
Here's the Proof of Concept (POC) I wrote to confirm this bug:
POC output:
POC code:
The text was updated successfully, but these errors were encountered: