You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Ray Chiang (JIRA)" <ji...@apache.org> on 2018/08/03 21:01:00 UTC

[jira] [Updated] (KAFKA-5802) ScramServerCallbackHandler#handle should check username not being null before calling credentialCache.get()

     [ https://issues.apache.org/jira/browse/KAFKA-5802?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ray Chiang updated KAFKA-5802:
------------------------------
    Component/s: security

> ScramServerCallbackHandler#handle should check username not being null before calling credentialCache.get()
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-5802
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5802
>             Project: Kafka
>          Issue Type: Bug
>          Components: security
>            Reporter: Ted Yu
>            Priority: Minor
>
> {code}
>         String username = null;
>         for (Callback callback : callbacks) {
>             if (callback instanceof NameCallback)
>                 username = ((NameCallback) callback).getDefaultName();
>             else if (callback instanceof ScramCredentialCallback)
>                 ((ScramCredentialCallback) callback).scramCredential(credentialCache.get(username));
> {code}
> Since ConcurrentHashMap, used by CredentialCache, doesn't allow null keys, we should check that username is not null before calling credentialCache.get()



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)