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

No-auth Windows broker fails client connection with "Selected mechanism not supported"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • None
    • C++ Broker
    • None
    • Windows XP SP 3, VC++ 9.0

    Description

      If a client offers any non-empty auth mechanism (e.g., "PLAIN"), the windows C++ broker will fail to start/tune the connection with "Selected mechanism not supported" eventhough it has authorization disabled ("--auth=no").

      void ConnectionHandler::start(const FieldTable& /serverProps/, const Array& mechanisms, const Array& /locales/)
      {
      checkState(NOT_STARTED, INVALID_STATE_START);
      setState(NEGOTIATING);
      sasl = SaslFactory::getInstance().create(*this);

      std::string mechlist;
      bool chosenMechanismSupported = mechanism.empty();
      for (Array::const_iterator i = mechanisms.begin(); i != mechanisms.end(); ++i) {
      if (!mechanism.empty() && mechanism == (*i)->get<std::string>())

      { chosenMechanismSupported = true; mechlist = (*i)->get<std::string>() + SPACE + mechlist; }

      else

      { if (i != mechanisms.begin()) mechlist += SPACE; mechlist += (*i)->get<std::string>(); }

      }

      if (!chosenMechanismSupported)

      { fail("Selected mechanism not supported: " + mechanism); }

      Attachments

        1. windows-sasl-noauth.patch
          0.6 kB
          Gordon Sim

        Issue Links

          Activity

            People

              shuston Stephen D. Huston
              pmackinn Pete MacKinnon
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: