MongoDB Second article ~ about cluster authentication that's something

Source: Internet
Author: User
Tags base64 chmod

Cluster authentication
Introduction: We introduced the single strength of the certification method, just I am engaged in Lepus monitoring, replica collection requires user authentication
A verification method:
1 Auth mode start = "Single point"
2 keyfile Mode start = "Cluster"
Please note that account opening keyfile default account auth
Two Create keyfile files
1 Creating requirements
1. Content base64 encoding set [A-Z-a-+/]
2. Length 1000bytes
3. Permission at least chmod keyfile
2 How to create
OpenSSL rand-base64 102 >. KeyFile
chmod 600. KeyFile (must be 600 permissions, please note)
Three Create Super Admin users
Db.createuser ({
User: "Root",
PWD: "123456",
Roles: [{role: ' Root ', db: ' admin '}]
});
Purpose: In order to create a user
Four modifications
1 shut down from mongo-> and then close the main MONGO
2 Add keyfile=/data/mongo/shard2/in the configuration startup item. KeyFile (Modify all nodes)
3 copy keyfile to all nodes
4 Start the main mongo-> boot from MONGO
Five verification
mongo-uroot-p123456 Admin--port=27015,
Login successful, Representative complete
This is my understanding of MONGO cluster user authentication

MongoDB Second article ~ about cluster authentication that's something

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.