0
0
GCPcloud~5 mins

Environment variables and secrets in GCP - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What are environment variables in cloud applications?
Environment variables are key-value pairs used to store configuration settings outside the code. They help apps know things like database addresses or API keys without hardcoding them.
Click to reveal answer
beginner
Why should secrets not be stored directly in environment variables?
Storing secrets directly in environment variables can expose sensitive data if logs or error messages leak them. Instead, secrets should be stored securely using dedicated secret management services.
Click to reveal answer
beginner
What GCP service is recommended for managing secrets securely?
Google Cloud Secret Manager is the recommended service to store, manage, and access secrets securely in GCP projects.
Click to reveal answer
intermediate
How does an application access secrets stored in Google Cloud Secret Manager?
The application uses the Secret Manager API or client libraries to fetch secrets at runtime, ensuring secrets are not stored in code or environment variables directly.
Click to reveal answer
intermediate
What is a best practice when using environment variables and secrets in cloud apps?
Use environment variables for non-sensitive config and Secret Manager for sensitive data. Limit access permissions and rotate secrets regularly to keep data safe.
Click to reveal answer
Which GCP service is designed specifically to store and manage secrets securely?
AGoogle Cloud Storage
BGoogle Cloud Pub/Sub
CGoogle Cloud Secret Manager
DGoogle Cloud Functions
Why is it risky to store secrets directly in environment variables?
AThey can be exposed in logs or error messages
BThey are encrypted automatically
CThey are only accessible by admins
DThey cannot be changed once set
What is a good use for environment variables in cloud apps?
AStoring database connection strings without passwords
BStoring user passwords
CStoring API keys in plain text
DStoring large files
How should an app retrieve secrets from Google Cloud Secret Manager?
ADownloading secrets manually before deployment
BHardcoding secrets in the app code
CStoring secrets in environment variables permanently
DUsing Secret Manager API or client libraries at runtime
Which practice helps keep secrets safe in cloud environments?
AShare secrets openly among all team members
BRotate secrets regularly and limit access permissions
CStore secrets in public repositories
DUse the same secret for all services
Explain how environment variables and secrets should be managed in a GCP cloud application.
Think about separating config from secrets and how GCP helps secure secrets.
You got /5 concepts.
    Describe the risks of storing secrets directly in environment variables and how to mitigate them.
    Consider what can happen if secrets are exposed and how to keep them safe.
    You got /5 concepts.