Skip to main content

More Info:

AWS Redshift database clusters should not be using awsuser (default master user name) for database access.

Risk Level

Informational

Address

Operational Maturity, Security

Compliance Standards

  • APRA CPS 234 (Australia)
  • BSI C5 (Germany)
  • Brazil LGPD
  • CCPA / CPRA (California)
  • CIS Critical Security Controls v8
  • CMMC 2.0
  • CSA Cloud Controls Matrix v4
  • DPDPA
  • Digital Operational Resilience Act (EU)
  • Essential 8
  • ISO/IEC 27017
  • ISO/IEC 27018
  • ISO/IEC 27701
  • KSA PDPL
  • MAS Technology Risk Management (Singapore)
  • MITRE ATT&CK (Cloud)
  • NIS2 Directive
  • NIST SP 800-171
  • NYDFS 23 NYCRR 500
  • PCI
  • SWIFT Customer Security Controls Framework
  • Sarbanes-Oxley IT General Controls
  • UK NCSC Cyber Assessment Framework

Triage and Remediation

Remediation

Using Console

To remediate the misconfiguration of an AWS Redshift cluster using the default master username, follow these steps using the AWS Management Console:
  1. Login to AWS Console: Go to the AWS Management Console (https://aws.amazon.com/console/) and log in to your AWS account.
  2. Navigate to Amazon Redshift: In the AWS Management Console, search for “Redshift” in the services search bar and click on “Amazon Redshift” to open the Redshift dashboard.
  3. Select the Redshift Cluster: From the list of Redshift clusters, select the cluster for which you want to remediate the misconfiguration.
  4. Modify the Cluster: Click on the cluster identifier to open the cluster details page. In the cluster details page, click on the “Modify” button at the top.
  5. Change Master Username: In the “Cluster Database Properties” section of the modify cluster page, locate the “Master user name” field. Change the default master username (usually “masteruser”) to a custom username that follows your organization’s security best practices.
  6. Save Changes: After updating the master username, scroll down to the bottom of the modify cluster page and click on the “Modify cluster” button to save the changes.
  7. Monitor the Modification: AWS Redshift will start applying the changes to the cluster. You can monitor the modification progress in the cluster details page.
  8. Verify the Changes: Once the modification is completed, verify that the master username has been successfully changed to the custom username you specified.
By following these steps, you have successfully remediated the misconfiguration of using the default master username for an AWS Redshift cluster.

To remediate the misconfiguration of AWS Redshift cluster using the default master username, you can follow these steps using AWS CLI:Step 1: List the existing Redshift clusters to identify the cluster that is using the default master username.
Step 2: Identify the Redshift cluster for which you want to change the master username.Step 3: Modify the master username for the identified Redshift cluster using the following command:
Replace YOUR_CLUSTER_IDENTIFIER with the actual identifier of your Redshift cluster and NEW_MASTER_USERNAME with the desired non-default master username.Step 4: You will be prompted to provide the master user password for confirmation. Enter the master user password when prompted.Step 5: Verify that the master username has been successfully changed by describing the cluster again:
By following these steps, you can remediate the misconfiguration of using the default master username for an AWS Redshift cluster using the AWS CLI.
To remediate the misconfiguration of an AWS Redshift cluster using the default master username, you can follow these steps using Python and AWS SDK (boto3):
  1. Install boto3 library if you haven’t already:
  1. Use the following Python script to update the master username of the Redshift cluster:
  1. Replace the placeholders your_aws_region, your_redshift_cluster_identifier, and new_master_username with your actual AWS region, Redshift cluster identifier, and the desired new master username.
  2. Run the Python script to update the master username of the Redshift cluster. This will trigger an immediate update, and the Redshift cluster will no longer use the default master username.
By following these steps and running the Python script, you can remediate the misconfiguration of an AWS Redshift cluster using the default master username.
Changing master_username on aws_redshift_cluster forces replacement of the cluster; plan/apply will destroy and recreate it, so ensure you snapshot and/or restore data as needed before applying, as this is an irreversible change for in-place data.For verification, terraform plan should show the existing aws_redshift_cluster.this being replaced (-/+) with the sole functional difference being master_username changing from "awsuser" to "NON_DEFAULT_MASTER_USERNAME".

Additional Reading: