Skip to main content

aws_apigateway_client_certificate Resource

Use the aws_apigateway_client_certificate InSpec audit resource to test properties of a single specific AWS API Gateway client certificate.

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

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_certificate(client_certificate_id: 'CLIENT_CERTIFICATE_ID') do
  it { should exist }
end

Parameters

client_certificate_id (required)

The identifier of the client certificate.

Properties

client_certificate_id
The identifier of the client certificate.
description
The description of the client certificate.
pem_encoded_certificate
The PEM-encoded public key of the client certificate, which can be used to configure certificate authentication in the integration endpoint .
created_date
The timestamp when the client certificate was created.
expiration_date
The timestamp when the client certificate will expire.
tags
The collection of tags. Each tag element is associated with a given resource.

Examples

Ensure a client certificate id is available.

describe aws_apigateway_client_certificate(client_certificate_id: 'CLIENT_CERTIFICATE_ID') do
  its('client_certificate_id') { should eq 'CLIENT_CERTIFICATE_ID' }
end

Ensure a pem encoded certificate is available.

describe aws_apigateway_client_certificate(client_certificate_id: 'CLIENT_CERTIFICATE_ID') do
    its('pem_encoded_certificate') { should eq '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_certificate(client_certificate_id: 'CLIENT_CERTIFICATE_ID') do
  it { should exist }
end

Use should_not to test the entity does not exist.

describe aws_apigateway_client_certificate(client_certificate_id: 'CLIENT_CERTIFICATE_ID') do
  it { should_not exist }
end

be_available

Use should to check if the entity is available.

describe aws_apigateway_client_certificate(client_certificate_id: 'CLIENT_CERTIFICATE_ID') do
  it { should be_available }
end

AWS Permissions

Your Principal will need the APIGateway:Client:ClientCertificate action with Effect set to Allow.

Edit this page on GitHub

Thank you for your feedback!

×









Search Results