Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-5802

ScramServerCallbackHandler#handle should check username not being null before calling credentialCache.get()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • security
    • None

    Description

              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));
      

      Since ConcurrentHashMap, used by CredentialCache, doesn't allow null keys, we should check that username is not null before calling credentialCache.get()

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              yuzhihong@gmail.com Ted Yu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: