Language
C# Java
Article For
5.3

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]);

export type SecurityClearance =
    "UnauthenticatedClients"
    | "ClusterAdmin"
    | "ClusterNode"
    | "Operator"
    | "ValidUser";

export type DatabaseAccess =
    "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);