Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-4256

impossible to hash nosqlprotocol password in mxs config file

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Cannot Reproduce
    • 6.4.1
    • N/A
    • nosqlprotocol
    • None

    Description

      it is impossible to hash the nosqlrotocol.password as a regular maxscale service user.

      example :

      maxpasswd /var/lib/maxscale aBcd_123
      

      gives a hash

      when replacing plain text password with said hash in this :

      [mcs_mongo]
      type=listener
      service=Read-Write-Service
      protocol=nosqlprotocol
      nosqlprotocol.user=mongo_test
      nosqlprotocol.password=HASH
      port=27017
      
      

      after restart all tries to insert a new document end up with this error message :

      db.runCommand({insert: "mongo_collection", documents: [{_id: 1, "hello": "world"}]});
       
      uncaught exception: Error: error doing query: failed: network error while attempting to run command 'insert' on host '127.0.0.1:27017'  :
       
      DB.prototype.runCommand@src/mongo/shell/db.js:177:19
      

      with password in clear text, everything works as intended.

      Attachments

        Activity

          johan.wikman Johan Wikman added a comment -

          I just tried that and it seems to work. Could you please verify that the user and the encrypted password work when used in the service. To rule out the case that the password was encrypted using another key than the one MaxScale uses for decrypting it.

          johan.wikman Johan Wikman added a comment - I just tried that and it seems to work. Could you please verify that the user and the encrypted password work when used in the service. To rule out the case that the password was encrypted using another key than the one MaxScale uses for decrypting it.

          you mean that both the service user that connects to mariadb and the listener user that connects to mongo have to be the same and thus we should be using the same hash ?

          SylvainArbaudie Sylvain ARBAUDIE added a comment - you mean that both the service user that connects to mariadb and the listener user that connects to mongo have to be the same and thus we should be using the same hash ?
          johan.wikman Johan Wikman added a comment -

          No, you don't need to use the same hash. However, this worked fine for me, it would be good to verify that the used hash works in some other place. To rule out the possibility that it was created using another key than the one MaxScale uses for decrypting it.

          johan.wikman Johan Wikman added a comment - No, you don't need to use the same hash. However, this worked fine for me, it would be good to verify that the used hash works in some other place. To rule out the possibility that it was created using another key than the one MaxScale uses for decrypting it.

          People

            johan.wikman Johan Wikman
            SylvainArbaudie Sylvain ARBAUDIE
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.