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

--encryptionKeyFile arguments requires the full path when using --fork

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 4.1.10
    • Affects Version/s: 4.0.4
    • Component/s: Security
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Hide

      The following fails

      vagrant@m040:~$ pwd
      /home/vagrant
      vagrant@m040:~$ mongod --dbpath ./M310-HW-2.5/r0 --logpath ./M310-HW-2.5/r0/mongo.log --port 31250 --replSet UNENCRYPTED --enableEncryption --encryptionKeyFile *.*/M310-HW-2.5/master_key *--fork*
      

       

      The following succeeds

      vagrant@m040:~$ pwd
      /home/vagrant
      vagrant@m040:~$ mongod --dbpath ./M310-HW-2.5/r0 --logpath ./M310-HW-2.5/r0/mongo.log --port 31250 --replSet UNENCRYPTED --enableEncryption --encryptionKeyFile ./M310-HW-2.5/master_key
      

      This succeeds as well

      vagrant@m040:~$ pwd
      /home/vagrant
      vagrant@m040:~$ mongod --dbpath ./M310-HW-2.5/r0 --logpath ./M310-HW-2.5/r0/mongo.log --port 31250 --replSet UNENCRYPTED --enableEncryption --encryptionKeyFile */home/vagrant*/M310-HW-2.5/master_key --fork
      

      See attached logs

       

       

       

      Show
      The following fails vagrant@m040:~$ pwd /home/vagrant vagrant@m040:~$ mongod --dbpath ./M310-HW-2.5/r0 --logpath ./M310-HW-2.5/r0/mongo.log --port 31250 --replSet UNENCRYPTED --enableEncryption --encryptionKeyFile *.*/M310-HW-2.5/master_key *--fork*   The following succeeds vagrant@m040:~$ pwd /home/vagrant vagrant@m040:~$ mongod --dbpath ./M310-HW-2.5/r0 --logpath ./M310-HW-2.5/r0/mongo.log --port 31250 --replSet UNENCRYPTED --enableEncryption --encryptionKeyFile ./M310-HW-2.5/master_key This succeeds as well vagrant@m040:~$ pwd /home/vagrant vagrant@m040:~$ mongod --dbpath ./M310-HW-2.5/r0 --logpath ./M310-HW-2.5/r0/mongo.log --port 31250 --replSet UNENCRYPTED --enableEncryption --encryptionKeyFile */home/vagrant*/M310-HW-2.5/master_key --fork See attached logs      
    • Security 2019-04-08

      The path to encryptionKeyFile option has to be a full/absolute path when using --fork option where as other options will resolve the relative paths when using the --fork option.

       

      See attached logs

       

      This is similar same issue but different parameter fixed in

      https://jira.mongodb.org/browse/SERVER-8524

       

      "it's because --fork changes the CWD. We are doing something special in the code to convert the relative paths for dbpath and logpath into absolute paths. We will have to do something similar for the SSL paths"

       

       

       

        1. image-2018-12-11-18-16-52-131.png
          image-2018-12-11-18-16-52-131.png
          2 kB
        2. mongo_with_fork.log
          3 kB
        3. mongo_withOut_fork.log
          7 kB

            Assignee:
            jonathan.reams@mongodb.com Jonathan Reams
            Reporter:
            dschuppner David Schuppner
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: