Ensure there is a security group created and configured for the data tier that grants inbound access from the app-tier security group on explicit TCP ports such as 3306 (MySQL, MariaDB, and Amazon Aurora), 1433 (MSSQL), 1521 (Oracle SQL) and 5432 (PostgreSQL), to secure the access to your database instances. This conformity rule assumes that all AWS resources created within your data tier are tagged with <data_tier_tag>:<data_tier_tag_value>
, where <data_tier_tag>
is the tag name and <data_tier_tag_value>
is the tag value. Before running this rule by the Trend Cloud One™ – Conformity engine, the data-tier tags must be configured in the rule settings, on your Conformity account console.
To protect the database instances within your data tier from unauthorized access, a distinct security group must be created and configured to secure access by allowing traffic for specific protocols and ports by referencing as source the security group associated with your app-tier.
Note 1: The database type used as example in this conformity rule is MySQL (TCP port 3306), however, depending on your AWS application design, any other database types and ports would apply.
Note 2: Make sure that you replace all <data_tier_tag>:<data_tier_tag_value>
tag placeholders outlined in the conformity rule content with your own tag set created for the data tier.
Audit
To determine if there is a security group created and configured exclusively for the data tier, perform the following operations:
Remediation / Resolution
To create a compliant data-tier security group and configure it to allow inbound traffic from the app-tier security group, perform the following operations:
References
- AWS Documentation
- Security Groups for Your VPC
- Amazon EC2 Security Groups for Linux Instances
- CIS Amazon Web Services Foundations
- AWS Command Line Interface (CLI) Documentation
- ec2
- describe-security-groups
- describe-tags
- create-security-group
- authorize-security-group-ingress
- create-tags
- modify-instance-attribute