Control: GCP > SQL > Instance > Root User Host
Configure whether a MySQL GCP > SQL > Instance may have a root or anonymous database user that can log in from any host.
The Root User Host control compares the instance's database users against the Root User Host policy for the resource (GCP > SQL > Instance > Root User Host), raises an alarm when a user named root, % or with no name can log in from any host, and takes the defined enforcement action.
Only MySQL instances are checked. Instances that are not running are skipped, because their users cannot be read, and so are on-premises instances. Read replicas and read pools are checked, but enforcement deletes users on the primary instance only. A user with no name cannot be deleted by enforcement and keeps the instance in alarm until it is removed with the MySQL client.
Resource Types
This control targets the following resource types:
Policies
The following policies can be used to configure this control:
Permissions
Cloud permissions used by this control and its actions:
cloudsql.users.delete
Category
In Your Workspace
Developers
- tmod:@turbot/gcp-sql#/control/types/instanceRootUserHost
- tmod:@turbot/turbot#/control/categories/security
- turbot graphql controls --filter "controlTypeId:tmod:@turbot/gcp-sql#/control/types/instanceRootUserHost"
Get Controls