aws_apigateway_client_certificates resource
Use the aws_apigateway_client_certificates InSpec audit resource to test properties of multiple AWS API Gateway client certificates.
The AWS::ApiGateway::ClientCertificate resource creates a client certificate that API Gateway uses to configure client-side SSL authentication for sending requests to the integration endpoint.
For additional information, including details on parameters and properties, see the AWS documentation on AWS API Gateway client certificate..
Syntax
Ensure that the client certificate exists.
describe aws_apigateway_client_certificates do
it { should exist }
end
Parameters
This resource does not require any parameters.
Properties
client_certificate_ids- The identifier of the client certificate.
Field:
client_certificate_iddescriptions- The description of the client certificate.
Field:
descriptionpem_encoded_certificates- The PEM-encoded public key of the client certificate, which can be used to configure certificate authentication in the integration endpoint .
Field:
pem_encoded_certificatecreated_dates- The timestamp when the client certificate was created.
Field:
created_dateexpiration_dates- The timestamp when the client certificate will expire.
Field:
expiration_date- The collection of tags. Each tag element is associated with a given resource.
Field:
tags
Examples
Ensure a client certificate ID is available:
describe aws_apigateway_client_certificates do
its('client_certificate_ids') { should include 'CLIENT_CERTIFICATE_ID' }
end
Ensure a PEM encoded certificate is available:
describe aws_apigateway_client_certificates do
its('pem_encoded_certificates') { should include 'PEM_ENCODED_CERTIFICATE' }
end
Matchers
For a full list of available matchers, see our Universal Matchers page.This resource has the following special matchers.
exist
Use should to test that the entity exists.
describe aws_apigateway_client_certificates do
it { should exist }
end
Use should_not to test the entity does not exist.
describe aws_apigateway_client_certificates do
it { should_not exist }
end
AWS Permissions
Your AWS principal will need the APIGateway:Client:ClientCertificates action with Effect set to Allow.