Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-29915

SCRAM-SHA-1 mechanism should respect "y" in gs2-cbind-flag

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.12
    • Affects Version/s: None
    • Component/s: Security
    • None
    • Fully Compatible
    • ALL
    • Platforms 2017-07-10, Platforms 2017-07-31, Platforms 2017-08-21

      SCRAM defines the gs2-cbind-flag parameter as follows:

         gs2-cbind-flag  = ("p=" cb-name) / "n" / "y"
                           ;; "n" -> client doesn't support channel binding.
                           ;; "y" -> client does support channel binding
                           ;;        but thinks the server does not.
                           ;; "p" -> client requires channel binding.
                           ;; The selected channel binding follows "p=".
      

      This is a Man-in-the-Middle protection measure, for clients which must detect if a remote server supports channel binding. If a Man-in-the-Middle manipulates traffic, and tricks the client into believing that the server did not support channel binding, the client must set this flag to "y". If the server supports channel binding and sees "y", that is an error. If, more likely, the MitM edits the client's message, and the server sees "n", then the client and server will not be able to negotiate a shared secret and authentication will fail.

      MongoDB currently fails authentication attempts which send anything other than "n". Our server and our drivers do not support channel binding, so they send "n", so this hasn't been an issue. However, if a future driver did support channel binding, and detected that an old server did not support it, it would have to send the server "y". Today, that would cause authentication to fail.

            Assignee:
            spencer.jackson@mongodb.com Spencer Jackson
            Reporter:
            spencer.jackson@mongodb.com Spencer Jackson
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: