Skip to content

KAFKA-21418: Cleanup DelegationTokenCache and CredentialCache - #24093

Open
FrankYang0529 wants to merge 1 commit into
apache:trunkfrom
FrankYang0529:KAFKA-21418
Open

FrankYang0529 wants to merge 1 commit into
apache:trunkfrom
FrankYang0529:KAFKA-21418

Conversation

@FrankYang0529

@FrankYang0529 FrankYang0529 commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

DelegationTokenCache kept a tokenId -> hmac map only so that
removeToken() could find the hmac entry to drop. The token cache now
stores the DelegationToken itself, which already carries the hmac, so
that map is gone. addToken() now takes a DelegationToken and keeps
the hmac -> tokenId map in step with the token cache. The unused
tokenIdForHmac() is removed as well.

CredentialCache is only ever used with ScramCredential, so the
generic type parameter and the credential class check are removed.

ScramCredentialUtils was down to a single helper, createCache(). It
is replaced by a CredentialCache constructor that creates a cache for
each SCRAM mechanism in the given collection, and ScramCredentialUtils
is removed.

Signed-off-by: PoAn Yang <payang@apache.org>
@github-actions github-actions Bot added the core Kafka Broker label Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clients core Kafka Broker

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant