This project uses sensitive API keys and credentials that must be protected.
- Purpose: Text summarization, AI analytics, voice note processing
- Used in:
main.py,ai_analytics.py,summarize_openai.py - Environment Variable:
OPENAI_API_KEY
- Purpose: Speech-to-Text, Firestore database, Cloud Storage
- Used in:
transcribe.py,firestore_store.py,gcloud_auth.py - Files:
gcloud-key.json, environment variables
- Environment Variables: All sensitive keys are stored in
.envfile - Git Ignore:
.envandgcloud-key.jsonare excluded from version control - Template File:
.env.templateprovides setup instructions without exposing keys - Documentation: This file documents security practices
- Visit OpenAI API Keys Dashboard
- Create a new API key
- Update your
.envfile with the new key - Delete the old key from OpenAI dashboard
- Visit Google Cloud Console
- Go to IAM & Admin > Service Accounts
- Create new key for existing service account
- Replace
gcloud-key.jsonwith new file - Delete old key from console
For production environments:
- Use environment variables instead of
.envfiles - Use secret management services (AWS Secrets Manager, Azure Key Vault, etc.)
- Enable API key restrictions and rate limiting
- Monitor API usage for unusual activity
-
.envfile is not committed to git -
gcloud-key.jsonis not committed to git - All API keys are valid and working
- Team members have their own API keys (don't share)
- API keys have appropriate permissions only
- Immediately rotate all exposed keys
- Check API usage logs for unauthorized activity
- Update all deployment environments
- Review git history to ensure keys weren't committed