For the complete documentation index, see llms.txt. This page is also available as Markdown.

Cloud SQL

Grant Teleskope access to Cloud SQL

For organization discovery, grant the following roles to the Teleskope connector service account at the organization level. For manual project enrollment, grant them on each enrolled project:

  • roles/cloudsql.client

  • roles/cloudsql.viewer

  • roles/cloudsql.admin (required to generate ssl certificates)

See GCP organization discovery for the organization-level Terraform example and the complete connector role list.

Also grant the shared project-dispatch custom role from GCP organization discovery. It contains resourcemanager.projects.get and compute.regions.list, both of which run before Cloud SQL dispatch.

roles/cloudsql.viewer supplies cloudsql.instances.get and cloudsql.instances.list; roles/cloudsql.client supplies cloudsql.instances.connect for the Cloud SQL Auth Proxy. roles/cloudsql.admin is required only because it includes cloudsql.sslCerts.create when Teleskope generates a client SSL certificate.

Teleskope Database User

For each CloudSQL instance you would like to scan using Teleskope, you will need to create or provide credentials for a database user, and grant that user read permissions.

Teleskope authenticates to the database with a username and password. Cloud SQL IAM database authentication is not currently supported, and Google does not offer it for SQL Server at all.

Each block below is run once per instance and covers every database on that instance.

Grant Read Access to Teleskope user

MySQL or MariaDB

Postgres versions 14+

Postgres versions < 14

SQL Server

On Cloud SQL the login is created through GCP rather than T-SQL:

Then connect to the instance and run the following once. It creates the user and grants read access in every database on the instance.

It prints ok <database> or skip <database> with a reason, so a database that cannot be granted does not stop the rest. Do not run GRANT VIEW ANY DATABASE on Cloud SQL: the sqlserver account is not sysadmin so it is rejected, and it is unnecessary because public already holds the permission.

SQL Server: add permissions only if a crawl or scan fails

Last updated

Was this helpful?