Skip to content

Commit

Permalink
docs: add more warnings for default secrets and docker-compose (apach…
Browse files Browse the repository at this point in the history
…e#27921)

Co-authored-by: Sam Firke <[email protected]>
  • Loading branch information
2 people authored and qleroy committed Apr 28, 2024
1 parent 94066d1 commit 85fe972
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docker-compose-image-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

# -----------------------------------------------------------------------
# We don't support docker-compose for production environments.
# If you choose to use this type of deployment make sure to
# create you own docker environment file (docker/.env) with your own
# unique random secure passwords and SECRET_KEY.
# -----------------------------------------------------------------------
x-superset-image: &superset-image apachesuperset.docker.scarf.sh/apache/superset:${TAG:-latest}
x-superset-depends-on: &superset-depends-on
- db
Expand Down
7 changes: 7 additions & 0 deletions docker-compose-non-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

# -----------------------------------------------------------------------
# We don't support docker-compose for production environments.
# If you choose to use this type of deployment make sure to
# create you own docker environment file (docker/.env) with your own
# unique random secure passwords and SECRET_KEY.
# -----------------------------------------------------------------------
x-superset-depends-on: &superset-depends-on
- db
- redis
Expand Down
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

# -----------------------------------------------------------------------
# We don't support docker-compose for production environments.
# If you choose to use this type of deployment make sure to
# create you own docker environment file (docker/.env) with your own
# unique random secure passwords and SECRET_KEY.
# -----------------------------------------------------------------------
x-superset-user: &superset-user root
x-superset-depends-on: &superset-depends-on
- db
Expand Down
6 changes: 6 additions & 0 deletions docker/.env
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#


COMPOSE_PROJECT_NAME=superset

# database configurations (do not modify)
DATABASE_DB=superset
DATABASE_HOST=db
# Make sure you set this to a unique secure random value on production
DATABASE_PASSWORD=superset
DATABASE_USER=superset

EXAMPLES_DB=examples
EXAMPLES_HOST=db
EXAMPLES_USER=examples
# Make sure you set this to a unique secure random value on production
EXAMPLES_PASSWORD=examples
EXAMPLES_PORT=5432

Expand All @@ -34,6 +38,7 @@ DATABASE_PORT=5432
DATABASE_DIALECT=postgresql
POSTGRES_DB=superset
POSTGRES_USER=superset
# Make sure you set this to a unique secure random value on production
POSTGRES_PASSWORD=superset
#MYSQL_DATABASE=superset
#MYSQL_USER=superset
Expand All @@ -52,6 +57,7 @@ CYPRESS_CONFIG=false
SUPERSET_PORT=8088
MAPBOX_API_KEY=''

# Make sure you set this to a unique secure random value on production
SUPERSET_SECRET_KEY=TEST_NON_DEV_SECRET

ENABLE_PLAYWRIGHT=false
Expand Down
4 changes: 4 additions & 0 deletions docs/docs/installation/configuring-superset.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ SECRET_KEY = 'YOUR_OWN_RANDOM_GENERATED_SECRET_KEY'

You can generate a strong secure key with `openssl rand -base64 42`.

:::caution Your secret key will be used for securely signing session cookies
and encrypting sensitive information stored in Superset's application metadata database.
Make sure you are changing this key for your deployment with a strong key.

#### Rotating to a newer SECRET_KEY

If you wish to change your existing SECRET_KEY, add the existing SECRET_KEY to your `superset_config.py` file as
Expand Down

0 comments on commit 85fe972

Please sign in to comment.