Skip to content

MongoDB auth related issue in MONGO_URI #1478

Description

@smeng9

Actual Behavior

MONGO_URI's username, password, and authSource in uri are not parsed correctly

https://github.com/pyeve/eve/blob/master/eve/io/mongo/flask_pymongo.py#L76

It uses dbname as authSource, but the authSource should be parsed from options https://pymongo.readthedocs.io/en/stable/api/pymongo/uri_parser.html#pymongo.uri_parser.parse_uri

See URI format https://www.mongodb.com/docs/manual/reference/connection-string/

Environment

  • Python version: 3.10
  • Eve version: 2.0

I am willing to open a PR to resolve the issue. Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions