Skip to content

MongoDB URI property doesn't interact well with Spring Cloud Vault #17215

@elFarto

Description

@elFarto

When using Spring Cloud Vault to generate credentials for a MongoDB instance, it's impossible to use the spring.data.mongodb.uri property, as setting that causes the username/password fields to be ignored.

This can normally be worked around by just specifying the host/port/database/etc, but that's not as nice, and still doesn't let you specify a different protocol, such as 'mongodb+srv', which is very useful when deploying under Kubernetes.

What would be nice is to have the username/password (if specified), injected into the uri.

The mongodb driver the 2.1 branch is using doesn't actually support mongodb+srv, but the 2.2 branch does.

I don't see an alternative way to specify the protocol, but I could be missing something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: declinedA suggestion or change that we don't feel we should currently apply

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions