Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-713

Prevent user from setting config properties that should not be configurable

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 0.12.1
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Not Needed
    • Iteration Athens

      {config.set()}

      allows the user to save any key-value pair to config.json. While this might be convenient for storing arbitrary information that is remembered across sessions, it has the side effect of letting the user overwrite some properties that are important for mongosh to function properly, e.g. userId.

      We should either have a list of allowed properties and only let the user set those or a list of disallowed properties and let the user set anything but those. I'd lean towards the former, to avoid `config.json` to become too big if users put random stuff into config and ends up slowing down the shell when it starts but I'd be also open to consider the latter.

            Assignee:
            anna.henningsen@mongodb.com Anna Henningsen
            Reporter:
            massimiliano.marcon@mongodb.com Massimiliano Marcon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: