Production Hardening
Security hardening recommendations for production Infisical deployments
This document provides specific security hardening recommendations for production Infisical deployments. These recommendations follow Infisical’s security model and focus on defense in depth.
Choose your deployment method below and follow the recommendations for your specific setup. Start with Universal Security Fundamentals that apply to all deployments, then follow your deployment-specific section.
Universal Security Fundamentals
These security configurations apply to all Infisical deployments regardless of how you deploy.
Cryptographic Security
Generate Secure Keys
Generate strong cryptographic keys for your deployment:
Configure Token Lifetimes
Minimize exposure window for compromised tokens:
Network Security
TLS Configuration
Configure HTTPS and secure database connections:
Redis Security
Use authentication and TLS for Redis:
Network Access Controls
Configure network restrictions and firewall rules:
Implement network firewalls. Restrict network access to only necessary services:
- Required ports: Infisical API (8080) and HTTPS (if applicable)
- Database access: Restrict PostgreSQL and Redis to authorized sources only
- Principle: Default deny incoming, allow only required traffic
- Implementation: See your deployment-specific section below for exact configuration
Application Security
Site Configuration
Set proper site URL for your Infisical instance:
SMTP Security
Use TLS for email communications:
Privacy Configuration
Control telemetry and data collection:
Database Security
High Availability Configuration
Configure database read replicas for high availability PostgreSQL setups:
Operational Security
User Access Management
Establish user off-boarding procedures. Remove access promptly when users leave:
- Remove user from organization
- Revoke active service tokens
- Remove from external identity providers
- Audit access logs for the user’s activity
- Rotate any shared secrets the user had access to
Maintenance and Updates
Keep frequent upgrade cadence. Regularly update to the latest Infisical version for your deployment method.
Deployment-Specific Hardening
Docker Deployment
These recommendations are specific to Docker deployments of Infisical.
Container Security
Use read-only root filesystems. Prevent runtime modifications while allowing necessary temporary access:
Note: Infisical requires temporary directory access for:
- Secret scanning operations
- SSH certificate generation and validation
The --tmpfs
mounts provide secure, isolated temporary storage that is:
- Automatically cleaned up on container restart
- Limited in size to prevent disk exhaustion
- Isolated from the host system
- Wiped on container removal
Drop unnecessary capabilities. Remove all Linux capabilities:
Use specific image tags. Never use latest
tags in production:
Resource Management
Set resource limits. Prevent resource exhaustion attacks:
Health Monitoring
Configure health checks. Set up Docker health checks:
Network Security
Host firewall configuration. Configure host-level firewall for Docker deployments:
Maintenance
Regular updates. Monitor Docker Hub for new releases and update your image tags regularly.
Kubernetes Deployment
These recommendations are specific to Kubernetes deployments of Infisical.
Pod Security
Use Pod Security Standards. Apply restricted security profile:
Configure security context. Set comprehensive security context:
Network Security
Configure network policies. Restrict pod-to-pod communication:
Infrastructure firewall considerations. In addition to the universal host firewalls, implement infrastructure-level security:
For cloud deployments (AWS Security Groups, Azure NSGs, or GCP Firewall Rules):
- Allow ingress from load balancer to NodePort/ClusterIP service
- Allow egress to managed databases
- Block all other traffic
For on-premises deployments, ensure node-level firewalls allow:
- Ingress traffic from ingress controllers
- Egress traffic to external services (databases, SMTP)
Access Control
Use dedicated service accounts. Create service accounts with minimal permissions:
Ingress Security
Configure ingress with TLS. Set up secure ingress:
Secret Management
Use Kubernetes secrets. Store sensitive configuration securely:
Note: Kubernetes secrets are only base64-encoded by default and are not encrypted at rest unless you explicitly enable etcd encryption. For production environments, you should:
- Enable etcd encryption at rest to protect secrets stored in the cluster
- Limit access to etcd and Kubernetes API to only trusted administrators
Health Monitoring
Set up health checks. Configure readiness and liveness probes:
Infrastructure Considerations
Use managed databases (if possible). For production deployments, consider using managed PostgreSQL and Redis services instead of in-cluster instances when feasible, as they typically provide better security, backup, and maintenance capabilities.
Maintenance
Regular updates. Monitor Docker Hub for new releases and update your deployment manifests with new image tags regularly.
Linux Binary Deployment
These recommendations are specific to Linux binary deployments of Infisical.
System User Management
Create dedicated user account. Run Infisical under a dedicated service account:
Service Configuration
Configure systemd service. Create a secure systemd service:
Configuration Security
Secure environment configuration. Store environment variables securely:
System Security
Disable memory swapping. Prevent sensitive data from being written to disk:
Disable core dumps. Prevent potential exposure of encryption keys:
File Permissions
Secure file permissions. Set proper permissions on application files:
Network Security
Host firewall configuration. Configure comprehensive firewall for Linux binary deployments:
System Maintenance
Synchronize system clocks. Ensure accurate time for JWT tokens and audit logs:
Regular updates. Monitor Cloudsmith releases for new binary versions and update your installation regularly.
Enterprise Security Features
Hardware Security Module (HSM) Integration
For the highest level of encryption security, integrate with Hardware Security Modules:
HSM integration provides hardware-protected encryption keys stored on tamper-proof devices, offering superior security for encryption operations:
- Supported HSM Providers: Thales Luna Cloud HSM, AWS CloudHSM, Fortanix HSM
- Root Key Protection: HSM encrypts Infisical’s root encryption keys using hardware-protected keys
- Enterprise Requirements: Ideal for government, financial, and healthcare organizations
For complete HSM setup instructions, see the HSM Integration Guide.
External Key Management Service (KMS) Integration
Leverage cloud-native KMS providers for enhanced security and compliance:
Infisical can integrate with external KMS providers to encrypt project secrets, providing enterprise-grade key management:
- Supported Providers: AWS KMS, Google Cloud KMS, Azure Key Vault (coming soon)
- Workspace Key Protection: Each project’s encryption key is protected by your external KMS
- Envelope Encryption: Infisical uses your cloud KMS to encrypt/decrypt project workspace keys, which in turn encrypt the actual secret data
- Compliance: Leverage your cloud provider’s compliance certifications (FedRAMP, SOC2, ISO 27001)
Benefits for Production Deployments
- Separation of Concerns: Keys managed in your cloud infrastructure, separate from Infisical
- Regulatory Compliance: Use your existing compliance-certified KMS infrastructure
- Audit Integration: KMS operations logged in your cloud provider’s audit trails
- Disaster Recovery: Keys backed by your cloud provider’s HA and backup systems
- Access Controls: Leverage your cloud IAM for KMS access management
Configuration Resources
For external KMS configuration, see:
Advanced Security Configurations
Backup Security
Configure backup encryption. Encrypt PostgreSQL backups:
Monitoring and Logging
Implement log monitoring. Set up centralized logging for security analysis and audit trails. Configure your SIEM or logging platform to monitor Infisical operations.
Security Updates
Regular security updates. Monitor the Infisical repository for security updates and apply them promptly.
Compliance and Monitoring
Enterprise Compliance Requirements
For enterprise deployments requiring compliance certifications:
- Implement audit log retention policies
- Set up security event monitoring and alerting
- Configure automated vulnerability scanning
- Establish incident response procedures
- Document security controls for compliance audits
Standards Compliance
FIPS 140-3 Compliance. Infisical is actively working on FIPS 140-3 compliance to meet U.S. and Canadian government cryptographic standards. This will provide validated cryptographic modules for organizations requiring certified encryption implementations.