Review certificate validation in Ansible API Gateway management

Keep server certificate validation enabled when connecting to AWS management APIs.

Description

validate_certs controls whether Ansible verifies the AWS management API’s server certificate. It defaults to true. Caller-facing HTTPS and the certificate API Gateway presents to a backend are configured separately.

Potential impact

If verification is off, someone impersonating the AWS endpoint could read sensitive data in Ansible’s management requests or send false responses to Ansible.

Remediation

Keep validate_certs: true. For certificate errors, check the endpoint address and certificate chain. If you need a private trusted CA, supply its bundle using aws_ca_bundle in a module that supports it.

Examples

The excerpts use the older aws_api_gateway name. Use the module name supported by your installed collection and supply the actual api_id and my_api.yml.

Before

yaml
- name: update API
  aws_api_gateway:
    api_id: abc123321cba
    state: present
    swagger_file: my_api.yml
    validate_certs: no

validate_certs: no disables Ansible’s verification of the AWS server certificate.

After

yaml
- name: update API
  aws_api_gateway:
    api_id: abc123321cba
    state: present
    swagger_file: my_api.yml
    validate_certs: yes

With validate_certs: yes, the certificate chain for the management endpoint must be trusted.

References