315157973 opened a new pull request, #20713: URL: https://github.com/apache/pulsar/pull/20713
### Motivation Sasl authentication has two phases. In the first phase, the broker will temporarily cache the authentication info, and clean the cache at the end of the second phase. When the client crashes after phase 1, or someone deliberately attacks, the auth info will always remain in the broker's memory. If the client keeps reconnecting like this, the broker will soon OOM. ### Modifications Change ConcurrentHashMap to caffeine cache , and force clean cache after a certain period of time. ### Verifying this change - [x] Make sure that the change passes the CI checks. ### Documentation - [x] `doc-not-needed` <!-- Your PR changes do not impact docs --> ### Matching PR in forked repository -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
