Article by Moses Frost (@mosesrenegade)
Default Account Information
Service Accounts¶
Service accounts are similar to Azure Service Principals. They can allow for programmatic access but also abuse.
Information on Service Accounts
User-Created Service Account: [email protected]
Using the format above, you can denote the following items:
service-account-name: This will tell you potentially what services this is for:Bigtable-saorcompute-saproject-id: This will be the project identifier that the service account is for. You can set yourgcloudconfiguration to thisproject-id. It will be numerical typically.
Default Service Account filename permutations:¶
serviceaccount.jsonservice_account.jsonsa-private-key.jsonservice-account-file.json
Application-Based Service Account:¶
[email protected]: Ths would beproject-idvalue for App Engine or anything leveraging App Engine.[email protected]: This service account is for Compute Engine where theproject-number-computewill be:project-id-compute. I.E.1234567-compute.
How to use Service Accounts¶
In a BASH (or equivalent) shell: export GOOGLE_APPLICATION_CREDENTIALS="/home/user/Downloads/service-account-file.json"