Security Best Practices
Keep your API credentials and user data secure by following these best practices.
Credential Management
Never Commit Secrets
Never commit API keys, tokens, or credentials to version control.
Use Environment Variables
Store credentials in environment variables, not in code:
Rotate Credentials Regularly
- Rotate API keys every 90 days
- Immediately rotate if you suspect compromise
- Use short-lived tokens when possible
Token Security
Store Tokens Securely
Browser Applications:
- Use
httpOnlycookies for refresh tokens - Store access tokens in memory only
- Never use localStorage for sensitive tokens
Server Applications:
- Use encrypted environment variables
- Consider secrets managers (Doppler, dotenvx, Vault)
- Never log tokens
Token Expiration
Our tokens have the following lifetimes:
API Security
Use HTTPS Always
All API requests must use HTTPS. HTTP requests will be rejected.
Validate Input
Always validate and sanitize user input before sending to the API:
Rate Limit Handling
Implement exponential backoff for rate-limited requests:
Data Protection
Handle Sensitive Data Carefully
- Encrypt sensitive data at rest
- Use TLS for data in transit
- Minimize data collection
- Implement data retention policies
FOIA Request Privacy
When using the FOIA Dashboard:
- User request data is encrypted
- Personal information is isolated per user
- We comply with GDPR and CCPA
- You can request data export or deletion
Reporting Vulnerabilities
If you discover a security vulnerability, please report it responsibly:
- Email: security@theholefoundation.org
- Do not disclose publicly until we’ve addressed it
- Include steps to reproduce
- We aim to respond within 48 hours
Security Headers
Our API responses include security headers:
Compliance
The HOLE Foundation API is designed with compliance in mind:
- SOC 2 Type II - Security controls audited
- GDPR - EU data protection compliance
- CCPA - California privacy compliance
- HIPAA - Healthcare data handling (when applicable)
Questions?
- 📧 Security Team: security@theholefoundation.org
- 📚 Documentation: Authentication Guide
- 🔐 Auth0 Docs: Auth0 Security