Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-2386

Qpid C++ broker: add user ID in "SASL: Authentication failed" log message

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.8
    • C++ Broker
    • None
    • Red Hat Enterprise MRG 1.2

    Description

      When the SASL authentication succeeds the broker then logs a message like the following:

      2010-feb-03 15:28:45 info SASL: Authentication succeeded for: user@QPID

      When the authentication fails it logs e.g.:

      2010-feb-03 16:09:20 info SASL: Authentication failed: SASL(-13): authentication failure: Password verification failed

      It would be helpful if the log message in the latter case would also contain the user ID and domain for which the authentication failed. It could look like
      2010-feb-03 16:09:20 info SASL: Authentication failed for user@QPID: SASL(-13): authentication failure: Password verification failed

      I think this can easily be achieved by applying the following change to the module SASLAUTHENTICATOR.CPP:
      OLD:
      } else {
      QPID_LOG(info, "SASL: Authentication failed: " << sasl_errdetail(sasl_conn));

      // TODO: Change to more specific exceptions, when they are
      // available
      switch (code)

      { NEW: }

      else {
      QPID_LOG(info, "SASL: Authentication failed for " << const_cast<char*>(static_cast<const char*>(uid)) << ": " << sasl_errdetail(sasl_conn));

      // TODO: Change to more specific exceptions, when they are
      // available
      switch (code) {

      This enhancement request has also been reported as Red Hat service request #1991714.

      Attachments

        Activity

          People

            gsim Gordon Sim
            xeop-nollarm Armin Noll
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: