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

Validate security key and PEM files has good security permissions on Windows

    • Windows
    • Security 2019-07-29
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      See src/mongo/db/auth/security_key.cpp for ifndef _WIN32 code that validates security permissions no security key. We should add similar code for Windows.

      #if !defined(_WIN32)
              // check permissions: must be X00, where X is >= 4
              if ((stats.st_mode & (S_IRWXG|S_IRWXO)) != 0) {
                  log() << "permissions on " << filename << " are too open" << endl;
                  return false;
              }
      #endif
      

            Assignee:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Reporter:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: