Thank you for taking the time to advocate for samples practice improvements!
Description
The Authentication section of the Samples Style Guide includes samples that show the use of a service account key to generate credentials, which are then passed to the client.
Using a service account key is a risky practice, because it involves loading persistent, powerful credentials to your local machine (and possibly into GitHub, etc.).
The presence of the use of a service account key in sample code guides users towards doing that, which is a Bad Thing.
Please remove samples that use service account keys.
We always show some example where you explicitly provide the credentials to the client, but the use case for this is unclear. Perhaps remove it altogether.
One usecase where you might want to provide credentials if they are scoped to a specific scope - e.i. ReadOnly for BIgQuery. Maybe that's a usecase we could show instead?
Thank you for taking the time to advocate for samples practice improvements!
Description
The Authentication section of the Samples Style Guide includes samples that show the use of a service account key to generate credentials, which are then passed to the client.
Using a service account key is a risky practice, because it involves loading persistent, powerful credentials to your local machine (and possibly into GitHub, etc.).
The presence of the use of a service account key in sample code guides users towards doing that, which is a Bad Thing.
Please remove samples that use service account keys.
We always show some example where you explicitly provide the credentials to the client, but the use case for this is unclear. Perhaps remove it altogether.
Impact
Challenge