Skip to content

mongo:mongo-client namespace does not support usernames with a comma [DATAMONGO-1257] #2175

Closed
@spring-projects-issues

Description

@spring-projects-issues

John Mark opened DATAMONGO-1257 and commented

When using a mongo database with X-509 authentication, the username of the user is the subject DN from the X-509 certificate (see http://docs.mongodb.org/manual/tutorial/configure-x509-client-authentication/). The subject DN usually contains commas in it. This causes problems with trying to setup the mongo client using the mongo:mongo-client namespace with xml configuration since it expects credentials to be a comma separated list of usernames and splits on comma (,)

Another problem is that the credential is expected to be in username:password@database format, but when using X-509 authentication there is no password.

A third issue that I noticed was that there seems to be a bug in
org.springframework.data.mongodb.config.MongoCredentialPropertyEditor since when it checks for the presence of : and @ in the property, it does so on the original property, not the split string, which can cause NPEs if the colon or @ exists in the property but not on each split


Affects: 1.7.1 (Fowler SR1)

Referenced from: pull request #310

Backported to: 1.7.2 (Fowler SR2)

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions