Major - P3
Platforms 10 (02/19/16), Platforms 12 (04/01/16)
In Mongo, MongoD, and MongoS, we have several options which are implicit options:
- password (mongo)
- PEMKeyPassword (*)
- sslClusterPassword (mongod, mongos)
These are options that have been setup with setImplicitValue.
To quote setImplicitValue
Add an implicit value for this option if it is specified with no argument
This maps to boost::program_options::typed_value::implicit_value which is defined as:
Specifies an implicit value, which will be used if the option is given, but without an adjacent value. Using this implies that an explicit value is optional, but if given, must be strictly adjacent to the option, i.e.: '-ovalue' or '--option=value'. Giving '-o' or '--option' will cause the implicit value to be applied.
Unlike the above overload, the type 'T' need not provide operator<< for ostream, but textual representation of default value must be provided by the user.
This has been documented this way since boost 1.49.
This means that the common way of passing passwords for example on the command line as used by the tests is wrong.
are supposed to be equivalent.
The correct syntax is
Boost prior to 1.59 had a bug where -
password foo was allowed to mean -password=foo. This has been fixed. Now, we need to either correct our tests or change our usage of implicit values to fix our tests or change our code to define these parameters as default values to maintain the existing behavior.