Security Best Practices
Guidelines for secure integration, data handling, and compliance with ContentSellify.
Overview
Security is our top priority at ContentSellify. This guide outlines best practices for keeping your account, products, and customer data safe.
API Security
Protect your API keys and tokens
Payment Security
PCI-compliant payment processing
Data Protection
GDPR & data privacy compliance
1. API Security
Protect Your API Keys
โ Never Do This
- โขCommit API keys to Git repositories
- โขHard-code keys in frontend JavaScript
- โขShare keys in Slack, email, or chat
- โขUse production keys in development
โ Best Practices
- โขStore keys in environment variables (.env)
- โขUse separate keys for development and production
- โขRotate keys every 90 days or after team member leaves
- โขUse read-only keys when write access isn't needed
Environment Variable Example
# .env (add to .gitignore)
CONTENTSELLIFY_API_KEY=csfy_live_abc123...
CONTENTSELLIFY_SECRET_KEY=sk_live_xyz789...
WEBHOOK_SECRET=whsec_def456...
# Never commit these!
# Add .env to your .gitignore:
echo ".env" >> .gitignore2. Authentication & Authorization
๐ Use OAuth 2.0
OAuth provides secure, token-based authentication without exposing user passwords. Always use OAuth for integrations.
โฑ๏ธ Token Expiration
Access tokens expire after 1 hour. Refresh tokens are valid for 30 days. Implement automatic token refresh in your application.
๐ซ Revoke Compromised Tokens
If you suspect a token has been compromised, revoke it immediately from Dashboard โ API Settings โ Active Tokens.
3. Transport Security
๐ Always Use HTTPS
All API requests must be made over HTTPS. HTTP requests are automatically rejected for security.
// โ Good - HTTPS
fetch('https://api.contentsellify.com/products', {
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
}
});
// โ Bad - HTTP (will fail)
fetch('http://api.contentsellify.com/products', ...)๐ฆ TLS 1.2+
Our API requires TLS 1.2 or higher. Older protocols (SSL, TLS 1.0, TLS 1.1) are disabled for security.
4. Payment Security
We handle PCI compliance for you. Customer payment information never touches your servers.
โ We Store
- โข Credit card numbers (encrypted)
- โข CVV codes (temporarily)
- โข Billing addresses
- โข Payment tokens
โ You Receive
- โข Order confirmation
- โข Customer email
- โข Transaction ID
- โข Payment status
5. Data Protection & Privacy
๐ช๐บ GDPR Compliance
We are GDPR compliant. Users can request data exports or account deletion. Data is stored in encrypted databases with regular backups.
๐ Data Minimization
Only collect customer data you need. Don't store sensitive information unnecessarily. Use ContentSellify's built-in customer management.
๐๏ธ Data Retention
Transaction records are kept for 7 years for legal compliance. User data is deleted within 30 days of account deletion request.
6. Webhook Security
Always verify webhook signatures to prevent spoofed events:
const crypto = require('crypto');
function verifyWebhook(payload, signature, secret) {
const hash = crypto
.createHmac('sha256', secret)
.update(JSON.stringify(payload))
.digest('hex');
// Use timing-safe comparison
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(hash)
);
}
// Reject unverified webhooks
if (!verifyWebhook(req.body, req.headers['x-webhook-signature'], secret)) {
return res.status(401).json({ error: 'Invalid signature' });
}Security Checklist
Report Security Issues
๐จ Found a Vulnerability?
We take security seriously. If you discover a security vulnerability, please report it responsibly:
security@bittforge.in
Please do not publicly disclose the issue until we've had a chance to address it. We typically respond within 24 hours.
Related Resources
Questions About Security?
Our security team is here to help with implementation and compliance questions.
Contact Security Team