-
Notifications
You must be signed in to change notification settings - Fork 230
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
Add 3.6+ user authenticationRestrictions #229
Add 3.6+ user authenticationRestrictions #229
Conversation
Hi @timvaillancourt, I have one remark though. Could you please add some unit tests for using the It will be a nice addition when it is merged :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty comment, I have put a proper comment in the issue page. Github won't let me leave an empty one.
Whoops, sounds good @szank. I will add unit tests shortly |
@szank I've added a test for this. Please review, thanks EDIT: I made a few more commits to clean up the way I wrote the tests. 100% done this time |
Thanks @timvaillancourt ! |
This PR adds support for MongoDB user authenticationRestrictions, added in 3.6:
https://docs.mongodb.com/manual/reference/method/db.createUser/#authentication-restrictions
Example user with authenticationRestrictions, post-change:
If it's valuable I can add checks to confirm a valid IP or CIDR was passed as 'clientSource' or 'serverAddress', please let me know.