Skip to content

BR: --crypter.key & --full-backup-storage are not redacted from the log #57585

@kennytm

Description

@kennytm

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

br restore point -s 's3://foo/bar/?access-key=SecretValue&secret-access-key=SuperSecretValue' \
    --full-backup-storage 's3://foo/bar2/?access-key=SecretValue&secret-access-key=SuperSecretValue' \
    --s3.endpoint http://127.0.0.1:9999 \
    --crypter.method aes128-ctr \
    --crypter.key 537570657253656372657456616C7565

then read the first few lines of the BR log

2. What did you expect to see? (Required)

The secret keys "SecretValue", "SuperSecretValue" and "537570657253656372657456616C7565" do not appear in the log.

3. What did you see instead (Required)

They are written in plaintext.

[2024/11/21 16:03:36.806 +08:00] [INFO] [common.go:765] [arguments] [__command="br restore point"] [crypter.key=537570657253656372657456616C7565] [crypter.method=aes128-ctr] [full-backup-storage="s3://foo/bar2/?access-key=SecretValue&secret-access-key=SuperSecretValue"] [s3.endpoint=http://127.0.0.1:9999] [storage=s3://foo/bar/]

4. What is your TiDB version? (Required)

BR v8.4.0, v8.2.0, v7.5.4, v7.1.5 (probably every version)

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects-6.1This bug affects the 6.1.x(LTS) versions.affects-6.5This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.component/brThis issue is related to BR of TiDB.severity/majortype/bugThe issue is confirmed as a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions