Skip to main content

Triage and Remediation

Remediation

Using Console

Sure, here are the step-by-step instructions to remediate the Route 53 Domains Should Have Privacy Protection Enabled misconfiguration for AWS using the AWS console:
  1. Open the AWS Management Console and navigate to the Route 53 service.
  2. Click on the “Registered domains” option from the left-hand menu.
  3. Select the domain for which you want to enable privacy protection.
  4. Click on the “Add/Edit Privacy Protection” button.
  5. Select the “Enable Privacy Protection” option and click on the “Save” button.
  6. Review the confirmation message and click on the “Confirm” button to enable privacy protection for the domain.
That’s it! The privacy protection for the selected domain has been enabled. You can repeat the same steps for other domains as well.

To remediate the misconfiguration of Route 53 domains not having privacy protection enabled in AWS using AWS CLI, you can follow the below steps:
  1. Open the AWS CLI on your local machine or terminal.
  2. Run the following command to enable privacy protection for a domain in Route 53:
Replace <domain-name> with the actual name of the domain for which you want to enable privacy protection.
  1. If the command is successful, you will receive a JSON output with the details of the updated domain privacy.
  2. Repeat the above steps for all the domains in your Route 53 that do not have privacy protection enabled.
  3. Verify the privacy protection is enabled for the domains by running the following command:
Replace <domain-name> with the actual name of the domain for which you want to check if privacy protection is enabled.
  1. If the privacy protection is enabled, you will see the AdminPrivacy and RegistrantPrivacy fields set to true in the output.
By following the above steps, you can remediate the misconfiguration of Route 53 domains not having privacy protection enabled in AWS using AWS CLI.
To remediate the misconfiguration “Route 53 Domains Should Have Privacy Protection Enabled” in AWS using Python, you can follow these steps:
  1. Install the AWS SDK for Python (boto3) using the following command:
  2. Configure your AWS credentials using one of the following methods:
    • Set environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
    • Use the AWS CLI aws configure command
    • Use an IAM role if running on an EC2 instance with an instance profile
  3. Write a Python script that uses the boto3 library to enable privacy protection for your Route 53 domains. Here’s an example script:
    This script uses the update_domain_privacy method of the boto3 Route 53 Domains client to enable privacy protection for each of the specified domain names. The AdminPrivacy, RegistrantPrivacy, and TechPrivacy parameters all need to be set to True to enable full privacy protection.
  4. Run the Python script to enable privacy protection for your Route 53 domains. You can run the script from the command line using the following command:
    Replace enable_privacy_protection.py with the name of your Python script.
After running the script, privacy protection should be enabled for all specified Route 53 domains. You can verify this in the Route 53 console by checking that the “WHOIS Privacy” column for each domain shows “Enabled”.
Terraform cannot currently manage Route 53 Domains contact-privacy settings; the AWS provider only exposes them via a read‑only aws_route53domains_registered_domain data source, not a resource that can call update-domain-contact-privacy.You must remediate this outside Terraform, e.g. with the CLI command your check provides (note us-east-1 is mandatory for Route 53 Domains):
Terraform verification is not applicable here; terraform plan will show no changes related to this setting because it is not managed by the provider.