> 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-appsync-graphql-api-is-authenticated-with-api-key.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# AWS AppSync GraphQL API is authenticated with API key

### Synopsis

| Field               | Value                                                 |
| ------------------- | ----------------------------------------------------- |
| Rule Type           | Detection                                             |
| Finding Type        | AWS AppSync GraphQL API is authenticated with API key |
| Finding ID          | 60000907                                              |
| Generates a Finding | This detection rule also generates a finding          |
| Severity            | Medium                                                |
| Category            | CONFIGURATION                                         |
| Cloud Providers     | AWS                                                   |
| Platform Module     | CSPM                                                  |
| Asset Types         | AWS\_APPSYNC\_GRAPHQL\_API                            |
| ATT\&CK Tactic      | TA0006 (TA0006)                                       |
| ATT\&CK Technique   | T1552 (T1552)                                         |

### Description

AWS AppSync GraphQL APIs using API keys for authentication are vulnerable to unauthorized access. Using API keys allows attackers to easily access the API and potentially compromise sensitive data if the key is exposed.

AppSync, a managed GraphQL API service, allows for authentication via API keys. However, API keys are essentially hardcoded credentials within applications. Their compromise grants full access to the API, bypassing intended authorization controls. This creates a significant security risk, as stolen keys enable unauthorized data access and manipulation.

A compromised API key results in data breaches, service disruption, and potential regulatory non-compliance. Using alternative authentication methods, such as IAM roles, Cognito User Pools, or OpenID Connect, provides granular control over access, enhancing security posture and minimizing the impact of credential exposure.

Implement stronger authentication methods like IAM roles, Cognito User Pools, or OpenID Connect for all AppSync APIs. Regularly rotate API keys if absolutely necessary and employ robust key management practices, including restricting key access and usage only to trusted applications. Monitor API usage for anomalies, which might indicate compromised keys.

### Remediation

**Manual steps:**

AWS Appsync Graphql Api - Manual remediation steps:

Note: Changing the API authorization mode from API key to other methods could cause potential disruptions to existing clients or applications relying on API key authentication. It may require updates to client configurations and authentication workflows for your applications.

To update the Primary authorization mode option for your AWS AppSync GraphQL API, perform the following actions:

1. Sign in to the AWS Management Console
2. Select the specific region from the region drop-down in the top right corner, for which the alert is generated
3. In the Navigation Panel on the left, Select 'All services' and under 'Front-end Web & Mobile', select 'AWS AppSync'
4. Under the 'APIs' section, select the AppSync API that is reported
5. Navigate to the 'Settings page' from the left panel, Click 'Edit' on the 'Primary authorization mode' section
6. In the 'Primary authorization mode' window, change the 'Authorization mode' from 'API key' to other authentication methods and configure it according to your business requirements
7. Click 'Save'

To update the Additional authorization modes for your AWS AppSync GraphQL API, perform the following actions:

1. Sign in to the AWS Management Console
2. Select the specific region from the region drop-down in the top right corner, for which the alert is generated
3. In the Navigation Panel on the left, Select 'All services' and under 'Front-end Web & Mobile', select 'AWS AppSync'
4. Under the 'APIs' section, select the AppSync API that is reported
5. Navigate to the 'Settings page' from the left panel, and click 'Add' in the 'Additional authorization modes' section.
6. In the 'Additional authorization mode' window, select any 'Authorization mode' except 'API key' and configure according to your business requirements, and click 'Add'
7. Navigate to the 'Settings page' from the left panel, select the 'API key' in the 'Authorization mode' column from the 'Additional authorization modes' section, and click 'Delete' to remove the API key authorization mode


---

# 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-appsync-graphql-api-is-authenticated-with-api-key.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.
