Skip to content

MongoDB State Store: Add support for Atlas and similar connection mechanisms #1609

Description

@ravi-k4

Expected Behavior

Dapr sidecar logs show authentication errors because of Mongo state store component is not authorized when the MongoDB Atlas service is used.

Atlas connection URI format is mongodb+srv://<username>:<password>@cluster0.xxx.mongodb.net/myFirstDatabase?retryWrites=true&w=majority but none of the existing URI format will create it.

Workaround -
I have added username and password to "server" and database in params to make it work for now.

I expect on configuring the server, username, password in the component manifest file of mongo spec, the right URI is created matching the Atlas format.

Require a new URI format mongodb+srv://%s:%s@%s/%s%s

https://github.com/dapr/components-contrib/blob/master/state/mongodb/mongodb.go#L66

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions