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

Mongo documentation & auth improvements #2422

Merged
merged 7 commits into from
Apr 14, 2020
Merged

Conversation

WebFreak001
Copy link
Contributor

@WebFreak001 WebFreak001 commented Mar 18, 2020

Functionality-wise this changes a few little things:

  • fixes mongodb unittest (distinct giving different order now)
  • add tls as alias for the ssl parameter in parsing mongodb urls
  • adds authenticatePassword and authenticateSSL methods to avoid issues with wrong usage of field members
  • makes makeDigest pure to avoid calling it as member, expecting stuff to happen
  • x509 authentication requires a username or forces it to be omitted completely if missing on certain driver specifications
  • authentication mechanism generation now follows these strict rules:
    • (if set to none) if a certificate file is given & server is >= 2.6, use X509 authentication
    • (if set to none) otherwise if a digest is given, check server version
      • server version >= 3.0: use SCRAM-SHA-1
      • otherwise use MONGODB-CR
    • if the selected authentication mechanism isn't supported by the MongoDB server version now, throw a MongoAuthException

Otherwise fixes some documentation typos and adds a lot of documentation to the existing MongoClientSettings fields that were previously all undocumented. (which you need to set for the connectMongoDB call overload taking a settings object)

Copy link
Contributor Author

@WebFreak001 WebFreak001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

working on partly redoing the authentication flow (and adding more exceptions for invalid configurations) done

mongodb/vibe/db/mongo/connection.d Show resolved Hide resolved
@WebFreak001 WebFreak001 changed the title Mongo documentation improvements Mongo documentation & auth improvements Mar 18, 2020
@WebFreak001
Copy link
Contributor Author

bump @s-ludwig

@s-ludwig s-ludwig merged commit e30eaca into vibe-d:master Apr 14, 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

Successfully merging this pull request may close these issues.

2 participants