Commit Graph
12 Commits
Author SHA1 Message Date
Kenneth Skovhede 38164d15cc Improve secret matching
This PR extends the allowed characters in names for secret keys to also include `-` and `_`, allowing keys like `$my-secret-key` which would previously not be matched.

This PR also adds detection of partial matches, so keys that start with the prefix, but do not match are reported as a warning. This could happen if the input key is `$my:secret` because the `:` is not matched. To prevent logging sensitive information, only the number of partial matches is reported, not the values.

It is possible that the user intended for such a value to be a matched key, but it is also possible that this value was meant to be verbatim. We can consider if this should stop the process instead of just emitting a warning, as the user should fix the issue in either case.

The fix for this would be to use the secret provider pattern and change to something that is not partially matched.
2025-06-10 09:40:35 +02:00
Kenneth Skovhede b768d5a226 Added redundant secret provider check
This check only verifies that the secret provider is not faulty, as each provider *should* fail if the values cannot be translated.

With this commit it is explicit, so future modules are ensured to function as expected.
2025-05-16 15:53: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 68fa9afa23 Fixed tests and fixed a missing encode 2024-11-05 12:44:00 +01:00
Kenneth Skovhede 8250a5befa Refactored SecretProviderHelper to replace in Uri instances instead of raw string.
This fixes some issues with URL encoding/decoding.
Due to the legacy class `Duplicati.Library.Utility.Uri` there are two replacements done.
2024-11-04 15:57:56 +01:00
Kenneth Skovhede 76b175905d Fixed setting the default pattern if none was provided by the user 2024-11-01 08:47:36 +01:00
Kenneth Skovhede e690364a47 Added licenses 2024-10-28 08:08:29 +01:00
Kenneth Skovhede 9a89ca5a15 Cleaned up the use of the default pattern to use a single const value.
Added support for inheriting the secret pattern as it is more logical that all settings are carried through to the application.
2024-10-26 08:37:26 +02:00
Kenneth Skovhede 7772658326 Implemented tests for the SecretProviderHelper code 2024-10-25 23:13:38 +02:00
Kenneth Skovhede d641b3cb68 Added support for pass-type keys 2024-10-25 08:00:53 +02:00
Kenneth Skovhede f7e473e67e Fixed signature and nullability issues 2024-10-24 16:52:09 +02:00
Kenneth Skovhede 34d13a20e2 Initial version of the external secret provider 2024-10-24 16:06:59 +02:00