Questions tagged [service-accounts]

The Google OAuth 2.0 endpoint supports server-to-server interactions such as those between a web application and Google Cloud Storage.

A service account is used when you want to access your own data and not data owned by other users. In this instance there is no reason to use OAuth2 and prompt a user to give you access to there information, its your information you already have access.

For this scenario you need a service account, which is an account that belongs to your application instead of to an individual end user. For example, if you use the Google Prediction API to act on behalf of your application without accessing any user data, your application uses its service-account credentials to prove its own identity, and no end user is involved.

A service account's credentials include a generated email address that is unique, a client ID, and at least one public/private key pair. You obtain these credentials in the Google Developers Console, or if your application uses Google App Engine, a service account is set up automatically. You use the client ID and one private key to create a signed JWT and construct an access-token request in the appropriate format.

1492 questions
21
votes
5 answers

Permissions For Google Cloud SQL Import Using Service Accounts

I've exported MySQL Database following the MySQL Export Guide successfully. Now, I'm trying to import MySQL Database following the MySQL Import Guide. I've checked the permissions for the service_account_email I'm using, and I have allowed both…
17
votes
6 answers

gcloud: The user does not have access to service account "default"

I attempting to use an activated service account scoped to create and delete gcloud container clusters (k8s clusters), using the following commands: gcloud config configurations create my-svc-account \ --no-activate \ --project…
DrMarshall
  • 1,034
  • 2
  • 9
  • 14
17
votes
2 answers

How to change the scope of a Google Compute Engine service account to write data to a Google Cloud Storage bucket?

There is an instance running on GCE and there is a GCS bucket in same project. But I am not able to write data to it. How can I write data from a VM instance to the storage bucket?
Sunil Garg
  • 14,608
  • 25
  • 132
  • 189
16
votes
2 answers

How to upload file to google drive with service account credential

I wanted to upload the files to my Google Drive using a Google service account credentials. I downloaded credential as a JSON file from Google Developer Console, and got credential from it. Here is my code snippet. google_drive_service =…
15
votes
1 answer

ImagePullSecrets GCR

I am having an issue configuring GCR with ImagePullSecrets in my deployment.yaml file. It cannot download the container due to permission Failed to pull image "us.gcr.io/optimal-jigsaw-185903/syncope-deb": rpc error: code = Unknown desc = Error…
15
votes
3 answers

Can't access FireBase Database via HTTP/REST error 403 Forbidden

Swift + Vapor framework for server + Xcode 8.1 I am trying to read Firebase Realtime Database making HTTP requests to my DB, but I get permission denied. These are the steps: 1. create JWT sign it with secret key downloaded from…
bibscy
  • 2,598
  • 4
  • 34
  • 82
14
votes
5 answers

Login to firebase using gcloud service account

I have functions deployed to gcloud functions and i want to configure CI/CD for deploying this functions from gitlab. To do any operations from gitlab i need to get firebase auth token with firebase login:ci command. The problem is that i need to…
Vitali Skripka
  • 562
  • 1
  • 7
  • 25
14
votes
3 answers

Can the Google Apps Script Execution API be called by a service account?

I'd like to use a service account to access a Google Sheet via the Apps Script Execution API, but it's not clear from the documentation whether this is supported. The steps I've tried (which result in a 403 status from the Execution API)…
14
votes
4 answers

Allowing Google Service Account YouTube Upload Access via API v3

I want to automatically upload videos to YouTube without user involvement so I've created a service account, jumped through the hoops, all was looking great, then the upload, chunk one, is attempted and my code bombs with this Google_Exception…
Claud
  • 937
  • 1
  • 12
  • 27
13
votes
1 answer

How to access Team Drive using service account with Google Drive .NET API v3

Does anyone know which configurations should be done to grant Google service account an access to a Team Drive which is already created? The idea is to use a service account in a .NET backend application for uploading/downloading files to/from Team…
13
votes
1 answer

Google Service account user interfece

How can I login to a Google Service account with the normal web user interface, for example to google drive ? Now I can only login using API using script.
ButuzGOL
  • 1,233
  • 2
  • 13
  • 27
12
votes
1 answer

GCP: How to grant a role to a service account on a Firestore collection?

We can share a BigQuery dataset with a service account, we can add a service account as a member to a specific bucket by assigning to it a specific role....using graphic interface. What about Firestore? Can we share a specific collection with a…
12
votes
3 answers

How do I create an Access Token from Service Account Credentials using REST API?

I have created a Service Account in Google Cloud Platform and downloaded the Private Key in JSON format. I am trying to create a Compute resource via REST API. For authentication purpose, I need an AccessToken which needs to be set as a Header of…
11
votes
2 answers

GCP - Impersonate service account as a user

I would like to allow users to impersonate a service account to do operations on a long running process. However, all the code examples illustrate a service account impersonating another service account. Can users directly impersonate a service…
11
votes
1 answer

Unable to connect Google Storage file using GSC connector from Spark

I have written a spark job on my local machine which reads the file from google cloud storage using google hadoop connector like gs://storage.googleapis.com/ as mentioned in https://cloud.google.com/dataproc/docs/connectors/cloud-storage I have set…