Commit Graph
38 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 94d272e734 Added support for also storing the connectionstringId for additional target urls 2026-02-19 10:41:27 +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 SkovhedeandGitHub 060d83e0d9 Merge branch 'master' into feature/simplify-webmodule-lookups 2025-09-23 13:14:44 +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 2822e95626 Simplify webmodule lookups
This PR adds the lookup data to the module output, such that the FE does not need to call a webmodule to get the dictionaries with lookup values.
2025-09-05 10:49:20 +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 c8b9fb5c73 Websocket subscriptions
This PR adds the ability to subscribe to messages over a websocket.

To prevent polling data, the server can now push messages through the websocket, so the client can instantly update when new data is available.

The change is backwards compatible, still serving the status updates over the socket. If the client is providing the authentication token, it is auto-subscried to the legacy status message.

If the client is using the new authentication message, it needs to subscribe to get the status updates (and any other services it needs).

The event system has been extended to support new, and more accurate, events. This is the first step towards removing the general status update and the long-poll mechanism.

This also re-introduces the blocking marker, so the client can know if the operation is halted due to too many pending transfers.

Some endpoints have been moved to service implementations, to allow serving the exact same data from both endpoints and websocket.

This PR also updates the way the progress is handled, so that all transfers are returned to the client, and the transfer speeds for each transfer is calculated based on a small sample buffer, so the values are more accurate even if the program is paused during transfers.
2025-05-27 12:13:07 +02:00
Kenneth Skovhede 16acb282c9 More FIXMEGlobal cleanup 2025-05-03 15:54:23 +02:00
Kenneth Skovhede 072f89c747 Remove WorkerThread class
This removes the WorkerThread class and many of the complications around it.

Instead of having a generic worker, there is now the `QueueRunnerService` which takes on all the resposibilities for handling queued tasks.

This is one step towards removing `FIXMEGlobal`
2025-05-03 15:01:09 +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 f7a804aec7 Removed unused files and methods 2024-08-13 22:37:36 +02:00
Kenneth Skovhede e980d7daee This adds back the missing ProposedSchedule to the server state.
This handles the missing information part in #5436
2024-08-13 22:24:15 +02:00
Kenneth Skovhede c9f8e5786c Minor fixes 2024-06-20 22:22:49 +02:00
Kenneth Skovhede 9f79025744 Removed HttpServer.
Re-implemented everything using ASP.NET.
Changed some requests to use JSON instead of FORM data.
Some work towards deleting the FIXMEGlobal instance.
Auth is missing, XSRF does not work correctly.
2024-06-07 15:56:43 +02:00
Kenneth Skovhede 115e887802 Implemented new updater logic that supports multi-arch distributions. 2024-03-15 14:18:56 +01:00
Kenneth Skovhede 40dd3c6816 Updated all license mentions to MIT 2024-02-28 15:45:30 +01:00
drwtsn32x 667094c307 undo changes in pr 3847, implement better fix 2019-09-16 21:52:12 -07:00
Rune Henriksen c41f2c6a60 moved all sanitization logic into backup class and moved from regex to using internal Uri library 2018-11-08 20:00:51 +01:00
Rune Henriksen a7909c421c url sanitization to strip tokens and passwords 2018-11-04 22:07:24 +01:00
sffetlio 70febafc2b Add Description field to backups 2018-09-20 14:46:32 +03:00
Kenneth Skovhede 842fd96543 Implemented a new logging system that is more transparent and allows a more granular way of picking log messages.
Added ID's to each log message and each exception to allow later introduction of a Knowledgebase service that explains each error in more detail.
2018-03-15 09:12:34 +01:00
Kenneth Skovhede 11f7660939 Implemented logic to report if the backend is blocking the operation. 2017-09-04 12:15:47 +02:00
Kenneth Skovhede 8d13e698eb Updated copyright notices 2015-01-20 21:44:52 +01:00
Kenneth Skovhede ef1cb1a3dc Added the action field to notifications 2014-08-04 09:06:12 +02:00
Kenneth Skovhede 9223de7df9 Implemented a notification system.
The system works with the tray-icon, but the tray icon does not yet post notifications.
Some work is required to provide meaningful interaction when clicking the notifications.

Implemented a key/value store that allows the UI to save settings and other items.
2014-08-04 01:06:29 +02:00
Kenneth Skovhede 4d2050dff4 Implemented progress reporting from update downloader in the server 2014-07-09 11:52:15 +02:00
Kenneth Skovhede 60d67638c6 Added the update version name to the status output 2014-07-02 15:02:26 +02:00
Kenneth Skovhede bbdf65542c Implemented a crude-version of the auto-update functionality 2014-07-01 22:15:28 +02:00
Kenneth Skovhede a23aeb3716 Added support for keeping temporary backups in server memory so we can do restore on non-persisted backups.
Added type-safe argument passing to the runner.
Added taskID's so the restore dialog can keep track of what tasks it needs to monitor.
2014-03-17 15:27:25 +01:00
Kenneth Skovhede 77c16cc9ed Cleanup removal of long-poll for progress 2014-03-10 15:36:43 +01:00
Kenneth Skovhede 8854f92e43 Updated progress data to work and removed option to long-poll for progress data 2014-03-10 00:16:53 +01:00
Kenneth Skovhede c4d8e8ff98 Fixed a missing interface element 2014-03-04 15:38:25 +01:00
Kenneth Skovhede b145d0c4ab Added DisplayName to server config output 2014-02-24 16:07:48 +01:00
Kenneth Skovhede d14ec9432f Rewrote the storage of backup setups 2013-11-23 14:26:36 +01:00