-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VAULT-31264: Limit raft joins (#28790)
* Switch from an unbounded Map to an LRU, 429 when exceeding it's size, and repeat challenges to the same server rather than encrypting new ones * Prune old challenges * Remove from pending only if the answer is correct * Add a unit test that validates 429s, delays, and eviction of old entries * Switch to using a flat token bucket from x/time/rate * remove from LRU on each challenge write * Remove sleep, simplify unit test * improve const names * additional tests * max answer size * add locking to prevent multiple new challenges * remove log line --------- Co-authored-by: Scott G. Miller <smiller@hashicorp.com>
- Loading branch information
1 parent
2eaae5e
commit 195dfca
Showing
5 changed files
with
246 additions
and
32 deletions.
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.