fix(mariadb): stop persisting wsrep_sst_auth root credential to the data volume#3057
Draft
weicao wants to merge 1 commit into
Draft
fix(mariadb): stop persisting wsrep_sst_auth root credential to the data volume#3057weicao wants to merge 1 commit into
weicao wants to merge 1 commit into
Conversation
…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
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.