This is the shape of my JSON service account key from Google.
{
"type": "service_account",
"project_id": "",
"private_key_id": "",
"private_key": "",
"client_email": "",
"client_id": "",
"auth_uri": "",
"token_uri": "",
"auth_provider_x509_cert_url": "",
"client_x509_cert_url": "",
}
Which fields should be secret? I mean, I would add most of it to my Git repo, and I would add the private bits as env variables.
Is protecting the private_key
enough?
For example:
account.ts
{
"type": "service_account",
"project_id": "VALUE",
"private_key_id": "VALUE",
"private_key": process.env.PRIVATE_KEY, // Populating it via env variables
"client_email": "VALUE",
"client_id": "VALUE",
"auth_uri": "VALUE",
"token_uri": "VALUE",
"auth_provider_x509_cert_url": "VALUE",
"client_x509_cert_url": "VALUE",
}
Should I also hide the private_key_id
?