Skip to main content

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..

Install

This resource is available in the Chef InSpec AWS resource pack.

For information on configuring your AWS environment for Chef InSpec and creating an InSpec profile that uses the InSpec AWS resource pack, see the Chef InSpec documentation on the AWS cloud platform.

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_id

descriptions
The description of the client certificate.

Field: description

pem_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_certificate

created_dates
The timestamp when the client certificate was created.

Field: created_date

expiration_dates
The timestamp when the client certificate will expire.

Field: expiration_date

tags
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 Principal will need the APIGateway:Client:ClientCertificates action with Effect set to Allow.

Edit this page on GitHub

Thank you for your feedback!

×









Search Results