Commit Graph
13 Commits
Author SHA1 Message Date
Kenneth Skovhede 4bba0d4a41 Updated unmasking to support values from persisted ConnectionStrings 2026-02-19 16:35:49 +01:00
Kenneth Skovhede ea6d94b035 Added support for storing multiple targets in database with backwards compatibility. 2026-02-18 11:06:08 +01:00
Kenneth Skovhede 9dd6dba0c2 Merge remote-tracking branch 'origin/master' into feature/add-destination-repo 2026-02-05 10:26:45 +01:00
Kenneth Skovhede e009a0f3ec Remote source masking and encrypting
This PR adds masking to remote sources so the passwords are not leaked to the browser. The logic works the same as for TargetURL, where the sensitive fields are replaced by a password placeholder before being transmitted via the endpoints.

When data returns, the masking is removed by looking at the original source and the unmasked value is then encrypted before being stored in the database.

Since the sources is an array and not just a single field, the logic here uses the mount point as a "key" for figuring out which new sources map to the original sources. This is robust in the face of re-ordering, deletions and additions.

If there is just a single remote source (assumed most common) this will match even if the prefix does not, making it possible to change the prefix in this case.

For multi-remote sources, it is not possible to change the prefix without also re-typing all masked properties.

If there is a need later, we could extend the matching to look for how many unique protocols are there, and maybe servers as well to try to match better when the prefixes have been renamed.

There is a guard right before saving a source that rejects it if the source contains the placeholder so we ensure that even faulty logic cannot persist an invalid connection string.
2026-01-30 14:36:57 +01:00
Kenneth Skovhede cf17d2617e Added a connection string repo
This adds a connection string repo, where connection strings can be stored.

The general idea is that it is possible to store connection strings, say an S3 connection, and then re-use the connection string for multiple backups, editing as needed.

The implementation supports listing connection strings, creating, updating, and deleting them.

The connection strings are masked so sensitive information is not available in the browser, and the logic patches connection strings internally to ensure markers are replaced with the correct values.

The connection string itself is stored in full, such that a Duplicati version roll-back will not make the connectionstring become invalid.

There is also an endpoint that allows updating existing backups using the connection string, so it is easy to rotate keys. The logic for this feature is that it retains: scheme, port, host, path, and any extra settings on the target url.
It does not remove settings from the target, but will overwrite or add settings from the connectionstring.
2026-01-30 13:59:47 +01:00
Kenneth Skovhede 247131118e Fixed edge cases for Clone 2025-11-03 19:24:16 +01:00
Kenneth Skovhede d39f6f4719 Temporary backups return deep copies
This PR fixes an issue with restore from config that would mask the internal objects passphrase and cause all requests to fail due to invalid passphrase.
2025-11-03 19:03:16 +01:00
Kenneth Skovhede 55478523aa Fixed masked passwords breaking test function
This updates the masked password feature to be better at detecting variations of the password mask, such as removing one or more asterisks from the string.

This also updates the "Test destination" endpoints to support a backupId so the call can unmask the target urls.
2025-09-25 13:11:39 +02:00
Kenneth Skovhede 34b6f9ea55 Implemented remotely managed backup configurations
This PR adds the ability to manage backup configurations outside of the the client.

The implementation ensures that locally created configurations cannot be affected by the remotely managed backups.

If the instance is not connected to a remote console, this has no effect.

This PR updates the local database to add the column `ExternalID` that tracks backups that are managed remotely.
2025-09-17 15:07:09 +02:00
Kenneth Skovhede 45f902594e Mask passwords to avoid leaking them in the UI
This PR adds a masking function that replaces sensitive parameters with a masking string, such that the passwords are never submitted to the client during edits.

For now, the export feature (both as JSON and as commandline) do not mask the sensitive parameters.

This fixes #2024
2025-09-04 22:03:10 +02:00
Kenneth Skovhede d34b20d38a Remove Sia backend
The Sia backend implementation is based on the previous version of Sia and will no longer work after the hard fork later this year.
2025-05-22 15:28:59 +02:00
Kenneth SkovhedeandGitHub 9464caf622 Feature/update license 2025 (#5851)
* Fixed some minor whitespace issues

* Updated all copyright to 2025
2025-01-07 09:40:39 +01:00
Kenneth Skovhede d1008bc7a2 Fix the Duplicati.Library.RestAPI path.
It was previously located in the root, but placed correctly in the solution file.
2024-08-27 08:30:26 +02:00