docker-library / mongo

Docker Official Image packaging for MongoDB
https://www.mongodb.org/
Apache License 2.0
1.03k stars 619 forks source link

Mongo 4.2.1 "--sslMode requireSSL --sslPEMKeyFile /keyfile/mongodb.pem" results in tls configuration. #374

Closed zbartl closed 4 years ago

zbartl commented 4 years ago
docker run -v /keyfile:/keyfile mongo:4.2 \
--sslMode requireSSL --sslPEMKeyFile /keyfile/mongodb.pem

results in:

2019-11-20T22:50:45.507+0000 W  CONTROL  [main] Option: sslMode is deprecated. Please use tlsMode instead.
2019-11-20T22:50:45.508+0000 W  CONTROL  [main] Option: sslPEMKeyFile is deprecated. Please use tlsCertificateKeyFile instead.
2019-11-20T22:50:45.534+0000 I  CONTROL  [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2019-11-20T22:50:45.542+0000 I  CONTROL  [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=71c77b79c791
2019-11-20T22:50:45.542+0000 I  CONTROL  [initandlisten] db version v4.2.1
2019-11-20T22:50:45.542+0000 I  CONTROL  [initandlisten] git version: edf6d45851c0b9ee15548f0f847df141764a317e
2019-11-20T22:50:45.542+0000 I  CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.1.1  11 Sep 2018
2019-11-20T22:50:45.542+0000 I  CONTROL  [initandlisten] allocator: tcmalloc
2019-11-20T22:50:45.542+0000 I  CONTROL  [initandlisten] modules: none
2019-11-20T22:50:45.543+0000 I  CONTROL  [initandlisten] build environment:
2019-11-20T22:50:45.543+0000 I  CONTROL  [initandlisten]     distmod: ubuntu1804
2019-11-20T22:50:45.543+0000 I  CONTROL  [initandlisten]     distarch: x86_64
2019-11-20T22:50:45.544+0000 I  CONTROL  [initandlisten]     target_arch: x86_64
2019-11-20T22:50:45.544+0000 I  CONTROL  [initandlisten] options: { net: { bindIp: "*", tls: { certificateKeyFile: "/keyfile/mongodb.pem", mode: "requireTLS" } } }

should "options" not be:

{ net: { bindIp: "*", ssl: { PEMKeyFile: "/keyfile/mongodb.pem", mode: "requireSSL" } } }
wglambert commented 4 years ago

https://docs.mongodb.com/manual/reference/program/mongo/#options

STARTING IN VERSION 4.2

  • MongoDB deprecates the SSL options and insteads adds new corresponding TLS options.