1
votes

I have read access to a shared bucket and I would like to access it using OAuth without any manual intervention (server to server communication).

I can list the bucket's content with gsutil (link to authorization page), Google Cloud Console (username/password) and jets3t (HMAC) but I get a "HttpResponseException: 403 Forbidden" when I try to access it from Java Google API using OAuth and my service account id. The problem is only with the shared bucket and I can correctly access my own buckets. It's not an authentication problem.

The question is then: how to access this shared bucket using a service account id ? If my Google account has access to this bucket from gsutil and Google Cloud Console, any service account under my Google account should also have access to this bucket ? Should I ask the owner to explicitly allow my service account ?

1

1 Answers

3
votes

Gsutil is working because your personal account has read access. However, the service account is a separate account from your personal account. You'll need to either specifically give the service account read access, or you'll need to grant read permission to a group to which the service account belongs.