MongoDB 서버는 동일한 TCP 포트에서 TLS/SSL 암호화 연결과 암호화되지 않은 연결 모두에 대한 수신을 지원합니다. 이를 통해 TLS/SSL 암호화 연결을 사용하도록 MongoDB 클러스터를 업그레이드할 수 있습니다.
참고
MongoDB TLS 1.2+를 사용할 수 있는 시스템에서 TLS 1.0 및 TLS 1.1 암호화 에 대한 지원 비활성화합니다.
절차(tls 설정 사용)
중요
TLS/SSL, PKI(공개 키 인프라) 인증서 및 인증 기관에 대한 전체 설명은 이 문서의 범위를 벗어납니다. 이 페이지는 유효한 인증서에 액세스할 수 있을 뿐만 아니라 TLS/SSL에 대한 사전 지식이 있다고 가정합니다.
TLS/SSL 암호화를 사용하지 않는 MongoDB 클러스터에서 오직 TLS/SSL 암호화만 사용하는 클러스터로 업그레이드하려면 다음 롤링 업그레이드 프로세스를 사용하세요.
참고
이 섹션의 절차에서는 tls 설정/옵션을 사용합니다. ssl 별칭을 사용하는 절차에 대한 자세한 내용은 절차(ssl 설정 사용)를 참조하세요.
MongoDB가 항상 TLS 1.0 이상을 지원해 왔기에 tls 설정/옵션은 ssl 옵션과 동일한 기능을 제공합니다.
For each node of a cluster, start the node with the command-line option
--tlsModeor the configuration file optionnet.tls.modeset toallowTLS. TheallowTLSsetting allows the node to accept both TLS/SSL and non-TLS/non-SSL incoming connections. Its connections to other servers do not use TLS/SSL. Include other TLS/SSL options [1] as well as any other options that are required for your specific configuration.참고
mongodmongos{ 2} 및 는 기본적으로 로컬 호스트에 바인딩됩니다. 배포 구성원이 다른 호스트에서 실행되거나 원격 클라이언트를 배포에 연결하려는 경우--bind_ip또는net.bindIp를 지정해야 합니다.예를 들면 다음과 같습니다.
mongod --replSet <name> --tlsMode allowTLS --tlsCertificateKeyFile <TLS/SSL certificate and key file> --tlsCAFile <path to root CA PEM file> <additional options>구성 파일 에 이러한 옵션을 지정하려면 파일 에 다음 설정을 포함합니다.
net: tls: mode: allowTLS certificateKeyFile: <path to TLS/SSL certificate and key PEM file> CAFile: <path to root CA PEM file>클러스터의 모든 노드를 이 설정으로 업그레이드합니다.
모든 클라이언트가 TLS/SSL을 사용하도록 전환합니다. 참조: TLS가 활성화된 복제본 세트에 연결
For each node of a cluster, use the
setParametercommand to update thetlsModetopreferTLS. [2] WithpreferTLSas itsnet.tls.mode, the node accepts both TLS/SSL and non-TLS/non-SSL incoming connections, and its connections to other servers use TLS/SSL. For example:db.adminCommand( { setParameter: 1, tlsMode: "preferTLS" } )클러스터의 모든 노드를 이 설정으로 업그레이드합니다.
이 시점에서 모든 연결은 TLS/SSL을 사용해야 합니다.
For each node of the cluster, use the
setParametercommand to update thetlsModetorequireTLS. [2] WithrequireTLSas itsnet.tls.mode, the node will reject any non-TLS/non-SSL connections. For example:db.adminCommand( { setParameter: 1, tlsMode: "requireTLS" } )모든 노드를 업그레이드한 후 적절한 TLS/SSL 설정으로 구성 파일을 편집하여 이후에 다시 시작할 때 클러스터에서 TLS/SSL을 사용하도록 합니다.
절차(ssl 설정 사용)
중요
TLS/SSL, PKI(공개 키 인프라) 인증서 및 인증 기관에 대한 전체 설명은 이 문서의 범위를 벗어납니다. 이 페이지는 유효한 인증서에 액세스할 수 있을 뿐만 아니라 TLS/SSL에 대한 사전 지식이 있다고 가정합니다.
TLS/SSL 암호화를 사용하지 않는 MongoDB 클러스터에서 오직 TLS/SSL 암호화만 사용하는 클러스터로 업그레이드하려면 다음 롤링 업그레이드 프로세스를 사용하세요.
참고
이 섹션의 절차에서는 ssl 설정/옵션을 사용합니다. tls 별칭을 사용하는 절차에 대해서는 TLS/SSL을 사용하도록 클러스터 업그레이드.를 참조하세요.
MongoDB가 항상 TLS 1.0 이상을 지원해 왔기에 tls 설정/옵션은 ssl 옵션과 동일한 기능을 제공합니다.
For each node of a cluster, start the node with the command-line option
--sslModeor the configuration file optionnet.ssl.modeset toallowSSL. TheallowSSLsetting allows the node to accept both TLS/SSL and non-TLS/non-SSL incoming connections. Its connections to other servers do not use TLS/SSL. Include other TLS/SSL options [1] as well as any other options that are required for your specific configuration.참고
mongodmongos{ 2} 및 는 기본적으로 로컬 호스트에 바인딩됩니다. 배포 구성원이 다른 호스트에서 실행되거나 원격 클라이언트를 배포에 연결하려는 경우--bind_ip또는net.bindIp를 지정해야 합니다.예를 들면 다음과 같습니다.
mongod --replSet <name> --sslMode allowSSL --sslPEMKeyFile <path to TLS/SSL Certificate and key PEM file> --sslCAFile <path to root CA PEM file> <additional options>구성 파일 에 이러한 옵션을 지정하려면 파일 에 다음 설정을 포함합니다.
net: ssl: mode: <allowSSL> PEMKeyFile: <path to TLS/SSL certificate and key PEM file> CAFile: <path to root CA PEM file>클러스터의 모든 노드를 이 설정으로 업그레이드합니다.
모든 클라이언트가 TLS/SSL을 사용하도록 전환합니다. 참조: TLS가 활성화된 복제본 세트에 연결
For each node of a cluster, use the
setParametercommand to update thesslModetopreferSSL. [2] WithpreferSSLas itsnet.ssl.mode, the node accepts both TLS/SSL and non-TLS/non-SSL incoming connections, and its connections to other servers use TLS/SSL. For example:db.adminCommand( { setParameter: 1, sslMode: "preferSSL" } )클러스터의 모든 노드를 이 설정으로 업그레이드합니다.
이 시점에서 모든 연결은 TLS/SSL을 사용해야 합니다.
For each node of the cluster, use the
setParametercommand to update thesslModetorequireSSL. [2] WithrequireSSLas itsnet.ssl.mode, the node rejects any non-TLS/non-SSL connections. For example:db.adminCommand( { setParameter: 1, sslMode: "requireSSL" } )모든 노드를 업그레이드한 후 적절한 TLS/SSL 설정으로 구성 파일을 편집하여 이후에 다시 시작할 때 클러스터에서 TLS/SSL을 사용하도록 합니다.
| [2] | (1, 2, 3, 4) As an alternative to using the setParameter command, you can also restart the nodes with the appropriate TLS/SSL options and values. |
| [1] | (1, 2) Windows 및 macOS용 시스템 SSL 인증서 저장소를 사용할 수 있습니다. 시스템 SSL 인증서 저장 를 사용하려면 다음을 사용합니다.
시스템 SSL 인증서 저장소를 사용할 때 온라인 인증서 상태 프로토콜(OCSP)을 사용해 인증서의 해지 상태를 확인할 수 있습니다. |