cisco IOS XE 17.16.x — Install RPC

• Install: Installs a certificate. All certificates are uniquely identified by a certificate ID. The certificate ID is a string. • Rotate: Rotates an existing certificate. • RevokeCertificates: Revokes one or more certificates. • GetCertificates: Queries all certificates. • CanGenerateCSR: Queries whether the device can generate a Certificate Signing Request (CSR). Trustpoints and certificates created through the RPCs mentioned above persist across switchovers and device reboots. The following is a sample Certificate Management Service definition:

service CertificateManagement { rpc Install(stream InstallCertificateRequest) returns (stream InstallCertificateResponse); rpc Rotate(stream RotateCertificateRequest) returns (stream RotateCertificateResponse); rpc RevokeCertificates(RevokeCertificateRequest) returns (RevokeCertificateResponse); rpc GetCertificates(GetCertificateRequest) returns (GetCertificateResponse); returns (CanGenerateCSRResponse); } rpc CanGenerateCSR(CanGenerateCSRRequest) Install RPC The Install RPC adds a new certificate to a device by creating a new CSR request. The new certificate is associated with a new certificate ID on the device.

If the device has a pre-existing certificate with the given certificate ID, the operation fails. The Install RPC is a bidirectional streaming RPC. It has an input (InstallCertificateRequest) and an output (IntsallCertificateResponse) both of which are streaming. If the stream is broken, or any steps in the process fail, the device rolls back the changes. The following is an example of the Install RPC definition and messages: rpc Install(stream InstallCertificateRequest) returns (stream InstallCertificateResponse); // Request messages to install new certificates on the target. message InstallCertificateRequest { // Request Messages.

oneof install_request { GenerateCSRRequest generate_csr = 1; LoadCertificateRequest load_certificate = 2; } } // Request to generate the CSR. message GenerateCSRRequest { // Parameters for creating a CSR. Model-Driven Programmability Install RPC Programmability Configuration Guide, Cisco IOS XE 17.16.x 276