Overview
Security is a core value at Iqra AI, viewed as an Amanah (Trust) between the platform and its users. This guide covers security best practices for self-hosted deployments, helping you protect user data, maintain compliance, and prevent security incidents.Security principles
Iqra AI follows these security principles:- Defense in depth - Multiple layers of security controls
- Least privilege - Minimum permissions required for operation
- Secure by default - New resources start in the most secure state
- Transparency - Clear security policies and incident response
Network security
Firewall configuration
Only expose necessary ports to the public internet:These firewall rules are documented in the Security Policy at
SECURITY.md:58.Internal network isolation
Use Docker networks or VPCs to isolate services:TLS/SSL configuration
Use a reverse proxy with valid SSL certificates:Authentication and authorization
Change default credentials
Immediately change the default admin credentials:API secret tokens
Generate cryptographically secure API keys for internal service communication:Server API keys
Each regional server requires a unique API key (minimum 32 characters):Data protection
Encryption at rest
Encrypt sensitive data stored in MongoDB:Encryption in transit
All network communication should use TLS:- Frontend ↔ Backend: HTTPS (enforced by reverse proxy)
- Backend ↔ MongoDB: MongoDB TLS connection
- Backend ↔ Redis: Redis TLS/SSL mode
- Backend ↔ LLM APIs: HTTPS (built into integrations)
Secure sessions (PCI-DSS compliance)
Iqra AI includes a Secure Sessions feature for handling sensitive data like credit card numbers:How secure sessions work
How secure sessions work
The Secure Sessions system creates a “clean room” for sensitive data:
- Conversation enters secure mode via script action
- Audio/DTMF input is processed by deterministic engine only
- AI receives validation results, never raw sensitive data
- Data is masked in logs and recordings
- Session exits secure mode after data collection
- Payment card information
- Social security numbers
- Health information (PHI)
- Any regulated data
Access control
Principle of least privilege
Grant minimum necessary permissions: MongoDB user permissions:SSH hardening
Secure SSH access to servers:Compliance
Data residency
For deployments requiring data to remain in specific jurisdictions:Iqra AI Enterprise supports dedicated infrastructure for GCC nations and other regions with strict data residency requirements. Contact sales for details.
GDPR compliance
For European deployments:- Data minimization: Only collect necessary conversation data
- Right to erasure: Implement data deletion workflows
- Data portability: Provide export functionality for user data
- Consent management: Track user consent for data processing
- Privacy by design: Enable secure sessions for sensitive data
Audit logging
Maintain audit logs for compliance:Vulnerability management
Reporting vulnerabilities
If you discover a security vulnerability:Email security team
Send details to [email protected]
Include required information
- Type of issue (XSS, Injection, RCE, etc.)
- Proof of concept or reproduction steps
- Impact assessment
Supported versions
| Version | Supported |
|---|---|
| Latest | ✅ Always run the latest stable release or main branch |
| < 1.0 | ❌ No security patches for pre-release versions |
Update policy
Stay current with security updates:- Monitor releases: Watch the GitHub repository for security releases
- Test updates: Validate in staging environment first
- Apply promptly: Deploy security patches within 7 days
- Document changes: Maintain change log for compliance audits
Incident response
Incident response plan
Prepare for security incidents before they occur:Detection
Monitor for security events:
- Failed authentication attempts
- Unusual access patterns
- System resource anomalies
- Database connection from unexpected IPs
Containment
Immediate actions:
- Isolate affected systems
- Revoke compromised credentials
- Enable maintenance mode if needed
Investigation
Analyze the incident:
- Review audit logs
- Check system logs
- Identify attack vector
- Assess scope of compromise
Recovery
Restore normal operations:
- Validate all systems are secure
- Re-enable disabled services
- Monitor for recurrence
Data breach notification
If a data breach affects user data:- Assess impact: Determine what data was exposed
- Notify users: Within 72 hours per GDPR requirements
- Notify authorities: If required by local regulations
- Provide support: Offer credit monitoring or other remediation
- Document incident: Create detailed post-mortem
Iqra Cloud (SaaS) follows the same process, as documented in
SECURITY.md:65.Security checklist
Before going to production:- Changed default admin credentials
- Generated unique API keys for all servers (≥32 chars)
- Configured firewall (allow 80/443/10000-20000, block 27017/6379)
- Enabled HTTPS with valid SSL certificates
- Configured MongoDB authentication and encryption
- Configured Redis authentication
- Isolated databases on internal network only
- Disabled password-based SSH authentication
- Implemented audit logging
- Documented incident response plan
- Set up security monitoring and alerts
- Reviewed and tested backup/recovery procedures
Best practices summary
Do’s
- Change all defaults - Never use default passwords or keys
- Use strong encryption - TLS for transit, encryption for rest
- Apply least privilege - Minimum permissions required
- Monitor continuously - Log and alert on security events
- Update regularly - Apply security patches promptly
- Test backups - Verify recovery procedures work
Don’ts
- Don’t expose databases - MongoDB and Redis must be internal only
- Don’t reuse credentials - Unique keys per server/region
- Don’t skip HTTPS - Required for WebRTC functionality
- Don’t ignore alerts - Investigate all security events
- Don’t report publicly - Use [email protected] for vulnerabilities
Next steps
Multi-region
Deploy secure infrastructure across multiple regions
Monitoring
Set up security monitoring and alerting