Resource
Certificate
Resource representing an X.509 certificate. Resource Patterns:dataProviders/{data_provider}/certificates/{certificate}duchies/{duchy}/certificates/{certificate}measurementConsumers/{measurement_consumer}/certificates/{certificate}modelProviders/{model_provider}/certificates/{certificate}
Resource name.The resource ID alias “preferred” may be used in place of the certificate ID to refer to the preferred Certificate.Examples:
measurementConsumers/mc-123/certificates/cert-456dataProviders/dp-789/certificates/preferred
X.509 certificate in DER format. Required. Immutable.
RFC 5280 revocation state of the certificate reported by an API caller.If specified, it means that the certificate is not currently valid. Output-only.Possible values:
This is not guaranteed to reflect the actual revocation state determined by the issuing certificate authority.
REVOCATION_STATE_UNSPECIFIED- Default valueHOLD- Certificate is on hold and therefore invalid, possibly temporarilyREVOKED- Certificate has been revoked (terminal state)
X.509 v3 subject key identifier. Output-only.
Methods
GetCertificate
Returns the Certificate with the specified resource name.Resource name of the Certificate.Format:
{parent}/certificates/{certificate}The certificate ID can be “preferred” to get the preferred certificate.The Certificate resource.
Example Request
Error Conditions
NOT_FOUND- Certificate not foundINVALID_ARGUMENT- Invalid resource name format
CreateCertificate
Creates (adds) a Certificate.Name of the parent resource.Can be one of:
dataProviders/{data_provider}duchies/{duchy}measurementConsumers/{measurement_consumer}modelProviders/{model_provider}
The Certificate to create.The
name field will be ignored, and the system will assign an ID.The created Certificate resource.
Example Request
Example Response
Error Conditions
INVALID_ARGUMENT- Invalid certificate data or malformed X.509NOT_FOUND- Parent resource not foundPERMISSION_DENIED- Caller lacks permission to create certificates for parent
ListCertificates
Lists Certificate resources.Name of the parent resource.Format: One of the parent resource patterns listed above.
The maximum number of resources to return.The service may return fewer than this value. If unspecified, at most 50 resources will be returned. The maximum value is 1000; values above the maximum will be coerced to the maximum.
A page token, received from a previous call.When paginating, all other request parameters must match those of the call that provided the page token.
Filter criteria for this request.Repeated fields are treated as logical ORs, and multiple fields specified as logical ANDs.
List of Certificate resources.
A token, which can be sent as
page_token to retrieve the next page.If this field is omitted, there are no subsequent pages.Example Request
Example Response
Filtering by Subject Key Identifier
RevokeCertificate
Revokes a Certificate by setting its revocation state.Resource name of the Certificate.Format:
{parent}/certificates/{certificate}Revocation state to set.Valid values:
HOLD- Place certificate on hold (temporarily invalid)REVOKED- Permanently revoke the certificate
The updated Certificate resource with revocation state set.
Example Request
Error Conditions
NOT_FOUND- Certificate not foundINVALID_ARGUMENT- Invalid revocation statePERMISSION_DENIED- Caller lacks permission to revoke the certificateFAILED_PRECONDITION- Certificate already in terminal revocation state
ReleaseCertificateHold
Releases a Certificate with a revocation state ofHOLD by clearing its revocation state.
Resource name of the Certificate.Format:
{parent}/certificates/{certificate}The updated Certificate resource with revocation state cleared.
Example Request
Error Conditions
NOT_FOUND- Certificate not foundFAILED_PRECONDITION- Certificate is not in HOLD statePERMISSION_DENIED- Caller lacks permission to release the certificate
Usage Patterns
Creating and Managing Certificates
- Create a certificate:
- Get the preferred certificate:
- List all certificates for a parent:
Certificate Revocation Workflow
- Temporarily suspend a certificate:
- Release the hold if issue resolved:
- Permanently revoke if compromised:
Filtering Certificates
Find certificates by subject key identifier:Revocation States
Certificates can have the following revocation states:| State | Description | Reversible |
|---|---|---|
REVOCATION_STATE_UNSPECIFIED | No revocation (valid) | N/A |
HOLD | Temporarily suspended | Yes, via ReleaseCertificateHold |
REVOKED | Permanently revoked | No (terminal state) |
The revocation state is reported by API callers and may not reflect the actual state determined by the certificate authority.
Best Practices
- Use the “preferred” alias to always get the current active certificate
- Store certificates in DER format before uploading
- Use
HOLDstate for temporary suspensions during investigation - Use
REVOKEDstate only when permanently retiring a certificate - Monitor certificate expiration dates outside the API
- Maintain multiple certificates and rotate them before expiration
