> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/aws-api-gateway-endpoints-without-client-certificate-authentication.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# AWS API Gateway endpoints without client certificate authentication

### Synopsis

| Field               | Value                                                               |
| ------------------- | ------------------------------------------------------------------- |
| Rule Type           | Detection                                                           |
| Finding Type        | AWS API Gateway endpoints without client certificate authentication |
| Finding ID          | 60000118                                                            |
| Generates a Finding | This detection rule also generates a finding                        |
| Severity            | Medium                                                              |
| Category            | CONFIGURATION                                                       |
| Cloud Providers     | AWS                                                                 |
| Platform Module     | CSPM                                                                |
| Asset Types         | AMAZON\_API\_GATEWAY\_REST\_API\_STAGE                              |
| ATT\&CK Tactic      | TA0006 (TA0006)                                                     |
| ATT\&CK Technique   | T1552 (T1552)                                                       |

### Description

AWS API Gateway endpoints lacking client certificate authentication enable unauthorized access to backend systems. This misconfiguration exposes sensitive data and functionalities to malicious actors.

API Gateway's client certificate authentication feature leverages SSL certificates to verify requests originate from the gateway itself. Bypassing this security measure allows untrusted entities to directly access backend APIs without proper authorization, potentially leading to data breaches, unauthorized modifications, or denial-of-service attacks.

The impact of this misconfiguration is severe, ranging from data exfiltration and service disruption to complete system compromise. Implementing client certificate authentication ensures only authorized requests from API Gateway reach backend systems, significantly enhancing security posture and mitigating the risk of unauthorized access.

To mitigate this risk, enforce client certificate authentication on all API Gateway endpoints. Configure API Gateway to generate and use an SSL certificate for client authentication. Ensure that backend systems are configured to accept and validate these certificates. Regularly review and update API Gateway configurations to maintain this critical security control.

Note: Some backend servers may not support SSL client authentication as API Gateway does and could return an SSL certificate error. For a list of incompatible backend servers, see Known Issues. <https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-known-issues.html>

### Remediation

**Manual steps:**

Amazon API Gateway REST API Stage - This finding indicates that your AWS API Gateway endpoints are not configured to use client certificate authentication. This means that any client can access your API Gateway endpoints, potentially exposing sensitive data or allowing unauthorized access:

To remediate this issue, you need to configure your API Gateway endpoints to use client certificate authentication. This involves generating a client certificate and configuring your API Gateway to use it. Follow these steps:

1. **Generate a Client Certificate:**

   Log in to the AWS Console.

   Navigate to the API Gateway console.

   In the left navigation pane, choose **Client Certificates**.

   From the Client Certificates pane, choose **Generate Client Certificate**.

   Optionally, for **Edit**, choose to add a descriptive title for the generated certificate and choose **Save** to save the description. API Gateway generates a new certificate and returns the new certificate GUID, along with the PEM-encoded public key.
2. **Configure an API to Use SSL Certificates:**

Log in to the AWS Console.

Navigate to the API Gateway console.

Create or open an API for which you want to use the client certificate. Make sure the API has been deployed to a stage.

In the left navigation pane, choose **Stages** under the selected API and then choose a stage.

In the Stage Editor panel, select the certificate under the **Client Certificate** section.

Click **Save Changes**.

**Note:** Carefully review and test these steps before implementing them in your production environment. Incorrect configuration can disrupt your API Gateway functionality. Refer to the AWS documentation for more information on client certificate authentication: <https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-known-issues.html>

**CLI code:**

Amazon API Gateway REST API Stage - This command updates the specified stage of the API Gateway REST API to use the provided client certificate ID for SSL client authentication. It adds the clientCertificateId to the stage configuration, ensuring that only requests originating from API Gateway are accepted:

```bash
aws apigateway update-stage --rest-api-id ${entity} --stage-name ${entity} --patch-operations '[{"op": "replace", "path": "/clientCertificateId", "value": "<clientCertificateId>"}]'
```

**Terraform code:**

Amazon API Gateway REST API Stage - This Terraform code snippet modifies the existing API Gateway stage to use a client certificate for authentication. It fetches the ID of the client certificate (or creates a new one if it doesn't exist) and sets it as the 'client\_certificate\_id' for the stage. This ensures that only requests from API Gateway with the valid client certificate are allowed to access the backend:

```hcl
# This code block will modify the existing API Gateway stage to use a client certificate for authentication.
resource "aws_api_gateway_stage" "example" {
  # ... other stage configurations ...
  client_certificate_id = aws_api_gateway_client_certificate.client_cert.id
}

# Create a new client certificate if one doesn't exist.
resource "aws_api_gateway_client_certificate" "client_cert" {
  description = "API Gateway Client Certificate for Authentication"
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/aws-api-gateway-endpoints-without-client-certificate-authentication.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
