Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
2d0ab84
First ideas for uvf imple.
chenkins Dec 6, 2024
84b7967
Switch to uvf draft snapshot dependency.
ylangisc Jan 6, 2025
2a6c839
Migrate API changes.
ylangisc Jan 18, 2025
f0ccf71
Extract filename cryptor and provider.
ylangisc Jan 18, 2025
7c823fd
Intermediate interface for Cryptomator stuff.
ylangisc Jan 20, 2025
e59b815
More extraction.
ylangisc Jan 20, 2025
6ea46bc
More extraction.
ylangisc Jan 20, 2025
7163ac8
Review.
ylangisc Feb 6, 2025
2be2d3a
Fix UnsupportedOperationException for fileNameCryptor() without revis…
chenkins Feb 6, 2025
05bf23a
Temporarily skip SFTPCryptomatorInteroperabilityTest because of depen…
chenkins Feb 11, 2025
fb6b006
Switch to byte array for directory ids to avoid lossy data conversion.
ylangisc Feb 24, 2025
21b1fb4
Directory id for root is derived from key material.
ylangisc Feb 25, 2025
e995f33
Fix cryptolib uvfdraft version.
chenkins Feb 25, 2025
eda28a7
Fix typo.
ylangisc Feb 26, 2025
9659027
Metadata file/directory extension is .uvf.
ylangisc Feb 27, 2025
d1803d9
Fix compile.
chenkins Feb 27, 2025
13ae861
Fix base64 URL pattern.
ylangisc Feb 27, 2025
8d504fc
Fix pattern.
ylangisc Feb 27, 2025
647a2f5
Delete unused.
dkocher Mar 6, 2025
eee7a29
Require to pass UVF metadata payload in password callback.
dkocher Mar 6, 2025
121a3ea
Destroy on close.
dkocher Mar 6, 2025
d9a9aee
Add UVF test listing files from vault created with cryptolib.
chenkins Mar 7, 2025
15a1597
Add category TestcontainerTest.
chenkins Mar 7, 2025
f25144a
Fix hostname.
chenkins Mar 7, 2025
6b25812
Simplify setup for uvf integration test.
chenkins Mar 8, 2025
d673ea1
Use expected files.
chenkins Mar 8, 2025
ba45baf
Fix rootDirId handling.
ylangisc Mar 9, 2025
396f0fb
Implement loading dir.uvf using file content encryption instead of ra…
chenkins Mar 9, 2025
388c37d
Verify root dir ID.
chenkins Mar 9, 2025
931a6b0
Use revision from file header in CryptoDirectoryUVFProvider.
chenkins Mar 9, 2025
7023ed3
Implement decrypt respecting revision.
chenkins Mar 11, 2025
088cd5f
Rename.
chenkins Mar 11, 2025
20c1908
Read file in subdir with current revision.
chenkins Mar 11, 2025
b015d05
Add test write and read file UVF.
chenkins Mar 13, 2025
6e99c0d
Add test write UVF ile to subdir.
chenkins Mar 13, 2025
7ef50dd
Add test move UVF file.
chenkins Mar 13, 2025
379676f
Use set equals.
chenkins Mar 13, 2025
c97f6d0
Cleanup.
chenkins Mar 13, 2025
890ca0b
Fix compile.
dkocher Jun 13, 2025
671c01c
Fix uvf integration test.
chenkins Jun 19, 2025
72d795e
Hide directoryId.
ylangisc Jun 26, 2025
38e03a2
Fix UVF impl.
ylangisc Jun 27, 2025
6ff7652
Simplify caching.
ylangisc Jun 27, 2025
56583cf
Base64URL encoded seeds.
ylangisc Jun 27, 2025
51b58de
Add UVF directory feature.
ylangisc Jun 27, 2025
3fd67a7
Fix order.
ylangisc Jun 27, 2025
1f15fd4
Fix dirId length for UVF.
ylangisc Jun 27, 2025
9f9fe9e
Fix path.
ylangisc Jun 27, 2025
c90065c
Fix reading larger files.
ylangisc Jun 27, 2025
68f2e5a
Review.
ylangisc Jun 28, 2025
564eb17
Require write lock when creating directory id.
dkocher Jul 6, 2025
feb2b27
Drop V6 implementation.
ylangisc Aug 29, 2025
e191c2c
Drop more V6 implementations.
ylangisc Aug 29, 2025
e2664a3
Remove V6 test.
ylangisc Sep 1, 2025
4d1a82e
Remove V6 test.
ylangisc Sep 1, 2025
492437a
Generalize and use Cryptolib interfaces where possible.
ylangisc Sep 2, 2025
d952224
Fix tests.
ylangisc Sep 2, 2025
337f051
Make protected.
dkocher Sep 2, 2025
4a338a7
WIP - UVF
ylangisc Oct 2, 2025
a55a9fe
Bump version to 9.3.0.uvfdraft-SNAPSHOT.
dkocher Oct 2, 2025
c992668
Remove parameter.
dkocher Oct 2, 2025
e97ea2f
Move test.
ylangisc Oct 5, 2025
9d53dcc
Fix test.
ylangisc Oct 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion azure/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>ch.cyberduck</groupId>
<artifactId>parent</artifactId>
<version>9.3.0-SNAPSHOT</version>
<version>9.3.0.uvfdraft-SNAPSHOT</version>
</parent>
<artifactId>azure</artifactId>
<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import ch.cyberduck.core.DisabledProgressListener;
import ch.cyberduck.core.Host;
import ch.cyberduck.core.LoginConnectionService;
import ch.cyberduck.core.cryptomator.CryptoVault;
import ch.cyberduck.core.vault.VaultMetadata;
import ch.cyberduck.test.VaultTest;

import org.junit.After;
Expand All @@ -34,11 +34,11 @@ public class AbstractAzureTest extends VaultTest {

@Parameterized.Parameters(name = "vaultVersion = {0}")
public static Object[] data() {
return new Object[]{CryptoVault.VAULT_VERSION_DEPRECATED, CryptoVault.VAULT_VERSION};
return new Object[]{VaultMetadata.Type.V8, VaultMetadata.Type.UVF};
}

@Parameterized.Parameter
public int vaultVersion;
public VaultMetadata.Type vaultVersion;

@After
public void disconnect() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@
import ch.cyberduck.core.transfer.TransferStatus;
import ch.cyberduck.core.vault.DefaultVaultRegistry;
import ch.cyberduck.core.vault.VaultCredentials;
import ch.cyberduck.core.vault.VaultMetadata;
import ch.cyberduck.test.IntegrationTest;

import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
Expand All @@ -42,7 +44,6 @@
import java.util.EnumSet;

import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeTrue;

@Category(IntegrationTest.class)
@RunWith(value = Parameterized.class)
Expand All @@ -51,9 +52,9 @@ public class AzureDirectoryFeatureTest extends AbstractAzureTest {
@Test
public void testMakeDirectoryEncrypted() throws Exception {
final Path home = new Path("cyberduck", EnumSet.of(Path.Type.directory, Path.Type.volume));
final CryptoVault cryptomator = new CryptoVault(
new Path(home, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory)));
final Path vault = cryptomator.create(session, new VaultCredentials("test"), vaultVersion);
final Path vault = new Path(home, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory));
final AbstractVault cryptomator = new CryptoVaultProvider(session).create(session, null, new VaultCredentials("test"),
new VaultMetadata(vault, vaultVersion));
session.withRegistry(new DefaultVaultRegistry(new DisabledPasswordCallback(), cryptomator));
final Path test = cryptomator.getFeature(session, Directory.class, new AzureDirectoryFeature(session)).mkdir(
cryptomator.getFeature(session, Write.class, new AzureWriteFeature(session)), new Path(vault, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory)), new TransferStatus());
Expand All @@ -62,13 +63,15 @@ public void testMakeDirectoryEncrypted() throws Exception {
cryptomator.getFeature(session, Delete.class, new AzureDeleteFeature(session)).delete(Arrays.asList(test, vault), new DisabledLoginCallback(), new Delete.DisabledCallback());
}


//TODO enable
@Test
@Ignore(value = "Filename shortening not yet implemented")
public void testMakeDirectoryLongFilenameEncrypted() throws Exception {
assumeTrue(vaultVersion == CryptoVault.VAULT_VERSION_DEPRECATED);
final Path home = new Path("cyberduck", EnumSet.of(Path.Type.directory, Path.Type.volume));
final CryptoVault cryptomator = new CryptoVault(
new Path(home, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory)));
final Path vault = cryptomator.create(session, new VaultCredentials("test"), vaultVersion);
final Path vault = new Path(home, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory));
final AbstractVault cryptomator = new CryptoVaultProvider(session).create(session, null, new VaultCredentials("test"),
new VaultMetadata(vault, vaultVersion));
session.withRegistry(new DefaultVaultRegistry(new DisabledPasswordCallback(), cryptomator));
final Path test = cryptomator.getFeature(session, Directory.class, new AzureDirectoryFeature(session)).mkdir(
cryptomator.getFeature(session, Write.class, new AzureWriteFeature(session)), new Path(vault, new AlphanumericRandomStringService(130).random(), EnumSet.of(Path.Type.directory)), new TransferStatus());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@
import ch.cyberduck.core.cryptomator.features.CryptoListService;
import ch.cyberduck.core.cryptomator.features.CryptoTouchFeature;
import ch.cyberduck.core.cryptomator.features.CryptoWriteFeature;
import ch.cyberduck.core.cryptomator.features.CryptoWriteFeature;
import ch.cyberduck.core.features.Delete;
import ch.cyberduck.core.shared.DefaultTouchFeature;
import ch.cyberduck.core.transfer.TransferStatus;
import ch.cyberduck.core.vault.DefaultVaultRegistry;
import ch.cyberduck.core.vault.VaultCredentials;
import ch.cyberduck.core.vault.VaultMetadata;
import ch.cyberduck.test.IntegrationTest;

import org.junit.Test;
Expand All @@ -52,9 +54,9 @@ public class AzureListServiceTest extends AbstractAzureTest {
@Test
public void testListCryptomator() throws Exception {
final Path home = new Path("cyberduck", EnumSet.of(Path.Type.directory, Path.Type.volume));
final CryptoVault cryptomator = new CryptoVault(
new Path(home, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory)));
final Path vault = cryptomator.create(session, new VaultCredentials("test"), vaultVersion);
final Path vault = new Path(home, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory));
final AbstractVault cryptomator = new CryptoVaultProvider(session).create(session, null, new VaultCredentials("test"),
new VaultMetadata(new Path(home, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory)), vaultVersion));
session.withRegistry(new DefaultVaultRegistry(new DisabledPasswordCallback(), cryptomator));
final Path test = new Path(vault, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file));
assertTrue(new CryptoListService(session, new AzureObjectListService(session), cryptomator).list(vault, new DisabledListProgressListener()).isEmpty());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import ch.cyberduck.core.transfer.TransferStatus;
import ch.cyberduck.core.vault.DefaultVaultRegistry;
import ch.cyberduck.core.vault.VaultCredentials;
import ch.cyberduck.core.vault.VaultMetadata;
import ch.cyberduck.test.IntegrationTest;

import org.junit.Test;
Expand All @@ -58,9 +59,9 @@ public class AzureMoveFeatureTest extends AbstractAzureTest {
@Test
public void testMove() throws Exception {
final Path home = new Path("cyberduck", EnumSet.of(Path.Type.directory, Path.Type.volume));
final CryptoVault cryptomator = new CryptoVault(
new Path(home, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory)));
final Path vault = cryptomator.create(session, new VaultCredentials("test"), vaultVersion);
final Path vault = new Path(home, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory));
final AbstractVault cryptomator = new CryptoVaultProvider(session).create(session, null, new VaultCredentials("test"),
new VaultMetadata(vault, vaultVersion));
session.withRegistry(new DefaultVaultRegistry(new DisabledPasswordCallback(), cryptomator));
final Path folder = cryptomator.getFeature(session, Directory.class, new AzureDirectoryFeature(session)).mkdir(
cryptomator.getFeature(session, Write.class, new AzureWriteFeature(session)), new Path(vault, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory)), new TransferStatus());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@
import ch.cyberduck.core.transfer.TransferStatus;
import ch.cyberduck.core.vault.DefaultVaultRegistry;
import ch.cyberduck.core.vault.VaultCredentials;
import ch.cyberduck.core.vault.VaultMetadata;
import ch.cyberduck.test.IntegrationTest;

import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
Expand All @@ -44,19 +46,20 @@

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeTrue;

@Category(IntegrationTest.class)
@RunWith(value = Parameterized.class)
public class AzureTouchFeatureTest extends AbstractAzureTest {

//TODO

@Test
@Ignore(value = "Filename shortening not yet implemented")
public void testTouchLongFilenameEncrypted() throws Exception {
assumeTrue(vaultVersion == CryptoVault.VAULT_VERSION_DEPRECATED);
final Path home = new Path("cyberduck", EnumSet.of(Path.Type.volume, Path.Type.directory));
final CryptoVault cryptomator = new CryptoVault(
new Path(home, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory)));
final Path vault = cryptomator.create(session, new VaultCredentials("test"), vaultVersion);
final Path vault = new Path(home, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory));
final AbstractVault cryptomator = new CryptoVaultProvider(session).create(session, null, new VaultCredentials("test"),
new VaultMetadata(vault, vaultVersion));
session.withRegistry(new DefaultVaultRegistry(new DisabledPasswordCallback(), cryptomator));
final TransferStatus status = new TransferStatus();
final Path test = new CryptoTouchFeature<>(session, new AzureTouchFeature(session), cryptomator).touch(
Expand All @@ -68,12 +71,12 @@ public void testTouchLongFilenameEncrypted() throws Exception {
}

@Test
@Ignore(value = "Filename shortening not yet implemented")
public void testTouchLongFilenameEncryptedDefaultFeature() throws Exception {
assumeTrue(vaultVersion == CryptoVault.VAULT_VERSION_DEPRECATED);
final Path home = new Path("cyberduck", EnumSet.of(Path.Type.volume, Path.Type.directory));
final CryptoVault cryptomator = new CryptoVault(
new Path(home, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory)));
final Path vault = cryptomator.create(session, new VaultCredentials("test"), vaultVersion);
final Path vault = new Path(home, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory));
final AbstractVault cryptomator = new CryptoVaultProvider(session).create(session, null, new VaultCredentials("test"),
new VaultMetadata(vault, vaultVersion));
session.withRegistry(new DefaultVaultRegistry(new DisabledPasswordCallback(), cryptomator));
final TransferStatus status = new TransferStatus();
final Path test = new CryptoTouchFeature<>(session, new AzureTouchFeature(session), cryptomator).touch(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import ch.cyberduck.core.transfer.TransferStatus;
import ch.cyberduck.core.vault.DefaultVaultRegistry;
import ch.cyberduck.core.vault.VaultCredentials;
import ch.cyberduck.core.vault.VaultMetadata;
import ch.cyberduck.test.IntegrationTest;

import org.apache.commons.lang3.RandomUtils;
Expand Down Expand Up @@ -66,9 +67,9 @@ public void testWrite() throws Exception {
final byte[] content = RandomUtils.nextBytes(1048576);
status.setLength(content.length);
final Path home = new Path("cyberduck", EnumSet.of(Path.Type.volume, Path.Type.directory));
final CryptoVault cryptomator = new CryptoVault(
new Path(home, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory)));
final Path vault = cryptomator.create(session, new VaultCredentials("test"), vaultVersion);
final Path vault = new Path(home, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory));
final AbstractVault cryptomator = new CryptoVaultProvider(session).create(session, null, new VaultCredentials("test"),
new VaultMetadata(vault, vaultVersion));
session.withRegistry(new DefaultVaultRegistry(new DisabledPasswordCallback(), cryptomator));
final CryptoWriteFeature<Void> writer = new CryptoWriteFeature<>(session, new AzureWriteFeature(session), cryptomator);
final FileHeader header = cryptomator.getFileHeaderCryptor().create();
Expand Down
Loading
Loading