Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

protondrive: make cached keys rclone style and not show with `rclone config redacted`

Nick Craig-Wooda5a61f48749a
diff --git a/backend/protondrive/protondrive.go b/backend/protondrive/protondrive.go
index 0aa24d306..d82575aa6 100644
--- a/backend/protondrive/protondrive.go
+++ b/backend/protondrive/protondrive.go
@@ -38,10 +38,10 @@ const (
maxSleep = 2 * time.Second
decayConstant = 2 // bigger for slower decay, exponential
- clientUIDKey = "clientUID"
- clientAccessTokenKey = "clientAccessToken"
- clientRefreshTokenKey = "clientRefreshToken"
- clientSaltedKeyPassKey = "clientSaltedKeyPass"
+ clientUIDKey = "client_uid"
+ clientAccessTokenKey = "client_access_token"
+ clientRefreshTokenKey = "client_refresh_token"
+ clientSaltedKeyPassKey = "client_salted_key_pass"
)
var (
@@ -69,7 +69,7 @@ func init() {
Required: true,
IsPassword: true,
}, {
- Name: "mailboxPassword",
+ Name: "mailbox_password",
Help: `The mailbox password of your two-password proton account.
For more information regarding the mailbox password, please check the
@@ -87,6 +87,34 @@ The value can also be provided with --protondrive-2fa=000000
The 2FA code of your proton drive account if the account is set up with
two-factor authentication`,
Required: false,
+ }, {
+ Name: clientUIDKey,
+ Help: "Client uid key (internal use only)",
+ Required: false,
+ Advanced: true,
+ Sensitive: true,
+ Hide: fs.OptionHideBoth,
+ }, {
+ Name: clientAccessTokenKey,
+ Help: "Client access token key (internal use only)",
+ Required: false,
+ Advanced: true,
+ Sensitive: true,
+ Hide: fs.OptionHideBoth,
+ }, {
+ Name: clientRefreshTokenKey,
+ Help: "Client refresh token key (internal use only)",
+ Required: false,
+ Advanced: true,
+ Sensitive: true,
+ Hide: fs.OptionHideBoth,
+ }, {
+ Name: clientSaltedKeyPassKey,
+ Help: "Client salted key pass key (internal use only)",
+ Required: false,
+ Advanced: true,
+ Sensitive: true,
+ Hide: fs.OptionHideBoth,
}, {
Name: config.ConfigEncoding,
Help: config.ConfigEncodingHelp,
@@ -161,7 +189,7 @@ then we might have a problem with caching the stale data.`,
type Options struct {
Username string `config:"username"`
Password string `config:"password"`
- MailboxPassword string `config:"mailboxPassword"`
+ MailboxPassword string `config:"mailbox_password"`
TwoFA string `config:"2fa"`
// advanced
diff --git a/docs/content/commands/rclone_config_redacted.md b/docs/content/commands/rclone_config_redacted.md
new file mode 100644
index 000000000..e792dde4c
--- /dev/null
+++ b/docs/content/commands/rclone_config_redacted.md
@@ -0,0 +1,43 @@
+---
+title: "rclone config redacted"
+description: "Print redacted (decrypted) config file, or the redacted config for a single remote."
+slug: rclone_config_redacted
+url: /commands/rclone_config_redacted/
+versionIntroduced: v1.64
+# autogenerated - DO NOT EDIT, instead edit the source code in cmd/config/redacted/ and as part of making a release run "make commanddocs"
+---
+# rclone config redacted
+
+Print redacted (decrypted) config file, or the redacted config for a single remote.
+
+## Synopsis
+
+This prints a redacted copy of the config file, either the
+whole config file or for a given remote.
+
+The config file will be redacted by replacing all passwords and other
+sensitive info with XXX.
+
+This makes the config file suitable for posting online for support.
+
+It should be double checked before posting as the redaction may not be perfect.
+
+
+
+```
+rclone config redacted [<remote>] [flags]
+```
+
+## Options
+
+```
+ -h, --help help for redacted
+```
+
+
+See the [global flags page](/flags/) for global options not listed here.
+
+# SEE ALSO
+
+* [rclone config](/commands/rclone_config/) - Enter an interactive configuration session.
+