Can I use a service account outside of GCP on other platforms?

0 votes
Can I use a service account outside of GCP on other platforms? How is this possible?
Oct 30 in GCP by anonymous
• 4,330 points
41 views

1 answer to this question.

0 votes

To use a service account outside of GCP, such as on other platforms or on-premises, you must first establish the identity of the service account. Public/private key pairs provide a secure way of accomplishing this goal.

You can create a service account key using the GCP Console, the gcloud tool, the serviceAccounts.keys.create() method, or one of the client libraries.

In the examples below, [SA-NAME] is the name of your service account, and [PROJECT-ID] is the ID of your Google Cloud Platform project. You can retrieve the [SA-NAME]@[PROJECT-ID].iam.gserviceaccount.com string from the Service Accounts page in the GCP Console.

  1. Open the IAM & Admin page in the GCP Console.

  2. Select your project and click Continue.

  3. In the left nav, click Service accounts.

  4. Look for the service account for which you wish to create a key, click the More more_vert button in that row, and then click Create key.

  5. Select a Key type and click Create.

Note that the privateKeyData returned is a base64-encoded string representation of the TYPE_GOOGLE_CREDENTIALS_FILE value (JSON or P12 key/credentials).

When you create a key, your new public/private key pair is generated and downloaded to your machine; it serves as the only copy of the private key. You are responsible for storing the private key securely. Take note of its location and ensure the key is accessible to your application; it needs the key to make authenticated API calls.

Check this for further details https://cloud.google.com/iam/docs/creating-managing-service-account-keys#iam-service-account-keys-create-console

answered Oct 30 by Sirajul
• 41,000 points
How do I ensure that my service account keys are not compromised?

Related Questions In GCP

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer