Description
PubliclyAccessible: true gives a Redshift cluster a public endpoint. Subnets, routes and security groups determine who can reach it. Database permissions determine what a signed-in client can do. The property defaults to false.
Potential impact
A publicly reachable endpoint receives unwanted login attempts. An account with excessive access can expose or change analytics data.
Remediation
- Before setting
PubliclyAccessible: false, prepare private connectivity and DNS for applications and analytics tools. - Allow only the required clients and database port in the VPC security groups. If a public connection is needed, restrict its sources and check the routes.
- Review the change set and plan the client cutover. After the update, test queries and scheduled jobs over TLS with their usual database permissions.
Examples
Supply a node type that supports single-node operation in the Region, a cluster subnet group and VPC security groups. ManageMasterPassword: true lets Redshift manage the admin password in Secrets Manager.
Before
Parameters:
NodeType:
Type: String
ClusterSubnetGroupName:
Type: String
VpcSecurityGroupIds:
Type: List<AWS::EC2::SecurityGroup::Id>
Resources:
myCluster:
Type: AWS::Redshift::Cluster
Properties:
PubliclyAccessible: true
DBName: mydb
MasterUsername: master
ManageMasterPassword: true
NodeType: !Ref NodeType
ClusterType: single-node
ClusterSubnetGroupName: !Ref ClusterSubnetGroupName
VpcSecurityGroupIds: !Ref VpcSecurityGroupIds
myCluster requests a public endpoint. Access still depends on the supplied network settings.
After
Parameters:
NodeType:
Type: String
ClusterSubnetGroupName:
Type: String
VpcSecurityGroupIds:
Type: List<AWS::EC2::SecurityGroup::Id>
Resources:
myCluster:
Type: AWS::Redshift::Cluster
Properties:
PubliclyAccessible: false
DBName: mydb
MasterUsername: master
ManageMasterPassword: true
NodeType: !Ref NodeType
ClusterType: single-node
ClusterSubnetGroupName: !Ref ClusterSubnetGroupName
VpcSecurityGroupIds: !Ref VpcSecurityGroupIds
The same cluster requests a private endpoint. Clients need a private path to reach it.