This rule ensures that API Gateway stage cache encryption at rest is enabled to maintain data security.
Rule | API Gateway stage cache encryption at rest should be enabled |
Framework | HIPAA |
Severity | ✔ Medium |
Rule Description:
According to HIPAA (Health Insurance Portability and Accountability Act) compliance requirements, API Gateway stage cache encryption at rest should be enabled. This rule ensures that sensitive data stored in the cache is encrypted to protect the confidentiality and integrity of the data.
Enabling encryption at rest ensures that even if unauthorized access occurs, the data in the cache remains protected. API Gateway provides options to enable encryption at rest for the stage cache, and it is essential to follow these steps to meet HIPAA compliance.
Troubleshooting Steps:
If the encryption at rest for API Gateway stage cache is not enabled, follow these steps to troubleshoot:
Verify Encryption Setting: Check the API Gateway stage settings to confirm if encryption at rest is enabled for the stage cache. If not enabled, proceed to the remediation steps.
Confirm HIPAA Compliance Requirement: Ensure that your organization needs to comply with HIPAA regulations. If HIPAA compliance is not required, the API Gateway stage cache encryption at rest can be avoided.
Review IAM Permission Policies: Check if the IAM (Identity and Access Management) policies associated with the API Gateway are properly configured to allow encryption at rest for the stage cache. Ensure that the necessary encryption-related actions are permitted.
Check Encryption Key Management: Verify if the encryption key used for the stage cache is correctly managed. Improper key management can result in encryption issues. Ensure that the key is securely stored and accessible only to authorized individuals.
Code Sample:
To enable encryption at rest for API Gateway stage cache, you can use the AWS CLI (Command Line Interface) with the following commands:
aws apigateway get-rest-apis --query "items[?name=='your-api-name'].id" --region your-region --output text
aws apigateway update-stage --rest-api-id your-api-id --stage-name your-stage-name --patch-operations op=replace,path=/cacheClusterEnabled,value=true,op=replace,path=/cacheClusterSize,value=your-cache-size,op=add,path=/cacheDataEncrypted,value=true --region your-region
Replace:
your-api-name
: Name of your APIyour-region
: AWS region where the API is deployedyour-api-id
: Regional API ID of your APIyour-stage-name
: Name of the stage you want to enable cache encryption foryour-cache-size
: Size of the cache cluster (small, medium, or large)Remediation Steps:
Follow these steps to enable encryption at rest for API Gateway stage cache:
Identify the API: Determine the API for which you need to enable encryption at rest for the stage cache.
Get Regional API ID: Use the AWS CLI command mentioned in the code sample above to get the regional API ID for the API.
Update Stage Cache Settings: Execute the AWS CLI command mentioned above, replacing the placeholder values, such as
your-api-name
, your-region
, your-api-id
, your-stage-name
, and your-cache-size
, with the actual values related to your API and desired cache configuration.Verify Encryption: Once the command is executed successfully, verify the encryption at rest is enabled for the stage cache by checking the API Gateway stage settings.
Testing: Test the API and ensure that it is functioning as expected with encryption at rest enabled for the stage cache.
Following these steps will help you enable API Gateway stage cache encryption at rest, ensuring HIPAA compliance for sensitive data storage.