Affected Puppet, Ruby, OS and module versions/distributions
- Puppet: 5.5.6
- Ruby: 2.5.1
- Distribution: Ubuntu 18.04
- Module version: 2.4.1
- mongodb-org-server: 4.0.5
How to reproduce (e.g Puppet code you use)
class { 'mongodb::server':
create_admin => true,
admin_username => 'admin',
admin_password => 'test123',
}
or
create_resources('mongodb::db', $mongo_dbs)
What are you seeing
Every puppet run completes successfully and states that the user(s) have been created. This causes the puppet runs to never get to a stable state.
The response json from the generated mongo command points out, that SCRAM-SHA-256 (default mechanism in mongodb 4.0.x) requires that the digest is done on the server (= digestPassword: true)
see https://docs.mongodb.com/manual/reference/command/createUser/ for reference.
What behaviour did you expect instead
Either:
The user is created.
Provide a parameter to customize the values of digestPasswort/mechanism.
The puppet run fails with an error (but that would require parsing the output).
Any additional information you'd like to impart
As a workaround I use a custom systemd dropin file for mongod which adds --setParameter authenticationMechanisms=SCRAM-SHA-1,PLAIN to the ExecStart to disable SCRAM-SHA-256
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
or
What are you seeing
Every puppet run completes successfully and states that the user(s) have been created. This causes the puppet runs to never get to a stable state.
The response json from the generated mongo command points out, that
SCRAM-SHA-256(default mechanism in mongodb 4.0.x) requires that the digest is done on the server (= digestPassword: true)see https://docs.mongodb.com/manual/reference/command/createUser/ for reference.
What behaviour did you expect instead
Either:
The user is created.
Provide a parameter to customize the values of digestPasswort/mechanism.
The puppet run fails with an error (but that would require parsing the output).
Any additional information you'd like to impart
As a workaround I use a custom systemd dropin file for mongod which adds
--setParameter authenticationMechanisms=SCRAM-SHA-1,PLAINto the ExecStart to disableSCRAM-SHA-256