Operations: Server: How to Put a Client Certificate

You can register an existing client certificate using PutClientCertificateOperation.

Usage

const putOperation = new PutClientCertificateOperation([name], [certificate], [permissions], [clearance]);

SecurityClearance options:

  • UnauthenticatedClients
  • ClusterAdmin
  • ClusterNode
  • Operator
  • ValidUser

DatabaseAccess options:

  • ReadWrite
  • Admin
Parameters
name string Name of a certificate
certificate string Certificate to register
permissions Record<string, DatabaseAccess> Dictionary mapping databases to access level
clearance SecurityClearance Access level

Example

const putOperation = new PutClientCertificateOperation("cert1", publicKey, {}, "ClusterAdmin");
await store.maintenance.server.send(putOperation);