Turbot Guardrails Hub 
Hub
  • Mods
  • Policy Packs
  • Docs
  • Home
ModsPolicy PacksDocsHome
Mods
GCP
Loading policies...

Policy: GCP > CIS v5.0 > 6 - Cloud SQL Database Services > 6.01 - MySQL Database > 6.01.01 - Ensure That a MySQL Instance Does Not Allow Anyone To Connect With Administrative Privileges > Attestation

By setting this policy, you attest that you have manually verified that it complies with the relevant section of the CIS Benchmark.

From Google Cloud CLI

1. List all Cloud SQL database instances of type MySQL:

gcloud sql instances list --filter='DATABASE_VERSION:MYSQL*' --project <project_id> --format="(NAME,PRIMARY_ADDRESS)"

2. For every MySQL instance, try to connect using the PRIMARY_ADDRESS, if available:

mysql -u root -h <mysql_instance_ip_address>

The command should return either an error message or a password prompt. For example:

ERROR 1045 (28000): Access denied for user 'root'@'<Instance_IP>' (using password: NO)

If the command produces the mysql> prompt, the MySQL instance allows anyone to connect with administrative privileges without needing a password.

Note: The No Password setting is exposed only at the time of MySQL instance creation. Once the instance is created, the Google Cloud console does not show whether a password is set for an administrative user.

Once verified, enter the date that this attestation expires. Note that the date can not be further in the future than is specified in GCP > CIS v5.0 > 6 - Cloud SQL Database Services > 6.01 - MySQL Database > Maximum Attestation Duration, which by default follows GCP > CIS v5.0 > 6 - Cloud SQL Database Services > Maximum Attestation Duration and then GCP > CIS v5.0 > Maximum Attestation Duration. Set to a blank value to clear the attestation.

Targets

This policy targets the following resource types:

  • GCP > SQL > Instance

Primary Policy

This policy is used with the following primary policy:

  • GCP > CIS v5.0 > 6 - Cloud SQL Database Services > 6.01 - MySQL Database > 6.01.01 - Ensure That a MySQL Instance Does Not Allow Anyone To Connect With Administrative Privileges

Controls

Setting this policy configures this control:

  • GCP > CIS v5.0 > 6 - Cloud SQL Database Services > 6.01 - MySQL Database > 6.01.01 - Ensure That a MySQL Instance Does Not Allow Anyone To Connect With Administrative Privileges

Policy Specification

Schema Type
string

Category

  • CIS > Controls v7 > 04 Controlled Use of Administrative Privileges > 4.02 Change Default Passwords

In Your Workspace

  • Policy Settings by Type report

Developers

    Category URI
    • tmod:@turbot/cis#/control/categories/v070402
  • Policy Type URI
    • tmod:@turbot/gcp-cisv5-0#/policy/types/r060101Attestation
  • GraphQL
    • query policyType(id: "tmod:@turbot/gcp-cisv5-0#/policy/types/r060101Attestation") { … }
    • query policySettings(filter: "policyTypeId:'tmod:@turbot/gcp-cisv5-0#/policy/types/r060101Attestation'") { … }
    • query policyValues(filter: "policyTypeId:'tmod:@turbot/gcp-cisv5-0#/policy/types/r060101Attestation'") { … }
  • CLI
    • Get Policy Type
    • turbot graphql policy-type --id "tmod:@turbot/gcp-cisv5-0#/policy/types/r060101Attestation"
    • Get Policy Settings
    • turbot graphql policy-settings --filter "policyTypeId:tmod:@turbot/gcp-cisv5-0#/policy/types/r060101Attestation"
Guardrails
Guardrails Hub
  • Hub
  • Docs
  • Blog
  • Changelog
Products
  • GuardrailsGuardrails
  • PipesPipes
  • SteampipeSteampipe
  • PowerpipePowerpipe
  • FlowpipeFlowpipe
  • TailpipeTailpipe
Turbot
  • Home
  • About us
  • We're hiring!
  • Contact us
Community

Our community of practitioners love to discuss cloud governance & security.

Slack logoJoin us on Slack →

System StatusLegalSecurity
Terms of UseSecurityPrivacy
42
Mods
158
Resource Types
2,654
Policies
1,319
Controls
131
Quick Actions
93
IAM