Security Reference
Comprehensive security guide covering authentication, encryption, compliance, and operational security.Authentication Methods
OLIVE supports multiple authentication mechanisms for different use cases:API Keys
Third-party integrations
Authorization: Bearer olive_live_xxxJWT Tokens
Admin dashboard
Authorization: Bearer eyJhbG...HMAC Signatures
POS terminals
X-Signature + X-TimestampService Auth
Internal servicesShared secrets for Agent-TS
API Key Authentication
API keys are used for third-party integrations:Key Formats
| Environment | Prefix | Example |
|---|---|---|
| Production | olive_live_ | olive_live_abc123xyz |
| Sandbox | olive_test_ | olive_test_abc123xyz |
Key Scopes
| Scope | Access |
|---|---|
read | Balance, transaction history |
write | Create payments, transfers |
admin | User management, settings |
JWT Authentication
Admin dashboard uses JWT tokens:JWT Configuration
HMAC Authentication
POS terminals use HMAC-SHA256 signatures:Required Headers
| Header | Description |
|---|---|
X-Client-ID | Merchant/processor ID |
X-Signature | HMAC-SHA256 signature |
X-Timestamp | Unix timestamp (ms) |
Signatures are valid for 5 minutes. Ensure your server clock is synchronized with NTP.
TLS Configuration
External Traffic (TLS 1.3)
All external traffic uses TLS 1.3:Internal Traffic (mTLS)
gRPC between Gateway and Wallet-Core uses mutual TLS:Certificate Rotation
- Rotate certificates every 90 days
- Use automated renewal (cert-manager, Let’s Encrypt)
- Monitor certificate expiry with alerts
Secrets Management
- Environment Variables
- Kubernetes Secrets
- HashiCorp Vault
Rate Limiting
Configure per-client rate limits:Rate Limit Headers
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests per window |
X-RateLimit-Remaining | Requests remaining |
X-RateLimit-Reset | Window reset timestamp |
Security Layers
Network Layer
Network Layer
- VPC isolation for internal services
- Firewall rules restricting access
- Network policies in Kubernetes
- Private subnets for databases
Transport Layer
Transport Layer
- TLS 1.3 for all external traffic
- mTLS for internal gRPC communication
- Certificate pinning for critical services
- Regular certificate rotation
Application Layer
Application Layer
- JWT/OAuth2 authentication
- API key management with scopes
- Rate limiting per client
- Input validation and sanitization
Data Layer
Data Layer
- Encrypted database connections
- Encryption at rest (optional)
- Comprehensive audit logging
- Idempotency keys for operations
PII and Data Protection
KYC Document Handling
- Documents stored in private S3 bucket
- Access via short-lived pre-signed URLs
- No PII in application logs
- Encryption at rest with KMS
Data Retention
| Data Type | Retention |
|---|---|
| Transaction logs | 7 years |
| Audit logs | 5 years |
| KYC documents | Per regulation |
| Session data | 24 hours |
Compliance
Designed to support:PCI-DSS
Payment card industry standards
GDPR
European data protection
SOC 2 Type II
Security and availability
ISO 27001
Information security management
Threat Mitigation
| Threat | Mitigation |
|---|---|
| DDoS attacks | Rate limiting, load balancing, WAF |
| SQL injection | Parameterized queries, input validation |
| Man-in-the-middle | TLS/mTLS encryption |
| Replay attacks | Idempotency keys, timestamps |
| Privilege escalation | Least privilege, RBAC |
| Credential stuffing | Rate limiting, account lockout |
Security Checklist
Infrastructure
- TLS/mTLS enabled on all services
- Firewall rules configured
- Network policies in place
- VPC isolation for database
Application
- Strong JWT secret (32+ chars)
- Rate limiting enabled
- Input validation active
- Audit logging enabled
Operations
- Monitoring and alerting
- Regular backups
- Incident response plan
- Security training completed