Description
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)