Operations: Server: How to Put a Client Certificate

You can register an existing client certificate using PutClientCertificateOperation.

Syntax

public PutClientCertificateOperation(
    string name, 
    X509Certificate2 certificate, 
    Dictionary<string, DatabaseAccess> permissions, 
    SecurityClearance clearance)

public enum SecurityClearance
{
    ClusterAdmin,
    ClusterNode,
    Operator,
    ValidUser
}

public enum DatabaseAccess
{
    Read,
    ReadWrite,
    Admin
}
Parameters
name string Name of a certificate
certificate X509Certificate2 Certificate to register
permissions Dictionary<string, DatabaseAccess> Dictionary mapping databases to access level
clearance SecurityClearance Access level

Example

X509Certificate2 certificate = new X509Certificate2("c:\\path_to_pfx_file");
store.Maintenance.Server.Send(
    new PutClientCertificateOperation(
        "cert1", certificate, null, SecurityClearance.ClusterAdmin));