Mark
Mark

Reputation: 41

ACCESS_TOKEN_SCOPE_INSUFFICIENT on compute engine trying to run cloud-sql-proxy

I'm trying to install and run cloud-sql-proxy on my compute engine instance.

When I run the command: ./cloud-sql-proxy xxx:us-central1:xxx-sql it returns this error:

Error 403: Request had insufficient authentication scopes. Details:

[
  {
    "@type": "type.googleapis.com/google.rpc.ErrorInfo",
    "domain": "googleapis.com",
    "metadata": {
      "method": "google.cloud.sql.v1beta4.SqlConnectService.GetConnectSettings",
      "service": "sqladmin.googleapis.com"
    },
    "reason": "ACCESS_TOKEN_SCOPE_INSUFFICIENT"
  }
]

More details: Reason: insufficientPermissions, Message: Insufficient Permission

I'm having a hard time understanding the documentation. Which service do I need to be looking at and how do I grant the permissions? Any guidance would be greatly appreciated!

Upvotes: 1

Views: 1090

Answers (2)

Anna Fang
Anna Fang

Reputation: 181

Another thing you can double check is the VM's access scope. Steps:

  • Stop the VM that you ran proxy from
  • Check the access scope by clicking on edit button of this VM. Check the "allow full access to all Cloud APIs"

enter image description here

  • Restart the VM and try the proxy again.

Upvotes: 5

Tatiane Tosta
Tatiane Tosta

Reputation: 169

This documentation contains all the information you need to use the Cloud SQL Proxy.

Please let us know if you have further questions.

Upvotes: 0

Related Questions