From ea0e299985c38f6594b3e6447718c8b817bf56f9 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Mon, 3 Mar 2025 12:18:18 +0100 Subject: [PATCH 1/9] remove deprecated methods --- .../keychain/KeychainAccessProvider.java | 32 ------------------- .../keychain/KeychainAccessProviderTest.java | 28 ---------------- 2 files changed, 60 deletions(-) delete mode 100644 src/test/java/org/cryptomator/integrations/keychain/KeychainAccessProviderTest.java diff --git a/src/main/java/org/cryptomator/integrations/keychain/KeychainAccessProvider.java b/src/main/java/org/cryptomator/integrations/keychain/KeychainAccessProvider.java index 35799f8..9554989 100644 --- a/src/main/java/org/cryptomator/integrations/keychain/KeychainAccessProvider.java +++ b/src/main/java/org/cryptomator/integrations/keychain/KeychainAccessProvider.java @@ -31,22 +31,6 @@ static Stream get() { @Nls(capitalization = Nls.Capitalization.Title) String displayName(); - /** - * Associates a passphrase with a given key. - *

- * Note: Caller is responsible for zeroing the passphrase array after use. - * - * @param key Key used to retrieve the passphrase via {@link #loadPassphrase(String)}. - * @param passphrase The secret to store in this keychain. - * @throws KeychainAccessException If storing the password failed - * @deprecated Please use {@link #storePassphrase(String, String, CharSequence)} instead - */ - @Deprecated - @ApiStatus.ScheduledForRemoval(inVersion = "1.2.0") - default void storePassphrase(String key, CharSequence passphrase) throws KeychainAccessException { - storePassphrase(key, null, passphrase); - } - /** * Associates a passphrase with a given key and a name for that key. *

@@ -97,22 +81,6 @@ default void storePassphrase(String key, @Nullable String displayName, CharSeque */ void deletePassphrase(String key) throws KeychainAccessException; - /** - * Updates a passphrase with a given key. Noop, if there is no item for the given key. - *

- * Note: Caller is responsible for zeroing the passphrase array after use. - * - * @param key Unique key previously used while {@link #storePassphrase(String, String, CharSequence)} storing a passphrase}. - * @param passphrase The secret to be updated in this keychain. - * @throws KeychainAccessException If changing the password failed - * @deprecated Please use {@link #changePassphrase(String, String, CharSequence)} instead - */ - @Deprecated - @ApiStatus.ScheduledForRemoval(inVersion = "1.2.0") - default void changePassphrase(String key, CharSequence passphrase) throws KeychainAccessException { - changePassphrase(key, null, passphrase); - } - /** * Updates a passphrase with a given key and stores a name for that key. Noop, if there is no item for the given key. *

diff --git a/src/test/java/org/cryptomator/integrations/keychain/KeychainAccessProviderTest.java b/src/test/java/org/cryptomator/integrations/keychain/KeychainAccessProviderTest.java deleted file mode 100644 index 1124fea..0000000 --- a/src/test/java/org/cryptomator/integrations/keychain/KeychainAccessProviderTest.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.cryptomator.integrations.keychain; - -import org.junit.jupiter.api.Test; -import org.mockito.Mockito; - -public class KeychainAccessProviderTest { - - @Test - public void testStorePassphrase() throws KeychainAccessException { - var provider = Mockito.mock(KeychainAccessProvider.class); - Mockito.doCallRealMethod().when(provider).storePassphrase(Mockito.anyString(), Mockito.anyString()); - - provider.storePassphrase("key", "pass"); - - Mockito.verify(provider).storePassphrase("key", null, "pass"); - } - - @Test - public void testChangePassphrase() throws KeychainAccessException { - var provider = Mockito.mock(KeychainAccessProvider.class); - Mockito.doCallRealMethod().when(provider).changePassphrase(Mockito.anyString(), Mockito.anyString()); - - provider.changePassphrase("key", "pass"); - - Mockito.verify(provider).changePassphrase("key", null, "pass"); - } - -} \ No newline at end of file From 46714a59b234ec97245319915399d48271903bc2 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Mon, 3 Mar 2025 12:42:03 +0100 Subject: [PATCH 2/9] remove "requiresOSAuthentication" parameter reverts #41 --- .../keychain/KeychainAccessProvider.java | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/src/main/java/org/cryptomator/integrations/keychain/KeychainAccessProvider.java b/src/main/java/org/cryptomator/integrations/keychain/KeychainAccessProvider.java index 9554989..a9be55b 100644 --- a/src/main/java/org/cryptomator/integrations/keychain/KeychainAccessProvider.java +++ b/src/main/java/org/cryptomator/integrations/keychain/KeychainAccessProvider.java @@ -44,26 +44,7 @@ static Stream get() { * @throws KeychainAccessException If storing the password failed */ @Blocking - default void storePassphrase(String key, @Nullable String displayName, CharSequence passphrase) throws KeychainAccessException { - storePassphrase(key, displayName, passphrase, false); - } - - /** - * Associates a passphrase with a given key and a name for that key. - *

- * Note: Caller is responsible for zeroing the passphrase array after use. - * - * @param key Key used to retrieve the passphrase via {@link #loadPassphrase(String)}. - * @param displayName The according name to the key. That's the name of the vault displayed in the UI. - * It's passed to the keychain as an additional information about the vault besides the key. - * The parameter does not need to be unique or be checked by the keychain. - * @param passphrase The secret to store in this keychain. - * @param requireOsAuthentication Defines, whether the user needs to authenticate to store a passphrase. - * The authentication mechanism is provided by the operating system dependent - * implementations of this API. - * @throws KeychainAccessException If storing the password failed - */ - void storePassphrase(String key, @Nullable String displayName, CharSequence passphrase, boolean requireOsAuthentication) throws KeychainAccessException; + void storePassphrase(String key, @Nullable String displayName, CharSequence passphrase) throws KeychainAccessException; /** * @param key Unique key previously used while {@link #storePassphrase(String, String, CharSequence)} storing a passphrase}. From b0de33448f1d2520e89efb9f7d31ceeb20afc587 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Mon, 3 Mar 2025 12:42:20 +0100 Subject: [PATCH 3/9] make keychainServiceProvider a named one --- .../integrations/keychain/KeychainAccessProvider.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/cryptomator/integrations/keychain/KeychainAccessProvider.java b/src/main/java/org/cryptomator/integrations/keychain/KeychainAccessProvider.java index a9be55b..7dc8457 100644 --- a/src/main/java/org/cryptomator/integrations/keychain/KeychainAccessProvider.java +++ b/src/main/java/org/cryptomator/integrations/keychain/KeychainAccessProvider.java @@ -1,6 +1,7 @@ package org.cryptomator.integrations.keychain; import org.cryptomator.integrations.common.IntegrationsLoader; +import org.cryptomator.integrations.common.NamedServiceProvider; import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.Blocking; import org.jetbrains.annotations.Nls; @@ -11,7 +12,7 @@ /** * This is the interface used by Cryptomator to store passwords securely in external keychains, such as system keychains or password managers. */ -public interface KeychainAccessProvider { +public interface KeychainAccessProvider extends NamedServiceProvider { /** * Loads all available KeychainAccessProvider. @@ -23,14 +24,6 @@ static Stream get() { return IntegrationsLoader.loadAll(KeychainAccessProvider.class).filter(KeychainAccessProvider::isSupported); } - /** - * A name to display in UI elements. If required, this should be localized. - * - * @return user-friendly name (must not be null or empty) - */ - @Nls(capitalization = Nls.Capitalization.Title) - String displayName(); - /** * Associates a passphrase with a given key and a name for that key. *

From e5c21a678e47697ebc7aecbe38c4b7fced80ce52 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Fri, 14 Mar 2025 15:15:55 +0100 Subject: [PATCH 4/9] add gpg key fingerprint to release flows --- .github/workflows/publish-central.yml | 3 ++- .github/workflows/publish-github.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-central.yml b/.github/workflows/publish-central.yml index 0deb07f..58f4e15 100644 --- a/.github/workflows/publish-central.yml +++ b/.github/workflows/publish-central.yml @@ -31,4 +31,5 @@ jobs: MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} MAVEN_GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }} - MAVEN_GPG_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} # Value of the GPG private key to import \ No newline at end of file + MAVEN_GPG_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} # Value of the GPG private key to import + MAVEN_GPG_KEY_FINGERPRINT: ${{ vars.RELEASES_GPG_KEY_FINGERPRINT }} \ No newline at end of file diff --git a/.github/workflows/publish-github.yml b/.github/workflows/publish-github.yml index f71b084..a054e89 100644 --- a/.github/workflows/publish-github.yml +++ b/.github/workflows/publish-github.yml @@ -20,4 +20,5 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} MAVEN_GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }} - MAVEN_GPG_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} # Value of the GPG private key to import \ No newline at end of file + MAVEN_GPG_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} # Value of the GPG private key to import + MAVEN_GPG_KEY_FINGERPRINT: ${{ vars.RELEASES_GPG_KEY_FINGERPRINT }} \ No newline at end of file From f90ce8ba2edc0b6bac9f295a87ea85c9c71e3ef0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 May 2025 08:33:14 +0000 Subject: [PATCH 5/9] Bump the java-test-dependencies group with 2 updates (#58) --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index c6a6d34..78cacec 100644 --- a/pom.xml +++ b/pom.xml @@ -33,8 +33,8 @@ 26.0.2 - 5.12.0 - 5.15.2 + 5.12.1 + 5.16.1 3.14.0 From 790b1a28e269d58463001ef5fe2a4a728af857cd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 May 2025 08:33:34 +0000 Subject: [PATCH 6/9] Bump org.apache.maven.plugins:maven-surefire-plugin (#59) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 78cacec..e601113 100644 --- a/pom.xml +++ b/pom.xml @@ -39,7 +39,7 @@ 3.14.0 3.3.1 - 3.5.2 + 3.5.3 3.11.2 3.2.7 0.7.0 From 3bc62ef465ec6b6b2aa174efda2bc6de3f0f2db6 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Thu, 22 May 2025 11:39:07 +0200 Subject: [PATCH 7/9] deprecate the UIAppearance service --- .../integrations/uiappearance/UiAppearanceProvider.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/org/cryptomator/integrations/uiappearance/UiAppearanceProvider.java b/src/main/java/org/cryptomator/integrations/uiappearance/UiAppearanceProvider.java index 21e805c..51ff94f 100644 --- a/src/main/java/org/cryptomator/integrations/uiappearance/UiAppearanceProvider.java +++ b/src/main/java/org/cryptomator/integrations/uiappearance/UiAppearanceProvider.java @@ -1,12 +1,17 @@ package org.cryptomator.integrations.uiappearance; import org.cryptomator.integrations.common.IntegrationsLoader; +import org.jetbrains.annotations.ApiStatus; import java.util.Optional; /** * This is the interface used by Cryptomator to get os specific UI appearances and themes. + * + * @deprecated Cryptomator uses since version 1.14.0 the JavaFX framework in version 22, which provides via Platform.Preferences the system color scheme */ +@Deprecated(since = "1.6.0") +@ApiStatus.ScheduledForRemoval(inVersion = "1.7.0") public interface UiAppearanceProvider { /** From 94279178f750eb894d4610bdd21c2ad0252ca08c Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Thu, 22 May 2025 11:57:34 +0200 Subject: [PATCH 8/9] deprecate whole uiappearance package --- .../integrations/uiappearance/package-info.java | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/main/java/org/cryptomator/integrations/uiappearance/package-info.java diff --git a/src/main/java/org/cryptomator/integrations/uiappearance/package-info.java b/src/main/java/org/cryptomator/integrations/uiappearance/package-info.java new file mode 100644 index 0000000..9318714 --- /dev/null +++ b/src/main/java/org/cryptomator/integrations/uiappearance/package-info.java @@ -0,0 +1,10 @@ +/** + * Package for getting the OS color theme and listening to theme changes. + * + * @deprecated Cryptomator uses since version 1.14.0 the JavaFX framework in version 22, which provides via Platform.Preferences the system color scheme + */ +@Deprecated(since = "1.6.0") +@ApiStatus.ScheduledForRemoval(inVersion = "1.7.0") +package org.cryptomator.integrations.uiappearance; + +import org.jetbrains.annotations.ApiStatus; \ No newline at end of file From 56ca811585e7d71f0352d44347ae84bb75ae2816 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Thu, 22 May 2025 12:08:59 +0200 Subject: [PATCH 9/9] prepare 1.6.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e601113..200a530 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 org.cryptomator integrations-api - 1.6.0-SNAPSHOT + 1.6.0 Cryptomator Integrations API Defines optional service interfaces that may be used by Cryptomator