CrafterCMS:通过SSL连接到MongoDB for Profile / Social

时间:2017-05-24 20:53:12

标签: crafter-cms

如何配置Crafter Social和Profile以通过SSL连接到MongoDB?

在命令行上我使用:

UTC+xx:xx

1 个答案:

答案 0 :(得分:1)

对于Social和Profile,我们支持Mongodb Connection URI配置详细信息:https://docs.mongodb.com/manual/reference/connection-string/

要构建X509网址,您需要在您的网址ssl=true&?authMechanism=MONGODB-X509中使用此参数,请注意用户名应为x.509证书派生的用户名,例如" CN = user,OU = OrgUnit,O = myOrg

Profile / Social中使用的内部MongoClient是使用此类构建的:http://api.mongodb.com/java/current/com/mongodb/MongoClientURI.html将创建内部所需的MongoCredential.createMongoX509Credential(user);

以下是一些可能对您有帮助的网址

http://mongodb.github.io/mongo-java-driver/3.0/driver/reference/connecting/authenticating/#x-509

https://www.ibm.com/support/knowledgecenter/SSB23S_1.1.0.13/gtpd5/tmdbssljava.html

https://github.com/mongodb/mongo-java-driver/blob/3770623f7051634daa978c265a3b03fe04fee913/docs/reference/content/driver/tutorials/authentication.md#x509

https://docs.mongodb.com/manual/tutorial/configure-x509-client-authentication/#add-x-509-certificate-subject-as-a-user