Amazon AppSync controls
These controls are related to Amazon AppSync resources.
These controls may not be available in all Amazon Web Services Regions. For more information, see Availability of controls by Region.
[AppSync.2] Amazon AppSync should have field-level logging enabled
Category: Identify > Logging
Severity: Medium
Resource type:
AWS::AppSync::GraphQLApi
Amazon Config rule:
appsync-logging-enabled
Schedule type: Change triggered
Parameters:
Parameter | Description | Type | Allowed custom values | Security Hub default value |
---|---|---|---|---|
|
Field logging level |
Enum |
|
|
This control checks whether an Amazon AppSync API has field-level logging turned on. The control fails
if the field resolver log level is set to None. Unless you provide custom
parameter values to indicate that a specific log type should be enabled, Security Hub produces a passed finding if the field resolver log level is either ERROR
or
ALL
.
You can use logging and metrics to identify, troubleshoot, and optimize your GraphQL queries. Turning on logging for Amazon AppSync GraphQL helps you get detailed information about API requests and responses, identify and respond to issues, and comply with regulatory requirements.
Remediation
To turn on logging for Amazon AppSync, see Setup and configuration in the Amazon AppSync Developer Guide.
[AppSync.4] Amazon AppSync GraphQL APIs should be tagged
Category: Identify > Inventory > Tagging
Severity: Low
Resource type:
AWS::AppSync::GraphQLApi
Amazon Config rule: tagged-appsync-graphqlapi
(custom Security Hub rule)
Schedule type: Change triggered
Parameters:
Parameter | Description | Type | Allowed custom values | Security Hub default value |
---|---|---|---|---|
requiredTagKeys
|
List of non-system tag keys that the evaluated resource must contain. Tag keys are case sensitive. | StringList | List of tags that meet Amazon requirements | No default value |
This control checks whether an Amazon AppSync GraphQL API has tags with the specific keys defined in the parameter
requiredTagKeys
. The control fails if the GraphQL API doesn’t have any tag keys or if it doesn’t have all the keys specified in the
parameter requiredTagKeys
. If the parameter requiredTagKeys
isn't provided, the control only checks for the existence
of a tag key and fails if the GraphQL API isn't tagged with any key. System tags, which are automatically applied and begin with aws:
,
are ignored.
A tag is a label that you assign to an Amazon resource, and it consists of a key and an optional value. You can create tags to categorize resources by purpose, owner, environment, or other criteria. Tags can help you identify, organize, search for, and filter resources. Tagging also helps you track accountable resource owners for actions and notifications. When you use tagging, you can implement attribute-based access control (ABAC) as an authorization strategy, which defines permissions based on tags. You can attach tags to IAM entities (users or roles) and to Amazon resources. You can create a single ABAC policy or a separate set of policies for your IAM principals. You can design these ABAC policies to allow operations when the principal's tag matches the resource tag. For more information, see What is ABAC for Amazon? in the IAM User Guide.
Note
Don’t add personally identifiable information (PII) or other confidential or sensitive information in tags. Tags are accessible to many Amazon Web Services, including Amazon Billing. For more tagging best practices, see Tagging your Amazon resources in the Amazon Web Services General Reference.
Remediation
To add tags to an Amazon AppSync GraphQL API, see TagResource in the Amazon AppSync API Reference.
[AppSync.5] Amazon AppSync GraphQL APIs should not be authenticated with API keys
Related requirements: NIST.800-53.r5 AC-2(1), NIST.800-53.r5 AC-3, NIST.800-53.r5 AC-3(15), NIST.800-53.r5 AC-3(7), NIST.800-53.r5 AC-6
Category: Protect > Secure access management > Passwordless authentication
Severity: High
Resource type:
AWS::AppSync::GraphQLApi
Amazon Config rule:
appsync-authorization-check
Schedule type: Change triggered
Parameters:
AllowedAuthorizationTypes
:Amazon_LAMBDA, Amazon_IAM, OPENID_CONNECT, AMAZON_COGNITO_USER_POOLS
(not customizable)
This control checks whether your application uses an API key to interact with an Amazon AppSync GraphQL API. The control fails if an Amazon AppSync GraphQL API is authenticated with an API key.
An API key is a hard-coded value in your application that is generated by the Amazon AppSync service when you create an unauthenticated GraphQL endpoint. If this API key is compromised, your endpoint is vulnerable to unintended access. Unless you are supporting a publicly accessible application or website, we don't recommend using an API key for authentication.
Remediation
To set an authorization option for your Amazon AppSync GraphQL API, see Authorization and authentication in the Amazon AppSync Developer Guide.