Repository navigation
Cherry pick #117429 to 26.9: Mask secrets in SHOW CREATE DATABASE of a Backup database - #121968
Conversation
`SHOW CREATE DATABASE` of a `Backup` database renders the locator as the function it is since #118674, so the pre-existing nested-`S3` rule redacts it. What is left are the shapes that rule does not model, and the messages that reject a locator: - A `Backup` engine with an arity other than two, or with a first argument that is no literal, hides every argument: a locator can be written in either position, and the statement is formatted for logging before validation rejects it. - A locator whose engine is not `S3` keeps its engine name and argument count and hides every argument, unless the engine reads exactly the literal arguments it accepts, which name a destination and no credential (`File`, `Disk`, `Memory`, `Null`). - An `AzureBlobStorage` backup destination reads a different signature than the table engine of the same name: a shared access signature beside a two-argument url, an `account_key` in the longer forms, named-collection overrides. It gets its own rule, and both rules now fail closed on an argument that neither `maskAzureConnectionString` nor the plain-account-url check can read, instead of leaving it visible. - `BackupInfo::fromAST`, `checkAndGetLiteralArgument` for `database_name`, `StorageS3Configuration::collectCredentials` and the two duplicate-definition checks of `BackupMetadataFinder` formatted the argument they reject into their messages, which reach the error log and `query_log.exception`. A nested map such as `headers(..)` is masked only by its enclosing formatter, so one formatted on its own prints its values: none of these echoes the argument now. Rebased on #118674 and reduced to the above. The definition rendering, the acceptance of a locator held in a string literal on the metadata-replay paths and the preflight refusal of one elsewhere are that PR's, and its own tests cover them.
…-secret Mask secrets in SHOW CREATE DATABASE of a Backup database
These four conflict on a prerequisite that is missing from every release branch, and the backport cannot be green without itThe conflicts are not a bad cherry-pick. All four branches lack #118674 ("Keep a Resolving the merge is the smaller half of the problem. Two of #117429's own tests assert a display surface that only #118674 produces:
Both surfaces are
That makes this a decision rather than a merge:
@jkartseva which of the two would you prefer? I have pushed nothing and opened no PR. For the record, the masking machinery itself ( |
|
The |
0d397c1 to
0baff46
Compare
Original pull-request #117429
Do not merge this PR manually
This pull-request is a first step of an automated backporting.
It contains changes similar to calling
git cherry-picklocally.If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.
The check results does not matter at this step - you can safely ignore them.
Before you resolve anything
Conflicts are often caused by a prerequisite change that has not been backported yet, rather than by a real divergence. The bot re-tries this cherry-pick against the release branch on every run, so if that is the case here it will merge itself as soon as the prerequisite lands, and you will see a comment saying so. Manual resolution is only needed while the conflict persists.
Troubleshooting
If the conflicts were resolved in a wrong way
If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:
pr-cherrypicklabel from the PRYou also need to check the Original pull-request for
pr-backports-createdlabel, and delete if it's presented thereThe PR source
The PR is created in the CI job