Securing Your Superset Installation for Production
This guide applies to Apache Superset version 4.0 and later and is an evolving set of best practices that administrators should adapt to their specific deployment architecture.
The default Apache Superset configuration is optimized for ease of use and development, not for security. For any production deployment, it is critical that you review and apply the following security configurations to harden your instance, protect user data, and prevent unauthorized access.
This guide provides a comprehensive checklist of essential security configurations and best practices.
Critical Prerequisites: HTTPS/TLS Configuration
Running Superset without HTTPS (TLS) is not secure. Without it, all network traffic—including user credentials, session tokens, and sensitive data—is sent in cleartext and can be easily intercepted.
- Use a Reverse Proxy: Your Superset instance should always be deployed behind a reverse proxy (e.g., Nginx, Traefik) or a load balancer (e.g., AWS ALB, Google Cloud Load Balancer) that is configured to handle HTTPS termination.
- Enforce Modern TLS: Configure your proxy to enforce TLS 1.2 or higher with strong, industry-standard cipher suites.
- Implement HSTS: Use the HTTP Strict Transport Security (HSTS) header to ensure browsers only connect to your Superset instance over HTTPS. This can be configured in your reverse proxy or within Superset's Talisman settings.
SUPERSET_SECRET_KEY Management (CRITICAL)
This is the most critical security setting for your Superset instance. It is used to sign all session cookies and encrypt sensitive information in the metadata database, such as database connection credentials.
- Generate a Unique, Strong Key: A unique key must be generated for every Superset instance. Use a cryptographically secure method to create it.
# Example using openssl to generate a strong key
openssl rand -base64 42 - Store the Key Securely: The key must be kept confidential. The recommended approach is to store it as an environment variable or in a secrets management system (e.g., AWS Secrets Manager, HashiCorp Vault). Do not hardcode the key in
superset_config.pyor commit it to version control.# In superset_config.py
import os
SECRET_KEY = os.environ.get('SUPERSET_SECRET_KEY')
⚠️ Warning: Your
SUPERSET_SECRET_KEYMust Be Unique