Skip to content

Commit

Permalink
fix: remove default secret key from helm (apache#23916)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgaspar authored Nov 29, 2023
1 parent ea1a96e commit 6a5a765
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion helm/superset/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ maintainers:
- name: craig-rueda
email: [email protected]
url: https://github.com/craig-rueda
version: 0.10.15
version: 0.11.0
dependencies:
- name: postgresql
version: 12.1.6
Expand Down
8 changes: 7 additions & 1 deletion helm/superset/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ NOTE: This file is generated by helm-docs: https://github.com/norwoodj/helm-docs

# superset

![Version: 0.10.15](https://img.shields.io/badge/Version-0.10.15-informational?style=flat-square)
![Version: 0.11.0](https://img.shields.io/badge/Version-0.11.0-informational?style=flat-square)

Apache Superset is a modern, enterprise-ready business intelligence web application

Expand All @@ -40,6 +40,12 @@ helm repo add superset http://apache.github.io/superset/
helm install my-superset superset/superset
```

Make sure you set your own `SECRET_KEY` to something unique and secret. This secret key is used by Flask for
securely signing the session cookie and will be used to encrypt sensitive data on Superset's metadata database.
It should be a long random bytes or str.

On helm this can be set on `extraSecretEnv.SUPERSET_SECRET_KEY` or `configOverrides.secrets`

## Requirements

| Repository | Name | Version |
Expand Down
6 changes: 6 additions & 0 deletions helm/superset/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ helm repo add superset http://apache.github.io/superset/
helm install my-superset superset/superset
```

Make sure you set your own `SECRET_KEY` to something unique and secret. This secret key is used by Flask for
securely signing the session cookie and will be used to encrypt sensitive data on Superset's metadata database.
It should be a long random bytes or str.

On helm this can be set on `extraSecretEnv.SUPERSET_SECRET_KEY` or `configOverrides.secrets`

{{ template "chart.requirementsSection" . }}

{{ template "chart.valuesSection" . }}
1 change: 0 additions & 1 deletion helm/superset/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ DATA_CACHE_CONFIG = CACHE_CONFIG

SQLALCHEMY_DATABASE_URI = f"postgresql+psycopg2://{env('DB_USER')}:{env('DB_PASS')}@{env('DB_HOST')}:{env('DB_PORT')}/{env('DB_NAME')}"
SQLALCHEMY_TRACK_MODIFICATIONS = True
SECRET_KEY = env('SECRET_KEY', 'thisISaSECRET_1234')

class CeleryConfig:
imports = ("superset.sql_lab", )
Expand Down
2 changes: 2 additions & 0 deletions helm/superset/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ extraSecretEnv: {}
# # Google API Keys: https://console.cloud.google.com/apis/credentials
# GOOGLE_KEY: ...
# GOOGLE_SECRET: ...
# # Generate your own secret key for encryption. Use openssl rand -base64 42 to generate a good key
# SUPERSET_SECRET_KEY: 'CHANGE_ME_TO_A_COMPLEX_RANDOM_SECRET'

# -- Extra files to mount on `/app/pythonpath`
extraConfigs: {}
Expand Down

0 comments on commit 6a5a765

Please sign in to comment.