> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/aws-redshift-cluster-with-commonly-used-master-username-and-public-access-setting-enabled.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# AWS Redshift cluster with commonly used master username and public access setting enabled

### Synopsis

| Field               | Value                                                                                     |
| ------------------- | ----------------------------------------------------------------------------------------- |
| Rule Type           | Detection                                                                                 |
| Finding Type        | AWS Redshift cluster with commonly used master username and public access setting enabled |
| Finding ID          | 60000861                                                                                  |
| Generates a Finding | This detection rule also generates a finding                                              |
| Severity            | High                                                                                      |
| Category            | CONFIGURATION                                                                             |
| Cloud Providers     | AWS                                                                                       |
| Platform Module     | CSPM                                                                                      |
| Asset Types         | REDSHIFT\_CLUSTER                                                                         |
| ATT\&CK Tactic      | TA0001 (TA0001)                                                                           |
| ATT\&CK Technique   | T1190 (T1190)                                                                             |

### Description

AWS Redshift clusters configured with default master usernames ('awsuser', 'administrator', 'admin') and public access enabled pose a significant security risk. This misconfiguration exposes sensitive data to unauthorized access and potential breaches.

AWS Redshift's public accessibility setting allows connections from any IP address. Combined with easily guessable default usernames, this creates a large attack surface. Attackers can easily brute-force passwords or exploit known vulnerabilities to gain unauthorized access, leading to data exfiltration or manipulation.

The impact of this misconfiguration includes data breaches, unauthorized data access, and potential regulatory non-compliance. Strong usernames and restricted access are crucial for protecting sensitive data stored in Redshift. Restricting access minimizes the potential blast radius of a successful attack.

To mitigate this, enforce strong, unique master usernames for all Redshift clusters. Disable public access and instead utilize a Virtual Private Cloud (VPC) with security groups to control network access. Regularly review and update security group configurations to maintain a strong security posture.

### Remediation

**Manual steps:**

Redshift Cluster - This remediation address the AWS Redshift clusters configured with commonly used master usernames like 'awsuser', 'administrator', or 'admin', and the public access setting is enabled. This configuration poses a significant security risk as it increases the vulnerability to unauthorized access, data breaches, and potential malicious activities:

Changing the default master username for your existing Amazon Redshift clusters requires relaunching those clusters with a different master username and migrating the existing data to the new clusters.

1. **Sign in to the AWS Management Console:** Sign in to the AWS Management Console and open the Amazon Redshift console
2. **Access Clusters:** On the navigation menu, choose 'Clusters'. The clusters for your account in the current AWS Region are listed. A subset of the properties of each cluster is displayed in columns in the list.
3. **Create a New Cluster:** Choose 'Create cluster' to create a cluster.
4. **Enter Cluster Configuration Properties:** Follow the instructions on the console page to enter the properties for Cluster configuration.
5. **Set a Unique Master Username:** In the 'Database configuration' section, type a unique (non-default) username within the 'Admin username' field.
6. **Configure Network and Security Settings:** In the 'Additional configurations', Under the 'Network and security' Dropdown, Ensure the checkbox 'Turn on Publicly accessible' in the 'Publicly accessible' section is unchecked.
7. **Complete Configuration:** Fill out the rest of the fields available on this page with the information taken from the existing cluster.
8. **Create the Cluster:** Choose 'Create cluster' to create the cluster. The cluster might take several minutes to be ready to use.
9. **Migrate Data:** Once the Cluster Status value changes to available and the DB Health status changes to healthy, the new cluster can used to load the existing data from the old cluster.
10. **Delete the Old Cluster:** Once the data migration process is completed and all the data is loaded into the new Redshift cluster and all applications configured to use the new cluster, delete the old cluster.

To delete the existing cluster, refer to the below link:

```
[https://docs.aws.amazon.com/redshift/latest/mgmt/managing-clusters-console.html#delete-cluster](https://docs.aws.amazon.com/redshift/latest/mgmt/managing-clusters-console.html#delete-cluster).
```

**Note:** Carefully review and test these changes in a non-production environment before implementing them in production. Modifying the master username and disabling public access may impact existing applications or tools that rely on these settings. Ensure you have appropriate access control mechanisms in place to mitigate any potential risks.

**CLI code:**

Redshift Cluster - This command modifies the Redshift cluster identified by '${entity}'. It disables public access to the cluster:

```bash
aws redshift modify-cluster --cluster-identifier ${entity} --no-publicly-accessible --region ${entity}
```

**Terraform code:**

Redshift Cluster - This Terraform snippet modifies the existing Redshift cluster resource to disable public access and change the master username to a unique value. This addresses the policy violation by removing the public access vulnerability and using a more secure master username:

```hcl
# Modify the existing Redshift cluster resource to disable public access
resource "aws_redshift_cluster" "example" {
  # ... other existing configurations
  publicly_accessible = false
  master_username = "your_unique_username"
}
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/aws-redshift-cluster-with-commonly-used-master-username-and-public-access-setting-enabled.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
