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:1
Allow HTTP/HTTPS
Ports 80 and 443 for web traffic:
2
Allow RTP for voice
UDP ports 10000-20000 for real-time audio:
3
Block database ports
Ensure MongoDB and Redis are NOT accessible publicly:
4
Enable firewall
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:1
Enable MongoDB encryption
Configure MongoDB with encryption at rest:
2
Generate encryption key
3
Restart 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:1
Deploy region in required country
Create a region in the country with data residency requirements:
2
Configure regional S3
Use object storage physically located in that country:
3
Pin organization to region
Configure organization settings to ensure data never leaves the region.
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:1
Email security team
Send details to security@iqra.bot
2
Include required information
- Type of issue (XSS, Injection, RCE, etc.)
- Proof of concept or reproduction steps
- Impact assessment
3
Wait for acknowledgment
You’ll receive acknowledgment within 48 hours
4
Maintain confidentiality
Do not disclose publicly until a fix is released
Supported 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:1
Detection
Monitor for security events:
- Failed authentication attempts
- Unusual access patterns
- System resource anomalies
- Database connection from unexpected IPs
2
Containment
Immediate actions:
- Isolate affected systems
- Revoke compromised credentials
- Enable maintenance mode if needed
3
Investigation
Analyze the incident:
- Review audit logs
- Check system logs
- Identify attack vector
- Assess scope of compromise
4
Remediation
Fix the vulnerability:
- Apply security patches
- Update configurations
- Rotate credentials
5
Recovery
Restore normal operations:
- Validate all systems are secure
- Re-enable disabled services
- Monitor for recurrence
6
Post-incident review
Learn and improve:
- Document timeline
- Identify root cause
- Update security procedures
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 security@iqra.bot for vulnerabilities
Next steps
Multi-region
Deploy secure infrastructure across multiple regions
Monitoring
Set up security monitoring and alerting