Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL not natively supported #199

Open
JJClements opened this issue Jul 3, 2018 · 4 comments
Open

SSL not natively supported #199

JJClements opened this issue Jul 3, 2018 · 4 comments

Comments

@JJClements
Copy link

JJClements commented Jul 3, 2018

It appears that SSL is not natively supported. When I am enforcing SSL using the following:

default['mongodb']['config']['mongod']['net']['ssl']['mode'] = 'requireSSL'
default['mongodb']['config']['mongod']['net']['ssl']['PEMKeyFile'] = "/etc/ssl/#{node['hostname']}.pem"
default['mongodb']['config']['mongod']['net']['ssl']['CAFile'] = "/etc/ssl/#{node['hostname']}-ca.crt"
default['mongodb']['config']['mongod']['net']['ssl']['allowConnectionsWithoutCertificates'] = 'true'
default['mongodb']['config']['mongod']['net']['ssl']['disabledProtocols'] = 'TLS1_0,TLS1_1

I receive an error when converging , which appears to be because providers/user.rb 'Mongo::MongoClient.new' isn't connecting with SSL (and so the users can't be created). Manually editing the providers/user.rb and adding 'ssl: true' works, but I am unable to get any logic working to only apply this if:

node['mongodb']['config']['mongod']['net']['ssl']['mode'] == 'requireSSL'

For the moment we have forked the cookbook and have set 'ssl: true' in providers/user.rb , but it would be good if the logic existed to be able to determine when this was required and connect using SSL as required.

I'm surprised more people aren't using SSL by the look of it?

@swalberg
Copy link
Contributor

swalberg commented Jul 3, 2018

Hi, thanks for the bug report. We don't use TLS so haven't run into it, but your solution seems reasonable.

@vibhaG
Copy link

vibhaG commented May 7, 2019

I need a similar fix @JJClements Can you point me to your fork?

@mike-sol
Copy link

+1 - Same situation here. I don't know if JJClements actually pushed up a fork, or if they're just maintaining it locally; I'm going to do the latter since it's a bit of a dirty fix.

@github-actions
Copy link

Marking stale due to inactivity. Remove stale label or comment or this will be closed in 7 days. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.

@github-actions github-actions bot added the Stale label Sep 30, 2020
@xorimabot xorimabot removed the Stale label Sep 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants