API Key Authentication
Protect your Qdrant instance with API keys for authentication.Standard API Key
Set a full-access API key in your configuration:config/config.yaml
Using the API Key
Include the API key in theapi-key header:
Read-Only API Key
Provide read-only access with a separate API key:config/config.yaml
Read-Only Permissions
The read-only API key allows:- ✅ Search and retrieval operations
- ✅ Collection listing and info
- ✅ Point retrieval
- ✅ Scroll and batch retrieval
- ❌ Creating or deleting collections
- ❌ Inserting, updating, or deleting points
- ❌ Creating snapshots
Using Read-Only Key
JWT Role-Based Access Control (RBAC)
For fine-grained access control, enable JWT-based RBAC:config/config.yaml
JWT RBAC allows you to generate tokens with specific permissions for different users or applications. Documentation for generating JWT tokens is available in the Qdrant documentation.
TLS/SSL Configuration
Enable HTTPS and secure gRPC with TLS.Generate Certificates
For development, create self-signed certificates:Enable TLS
config/config.yaml
Docker with TLS
Connect with TLS
Client Certificate Verification
Require clients to present valid certificates:config/config.yaml
Cluster Security
TLS for Inter-Node Communication
Secure communication between cluster nodes:config/config.yaml
Docker Compose Cluster with TLS
docker-compose.yml
Network Security
Bind to Specific Interface
Restrict Qdrant to specific network interfaces:config/config.yaml
Firewall Rules
Configure firewall to restrict access:Kubernetes Network Policies
Restrict pod-to-pod communication:Audit Logging
Track all API access with audit logs:config/config.yaml
Audit Log Format
Audit logs are written as structured JSON:Behind a Reverse Proxy
When running behind nginx or a load balancer:config/config.yaml
Kubernetes Secrets
Store sensitive configuration in Kubernetes Secrets:Security Best Practices
Always Use TLS in Production
Always Use TLS in Production
Enable TLS for all external connections. Never transmit API keys over unencrypted HTTP in production environments.
Rotate API Keys Regularly
Rotate API Keys Regularly
Change API keys periodically and immediately if you suspect compromise. Use different keys for different environments.
Use Read-Only Keys for Analytics
Use Read-Only Keys for Analytics
Provide read-only API keys to analytics tools and dashboards to minimize risk.
Restrict Network Access
Restrict Network Access
Use firewalls and network policies to limit which hosts can connect to Qdrant. Bind to specific interfaces when possible.
Enable Audit Logging
Enable Audit Logging
Track all API access for security monitoring and compliance requirements.
Keep Qdrant Updated
Keep Qdrant Updated
Regularly update to the latest Qdrant version to receive security patches and improvements.
Secure the Host System
Secure the Host System
Harden the operating system, keep it patched, and follow security best practices for the infrastructure running Qdrant.
Use Strong Secrets
Use Strong Secrets
Generate strong, random API keys. Use a password manager or secrets management system.
Security Checklist
1
Generate Strong API Keys
Create random, complex API keys:
2
Enable TLS/SSL
Configure TLS with valid certificates for all external connections.
3
Configure Firewall
Restrict network access to only trusted sources.
4
Enable Audit Logging
Track all API access for security monitoring.
5
Secure Inter-Node Communication
Enable TLS for cluster P2P communication.
6
Regular Updates
Keep Qdrant and dependencies up to date.
Next Steps
Configuration
Complete configuration reference
Distributed Mode
Secure cluster deployments
Kubernetes
Kubernetes security patterns
Docker
Docker security best practices