Installation and usage of the platform

gRPC: retrieving certificates

To request a certificate from a node certificate store use the PkiPublicService service methods. The methods are described in the pki_public_service.proto file.

Note

PkiPublicService methods cannot be used in the opensource version of the platform.

With these methods you can retrieve a certificate by different fields:

In the request, these methods take the value of the corresponding certificate field and, optionally, the plainText parameter, which determines the format of the response.

If the certificate exists, the node returns the certificate in DER format (as it is recorded in the node certificate store) in the response of each of these methods. If the plainText parameter in the method request is set to true, then the certificate is returned in plainText format.

If no such certificate exists, then each of these methods returns an error.

Note

The same data as the gRPC PkiPublicService methods return, can be retrieved using the REST methods of the /pki/certificate group.

Authorization of methods for obtaining certificates

In case of API-KEY, authorization is not required.

In case of OAuth2 authorization, the user role in JWT token is required.

Retrieving a certificate by its DN

The GetCertificateByDn(CertByDNRequest) method returns the certificate by its distinguished name stored in the DN field.

Note

The same data as the GetCertificateByDn(CertByDNRequest) gRPC method returns, can be retrieved using the GET /pki/certificate/by-dn/%percent-encoded-DN% REST method.

Retrieving a certificate by its DN hash

The GetCertificateByDnHash(CertByDNHashRequest) method returns the certificate by SHA-1 hash (Keccak) from the DN certificate field.

Note

The same data as the GetCertificateByDnHash(CertByDNHashRequest) gRPC method returns, can be retrieved using the GET /pki/certificate/by-dn-hash/%DN-hash-string% REST method.

Retrieving a certificate by its public key

The GetCertificateByPublicKey(CertByPublicKeyRequest) method returns the certificate by its public key stored in the publicKey field.

Note

The same data as the GetCertificateByPublicKey(CertByPublicKeyRequest) gRPC method returns, can be retrieved using the GET /pki/certificate/by-public-key/%public-key-base58% REST method.

Retrieving a certificate by its fingerprint

The GetCertificateByFingerprint(CertByFingerprintRequest) method returns the certificate by its SHA-1 fingerprint stored in its fingerprint field.

Note

The same data as the GetCertificateByFingerprint(CertByFingerprintRequest) gRPC method returns, can be retrieved using the GET /pki/certificate/by-fingerprint/%fingerprint-base64% REST method.

See also