AI 에이전트의 경우: 문서 인덱스는 https://www.mongodb.com/ko-kr/docs/llms.txt에서 사용할 수 있으며, 모든 페이지의 마크다운 버전은 어떤 URL 경로에 .md를 추가하여 사용할 수 있습니다.
Docs Menu

LDAP를 사용한 보안 클라이언트 인증

MongoDB Enterprise 는 다음을 지원합니다.

  • 인증 요청을 LDAP(Lightweight Directory Access Protocol) 서비스로 프록시합니다.

  • LDAP 서버에 대한 단순 및 SASL 바인딩. MongoDB Enterprise는 saslauthd 또는 운영 체제 라이브러리를 통해 LDAP 서버에 바인딩할 수 있습니다.

자세한 내용은 MongoDB Server 설명서의 LDAP 프록시 인증LDAP 권한 부여 섹션을 참조하세요.

Kubernetes Operator를 사용하여 다중 Kubernetes cluster MongoDB deployment에 연결하는 클라이언트 애플리케이션을 인증하도록 LDAP 를 구성할 수 있습니다. 이 가이드에서는 클라이언트 애플리케이션에서 다중 Kubernetes 클러스터 MongoDB 배포로 LDAP 인증을 구성하는 방법을 설명합니다.

  • To configure LDAP in CustomResourceDefinitions, use the parameters under the spec.security.authentication.ldap and other security LDAP settings specific to the MongoDB Agent, from the Kubernetes Operator MongoDB resource specification. The procedures in this section describe the required settings and provide examples of LDAP configuration.

  • To improve security, consider deploying a TLS-encrypted multi-cluster. Encryption with TLS is optional. By default, LDAP traffic is sent as plain text. This means that username and password are exposed to network threats. Many modern directory services, such as Microsoft Active Directory, require encrypted connections. Consider using LDAP over TLS to encrypt authentication requests in your Kubernetes Operator MongoDB deployments.

TLS 암호화 를 사용하여 멀티 Kubernetes 클러스터 MongoDB deployment 를 보호하기 전에 다음 작업을 완료하세요.

1

Kubernetes 연산자MongoDBMultiCluster 리소스 사양 의 보안 설정으로 MongoDBMultiCluster 사용자 지정 리소스를 업데이트합니다 .

배포에서 LDAP 를 활성화하려면 Kubernetes 객체에서 다음 설정을 구성합니다.

유형 및 필요성
설명
예시

불리언,
필수

LDAP 인증을 사용하려면 true 로 설정합니다.

true

string,
필수

LDAP 서버에 연결할 때 MongoDB가 바인딩할 LDAP 고유 이름을 지정합니다.

cn=admin,dc=example,dc=org

string,
필수

LDAP 서버 에 연결할 때 MongoDB 바인딩하는 LDAP 바인딩 고유 이름의 비밀번호가 포함된 시크릿 의 이름을 지정합니다.

<secret-name>

string,
선택 사항

ConfigMap 추가 배포의 TLS 인증서에 서명하는 데 사용한 사용자 지정 CA 를 저장하는 의 이름입니다.

<configmap-name>

string,
선택 사항

LDAP 서버의 TLS 인증서의 유효성을 검사하는 CA 를 저장하는 필드 이름을 추가합니다.

<configmap-key>

문자열 배열,
필수

하나 이상의 LDAP 서버의 hostname:port 조합 목록을 지정합니다. 각 서버에 대해 별도의 줄을 사용합니다.

<example.com:636>

string,
선택 사항

LDAPS( TLS 를 통한 LDAP )를 사용하려면 tls 로 설정합니다. LDAP 서버가 TLS를 허용하지 않는 경우 비워 둡니다. 이 설정을 사용하려면 데이터베이스 리소스를 배포할 때 TLS를 사용하도록 설정해야 합니다.

tls

string,
필수

Specify the mapping that maps the username provided to mongod or mongos for authentication to an LDAP Distinguished Name (DN).

자세히 알아보려면 security.ldap.userToDNMapping 을 참조하세요. 및 LDAP 쿼리 템플릿 은 MongoDB Server 문서에서 확인할 수 있습니다.

<match: "(.+)",substitution: "uid={0},ou=groups,dc=example,dc=org">

string,
필수

LDAP를 통해 인증을 사용하려면 LDAP 로 설정합니다.

LDAP

결과 구성은 다음 예시와 유사할 수 있습니다.

security:
authentication:
enabled: true
# Enabled LDAP Authentication Mode
modes:
- "LDAP"
- "SCRAM"
# LDAP related configuration
ldap:
# Specify the hostname:port combination of one or
# more LDAP servers
servers:
- "ldap1.example.com:636"
- "ldap2.example.com:636"
# Set to "tls" to use LDAP over TLS. Leave blank if
# the LDAP server doesn't accept TLS. You must enable TLS when
# you deploy the multi-cluster resource to use this setting.
transportSecurity: "tls"
# If TLS is enabled, add a reference to a ConfigMap that
# contains a CA certificate that validates the LDAP server's
# TLS certificate.
caConfigMapRef:
name: "<configmap-name>"
key: "<configmap-entry-key>"
# Specify the LDAP Distinguished Name to which
# MongoDB binds when connecting to the LDAP server
bindQueryUser: "cn=admin,dc=example,dc=org"
# Specify the password with which MongoDB binds
# when connecting to an LDAP server. This is a
# reference to a Secret Kubernetes Object containing
# one "password" key.
bindQueryPasswordSecretRef:
name: "<secret-name>"

LDAP 설정의 전체 목록은 Kubernetes 연산자 MongoDBMultiCluster 리소스 사양 의 보안 설정을 참조하세요. LDAP 지원 Kubernetes 연산자 배포에서 MongoDB Agent 사용자에 대한 spec.security.authentication.agents.automationUserName 설정도 참조하세요.

2
  1. 멤버 cluster의 경우 다음 명령을 실행하여 MongoDB 파드가 실행 중 상태인지 확인합니다.

    kubectl get pods \
    --context=$MDB_CLUSTER_1_FULL_NAME \
    --namespace mongodb
    kubectl get pods \
    --context=$MDB_CLUSTER_2_FULL_NAME \
    --namespace mongodb
    kubectl get pods \
    --context=$MDB_CLUSTER_3_FULL_NAME \
    --namespace mongodb
  2. 연산자 클러스터 에서 다음 명령을 실행 MongoDBMultiCluster 리소스 실행 상태 인지 확인합니다.

    kubectl --context=$MDB_CENTRAL_CLUSTER_FULL_NAME \
    --namespace mongodb \
    get mdbmc multi-replica-set -o yaml -w