Join us Sept 17 at .local NYC! Use code WEB50 to save 50% on tickets. Learn more >
MongoDB Event
Menu Docs
Página inicial do Docs
/
Operador de Kubernetes empresarial
/

Habilitar autenticação

O Kubernetes Operator suporta autenticação de usuário X.509, LDAP e SCRAM .

Observação

You must create an additional CustomResourceDefinition for your MongoDB users and the MongoDB Agent instances. The Kubernetes Operator generates and distributes the certificate.

See the full X.509 certificates configuration examples in the x509 Authentication directory in the Authentication samples directory. This directory also contains sample LDAP and SCRAM configurations.

1apiVersion: mongodb.com/v1
2kind: MongoDB
3metadata:
4 name: my-tls-enabled-rs
5spec:
6 type: ReplicaSet
7 members: 3
8 version: "4.0.4-ent"
9 opsManager:
10 configMapRef:
11 name: my-configmap-name
12 credentials: my-credentials
13 security:
14 tls:
15 enabled: true
16 authentication:
17 enabled: true
18 modes: ["X509"]
19 internalCluster: "X509"
1apiVersion: mongodb.com/v1
2kind: MongoDBUser
3metadata:
4 name: user-with-roles
5spec:
6 username: "CN=mms-user-1,OU=cloud,O=MongoDB,L=New York,ST=New York,C=US"
7 db: "$external"
8 mongodbResourceRef:
9 name: my-resource
10 roles:
11 - db: "admin"
12 name: "clusterAdmin"

Dica

Voltar

Configurar criptografia em descanso

Nesta página