Skip to content

fix(mariadb): stop persisting wsrep_sst_auth root credential to the data volume#3057

Draft
weicao wants to merge 1 commit into
mainfrom
fix/mariadb-galera-sst-auth
Draft

fix(mariadb): stop persisting wsrep_sst_auth root credential to the data volume#3057
weicao wants to merge 1 commit into
mainfrom
fix/mariadb-galera-sst-auth

Conversation

@weicao

@weicao weicao commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Fixes #3056 — HIGH: plaintext root credential leaked into Galera volume snapshots.

Root cause in the issue: wsrep_sst_auth (unused under rsync SST) was written to ${DATA_DIR} (needSnapshot:true), so it rode into every snapshot. Change: stop writing it, drop --defaults-extra-file, and scrub any stale file on upgrade.

Validation: helm renders; full mariadb shellspec green (653 examples, 0 failures, 9 pre-existing pendings) incl. new contract spec. Note: snapshots taken before this fix still contain the old credential; root password rotation after upgrade advised. mariadb team full-suite verification per westonnnn.

…ata volume

galera-start.sh wrote wsrep_sst_auth=root:password into
${DATA_DIR}/.galera-sst-auth.cnf. That credential is unused (the addon
uses wsrep_sst_method=rsync, which does not authenticate via
wsrep_sst_auth) and the data volume is needSnapshot:true, so the plaintext
root password rode into every volume snapshot / backup.

Stop writing it and drop the --defaults-extra-file that loaded it; also
remove any stale .galera-sst-auth.cnf left on existing PVs so upgrades
scrub the already-leaked file. If mariabackup SST is adopted later,
wsrep_sst_auth must come from a non-snapshot path (mounted Secret /
conf.d), not ${DATA_DIR}. Adds contract spec; full mariadb suite green.

Fixes #3056
@weicao weicao requested review from a team and leon-ape as code owners July 6, 2026 09:02
@weicao weicao added the nopick Not auto cherry-pick when PR merged label Jul 6, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (893f230) to head (571b57d).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
...ddons/mariadb/scripts-ut-spec/galera_start_spec.sh 0.00% 17 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main   #3057   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files        142     142           
  Lines      22841   22858   +17     
=====================================
- Misses     22841   22858   +17     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@leon-ape leon-ape left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@weicao weicao marked this pull request as draft July 6, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

nopick Not auto cherry-pick when PR merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mariadb: Galera writes plaintext root credential (wsrep_sst_auth) onto the needSnapshot data volume — unused under rsync SST

3 participants