Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Using Service Account Keys on different machines

It is a little unclear to me on how to use the AutoML translation model I created on different machines. I generated a service account key and reference it when calling the API and it works fine on my machine. However, when another user uses the same service account key on their machine, occasionally the following error occurs. The odd part is it doesn't happen all the time.

Status(StatusCode=Unavailable, Detail="Permission Denied: automl.models.predict"

I had two questions:
1. When using the service account key on another machine, is there anything else I need to do to authenticate the user?
2. I know Google advises against sharing keys, however I am using a third-party translation software that requires you set a JSON file key to use the API. Any advice on other methods for allowing other users to use the AutoML translation model would be appreciated.

0 2 288
2 REPLIES 2

I will try to answer both questions.

  1. No, you don’t need anything more to do to authenticate the user, just provide the correct service account and the key to the user.
  2. No, the only way to do this is by using the JSON that IAM provides, but also note that sharing the service account key is like sharing a password.

@Eduardo_Ortiz 
Thanks for answering my question. I was able to solve my permission problem by generating separate JSON for each machine. From my observations, it appears if you try to use the same JSON key on different machines permission issues occur randomly although this is not documented anywhere.