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.
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.
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.
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.
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