MongoDbX509User

class aws_rfdk.MongoDbX509User(*, certificate, roles)

Bases: object

User added to the $external admin database.

Referencing: https://docs.mongodb.com/v3.6/core/security-x.509/#member-certificate-requirements

Parameters:
  • certificate (ISecret) – The certificate of the user that they will use for authentication. This must be a secret containing the plaintext string contents of the certificate in PEM format. For example, the cert property of {@link IX509CertificatePem } is compatible with this. Some important notes: 1. MongoDB requires that this username differ from the MongoDB server certificate in at least one of: Organization (O), Organizational Unit (OU), or Domain Component (DC). See: https://docs.mongodb.com/manual/tutorial/configure-x509-client-authentication/ 2. The client certificate must be signed by the same Certificate Authority (CA) as the server certificate that is being used by the MongoDB application.

  • roles (str) – JSON-encoded string with the roles this user should be given.

Attributes

certificate

The certificate of the user that they will use for authentication.

This must be a secret containing the plaintext string contents of the certificate in PEM format. For example, the cert property of {@link IX509CertificatePem } is compatible with this.

Some important notes:

  1. MongoDB requires that this username differ from the MongoDB server certificate in at least one of: Organization (O), Organizational Unit (OU), or Domain Component (DC). See: https://docs.mongodb.com/manual/tutorial/configure-x509-client-authentication/

  2. The client certificate must be signed by the same Certificate Authority (CA) as the server certificate that is being used by the MongoDB application.

roles

JSON-encoded string with the roles this user should be given.