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
73
votes
5 answers

Service account doesn't show up in Google Play Console after creation

From my Google Play console I linked a project. Then I created a service account. Still, when refreshing the console, it still says "There are no service accounts associated with your project." Waited over 24 hours already. The purpose of all that…
62
votes
8 answers

service account does not have storage.objects.get access for Google Cloud Storage

I have created a service account in Google Cloud Console and selected role Storage / Storage Admin (i.e. full control of GCS resources). gcloud projects get-iam-policy my_project seems to indicate that the role was actually selected: - members: -…
Drux
  • 11,992
  • 13
  • 66
  • 116
60
votes
2 answers

How to configure a non-default serviceAccount on a deployment

My Understanding of this doc page is, that I can configure service accounts with Pods and hopefully also deployments, so I can access the k8s API in Kubernetes 1.6+. In order not to alter or use the default one I want to create service account and…
eljefedelrodeodeljefe
  • 6,304
  • 7
  • 29
  • 61
55
votes
7 answers

Cloud Build fails to deploy to Google App Engine - You do not have permission to act as @appspot.gserviceaccount.com

This morning I made a PR which triggered a Cloud Build for my staging enviroment but failed to deploy the results to GAE. The error was as follows: ERROR: (gcloud.app.deploy) PERMISSION_DENIED: You do not have permission to act as…
50
votes
2 answers

Google Drive API, Oauth and service account

I've some issues with Google Drive API, service account and authentication. I read a lot, but I cannot figure out how to solve this. Context: I have some files on my Drive account (about 35GB) and a simple web app which let users to log in, see some…
user6208310
49
votes
6 answers

List of Kubernetes RBAC rule verbs

I want to give my application limited access to get the replicas of different statefulsets (and maybe deployment) and if necessary scale them up or down. I have created ServiceAccount, Rolebinding and Role for this but I can't find the complete list…
AVarf
  • 4,481
  • 9
  • 47
  • 74
46
votes
5 answers

How to Auth to Google Cloud using Service Account in Python?

I'm trying to make a project that will upload Google Storage JSON file to BigQuery (just automate something that is done manually now), and I'd like to use a 'service account' for this as my script is going to be run on daily basis. After reading…
39
votes
1 answer

How to Update Roles of Existing Service Accounts - Google Cloud Console

I am using the Google Cloud Console for this purpose. When I create a service account, I can assign specific roles. But after I create it, I don't see an option to Update Roles of Service Accounts. I tried to edit the service account, and still no…
39
votes
5 answers

Do not have permission to access app while deploying google service account

After creating google service account with permission as shown below - deployment fails with message . I am failing to understand where this is going wrong. ==== $ gcloud iam service-accounts get-iam-policy…
npr
  • 4,325
  • 4
  • 20
  • 30
36
votes
6 answers

How to login to Google API with Service Account in C# - Invalid Credentials

I'm beating myself bloody trying to get a simple service acccount login to work in C#, to Google API and Google Analytics. My company is already getting data into Analytics, and I can query information with their Query Explorer, but getting started…
35
votes
2 answers

Adding roles to service accounts on Google Cloud Platform using REST API

I want to create a service account on GCP using a python script calling the REST API and then give it specific roles - ideally some of these, such as roles/logging.logWriter. First I make a request to create the account which works fine and I can…
Robert Lacok
  • 4,176
  • 2
  • 26
  • 38
31
votes
2 answers

How do you enable "iam.serviceAccounts.actAs" permissions on a sevice account?

I am trying to deploy a service with a non-default service account by following this guide and it says I need "the iam.serviceAccounts.actAs permission on the service account being deployed". The service account I am using is…
25
votes
3 answers

Who owns calendars created by service account via Google Calendar API and how can they be shared?

Let's say I have a Google account some.account@gmail.com with project project-1 (configured as Google App Engine application in Google Developer Console) and a service account with e-mail address 12..@developer.gserviceaccount.com that belong to…
Drux
  • 11,992
  • 13
  • 66
  • 116
24
votes
2 answers

How to properly create gcp service-account with roles in terraform

Here is the terraform code I have used to create a service account and bind a role to it: resource "google_service_account" "sa-name" { account_id = "sa-name" display_name = "SA" } resource "google_project_iam_binding"…
23
votes
6 answers

Can we access GMAIL API using Service Account?

I have a desktop application to read mail using GMAIL API over REST Interface. I want to use service account so that we can download the mails using domain setting and user interaction is null. I am successfully able to create Gmail Service instance…
Haseena Parkar
  • 939
  • 2
  • 12
  • 28
1
2 3
99 100