A bit scary. Was able to connect to my instance using google cloud sql proxy after deleting my service role account

310 weergaven
Naar het eerste ongelezen bericht

wob...@yblew.com

ongelezen,
31 mrt 2016, 12:49:4731-03-2016
aan Google Cloud SQL discuss
A bit scary. Was able to connect to my instance using google cloud sql proxy after deleting my service role account

1. Created a service account under editor role

2. Was able to access my server using:

/usr/local/bin/cloud_sql_proxy -dir=/cloudsql -instances=my-project:us-central1:sql-instance=tcp:3306 -credential_file=/prod.json &

3. Deleted my service account

4. Was able to access my instance after deletion of service account using:

/usr/local/bin/cloud_sql_proxy -dir=/cloudsql -instances=my-project:us-central1:sql-instance=tcp:3306 -credential_file=/prod.json &

wob...@yblew.com

ongelezen,
31 mrt 2016, 13:55:1531-03-2016
aan Google Cloud SQL discuss
after an hour, now i'm getting


Response: {
  "error" : "invalid_client",
  "error_description" : "The OAuth client was not found."
}


Does it take a while for google cloud sql proxy to sync up with changes to permissions?

paynen

ongelezen,
4 apr 2016, 16:56:0204-04-2016
aan Google Cloud SQL discuss
Hey wobeng@,

This is expected behaviour. The Service Account's credentials are used to get an access token via OAuth2. If that token isn't revoked, it will continue to work for the default 3600 seconds. I hope this helps clear up the behaviour you saw!

Cheers,

Nick
Cloud Platform Community Support

paynen

ongelezen,
4 apr 2016, 16:57:2904-04-2016
aan Google Cloud SQL discuss

Kevin Malachowski

ongelezen,
4 apr 2016, 18:06:3604-04-2016
aan Google Cloud SQL discuss
Another note: after removing an account's access, existing connections to the database will continue to work (even after the hour expiration you noticed). To break old connections (to combat this in the case a service account is compromised) you can restart your database or reset the SSL certificates on your database instance via our API.
Allen beantwoorden
Auteur beantwoorden
Doorsturen
0 nieuwe berichten