This rule requires enabling logging for API Gateway stages to ensure proper monitoring.
Rule | API Gateway stage logging should be enabled |
Framework | NIST 800-53 Revision 5 |
Severity | ✔ High |
Rule Description:
The rule requires that logging is enabled for the API Gateway stage in compliance with NIST 800-53 Revision 5 security controls. Enabling stage logging helps in monitoring and auditing the activities within the stage, which ensures better security and compliance with NIST guidelines.
Troubleshooting Steps:
If stage logging is not enabled for API Gateway as per the NIST 800-53 Revision 5 requirements, you can follow these steps to troubleshoot the issue:
Necessary Codes:
There are no specific codes provided for this rule, as enabling logging for the API Gateway stage is a configuration-based action. However, in case you need to modify the logging configuration through API Gateway CLI commands, the AWS CLI commands mentioned below can be used:
update-stage
command with the corresponding parameters:aws apigateway update-stage --rest-api-id <rest-api-id> --stage-name <stage-name> --patch-operations op='replace',path='/logging/loglevel',value='INFO' op='replace',path='/logging/dataTrace',value='true'
Replace
<rest-api-id>
with the ID of the API Gateway and <stage-name>
with the name of the desired stage for which logging needs to be enabled.update-stage
command to set the desired parameters:aws apigateway update-stage --rest-api-id <rest-api-id> --stage-name <stage-name> --patch-operations op='replace',path='/logging/loglevel',value='OFF' op='replace',path='/logging/dataTrace',value='false'
Remediation Steps:
Follow these steps to enable logging for the API Gateway stage in compliance with NIST 800-53 Revision 5:
By following these steps, you will successfully enable the logging for the API Gateway stage in compliance with NIST 800-53 Revision 5. This will help in monitoring and auditing the activities within the stage, ensuring better security and compliance.