This rule ensures that API Gateway stages are secured using SSL certificate for improved security and data protection.
Rule | API Gateway stage should uses SSL certificate |
Framework | NIST 800-53 Revision 5 |
Severity | ✔ Medium |
AWS API Gateway Stage Compliance with NIST 800-53 Revision 5
NIST 800-53 Revision 5 is a set of security and privacy controls for federal information systems and organizations that aims to improve information security. For an API Gateway stage to comply with NIST 800-53 Rev. 5, it must use an SSL/TLS certificate.
Description of the Rule
An SSL/TLS certificate is a digital certificate that encrypts data transmitted between the user's browser and the server, ensuring the integrity and confidentiality of the data in transit. For AWS API Gateway, the use of an SSL certificate is mandatory to secure API data.
Troubleshooting Steps
If the API Gateway stage isn't using an SSL certificate or if there are issues with the certificate, the following troubleshooting steps should be taken:
ISSUED
.Necessary Codes and CLI Commands
To attach an SSL certificate to an API Gateway custom domain, first, request or import a certificate in AWS Certificate Manager, then use the AWS CLI to associate the certificate with the domain.
Step 1: Request or Import a Certificate
Request a certificate in ACM using the AWS CLI:
aws acm request-certificate --domain-name example.com --validation-method DNS
Or import a certificate:
aws acm import-certificate --certificate fileb://Certificate.pem \ --certificate-chain fileb://CertificateChain.pem \ --private-key fileb://PrivateKey.pem
Step 2: Attach the Certificate to API Gateway Domain Name
Create or update the custom domain name in API Gateway:
aws apigateway create-domain-name --domain-name 'api.example.com' \ --certificate-arn 'arn:aws:acm:us-east-1:123456789012:certificate/123abcd-456efg-789hij'
Or update if it already exists:
aws apigateway update-domain-name --domain-name 'api.example.com' \ --patch-operations op='replace',path='/certificateArn',value='arn:aws:acm:us-east-1:123456789012:certificate/123abcd-456efg-789hij'
Step by Step Guide for Remediation
Obtain or Request an SSL Certificate:
Validate the SSL Certificate:
Attach the SSL Certificate to the Custom Domain Name:
create-domain-name
or update-domain-name
API or CLI commands to bind the SSL certificate to the API Gateway custom domain.Deploy the API to the Appropriate Stage:
Once the certificate is in place, deploy the API to the stage using the console or CLI command:
aws apigateway create-deployment --rest-api-id 'restapi_id' --stage-name 'stage_name'
Verify the Setup:
Following these steps helps ensure your API Gateway complies with the NIST 800-53 Rev. 5 requirements for secure communications.