Obtain server certificates to enable TLS encryption for your self-managed MongoDB replica set deployments.
중요
These steps apply to self-managed MongoDB deployments. MongoDB Atlas clusters use TLS by default. If you use Cloud Manager or Ops Manager, configure TLS through your deployment management tool.
시작하기 전에
시작하기 전에 다음 정보 및 리소스가 있는지 확인하세요.
TLS로 보안하려는 자체 관리형 MongoDB 복제본 세트 배포가 있습니다.
나중 튜토리얼에서 TLS 연결을 확인하려면 배포서버에 최소 하나의 관리자 노드가 활성화되어 있어야 합니다. X.509 클라이언트 인증을 활성화하려면 관리자 사용자는
$external데이터베이스에서 사용자를 만들고 수정하는 데 최소한userAdmin역할을 가져야 합니다.You have a hostname for each node in your deployment, such as
mongo0.example.com,mongo1.example.com, andmongo2.example.com. If you are using a public CA, you must have a registered domain name that corresponds to these hostnames.You have OpenSSL installed on your machine.
If you are planning on using a public CA, such as Let's Encrypt or DigiCert, you know which public CA you are using. If you are planning on using a private CA, you have access to your organization's PKI information. The process for obtaining certificates might be different based on the CA you use. However, you must end with the same
.pemfiles described in the final result section of this tutorial.원하는 명령줄 인터페이스가 열려 있습니다.
You know your deployment TLS configuration requirements and whether your certificates need
clientAuthEKU based on the TLS Planning page.
단계
이 튜토리얼에서는 배포서버의 첫 노드에 대한 mongo0.pem 라는 이름의 인증서를 하나 만듭니다. 추가 노드에 대한 인증서를 생성할 때 파일 이름을 구체적으로 지정합니다. 예를 들어 첫 번째 세컨더리 노드의 인증서 이름을 mongo1.pem로 지정합니다.
최종 결과
이 튜토리얼의 마지막에는 /etc/ssl/mongodb에 다음 .pem 파일이 있습니다.
각 노드에는
mongo0.pem,mongo1.pem,mongo2.pem등 해당 노드의 인증서 및 개인 키가 포함된.pem파일이 있습니다.배포서버 전체에 대해
ca.pem와 같이 각 노드에 대한 인증서를 발급한 중간 CA 인증서가 있습니다.
다음 단계
자체 관리형 MongoDB 배포에 대한 TLS 구성 방법을 학습하려면 다음 튜토리얼인 자체 관리형 배포에 대한 TLS 구성으로 이동하세요.