Commit 751c4c2
committed
Redact plaintext MySQL password from superset entrypoint logs
entrypoint.sh's set -euxo pipefail traced the fully-substituted
superset test_db command, including the plaintext mysql_superset_password
secret, to stderr. Separately, superset test_db itself prints the full
SQLAlchemy connection URI (with password) to stdout. Both ended up in
docker logs / docker service logs superset, and persisted indefinitely
in the host's json-file log driver.
Build the DB URI in a variable with -x off, and pipe test_db's combined
output through a literal-string redaction filter before it reaches
Docker's log driver. -x tracing resumes for the rest of the script.1 parent a459eb7 commit 751c4c2
2 files changed
Lines changed: 20 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
4 | 21 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | 22 | | |
10 | 23 | | |
11 | 24 | | |
| |||
0 commit comments